Rudolf Adamkovič <salu...@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