#118·ReLaXed

Manually set inline math delimiter

Author: aiifabbfCreated Dec 5, 2018Updated Jan 7, 2021

If I want MathJax to detect and render inline equations delimited in a pair of $, there currently seems no way to specify this in config.yml.

I tried inserting MathJax loading script and manually setting the delimiters by

    <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>
    <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ['$','$'], ["\\(","\\)"] ],
            displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
            processEscapes: true,
            processEnvironments: true
        },
        // Center justify equations in code and markdown cells. Elsewhere
        // we use CSS to left justify single line equations in code cells.
        displayAlign: 'center',
        "HTML-CSS": {
            styles: {'.MathJax_Display': {"margin": 0}},
            linebreaks: { automatic: true }
        }
    });
    </script>

but the output pdf looks like this, with a MathJax loading mark on the bottom left image

It seems ReLaXed did not wait until MathJax has done rendering.

How can I set inline equation delimiter to $ then?