groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Newbie help for documenting code snippets


From: Clarke Echols
Subject: Re: [Groff] Newbie help for documenting code snippets
Date: Wed, 12 Jan 2005 01:28:47 -0700

I'm not sure if this is what you are looking for, but try the
nl(1) command to number lines.  After the numbering is added,
you can place comment text between the numbered lines.  However,
the line numbering must be removed in order for C compilers
to read the code as intended. [Caveat: I am not an expert in
C programming in any sense of the word.]

Clarke

mahesh wrote:
> 
> Hi all,
> 
> I would like to generate documentation for some C code, along the
> lines of Richard Steven's books.
> 
> He usually has a numbered block of code demarcated by two lines.
> Following this is a para with the relevent line numbers set off in the
> left margin.
> 
> I have not been able to create this "effect".
> 
> Could someone please guide me.
> Specific help would be very helpful, considering my limited
> backgrounding in groff.
> 
> PS: I am reading the UTP document; but it is very slow progress.
> 
> - mahesh
> 
> [Image]
> 
>     ---------------------------------------------------------------
> _______________________________________________
> Groff mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/groff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]