Displaying 1 result from an estimated 1 matches for "mytitlevar".
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 v...