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
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
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