Created
May 21, 2012 03:03
-
-
Save yihui/2760395 to your computer and use it in GitHub Desktop.
customize the knitrout environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
% change the space between paragraphs in chunks | |
\parindent = 0.0in | |
\parskip = 0.125in | |
\ifdefined\knitrout | |
\renewenvironment{knitrout}{ | |
\setlength{\parskip}{0in} | |
}{ | |
\setlength{\parskip}{0.125in} | |
} | |
\else | |
\fi | |
\begin{document} | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
<<test>>= | |
1+1 | |
rnorm(30) | |
@ | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
% decrease the space before and after the chunk output environment | |
% (use negative vertical space) | |
\ifdefined\knitrout | |
\renewenvironment{knitrout}{ | |
\vspace{-1em} | |
}{ | |
\vspace{-1em} | |
} | |
\else | |
\fi | |
\begin{document} | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
<<test>>= | |
1+1 | |
rnorm(30) | |
@ | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
The quick brown fox jumps over the lazy dog the quick brown fox jumps over the | |
lazy dog the quick brown fox jumps over the lazy dog. | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment