Inline code snippet (knitr)

11 views
Skip to first unread message

Philippe Massicotte

unread,
Apr 9, 2015, 2:28:19 AM4/9/15
to kn...@googlegroups.com
Dear knitr users.

I was wondering if it was possible to insert a code snippet inline in the text for teaching purpose. For example, I would like to have:


"You can use plot(x,y) to create scatter plots in R."

For the moment, I use:

"You can use \texttt{plot(x,y)} to create scatter plots in R."

So, my question is:, is it possible to insert code chunk that will have the same formatting (colors, fonts, etc.) as a "normal" chunk, but inline.

I hope my question is clear enough.

Phil
Reply all
Reply to author
Forward
0 new messages