This document describes @pack version 4.10.2. The latest versions may be found on the @href{http://www.inf.enst.fr/~demaille/a2ps/,a2ps home page}.
We tried to make this document informative and pleasant. It tries to be more than a plain reference guide, and intends to offer information about the concepts or tools etc. that are related to printing PostScript. This is why it is now that big: to offer you all the information you might want, not because @pack is difficult to use.
Please, send us emailcards :)
. Whatever the comment is, or if you
just like @pack{}, write to @email{Miguel.Santana@st.com, Miguel
Santana} and Akim Demaille.
@pack formats files for printing on a PostScript printer.
The format used is nice and compact: normally two pages on each physical page, borders surrounding pages, headers with useful information (page number, printing date, file name or supplied header), line numbering, pretty-printing, symbol substitution etc. This is very useful for making archive listings of programs.
Compared to the previous versions, @pack version 4.10.2 provides:
Ogonkify
(see section `Overview' in Ogonkify manual),
written by Juliusz Chroboczek.
@pack is alive. To let you know its status, the version numbers are structured à la Linux.
What is to be understood in `a2ps version x.y.zt'?
We try hard to make @pack portable on any Unix platform, and bug free. But sometimes there can still be bad surprises, even after having compiled and checked @pack on several very different platforms.
You may encounter some of these problems yourself. In any case, please never abandon without giving us a chance. We need information from everybody so that mistakes get fixed as fast as possible.
So, if you have a problem (configuration error, compilation error, runtime error, documentation error or unclear), first check on @href{http://www.inf.enst.fr/~demaille/a2ps/,a2ps home page} and in the FAQ (see section Frequently asked questions) if the issue has not been addressed yet. If it is not the case, but it appears that the version of @pack you have is old, consider upgrading.
If the problem persists, send us a mail (a2ps-bugs@inf.enst.fr)
which subject is `a2ps version: short-description'
and which content mentions the name of your machine and OS, the version of
@pack{}, every detail you have on your compiler, and as much traces as
possible (the error messages you get on the screen, or the output of
make
when it fails etc.).
Be sure to get a quick answer.
There is a mailing list in which are discussed various topics around @pack{}. There are also announcements about the version in alpha testing, requests for comments, new sheets, etc.
To subscribe to the list, send a mail to a2ps-request@inf.enst.fr, with `subscribe' in the body.
Please, note that the mailing list is by no means a bug reporting address: use a2ps-bugs@inf.enst.fr instead.
If you like @pack and if you feel like helping, there are several things you can do.
GNU gettext
which means that all
the messages can be translated, without having to look at the code of
@pack{}: you don't need to be a programmer at all. All the details are
available on @href{http://www.inf.enst.fr/~demaille/a2ps/po/, the a2ps
translation page}.
This chapter is devoted to people who don't know @pack yet: we try to give a soft and smooth introduction to the most useful features. For a reference manual, see section Invoking @pack. For the definition of some words, see section Glossary, for questions you have, see section Frequently asked questions.
@pack is a program that takes a text file (i.e., human readable), and makes a PostScript file out of it. Typically output is sent to a printer.
To print a file `doc.txt', just give it to @pack{}: the default setting should be the one you'd like:
gargantua ~ $ a2ps doc.txt [doc.txt (plain): 9 pages on 5 sheets] [Total: 9 pages on 5 sheets] sent to the default printer
@pack sent the file `doc.txt' to the default printer, writing two columns of text on a single face of the sheet. Indeed, by default @pack uses the option `-2', standing for two virtual pages.
Say you want to print the C file `bar.c', and its header `foo.h', on 4 virtual pages, and save it into the file `foobar.ps'. Just hit:
gargantua $ a2ps foo.h bar.c -4 -o foobar.ps [foo.h (C): 1 page on 1 sheet] [bar.c (C): 3 pages on 1 sheet] [Total: 4 pages on 2 sheets] saved into the file `foobar.ps'
The option `-4' tells @pack to make four virtual pages: two rows by two columns. The option `-o foobar.ps' (which is the short version of `--output=foobar.ps') specifies the output file. Long options must always be separated by spaces, though short options with no arguments may be grouped.
Note too that the options may be specified before or after the files, it does not matter.
If you send `foobar.ps' to a printer, you'll discover that the keywords were highlighted, that the strings and comments have a different face. Indeed, @pack is a pretty-printer: if it knows the (programming) language in which your file is written, it will try to make it look nice and clear on the paper.
But too bad: `foo.h' is only one virtual page long, and `bar.c' takes three. Moreover, the comments are essential in those files. And even worse: the system's default printer is out of ink. Thanks god, precious options may help you:
gargantua $ a2ps -A4 foo.h bar.c --prologue=gray -P lw [foo.h (C): 1 page on 1 sheet] [bar.c (C): 3 pages on 1 sheet] [Total: 4 pages on 1 sheet] sent to the printer `lw'
Here the option `-A' is used to Allow several files on the same sheet, `-P lw' means to print on the printer named `lw', and finally, the long option `--prologue' requires the use one of the alternative printing styles. There are other prologues (see option `--prologue' in section Input Options), and you can even design yours (see section Designing PostScript Prologues).
There are three special printers pre-defined.
The first one, void
, sends the output to the trash.
Its main use is to see how many pages would have been used.
gargantua ~ $ a2ps -P void parsessh.c [parsessh.c (C): 33 pages on 17 sheets] [Total: 33 pages on 17 sheets] sent to the printer `void'
The second, display
sends the output to ghostview
, so that
you can check the output without printing. Of course if you don't have
ghostview
, it won't work... And it is up to you to configure
another displaying application (see section Your Printers).
The last, file
saves the output into a file named after the
file you printed (e.g., saves into `foo.ps' when you print
`foo.c').
@pack can decide that @pack itself is not the right tool to do what you want. In that case it delegates the task to other programs. What you should retain from this, is, forget that there are delegations. Indeed, the interface with the delegations has been designed so that you don't need to be aware that they exist to use them. Do as usual.
As an example, if you need to print a PostScript file, just hit:
gargantua ~ $ a2ps article.ps -d [article.ps (ps, delegated to PsNup): 7 pages on 4 sheets] [Total: 8 pages on 4 sheets] sent to the default printer
While honoring your defaults settings, @pack delegates the task to put
two virtual pages per physical page to psnup
, a powerful filter
part of the famous psutils
by Angus Duggan.
Suppose now that you want to display a Texinfo file. Then, provided you have all the programs @pack needs, just hit
gargantua ~ $ a2ps a2ps.texi -P display [a2ps.texi (texinfo, delegated to texi2dvi): 75 pages on 38 sheets] [Total: 76 pages on 38 sheets] sent to the printer `display'
Once the read documentation, you know you want to print just pages 10 to 20, plus the cover. Just hit:
gargantua ~ $ a2ps a2ps.texi --pages=1,10-20 -d [a2ps.texi (texinfo, delegated to texi2dvi): 13 pages on 7 sheets] [Total: 14 pages on 7 sheets] sent to the default printer
A final word: compressed files can be treated in the very same way:
gargantua ~ $ a2ps a2ps.texi.gz -a1,10-20 -d [a2ps.texi (compressed, delegated to Gzip-a2ps): 13 pages on 7 sheets] [Total: 14 pages on 7 sheets] sent to the default printer
You should be aware that:
If @pack did not have the behavior expected, this may be because of the default settings given by your system administrator. Checking those default values is easy:
gargantua ~ $ a2ps --list=defaults Configuration status of a2ps 4.10.2 Sheets: default paper = A4 layout per page = 2 x 1 (landscape, rows first) borders = yes compact mode = yes inside margin = 0 More stuff deleted here Internals: verbosity level = 2 file command = /usr/ucb/file -L temporary directory = library path = /inf/soft/infthes/demaille/.a2ps /usr/local/share/a2ps/sheets /usr/local/share/a2ps/ps /usr/local/share/a2ps/encoding /usr/local/share/a2ps/afm /usr/local/share/a2ps/printers /usr/local/share/a2ps
Remember that the on-line help is always available. Moreover, if your
screen is small, you may pipe it into more
. Just trust
this:
a2ps --help | more
Many things are parameterizable in @pack{}, but two things are just essential to make sure everything goes right:
Both values may be checked with `a2ps --list=defaults'.
@pack provides some Native Language Support, that is speaking your mother tongue. It uses three special features for non-English languages:
To use these features, you may set your environment variable LANG
to the standard code representing your language:
ca
cs
de
es
fr
it
ko
nl
pl
pt
se
tr
The problem with this approach is that a lot more than just messages and
time information is affected: especially the way numbers are written
changes, what may cause problems with awk
and such.
So if you just want messages, time format and sorting order to be localized, then define:
set LC_MESSAGES=fr ; export LC_MESSAGES set LC_TIME=fr ; export LC_TIME set LC_COLLATE=fr ; export LC_COLLATE
Here are some tips on how to use @pack with other programs.
Once you are in elm, hit o to enter in the options edition menu, hit p to edit the printer command, and enter `a2ps -2gEmail --strip=3 %s -d'. The option `-g' is given because there are some special escapes that @pack understands, and replaces with the correct character.
Jan Chrillesen suggests us how to use @pack with the Pine mail-reader. Add the following to `.pinerc' (of course you can put it in `pine.conf' as well):
# Your printer selection printer=a2ps -2gEmail --strip=3 -d # Special print command if it isn't one of the standard printers personal-print-command=a2ps -2gEmail --strip=3 -d
This is actually valid for any program that generates PostScript that you want to post-process with @pack{}. Use the following command:
a2ps
Not too hard, isn't it?
Nevertheless, this setting suppose your world is OK, your file(1)
detects correctly PostScript files, and your @pack is configured to
delagate. In case one one these conditions is not met, use:
a2ps -ZEps
Do not forget to tell Netscape whether your printer supports colors, and the type of paper it uses.
Calling @pack is fairly simple:
a2ps Options... Files...
If no Files... are given, @pack prints its standard input. If `-' appears in the Files..., it designates the standard input too.
To read the options and arguments that you give, @pack uses GNU
getopt
, hence:
Here after a boolean is considered as true (i.e. setting the option on), if boolean is `yes', or `1'; as false if it equals `no' or `0'; and raise an error otherwise. The corresponding short option takes no arguments, but corresponds to a positive answer.
When an argument is presented between square brackets, it means that it is optional. Optional arguments to short option must never be separated from the option.
Task options specify the task @pack will perform. It will not print, it executes the task and exits successfully.
file
does: display the (key of the) type of the
Files.
For instance, on a C
file, you expect it to answer `c', and
upon a PostScript file, `ps'.
This can be very useful on broken systems to understand why a file is printed with a bad style sheet (see section Style Sheet Files).
There are also options meant for the maintainers only, presented for sake of completeness.
sheet
verbosity is set, report version numbers, requirements and
ancestors.
HTML
format.
These options are related to the interface between you and @pack{}.
There is also an interface made for the maintainer with finer grained selection of the verbosity level. level is a list of tokens (non ambiguous abbreviation are valid) separated by either `,' or `+'. The tokens may be:
PPD
processing,
Note that contrary to the other options, this special construct cannot be after the files to print. This is actually a bug. If somebody sees how to fix this, please send us a patch.
This options specify the general layout, how the sheet should be used.
This options are related to the content of the virtual pages.
To change the fonts used, change the current prologue (see section Designing PostScript Prologues.
If your file is actually a UNIX manual input, i.e., a roff file, then depending whether you left @pack delegate or not, you will get a readable version of the text described, or a pretty-printed version of the describing file (see section Your Delegations).
--interpret=no
is given.
These are the options through which you may define the information you want to see all around the pages.
All these options support text as an argument, which is composed of plain strings and escapes. See section Escapes for details.
The pages referred to are the input pages, not the output pages, that is, in `-2', printing with `-a1' will print the first virtual page, i.e., you will get half the page filled.
Note that page selection does work with the delegations (see section Your Delegations).
n
unix
r
mac
nr
pc
rn
any
auto
This is used for instance in the name given to the document from within the PostScript code (so that GhostView and others can display a file with its real title, instead of just the PostScript file name).
It is not the name of the output. It is just a logical title.
file(1)
what it thinks of the type of the file. If file(1)
answers `data', the file will also be considered as binary, hence
not printed.
Typically most people don't want to pretty-print a PostScript source file, but want to print what describes that file. Then set the delegations on.
See section Your Delegations for information on delegating, and option `--list=delegations' for the applications your @pack knows.
Note that it is mostly useful to define a variable (see section Your Escapes), for instance, in your `a2psrc' file:
Variable: toc.mine \ \\Keyword{Table of Content}\n\ #-1!f\ |$2# \\keyword{$-.20n} sheets $3s< to $3s> ($2s#) \ pages $3p<-$3p> $4l# lines\n||\ \\Keyword{End of toc}\n
and to give that variable name as argument to `--toc': `a2ps *.c --toc=#{toc.mine}'.
Note too that you can generate only the table of content using `--pages':
a2ps *.c --toc=#{toc.mine} -atoc
These options are related to the pretty printing features of @pack{}.
See the documentation of the style sheets (`--list=style-sheets') for a description of `heavy' highlighting.
If language is `key.ssh', then don't look in the library path, but use the file `key.ssh'. This is to ease debugging non installed style sheets.
This option is valuable for instance in java
in which case strong
comments are the so called documentation comments, or in SDL
for
which some graphical editors pollutes the specification with internal
data as comments.
Note that the current implementation is not satisfactory: some undesired blank lines remain. This is planed to be fixed.
These are the options to specify what you want to do out of what @pack produces. Only a single destination is possible at a time, i.e., if ever there are several options `-o', `-P' or `-d', the last one is honored.
The type of backups made can be set with the VERSION_CONTROL
environment variable, which can be overridden by this option. If
VERSION_CONTROL
is not set and this option is not given, the
default backup type is `existing'. The value of the
VERSION_CONTROL
environment variable and the argument to this
option are like the GNU Emacs
`version-control' variable;
they also recognize synonyms that are more descriptive. The valid
values are (unique abbreviations are accepted):
SIMPLE_BACKUP_SUFFIX
environment variable, which can be
overridden by this option. If neither of those is given, the default is
`~', as it is in Emacs
.
The following options are related only to variations you want to produce onto a PostScript output.
PPD
selection, otherwise set
the PPD
to key.
FIXME: what to read.
For example, command
a2ps -DDuplex:true -DManualFeed:true report.pre
prints file `report.pre' in duplex (two sides) mode manually fed.
Page device operators are implementation dependent but they are standardized. See section Page Device Options for details.
statusdict
operators and variables are implementation dependent;
see the documentation of your printer for details. See section Statusdict Options for details. Several `-S' options can be accumulated.
If no value is given, key is removed from the definitions.
With a single colon, pass a call to an operator, for instance:
a2ps -Ssetpapertray:1 quicksort.c
prints file `quicksort.c' by using paper from the paper tray 1 (assuming that printer supports paper tray selection).
With two colons, define variable key to equal value. For instance:
a2ps -Spapertray::1 quicksort.c
produces
/papertray 1 def
in the PostScript.
@pack quotes the access to that feature, so that non supporting printers won't fail.
The escapes are some sequences of characters that will be replaced by their values. They are very much like variables.
They are used in several places in @pack{}:
All format directives can also be given in format
escape width directive
where
Supported escapes are:
strftime(3)
function.
strftime(3)
function.
form feed
).
new line
).
mail-folder
style, tag 1 is the title of the mail, and tag 2 its author.
The following exit values are returned:
To be general and to allow as much customization as possible, @pack avoids to hard code its knowledge (encodings, PostScript routines, etc.), and tries to split it in various files. Hence it needs a path, i.e., a list of directories, in which it may find the files it needs.
The exact value of this library path is available by `a2ps --list=defaults'. Typically its value is:
gargantua ~ $ a2ps --list=defaults Configuration status of a2ps 4.10.2 More stuff deleted here Internals: verbosity level = 2 file command = /usr/ucb/file -L temporary directory = library path = /inf/soft/infthes/demaille/.a2ps /usr/local/share/a2ps/sheets /usr/local/share/a2ps/ps /usr/local/share/a2ps/encoding /usr/local/share/a2ps/afm /usr/local/share/a2ps/printers /usr/local/share/a2ps
You may change this default path through the configuration files
(see section Your Library Path), and with the environment variable
A2PS_LIBRARY
.
If you plan to define yourself some files for @pack{}, they should be in one of those directories.
@pack reads several files before the command line options. In the order, they are:
In these files, empty lines and lines starting with `#' are comments.
The other lines have all the following form:
Topic: Arguments
where Topic: is a keyword related to what you are customizing, and Arguments the customization. Arguments may be spread on several lines, provided that the last character of a line to continue is a `\'.
In the following sections, each Topic: is detailed.
To define the default library path, you can use:
The environment variable A2PS_LIBRARY
overrides these entries.
Note that for users configuration files, it is better not to set the library path, because the system's configuration has certainly been built to cope with your system's peculiarities. Use `AppendLibraryPath:' and `PrependLibraryPath:'.
It is the correct way to define the default behavior you expect from
@pack{}. If for instance you want to use Letter
as medium, then
use:
Options: --medium=Letter
It is exactly the same as always giving @pack the option `--medium=Letter' at run time.
The quoting mechanism is a bit painful: you need to quote the whole options+. For instance
Options: --right-title='Page $p' --center-title='Hello world'
is wrong. Write
Options: '--right-title=Page $p' '--center-title=Hello world'
There are two formats supported:
# A4 for Desk Jets # name w h llx lly urx ury Medium: A4dj 595 842 24 50 571 818where wxh are the dimension of the sheet, and the four other stand for lower left x and y, upper right x and y.
# A4 # name w h Medium: A4 595 842is the same as
# A4 # name w h Medium: A4 595 842 24 24 571 818
A general scheme is used, so that whatever the way you should address the printers on your system, the interface is still the same. Actually, the interface is so flexible, that you should understand `named destination' when we write `printer'.
PPD
file `PPD-key.ppd'.
The destination must be of one of the following forms:
Escapes expansion is performed on destination (see section Escapes). Recall that `#o' is evaluated to the destination name, i.e., the argument given to `-P'.
For instance
# My Default Printer is called dominique DefaultPrinter: | lp -d dominique # `a2ps foo.c -P bar' will pipe into `lp -d bar' UnknownPrinter: | lp -d #o # `a2ps -P foo' saves into the file `foo' Printer: foo > foo.ps Printer: wc | wc Printer: lw | lp -d printer-with-a-rather-big-name # E.g. `a2ps foo.c bar.h -P file' will save into `foo.c.ps' Printer: file > $n.#. # E.g. `a2ps foo.c bar.h -P home' will save into `foo.ps' # in user's home Printer: home > ${HOME}/$N.#. # Here we address a printer which is not PostScript Printer: deskj | gs -q -sDEVICE=ljet3d -sOutputFile=- - \ | lpr -P laserwriter -h -l
MS-DOS users, and non-PostScript printer owners should take advantage in getting good configuration of these entries.
You can define some kind of `Macro Options' which stands for a set of options.
Examples are
# This emulates a line printer: no features at all # call a2ps -=lp to use it UserOption: lp -1m --pretty-print=plain -B --borders=no # When printing mail, I want to use the right style sheet with strong # highlight level, and total stripping UserOption: mail -Email -g --strip=3
@pack produces full DSC conformant PostScript which is something that only PS wizards may understand(2). Adobe said
Thou shalt start your PostScript DSC conformant files with%!PS-Adobe-3.0
The bad news is that some printers will reject this header. Then you may change this header without any worry since the PostScript produced by @pack is also 100% PostScript level 1(3).
In the PostScript file is dropped information on where sheets begin and
end, so that post processing tools know where is the physical page 1, 2 etc.
With this information can be also stored a label, i.e., a human readable text
(typically the logical page numbers), which
is for instance what GhostView
shows as the list of page numbers.
@pack lets you define what you want in this field.
Escapes are actually used so much, that it is pleasant to write sophisticated strings, that one would like not to repeat all the time. As with user short cuts, you can define "macro escapes", i.e., variables:
As as example, here is a variable for psnup
, which encloses all
the option passing one would like. Delegations are then easier to
write:
Variable: psnup psnup -#v -q #?j|-d|| #?r||-c| -w#w -h#h
It is strongly suggested to follow a `.' (dot) separated hierarchy, starting with:
ps.page_label
), the header etc.
There are some files you don't really want @pack to pretty-print,
typically page description files (e.g., PostScript files, roff
files,
etc.). You can let @pack delegate the treatment of these files to other
applications. The behavior at run time depends upon the option
`--delegate' (see section Input Options).
command should produce the file on its standard output. Of course escapes substitution is performed on command (see section 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
First of all, select carefully the applications you will use for the delegations. If a filter is known to cause problems, try to avoid it in delegations(5). As a thumb rule, you should check that the PostScript generating applications produce files that start by:
%!PS-Adobe-3.0
There are some services expected from the delegations. The delegations you may write should honor:
If ever you need several commands, do not use `;' to separate them, since it may prevent detection of failure. Use `&&' instead.
The slogan "the sooner, the better" should be applied here: in
the processing chain, it is better to ask a service to the first
application that supports it. An example will make it clear: when
processing a DVI
file, dvips
knows better the page numbers
than psselect
would. So a DVI
to PostScript delegation
should ask the page selection (`#p') to dvips
, instead of
using psselect
later in the chain.
There is a list of possible delegations, on the page @href{http://www.inf.enst.fr/~demaille/a2ps/delegations.html, `Delegations for a2ps'}. If you know others, please let us know.
There are settings that only meant for @pack that you can tune by yourself.
file(1)
on a file. If possible, make
it follow the symbolic links.
In various places a documentation can be given. Since some parts of this document and of web pages are extracted from documentations, some tags are needed to provide a better layout. The format is a mixture made out of Texinfo like commands, but built so that quick and easy processing can be made.
These tags are:
bold
prologue mentions the bw
prologue:
Documentation This style is meant to replace the old option code(-b)code of a2ps 4.3. It is a copy of the black and white prologue, but in which all the fonts are in Bold. EndDocumentation
gnuc
style sheet:
documentation is "Declaration of functions are highlighted" "emph(only)emph if you start the function name" "in the first column, and it is followed by an" "opening parenthesis. In other words, if you" "write" "@example" "int main (void)" "@end example" "it won't work. Write:" "@example" "int" "main (void)" "@end example" end documentation
Many things are defined through files. There is a general scheme to associate an object to the files to use: map files. They are typically used to:
The syntax of these files is:
***
path
requests that the file designated by path be included at this
point.
key valuemeaning that when looking for key (e.g., name of a font, an encoding etc.), @pack should use value (e.g., font file name, encoding description file name etc.).
The map files used in @pack are:
Even when a PostScript printer knows the fonts you want to use, using these fonts requires some description files.
See section Map Files, for a description of the map files. This file associates the font-key to a font name. For instance:
Courier pcrr Courier-Bold pcrb Courier-BoldOblique pcrbo Courier-Oblique pcrro
associates to font named Courier
, the key pcrr
. To be
recognized, the font name must be exact: courier
and
COURIER
are not admitted.
A small tool is provided with @pack{}: make_fonts_map.sh
. It
collects the information on the font files @pack can see, and generates
a valid font map file, `fonts.map.new'.
There are two kinds of data @pack needs to use a font:
FIXME: A few words on how to make a2ps use more fonts. Don't forget some words on broken fonts such as those seen for Cyrillic support.
The style sheets are defined in various files. See see section 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 Map Files). This file is `sheets.map'.
It format is simple:
**
pattern style-key'
file(1)
matches pattern, then
select style style-key. Note that only the first two fields of
the answer of file(1)
are considered. E.g., in the following case
gargantua $ file a2ps a2ps: ELF 32-bit MSB executable SPARC Version 1,\ dynamically linked, stripped`ELF32-bit' will be matched against pattern.
If a style name can't be found, the plain style is used.
Two things are to retain from this:
stdin
, then @pack 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, @pack 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.
@pack is trying to support the various usual encodings that its users use. This chapter presents what an encoding is, how the encodings support is handled within @pack{}, and some encodings it supports.
This section is actually taken from the web pages of @href{http://www.alis.com/, Alis Technologies inc.}
Document encoding is the most important but also the most sensitive and explosive topic in Internet internationalization. It is an essential factor since most of the information distributed over the Internet is in text format. But the history of the Internet is such that the predominant - and in some cases the only possible - encoding is the very limited ASCII, which can represent only a handful of languages, only three of which are used to any great extent: English, Indonesian and Swahili.
All the other languages, spoken by more than 90% of the world's population, must fall back on other character sets. And there is a plethora of them, created over the years to satisfy writing constraints and constantly changing technological limitations. The ISO international character set registry contains only a small fraction; IBM's character registry is over three centimeters thick; Microsoft and Apple each have a bunch of their own, as do other software manufacturers and editors.
The problem is not that there are too few but rather too many choices, at least whenever Internet standards allow them. And the surplus is a real problem; if every Arabic user made his own choice among the three dozen or so codes available for this language, there is little likelihood that his "neighbor" would do the same and that they would thus be able to understand each other. This example is rather extreme, but it does illustrate the importance of standards in the area of internationalization. For a group of users sharing the same language to be able to communicate,
Certain character sets stand out either because of their status as an official national or international standard, or simply because of their widespread use.
First off, there is the ISO 8859 standards series that standardize a dozen character sets that are useful for a large number of languages using the Latin, Cyrillic, Arabic, Greek and Hebrew alphabets. These standards have a limited range of application (8 bits per character, a maximum of 190 characters, no combining) but where they suffice (as they do for 10 of the 20 most widely used languages), they should be used on the Internet in preference to other codes. For all other languages, national standards should preferably be chosen or, if none are available, a well-known and widely-used code should be the second choice.
Even when we limit ourselves to the most widely used standards, the overabundance remains considerable, and this significantly complicates life for truly international software developers and users of several languages, especially when such languages can only be represented by a single code. It was to resolve this problem that both Unicode and the ISO 10646 International standard were created. Two standards? Oh no! Their designers soon realized the problem and were able to cooperate to the extent of making the character set repertoires and coding identical.
ISO 10646 (and Unicode) contain over 30,000 characters capable of representing most of the living languages within a single code. All of these characters, except for the Han (Chinese characters also used in Japanese and Korean), have a name. And there is still room to encode the missing languages as soon as enough of the necessary research is done. Unicode can be used to represent several languages, using different alphabets, within the same electronic document.
The support of the encodings in @pack is completely taken out of the code. That is to say, adding, removing or changing anything in its support for an encoding does not require programming, nor even being a programmer.
See section What is an Encoding, if you want to know more about this.
See section Map Files, for a description of the map files.
The meaningful lines of the `encoding.map' file have the form:
alias key iso-8859-1 latin1 latin1 latin1 l1 latin1
where
mail
style sheet (support for
MIME).
When encoding is asked, the lower case version of encoding
must be equal to alias.
The encoding description file describing the encoding key is named `key.edf'. It is subject to the same rules as any other @pack file:
The entries are
Name: ISO-8859-1
Documentation Also known as ISO Latin 1, or Latin 1. It is a superset of ASCII, and covers most West-European languages. EndDocumentation
Courier
, Times-Roman
...) do not support many encodings
(for instance it does not support Latin 2). To avoid that Latin 2 users
have to replace everywhere calls to Courier
, @pack allows to
specify that whenever a font is called in an encoding, then another font
should be used.
For instance in `latin2.edf' one can read:
# Fonts from Ogonkify offer full support of ISO Latin 2 Substitute: Courier Courier-Ogonki Substitute: Courier-Bold Courier-Bold-Ogonki Substitute: Courier-BoldOblique Courier-BoldOblique-Ogonki Substitute: Courier-Oblique Courier-Oblique-Ogonki
Courier
equivalent is the best choice.
Default: Courier-Ogonki
^G
) should not be named). The special name `.notdef' is to
be used when the character is not printable.
Warning. Make sure to use real, official, PostScript names.
Using names such as `c123' may be the sign you use unusual names.
On the other hand PostScript names such as `afii8879' are common.
Most of the following information is a courtesy of @href{http://www.alis.com/, Alis Technologies inc.} and of Roman Czyborra's page about @href{http://wwwwbs.cs.tu-berlin.de/~czyborra/charsets/, The ISO 8859 Alphabet Soup}. See section What is an Encoding presents an instructive presentation of the encodings.
The known encodings are:
Support is provided thanks to Ogonkify.
Support is provided thanks to Ogonkify.
Support is provided thanks to Ogonkify.
Support is provided thanks to Ogonkify.
The Cyrillic alphabet was created by St. Cyril in the 9th century from the upper case letters of the Greek alphabet. The more ancient Glagolithic (from the ancient Slav glagol, which means "word"), was created for certain dialects from the lower case Greek letters. These characters are still used by Dalmatian Catholics in their liturgical books. The kings of France were sworn in at Reims using a Gospel in Glagolithic characters attributed to St. Jerome.
Note that Russians seem to prefer the KOI8-R character set to the ISO set for computer purposes. KOI8-R is composed using the lower half (the first 128 characters) of the corresponding American ASCII character set.
Support is provided thanks to Ogonkify.
The main feature of @pack is its pretty-printing capabilities. Two different levels of pretty printing can be reached:
Note that the difference is up to the author of the style sheet.
@pack is not a powerful syntactic pretty-printer: it just handles lexical structures, i.e., if in your favorite language
IF IF == THEN THEN THEN := ELSE ELSE ELSE := IF
is legal, then @pack is not the tool you need. Indeed @pack just looks for some keywords, or some sequences.
To provide a high degree of expressivity, CLAIRE uses:
To achieve its goal of readability, CLAIRE uses
More information on claire can be found on @href{http://www.ens.fr/~laburthe/claire.html,claire home page}.
int main (void)
it won't work. Write:
int main (void)
Whenever the changes of encoding are clear, a2ps sets itself the encoding for the parts concerned.
Tag 1 is the subject, and Tag 2 the author of the mail/news.
Note: This style sheet is _very_ difficult to write. Please don't report behavior you don't like. Just send me improvements, or write a Bison parser for mails.
It can be a good choice of destination language for people who want to produce text to print (e.g. pretty-printing, automated documentation etc.) but who definitely do not want to learn PostScript, nor to require the use of LaTeX.
It provides by the use of LaTeX like commands, a way to describe the pages that this program should produce.
program --help | a2ps -Ecard
Typical use of this style is:
diff -u old new | a2ps -Eudiff
The prologue code(diff)code helps to highlight the differences (`a2ps -Ewdiff --prologue=diff').
Typical use of this style is:
wdiff old new | a2ps -Ewdiff
code(wdiff)code can be found in usual GNU repositories. The prologue code(diff)code helps to highlight the differences (`a2ps -Ewdiff --prologue=diff').
This section presents a few style sheets that define page description languages (compared to most other style sheet meant to pretty print source files).
The style sheet Symbol
introduces easy to type keywords to obtain
the special characters of the PostScript font Symbol
. The
keywords are named to provide a LaTeX taste. These keywords are also
the names used when designing a style sheet, hence to get the full list,
see section A Bit of Syntax.
If you want to know the correspondence, it is suggested to print the
style sheet file of Symbol
:
a2ps -g symbol.ssh
PreScript
has been designed in conjunction with @pack{}. Since
bold sequences, special characters etc. were implemented in @pack{}, we
thought it would be good to allow direct access to those features:
PreScript
became an input language for @pack{}, where special
font treatments are specified in an ssh
syntax (see section Style Sheets Implementation).
The main advantages for using PreScript
are:
It can be a good candidate for generation of PostScript output (syntactic pretty-printers, generation of various reports etc.).
Every command name begins with a backslash (`\'). If the command uses an argument, it is given between curly braces with no spaces between the command name and the argument.
The main limit on PreScript
is that no command can be used inside
another command. For instance the following line will be badly
interpreted by @pack{}:
\Keyword{Problems using \keyword{recursive \copyright} calls}
The correct way to write this in PreScript
is
\Keyword{Problems using} \keyword{recursive} \copyright \Keyword{calls}.
Everything from an unquoted % to the end of line is ignored (comments).
These commands required arguments.
PreScript
and @pack can be used for one-the-fly
formating. For instance, on the `passwd' file:
ypcat passwd | awk -F: \ '{print "\Keyword{" $5 "} (" $1 ") \rightarrow\keyword{" $7 "}"}'\ | a2ps -Epre -P
The aim of the PreTeX style sheet is to provide something similar to
PreScript
, but with a more LaTeX like syntax.
`$' is ignored in PreTeX
for compatibility with LaTeX,
and `%' introduces a comment. Hence they are the only symbols which
have to be quoted by a `\'. The following characters should also be
quoted to produce good LaTeX files, but are accepted by
PreScript
: `_', `&', `#'.
Note that inside a command, like \textbf
, the quotation
mechanism does not work in PreScript
(\textrm{#$%}
writes `#$%') though LaTeX still requires quotation. Hence whenever
special characters or symbols are introduced, they should be at the
outer most level.
These commands required arguments.
Symbol
).
The following symbols, inherited from the style sheet Symbol
, are
not supported by LaTeX:
`\Alpha', `\apple', `\Beta', `\carriagereturn', `\Chi', `\Epsilon', `\Eta', `\florin', `\Iota', `\Kappa', `\Mu', `\Nu', `\Omicron', `\omicron', `\radicalex', `\register', `\Rho', `\suchthat', `\Tau', `\therefore', `\trademark', `\varUpsilon', `\Zeta'.
LaTeX is more demanding about special symbols. Most of them must be in so-called math mode, which means that the command must be inside `$' signs. For instance, though
If \forall x \in E, x \in F then E \subseteq F.
is perfectly legal in @PreTeX{}, it should be written
If $\forall x \in E, x \in F$ then $E \subseteq F$.
for LaTeX. Since in @PreTeX every `$' is discarded (unless quoted by a `\'), the second form is also admitted.
TeXScript
is a replacement of the old version of
PreScript
: it combines both the @pack{}-like and the
LaTeX-like syntaxes through inheritance of both PreScript
and
PreTeX
.
In addition it provides commands meant to ease processing of file for @pack by LaTeX.
Everything between `%%TeXScript:skip' and `%%TeXScript:piks'
will be ignored in @TeXScript
, so that there can be inserted
command definitions for LaTeX exclusively.
The commands `\textbi' (for bold-italic) and `\textsy' (for symbol) do not exist in LaTeX. They should be defined in the preamble:
%%TeXScript:skip \newcommand{\textbi}[1]{\textbf{\textit{#1}}} \newcommand{\textsy}[1]{#1} %%TeXScript:piks
There is no way in @TeXScript to get an automatic numbering. There is
no equivalent to the LaTeX environment enumerate
. But every
command beginning by \text
is doubled by a command beginning by
`\magic'. @pack behaves the same way on both families of commands.
Hence, if one specifies that arguments of those functions should be
ignored in the preamble of the LaTeX document, the numbering is
emulated. For instance
\begin{enumerate} \magicbf{1.}\item First line \magicbf{2.}\item Second line \end{enumerate}
will be treated the same way both in @TeXScript and LaTeX.
`\header' and `\footer', are not understood by LaTeX.
A face is an attribute given to a piece of text, which specifies how it should look like. Since @pack is devoted to pretty-printing source files, the faces it uses are related to the syntactic entities that can be encountered in a file.
The faces @pack uses are:
Actually, there is also the face `Symbol', but this one is particular: it is not legal changing its font.
@pack pretty prints a source file thanks to style sheets, one per language. In the following is described how the style sheets are defined. You may skip this section if you don't care how @pack does this, and if you don't expect to implement new styles.
Every style sheet has both a key, and a name. The name can be clean and beautiful, with any character you might want. The key is in fact the prefix part of the file name, and is alpha-numerical, lower case, and less than 8 characters long.
Anywhere @pack needs to recognize a style sheet by a name, it uses the key (in the `sheets.map' file, with the option `-E', etc.).
As an example, C++ is implemented in a file called `cpp.ssh', in which the name is declared to be `C++'.
The rationale is that not every system accepts any character in the file name (e.g., no `+' in MS-DOS). Moreover, it allows to make symbolic links on the ssh files (e.g., `ln -s cpp.ssh c++.ssh' let's you use `-E c++').
ssh files can include the name of its author, a version number, a documentation note and a requirement on the version of @pack{}. For instance, if a style sheet requires @pack version 4.9.6, then @pack version 4.9.5 will reject it.
@pack needs to know the beginning and the end of a word, especially keywords. Hence it needs two alphabets: the first one specifying by which letters an identifier can begin, and the second one for the rest of the word. If you prefer, a keyword starts with a character belonging to the first alphabet, and a character not pertaining to the second is a separator.
If the style is case insensitive, then matching is case insensitive (keywords, operators and sequences).
A P-rule (Pretty printing rule), or rule for short, is a structure which consists of two items:
Just a short example: `(foo, bar, Keyword_strong)' as a rule
means that every input occurrence of `foo' will be replaced by
`bar', written with the Keyword_strong
face.
If the destination string is empty, then @pack will use the source string. This is different from giving the source string as a destination string if the case is different. An example will make it fairly clear.
Let foobar
be a case insensitive style sheet including the
rules `(foo, "", Keyword)' and `(bar, bar, Keyword)'. Then,
on the input `FOO BAR', @pack will produce `FOO bar' in
Keyword
.
@pack implements two different ways to match a string. The difference
comes from that some keywords are sensitive to the delimiters around
them (such as `unsigned' and `int' in C
, which are
definitely not the same thing as `unsignedint'), and others not (in
C
, `!=' is "different from" both in `a != b' and
`a!=b').
The first ones are called keywords in @pack jargon, and the seconds are operators. Operators are matched anywhere they appear, while keywords need to have separators around them (see section Alphabets).
Let us give a more complicated example: that of the Yacc
rules.
A rule in Yacc
is of the form:
a_rule : part1 part2 ;
Suppose you want to highlight these rules. To recognize them, you will write a regular expression specifying that:
The regexp you want is: `/^[a-zA-Z0-9_]*[\t ]*:/'. But with the rule `/^[a-zA-Z0-9_]*[\t ]*:/, "", Label_strong' the blanks and the colon are highlighted too. Hence you need to specify some parts in the regexp (see section `Back-reference Operator' in Regex manual), and use a longer list of destination strings. The correct rule is
(/^\\([a-zA-Z0-9_]*\\)\\([\t ]*:\\)/, \1 Label_strong, \2 Plain)
Since it is a bit painful to read, regexps can be spread upon several lines. It is strongly suggested to break them by groups, and to document the group:
(/^\\([a-zA-Z0-9_]*\\)/ # \1. Name of the rule /\\([\t ]*:\\)/ # \2. Trailing space and colon \1 Label_strong, \2 Plain)
A sequence is a string between two markers, along with a list of exceptions. A marker is a fixed string. Typical examples are comments, string (with usually `"' as opening and closing markers, and `\\' and `\"' as exceptions) etc. Three faces are used: one for the initial marker, one for the core of the sequence, and a last one for the final maker.
There are two levels of pretty-printing encoded in the style sheets. By default, @pack uses the first level, called normal, unless the option `-g' is specified, in which case, heavy highlighting is invoked, i.e., optional keywords, operators and sequences are considered.
Here are the lexical rules underlying the style sheet language:
alphabet
,alphabets
,are
,case
,documentation
,end
,exceptions
,first
,in
,insensitive
,is
,keywords
,operators
,optional
,second
,sensitive
,sequences
,style
Comment
,Comment_strong
,Encoding
,Error
,Index1
,Index2
,Index3
,Index4
,Invisible
,Keyword
,Keyword_strong
,Label
,Label_strong
,Plain
,String
,Symbol
,Tag1
,Tag2
,Tag3
,Tag4
C-char
,C-string
---
,\Alpha
,\Beta
,\Chi
,\Delta
,\Downarrow
,\Epsilon
,\Eta
,\Gamma
,\Im
,\Iota
,\Kappa
,\Lambda
,\Leftarrow
,\Leftrightarrow
,\Mu
,\Nu
,\Omega
,\Omicron
,\Phi
,\Pi
,\Psi
,\Re
,\Rho
,\Rightarrow
,\Sigma
,\Tau
,\Theta
,\Uparrow
,\Upsilon
,\Xi
,\Zeta
,\aleph
,\alpha
,\angle
,\approx
,\beta
,\bullet
,\cap
,\carriagereturn
,\cdot
,\chi
,\circ
,\clubsuit
,\cong
,\copyright
,\cup
,\delta
,\diamondsuit
,\div
,\downarrow
,\emptyset
,\epsilon
,\equiv
,\eta
,\exists
,\florin
,\forall
,\gamma
,\geq
,\heartsuit
,\in
,\infty
,\int
,\iota
,\kappa
,\lambda
,\langle
,\lceil
,\ldots
,\leftarrow
,\leftrightarrow
,\leq
,\lfloor
,\mu
,\nabla
,\neq
,\not
,\not\in
,\not\subset
,\nu
,\omega
,\omicron
,\oplus
,\otimes
,\partial
,\perp
,\phi
,\pi
,\pm
,\prime
,\prod
,\propto
,\psi
,\radicalex
,\rangle
,\rceil
,\register
,\rfloor
,\rho
,\rightarrow
,\sigma
,\sim
,\spadesuit
,\subset
,\subseteq
,\suchthat
,\sum
,\supset
,\supseteq
,\surd
,\tau
,\theta
,\therefore
,\times
,\trademark
,\uparrow
,\upsilon
,\varUpsilon
,\varcopyright
,\vardiamondsuit
,\varphi
,\varpi
,\varregister
,\varsigma
,\vartheta
,\vartrademark
,\vee
,\wedge
,\wp
,\xi
,\zeta
C
escaping mechanism is used.
C
escaping mechanism is used. Regexps can be split in several
parts, à la C strings (i.e., `/part 1/ /part 2/').
The definition of the name of the style sheet is:
style
nameis
# body of the style sheetend
style
The following constructions are optional:
version
version is version-number
written
written by authorsGiving your email is useful for bug reports about style sheets.
written by "Some Body <Some.Body@some.whe.re>"
requires
requires a2ps a2ps-version-number
documentation
documentation is strings end documentationstrings may be a list of strings, without comas, in which case new lines are automatically inserted between each item. See section Documentation Format for details on the format. Please, write useful comments, not `This style is devoted to C files', since the name is here for that, nor `Report errors to mail@me.somewhere', since
written by
is there for that.
documentation is "Not all the keywords are used, to avoid too much" "bolding. Heavy highlighting (code(-g)code), covers" "the whole language." end documentation
There are two things @pack needs to know: what is symbol consistent, and whether the style is case insensitive.
alphabet
first alphabet is string second alphabet is stringIf both are identical, you may use the shortcut
alphabets are stringThe default alphabets are
first alphabet is "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_" second alphabet is "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_\ 0123456789"Note that it is on purpose that no characters interval are used.
case
case insensitive # e.g., C, C++ etc. case sensitive # e.g., Perl, Sather, Java etc.The default is
case insensitive
.
It is possible to extend an existing style. The syntax is:
ancestors are ancestor_1[, ancestor_2...] end ancestors
where ancestor1 etc. are style sheet keys.
For semantics, the rules are the following:
As an example, both C++
and Objective C
style sheets
extend the C
style sheet:
style "Objective C" is #[...] ancestors are c end ancestors #[...] end style
To the biggest surprise of the author, mutually dependent style sheets do work!
See section P-Rules, for the definition of P-rule.
Because of various short cuts, there are many ways to declare a rule:
rules ::= rule_1 `,' rule_2... rule ::= `(' lhs rhs `)' | lhs srhs ; lhs ::= string | regex ; rhs ::= srhs `,' ... srhs ::= latex-keyword | expansion face expansion ::= string | `\'num | <nothing>; face ::= face-keyword | <nothing>;
The rules are the following:
#define RE_SYNTAX_A2PS \ (RE_SYNTAX_EMACS | RE_CHAR_CLASSES | RE_INTERVALS)See section `Regular Expression Syntax' in Regex manual, for detailed description of the regular expressions used.
Keyword
.
PLAIN
is used.
Basically, keywords and operators are lists of rules. The syntax is:
keywords are rules end keywords
or
keywords in face-keyword are rules end keywords
in which case the default face is set to face-keyword.
As an example:
keywords in Keyword_strong are /foo*/, "bar" "BAR" Keyword, -> \rightarrow end keywords
is valid.
The syntax for the operators is the same, and both constructs can be
qualified with an optional
flag, in which case they are taken
into account in the heavy highlighting mode (see section Pretty Printing Options).
This is an extract of the C
style sheet:
optional operators are -> \rightarrow, && \wedge, || \vee, != \neq, == \equiv, # We need to protect these, so that <= is not replaced in <<= <<=, >>=, <= \leq, >= \geq, ! \not end operators
Note how `<<=' and `>>=' are protected (there are defined to be written as is when met in the source). This is to prevent the two last characters of `<<=' from being converted into a `less or equal' sign.
The order in which you define the elements of a category (but the
sequences) does not matter. But since @pack sorts them at run time, it
may save time if the alphabetical C
-order is more or less
followed.
You should be aware that when declaring a keyword with a regular expression as lhs, then @pack automatically makes this expression matching only if there are no character of the first alphabet both just before, and just after the string.
In term of implementation, it means that
keywords are /foo\\|bar/ end keywords
is exactly the same as
operators are /\\b\\(foo\\|bar\\)\\b/ end operators
This can cause problems if you use anchors (e.g. $
, or ^
)
in keywords: the matcher will be broken. In this particular case,
define your keywords as operators, taking care of the `\\b' by
yourself.
See section `Match-word-boundary Operator' in Regex manual, for details on `\b'.
Sequences admit several declarations too:
sequences ::= sequences are sequence_1 `,' sequence_2... end sequences sequence ::= rule in_face close_opt exceptions_opt |C-string
|C-char
; close_opt ::= rule | closers are rules end closers | <nothing> ; exceptions_opt ::= exceptions are rules end exceptions | <nothing> ;
The rules are:
As a first example, the definition of C-string
is:
sequences are "\"" Plain String "\"" Plain exceptions are "\\\\", "\\\"" end exceptions end sequences
The following example comes from `ssh.ssh', the style sheet for
style sheet files, in which there are two kinds of pseudo-strings: the
strings (`"example"'), and the regular expressions
(`/example/'). We do not want the content of the pseudo-strings in
the face String
.
sequences are # The comments "#" Comment, # The name of the style sheet "style " Keyword_strong (Label + Index1) " is" Keyword_strong, # Strings are exactly the C-strings, though we don't want to # have them in the "string" face "\"" Plain "\"" exceptions are "\\\\", "\\\"" end exceptions, # Regexps "/" Plain "/" exceptions are "\\\\", "\\\/" end exceptions end sequences
The order between sequences does matter. For instance in Java, `/**' introduces strong comments, and `/*' comments. `/**' must be declared before `/*', or it will be hidden.
There are actually some sequences that could have been implemented as
operators with a specific regular expression (that goes up to the
closer). Nevertheless be aware of a big difference: regular expression
are applied to a single line of the source file, hence, they cannot
match on several lines. For instance, the C
comments,
/* * a comment */
cannot be implemented with operators, though C++
comments can:
// // a comment //
In this section a simple example of style sheet is entirely covered: that of `ChangeLog' files.
`ChangeLog' files are some kind of memory of changes done to files, so that various programmers can understand what happened to the sources. This helps a lot, for instance, in guessing what recent changes may have introduced new bugs.
First of all, here is a sample of a `ChangeLog' file, taken from the `misc/' directory of the original @pack package:
Sun Apr 27 14:29:22 1997 Akim Demaille <demaille@inf.enst.fr> * base.ps: Merged in color.ps, since now a lot is common [added box and underline features]. Fri Apr 25 14:05:20 1997 Akim Demaille <demaille@inf.enst.fr> * color.ps: Added box and underline routines. Mon Mar 17 20:39:11 1997 Akim Demaille <demaille@gargantua.enst.fr> * base.ps: Got rid of CourierBack and reencoded_backspace_font. Now the C has to handle this by itself. Sat Mar 1 19:12:22 1997 Akim Demaille <demaille@gargantua.enst.fr> * *.enc: they build their own dictionaries, to ease multi lingual documents.
The syntax is really simple: A line specifying the author and the date of the changes, then a list of changes, all of them starting with an star followed by the name of the files concerned, then optionally between parentheses the functions affected, and then some comments.
Quite naturally the style will be called ChangeLog
, hence:
style ChangeLog is written by "Akim Demaille <demaille@inf.enst.fr>" version is 1.0 requires a2ps 4.9.5 documentation is "This is a tutorial style sheet.\n" end documentation ... end style
A first interesting and easy entry is that of function names, between `(' and `)':
sequences are "(" Plain Label ")" Plain end sequences
A small problem that may occur is that there can be several functions mentioned separated by commas, that we don't want to highlight this way. Commas, here, are exceptions. Since regular expressions are not yet implemented in @pack{}, there is a simple but stupid way to avoid that white spaces are all considered as part of a function name, namely defining two exceptions: one which captures a single comma, and a second, capturing a comma and its trailing space.
For the file names, the problem is a bit more delicate, since they may end with `:', or when starts the list of functions. Then, we define two sequences, each one with one of the possible closers, the exceptions being attached to the first one:
sequences are "* " Plain Label_strong ":" Plain exceptions are ", " Plain, "," Plain end exceptions, "* " Plain Label_strong " " Plain end sequences
Finally, let us say that some words have a higher importance in the core of text: those about removing or adding something.
keywords in Keyword_strong are add, added, remove, removed end keywords
Since they may appear in lower or upper, of mixed case, the style will be defined as case insensitive.
Finally, we end up with this style sheet file, in which an optional highlighting of the mail address of the author is done. Saving the file is last step. But do not forget that a style sheet has both a name as nice as you may want (such as `Common Lisp'), and a key on which there are strict rules: the prefix must be alpha-numerical, lower case, with no more than 8 characters. Let's chose `chlog.ssh'.
# This is a tutorial on a2ps' style sheets style ChangeLog is written by "Akim Demaille <demaille@inf.enst.fr>" version is 1.0 requires a2ps 4.9.5 documentation is "Second level of high lighting covers emails." end documentation sequences are "(" Plain Label ")" Plain exceptions are ", " Plain, "," Plain end exceptions, "* " Plain Label_strong ":" Plain exceptions are ", " Plain, "," Plain end exceptions, "* " Plain Label_strong " " Plain end sequences keywords in Keyword_strong are add, added, remove, removed end keywords optional sequences are < Plain Keyword > Plain end sequences end style
The last touch is to include the pattern rules about `ChangeLog' files (which could appear as `ChangeLog.old' etc.) in `sheets.map':
# ChangeLog files ChangeLog* chlog
This won't work... Well, not always. Not for instance if you print `misc/ChangeLog'. This is not a bug, but truly a feature, since sometimes one gets more information about the type of a file from its path, than from the file name.
Here, to match the preceding path that may appear, just use `*':
# ChangeLog files *ChangeLog* chlog
If you want to be more specific (`FooChangeLog' should not match), use:
# ChangeLog files ChangeLog* chlog */ChangeLog* chlog
The example we have presented until now uses only basic features, and does not take advantage of the regexp. In this section we should how to write more evolved pretty printing rules.
The target will be the lines like:
Sun Apr 27 14:29:22 1997 Akim Demaille <demaille@inf.enst.fr> Fri Apr 25 14:05:20 1997 Akim Demaille <demaille@inf.enst.fr>
There are three fields: the date, the name, the mail. These lines all start at the beginning of line. The last field is the easier to recognize: is starts with a `<', and finishes with a `>'. Its rule is then `/<[^>]+>/'. It is now easier to specify the second: it is composed only of words, at least one, separated by blanks, and is followed by the mail: `/[[:alpha:]]+\\([ \t]+[[:alpha:]]+\\)*/'. To concatenate the two, we introduce optional blanks, and we put each one into a pair of `\\('-`\\)' to make each one a recognizable part:
\\([[:alpha:]]+\\([ \t]+[[:alpha:]]+\\)*\\) \\(.+\\) \\(<[^>]+>\\)
Now the first part is rather easy: it starts at the beginning of the line, finishes with a digit. Once again, it is separated from the following field by blanks. Split by groups (see section `Grouping Operators' in Regex manual), we have:
^ \\([^\t ].*[0-9]\\) \\([ \t]+\\) \\([[:alpha:]]+\\([ \t]+[[:alpha:]]+\\)*\\) \\(.+\\) \\(<[^>]+>\\)
Now the destination is composed of back references to those groups, together with a face:
# We want to highlight the date and the maintainer name optional operators are (/^\\([^\t ].*[0-9]\\)/ # \1. The date /\\([ \t]+\\)/ # \2. Spaces /\\([[:alpha:]]+\\([ \t]+[[:alpha:]]+\\)*\\)/ # \3. Name /\\(.+\\)/ # \5. space and < /\\(<[^>]+\\)>/ # \6. email \1 Keyword, \2 Plain, \3 Keyword_strong, \5 Plain, \6 Keyword, > Plain) end operators
Notice the way regexps are written, to ease reading.
This chapter is devoted to the information which is only relevant to PostScript.
Page device is a PostScript level 2 feature that offers an uniform interface to control printer's output device. @pack protects all page device options inside an if block so they have no effect in level 1 interpreters. Although all level 2 interpreters support page device, they do not have to support all page device options. For example some printers can print in duplex mode and some can not. Refer to the documentation of your printer for supported options.
Here are some usable page device options which can be selected with the `-D' option (`--setpagedevice'). For a complete listing, see PostScript Language Reference Manual: section 4.11 Device Setup.
Collate boolean
Duplex boolean
ManualFeed boolean
OutputFaceUp boolean
Tumble boolean
The statusdict
is a special storage entity in PostScript (called
a dictionary), in which some variables and operators determine the
behavior of the printer. This is an historic horror that existed before
page device definitions were defined. They are even more printer
dependent, and are provided only for the people who don't have a level
printer. In any case, refer to the documentation of your printer for
supported options.
Here are some statusdict definitions in which you might be interested:
manualfeed boolean
setmanualfeed boolean
setduplexmode boolean
Nevertheless, here are some tips on how to design your PostScript styles. It is strongly recommended to use `gray.pro' or `color.pro' as a template.
There are two PostScript instructions you might want to use in your new PostScript prologue:
setgray
setrgbcolor
@pack uses two upper level procedures, BG
and FG
, but
both use an argument as in setrgbcolor
. So if you wanted a gray
shade, just give three times the same ratio.
@pack uses several types of PostScript files. Some are standards, such as font files, and others are meant for a2ps only.
All a2ps files have two parts, one being the comments, and the other being the content, separated by the following line:
% code follows this line
It is pretty known that satisfying the various human tastes is an NEXPTIME-hard problem, so @pack offers ways to customize its output through the prologue files. But since the authors feel a little small against NEXPTIME, they agreed on the fact that you are the one who will design the look you like.
Hence in this section, you will find what you need to know to be able to customize @pack output.
Basically, @pack uses faces which are associated to their "meaning" in the text. @pack let's you change the way the faces look.
There are three things that define a face:
%Face: face real-font-name sizeThis line tells @pack that the font of face is real-font-name. It will replace this line by the correct PostScript line to call the needed font, and will do everything needed to set up the font. The size of the text body is
bfs
.
true
to BG
:
0.8 0.8 0 true BG
BG
with
false
:
false BG
BG
, call FG
with an RGB ratio:
0 0.5 0 FG
UL
requires a boolean argument, depending whether you want
or not the current face to be underlined.
true UL
BX
let's a face have a box drawn around.
Prologue files for @pack must have `pro' as suffix. Documentation (reported with `--list-prologues') can be included in the comment part:
Documentation This prologue is the same as the prologue code(pb)code, but using the bold version of the fonts. EndDocumentation % code follows this line
See section Documentation Format for more on the format.
We strongly suggest our readers not to start from scratch, but to copy one of the available styles (see the result of `a2ps --list=prologues'), to drop it in one of @pack directories (say `$HOME/.a2ps', and to patch it until you like it.
Here, we will start from `color.pro', trying to give it a funky look.
Say you want the keywords to be in Helvetica, drawn in a flashy pink on a light green. And strong keywords, in Times Bold Italic in brown on a soft Hawaïan sea green (you are definitely a fine art amateur).
Then you need to look for `k' and `K':
/k { false BG 0 0 0.9 FG %Face: Keyword Courier bfs Show } bind def /K { false BG 0 0 0.8 FG %Face: Keyword_strong Courier-Bold bfs Show } bind def
and turn it into:
/k { 0.2 1 0.2 true BG 1 0.2 1 FG %Face: Keyword Helvetica bfs Show } bind def /K { 0.4 0.2 0 true BG 0.5 1 1 FG %Face: Keyword_strong Times-BoldItalic bfs Show } bind def
Waouh! It looks great!
A bit trickier: let change the way the line numbers are printed.
First, let's look for the font definition:
%%BeginSetup % The font for line numbering /f# /Helvetica findfont bfs .6 mul scalefont def %%EndSetup
Let it be in Times, twice bigger than the body font.
%%BeginSetup % The font for line numbering /f# /Times-Roman findfont bfs 2 mul scalefont def %%EndSetup
How about its foreground color?
% Function print line number (<string> # -) /# { gsave sx cw mul 2 div neg 0 rmoveto f# setfont 0.8 0.1 0.1 FG c-show grestore } bind def
Let it be blue. Now you know the process: just put `0 0 1' as
FG
arguments.
@pack offers to the programmer an access to its generating routines. This section documents the API.
But since this section is empty, or almost, if I were you, I would go in contrib/sample to see how it works...
liba2ps
NULL
,
filename cannot.
A print job should be seen as associated to a single output.
A file job should be seen as a single input.
NULL
, in which case its name is defaulted to that of
stdin
.
These are the functions to be used to send content to liba2ps
.
C
string string in face in job.
card
Many users of @pack have asked for a reference card, presenting a summary of the options. In fact, something closely related to the output of `@pack --help'.
The first version of this reference card was a PreScript file (see section PreScript) to be printed by @pack{}. Very soon a much better scheme was found: using a style sheet to pretty print directly the output of `@pack --help'! A first advantage is then that the reference cards can be printed in the tongue you choose.
A second was that this treatment could be applied to any application supporting a `--help'-like option.
card
card [options] applications
card
is a shell script which tries to guess how to get your
applications' help message (typically by the options `--help'
or `-h'), and pretty prints it thanks to @pack{} (or the content of
the environment variable `A2PS' if it is set).
Supported options are:
LC_ALL
etc.
(such as `fr', `it' etc.).
If the applications don't support internationalization, English will be used.
card --command="cc -flags"
Any option that is not recognized by card
is passed to @pack{}
(see section Invoking @pack). Be aware that these options must not be
separated from their arguments. For instance
card gmake gtar --command="cc -flags" -Pdisplay
builds the reference card of GNU make
, GNU tar
(automatic detection of `--help' support), and cc
thanks to `-flags'. Since `-P' is not supported
by card
, it is passed to @pack{}.
card
Remember that card
runs the programs you give it, and the
commands you supplied. Hence if there is a silly programs that has a
weird behavior given the option `-h' etc., beware of the result.
It is even more clear using `--command': avoid running `card --command="rm -rf *"', because the result will be exactly what you think it will be!
psmandup
I personally hate to print documents of hundreds of pages on a single sided printer. Too bad, here there are no Duplex printers. The idea is then simply first to print the odd pages, then the even in reversed order. To make sure one flips the page in the meanwhile, the second half should be printed from the manual feed tray.
Make a shell script that automates this, and you get psmandup
.
psmandup
psmandup [options] [file]
produce a manual duplex version of the PostScript file (or of the standard input if no file is given, or if file is `-'). Once the first half is printed, put the sheet stack in the manual feed tray for the second half.
Supported options are:
psmandup
will fail on ill designed PostScript. Actually it is
the psutils that fail. To avoid this, by default the PostScript file is
sanitized by fixps
.
When given this option, don't run fixps
. This is meant to be
used when fixps
has already been used higher in the processing
chain.
psmandup
makes the assumptions that the printer is Level 2, and
support manual feeding. The file should be reasonably sane,
otherwise psmandup
fails miserably.
Typical use is
psmandup file.ps | lp
or can be logged into @pack{}' printer commands (see section Your Printers).
pdiff
The shell script pdiff
aims to pretty print diff between files.
It basically uses GNU diff
(see section `Overview' in Comparing and Merging Files) or GNU wdiff
(see section `The word difference finder' in GNU wdiff) to extract the diff, then calls
@pack with the correct settings to get a nice, printed contextual diff.
pdiff
pdiff [options] file-1 file-2
make a pretty comparison between file-1 and file-2.
Supported options are:
Any option that is not recognized by pdiff
is passed to @pack{}
(see section Invoking @pack). Be aware that these options must not be
separated from their arguments. For instance
pdiff -l -Pdisplay COPYING COPYING.LIB
Comparse the files `COPYING' and `COPYING.LIB', and prints it
on the printer display
(usually ghostview
or gv
).
Since `-P' is not supported by pdiff
, it is passed to
@pack{}.
fixps
The shell script fixps
tries its best to fix common problems in
PostScript files that may prevent post processing. It makes heavy use
of the psutils
. It is a good idea to use fixps
upstream
in the PostScript to PostScript delegations.
fixps
fixps [options] [file]
sanitize the PostScript file (or of the standard input if no file is given, or if file is `-').
Supported options are:
FIXME: Document me.
We collected in this chapter the things that had no place in the rest of the document.
Note. I am not really aware of security problems. I am just making assumptions upon my poor knowledge, so if somebody sees things that should be reported here, or problem I'm not aware of, please contact us so that this note gets extended or fixed.
One should understand that any program that has not been written to be secure is never secure. It is of course the case of @pack{}.
Do not panic, there are no reason for you to worry. Nevertheless we can yet imagine ways to obtain illegal rights thanks to some features of @pack{}, especially virtual printers.
If @pack is run by root, then the files it may create are owned by
root. This can for instance happen if you install @pack as one of
lp
or lpr
filter.
Then, if one of the virtual printer creates say a shell script, it is owned by root too. With just a bit of habit, it should not be difficult then to access privileged access to the system.
In what conditions could it happen? Only if there are some printers defined in the system configuration file of @pack{}, or in root's home directory `.a2ps/a2psrc'. Hence, make sure to carefully write the commands to the preconfigured printers.
As you can see, this is quite science fiction, nevertheless, you might wanted to know.
Here are some tips we have on how to use a non PostScript printer. If somebody feels like writing a more precise documentation, he really is welcome.
(for a bj200ex on os2 from linux) This is a shell script called as a filter from an ":if=/usr/local/bin/filtername" entry in /etc/printcap on linux:
#!/bin/bash gs -q -sDevice=bj200 -sOutputfile=- -r360 -dNOPAUSE -dSAFER -
The device is a gs device name, input is the ending "-" (stdin), output is stdout, -q is "no messages". Can be used with
lpr -Pprintername -Ffilter_path_and_name infile.ps
or just `lpr -Pprintcap_printername infile.ps' if the filter is specified in the printcap `:if=' entry for that "printcap_printername". Either way, lpr on linux runs it in a sub shell, so you don't want "exec" before the gs command (that kills the sub shell and leaves gs running with no way to communicate its stdout back to lpr).
You can print directly from gs, I've done it on OS/2 by specifying "lpt1" as the output device, but printing to a remote printer I need lpr and lpd to handle transmitting the job, so this way works better for me.
Regards, Clayton Weaver (Seattle)
To print toto.ps on my desk-jet, I hit:
> gsdj toto.ps
where `gsdj' is
#!/bin/sh # 05-06-1996 # to print a PostScript file using GhostScript on the # desk-jet 500 (dj) or the printer specified via the # environment variable LPOPTS # using GhostScript # exec gs -q -dNOPAUSE -sPAPERSIZE=a4 -sDEVICE=djet500 \ exec gs -q -dNOPAUSE -sPAPERSIZE=a4 -sDEVICE=deskjet \ -sOutputFile="|lp -onb -ddj -or $LPOPTS " $* quit.ps
To use these examples, first see section Your Printers. The translations would be in one of your configuration files, say `$HOME/.a2ps/a2psrc':
Printer: lpt1 | gs -q -sDevice=bj200 -sOutputfile=- -r360 -dNOPAUSE \ -dSAFER > lpt1 UnknownPrinter: | gs -q -dNOPAUSE -sPAPERSIZE=a4 -sDEVICE=deskjet \ -sOutputFile="|lp -onb -ddj -or #o" quit.ps
Please, before sending us mail, make sure the problem you have is not known, and explained. Moreover, avoid using the mailing list for asking question about the options, etc. It has been built for announces and suggestions, not to contact the authors.
Error related questions.
When I have just compiled @pack{}, and I first try it, I have weird errors such as:gargantua ~T $ a2ps --help ld.so.1: a2ps: fatal: relocation error: symbol not found: ps_comment_hook: referenced in a2ps zsh: 7294 killed a2ps --help
This is due to a mix between several versions of the liba2ps
. To
fix the problem, make sure to run `make install' in the `lib/'
directory and then in the `src/' directory. Removing the previous
`liba2ps.so' files may help.
There are two ways that printing can fail: silently, or with an diagnostic.
First check that you did not give exotic options to an old printer (typically, avoid printing on two sides on a printer that does not support it). Avoid use of options `-D' (see section Page Device Options) and `-S' (see section Statusdict Options).
If the trouble persists, please try again but with the option `--debug' (a PostScript error handler is down-loaded), and then send us:
If your printer is too old, then @pack will not be able to send it the code it needs when `-s2' is specified. This is because your printer uses an old and not standardized interface for special features.
So you need to
Since this is painful to hit, a User Option (see section Your Shortcuts) should help.
You are currently printing with a bad medium, for instance using A4 paper within @pack{}, while your printer uses Letter paper. See section Sheets Options, option `--medium' for more.
You are probably printing a PostScript file or equivalent. Try to print with `-Z': @pack will try to do his best to find what is the program that can help you (see section Your Delegations). In case of doubt, don't hesitate to save into a file, and check the content with GhostView, or such:
$ a2ps my_weird_file -Z -o mwf.ps $ ghostview mwf.ps
If it is not correct, ask for help around you.
yacc
and suchThere are several reasons why we decided not to use grammars to parse the files. First it would have made the design of the style sheets much more tricky, and today @pack would know only 4 or 5 languages.
Second, it limits the number of persons who could build a style sheet.
Third, mixing several parsers within one program is not easy. Moreover, its would have been ten times bigger.
Fourth, we did not feel the need for such a powerful tool: handling the keywords and the sequences is just what the users expect.
Fifth, any extension of @pack would have required to recompile.
And last but not least, using a parser requires that the sources are syntactic bug free, what is too strong a requirement.
Nevertheless, PreScript
gives the possibility to have on the one
hand a syntactic parser which would produce PreScript
code, and
on the other hand, @pack{}, which would make it PostScript. This schema
seems to us a good compromise. If it is still not enough for you, you
can use the library (see section Programming with the Library).
The option `--margin[=size]' is meant for this. See section Sheets Options.
stdin
?
@pack prints the standard input if you give no file name, or if you gave
`-' as file name. Automatic style selection is of course much
weaker: without the file name, @pack can only get file(1)
's
opinion (see section Style Sheet Files). In general it means most
delegations are safe, but there will probably be no pretty-printing.
YOU can supply a name to the standard input (`--stdin=name') with which it could guess the language.
See section Designing PostScript Prologues, for details. Make sure that all the information @pack needs is available (see section Font Files).
By the past, @pack had an option `-b' with which the fonts were bold. Since now the fonts are defined by prologues (see section Designing PostScript Prologues) this option no longer makes sense. A replacement prologue is provided: `bold'. To use it, give the option `--prologue=bold'.
@pack is specialized in PostScript generation. Nevertheless many
printers do not understand PostScript, most notably personal Jet
printers. GhostScript
is a true PostScript interpretor which is
able to convert PostScript code into another format (most notably for
X11 or other screen devices, which explains why GhostScript
is
needed by tools such as GhostView
, or gv
etc.).
GhostScript
might be the tool you need. It support conversion to
many different non PostScript printer. To know more, see
@href{http://www.cs.wisc.edu/~ghost/index.html, GhostScript
home
page}.
There are some features we would like to implement. Some are the following ones. If you feel like helping, don't hesitate to contact us.
@pack should be able to generate EPS files in a short while.
When printing a human file (only English may be supported), spelling should be checked. When pretty-printing, syntax errors should be underlined.
No just kidding :). Do it yourself...
This section settles some terms used through out this document, and provides the definitions of some terms you probably want to know about.
psnup
, psselect
etc.) can post process
PostScript files.
GhostScript
GhostScript
is a full PostScript interpreter running under many
various systems (Unixes, MS-DOS, Mac etc.). It can be used either to
view PostScript files (in general thanks to a graphic interface such as
GhostView
or gv
...), or to translate the PostScript in
another format (for instance PCL
, PDF
, and many formats
supported by some printers such as the Desk Jets).
Thanks to GhostScript
many people not owning a PostScript printer
are still able to use the PostScript technology.
HTML
, PostScript,
LaTeX, roff
and others are such languages. A file written in
those languages is not made to be read as is by a human, but to be
transformed (or compiled) into a readable form.
HTML
, or roff
, but as TeX
and LaTeX, it is truly a programming language which main purpose is
to draw (on sheets). Most programs are a list of instructions that
describes lines, shades of gray, or text to draw on a page.
This is the language that most printers understand.
Note that the fact that PostScript is a programming language is
responsible of both its success and its failure. It is a big win for
the PostScript programmer who can easily implement a lot of nice visual
effects. It is a big loss because the page descriptions can have an
arbitrary complexity, hence rendering can be really slow (remember the
first Laser you had, or even GhostScript
. PDF
has been
invented by Adobe to remedy these problems).
PostScript is a trademark of Adobe Systems Incorporated.
PPD
files are here to prove that
device independence was a failure.
psutils
psutils
to run correctly, the PostScript files must be DSC
conformant, and the bad news is that many PostScript drivers produce
files which are not. For some common cases (e.g., Micro$oft tools),
Angus Duggan included in the package some tools (named fix...ps
)
to fix typical problems. fixps
is a collection of recipes on
when to run what fix
tool.
Here are some words on @pack and its history.
The initial version was a shell program written by Evan Kirshenbaum. It was very slow and contained many bugs.
A new version was written in C
by Miguel Santana to improve execution speed and portability. Many new
features and improvements have been added since this first version.
Many contributions (changes, fixes, ideas) were done by @pack users in
order to improve it.
From the latest version from Miguel Santana (4.3), Emmanuel Briot
implemented bold faces for keywords in Ada
, C
and
C++
.
From that version, Akim Demaille generalized the pretty-printing capabilities, implemented more languages support, and other features.
Since the very beginning of @pack{}, many people have brought help:
Libtool
) is ported onto Pyramid Systems.
a2ps-compile-regexp
for the a2ps-mode
.
Some people worked on the translation of @pack{}:
Ogonkify
(see section `Overview' in Ogonkify manual).
Patrick Andries, from @href{http://www.alis.com/,Alis Technologies inc.} and Roman Czyborra (see his @href{http://wwwwbs.cs.tu-berlin.de/~czyborra/, home page}), provided us with important information on encodings. We strongly recommend that you go and read these pages: there is a lot to learn.
Juliusz Chroboczek worked a lot on the integration of the products of
Ogonkify (such as Latin 2 etc. fonts) in @pack{}. Without his help, and
the time is devoted to both @pack and ogonkify
, many non
west-European people would still be unable to print easily texts written
in their mother tongue.
Denis Girou brought a constant and valuable support through out the genesis of pretty-printing @pack{}. His comments on both the program and the documentation are the origin of many pleasant features (such as `--prologue').
The subroutines and source code in the @pack package are "free"; this means that everyone is free to use them and free to redistribute them on a free basis. The @pack{}-related programs are not in the public domain; they are copyrighted and there are restrictions on their distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of these programs that they might get from you.
Specifically, we want to make sure that you have the right to give away copies of the programs that relate to @pack{}, that you receive source code or else can get it if you want it, that you can change these programs or use pieces of them in new free programs, and that you know you can do these things.
To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of the @pack{}-related code, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights.
Also, for our own protection, we must make certain that everyone finds out that there is no warranty for the programs that relate to @pack{}. If these programs are modified by someone else and passed on, we want their recipients to know that what they have is not what we distributed, so that any problems introduced by others will not reflect on our reputation.
The precise conditions of the licenses for the programs currently being distributed that relate to @pack are found in the General Public Licenses that accompany them.
display
file
GhostScript
make_fonts_map.sh
PreScript
psutils
setpagedevice
statusdict
void
A classical Unix trick to make the difference between the option `-2', and the file `-2' is to type `./-2'.
Basically it means the the
PostScript that a2ps
generates is really modular. In other
words, any kind of post-processing may be applied to the files it
produced.
That is to say, there are no PostScript printers that don't understand these files.
Current a2ps
only
handles PostScript output, i.e. out=`ps'
Because hiding its use into a2ps
just makes
it even more difficult to the users to know why it failed. Let them use
it at hand.
This document was generated on 20 June 1998 using the texi2html translator version 1.51a.