I’m trying to use org-mode to export something as an HTML document, with MathJax equations. I know that MathJax supports the physics package, so it seems like it should be possible to tell emacs to tell MathJax to load physics
. But how?
The code suggested in the link above is
window.MathJax = {
loader: {load: ['[tex]/physics']},
tex: {packages: {'[+]': ['physics']}}
};
so I tried putting variations of these lines in the document:
#+HTML_MATHJAX: loader: {load: ['[tex]/physics']} tex: {packages: {'[+]': ['physics']}}
#+HTML_MATHJAX: load: ['[tex]/physics'] packages: {'[+]': ['physics']}
But neither worked. What’s the right way to do this?
Example:
#+TITLE: Some physics
^^^ What can I put here to use the physics package?
$\ket{-}=\frac{\ket{0}-\ket{1}}{\sqrt{2}}$
Edit: I put one solution down below that uses pandoc.
physics
package. I’ll update the question to be more specific.ox-pandoc
which can be added to your configuration and export from emacs. I use doom-emacs configured with(org +pandoc)
but I am not pushing you to that (but useful if you need a fast solution).ox-pandoc
. What should I do to make emacs use it?