Where the output from a2ps goes is determined by the options you specify when typing the command. This document illustrates the basic uses of the a2ps. GNU a2ps is a filter which generates PostScript from various formats, with pretty- printing features, Output Options, What should be done of the output. See the output of `a2ps –list=media’ for the list of supported media. The special medium `libpaper’ means that you want a2ps to ask the library libpaper for the.
|Published (Last):||7 October 2010|
|PDF File Size:||12.53 Mb|
|ePub File Size:||16.16 Mb|
|Price:||Free* [*Free Regsitration Required]|
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Outpt is granted to copy and outpput translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. This document describes pack version 4. The latest versions may be found on decrease order of service quality: Description pack formats named files for printing in a PostScript printer; if no file is given, pack reads from the standard input.
The output may be sent to the printer or to the standard output or saved into a file. The format used is nice and compact: This is very useful for making archive listings of programs. Compared to the previous versions, pack version 4. Syntactic limits pack is not a powerful syntactic pretty-printer: Indeed pack just looks for some keywords, or some sequencesi. It is for the same putput that you can’t expect pack to highlight the function definitions in C.
Calling pack outputt fairly simple: Here after bool stands for boolean. It is considered as true i. Outpuh corresponding short option takes no arguments, but corresponds to a positive answer.
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 meta sequences.
See section Meta sequences for details. Headers, footers, titles and the water mark are strings in which some meta sequences are later replaced by their actual values. On a new sheet pack first draws the water mark, then the content of the first page, then the frame of the first aps, ditto with the othersand finally the sheet header and footers.
This order must be taken into account for some meta sequences e. Currently pack support the following meta sequences: These two are provided in the case pack would be used by the print service: Tags are piece of text pack fetches in the files, according to the style. For instance, in mail-folder style, tag 1 is the title of the mail, and tag 2 its author. If the width is negative, the value will be printed left-justified. Page kutput is a PostScript level 2 feature that offers an uniform interface to control printer’s output device.
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. The statusdict is a special storage entity in PostScript called a dictionnaryin which some variables and operators determine the behavior of the printer.
As for page device, those variables are device dependent: In the order, they are: All other lines have the format:. It outpuh two special features wrt non-English languages: The problem with this approach is that a lot more than just messages and time information is affected: So if you just want messages and time format to be localized, then define: If you want to do a profound translation work, contact us.
But we need in urgency small pieces of information: The main feature of pack is 2aps pretty-printing capabilities.
Two different levels of pretty printing can be reached: Keywords are written in bold, strings in Times, comments in Italic etc. In this mode, some keywords are replaced by a Symbol character which best represents them.
a2ps ascii to PostScript converter, and pretty printer
Two things are to retain from this: Outpkt languages pack version 4. This style also suits news files.
Only the pure specification is then printed. In the following is described how the style sheets are defined. You ooutput skip this section if you don’t care how pack does this, and if you don’t expect to implement new styles. When automatic pretty-printing is enabled, first pack calls file to see whether the language is recognizable. Otherwise, the suffix of the file is compared with every name and abbreviation.
On failure, plain style is used. Hence it needs two alphabets: Keywords and regular symbols A keyword if recognized, is just written in a special font. A symbol, when recognized, is replaced by the corresponding character in the symbol font.
To be recognized, both need to start by a character in the first alphabet and to be immediately followed by a character which does not belong to the second alphabet.
They need not to be preceded and followed by characters belonging to the alphabet. Sequences are string is a string between two markers. A marker is a fixed string.
a2ps(1) – Linux man page
Three fonts are used: Escapes are immediately copied when outtput in a sequence. Their main use is to avoid a sequence from being terminated too soon, e. Verbatims are immediately copied wherever met.
If the style is case insensitive, the case does not matter for the keyword, symbol and sequence recognition. Other categories are not concerned by case sensitivity. To be able to define new style sheets one needs GNU m4. There is a couple of things to know about the process. The order in outut 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. For the a2p case of the special symbols, note that you may have to protect the symbols which are prefixed by them.
A closing marker may require to end on end-of-line. It is also possible to specify several closing markers, just by putting them one after the other, for instance taken for the ada style sheet: Please, respect the alphabetical order in which the languages are introduced. Since bold sequences, special characters etc. The main advantages for using PreScript are: It otuput be a good candidate for generation of PostScript output syntactic pretty-printers, generation of various reports etc.
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. There is a big menagerie of symbols. The following characters should also be quoted to produce good LaTeX files, but are accepted by PreScript: Hence whenever special characters or symbols are introduced, they should be at the outer most level.
There is a general mechanism to avoid special sequences from being interpreted: Some LaTeX commands have no equivalent in PreScriptbut are simply skipped at compilation time if immediately followed by an end-of-line: They should be defined in the preamble:. There is no way in PreScript to get an automatic numbering.
There is no equivalent to the LaTeX environment enumerate.
Hence, if one specifies that arguments of those functions should be ignored in the preamble of the LaTeX document, the numbering is emulated. PreScript and pack can be used for one-the-fly formating. There seems to be as many tastes as there are humans, so Nevertheless, here are some tips on how to design your PostScript styles. There are two PostScript instructions you might want to use in your new PostScript prologue: It defines the gray level used. Those three numbers are related to red, green and blue proportions used to designate a color.
Why not having used yacc and such There are several reasons why we decided not to use grammars to parse the files.
University of Manitoba – Information Services and Technology – Printing using the a2ps command
First it would have made the design of the style sheets much more tricky, and today pack would know only 4 or 5 languages. Third, mixing several parsers within one program is not easy.
Moreover, its size would have ten times what it is.