greyblake / vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
GNU General Public License v2.0
209 stars 29 forks source link

MathJax support #39

Open verga opened 9 years ago

verga commented 9 years ago

You may add these lines to autoload/preview.vim file

 247                                                                                
 248  <script type="text/javascript"                                        
 249    src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">                                                            
 250  </script>                                                            

to allow (inline formula) and [diplay formula] to be translated in latex using MathJax.

tobanw commented 8 years ago

Just to clarify this, you need to type \\(inline math\\) or \\[display math\\] because RedCarpet (and most other renderers) requires backslashes to be escaped. The result is that when rendered as html, you get \(inline math\) or \[display math\], which MathJax then converts.