0

On the math SE site, one can render LaTeX by placing it between two Dollar signs, e.g. $a \in X$. It's also possible to type a literal Dollar sign by escaping with a backslash. What are the options available to me if I want to implement something similar? I'm guessing there must be a library that handles the difficult parts for me, but I haven't been able to find one! For example, in the string Andrew Wiles proved that if $a^n+b^n=c^n$ for $a,b,c \in N$, then $n=1$, only the things between the Dollar signs should be rendered as LaTeX.

Note: it's not so much the rendering part that I'm concerned with, as I know there's a multitude of libraries to do that, I just don't know how to actually extract what I need to render. Although if there is a library that both extracts and renders then I'm all ears.

cb7
  • 493
  • 4
  • 10

1 Answers1

1

JsMath does exactly what you want to do. Take a look at the documentation here

This question was already asked here.

Other alternatives are:

TrinTragula
  • 360
  • 2
  • 13