I am using pandoc through RStudio to convert .Rmd files to docx format. I am able to insert Latex equations and have them appear in my docx file correctly. However, there are a few errors here and there where equations appear correctly if I paste the code into something like this but end up garbled in the docx file.
A simple reproducible example would be:
$$\tilde{E}_{p}$$
The double dollar signs simply tell Markdown and eventually pandoc to treat this as an equation, so drop them if you are pasting the code into the web site above. If all goes well this should produce a capital E with a tilde over the top of it and a subscript p after it.
In MS Word (2010) it appears with the tilde drawn through the E. Referencing a trick that worked on a similar type problem here you can convert things to linear form and then you get E~ or what would be $$E\sim$$ in Latex (I think).
Eventually, I think this is something that deserves a bug report on the pandoc site, but it seems too trivial and specific given how much work is already going towards getting these tools up and running so well.
So what I am looking for is a process for working around these little bugs. Something that would allow me to code the equation in another way so MS Word couldn't misinterpret the symbol I am looking for. Perhaps something using the specific character call as in [here]?3. I am not knowledgeable enough to know how specific characters get processed through a latex equation in Rmarkdown then through pandoc and finally interpreted by Word, but my clumsy attempts simply generated errors in pandoc or convinced one of the converters that this wasn't a Latex equation afterall.