[texhax] Question about numbering piece of code

Fehd, Ronald J. (CDC/CCHIS/NCPHI) rjf2 at cdc.gov
Wed Jan 24 23:19:14 CET 2007

> Date: Thu, 11 Jan 2007 11:19:15 -0400
> From: "Dayang Wang" <061315w at acadiau.ca>
> Subject: [texhax] Question about numbering piece of code
> I want to insert a hundred lines of code to my Latex file, 
> and add number list before each line of code as

> 001  *****************
> 002  *******************
> 003  ************

I regularly use the fancy-verb package
-- which is part of the TeXLive installation -- 
to include program code in my .pdf

      ,numbers=left}%set FancyVerb defaults

\VerbatimInput[label=program part 1

\VerbatimInput[label=program part 2

to get even fancier I put the above in a minipage:


\begin{minipage}[t]{\EchoTextWidth}%line numbers are inside margin
\VerbatimInput[label=program part 3

The TeX Catalogue OnLine, Entry for fancyvrb, 

Ron Fehd  the {SAS} macro maven  CDC Atlanta GA USA RJF2 at cdc dot gov

More information about the texhax mailing list