Code with different colors

21 views
Skip to first unread message

DrunkenPhD

unread,
Jan 14, 2015, 11:34:22 AM1/14/15
to kn...@googlegroups.com
Hi

I am preparing some lecture notes using R Markdown

I want to know if is it possible to make different lines of code with different colors inside chunk

I have several lines of code that are repeated in every slide and I would like to separate them by color from new code

Thx

Keith Hughitt

unread,
Feb 10, 2015, 7:45:08 AM2/10/15
to kn...@googlegroups.com
Hi,

I don't believe there is anyway to achieve that in knitr/markdown directly.

Probably the most straight-forward way would be to post-process the output and wrap each section you want to highlight in a <div> block and assign it a CSS class with the settings you would like to use.

Best,
Keith
Reply all
Reply to author
Forward
0 new messages