开发者

No Line Spacing at Latex Code Listing

开发者 https://www.devze.com 2023-02-24 08:53 出处:网络
I use \'listings\' and \'setspace\' package for my latex document. And I have to use the \\doublespacing for my document. The trouble is that the code listings seem to be affected by the \\doublespaci

I use 'listings' and 'setspace' package for my latex document. And I have to use the \doublespacing for my document. The trouble is that the code listings seem to be affected by the \doublespacing command. I want all of my code listings have n开发者_高级运维o line spacing while the rest have double line spacing.

How can I achieve that?

Thanks,


You can change the spacing inside the document on the fly. See http://notfaq.wordpress.com/2006/07/26/double-spacing-in-latex/

If you want this to be automated, you can create your own macro/command/environment that does \singlespacing [... listing ...] \doublespacing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号