- selection of a variety of fonts at arbitrary point sizes with adjustable interline spacing (e.g. for double spacing),
- margin specification,
- page outlining,
- portrait and landscape page orientation,
- automatic page numbering,
- multi-column printing,
- overstruck text (used by many text formatters for underlining and bolding),
- UNIX manual page output from nroff(1),
- ISO8859 Latin-1 (an 8-bit superset of ASCII) and Adobe PostScript character set encodings,
- high-precision character coordinates for accurate typesetter output,
- initialization file for local customization,
- downloadable PostScript fonts,
- mapping of PostScript font names to system-dependent file names,
- full conformance of output PostScript to Adobe Document Structuring Conventions version 3.0 (see Appendix G of the Adobe red book, PostScript Language Reference Manual, second edition, Addison-Wesley (1990), ISBN 0-201-18127-4),
- clipping of long text lines, and
- wrapping of long text lines.
The source code distribution for lptops is in the public domain.
The Adobe TranScript system provides a program of similar intent, known as enscript(1L), but with only a small subset of the capabilities of lptops.
Options can be supplied in an initialization file, and on the command line; command-line settings override initialization file settings. See the INITIALIZATION FILE section below.
To process a file whose name begins with a hyphen, hide the hyphen behind a directory path. For example, on UNIX, the file name -foo.bar could be written as ./-foo.bar.
A command-line argument consisting of a single hyphen is taken as a reference to the standard input file, rather than as an illegal option. UNIX and MS DOS, at least, lack a way of referring to the standard I/O units by a file name, so the hyphen convention is commonly used in UNIX software. A hyphen can be used anywhere a file name can be used, but only the first instance can usefully supply data to lptops.
Letter case in option names is ignored, but is significant in option values. Long option names may be abbreviated to the minimum unique prefix.
Option descriptions with [=num] following the option name can have an optional integer value. If the value is omitted, then the option if set if it was previously unset, and unset if it was previously set. If an integer value is provided, then a zero value unsets the option, and a non-zero value sets it, independent of any prior setting of the option. Instead of an integer value, you may specify a string value of yes or true to set the option, or no or false to unset it. The string values may be abbreviated, and letter case is not significant.
For options that take a value, that value must be supplied in the same argument, separated from the option name by a colon or equals sign. The separator character may be preceded and followed by an arbitrary number of spaces and tabs, provided suitable shell quoting is supplied to protect the spaces from being interpreted as argument separators. If the value begins with a non-letter, the separator can be omitted. For example, -p:10bp, -p=10bp, '-p 10bp"' and -p10bp are equivalent. However -fHelvetica is illegal because the value starts with a letter; it must be written as -f:Helvetica, -f=Helvetica, or '-f Helvetica'. -author Display an author credit on stderr.
The following 13 fonts are available on most PostScript printers. The second column provides font abbreviations used by this and earlier versions of lptops; the third column contains ditroff(1L) font abbreviations, and the fourth column, Adobe TranScript font abbreviations. Any of these abbreviations may be used to specify a font name. center tab(/); l l l l l c s s l l l l . _/_/_/_ Font/Alternate Names Courier/C/C/C Courier-Bold/CB/CB/CB Courier-BoldOblique/CBO/CD/CD Courier-Oblique/CO/CO/CO Helvetica/H/he/he Helvetica-Bold/HB/He/He Helvetica-BoldOblique/HBO/HE/HE Helvetica-Oblique/HO/hE/hE Symbol/S/S/S Times-Bold/TB/R/ti Times-BoldItalic/TBI/BI/TI Times-Italic/TI/I/tI Times-Roman/T/R/ti _/_/_/_ The remaining fonts are available only on enhanced printers, such as the Apple LaserWriter Plus. center tab(/); l l l l l c s s l l l l. _/_/_/_ Font/Alternate Names AvantGarde-Book/AGB/ag/ag AvantGarde-BookOblique/AGBO/aG/aG AvantGarde-Demi/AGD/Ag/Ag AvantGarde-DemiOblique/AGDO/AG/AG Bookman-Demi/BD/Bo/Bo Bookman-DemiItalic/BDI/BO/BO Bookman-Light/BL/bo/bo Bookman-LightItalic/BLI/bO/bO Helvetica-Narrow/HN/hn/hn Helvetica-Narrow-Bold/HNB/Hn/Hn Helvetica-Narrow-BoldOblique/HNBO/HN/HN Helvetica-Narrow-Oblique/HNO/hN/hN NewCenturySchlbk-Bold/NCSB/Nc/Nc NewCenturySchlbk-BoldItalic/NCSBI/NC/NC NewCenturySchlbk-Italic/NCSI/nC/nC NewCenturySchlbk-Roman/NCSR/nc/nc Palatino-Bold/PB/Pa/Pa Palatino-BoldItalic/PBI/PA/PA Palatino-Italic/PI/pA/pA Palatino-Roman/PR/pa/pa ZapfChancery-MediumItalic/ZCMI/ZC/ZC ZapfDingbats/ZD/ZD/ZD _/_/_/_
The ditroff(1L) and TranScript abbreviations are identical, except for the Courier and Times fonts. For convenience, matches of option values with the full font name, and the first abbreviation, ignore letter case. The second and third abbreviations are based on two-letter mnemonics, where upper-case in the first letter indicates bold, and upper-case in the second letter indicates italic, so letter case is significant for them.
Only the Courier fonts are fixed-width fonts. The others are proportionally spaced and tabular material will not line up properly. The Courier fonts have a width equal to 0.6 of their point size, so to fill a line W inches wide with up to N characters, one must have point size <= (W/(0.6 * N * 72)) = (W*120)/N bp. Equivalently, with a point size P bp, the output spacing is 120/P char/inch.
If you specify a bold, italic, or bold-italic font name for the normal font in the -font option, lptops will use different styles for the remaining fonts. For example, -font=Palatino-Bold would use Palatino-Bold for normal text, and Palatino-Roman for bold text.
The option value consists of 5n font names, separated by space, tab, or comma. If white space is present in a command-line argument, it may be necessary to supply suitable shell quoting to prevent interpretation of the spaces as argument separators.
The five typeface styles must be complete case-sensitive PostScript font names. Up to three additional aliases can be provided immediately following each font name, and the same number of aliases must be provided for each style. Aliases make it convenient to have shorter names for popular fonts.
Up to 100 additional families can be defined; if necessary, that limit can be increased at compile time when lptops is built.
The five typeface styles should come from the same font family, since it is usually considered bad typographic practice to mix font families in running text. However, lptops does not prevent such mixing.
Here are some examples. The backslash-newline is provided here to indicate a line break for readability; it is not present in the actual option. Spaces in the option values are for readability; quoting of the complete value is not necessary (or even possible) for options in an initialization file, but would be required in command-line use.
-font=Courier,C,C,C, \ Courier-Bold,CB,CB,CB, \ Courier-Oblique,CO,CO,CO, \ Courier-BoldOblique,CBO,CD,CD, \ Courier,C,C,C
This is equivalent to the default Courier font family, with a short name, a ditroff(1) name, and a TranScript name for each style.
-font=Utopia-Regular, Utopia-Bold, Utopia-Italic, \ Utopia-BoldItalic, Courier
This defines the Utopia family, with no aliases for the long font names; a subsequent -font=Utopia-Regular option would be needed to select the font.
-font=CharterBT-Regular,BCH, CharterBT-Bold,BCHB, \ CharterBT-Italic,BCHI, \ CharterBT-BoldItalic,BCHBI, \ Courier10PitchBT-Roman,BCHT
This defines the Bitstream Charter family, with a single alias for each long font name.
The same result can be obtained by choosing a landscape paper type; see the description of the -paper option.
Since UNIX manual pages formatted by nroff(1) are intended for screen display, best results will be obtained if a fixed-width font, such as the default Courier, is chosen. If you want to typeset manual pages, you should use ditroff(1L) or groff(1L) instead, since those programs can produce PostScript directly, and will use proportional fonts for the -man format.
Pages are unnumbered if this option is not specified.
Letter case is not significant in matching paper names. Default left, right, top, and bottom margins are 25mm for paper sizes given in millimeters, and 1in for sizes in inches.
To get a single @ in the output, use @@ in the input. If this option is not specified, then @ characters have no special significance, and need not be doubled.
Control characters other than tab are forbidden between the string delimiters; thus, a single @b[ . . .] cannot be used to print an entire paragraph in bold text.
The initialization file can contain comments, empty lines, and option settings.
Comments go from percent to end-of-line, except that a percent prefixed by a backslash is reduced to a literal non-comment-starting percent.
Option settings must be complete on a single logical line, and can be used to supply site-dependent customizations. Usually, additional font family settings would be placed in the initialization file, because they require a long option value that is inconvenient to provide on the command line.
A long logical line can be written as multiple physical lines by breaking at a backslash-newline; those two characters are deleted when the line is joined to the next line. Line collapsing happens before comment stripping, so if a line with a comment is continued, all following continuation lines are part of the comment.
Here is a simple example. Notice the use of backslash-newline to wrap long lines, and that space between option names and values is permissible.
% /u/sy/beebe/tex/ndvi/lptops.ini, % Wed Jun 2 22:30:23 1993 % Edit by Nelson H. F. Beebe <beebe@sunrise> % This is a sample lptops initialization file for local % customization. % [02-Jun-1993] % define Bitstream Charter font family -f CharterBT-Regular, BCH, \ CharterBT-Bold, BCHB, \ CharterBT-Italic, BCHI, \ CharterBT-BoldItalic, BCHBI, \ Courier, BCHT % define Bitstream Courier font family -f Courier10PitchBT-Roman, BC, \ Courier10PitchBT-Bold, BCB, \ Courier10PitchBT-Italic, BCI, \ Courier10PitchBT-BoldItalic, BCBI, \ Courier10PitchBT-Roman, BCT % define Adobe Utopia font family -f Utopia-Regular, U, \ Utopia-Bold, UB, \ Utopia-Italic, UI, \ Utopia-BoldItalic, UBI, \ Courier, UT % define URW Antiqua family (only Roman available) -f = URWAntiquaT-RegularCondensed, AntiqReg, \ URWAntiquaT-RegularCondensed, AntiqReg, \ URWAntiquaT-RegularCondensed, AntiqReg, \ URWAntiquaT-RegularCondensed, AntiqReg, \ Courier, UT % define URW Grotesk family (only bold available) -f = URWGroteskT-Bold, GroteBo, \ URWGroteskT-Bold, GroteBo, \ URWGroteskT-Bold, GroteBo, \ URWGroteskT-Bold, GroteBo, \ Courier, UT % define URW Nimbus Roman family (only Roman available) -f = NimbusRomanNo9L-Regular, NimbuRo, \ NimbusRomanNo9L-Regular, NimbuRo, \ NimbusRomanNo9L-Regular, NimbuRo, \ NimbusRomanNo9L-Regular, NimbuRo, \ Courier, UT % define URW Nimbus Sans family (only Roman available) -f = NimbusSansL-Regular, NimbuSa, \ NimbusSansL-Regular, NimbuSa, \ NimbusSansL-Regular, NimbuSa, \ NimbusSansL-Regular, NimbuSa, \ Courier, UT -f Utopia-Regular % change default font -p 11bp % change default point size -reverse 0 % no page sorting needed
All the built-in font names are assumed to be printer-resident; font families defined by the long form of the -font option are assumed to require downloading. However, because some PostScript printers have additional resident fonts beyond the standard set known to lptops, if a downloadable font file cannot be found, the font is assumed to be printer-resident, and execution will silently continue. In such a case, the output PostScript will contain suitable comments that identify the needed fonts, so that spooling software that supports Adobe's Document Structuring Conventions version 3.0 can supply the missing fonts.
Correct support of the -wrap option requires access to Adobe font metric (.afm) files. If no font metric file can be found, metrics suitable for the default Courier font are assumed. Positioning of individual characters on the line after the first character is left to the PostScript interpreter, so absence of correct font metrics only means that some line wrapping decisions will be wrong; the text of each line will still be properly positioned.
The lptops distribution includes font metric files for all the built-in fonts, as well as for a few publicly-distributable downloadable fonts. Most PostScript-producing software packages will be accompanied by Adobe font metric files. Sun systems with OpenLook installed contain font metric files and downloadable fonts in the directories /usr/openwin/lib/fonts/afm and /usr/openwin/lib/fonts. Adobe font metric files are freely available from the Adobe electronic mail file server, firstname.lastname@example.org; send a message with the text help to get started.
Font metric files and downloadable font files are searched for in the AFMPATH search path, or if that environment variable does not exist, in a search path set by the installer at compile time.
Downloadable fonts may be in either ASCII (.pfa) or binary (.pfb) formats. Binary data from font files is converted to hexadecimal so that the output PostScript files remain completely portable across operating systems and output devices.
PostScript font files can be converted between binary and ASCII formats with t1ascii(1L) and t1binary(1L), decoded into human-readable documented PostScript commands with t1disasm(1L), and reassembled into binary or ASCII formats with t1asm(1L). Details on PostScript font encoding can be found in the Adobe black book, Adobe Type 1 Font Format, Adobe Systems, Inc. (1990).
lptops therefore supports a simple facility that permits mapping long PostScript font names to shorter system-dependent file names through a mapping file, afmfonts.map, that is looked for in the AFMPATH search path.
The mapping file can contain comments, empty lines, and mapping lines.
Comments go from percent to end-of-line, except that a percent prefixed by a backslash is reduced to a literal non-comment-starting percent.
A long logical line can be written as multiple physical lines by breaking at a backslash-newline; those two characters are deleted when the line is joined to the next line. Line collapsing happens before comment stripping, so if line with a comment is continued, all continuation lines are part of the comment.
Mapping lines each contain a font name and a file name, separated by white space, and optionally, an equals sign or a colon. The file name need not contain a directory path, since it will be searched for in the AFMPATH search path. An explicit directory path prevents the AFMPATH from being used. The file extensions can normally be omitted, since they will be supplied automatically. If file extensions are supplied, they must be separated from the base name by a period, since the last period in the file name marks the location of an extension.
Here is a simple example of a mapping file:
The mapping file is portable across all operating systems on which lptops runs.% /u/sy/beebe/tex/ndvi/new/afm/afmfonts.map, % Wed Apr 28 19:20:47 1993 % Edit by Nelson H. F. Beebe <beebe@sunrise> % % This file is adapted from the Adobe TranScript % package mapping file, afmfiles.upr. lptops % can recognize the syntax of that file, but this % one is more readable. It provides a mapping % from PostScript font names to local pathless % file names. The file names need not carry % extensions, although if one is supplied, it % should be .afm for compatibility with Adobe % TranScript mapping files. % % The set here is suitable for use on systems, % such as PC DOS, with 8+3 file naming % limitations. % % [28-Apr-1993] AvantGarde-Book = AvGarBk AvantGarde-BookOblique = AvGarBkO AvantGarde-Demi = AvGarDe AvantGarde-DemiOblique = AvGarDeO . . .lines omitted . . . NewCenturySchlbk-Bold = NewCenBo NewCenturySchlbk-BoldItalic = NewCenBoI NewCenturySchlbk-Italic = NewCenI NewCenturySchlbk-Roman = NewCenRo . . .lines omitted . . . ZapfChancery-MediumItalic = ZapChaMeI ZapfDingbats = ZapDing % Bitstream Charter, Bitstream Courier, and Adobe % Utopia are publicly-available fonts in PostScript % .pfa and .pfb format. We follow the TranScript % conventions above to make short file names for these % fonts. CharterBT-Regular = BCharReg CharterBT-Bold = BCharBo CharterBT-Italic = BCharI CharterBT-BoldItalic = BCharBoI Courier10PitchBT-Bold = BCouBo Courier10PitchBT-BoldItalic = BCouBoI Courier10PitchBT-Italic = BCouI Courier10PitchBT-Roman = BCou Utopia-Regular = UtopiReg Utopia-Bold = UtopiBo Utopia-Italic = UtopiI Utopia-BoldItalic = UtopiBoI
On IBM VM/CMS, which uses a space instead of a period for the file extension, lptops will internally replace the mapping file extension period by a space. If extensions are supplied in the mapping file, a period, rather than a space, must be supplied in the mapping file for parsing to be correct.
If compatibility with Adobe TranScript is required, the file extension in the mapped file names should always be supplied as .afm. lptops will substitute .pfa or .pfb as needed.
On UNIX, the search path is a colon-separated list of directories. On other operating systems, the search path follows the conventions of those systems.
Center for Scientific Computing
Department of Mathematics
University of Utah
Salt Lake City, UT 84112
Tel: +1 801 581 5254
FAX: +1 801 581 4148
Email: email@example.com (Internet)
Original manual page by R. P. C. Rodgers, Computer Applications in Laboratory Medicine Project, UCSF, San Francisco, CA 94143. Rewritten for lptops versions 2 and 3 by NHFB.