yihui/knitr — pull request #622 by knokknok (2013-10-19 11:52:42+00:00)
Title: new 'asis' engine that will output the code without trying to process it

I did not figure how to do something like the following without a new engine. I wanted to be able to conditionally (based on some R variables) output some LaTeX code without using `cat` and having to protect characters in large amounts of text.
But may be I missed something...

```latex

\documentclass[a4paper, 11pt]{article}
\begin{document}

<>=
res <- runif(1)
res
@

<>=
\begin{itemize}
\item I did \emph{this} because $res<0.5$.
\item I might do \emph{that} another time.
\end{itemize}
@

<=0.5, engine='asis'>>=
I did \emph{that} because $res>=0.5$ but I might do \emph{this} another time.
@

\end{document}
```