Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to use question marks in a code block using knitr, but in the compiled pdf always puts quotes around it, so, for example

<<helpCode, eval=FALSE>>= 
?rnorm 
@

comes out as

'?'rnorm

Is there a way to keep this from happening?

share|improve this question
Can't reproduce this; in RStudio with a default 'new sweave document' with your chunk added I end up with > ?rnorm as ouput... – Thell Sep 4 '12 at 16:25
@Thell you are probably using Sweave, and the OP is using knitr. BTW, I think this question is better to be posted on SO instead. – Yihui Sep 4 '12 at 17:35

closed as off topic by percusse, Tom Bombadil, lockstep, cgnieder, Claudio Fiandrino Sep 6 '12 at 12:39

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

up vote 1 down vote accepted

Use the chunk option tidy=FALSE.

share|improve this answer

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