0

I'm on Ubuntu 14.04, running RStudio Version 0.99.473. I have LaTeX installed (TeXworks) and knitting Rmarkdown documents works just fine. However, adding mathematical symbols such as $\mu$ causes it to fail, with the error:

! Undefined control sequence.
l.128 N(\(\mu, \simga

pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
Execution halted

(in my .Rmd file, I have $\mu, \sigma^2$ - it works if I remove the $'s and the slashes)

In my experience, the LaTeX package amssymb has a lot of math symbols. tlmgr install amssymb doesn't work, so I'm lost.

tlmgr install amssymb
(running on Debian, switching to user mode!)
tlmgr: The TeX Live versions supported by the repository
http://tlcontrib.metatex.org/2012 
     (2011--2012)
do not include the version of the local installation 
     (2013).

(I don't actually know what that error means. Can it find some files but not the right ones? Do I need a different repository? How do I find different repositories?)

How do I get $\mu$ to show up? I'm going to need to have more complicated equations, so it would be really nice to get basic math working.

I should also mention that I have no idea where/how RStudio looks for LaTeX packages. I'm a Linux noob, but it's my only OS right now. Sorry if this isn't relevant to this forum, but this seemed like the right place to post it.

  • The macro \simga is undefined. Try with \sigma... – Paul Gaborit Mar 19 '16 at 8:49
1

You won't be able to get anywhere without the amssymb and amsmath packages. It looks as if you're running TeX Live 2013; updating to 2015 will make you much happier.

Knitr uses Pandoc to convert Markdown to LaTeX. Creating a file containing $\mu, \sigma^2$ works fine with Pandoc 1.15.1.1 and TeX Live 2015.

  • I actually have no idea how to do that. What do you mean "create a file"? What extension? Where do I put it? What actually goes in the file? How do I update TeX Live? (I tried tlmgr update -self' and sudo apt-get update texworks`, but neither did anything. I also tried reinstalling both TeXLive and TeXWorks from Ubuntu Software Center.) I'm really not that knowledgeable here, I just want some basic math symbols :( – D7Becker Oct 21 '15 at 2:01
  • The TeX Live manager can only update within a single year; you need to download the complete 2015 distribution as appropriate for your system. – Andrew Dunning Oct 21 '15 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.