# markdown-mode only renders some, not all, LaTeX strings

I'm using markdown-mode. I followed these instructions to render LaTeX math strings: http://jblevins.org/projects/markdown-mode/

I am rendering to HTML with markdown-export and markdown-live-preview-mode. Have I assumed incorrectly that these LaTeX expressions can be rendered to HTML?

Simple LaTeX strings render fine:

then the event ${ \tau \leq n }$ is just

Any LaTeX string with a function inside does not render:

with probability $\frac{1}{2}$ and

Extra curly braces do not fix rendering:

with probability ${\frac{1}{2}}$ and

I think I have the relevant Macports ports installed, and the relevant Emacs packages.

Thanks!

It depends on how exactly you are rendering the LaTeX fragments. I'm not sure if this is possible with the markdown program, but it does work with Pandoc. To use this in markdown-mode, customize markdown-command (via M-x customize-variable) to pandoc -s --mathjax. This assumes you have pandoc installed, of course. There are other options available as well; see the Pandoc documentation for more details.