zeigna
zeigna

Reputation: 23

Math equations not rendering when I knit from Rmd to Word

I am using Microsoft Word V. 16 for Mac. In an RStudio .rmd file, I want to create a math equation. You see a preview of the equation in .rmd but the equation doesn't render when I knit to Word. Any suggestions to help fix this issue so the equation will display instead of the code? NOTE: it's not working for inline code or the "pop-out" code.

$\Large z \space score = \frac{(score \space  - \space mean)}{standard \space deviation}$
$$\Large z \space score = \frac{(score \space  - \space mean)}{standard \space deviation}$$

in .rmd:

formula preview]

in Word 2016 for mac:

Word output]

Upvotes: 2

Views: 2274

Answers (1)

tarleb
tarleb

Reputation: 22599

This happens whenever pandoc does not know how to convert one or multiple LaTeX commands in the equation.

Use this instead:

$z \textrm{score} = \frac{(\textrm{score} - \textrm{mean})}{\textrm{standard  deviation}}$

Upvotes: 2

Related Questions