When using knitr with a class like apa6e , the pieces of code by default have a double space similar to the rest of the document. This is undesirable.
This can be changed by transfer using:
\begin{singlespace} <<*>>= CODE @ \end{singlespace}
How can this be done globally, rather than wrapping tags with a tex tag?
File MWE.Rnw
\documentclass[leavefloats]{apa6e} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[style=apa,backend=biber,bibencoding=latin1]{biblatex} \DeclareLanguageMapping{american}{american-apa} \begin{document} <<setup, include=FALSE, cache=FALSE>>=
r knitr rnw
Tyler rinker
source share