Take the 2-minute tour ×
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

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 by the community. 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 reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the 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

1 Answer 1

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.