1

My code in Rmarkdown for numbered math formulae works when I knit to html_document. But when I try to knit to a Word_document, no matter how I attempt to place the dollar signs, $, it does not work.

I am typing my project in Word and have been able to use Rmarkdown to get mathematic expressions knitted and copy over. But since I need to number them this new code is not knitting properly.

Is there a way to save the rendered html file into a word document? Thanks.

My code in Rmarkdown is as follows:

---

output: html_document
---



\begin{equation}
\tag{3.1}
Y_t = a_0 + \sum_{i=1}^{L}b_{1i}Y_{t-i}+\sum_{i=1}^{L}b_{2i}X_{t-i}+\varepsilon_t
\end{equation}

\begin{equation}
\tag{3.2}
Y_t = a_0 + \sum_{i=1}^{L}b_{1i}Y_{t-i}+\varepsilon_t
\end{equation}

Which renders correctly to:

rendering from html

spete
  • 11
  • 1
  • Does this answer your question? [r markdown equation cannot knit correctly in Word 2016](https://stackoverflow.com/questions/63889747/r-markdown-equation-cannot-knit-correctly-in-word-2016) – manro Dec 19 '21 at 10:30
  • Also look here: https://stackoverflow.com/questions/45870589/equations-and-references-lost-when-knitting-rmarkdown-document-as-word and here: https://stackoverflow.com/questions/26719753/rmarkdown-equation-in-word-non-numbers-are-question-marks – manro Dec 19 '21 at 10:31
  • 1
    Hi Thanks, thanks for your references. I'll take a look. The main reason I have this issue is I need the equation numbering. I'm able to get equations to work in Word with knitr using $$ equation $$ but cannot find a way to number them. The code though seems to work when rendering in html. – spete Dec 19 '21 at 19:05
  • Yes, look, you can find all answers here. – manro Dec 19 '21 at 19:07

0 Answers0