r - knitr with latex: how to avoid that dollar symbol $ in comments is substituted with pound symbol £ -


i have following piece of code in file example.rtex:

\documentclass{article} \begin{document} <<test, eval=true, echo=true>>= # $ <- should dollar <- list(b=5,c=10) print(a) print(a$c) @ \end{document} 

compiling with

echo "library(knitr); knit('example.rtex')" | r 

i obtain file example.tex, still has dollar symbols in r code. next, run pdflatex on example.tex. in pdf file dollar symbol in comment of r code changed pound symbol £. how can avoid change?? why happen?


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -