Open hturner opened 12 hours ago
Numbering and cross-referencing equations are definitely trickier than other elements. It shouldn't be too hard to support MathJax. I need to do more research on KaTeX (the last two links in your post are missing; did you mean https://github.com/KaTeX/KaTeX/issues/2003?).
Yes, that's the one. I'll check and update my links.
As far as I can tell, the only way to cross-reference auto-numbered equations with litedown is via MathJax:
that we can save in a file, say
header.html
. Alternatively create amathjax-config.js
file with the configuration.header.html
:Equation $\ref{eq:sample}$
, where$\ref{eq:sample}$
will be replace by the equation number hyperlinked to an anchor on the equation.Unfortunately this is not possibly with KaTeX (there is a longstanding issue on missing support for \label and \ref).
It would help those looking to cross-reference equations if litedown:
Is numbering/cross-referencing of Markdown equations on the roadmap? Something like the Quarto behaviour could be nice.