Printing an etext with Enscript

by Michael Stutz

Enscript converts plaintext input files to PostScript. This is an Enscript input filter (states file) for converting standard 'etext' markup -- use it to print an etext such as a manuscript file or online textfile.

[Before]
input

[After]
output

Supported markup: _italic_ _long_style_italic_ "quotations"

Source

etext.st.gz (4k) [TODO]

Install

Uncompress and place in /usr/local/share/enscript/hl/

Make sure /usr/local/share/enscript/hl/ is added to the States Path in the /etc/enscript.cfg configuration file, eg:

StatesPath: /usr/share/enscript/hl:/usr/local/share/enscript/hl

Usage

$ enscript -Eetext input-file

To write output to PostScript file output.ps in Times Roman 14-point-type:

$ enscript -Eetext -B -f "Times-Roman14" -o output.ps input.txt

To double-space the input, convert to PostScript (Courier type) and send directly to the printer:

$ pr -d -t input.txt | enscript -Eetext -B input.txt

To double-space the input and convert to PostScript adding headers to each page with input file name, the input file's last modification time, and page numbers:

$ pr -d -t input.txt | enscript -Eetext -o output.ps input.txt

See also

The Linux Cookbook, 2nd edition

First published Dec 2002; most recently updated [$Date: 2004/03/29 19:14:53 $]