原文地址:http://bbs.chinatex.org/forum.php?mod=viewthread&tid=7282&extra=page%3D1

latex-listings-1
如第一幅图所示,高亮的结果是有问题的,也不太好看,实际,我们需要用texcsstyle
来设置即可,有关该指令的作用参考listings
宏包的手册或http://www.chinatex.org/archives/620,这里的cs即控制序列。
|
|
正确的演示效果如下图所示:

latex-listings-2