Text FormattingConsecutive numbers in a verbatim environment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
hresquivelo
Posts: 4
Joined: Wed May 20, 2009 8:47 pm

Consecutive numbers in a verbatim environment

Post by hresquivelo »

Hi. How can I generate consecutive numbers at each line in a verbatim environment? For example like those generated in this document (page 5):
http://www.tug.org/texlive/Contents/liv ... rbatim.pdf

Many thanks in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Consecutive numbers in a verbatim environment

Post by localghost »

Use the listings package. For customization refer to its manual. Note that package manuals are mostly generated with the ltxdoc class.


Best regards and welcome to the board
Thorsten
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Consecutive numbers in a verbatim environment

Post by Juanjo »

Use the fancyvrb package.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
hresquivelo
Posts: 4
Joined: Wed May 20, 2009 8:47 pm

Re: Consecutive numbers in a verbatim environment

Post by hresquivelo »

Thank you. I will use the fancyvrb package!
Post Reply