Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
MathJax unable to render inline elements?

I am trying to create a basic HTML page that renders LaTEX using the MathJax library (https://www.mathjax.org/). However, when I run my webpage in my browser, only the non-inline LaTEX (enclosed in $$) shows, whereas the inline LaTEX does not show (enclosed in $):

enter image description here

This seems strange, considering that I believe I have configured the syntax ($[inline_LaTEX]$) of inline LaTEX through the following piece of code:

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: { inlineMath: [['$', '$']] }
  });
</script>

Below is my code:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0" >
        <title>MathJax Test</title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
        <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
    
        <script type="text/x-mathjax-config">
          MathJax.Hub.Config({
            tex2jax: { inlineMath: [['$', '$']] }
          });
        </script>
    </head>
    <body>
        <div class="container">
            Here is an example of non-inline LaTEX:
            $$c^2 = a^2 + b^2$$
            Here is an example of inline LaTEX: $c^2 = a^2 + b^2$
        </div>
    </body>
</html>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

From @HenryEcker's comment, changing the MathJax import to:

<script id="MathJax-script" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

Worked for me.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!