(a2ps.info)Defining a Delegation
4.10.1 Defining a Delegation
----------------------------
-- Configuration Setting: Delegation: NAME IN:OUT COMMAND
Define the delegation NAME. It is to be applied upon files of type
IN when output type is OUT(1) thanks to COMMAND. Both IN and OUT
are a2ps type keys such as defined in 'sheets.map' (*note The Entry
in sheets.map::).
COMMAND should produce the file on its standard output. Of course
escapes substitution is performed on COMMAND (Note: Escapes). In
particular, COMMAND should use the input file '$f'.
# In general, people don't want to pretty-print PostScript files.
# Pass the PostScript files to psnup
Delegation: PsNup ps:ps \
psselect #?V||-q| -p#?p|#p|-| $f | \
psnup -#v -q #?j|-d|| #?r||-c| -w#w -h#h
Advantage should be taken from the variables, to encapsulate the
peculiarities of the various programs.
# Passes the options to psnup.
# The files (in and out) are to be given
Variable: psnup psnup -#v #?V||-q| #?j|-d|| #?r||-c| -w#w -h#h
# Passes to psselect for PS page selection
Variable: psselect psselect #?V||-q| -p#?p|#p|-|
# In general, people don't want to pretty-print PostScript files.
# Pass the PostScript files to psnup
Delegation: PsNup ps:ps #{psselect} $f | #{psnup}
Temporary file names ('#f0' to '#f9') are available for complex
commands.
# Pass DVI files to dvips.
# A problem with dvips is that even on failure it dumps its prologue,
# hence it looks like a success (output is produced).
# To avoid that, we use an auxiliary file and a conditional call to
# psnup instead of piping.
Delegation: dvips dvi:ps #{dvips} $f -o #f0 && #{psnup} #f0
---------- Footnotes ----------
(1) Current 'a2ps' only handles PostScript output, i.e. OUT='ps'
automatically generated by info2www version 1.2.2.9