{{ message }}

Instantly share code, notes, and snippets.

# Michael Scroggiescrogster

Last active Aug 23, 2016
Adding a png logo to an R plot
 #I write papers and reports using Rmarkdown, knitting to pdf. #My co-authors use word, so I usually knit a version to docx for them to edit. #This mostly works flawlessly, except when I use \begin{align} and \end{align} to delimit display equations. #Using \begin{align} and \end{align} results in nicely centered and numbered equations in pdf, BUT #the equations don't render at all when I try to make a docx. #As a quick hack so I can make a passable docx to share with my co-authors, the following script replaces all instances #of \begin{align} and \end{align} with "". The modified version of the original Rmarkdown file knits to docx just fine, # albeit without equation numbers.