Sweave syntax highlighting in output

前端 未结 4 1311
鱼传尺愫
鱼传尺愫 2021-01-01 04:20

Has anyone managed to get color syntax-highlighting working in the output of Sweave documents? I\'ve been able to customize the output style by adding boxe

4条回答
  •  星月不相逢
    2021-01-01 04:47

    I have a solution that has worked for me, I have not tried it on any other systems though so things may not work out of the box for you. I've posted some code at https://gist.github.com/797478 that is a set of modified Rweave driver functions that make use of minted blocks instead of verbatim blocks.

    To use this driver just specify it when calling the Sweave function with the driver=RweaveLatexMinted() option.

提交回复
热议问题