emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MathJax extension does not work


From: Daniel Fleischer
Subject: Re: MathJax extension does not work
Date: Sun, 10 Oct 2021 20:40:42 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (darwin)

Rudolf Adamkovič <salutis@me.com> writes:

> I would like to use the "\mathclap" command from the "mathtools" package in 
> my Org document. In LaTeX, it works. For

Hi, there are 2 problems: first the mathtools.js library was introduced in
mathjax 3.2 but org provided version 2.7 as can be seen in the HTML

#+begin_src html
<script 
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML";></script>
#+end_src

One can use the newer mathjax by replacing this with
#+begin_src html
<script type="text/javascript" id="MathJax-script" async
  src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";>
</script>
#+end_src

as seen in https://docs.mathjax.org/en/latest/web/start.html.

You can just change the "path" in 'org-html-mathjax-options'.


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
<script>
window.MathJax = {
  loader: {load: ['[tex]/mathtools']},
  tex: {packages: {'[+]': ['mathtools']}}
};
</script>
#+end_src

After that it worked.

Not sure why the "#+HTML_MATHJAX: mathtools.js" doesn't do anything.
Need further investigation. 

-- 

Daniel Fleischer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]