How do I display a proof tree with HTML,CSS and/or Javascript? -


i want display proof tree in style of natural deduction within web page. data json file.

whats best way display this? possible css? or there library can this? rendering image not possible, because should interactive. should mention tree can large.

example: proof tree

update: better example of end result should like: enter image description here

the easiest solution mathjax latex javascript renderer. , there quite few other similar rendering options out there.

alternatively @ mathml, w3c standard writing mathematical equations. sadly, right now, support quite lacking can seen here, long term it's going great solution. additionally mentioned mathjax can used mathml shim in browsers not support mathml yet.

the concern mathjax shim going when make interactive it's going interact differently code in browsers , not support mathml, despite advice mathml except if you're bound latex.

based on update not sure whether can expressed in mathml or latex , fear thing draw on canvas or set in svg if need interactivity later on. can warn know that's not going simple thing if aren't used it.


to add interactivity mathjax:

  1. use mathml input
  2. use html/css output
  3. disable mathjax context menu adding showmathmenu:false core mathjax config
  4. include id's in mathml markup (literally <mo id="someid"> example)
  5. use example jquery bind id after mathjax has finished (i.e. $("#someid").on("mousemove",function(){...}))

a working demo can found here, move on equal sign trigger alert.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -