states/hl/cpp.st: Update C++ keyword list.
[enscript.git] / README
1
2                              GNU Enscript
3                              ============
4
5     SPECIAL NOTE TO ALL AMERICAN (USA) USERS.
6
7     Enscript's default output media (paper size) is A4.  It is *not*
8     Letter.  To change the default, give the configure script the
9     option `--with-media=Letter'.  It goes like this:
10
11       $ ./configure --with-media=Letter
12
13
14 GNU Enscript is a drop-in replacement for the enscript program.
15 Enscript converts ASCII files to PostScript and stores generated
16 output to a file or sends it directly to the printer.
17
18
19 Enscript is free software: you can redistribute it and/or modify
20 it under the terms of the GNU General Public License as published by
21 the Free Software Foundation, either version 3 of the License, or
22 (at your option) any later version.
23
24 Enscript is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27 GNU General Public License for more details.
28
29 You should have received a copy of the GNU General Public License
30 along with Enscript.  If not, see <http://www.gnu.org/licenses/>.
31
32 \f
33 * Configuring Enscript for your system
34
35 There are some options in enscript you might want to modify to meet
36 your system's needs.  You can change them all after the compilation by
37 editing the global configuration file `enscript.cfg' at the directory
38 `PREFIX/etc/'.  You can also change some of the during the `configure'
39 step by giving the configure script appropriate options.  Please,
40 check the following things before reporting bugs; for the most cases
41 these help:
42
43 ** Paper size
44
45   As a default enscript uses A4 paper.  To change default paper to be
46   for example `Letter', edit following line in the config file:
47
48     # Default output media.
49     DefaultMedia: A4
50
51     => DefaultMedia: Letter
52
53   You can also select the default paper size during the configuration
54   by giving the configure script option --with-media=MEDIA, where
55   media is one of the media listed in the `lib/enscript.cfg.in' file:
56   A3, A4, A5, Legal, Letter, A4dj or Letterdj.
57
58 ** Default output device
59
60   As a default (without any explicit options) enscript spools its
61   output to the printer.  If you want to send outputs to stdout, edit
62   following line:
63
64     # Where output goes as a default.
65     DefaultOutputMethod: printer
66
67     => DefaultOutputMethod: stdout
68
69 ** Printer command
70
71   Enscript's default printer command is `lpr'.  To change it to be for
72   example `lp', edit following line:
73
74     # Printer spooler command name.
75     Spooler: lpr
76
77     => Spooler: lp
78
79   You can also set the spooler command during the configuration by
80   giving the configure script option `--with-spooler=SPOOLER'.
81
82   On SystemV machines, you might also want to change the printer queue
83   name switch from `-P' to `-d':
84
85     # The spooler command switch to select the printer queue.
86     QueueParam: -P
87
88     => QueueParam: -d
89
90 ** PostScript language level
91
92   The PostScript language level that enscript uses for its output.
93   The default values is 2 (PostScript 2).  If your printer supports
94   only level 1 PostScript, you can set it to default by giving the
95   configure script option `--with-ps-level=1'.  You can also set the
96   level by editing the enscript.cfg file:
97
98     # The PostScript language level that enscript should use.
99     PostScriptLevel: 2
100
101     => PostScriptLevel: 1
102
103   Or, you can select it at the print time with the `--ps-level=LEVEL'
104   option:
105
106     $ enscript --ps-level=1 ...
107
108 \f
109 * Supported Character Sets
110
111 Enscript supports following character sets:
112
113   - ISO-8859-1          ISO Latin1 (default)
114   - ISO-8859-2          ISO Latin2
115   - ISO-8859-3          ISO Latin3
116   - ISO-8859-4          ISO Latin4
117   - ISO-8859-5          ISO Cyrillic
118   - ISO-8859-7          ISO Greek
119   - ascii               7 bit ascii
120   - ascii fi se         7 bit ascii with following encodings:
121                           '{'  = ä (adieresis)
122                           '|'  = ö (odieresis)
123                           '}'  = å (aring)
124                           '['  = Ä (Adieresis)
125                           '\\' = Ö (Odieresis)
126                           ']'  = Å (Aring)
127   - ascii dk no         7 bit ascii with following encodings:
128                           '{'  = æ (ae)
129                           '|'  = ø (oslash)
130                           '}'  = å (aring)
131                           '['  = Æ (AE)
132                           '\\' = Ø (Oslash)
133                           ']'  = Å (Aring)
134   - IBM/PC              standard PC/DOS character set
135   - Mac                 Macintosh character set
136   - VMS                 VMS multinational charset
137   - hp8                 HP Roman-8 charset
138   - koi8                Adobe Standard Cyrillic Font KOI8 charset
139   - ps                  PostScript font's default encoding
140   - pslatin1            PostScript interpreter's `ISOLatin1Encoding'
141
142 \f
143 * Special Escapes
144
145 Enscript supports special escapes sequences that can be used to add
146 simple page formatting commands to ASCII documents.  User can inline
147 EPS files, change font on-the-fly insert comments and shade regions of
148 text.  See file README.ESCAPES for details.
149
150 \f
151 * Language sensitive highlighting
152
153 Enscript supports language sensitive code highlighting.  Highlighting
154 is implemented by a special `states' program which processes the input
155 files and annotates them with enscript's special escapes.  The states
156 definition file `enscript.st' is a machine independent ASCII file and
157 it can be updated without re-compilation of the enscript program.  The
158 most recent version of this file can be downloaded from the GNU
159 enscript WWW home page: <http://www.gnu.org/software/enscript/>.
160
161 New highlighting definitions for different languages are welcome,
162 please send them to: <bug-enscript@gnu.org>
163
164 \f
165 * PostScript font support
166
167 ** AFM files
168
169 Enscript supports AFM (Adobe Font Metrics) files.  AFM files contain
170 font metrics information (character widths, etc); if there is an AFM
171 file for the current font, enscript can count line widths and tab
172 stops correctly.  Enscript distribution contains AFM files for the
173 most common PostScript fonts.  These AFM files are installed to the
174 directory <prefix>/share/enscript/.
175
176 ** Fonts (.pfa or .pfb)
177
178 Enscript supports also additional PostScript fonts which are defined
179 in the `.pfa' or `.pfb' font files.  Enscript automatically
180 down-loads font's description to your PostScript document whenever you
181 use an external disk font.  Font down-loading requires that you have
182 both the `.afm' and `.pf{a,b}' files for you extra fonts and you have
183 created a font mapping file called `font.map' to your font directory.
184
185 These are the steps that are needed to make your extra fonts usable in
186 enscript:
187
188 1) Install the `.afm' and `.pf{a,b}' files to some appropriate
189    directory.  Note! for a single font, both the .afm and .pf{a,b}
190    files must have  the same prefix, filenames can differ only from
191    the suffix part.  For example, if font `FooFont' is defined in the
192    file `foo.pfa', then the AFM file must be named `foo.afm'.
193
194 2) Create a font map file for the font directory.  Enscript's
195    distribution has an utility called `mkafmmap' which does the job;
196    just give command:
197
198         mkafmmap *.afm
199
200    in your font directory.  This command creates a file called
201    `font.map' to your font directory.  File contains one row for each
202    .afm file, each row has two columns: font's PostScript name and
203    the prefix for the corresponding .afm file.
204
205 3) Notify enscript that it has new fonts to play with.  This is done
206    by editing the global configuration file `enscript.cfg' or the
207    personal configuration file `$HOME/.enscriptrc'.  Global
208    configuration file has an entry called 'AFMPath' which contains the
209    current font search path.  Add your new font directory to this
210    path:
211
212         AFMPath: /usr/local/share/enscript/afm:/usr/local/lib/ps:/usr/lib/ps:/fonts/myfontdir
213
214   where `/fonts/myfontdir' is the new font directory.
215
216 So how does the font down-loading work?  Enscript automatically
217 down-loads font files for header and body fonts, if it can find the
218 corresponding `.pfa' or `.pfb' files from the AFMPath.  Enscript do
219 *not* down-load fonts that are specified in `^@font' escapes, however
220 you can down-load these font by specifying command line option
221 `--download-font=name' for each font.  You can also specify
222 down-loadable fonts in the global configuration file `enscript.cfg'
223 or in your personal configuration file `$HOME/.enscriptrc' by giving
224 option `DownloadFont: name'.
225
226 \f
227 * What's different as compared to the Adobe's Enscript application?
228
229 - Adobe enscript's option `-o' has been changed.  In Adobe enscript
230   option `-o' lists missing characters.  In GNU enscript `-o' is an
231   alias for `-p' and missing characters are listed with an option `-O'.
232