[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MathJax extension does not work
From: |
Rudolf Adamkovič |
Subject: |
Re: MathJax extension does not work |
Date: |
Sun, 10 Oct 2021 21:39:19 +0200 |
Daniel Fleischer <danflscr@gmail.com> writes:
> […] the mathtools.js library was introduced in mathjax 3.2 but org provided
> version 2.7 […]
> You can just change the "path" in 'org-html-mathjax-options'.
I see. I tried the following and it worked:
(with-eval-after-load 'ox-html
(add-to-list 'org-html-mathjax-options
'(path
"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js")))
> Secondly, mathtools is not autoloaded so you need to call it; for
> example you can put it in org using "export" block.
>
> #+begin_src HTML
The "export" blocks did not work for me, but the following did:
(setq-default org-html-head "
<script>
window.MathJax = {
loader: {load: ['[tex]/mathtools']},
tex: {packages: {'[+]': ['mathtools']}}
};
</script>")
> After that it worked.
> Not sure why the "#+HTML_MATHJAX: mathtools.js" doesn't do anything.
All the above makes using MathJax extensions impractical. I would have to
include HTML hacks in my Org documents or tie the documents to my Emacs
configuration, if I understand everything. Neither sounds right, and thus I
will avoid using "modern" MathJax until Org switches to it and HTML_MATHJAX
actually works.
P.S. I wonder why Org uses MathJax 2.x when other popular tools, such as
Pandoc, use the latest one.
Thank you for your help!
Rudy
--
"'Contrariwise,' continued Tweedledee, 'if it was so, it might be; and if it
were so, it would be; but as it isn't, it ain't. That's logic.'" -- Lewis
Carroll, Through the Looking Glass
Rudolf Adamkovič <salutis@me.com>
Studenohorská 25
84103 Bratislava
Slovakia
[he/him]