I cannot figure out how to use eqnarray to create equations in R markdown so that I can create both html and pdf output. This markdown R works for output_format='html_document' , but not output_format='pdf_document'
My LaTeX equations $$ \begin{eqnarray} A &=& x \\ B &=& y \end{eqnarray} $$
For pdf output, this gives this error:
! Missing \endgroup inserted. <inserted text> \endgroup l.81 \begin{eqnarray} pandoc: Error producing PDF from TeX source Error: pandoc document conversion failed with error 43
If I delete $$ , then this markdown R works for PDF output, but the equation is missing in the html output.
My LaTeX equations \begin{eqnarray} A &=& x \\ B &=& y \end{eqnarray}
Am I missing something? Is there a way to generate both PDF and html output from the same document?
r r-markdown
John
source share