[Top][All Lists]

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

Re: [Groff] Suppress output (+ -me questions)

From: Sigfrid Lundberg, NetLab
Subject: Re: [Groff] Suppress output (+ -me questions)
Date: Fri, 15 Feb 2002 10:12:15 +0100 (CET)

On Thu, 14 Feb 2002 address@hidden wrote:

> Hi Christian,
> > 1) Is it possible to turn on (and off) printing of output from within
> > a document?
> Not that I can readily think of.

What about the .ig request


text to be ignored


> > For example I would like to be able to print only an index (table of
> > contents) for later inclusion (automatically) into the main document.

I would use .am (append macro) to add an indexing facility to those macros
that are involved in your chapter and section headings. That facility
could be used to output page number and whatever you want to have in your
TOC. A simple Perl/whatever-script could help to get the TOC your way.

Then put a '.so' wherever you want it to appear.

Run groff on this a couple of runs, and the page numbering will then be

You have almost certainly other related issues. I.e., you may want your
refence list _before_ your appendices, but you may want the references
ocurring in the them in the reference list. I have found the
macro-processor m4 an ideal tool for such overall restructuring of a
longer documents.

Using m4 diversion you may have a document (doc.m4) which may be
structured like this:


It should be processed as follows

        soelim doc.m4 | refer | m4 | groff

Then m4 will undivert things in the correct order. But beware, m4 contains
builtin macros that are plain English. You have to rename them. Likewise,
you have to be careful with quotes and the like...


reply via email to

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