有没有办法在 Sweave 中为注释/代码着色?
我发现我可以通过在 \SweaveOpts 中指定 keep.source 在 Sweave 代码块中保留注释,但是有没有办法让代码列表看起来像灰色注释一样漂亮?
I found that I can keep comments in the Sweave code chunks by specifying keep.source in the \SweaveOpts, but is there a way to make the code listing look nice like with grayed out comments?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
范德比尔特大学生物统计系 sweave 模板网站上展示了多个选项:http://biostat。 mc.vanderbilt.edu/wiki/Main/SweaveTemplate
我发现 Swavevel 风格是最灵活的。
突出显示包是另一种选择。
There are several options illustrated at Vanderbilt University's Department of Biostatistics sweave templates site: http://biostat.mc.vanderbilt.edu/wiki/Main/SweaveTemplate
I found the Sweavel style to be the most flexible.
The highlight package is another option.
pgfSweave 包可以生成语法高亮的代码。
the
pgfSweave
package can produce syntax-highlighted code.