a2ps.cfg options
"Carl Lowenstein" <[email protected]> Wed, 17 Oct 2007 20:47:25 -0700
| Newsgroups | gmane.comp.printing.a2ps.bugs |
|---|---|
| Message-ID | <[email protected]> |
GNU a2ps, version 4.13
I have been trying for some time today to make my local ~/.a2ps/a2psrc
produce printed output with the header date stamp looking like
"2007-10-17 20:21" for the file date, and the footer date stamp
looking like "2007-10-17 Wednesday" for the local date. According to
section 3.2.3 of the manual, I need to use the escapes %D{} and $D{}
to format with strftime(3).
I found after some experimentation that blank spaces in the argument
list enclosed in {} brackets must be escaped. Thus the resulting
a2psrc file looks like this (original lines copied from /etc/a2ps.cfg
and commented out). Note the "\ " in the last line.
- - - - - - - -
# Left part of the title is the mod. date of the file
# or empty is there is a tag2
#Options: --left-title='#?2||$e $T|'
Options: --left-title='#?2||$D{%F} $T|'
# If in landscape, print date on the left hand side
# If portrait, then print date on recto, and sheet # on verso
#Options: --left-footer=#?l!%E!#?v|%E|%s./%s#|!
Options: --left-footer=#?l!%D{%F\ %A}!#?v|%D{%F\ %A}|%s./%s#|!
- - - - - - - -
The necessity for escaping the space should be mentioned somewhere in
the documentation. Without the escape, the rather misleading error
message is:
" a2ps.bin: left footer: missing `!' for #?l escape "
carl
--
carl lowenstein marine physical lab u.c. san diego
[email protected]