MathJax macros in Quarto

tips
MathJax
Quarto
Author
Published

August 6, 2023

Modified

March 10, 2024

As a MathJax and javascript noob, it seems the most convenient way to define MathJax macros is to write a preamble file and include it by:

format:
  html:
    include-in-header: ../_utils/mathjax_preamble.html

Example: \[ \pdv{\rho}{t} + \div (\rho \u) = 0 \]

Reuse

Citation

BibTeX citation:
@online{li2023,
  author = {Li, Chengkun},
  title = {MathJax Macros in {Quarto}},
  date = {2023-08-06},
  url = {https://pipme.github.io/posts/2023-08-06-Mathjax/index-gist.html},
  langid = {en}
}
For attribution, please cite this work as:
Li, Chengkun. 2023. “MathJax Macros in Quarto.” August 6, 2023. https://pipme.github.io/posts/2023-08-06-Mathjax/index-gist.html.