I have some code I write inside the verbatim environment. Sometimes, the lines are too long and the generated pdf looks ugly - the text row passes over the right margin. What can I do to automatically break these long lines? Is there anything better than the verbatim env?
Thanks, Lucian
Of course, you have the wonderful "listings" package for that. It supports (if you want) even pretty printing of a lot of source code languages, as well as a "smart breaking" of long lines depending on the language being displayed.
Can you just use a fixed-width font, e.g. \texttt{}
? If you require something more sophisticated, try the moreverb, listings, or algorithmicx packages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With