mathjax for tex support (General)

by Milo ⌂, Sunday, May 13, 2018, 16:09 (8 days ago) @ Milo


here an example of how it (could) work

<script type="text/javascript" async
<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" }
<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>

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>.


applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Complete thread:

 RSS Feed of thread

powered by my little forum