I'm generating html- and pdf-notebooks from R
-scripts using rmarkdown
's function render()
and knitr
's function spin()
. Sometimes I use nested lists and mix them with code blocks. Here is an example using rmarkdown
and knitr
chunk options.
#' (1) This is normal text.
#' (a) This is normal text but indented.
#+ echo = TRUE, eval = TRUE
print("This is code")
#' (b) This is supposed to be normal text with the same
#' indentation as (a). However, it will be formatted as code.
#' By this I mean that e.g. in a pdf-notebook it will be
#' correctly indented but the font will be the same font as
#' the code.
However, everything that follows the code after list item (a) will be marked up as code as well (e.g. (b)). But what I want to achieve is to have (b) marked up as normal text and use the same indentation as (a). Is it possible to do this?