#+BEGIN_COMMENT
.. title: Mathjax tricks
.. slug: mathjax
.. date: 2023-12-31 12:13:18 UTC+01:00
.. tags:
.. category:
.. link:
.. description:
.. type: text
.. has_math: true
#+END_COMMENT
#+setupfile: ../preamble.org
#+PROPERTY: header-args:python :session :eval no-export :exports both :results output
* Mathjax in Nikola
It took a bit of time to set up Mathjax for Nikola. This is what I had to add.
The ~equationNumbers~ part adds equation numbers. The ~Macros~ part contain the equivalent of the {{{latex}}} ~newcommand~s.
I'll add more commands over time, but the list below shows how to do that. Mind that ~\\\\~ is necessary to escape a single backslash.
#+begin_src python
MATHJAX_CONFIG = """
"""
#+end_src
* Single Shot Remarks
Sometimes I want to use mathjax macros in just file. Put these lines on top of the file so that the macros apply just this document.
#+begin_src latex
\(
\def\RR{{\bf R}}
\def\bold#1{{\bf #1}}
\)
#+end_src