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