emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Fleischer <danflscr@gmail.com>
To: "Rudolf Adamkovič" <salutis@me.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: MathJax extension does not work
Date: Sun, 10 Oct 2021 20:40:42 +0300	[thread overview]
Message-ID: <m2pmscrd5x.fsf@gmail.com> (raw)
In-Reply-To: <m2mtnh44y7.fsf@me.com> ("Rudolf Adamkovič"'s message of "Sun, 10 Oct 2021 11:14:24 +0200")

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	other threads:[~2021-10-10 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10  9:14 MathJax extension does not work Rudolf Adamkovič
2021-10-10 17:40 ` Daniel Fleischer [this message]
2021-10-10 18:11   ` Daniel Fleischer
2021-10-10 19:39   ` Rudolf Adamkovič
2023-03-28  4:34 ` chris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pmscrd5x.fsf@gmail.com \
    --to=danflscr@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=salutis@me.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).