回复 第21楼 的 谢益辉:我用过一小会Lyx,但最终还是回来了。因此处理的都是tex文档,listing输出确实没有highlight美观,不过还能将就着看:
[quote]\lstset{
numbers=left, numberstyle=\tiny,
language=R, escapeinside=
,
basicstyle=\ttfamily\small,
keywordstyle=\color{blue}\bfseries,
commentstyle=\color{gray},
stringstyle=\color{olive}\ttfamily,,
frame=shadowbox, breaklines,
showstringspaces=false,
rulesepcolor=\color{red!20!green!20!blue!20}
}
[/quote]
需要xcolor宏包。