- 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.
lptops normally produces a status report as it completes each page, showing the page number and line counts for each column on the page. For example, with three-column output in the default font, the report might look something like this: [1.53.53.53] [2.53.53.53] ... [47.23.14] [ok].
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.
The a2ps(1) utility also converts text to PostScript, with several interesting and useful features, but it is not a complete replacement for lptops either.
#.##bp big point (1in = 72bp) [120.000/Pbp cpi] #.##cc cicero (1cc = 12dd) [ 9.381/Pcc cpi] #.##cm centimeter [ 4.233/Pcm cpi] #.##dd didot point (1157dd = 1238pt) [112.569/Pdd cpi] #.##in inch [ 1.667/Pin cpi] #.##mm millimeter (10mm = 1cm) [ 42.333/Pmm cpi] #.##pc pica (1pc = 12pt) [ 10.038/Ppc cpi] #.##pt point (72.27pt = 1in) [120.450/Ppt cpi] #.##sp scaled point (65536sp = 1pt) [ 7.893/(Psp/1000000) cpi]The bracketed values give the number of characters per inch (cpi) for a point size of P units with the default fixed-width Courier font. For example, with point size 8bp, there are 120/8 = 15 characters per inch. With point size 1000000sp, there are 7.893 characters per inch.
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'.
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.
_______________________________________ 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 _______________________________________The remaining fonts are available only on enhanced printers, such as the Apple LaserWriter Plus.
______________________________________________ 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 ______________________________________________
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.
_____________________________________________________________________________ _____________________________________________________________________________ A 8.5in 11in Index:23x35 23in 35in B 11in 17in Index:24x36 24in 36in C 17in 22in Index:25.5x30.5 25.5in 30.5in D 22in 34in Index:28x44 28in 44in E 34in 44in A0 841mm 1189mm Computer-1411 14in 11in A1 594mm 841mm Legal 8.5in 13in A2 420mm 594mm Letter 8.5in 11in A3 297mm 420mm US-Legal 8.5in 14in A4 210mm 297mm A-L 11in 8.5in A5 148mm 210mm Computer-1411-L 11in 14in A6 105mm 148mm Legal-L 13in 8.5in A7 74mm 105mm Letter-L 11in 8.5in A8 52mm 74mm US-Legal-L 14in 8.5in A9 37mm 52mm COM10 4.1in 9.5in A10 26mm 37mm DL 110mm 220mm A0L 1189mm 841mm Executive 7.25in 10.5in A1L 841mm 594mm Monarch 3.9in 7.5in A2L 594mm 420mm A4Small 210mm 297mm A3L 420mm 297mm Ledger 11in 17in A4L 297mm 210mm LetterSmall 8.5in 11in A5L 210mm 148mm Note 8.5in 11in A6L 148mm 105mm Bond:8.5x11 8.5in 11in A7L 105mm 74mm Bond:8.5x14 8.5in 14in A8L 74mm 52mm Bond:11x17 11in 17in A9L 52mm 37mm Bond:17x22 17in 22in A10L 37mm 26mm Bond:17x28 17in 28in B0 1000mm 1414mm Bond:19x24 19in 24in B1 707mm 1000mm Bond:19x28 19in 28in B2 500mm 707mm Bond:22x34 22in 34in B3 353mm 500mm UncoatedBook:17.5x22.5 17.5in 22.5in B4 250mm 353mm UncoatedBook:19x25 19in 25in B5 176mm 250mm UncoatedBook:23x29 23in 29in B6 125mm 176mm UncoatedBook:23x35 23in 35in B0L 1414mm 1000mm UncoatedBook:25x38 25in 38in B1L 1000mm 707mm UncoatedBook:35x45 35in 45in B2L 707mm 500mm UncoatedBook:38x50 38in 50in B3L 500mm 353mm Text:17.5x22.5 17.5in 22.5in B4L 353mm 250mm Text:23x35 23in 35in B5L 250mm 176mm Text:25x38 25in 38in B6L 176mm 125mm Text:26x40 26in 40in C0 1294mm 916mm CoatedBook:19x25 19in 25in C1 916mm 647mm CoatedBook:23x29 23in 29in C2 647mm 458mm CoatedBook:23x35 23in 35in C3 458mm 323mm CoatedBook:25x38 25in 38in C4 323mm 229mm CoatedBook:35x45 35in 45in C5 229mm 161mm CoatedBook:38x50 38in 50in C6 161mm 114mm Cover:20x26 20in 26in Octavo 5in 8in Cover:23x35 23in 35in Sixmo 6.5in 8in Cover:25x38 25in 38in Quarto 8in 10in Cover:26x40 26in 40in Foolscap 8.5in 13in Index:22x28 22in 28in Government-legal 8.5in 13in Index:22.5x28.5 22.5in 28.5in Folio 8.3in 13in Index:23x29 23in 29in _____________________________________________________________________________
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, ps-file-server@adobe.com; 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.
It requires only a few standard UNIX/POSIX tools, and is expected to be trivially installable on virtually any modern UNIX or POSIX-conformant system.ftp://ftp.math.utah.edu/pub/lptops http://www.math.utah.edu/pub/lptops/
http://www.gnu.org/licenses/
Nelson H. F. Beebe Center for Scientific Computing University of Utah Department of Mathematics, 110 LCB Salt Lake City, UT 84112-0090 USA Tel: +1 801 581 5254 FAX: +1 801 581 4148 Email: beebe@math.utah.edu, beebe@acm.org, beebe@computer.org, beebe@ieee.org (Internet) Web: http://www.math.utah.edu/~beebe
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.