mathjax for tex support (General)
Hi,
here an example of how it (could) work
<html> <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <script type="text/x-mathjax-config">/*<![CDATA[*/MathJax.Hub.Config({ tex2jax: { inlineMath: [ ["$","$"], ["\\(","\\)"] ], displayMath: [ ["$$","$$"], ["\\[","\\]"] ], ignoreClass: "tex2jax_ignore", processClass: "tex2jax_process", processEscapes: true }, TeX: { equationNumbers: { autoNumber: "AMS" } } }); /*!]]>*/</script> <body class="tex2jax_ignore"> <p>Some Text with TeX <span class="tex2jax_process">\sin{x} = y</span></p> <p>Some Text with TeX <span class="tex2jax_process">$\sin{x} = y$</span></p> <p>Some Text with TeX <span class="tex2jax_process">$$\sin{x} = y$$</span></p> </body> </html>
We need to define two classes e.g. tex2jax_ignore
for ignoring TeX and tex2jax_process
for parsing equations. Thus, the [tex]
-Tag must replaced by (in my example) <span class="tex2jax_process">...</span>
or, to be downwards compatible with the current solution, by <span class="tex2jax_process">$...$</span>
.
/Micha
--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences