[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] which request tells postprocessor about papersize
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] which request tells postprocessor about papersize |
Date: |
Thu, 30 Sep 2004 23:30:19 +0200 |
User-agent: |
Mutt/1.4i |
> > Now there are times when I want to put the papersize inside of my
> > groff file and thus will have to tell the postprocessor about what
> > I did. Could anyone tell me how to do that.
>
> You can't -- in TeX you can't do that either. In the not too distant
> future I'll implement some paper size control with environment
> variables and the locale.
Everything is possible :-)
1. If the papersize is fixed (i.e., already contained as
a constant string in the groff file), you can grep (or
sed or awk) it out beforehand and pass it as an argument
to groff.
2. If the papersize is only determined at runtime (when
the formatter runs) you need to delay the startup of
the postprocessor until the papersize is known.
Have troff write the papersize into some auxiliary
file (e.g., "tmp.papersize"), and do something like
groff [options] -Z groff_file >tmp.intermediate
grops -p`cat tmp.papersize` <tmp.intermediate >output.ps
rm tmp.papersize tmp.intermediate