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