www.delorie.com/gnu/docs/a2ps/a2ps_47.html   search  
 
Buy GNU books!


General Purpose PostScript Generating Utility

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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(3) thanks to command. Both in and out are a2ps type keys such as defined in `sheets.map' (see section 7.7.3 The Entry in `sheets.map').

command should produce the file on its standard output. Of course escapes substitution is performed on command (see section 3.2 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


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003