Displaying 1 result from an estimated 1 matches for "stuff_first".
2010 Nov 16
1
Sweave: \Sexpr and variables with special chars
I am using \Sexpr to include a variable in a title of a Sweave document:
\documentclass[a4paper]{article}
<<echo=false, results=hide>>=
#mytitlevar <- "Stuff" # case 1, everything is find
mytitlevar <- "Stuff_first" # case 2, f is turned into sub-text
@
\title{MyTitle: \\ \Sexpr{mytitlevar} }
\begin{document}
\maketitle
\end{document}
When doing this, the variable seems to be subject to interpretation by
LaTeX. The variable in case #2 causes the 'f' of 'Stuff_first' to be
printed as sub-...