1

I am trying to knit a .Rmd file to a word file, where I need to include equations and their numbers.

The code I tried looks like below:

$$
\begin{cases}
\tag{1}
\frac{dX}{dt}=a\\\frac{dY}{dt}=b
\end{cases}
$$

But this doesn't work.

There is a similar question

Equation Numbering in Rmarkdown - For Export to Word

Yet the answer doesn't work for me. I am wondering if anyone have a good solution to this.

Thanks a lot!

JChen
  • 11
  • 2

1 Answers1

0

Welcome to SO, @user15578296.

Here is your equation ready for Word:

---
output: word_document
---

$$\begin{cases} \frac{dX}{dt}=a\\\frac{dY}{dt}=b \end{cases}$$

Regarding the numbering, you should follow the answer provided in your mentioned linked question.

bttomio
  • 2,206
  • 1
  • 6
  • 17
  • Thank you for the response. But that solution doesn't work for me. After downloading "pandoc-crossref" from the site, and when I knit the file, I was prompted "'panic-corssref' cannot be opened because the developer cannot be verified. BTW, I am a mac user. – JChen Apr 13 '21 at 00:11