states/main.c: Use PACKAGE_STRING to produce version string.
[enscript.git] / docs / enscript.man
1 .\"
2 .\" GNU enscript manual page.
3 .\" Copyright (c) 1995-1999 Markku Rossi.
4 .\" Author: Markku Rossi <mtr@iki.fi>
5 .\"
6 .\"
7 .\" This file is part of GNU enscript.
8 .\"
9 .\" This program is free software; you can redistribute it and/or modify
10 .\" it under the terms of the GNU General Public License as published by
11 .\" the Free Software Foundation; either version 2, or (at your option)
12 .\" any later version.
13 .\"
14 .\" This program is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public License
20 .\" along with this program; see the file COPYING.  If not, write to
21 .\" the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 .\" Boston, MA 02110-1301, USA.
23 .\"
24 .TH ENSCRIPT 1 "Mar 12, 1999" "ENSCRIPT" "ENSCRIPT"
25
26 .SH NAME
27 enscript \- convert text files to PostScript, HTML, RTF, ANSI, and
28 overstrikes
29
30 .SH SYNOPSIS
31 .B enscript
32 [\f3\-123456789BcgGhjkKlmOqrRvVzZ\f1]
33 [\f3\-# \f2copies\f1]
34 [\f3\-a \f2pages\f1]
35 [\f3\-A \f2align\f1]
36 [\f3\-b \f2header\f1]
37 [\f3\-C\f1[\f2start_line\f1]]
38 [\f3\-d \f2printer\f1]
39 [\f3\-D \f2key\f1[\f3:\f2value\f1]]
40 [\f3\-e\f1[\f2char\f1]]
41 [\f3\-E\f1[\f2lang\f1]]
42 [\f3\-f \f2font\f1]
43 [\f3\-F \f2header_font\f1]
44 [\f3\-H\f1[\f2num\f1]]
45 [\f3\-i \f2indent\f1]
46 [\f3\-I \f2filter\f1]
47 [\f3\-J \f2title\f1]
48 [\f3\-L \f2lines_per_page\f1]
49 [\f3\-M \f2media\f1]
50 [\f3\-n \f2copies\f1]
51 [\f3\-N \f2newline\f1]
52 [\f3\-o \f2outputfile\f1]
53 [\f3\-o \-\f1]
54 [\f3\-p \f2outputfile\f1]
55 [\f3\-p \-\f1]
56 [\f3\-P \f2printer\f1]
57 [\f3\-s \f2baselineskip\f1]
58 [\f3\-S \f2key\f1[\f3:\f2value\f1]]
59 [\f3\-t \f2title\f1]
60 [\f3\-T \f2tabsize\f1]
61 [\f3\-u\f1[\f2text\f1]]
62 [\f3\-U \f2num\f1]
63 [\f3\-W \f2language\f1]
64 [\f3\-X \f2encoding\f1]
65 [\f2filename\f1 ...]
66
67 .SH DESCRIPTION
68
69 \f3Enscript\f1 converts text files to PostScript or to other output
70 languages.  \f3Enscript\f1 can spool the generated output directly to
71 a specified printer or leave it to a file.  If no input files are
72 given, \f3enscript\f1 processes the standard input \f3stdin\f1.
73 \f3Enscript\f1 can be extended to handle different output media and it
74 has many options which can be used to customize the printouts.
75
76 .SH OPTIONS
77 .TP 8
78 .B \-# \f2num\f3
79 Print \f2num\f1 copies of each page.
80 .TP 8
81 .B \-1, \-2, \-3, \-4, \-5, \-6, \-7, \-8, \-9, \-\-columns=\f2num\f3
82 Specify how many columns each page have.  With the long option
83 \f3\-\-columns=\f2num\f1 you can specify more than 9 columns per page.
84 .TP 8
85 .B \-a \f2pages\f3, \-\-pages=\f2pages\f3
86 Specify which pages are printed.  The page specification \f2pages\f1
87 can be given in the following formats:
88 .RS 8
89 .TP 8
90 \f2begin\f1\-\f2end\f1
91 print pages from \f2begin\f1 to \f2end\f1
92 .TP 8
93 \-\f2end\f1
94 print pages from 0 to \f2end\f1
95 .TP 8
96 \f2begin\f1\-
97 print pages from \f2begin\f1 to end
98 .TP 8
99 \f2page\f1
100 print page \f2page\f1
101 .TP 8
102 odd
103 print odd pages
104 .TP 8
105 even
106 print even pages
107 .RE
108 .TP 8
109 .B \-A \f2align\f3, \-\-file\-align=\f2align\f3
110 Align separate input files to even \f2align\f1 page count.  This
111 option is useful in two-side and 2-up printings (\-\-file\-align=2).
112 .TP 8
113 .B \-b \f2header\f3, \-\-header=\f2header\f3
114 Use the text \f2header\f1 as a page header.  The default page header
115 is constructed from the name of the file and from its last
116 modification time.
117
118 The header string \f2header\f1 can contain the same formatting escapes
119 which can be specified for the \f3%Format\f1 directives in the user
120 defined fancy headers.  For example, the following option prints the
121 file name, current data and page numbers:
122
123 \f3enscript \-\-header='$n %W Page $% of $=' *.c\f1
124
125 The header string can also contain left, center and right justified
126 fields.  The fields are separated by the \f3'|'\f1 character:
127
128 \f3enscript \-\-header='$n|%W|Page $% of $=' *.c\f1
129
130 now the file name is printed left justified, the date is centered to
131 the header and the page numbers are printed right justified.
132 .TP 8
133 .B \-B, \-\-no\-header
134 Do not print page headers.
135 .TP 8
136 .B \-c, \-\-truncate\-lines
137 Cut lines that are too long for the page.  As a default,
138 \f3enscript\f1 wraps long lines to the next line so no information is
139 lost.
140
141 You can also use the \f3\-\-slice\f1 option which slices long lines to
142 separate pages.
143 .TP 8
144 .B \-C\f1[\f2start_line\f1]\f3, \-\-line\-numbers\f1[\f3=\f2start_line\f1]\f3
145 Precede each line with its line number.  The optional argument
146 \f2start_line\f1 specifies the number of the first line in the input.
147 The number of the first line defaults to 1.
148 .TP 8
149 .B \-d \f2name\f3
150 Spool output to the printer \f2name\f1.
151 .TP 8
152 .B \-D \f2key\f1[\f3:\f2value\f1]\f3, \-\-setpagedevice=\f2key\f1[\f3:\f2value\f1]\f3
153 Pass a page device definition to the generated PostScript output.  If
154 no value is given, the key \f2key\f1 is removed from the definitions.
155
156 For example, the command
157
158 .B enscript \-DDuplex:true foo.txt
159
160 prints file foo.txt in duplex (two side) mode.
161
162 Page device operators are implementation dependant but they are
163 standardized.  See section \f3PAGE DEVICE OPTIONS\f1 for the details.
164 .TP 8
165 .B \-e\f1[\f2char\f1]\f3, \-\-escapes\f1[\f3=\f2char\f1]\f3
166 Enable special escapes interpretation (see section \f3SPECIAL
167 ESCAPES\f1).  If the argument \f2char\f1 is given, it changes the
168 escape character to \f2char\f1.  The default escape character is 0.
169 .TP 8
170 .B \-E\f1[\f2lang\f1]\f3, \-\-highlight\f1[\f3=\f2lang\f1]\f3
171 Highlight source code by creating a special input filter with the
172 \f3states\f1 program.  The optional argument \f2lang\f1 specifies the
173 language to highlight.  As a default the \f3states\f1 makes an
174 educated guess.
175
176 You can print a short description of the supported highlighting
177 languages and file formats with the command:
178
179 .B enscript \-\-help\-highlight
180
181 The highlighting rules are defined in the
182 `@DATADIR@/enscript/st/*.st' files which can be edited to create
183 highlighting definitions for new languages.
184
185 \f3Note!\f1 You can not use your own input filters with this option.
186 .TP 8
187 .B \-f \f2name\f3, \-\-font=\f2name\f3
188 Select a font that is used for the body text.  The default body font is
189 \f3Courier10\f1, unless multicolumn landscape printing mode is
190 selected, in which case the default font is \f3Courier7\f1.
191
192 The font specification \f2name\f1 contains two parts: the name of the
193 font and its size in PostScript points.  For example,
194 "\f3Times\-Roman12\f1" selects the "Times\-Roman" font with size
195 12pt.
196
197 The font specification \f2name\f1 can also be given in format
198 `\f2name\f1@\f2ptsize\f1', where the name of the font and its point
199 size are separated by a `@' character.  This allows \f3enscript\f1 to use
200 fonts which contain digit characters in their names.
201
202 The font point size can also be given in the format
203 \f2width\f1/\f2height\f1 where the \f2width\f1 and the \f2height\f1
204 specify the size of the font in x- and y-directions.  For example,
205 "\f3Times\-Roman@10/12\f1" selects a 10 points wide and 12 points high
206 "Times\-Roman" font.
207
208 You can also give the font sizes as decimal numbers.  For example,
209 "\f3Times\-Roman10.2\f1" selects a 10.2pt "Times\-Roman" font.
210 .TP 8
211 .B \-F \f2name\f3, \-\-header\-font=\f2name\f3
212 Select a font for the header texts.
213 .TP 8
214 .B \-g, \-\-print\-anyway
215 Print a file even if it contains binary data.  The option is
216 implemented only for compatibility purposes.  \f3Enscript\f1 prints
217 binary files anyway regardless of the option.
218 .TP 8
219 .B \-G, \-\-fancy\-header\f1[\f3=\f2name\f1]\f3
220 Print a fancy page header \f2name\f1 to the top of each page.  The
221 option \f3\-G\f1 specifies the default fancy header.  See section
222 \f3CONFIGURATION FILES\f1 to see how the default fancy header can be
223 changed.
224 .TP 8
225 .B \-h, \-\-no\-job\-header
226 Suppress printing of the job header page.
227 .TP 8
228 .B \-H\f1[\f2num\f1]\f3, \-\-highlight\-bars\f1[\f3=\f2num\f1]\f3
229 Specify how high the highlight bars are in lines.  If the \f2num\f1 is
230 not given, the default value 2 is used.  As a default, no highlight bars
231 are printed.
232 .TP 8
233 .B \-i \f2num\f3, \-\-indent=\f2num\f3
234 Indent every line \f2num\f1 characters.  The indentation can also be
235 specified in other units by appending an unit specifier after the
236 number.  The possible unit specifiers and the corresponding units are:
237 .RS 8
238 .TP 8
239 .B c
240 centimeters
241 .TP 8
242 .B i
243 inches
244 .TP 8
245 .B l
246 characters (default)
247 .TP 8
248 .B p
249 PostScript points
250 .RE
251 .TP 8
252 .B \-I \f2filter\f3, \-\-filter=\f2filter\f1
253 Read all input files through an input filter \f2filter\f1.  The input
254 filter can be a single command or a command pipeline.  The filter can
255 refer to the name of the input file with the escape `\f3%s\f1'.  The
256 name of the standard input can be changed with the option
257 `\f3\-\-filter\-stdin\f1'.
258
259 For example, the following command prints the file `foo.c' by using
260 only upper-case characters:
261
262 .B enscript \-\-filter="cat %s | tr 'a-z' 'A-Z'" foo.c
263
264 The following command highlights changes which are made to files since
265 the last checkout:
266
267 .B enscript \-\-filter="rcsdiff %s | diffpp %s" \-e *.c
268
269 To include the string "%s" to the filter command, you must write it as
270 "%%s".
271 .TP 8
272 .B \-j, \-\-borders
273 Print borders around columns.
274 .TP 8
275 .B \-J \f2title\f3
276 An alias for the option \f3\-t\f1, \f3\-\-title\f1.
277 .TP 8
278 .B \-k, \-\-page\-prefeed
279 Enable page prefeed.
280 .TP 8
281 .B \-K, \-\-no\-page\-prefeed
282 Disable page prefeed (default).
283 .TP 8
284 .B \-l, \-\-lineprinter
285 Emulate lineprinter.  This option is a shortcut for the options
286 \f3\-\-lines\-per\-page=66\f1, and \f3\-\-no\-header\f1.
287 .TP 8
288 .B \-L \f2num\f3, \-\-lines\-per\-page=\f2num\f3
289 Print only \f2num\f1 lines for each page.  As a default, the number of
290 lines per page is computed from the height of the page and from the
291 size of the font.
292 .TP 8
293 .B \-m, \-\-mail
294 Send a mail notification to user after the print job has been
295 completed.
296 .TP 8
297 .B \-M \f2name\f3, \-\-media=\f2name\f3
298 Select an output media \f2name\f1.  \f3Enscript\f1's default output
299 media is \f3@media@\f1.
300 .TP 8
301 .B \-n \f2num\f3, \-\-copies=\f2num\f3
302 Print \f2num\f1 copies of each page.
303 .TP 8
304 .B \-N \f2nl\f3, \-\-newline=\f2nl\f3
305 Select the \f2newline\f1 character.  The possible values for \f2nl\f1
306 are: \f3n\f1 (unix newline, 0xa hex) and \f3r\f1 (mac newline, 0xd hex).
307 .TP 8
308 .B \-o \f2file\f3
309 An alias for the option \f3\-p\f1, \f3\-\-output\f1.
310 .TP 8
311 .B \-O, \-\-missing\-characters
312 Print a listing of character codes which couldn't be printed.
313 .TP 8
314 .B \-p \f2file\f3, \-\-output=\f2file\f3
315 Leave the output to file \f2file\f1.  If the \f2file\f1 is `\-',
316 enscript sends the output to the standard output \f3stdout\f1.
317 .TP 8
318 .B \-P \f2name\f3, \-\-printer=\f2name\f3
319 Spool the output to the printer \f2name\f1.
320 .TP 8
321 .B \-q, \-\-quiet, \-\-silent
322 Make \f3enscript\f1 really quiet.  Only fatal error messages are
323 printed to \f2stderr\f1.
324 .TP 8
325 .B \-r, \-\-landscape
326 Print in the landscape mode; rotate page 90 degrees.
327 .TP 8
328 .B \-R, \-\-portrait
329 Print in the portrait mode (default).
330 .TP 8
331 .B \-s \f2num\f3, \-\-baselineskip=\f2num\f3
332 Specify the baseline skip in PostScript points.  The number \f2num\f1
333 can be given as a decimal number.  When \f3enscript\f1 moves from line
334 to line, the current point \f2y\f1 coordinate is moved (\f2font point
335 size + baselineskip\f1) points down.  The default baseline skip is 1.
336 .TP 8
337 .B \-S \f2key\f1[\f3:\f2value\f1]\f3, \-\-statusdict=\f2key\f1[\f3:\f2value\f1]\f3
338 Pass a statusdict definition to the generated PostScript output.  If
339 no value is given, the key \f2key\f1 is removed from the definitions.
340
341 The statusdict operators are implementation dependant; see the
342 printer's documentation for the details.
343
344 For example, the command
345
346 .B enscript \-Ssetpapertray:1 foo.txt
347
348 prints the file \f2foo.txt\f1 by using paper from the paper tray 1
349 (assuming that the printer supports paper tray selection).
350 .TP 8
351 .B \-t \f2title\f3, \-\-title=\f2title\f3
352 Set banner page's job title to \f2title\f1.  The option sets also the
353 name of the input file \f3stdin\f1.
354 .TP 8
355 .B \-T \f2num\f3, \-\-tabsize=\f2num\f3
356 Set the tabulator size to \f2num\f1 characters.  The default is 8.
357 .TP 8
358 .B \-u\f1[\f2text\f1]\f3, \-\-underlay\f1[\f3=\f2text\f1]\f3
359 Print the string \f2text\f1 under every page.  The properties of the
360 text can be changed with the options \f3\-\-ul\-angle\f1,
361 \f3\-\-ul\-font\f1, \f3\-\-ul\-gray\f1, \f3\-\-ul\-position\f1, and
362 \f3\-\-ul\-style\f1.
363
364 If no \f2text\f1 is given, the underlay is not printed.  This can be used
365 to remove an underlay text that was specified with the
366 `\f3Underlay\f1' configuration file option.
367 .TP 8
368 .B \-U \f2num\f3, \-\-nup=\f2num\f3
369 Print \f2num\f1 logical pages on each output page (N\-up printing).
370 The values \f2num\f1 must be a power of 2.
371 .TP 8
372 .B \-v, \-\-verbose\f1[\f3=\f2level\f1]\f3
373 Tell what \f3enscript\f1 is doing.
374 .TP 8
375 .B \-V, \-\-version
376 Print \f3enscript\f1 version information and exit.
377 .TP 8
378 .B \-W \f1[\f2lang\f1]\f3, \-\-language\f1[\f3=\f2lang\f1]\f3
379 Generate output for the language \f2lang\f1.  The possible values for
380 \f2lang\f1 are:
381 .RS 8
382 .TP 8
383 .B PostScript
384 generate PostScript (default)
385 .TP 8
386 .B html
387 generate HTML
388 .TP 8
389 .B overstrike
390 generate overstrikes (line printers, less)
391 .TP 8
392 .B rtf
393 generate RTF (Rich Text Format)
394 .TP 8
395 .B ansi
396 generate ANSI terminal control codes
397 .RE
398 .TP 8
399 .B \-X \f2name\f3, \-\-encoding=\f2name\f3
400 Use the input encoding \f2name\f1.  Currently \f3enscript\f1 supports
401 the following encodings:
402 .RS 8
403 .TP 8
404 .B 88591, latin1
405 ISO\-8859\-1 (ISO Latin1) (\f3enscript\f1's default encoding).
406 .TP 8
407 .B 88592, latin2
408 ISO\-8859\-2 (ISO Latin2)
409 .TP 8
410 .B 88593, latin3
411 ISO\-8859\-3 (ISO Latin3)
412 .TP 8
413 .B 88594, latin4
414 ISO\-8859\-4 (ISO Latin4)
415 .TP 8
416 .B 88595, cyrillic
417 ISO\-8859\-5 (ISO Cyrillic)
418 .TP 8
419 .B 88597, greek
420 ISO\-8859\-7 (ISO Greek)
421 .TP 8
422 .B 88599, latin5
423 ISO\-8859\-9 (ISO Latin5)
424 .TP 8
425 .B 885910, latin6
426 ISO\-8859\-10 (ISO Latin6)
427 .TP 8
428 .B ascii
429 7\-bit ascii
430 .TP 8
431 .B asciifise, asciifi, asciise
432 7\-bit ascii with some scandinavian (Finland, Sweden) extensions
433 .TP 8
434 .B asciidkno, asciidk, asciino
435 7\-bit ascii with some scandinavian (Denmark, Norway) extensions
436 .TP 8
437 .B ibmpc, pc, dos
438 IBM PC charset
439 .TP 8
440 .B mac
441 Mac charset
442 .TP 8
443 .B vms
444 VMS multinational charset
445 .TP 8
446 .B hp8
447 HP Roman-8 charset
448 .TP 8
449 .B koi8
450 Adobe Standard Cyrillic Font KOI8 charset
451 .TP 8
452 .B ps, PS
453 PostScript font's default encoding
454 .TP 8
455 .B pslatin1, ISOLatin1Encoding
456 PostScript interpreter's `ISOLatin1Encoding'
457 .RE
458 .TP 8
459 .B \-z, \-\-no\-formfeed
460 Turn off the form feed character interpretation.
461 .TP 8
462 .B \-Z, \-\-pass\-through
463 Pass through all PostScript and PCL files without any modifications.
464 This allows that \f3enscript\f1 can be used as a lp filter.
465
466 The PostScript files are recognized by looking up the `%!' magic
467 cookie from the beginning of the file. \f3Note!\f1 \f3Enscript\f1
468 recognized also the Windoze damaged `^D%!' cookie.
469
470 The PCL files are recognized by looking up the `^[E' or `^[%' magic
471 cookies from the beginning of the file.
472 .TP 8
473 .B \-\-color\f1[\f3=\f2bool\f1]\f3
474 Use colors in the highlighting outputs.
475 .TP 8
476 .B \-\-download\-font=\f2fontname\f3
477 Include the font description file (\f2.pfa\f1 or \f2.pfb\f1 file) of
478 the font \f2fontname\f1 to the generated output.
479 .TP 8
480 .B \-\-extended\-return\-values
481 Enable extended return values.  As a default, \f3enscript\f1 returns 1
482 on error and 0 otherwise.  The extended return values give more
483 details about the printing operation.  See the section \f3RETURN
484 VALUE\f1 for the details.
485 .TP 8
486 .B \-\-filter\-stdin=\f2name\f1
487 Specify how the \f3stdin\f1 is shown to the input filter.  The default
488 value is an empty string ("") but some programs require that the
489 \f3stdin\f1 is called something else, usually "-".
490 .TP 8
491 .B \-\-footer=\f2footer\f3
492 Use the text \f2footer\f1 as a page footer.  Otherwise the option
493 works like the \f3\-\-header\f1 option
494 .TP 8
495 .B \-\-h\-column\-height=\f2height\f3
496 Set the horizontal column height to be \f2height\f1 PostScript
497 points.  The option sets the formfeed type to
498 \f3horizontal\-columns\f1.
499 .TP 8
500 .B \-\-help
501 Print a short help message and exit.
502 .TP 8
503 .B \-\-help\-highlight
504 Describe all supported \f3\-\-highlight\f1 languages and file
505 formats.
506 .TP 8
507 .B \-\-highlight\-bar\-gray=\f2gray\f3
508 Specify the gray level which is used in printing the highlight bars.
509 .TP 8
510 .B \-\-list\-media
511 List the names of all known output media and exit successfully.
512 .TP 8
513 .B \-\-margins=\f2left\f3:\f2right\f3:\f2top\f3:\f2bottom\f3
514 Adjust the page marginals to be exactly \f2left\f1, \f2right\f1, \f2top\f1
515 and \f2bottom\f1 PostScript points.  Any of the arguments can be left
516 empty in which case the default value is used.
517 .TP 8
518 .B \-\-mark\-wrapped\-lines\f1[\f3=\f2style\f1]\f3
519 Mark wrapped lines in the output with the style \f2style\f1.  The
520 possible values for the \f2style\f1 are:
521 .RS 8
522 .TP 8
523 .B none
524 do not mark them (default)
525 .TP 8
526 .B plus
527 print a plus (+) character to the end of each wrapped line
528 .TP 8
529 .B box
530 print a black box to the end of each wrapped line
531 .TP 8
532 .B arrow
533 print a small arrow to the end of each wrapped line
534 .RE
535 .TP 8
536 .B \-\-non\-printable\-format=\f2format\f3
537 Specify how the non-printable characters are printed.  The possible
538 values for the \f2format\f1 are:
539 .RS 8
540 .TP 8
541 .B caret
542 caret notation: `^@', `^A', `^B', ...
543 .TP 8
544 .B octal
545 octal notation: `\\000', `\\001', `\\002', ... (default)
546 .TP 8
547 .B questionmark
548 replace non-printable characters with a question mark `?'
549 .TP 8
550 .B space
551 replace non-printable characters with a space ` '
552 .RE
553 .TP 8
554 .B \-\-nup\-columnwise
555 Change the layout of the sub-pages in the N\-up printing from row-wise
556 to columnwise.
557 .TP 8
558 .B \-\-nup\-xpad=\f2num\f3
559 Set the page x-padding of the \f2n\f1-up printing to \f2num\f1
560 PostScript points.  The default is 10 points.
561 .TP 8
562 .B \-\-nup\-ypad=\f2num\f3
563 Set the page y-padding of the \f2n\f1-up printing to \f2num\f1
564 PostScript points.  The default is 10 points.
565 .TP 8
566 .B \-\-page\-label\-format=\f2format\f3
567 Set the page label format to \f2format\f1.  The page label format
568 specifies how the labels for the `%%Page:' PostScript comments are
569 formatted.  The possible values are:
570 .RS 8
571 .TP 8
572 .B short
573 Print the current pagenumber: `%%Page: (1) 1' (default)
574 .TP 8
575 .B long
576 Print the current filename and pagenumber: `%%Page: (main.c:  1) 1'
577 .RE
578 .TP 8
579 .B \-\-ps\-level=\f2level\f3
580 Set the PostScript language level that \f3enscript\f1 uses for its
581 output to \f2level\f1.  The possible values are \f31\f1, and
582 \f32\f1.
583 .TP 8
584 .B \-\-printer\-options=\f2options\f3
585 Pass extra options to the printer command.
586 .TP 8
587 .B \-\-rotate\-even\-pages
588 Rotate each even\-numbered page 180 degrees.
589 .TP 8
590 .B \-\-slice=\f2num\f3
591 Print the vertical slice \f2num\f1.  The slices are vertical regions
592 of input files.  A new slice starts from the point where the line
593 would otherwise be wrapped to the next line.  The slice numbers start
594 from 1.
595 .TP 8
596 .B \-\-style=\f2style\f3
597 Set the highlighting style to \f2style\f1.  The possible values are:
598 \f3a2ps\f1, \f3emacs\f1, \f3emacs-verbose\f1, \f3ifh\f1, and
599 \f3msvc\f1.
600 .TP 8
601 .B \-\-swap\-even\-page\-margins
602 Swap left and right page margins for even\-numbered pages.
603 .TP 8
604 .B \-\-toc
605 Print a table of contents to the end of the output.
606 .TP 8
607 .B \-\-word\-wrap
608 Wrap long lines from word boundaries.
609 .TP 8
610 .B \-\-ul\-angle=\f2angle\f3
611 Set the angle of the underlay text to \f2angle\f1.  As a default,
612 the angle is \f3atan(\-d_page_h, d_page_w)\f1.
613 .TP 8
614 .B \-\-ul\-font=\f2name\f3
615 Select a font for the underlay text.  The default underlay font is
616 \f3Times-Roman200\f1.
617 .TP 8
618 .B \-\-ul\-gray=\f2num\f3
619 Print the underlay text with the gray value \f2num\f1 (0 ... 1), the
620 default gray value is .8.
621 .TP 8
622 .B \-\-ul\-position=\f2position_spec\f3
623 Set the underlay text's starting position according to the
624 \f2position_spec\f1.  The position specification must be given in
625 format: `\f2sign\f1 \f2xpos\f1 \f2sign\f1 \f2ypos\f1', where the
626 \f2sign\f1 must be `+' or `-'.  The positive dimensions are measured
627 from the lower left corner and the negative dimensions from the upper
628 right corner.  For example, the specification `+0-0' specifies the
629 upper left corner and `-0+0' specifies the lower right corner.
630 .TP 8
631 .B \-\-ul\-style=\f2style\f3
632 Set the underlay text's style to \f2style\f1.  The possible values for
633 \f2style\f1 are:
634 .RS 8
635 .TP 8
636 .B outline
637 print outline underlay texts (default)
638 .TP 8
639 .B filled
640 print filled underlay texts
641 .RE
642
643 .SH CONFIGURATION FILES
644
645 .B Enscript
646 reads configuration information from the following sources (in this
647 order): command line options, environment variable \f3ENSCRIPT\f1,
648 user's personal configuration file (\f3$HOME/.enscriptrc\f1), site
649 configuration file (\f3@SYSCONFDIR@/enscriptsite.cfg\f1) and system's
650 global configuration file (\f3@SYSCONFDIR@/enscript.cfg\f1).
651
652 The configuration files have the following format:
653
654 Empty lines and lines starting with `#' are comments.
655
656 All other lines are option lines and have format:
657
658 \f2option\f1 [\f2arguments ...\f1].
659
660 The following options can be specified:
661 .TP 8
662 .B AcceptCompositeCharacters: \f2bool\f1
663 Specify whether PostScript font's composite characters are accepted
664 as printable or if they should be considered as non-existent.  The
665 default value is false (0).
666 .TP 8
667 .B AFMPath: \f2path\f3
668 Specifies the search path for the \f2AFM\f1 files.
669 .TP 8
670 .B AppendCtrlD: \f2bool\f3
671 Specify if the Control-D (^D) character should be appended to the end
672 of the output.  The default value is false (0).
673 .TP 8
674 .B Clean7Bit: \f2bool\f3
675 Specify how characters greater than 127 are printed.  The valuee true
676 (1) generates 7-bit clean code by escaping all characters greater than
677 127 to the backslash-octal notation (default).  The value false (0)
678 generates 8-bit PostScript code leaving all characters untouched.
679 .TP 8
680 .B DefaultEncoding: \f2name\f3
681 Select the default input encoding.  The encoding name \f2name\f1 can
682 be one of the values of the option \f3\-X\f1, \f3\-\-encoding\f1.
683 .TP 8
684 .B DefaultFancyHeader: \f2name\f3
685 Select the default fancy header.  The default header is used when the
686 option \f3\-G\f1 is specified or the option \f3\-\-fancy\-header\f1 is
687 given without an argument.  The system\-wide default is `\f3enscript\f1'.
688 .TP 8
689 .B DefaultMedia: \f2name\f3
690 Select the default output media.
691 .TP 8
692 .B DefaultOutputMethod: \f2method\f3
693 Select the default target to which the generated output is sent.
694 The possible values for the \f2method\f1 are:
695 .RS 8
696 .TP 8
697 .B printer
698 send output to printer (default)
699 .TP 8
700 .B stdout
701 send output to \f3stdout\f1
702 .RE
703 .TP 8
704 .B DownloadFont: \f2fontname\f3
705 Include the font description file of the font \f2fontname\f1 to the
706 generated output.
707 .TP 8
708 .B EscapeChar: \f2num\f3
709 Specify the escape character for the special escapes.  The default
710 value is 0.
711 .TP 8
712 .B FormFeedType: \f2type\f3
713 Specify what to do when a formfeed character is encountered from the
714 input.  The possible values for \f2type\f1 are:
715 .RS 8
716 .TP 8
717 .B column
718 move to the beginning of the next column (default)
719 .TP 8
720 .B page
721 move to the beginning of the next page
722 .RE
723 .TP 8
724 .B GeneratePageSize: \f2bool\f3
725 Specify whether the \f3PageSize\f1 page device setting is generated to
726 the PostScript output.  The default value is true (1).
727 .TP 8
728 .B HighlightBarGray: \f2gray\f3
729 Specify the gray level which is used to print the highlight bars.
730 .TP 8
731 .B HighlightBars: \f2num\f3
732 Specify how high the highlight bars are in lines.  The default value
733 is 0 which means that no highlight bars are printed.
734 .TP 8
735 .B LibraryPath: \f2path\f3
736 Specifies the \f3enscript\f1's library path that is used to lookup
737 various resources.  The default path is:
738 `@DATADIR@/enscript:\f2home\f1/.enscript'.  Where the \f2home\f1 is
739 the user's home directory.
740 .TP 8
741 .B MarkWrappedLines: \f2style\f3
742 Mark wraped lines in the output with the style \f2style\f1.  The
743 possible values for the \f2format\f1 are the same which can be given
744 for the \f3\-\-mark\-wrapped\-lines\f1 option.
745 .TP 8
746 \f3Media: \f2name\f3 \f2width\f3 \f2height\f3 \f2llx\f3 \f2lly\f3 \f2urx\f3 \f2ury\f3
747 Add a new output media with the name \f2name\f1.  The physical
748 dimensions of the media are \f2width\f1 and \f2height\f1.  The
749 bounding box of the Media is specified by the points (\f2llx\f1,
750 \f2lly\f1) and (\f2urx\f1, \f2ury\f1).  \f3Enscript\f1 prints all
751 graphics inside the bounding box of the media.
752
753 User can select this media with option \f3\-M \f2name\f1.
754 .TP 8
755 .B NoJobHeaderSwitch: \f2switch\f1
756 Specify the spooler option to suppress the print job header page.
757 This option is passed to the printer spooler when the \f3enscript\f1's
758 option \f3\-h\f1, \f3\-\-no\-job\-header\f1 is selected.
759 .TP 8
760 .B NonPrintableFormat: \f2format\f1
761 Specify how the non-printable characters are printed.  The possible
762 values for \f2format\f1 are the same which can be given for the
763 \f3\-\-non\-printable\-format\f1 option.
764 .TP 8
765 .B OutputFirstLine: \f2line\f1
766 Set the PostScript output's first line to \f2line\f1.  The default
767 value is \f3PS-Adobe-3.0\f1.  Since some printers do not like DSC
768 levels greater than 2.0, this option can be used to change the output
769 first line to something more suitable like \f3%!PS-Adobe-2.0\f1 or
770 \f3%!\f1.
771 .TP 8
772 .B PageLabelFormat: \f2format\f1
773 Set the page label format to \f2format\f1.  The possible values for
774 \f2format\f1 are the same which can be given for the
775 \f3\-\-page\-label\-format\f1 option.
776 .TP 8
777 .B PagePrefeed: \f2bool\f3
778 Enable / disable page prefeed.  The default value is false (0).
779 .TP 8
780 .B PostScriptLevel: \f2level\f3
781 Set the PostScript language level, that \f3enscript\f1 uses for its
782 output, to \f2level\f1.  The possible values for \f2level\f1 are the
783 same which can be given for the \f3\-\-ps\-level\f1 option.
784 .TP 8
785 .B Printer: \f2name\f3
786 Names the printer to which the output is spooled.
787 .TP 8
788 .B QueueParam: \f2name\f3
789 The spooler command switch to select the printer queue, e.g. \f3\-P\f1
790 in \f3lpr \-Pps\f1.  This option can also be used to pass other flags
791 to the spooler command.  These options must be given before the queue
792 switch.
793 .TP 8
794 .B SetPageDevice: \f2key\f1[\f3:\f2value\f1]\f3
795 Pass a page device definition to the generated PostScript output.
796 .TP 8
797 .B Spooler: \f2name\f3
798 Names the printer spooler command.  \f3Enscript\f1 pipes generated
799 PostScript to the command \f2name\f1.
800 .TP 8
801 .B StatesBinary: \f2path\f3
802 Define an absolute path to the \f3states\f1 program.
803 .TP 8
804 .B StatesColor: \f2bool\f3
805 Should the \f3states\f1 program generate color outputs.
806 .TP 8
807 .B StatesConfigFile: \f2file\f3
808 Read highlighting states configuration from the file \f2file\f1.  The
809 default config file is `@DATADIR@/enscript/hl/enscript.st'.
810 .TP 8
811 .B StatesHighlightStyle: \f2style\f3
812 Set the highlight style to \f2style\f1.
813 .TP 8
814 .B StatesPath: \f2path\f3
815 Define the path for the \f3states\f1 program.  The \f3states\f1
816 program will lookup its state definition files from this path.  The
817 default value is `$HOME/.enscript:@DATADIR@/enscript/hl'.
818 .TP 8
819 .B StatusDict: \f2key\f1[\f3:\f2value\f1]\f3
820 Pass a statusdict definition to the generated PostScript output.
821 .TP 8
822 .B TOCFormat: \f2format\f3
823 Format table of contents entries with the format string \f2format\f1.
824 The format string \f2format\f1 can contain the same escapes which are
825 used to format header strings with the `%Format' special comment.
826 .TP 8
827 .B Underlay: \f2text\f3
828 Print string \f2text\f1 under every page.
829 .TP 8
830 .B UnderlayAngle: \f2num\f3
831 Set the angle of the underlay text to \f2num\f1.
832 .TP 8
833 .B UnderlayFont: \f2fontspec\f3
834 Select a font for the underlay text.
835 .TP 8
836 .B UnderlayGray: \f2num\f3
837 Print the underlay text with the gray value \f2num\f1.
838 .TP 8
839 .B UnderlayPosition: \f2position_spec\f3
840 Set the underlay text's starting position according to the
841 \f2position_spec\f1.
842 .TP 8
843 .B UnderlayStyle: \f2style\f3
844 Set the underlay text's style to \f2style\f1.
845
846 .SH FANCY HEADERS
847
848 Users can create their own fancy headers by creating a header
849 description file and placing it in a directory which is in
850 \f3enscript\f1's library path.  The name of the header file must be in
851 format: `\f2headername\f1.hdr'.  Header can be selected by giving
852 option: \f3\-\-fancy\-header=\f2headername\f1.
853
854 Header description file contains PostScript code that paints the
855 header.  Description file must provide procedure \f3do_header\f1 which
856 is called by \f3enscript\f1 at the beginning of every page.
857
858 Header description file contains two parts: comments and code.  Parts
859 are separated by a line containing text:
860
861 % \-\- code follows this line \-\-
862
863 .B Enscript
864 copies only the code part of description file to the generated
865 PostScript output.  The comments part can contain any data, it is not
866 copied.  If separator line is missing, no data is copied to output.
867
868 .B Enscript
869 defines following constants which can be used in header description
870 files:
871 .TP 16
872 .B  d_page_w
873 page width
874 .TP 16
875 .B  d_page_h
876 page height
877 .TP 16
878 .B  d_header_x
879 header lower left \f2x\f1 coordinate
880 .TP 16
881 .B  d_header_y
882 header lower left \f2y\f1 coordinate
883 .TP 16
884 .B  d_header_w
885 header width
886 .TP 16
887 .B  d_header_h
888 header height
889 .TP 16
890 .B d_footer_x
891 footer lower left \f2x\f1 coordinate
892 .TP 16
893 .B d_footer_y
894 footer lower left \f2y\f1 coordinate
895 .TP 16
896 .B d_footer_w
897 footer width
898 .TP 16
899 .B d_footer_h
900 footer height
901 .TP 16
902 .B  d_output_w
903 width of the text output area
904 .TP 16
905 .B  d_output_h
906 height of the text output area
907 .TP 16
908 .B  user_header_p
909 predicate which tells if user has defined his/her own header string:
910 \f3true\f1/\f3false\f1
911 .TP 16
912 .B  user_header_left_str
913 if \f3user_header_p\f1 is \f3true\f1, this is the left field of the
914 user supplied header string.
915 .TP 16
916 .B user_header_center_str
917 if \f3user_header_p\f1 is \f3true\f1, this is the center field of the
918 user supplied header string
919 .TP 16
920 .B user_header_right_str
921 if \f3user_header_p\f1 is \f3true\f1, this is the right field of the
922 user supplied header string
923 .TP 16
924 .B  user_footer_p
925 predicate which tells if user has defined his/her own footer string:
926 \f3true\f1/\f3false\f1
927 .TP 16
928 .B  user_footer_left_str
929 if \f3user_footer_p\f1 is \f3true\f1, this is the left field of the
930 user supplied footer string.
931 .TP 16
932 .B user_footer_center_str
933 if \f3user_footer_p\f1 is \f3true\f1, this is the center field of the
934 user supplied footer string
935 .TP 16
936 .B user_footer_right_str
937 if \f3user_footer_p\f1 is \f3true\f1, this is the right field of the
938 user supplied footer string
939 .TP 16
940 .B  HF
941 standard header font (from \f3\-F\f1, \f3\-\-header\-font\f1 option).
942 This can be selected simply by invoking command: `\f3HF setfont\f1'.
943 .TP 16
944 .B pagenum
945 the number of the current page
946 .TP 16
947 .B fname
948 the full name of the printed file (/foo/bar.c)
949 .TP 16
950 .B fdir
951 the directory part of the file name (/foo)
952 .TP 16
953 .B ftail
954 file name without the directory part (bar.c)
955 .TP 16
956 .B gs_languagelevel
957 PostScript interpreter's language level (currently 1 or 2)
958 .P
959
960 You can also use the following special comments to customize your
961 headers and to specify some extra options.  Special comments are like
962 DSC comments but they start with a single `%' character; special
963 comments start from the beginning of the line and they have the
964 following syntax:
965
966 %\f2commentname\f1: \f2options\f1
967
968 Currently \f3enscript\f1 support the following special comments:
969 .TP 8
970 .B %Format: \f2name\f3 \f2format\f3
971 Define a new string constant \f2name\f1 according to the format string
972 \f2format\f1.  Format string start from the first non-space character
973 and it ends to the end of the line.  Format string can contain general
974 `%' escapes and input file related `$' escapes.  Currently following
975 escapes are supported:
976 .RS 8
977 .TP 8
978 .B %%
979 character `%'
980 .TP 8
981 .B $$
982 character `$'
983 .TP 8
984 .B $%
985 current page number
986 .TP 8
987 .B $=
988 number of pages in the current file
989 .TP 8
990 .B $p
991 number of pages processed so far
992 .TP 8
993 .B $(\f2VAR\f3)
994 value of the environment variable \f2VAR\f1.
995 .TP 8
996 .B %c
997 trailing component of the current working directory
998 .TP 8
999 .B %C \f1(\f3$C\f1)\f3
1000 current time (file modification time) in `hh:mm:ss' format
1001 .TP 8
1002 .B %d
1003 current working directory
1004 .TP 8
1005 .B %D \f1(\f3$D\f1)\f3
1006 current date (file modification date) in `yy-mm-dd' format
1007 .TP 8
1008 .B %D{\f2string\f3} \f1(\f3$D{\f2string\f3}\f1)\f3
1009 format string \f2string\f1 with the strftime(3) function.
1010 `\f3%D{}\f1' refers to the current date and `\f3$D{}\f1' to the input
1011 file's last modification date.
1012 .TP 8
1013 .B %E \f1(\f3$E\f1)\f3
1014 current date (file modification date) in `yy/mm/dd' format
1015 .TP 8
1016 .B %F \f1(\f3$F\f1)\f3
1017 current date (file modification date) in `dd.mm.yyyy' format
1018 .TP 8
1019 .B %H
1020 document title
1021 .TP 8
1022 .B $L
1023 number of lines in the current input file.  This is valid only for the
1024 toc entries, it can't be used in header strings.
1025 .TP 8
1026 .B %m
1027 the hostname up to the first `.' character
1028 .TP 8
1029 .B %M
1030 the full hostname
1031 .TP 8
1032 .B %n
1033 the user login name
1034 .TP 8
1035 .B $n
1036 input file name without the directory part
1037 .TP 8
1038 .B %N
1039 the user's pw_gecos field up to the first `,' character
1040 .TP 8
1041 .B $N
1042 the full input file name
1043 .TP 8
1044 .B %t \f1(\f3$t\f1)\f3
1045 current time (file modification time) in 12-hour am/pm format
1046 .TP 8
1047 .B %T \f1(\f3$T\f1)\f3
1048 current time (file modification time) in 24-hour format `hh:mm'
1049 .TP 8
1050 .B %* \f1(\f3$*\f1)\f3
1051 current time (file modification time) in 24-hour format with seconds
1052 `hh:mm:ss'
1053 .TP 8
1054 .B $v
1055 the sequence number of the current input file
1056 .TP 8
1057 .B $V
1058 the sequence number of the current input file in the `Table of
1059 Contents' format: if the \f3\-\-toc\f1 option is given, escape expands
1060 to `\f2num\f1\-'; if the \f3\-\-toc\f1 is not given, escape expands to
1061 an empty string.
1062 .TP 8
1063 .B %W \f1(\f3$W\f1)\f3
1064 current date (file modification date) in `mm/dd/yy' format
1065 .RE
1066
1067 .RS 8
1068 All format directives except `$=' can also be given in format
1069
1070 \f2escape\f1 \f2width\f1 \f2directive\f1
1071
1072 where \f2width\f1 specifies the width of the column to which the
1073 escape is printed.  For example, escape "$5%" will expand to something
1074 like " 12".  If the width is negative, the value will be printed
1075 left-justified.
1076
1077 For example, the `emacs.hdr' defines its date string with the
1078 following format comment:
1079
1080 .B %Format: eurdatestr %E
1081
1082 which expands to:
1083
1084 .B /eurdatestr (96/01/08) def
1085 .RE
1086 .P
1087 .TP 8
1088 .B %HeaderHeight: \f2height\f1
1089 Allocate \f2height\f1 points space for the page header.  The default
1090 header height is 36 points.
1091 .TP 8
1092 .B %FooterHeight: \f2height\f1
1093 Allocate \f2height\f1 points space for the page footer.  The default
1094 footer height is 0 points.
1095 .P
1096
1097 According to Adobe's Document Structuring Conventions (DSC), all
1098 resources needed by a document must be listed in document's prolog.
1099 Since user's can create their own headers, \f3enscript\f1 don't know
1100 what resources those headers use.  That's why all headers must contain
1101 a standard DSC comment that lists all needed resources.  For example,
1102 used fonts can be listed with following comment:
1103
1104 %%DocumentNeededResources: font \f2fontname1\f1 \f2fontname2\f1
1105
1106 Comment can be continued to the next line with the standard
1107 continuation comment:
1108
1109 %%+ font \f2fontname3\f1
1110
1111 .SH SPECIAL ESCAPES
1112
1113 \f3Enscript\f1 supports special escape sequences which can be used to
1114 add some page formatting commands to ASCII documents.  As a default,
1115 special escapes interpretation is off, so all ASCII files print out as
1116 everyone expects.  Special escapes interpretation is activated by
1117 giving option \f3\-e\f1, \f3\-\-escapes\f1 to \f3enscript\f1.
1118
1119 All special escapes start with the escape character.  The default
1120 escape character is ^@ (octal 000); escape character can be changed
1121 with option \f3\-e\f1, \f3\-\-escapes\f1.  Escape character is
1122 followed by escape's name and optional options and arguments.
1123
1124 Currently \f3enscript\f1 supports following escapes:
1125 .TP 8
1126 .B bgcolor
1127 change the text background color.  The syntax of the escape is:
1128
1129 ^@bgcolor{\f2red\f1 \f2green\f1 \f2blue\f1}
1130
1131 where the color components \f2red\f1, \f2green\f1, and \f1blue\f1 are
1132 given as decimal numbers between values 0 and 1.
1133
1134 .TP 8
1135 .B bggray
1136 change the text background color.  The syntax of the escape is:
1137
1138 ^@bggray{\f2gray\f1}
1139
1140 where \f2gray\f1 is the new text background gray value.  The default
1141 value is 1.0 (white).
1142 .TP 8
1143 .B color
1144 change the text color.  The syntax of the escape is:
1145
1146 ^@color{\f2red\f1 \f2green\f1 \f2blue\f1}
1147
1148 where color components \f2red\f1, \f2green\f1 and \f2blue\f1 are given
1149 as decimal numbers between values 0 and 1.
1150 .TP 8
1151 .B comment
1152 comment the rest of the line including the newline character.
1153 Escape's syntax is:
1154
1155 ^@comment \f2text\f1 \f2newline_character\f1
1156 .TP 8
1157 .B escape
1158 change the escape character.  The syntax of the escape is:
1159
1160 ^@escape{\f2code\f1}
1161
1162 where \f2code\f1 is the decimal code of the new escape character.
1163 .TP 8
1164 .B epsf
1165 inline EPS file to the document.  The syntax of the escape is:
1166
1167 ^@epsf[\f2options\f1]{\f2filename\f1}
1168
1169 where \f2options\f1 is an optional sequence of option characters and
1170 values enclosed with brackets and \f2filename\f1 is the name of the
1171 EPS file.
1172
1173 If \f2filename\f1 ends to the `|' character, then \f2filename\f1 is
1174 assumed to name a command that prints EPS data to its standard output.
1175 In this case, \f3enscript\f1 opens a pipe to the specified command
1176 and reads EPS data from pipe.
1177
1178 Following options can be given for the \f3epsf\f1 escape:
1179 .RS 8
1180 .TP 8
1181 .B c
1182 print image centered
1183 .TP 8
1184 .B r
1185 print image right justified
1186 .TP 8
1187 .B n
1188 do not update current point.  Following output is printed to that
1189 position where the current point was just before the \f3epsf\f1 escape
1190 .TP 8
1191 .B nx
1192 do not update current point \f2x\f1 coordinate
1193 .TP 8
1194 .B ny
1195 do not update current point \f2y\f1 coordinate
1196 .TP 8
1197 .B x\f2num\f3
1198 move image's top left \f2x\f1 coordinate \f2num\f1 characters from
1199 current point \f2x\f1 coordinate (relative position)
1200 .TP 8
1201 .B x\f2num\f3a
1202 set image's top left \f2x\f1 coordinate to column \f2num\f1 (absolute
1203 position)
1204 .TP 8
1205 .B y\f2num\f3
1206 move image's top left \f2y\f1 coordinate \f2num\f1 lines from current
1207 line (relative position)
1208 .TP 8
1209 .B y\f2num\f3a
1210 set image's top left \f2y\f1 coordinate to line \f2num\f1 (absolute
1211 position)
1212 .TP 8
1213 .B h\f2num\f3
1214 set image's height to \f2num\f1 lines
1215 .TP 8
1216 .B s\f2num\f3
1217 scale image with factor \f2num\f1
1218 .TP 8
1219 .B sx\f2num\f3
1220 scale image in \f2x\f1 direction with factor \f2num\f1
1221 .TP 8
1222 .B sy\f2num\f3
1223 scale image in \f2y\f1 direction with factor \f2num\f1
1224 .P
1225 As a default, all dimensions are given in lines (vertical) and
1226 characters (horizontal).  You can also specify other units by
1227 appending an unit specifier after number.  Possible unit specifiers
1228 and the corresponding units are:
1229 .TP 8
1230 .B c
1231 centimeters
1232 .TP 8
1233 .B i
1234 inches
1235 .TP 8
1236 .B l
1237 lines or characters (default)
1238 .TP 8
1239 .B p
1240 PostScript points
1241 .P
1242 For example to print an image one inch high, you can specify height by
1243 following options: \f3h1i\f1 (1 inch), \f3h2.54c\f1 (2.54 cm),
1244 \f3h72p\f1 (72 points).
1245 .RE
1246 .TP 8
1247 .B font
1248 select current font.  The syntax of the escape is:
1249
1250 ^@font{\f2fontname\f1[:\f2encoding\f1]}
1251
1252 where \f2fontname\f1 is a standard font specification.  Special font
1253 specification \f3default\f1 can be used to select the default body
1254 font (\f3enscript\f1's default or the one specified by the command
1255 line option \f3\-f\f1, \f3\-\-font\f1).
1256
1257 The optional argument \f2encoding\f1 specifies the encoding that
1258 should be used for the new font.  Currently the encoding can only be
1259 the \f3enscript\f1's global input encoding or \f3ps\f1.
1260 .TP 8
1261 .B ps
1262 include raw PostScript code to the output.  The syntax of the escape
1263 is:
1264
1265 ^@ps{\f2code\f1}
1266 .TP 8
1267 .B shade
1268 highlight regions of text by changing the text background color.
1269 Escape's syntax is:
1270
1271 ^@shade{\f2gray\f1}
1272
1273 where \f2gray\f1 is the new text background gray value.  The default
1274 value is 1.0 (white) which disables highlighting.
1275
1276 .SH PAGE DEVICE OPTIONS
1277
1278 Page device is a PostScript level 2 feature that offers an uniform
1279 interface to control printer's output device.  \f3Enscript\f1
1280 protects all page device options inside an if block so they have no
1281 effect in level 1 interpreters.  Although all level 2 interpreters
1282 support page device, they do not have to support all page device
1283 options.  For example some printers can print in duplex mode and some
1284 can not.  Refer to the documentation of your printer for supported
1285 options.
1286
1287 Here are some usable page device options which can be selected with
1288 the \f3\-D\f1, \f3\-\-setpagedevice\f1 option.  For a complete listing,
1289 see \f2PostScript Language Reference Manual\f1: section 4.11 Device
1290 Setup.
1291 .TP 8
1292 .B Collate \f2boolean\f1
1293 how output is organized when printing multiple copies
1294 .TP 8
1295 .B Duplex \f2boolean\f1
1296 duplex (two side) printing
1297 .TP 8
1298 .B ManualFeed \f2boolean\f1
1299 manual feed paper tray
1300 .TP 8
1301 .B OutputFaceUp \f2boolean\f1
1302 print output `face up' or `face down'
1303 .TP 8
1304 .B Tumble \f2boolean\f1
1305 how opposite sides are positioned in duplex printing
1306
1307 .SH PRINTING EXAMPLES
1308
1309 Following printing examples assume that \f3enscript\f1 uses the
1310 default configuration.  If default actions have been changed from the
1311 configuration files, some examples will behave differently.
1312 .TP 8
1313 .B enscript foo.txt
1314 Print file \f3foo.txt\f1 to the default printer.
1315 .TP 8
1316 .B enscript \-Possu foo.txt
1317 Print file \f3foo.txt\f1 to printer \f3ossu\f1.
1318 .TP 8
1319 .B enscript \-pfoo.ps foo.txt
1320 Print file \f3foo.txt\f1, but leave PostScript output to file
1321 \f3foo.ps\f1.
1322 .TP 8
1323 .B enscript \-2 foo.txt
1324 Print file \f3foo.txt\f1 to two columns.
1325 .TP 8
1326 .B enscript \-2r foo.txt
1327 Print file to two columns and rotate output 90 degrees (landscape).
1328 .TP 8
1329 .B enscript \-DDuplex:true foo.txt
1330 Print file in duplex (two side) mode (printer dependant).
1331 .TP 8
1332 .B enscript \-G2rE \-U2 foo.c
1333 My default code printing command: gaudy header, two columns,
1334 landscape, code highlighting, 2-up printing.
1335 .TP 8
1336 \f3enscript \-E \-\-color \-Whtml \-\-toc -pfoo.html *.h *.c\f1
1337 A nice HTML report of your project's C source files.
1338
1339 .SH ENVIRONMENT VARIABLES
1340
1341 The environment variable \f3ENSCRIPT\f1 can be used to pass default
1342 options for \f3enscript\f1.  For example, to select the default body
1343 font to be Times\-Roman 7pt, set the following value to the
1344 \f3ENSCRIPT\f1 environment variable:
1345 .TP 8
1346 .B \-fTimes\-Roman7
1347 .P
1348
1349 The value of the \f3ENSCRIPT\f1 variable is processed before the
1350 command line options, so command line options can be used to overwrite
1351 these defaults.
1352
1353 Variable \f3ENSCRIPT_LIBRARY\f1 specifies the \f3enscript\f1's
1354 library directory.  It can be used to overwrite the build-in default
1355 `@DATADIR@/enscript'.
1356
1357 .SH RETURN VALUE
1358
1359 \f3Enscript\f1 returns value 1 to the shell if any errors were
1360 encountered or 0 otherwise.  If the option
1361 \f3\-\-extended\-return\-values\f1 was specified, the return value is
1362 constructed from the following flags:
1363 .TP 8
1364 .B 0
1365 no errors or warnings
1366 .TP 8
1367 .B 2
1368 some lines were truncated or wrapped
1369 .TP 8
1370 .B 4
1371 some characters were missing from the used fonts
1372 .TP 8
1373 .B 8
1374 some characters were unprintable
1375
1376 .SH FILES
1377
1378 .nf
1379 .ta 4i
1380 @DATADIR@/enscript/*.hdr                header files
1381 @DATADIR@/enscript/*.enc                input encoding vectors
1382 @DATADIR@/enscript/enscript.pro PostScript prolog
1383 @DATADIR@/enscript/afm/*.afm            AFM files for PostScript fonts
1384 @DATADIR@/enscript/font.map     index for the AFM files
1385 @DATADIR@/enscript/hl/*.st      states definition files
1386 @SYSCONFDIR@/enscript.cfg               system\-wide configuration file
1387 @SYSCONFDIR@/enscriptsite.cfg           site configuration file
1388 ~/.enscriptrc                           personal configuration file
1389 ~/.enscript/                            personal resource directory
1390 .fi
1391
1392 .SH SEE ALSO
1393 diffpp(1), ghostview(1), gs(1), lpq(1), lpr(1), lprm(1), states(1)
1394
1395 .SH AUTHOR
1396 Markku Rossi <mtr@iki.fi> <http://www.iki.fi/~mtr/>
1397
1398 GNU Enscript WWW home page: <http://www.iki.fi/~mtr/genscript/>