2

I have a problem with my text editor Aquamacs Emacs (GNU Emacs 23.4.1) when use it with \Sexpr to print inline the output from R functions. The problem results when the R command includes special characters such as $ and %. Even though Latex parses correctly the string, the text editor doesn't escape the special characters. There are then two consequences: the colour of the text changes starting with \Sexpr and (most annoyingly) the 'while typing' spelling check is not performed on the remaining of the text. A solution is to wrap \Sexpr with \verb+ + but then my output results typeset in a different style/font.

3

I found a temporary fix: I will wrap \Sexpr like this: \verb+\Sexpr{...}+. Look here on how to avoid having different typsets.

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.