Saturday, 31 August 2013

knitr 1.4.1 ending comment in chunk do not display correctly

knitr 1.4.1 ending comment in chunk do not display correctly

I am using knitr 1.4.1 and have observed that when the last line of a
chunk (.Rnw file) is a comment, this comment does not display as the
previous comments.
Her is a minimal example:
\documentclass[a4paper]{article}
\begin{document}
<<chunk, echo=TRUE>>=
## comment before output
x <- sum(1:10) ## sum number from 1 to 10
x
(x <- sum(1:10)) ## sum number from 1 to 10
## comment after output
x
## final comment
@
\end{document}
With knitr 1.4.1 all comments but the last one are displayed in italic.
Any hint on how I could make the last comment look as the other ones would
be welcome.

No comments:

Post a Comment