1 | |
---|
2 | GNU Enscript |
---|
3 | ============ |
---|
4 | |
---|
5 | GNU enscript is a drop-in replacement for the enscript program. |
---|
6 | Enscript converts ASCII files to PostScript and stores generated |
---|
7 | output to a file or sends it directly to the printer. |
---|
8 | |
---|
9 | Enscript is free software; you can redistribute it and/or modify it |
---|
10 | under the terms of the GNU General Public License as published by the |
---|
11 | Free Software Foundation; either version 2, or (at your option) any |
---|
12 | later version. |
---|
13 | |
---|
14 | Enscript is distributed in the hope that it will be useful, but |
---|
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | General Public License for more details. |
---|
18 | |
---|
19 | You should have received a copy of the GNU General Public License |
---|
20 | along with enscript; see the file COPYING. If not, write to the Free |
---|
21 | Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
---|
22 | 02111-1307, USA. |
---|
23 | |
---|
24 | |
---|
25 | * Supported Character Sets |
---|
26 | |
---|
27 | Enscript supports following character sets: |
---|
28 | |
---|
29 | - ISO-8859-1 ISO Latin1 (default) |
---|
30 | - ISO-8859-2 ISO Latin2 |
---|
31 | - ISO-8859-3 ISO Latin3 |
---|
32 | - ISO-8859-4 ISO Latin4 |
---|
33 | - ISO-8859-5 ISO Cyrillic |
---|
34 | - ISO-8859-7 ISO Greek |
---|
35 | - ascii 7 bit ascii |
---|
36 | - ascii fi se 7 bit ascii with following encodings: |
---|
37 | '{' = ä (adieresis) |
---|
38 | '|' = ö (odieresis) |
---|
39 | '}' = å (aring) |
---|
40 | '[' = Ä (Adieresis) |
---|
41 | '\\' = Ö (Odieresis) |
---|
42 | ']' = Å (Aring) |
---|
43 | - ascii dk no 7 bit ascii with following encodings: |
---|
44 | '{' = æ (ae) |
---|
45 | '|' = ø (oslash) |
---|
46 | '}' = å (aring) |
---|
47 | '[' = Æ (AE) |
---|
48 | '\\' = Ø (Oslash) |
---|
49 | ']' = Å (Aring) |
---|
50 | - IBM/PC standard PC/DOS character set |
---|
51 | - Mac Macintosh character set |
---|
52 | - VMS VMS multinational charset |
---|
53 | - hp8 HP Roman-8 charset |
---|
54 | - koi8 Adobe Standard Cyrillic Font KOI8 charset |
---|
55 | - ps PostScript font's default encoding |
---|
56 | - pslatin1 PostScript interpreter's `ISOLatin1Encoding' |
---|
57 | |
---|
58 | |
---|
59 | * Special Escapes |
---|
60 | |
---|
61 | Enscript supports special escapes sequences that can be used to add |
---|
62 | simple page formatting commands to ASCII documents. User can inline |
---|
63 | EPS files, change font on-the-fly insert comments and shade regions of |
---|
64 | text. See file README.ESCAPES for details. |
---|
65 | |
---|
66 | |
---|
67 | * Language sensitive highlighting |
---|
68 | |
---|
69 | Enscript supports language sensitive code highlighting. Highlighting |
---|
70 | is implemented by a special `states' program which processes the input |
---|
71 | files and annotates them with enscript's special escapes. The states |
---|
72 | definition file `enscript.st' is a machine independent ASCII file and |
---|
73 | it can be updated without re-compilation of the enscript program. The |
---|
74 | most recent version of this file can be downloaded from the GNU |
---|
75 | enscript WWW home page: <http://www.iki.fi/~mtr/genscript/>. |
---|
76 | |
---|
77 | New highlighting definitions for different languages are welcome, |
---|
78 | please send them directly to me: <mailto:mtr@iki.fi>. |
---|
79 | |
---|
80 | |
---|
81 | * PostScript font support |
---|
82 | |
---|
83 | ** AFM files |
---|
84 | |
---|
85 | Enscript supports AFM (Adobe Font Metrics) files. AFM files contain |
---|
86 | font metrics information (character widths, etc); if there is an AFM |
---|
87 | file for the current font, enscript can count line widths and tab |
---|
88 | stops correctly. Enscript distribution contains AFM files for the |
---|
89 | most common PostScript fonts. These AFM files are installed to the |
---|
90 | directory <prefix>/share/enscript/. |
---|
91 | |
---|
92 | ** Fonts (.pfa or .pfb) |
---|
93 | |
---|
94 | Enscript supports also additional PostScript fonts which are defined |
---|
95 | in the `.pfa' or `.pfb' font files. Enscript automatically |
---|
96 | down-loads font's description to your PostScript document whenever you |
---|
97 | use an external disk font. Font down-loading requires that you have |
---|
98 | both the `.afm' and `.pf{a,b}' files for you extra fonts and you have |
---|
99 | created a font mapping file called `font.map' to your font directory. |
---|
100 | |
---|
101 | These are the steps that are needed to make your extra fonts usable in |
---|
102 | enscript: |
---|
103 | |
---|
104 | 1) Install the `.afm' and `.pf{a,b}' files to some appropriate |
---|
105 | directory. Note! for a single font, both the .afm and .pf{a,b} |
---|
106 | files must have the same prefix, filenames can differ only from |
---|
107 | the suffix part. For example, if font `FooFont' is defined in the |
---|
108 | file `foo.pfa', then the AFM file must be named `foo.afm'. |
---|
109 | |
---|
110 | 2) Create a font map file for the font directory. Enscript's |
---|
111 | distribution has an utility called `mkafmmap' which does the job; |
---|
112 | just give command: |
---|
113 | |
---|
114 | mkafmmap *.afm |
---|
115 | |
---|
116 | in your font directory. This command creates a file called |
---|
117 | `font.map' to your font directory. File contains one row for each |
---|
118 | .afm file, each row has two columns: font's PostScript name and |
---|
119 | the prefix for the corresponding .afm file. |
---|
120 | |
---|
121 | 3) Notify enscript that it has new fonts to play with. This is done |
---|
122 | by editing the global configuration file `enscript.cfg' or the |
---|
123 | personal configuration file `$HOME/.enscriptrc'. Global |
---|
124 | configuration file has an entry called 'AFMPath' which contains the |
---|
125 | current font search path. Add your new font directory to this |
---|
126 | path: |
---|
127 | |
---|
128 | AFMPath: /usr/local/share/enscript/afm:/usr/local/lib/ps:/usr/lib/ps:/fonts/myfontdir |
---|
129 | |
---|
130 | where `/fonts/myfontdir' is the new font directory. |
---|
131 | |
---|
132 | So how does the font down-loading work? Enscript automatically |
---|
133 | down-loads font files for header and body fonts, if it can find the |
---|
134 | corresponding `.pfa' or `.pfb' files from the AFMPath. Enscript do |
---|
135 | *not* down-load fonts that are specified in `^@font' escapes, however |
---|
136 | you can down-load these font by specifying command line option |
---|
137 | `--download-font=name' for each font. You can also specify |
---|
138 | down-loadable fonts in the global configuration file `enscript.cfg' |
---|
139 | or in your personal configuration file `$HOME/.enscriptrc' by giving |
---|
140 | option `DownloadFont: name'. |
---|
141 | |
---|
142 | |
---|
143 | * What's different as compared to the Adobe's Enscript application? |
---|
144 | |
---|
145 | - Adobe enscript's option `-o' has been changed. In Adobe enscript |
---|
146 | option `-o' lists missing characters. In GNU enscript `-o' is an |
---|
147 | alias for `-p' and missing characters are listed with an option `-O'. |
---|
148 | |
---|
149 | |
---|
150 | * Misc |
---|
151 | |
---|
152 | I am dedicated to make the GNU enscript the best a2ps converter ever, |
---|
153 | this includes adding all the GNU features and cookies to it ;) |
---|
154 | |
---|
155 | Comments, suggestions, bug fixes, bug reports, etc. are welcome. |
---|
156 | |
---|
157 | |
---|
158 | Markku Rossi |
---|
159 | |
---|
160 | <mtr@iki.fi> <http://www.iki.fi/~mtr/> |
---|
161 | |
---|
162 | GNU Enscript WWW home page: |
---|
163 | <http://www.iki.fi/~mtr/genscript/> |
---|