| Michal Szymanski on Tue, 9 Apr 2002 11:30:59 +0200 (CEST)(envelope-from owner-apsfilter-help@apsfilter.org) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: passing options to subfilters? |
On Tue, Apr 09, 2002 at 11:05:22AM +0200, Michael Loßin wrote: > Michal Szymanski wrote: > > Would be nice. The topic I am thinking about, is "pretty printing". With > > the default setup (of apsfilter and probably also of a2ps) I get some > > files (e.g. C programs starting with #include) printed > > syntax-highlighted, in color on a deskjet printer. This is not always > > desirable. It would be nice to have an option to control pretty > > printing: nopp, pp, color-pp. > > This should be possible, provided that those text-to-PS > filters have options to explicitly switch on/off > pretty-printing (to allow overriding any option already > included in A2PS_BASIC etc.). At least for a2ps, giving "--highlight-level=none" option *after* the default "-g" (which stands for --highlight-level=heavy), switches the pretty printing off. I've also checked the A2PS part of apsfilter to find that passing "mono" option to apsfilter, changes also the highlighting mode of a2ps (--prologue=bw), so we'd need only a boolean flag: pp/nopp > > > A2PS_OPTS does actually overwrite the complete command line > > > and will be used if it is set (with only "-q -o -" added, > > > so the output will be properly sent to stdout). > > > > > > A2PS_BASIC is used to supply a basic set of options that are > > > extended with (the file specific set of) paper size, color, > > > file type, ... parameters. > > > > Thanks for explanation. One more question: what are the default options > > passed? At first, I thought that the commented options give defaults but > > surely they do not (e.g. text is printed w/o borders!) > > Hm?! > > (from template apsfilterrc:) > > # override a2ps default options > # defaults: > ^^^^^^^^ ;-) > # A2PS_BASIC="--delegate=no -X iso1 -g" > # A2PS_PAPERSIZE="$PAPERSIZE" (case-corrected) > ^^^^ > these are the defaults > > #A2PS_BASIC='-X iso1' > #don't format troff documents, by Joerg Wunsch <joerg@apsfilter.org> > #A2PS_BASIC='-Eplain' > #A2PS_PAPERSIZE=Letter > #A2PS_PAPERSIZE=A4stylus > ^^^^ > these are examples Sorry, I have not noticed the "defaults:" line, probably because there is no blank space between the A2PS_BASIC default and following two A2PS_BASIC examples, nor - at least - "examples:" line :)) Michal. -- Michal Szymanski (msz@astrouw.edu.pl) Warsaw University Observatory, Warszawa, POLAND