Hi,

I’m wondering if it is possible to load MathJax extensions when previewing LaTeX in markdown-files. If someone knows how to do it I would love some help. I’m particularly interested in loading the ams extension.

http://docs.mathjax.org/en/latest/input/tex/extensions/

Best regards,

Björn

There is no bult-in support for this.

You’d have to disable MathJax in **Preferences > Media** and do your own linking and configuring.

Ok, thanks! I will try to get it to work. I have now disabled MathJax in DT3. I already fiddled a little and got MathJax to load (from cdn.jsdelivr.net) in DTTG but not DT3. I am a little confused Any idea what I’m doing wrong?

Best,

Björn

Hi again,

I have gotten this to work. The problem was my lack of knowledge of markdown and not DT3.

Best,

Björn

Glad to hear it. Can you share your findings to potentially assist others?

Thanks!

Sure! I should say though that I still have to figure out how to load extensions. However, if you add

```
HTML header:</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
```

to the top in your markdown-file then you will be able to preview the LaTeX output in both DT3 and DTTG. I know how to work with LaTeX but am a novice when it comes to markdown and MathJax. If someone can point me to some good references I will be very grateful. I will also update this with code on how to load extensions if I figure it out.

Best,

Björn

Ahh, thanks.

Yeah, bring back some details if you get it figured out.

Hi again,

I have tried to get commutative diagrams and automatic numbering of display equations to work but have not come up with a good solution. If you use the HTML header from here https://marked2app.com/help/How-to_tips_and_tricks.html#mathjax_tips

you can load extensions. I even got commutative diagrams to work in DT3 (but not DTTG for some reason). However, this loads an old version of MathJax (and the cdn has been shut down https://www.mathjax.org/cdn-shutting-down/). I’m not sure I can solve this for MathJax 3 without help. I am quite happy that I now have MathJax preview on DTTG also. I will use http://presheaf.com/ to produce diagrams for the time being and will manage without automatic numbering of equations.

That said, any help would be greatly appreciated. I cannot figure out where MathJax = { … } should go in the HTML header in order to work for markdown-files (if it is possible at all). Here is the documentation that should be relevant: https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options

Best regards,

Björn