0

Simple example latex, with an equation and a reference to it:

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}


\begin{equation}
\label{eq:somelabel}
e=mc^2
\end{equation}

The equation \ref{eq:somelabel} is a typical formula.


\end{document}

compiled it looks like this: compiledpdf

The problem is that this both the numbering and the reference is lost when I convert to md since I get something like this:

$$\label{eq:somelabel}
e=mc^2$$

The equation [\[eq:somelabel\]](#eq:somelabel){reference-type="ref"
reference="eq:somelabel"}

which is a problem because it makes the conversion later to html very ugly. Am I missing something obvious? Tried using the cross-ref filter but no to avail. Yet I know bookdown in R can deal with equation environment no problem.

1
  • 1
    Converting the equation env into the unnumbered $$...$$ is obviously wrong. But this is not really latex related, you'll probably need to figure out how to configure pandoc correctly (I have no idea) – daleif Aug 25 '20 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.