I'm trying to set up MathJax to work with vimwiki. According to the manual:

  1. using the MathJax server for rendering (needs an internet connection). Add to your HTML template the following line:
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

Which I did:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/config/TeX-AMS-MML_HTMLorMML.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=%encoding%">

But it didn't work. MathJax equations don't render on my browser, they show up like this:

\(\frac {1} {1 + \alpha} \)

2 Answers 2


Vimwiki uses "$" and "$" as a delimiter not "\(" and "\)".

also include this in your tag, so that MathJax doesn't prompt an error.

    <script type="text/javascript">
    window.MathJax     =   {
        tex:    {
            inlineMath: [['$', '$'], ['\\(', '\\)']]
        svg:    {
            fontCache:  'global'

As far as I can see, the line you've placed there is not the line mentioned in the docs for vimwiki. Try to put this verbatim:

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

That should sort you out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.