Re: [R] robust definition of \code{} for a knitr-produced document

2014-01-04 Thread Yihui Xie
Perhaps \code{} was redefined somewhere in your book project (the document class, certain packages, ...). Can you try to minimize your project and track down the problem? e.g. remove the body, keep the preamble, and use only one instance of \code{something} in the body. It is difficult to see what

[R] robust definition of \code{} for a knitr-produced document

2014-01-03 Thread Michael Friendly
[Not sure if I should post this here, or on a another list, but will try here first...] For a book I'm writing using knitr .Rnw files, I would like to use \code{} to mark *all* R code, without having to escape special characters that appear in R names, formulas, etc. In the past, I've use the