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.

1 Answer 1


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .