I am using make4ht on the file Test.tex containing:
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
Testing cross references for equations.
\begin{equation}
e^{\mathrm{i}\pi}+1=0 \label{eq:test equation}
\end{equation}
Equation \ref{eq:test equation} is known as Euler's identity.
\end{document}
using the command
make4ht Test.tex "mathjax"
to get the HTML code (excluding the header)
<body>
<!-- l. 6 --><p class='noindent'>Testing cross references for equations. \begin {equation} e^{\mathrm
{i}\pi }+1=0 \label {eq:test equation} \end {equation}
Equation <span class='cmbx-12'>??</span> is known as Euler’s identity. </p>
</body>
Am I missing something obvious I need to do to get the correct equation number instead of the ???
make4ht Test.tex "mathml,mathjax", or try the Lua code from here: https://tex.stackexchange.com/a/378359/2891 – michal.h21 Mar 26 '21 at 20:08\renewcommand\eqref[1]{\NoFonts\HChar{92}eqref\{#1\}\EndNoFonts}to my.cfgfile formake4ht. It breaks if the label contains an underscore, but works well enough for my needs otherwise. – Rushi Mar 26 '21 at 23:20\renewcommand\eqref[1]{\NoFonts\HChar{92}eqref\{\detokenize{#1}\}\EndNoFonts}(untested, but it should work) – michal.h21 Mar 27 '21 at 10:25