| www.delorie.com/gnu/docs/a2ps/a2ps_58.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The style sheets are defined in various files. See see section 7. Pretty Printing for the structure of these files. As for most other features, there is main file, a road map, which defines in which condition a style sheet should be used (see section 5.2 Map Files). This file is `sheets.map'.
Its format is simple:
style-key: patterns |
or
include(file) |
The patterns need not be on separate lines. There are two kinds of patterns:
file(1) matches pattern, then
select style style-key.
Currently flags can only be `i', standing for an insentive match. Please note that the matching is not truly case insensitive: rather, a lower case version of the string is compared to the pattern as is, i.e., the pattern should itself be lower case.
The special style-key `binary' tells a2ps to consider that the file should not be printed, and will be ignored, unless option `--print-anyway' is given.
If a style name can't be found, the plain style is used.
The map file is read bottom up, so that the "last" match is honored.
Two things are to retain from this:
stdin, then a2ps will run
file(1). However, unless you specify a fake file name with
`--stdin', pattern matching upon the name is turn off. In general
you can expect correct delegations, but almost never pretty printing.
file is wrong on some files, a2ps may use bad style sheets.
In this case, do try option `--guess', compare it with the output
of file, and if the culprit is file, go and complain to
your system administrator :-), or fix it by defining your own filename
pattern matching rules.
Consider the case of Texinfo files as an example (the language in which
this documentation is written). Files are usually named
`foo.texi', `bar.txi', or even `baz.texinfo'.
file(1) is able to recognize Texinfo files:
doc % file a2ps.texi a2ps.texi: Texinfo source text |
Therefore the sheets.map would look like:
# Texinfo files
texinfo: /*.txi/ /*.texi/ /*.texinfo/
<Texinfo source*>
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |