I am trying to use pandoc to convert a latex file into an html file with math rendered via mathjax or mathml. I would like to simultaneously provide cross-references to both numbered amsthm theorems and numbered equations. It seems that I can get only one of these two to work at a time. Either a cross-reference to a numbered theorem or a cross-reference to a numbered equation. But not both. Below is my MWE.
\documentclass[11pt]{article} \usepackage{amsthm} \newtheorem{thm}{Theorem} \begin{document} \title{This is a test document} \begin{thm} \label{mythm} This is a theorem. \end{thm} \begin{proof} Easy. \end{proof} Theorem \ref{mythm} is correct. \begin{equation} \label{myequation} a+b=c. \end{equation} Equation \ref{myequation} is also correct. \end{document} I am executing this using either
pandoc --filter pandoc-tex-numbering test.tex -f latex -t html -s -o test.html --mathjax -crossref or
pandoc test.tex -f latex -t html -s -o test.html --mathjax -crossref at the Terminal command line on macOS Sonoma 14.5. The former command produces this output.
The latter command produces this output. 
So, it seems that the pandoc-tex-numbering filter is suppressing the cross-reference to the amsthm Theorem, whereas removing that filter eliminates the equation numbering as well as the equation cross-reference. Do you have any suggestions for how I can make this work? I am willing to use other pandoc filters if needed. I am using pandoc version 3.6.3.
