|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| LICENSE.d/ | H | 09-Mar-2016 | - | 1,425 | 1,161 |
| checknr/ | H | 09-Mar-2016 | - | 836 | 626 |
| col/ | H | 09-Mar-2016 | - | 678 | 567 |
| doc/ | H | 09-Mar-2016 | - | 21,394 | 17,942 |
| eqn/ | H | 09-Mar-2016 | - | 4,307 | 3,308 |
| grap/ | H | 09-Mar-2016 | - | 3,892 | 3,319 |
| include/ | H | 09-Mar-2016 | - | 18 | 15 |
| mpm/ | H | 09-Mar-2016 | - | 3,082 | 2,488 |
| pic/ | H | 09-Mar-2016 | - | 4,874 | 4,159 |
| picpack/ | H | 09-Mar-2016 | - | 1,044 | 529 |
| ptx/ | H | 09-Mar-2016 | - | 1,298 | 1,120 |
| refer/ | H | 03-May-2022 | - | 7,734 | 6,315 |
| soelim/ | H | 09-Mar-2016 | - | 249 | 162 |
| stuff/ | H | 09-Mar-2016 | - | 1,615 | 1,231 |
| tbl/ | H | 09-Mar-2016 | - | 4,204 | 3,456 |
| test/ | H | 09-Mar-2016 | - | 4,771 | 3,989 |
| troff/ | H | 09-Mar-2016 | - | 125,653 | 111,380 |
| vgrind/ | H | 09-Mar-2016 | - | 2,585 | 1,832 |
| .gitignore | H A D | 09-Mar-2016 | 264 | 20 | 19 |
| CHANGES | H A D | 09-Mar-2016 | 9.7 KiB | 328 | 246 |
| CHANGES_GR | H A D | 09-Mar-2016 | 68.4 KiB | 1,214 | 1,182 |
| LICENSE | H A D | 09-Mar-2016 | 17.9 KiB | 346 | 278 |
| README | H A D | 09-Mar-2016 | 5.7 KiB | 138 | 108 |
| README.md | H A D | 09-Mar-2016 | 1.4 KiB | 33 | 26 |
| configure | H A D | 09-Mar-2016 | 3.5 KiB | 179 | 126 |
| heirloom-doctools.spec | H A D | 09-Mar-2016 | 2.4 KiB | 83 | 66 |
| makefile | H A D | 09-Mar-2016 | 1.7 KiB | 89 | 74 |
| mk.config | H A D | 09-Mar-2016 | 1.7 KiB | 122 | 99 |
| pkginfo | H A D | 09-Mar-2016 | 282 | 12 | 11 |
| version.mk | H A D | 09-Mar-2016 | 56 | 3 | 1 |
README
1README file for the Heirloom Documentation Tools
2================================================
3
4The Heirloom Documentation Tools provide troff, nroff, and relat-
5ed utilities to format manual pages and other documents for out-
6put on terminals and printers. They are portable and enhanced
7versions of the utilities released by Sun as part of OpenSolaris,
8and, for pic, grap, mpm, and some minor parts, by Lucent as part
9of Plan 9.
10
11nroff is most prominently used to format Unix manual pages for
12viewing them on a terminal. This implementation consumes rela-
13tively few system resources and is thus suitable for small system
14distributions. It has been enhanced to generate UTF-8 output.
15
16troff generates typesetter output from the same document source
17code as nroff. Thus a special use of it is to prepare manual
18pages for printing. troff is a general-purpose typesetting pro-
19cessor, though. Significant features have been added in this im-
20plementation; see the "Nroff/Troff User's Manual", "Font Handling
21in Troff with PostScript Devices", and "Justification in Heirloom
22Troff" for details. All documents are included in the "doc" sub-
23directory of the source code distribution; compiled PDF files can
24be downloaded from the project home page.
25
26Currently, troff is almost exclusively targeted at generating
27output for PostScript interpreters. Its principal device in-
28dependence has been retained, though; the intermediate output
29language is largely unchanged. The troff driver for the Autolo-
30gic APS-5 is still included. It is untested since it would be
31surprising to find a phototypesetter of this type that is still
32in use, but serves as an experimentation aid for device indepen-
33dence.
34
35The source code has been compiled successfully on:
36
37OpenBSD CURRENT
38NetBSD 6.1.5, 7, CURRENT
39FreeBSD 8.4, 9.3, 10.1, CURRENT
40Linux Slackware 14.1, OpenSuse 13.2
41Mac OS X
42SmartOS
43
44To build and install manually:
45
46- Adjust the installation paths and compiler settings in the file
47 "mk.config", which is in makefile syntax.
48
49- Execute "make", followed by "make install". "make mrproper"
50 will destroy all generated files.
51
52troff currently reads several binary files which are built dur-
53ing the compilation process. It is thus not possible to cross-
54compile.
55
56The locale-dependent character input in troff assumes that the C
57library represents wchar_t values as Unicode characters. This is
58the case on any modern Unix system.
59
60The "pm" utility requires a C++ compiler. If such a compiler is
61not available, delete the "mpm" directory from the list of sub-
62directories to build in the top-level "makefile". The "pm" util-
63ity is rarely used, so it should not be too dramatic if it is
64missing.
65
66In order to use the utilities for formatting manual pages, note
67the following:
68
69- You will normally want to use "nroff -Tlocale". By default,
70 nroff generates output for a Teletype Model 37 with half-line
71 capabilities which will lead to weird results with any xterm or
72 CRT terminal.
73
74- tbl(1) should be used with option -Tlocale when producing input
75 for nroff and with option -g when producing input for troff.
76
77- "nroff -Tlocale" will generate UTF-8 output if permitted by the
78 current setting of the LC_CTYPE locale, and the same as "nroff
79 -Tlp" otherwise.
80
81- Macro names are normally restricted to two characters for com-
82 patibility with previous versions of nroff. With "nroff -mg",
83 long macro names and other groff extensions are accepted. You
84 will normally want to enable this because you are much more
85 likely to encounter manual pages written with groff in mind
86 than manual pages that require strict Unix compatibility.
87
88- You need to filter the output of nroff through "col -x".
89
90- You need at least the "an" macro file to format manual pages.
91 If you also want to use the Berkeley "doc" macros, you also
92 need "doc*" and "andoc". "nroff -mandoc" will then switch au-
93 tomatically between the two macro packages.
94
95- Heirloom nroff can optimize line breaking over whole para-
96 graphs. This results in fewer ugly holes of successive spaces
97 in the output. To enable it with manual pages, add "-mpadj" to
98 the command line.
99
100- It is recommended that the "-msafe" macro package is used when
101 viewing manual pages. It will remove those requests that al-
102 low to call programs or to write to files. If your man com-
103 mand runs with privileges, you then also need to ensure that
104 the "TROFFMACS" environment variable is unset when nroff is ex-
105 ecuted. Otherwise, a malicious user might replace the "safe"
106 macro package with his own version.
107
108- Thus a complete pipeline to format manual pages for viewing is:
109
110 tbl -Tlocale input.1 | neqn | nroff -Tlocale -mg -msafe \
111 -mpadj -mandoc | col -x
112
113- If you like italic text to appear underlined and boldfaced text
114 to appear bold on a CRT or X Window System terminal, also add a
115 call to the "ul" filter:
116
117 tbl -Tlocale input.1 | neqn | nroff -Tlocale -mg -msafe \
118 -mpadj -mandoc | col -x | ul
119
120- To print manual pages with troff, use
121
122 tbl -g input.1 | eqn | troff -mg -msafe -mpadj -mandoc | \
123 dpost | lp
124
125- You should of course configure your "man" command such that
126 it executes these pipelines automatically for you. For the
127 "man" command from the Heirloom Toolchest, suitable entries in
128 "/etc/default/man" are:
129
130 NROFF=/usr/local/ucb/nroff -Tlocale -mg -msafe -mpadj
131 TROFF=/usr/local/ucb/troff -mg -msafe -mpadj
132 TBL=/usr/local/ucb/tbl -Tlocale
133 EQN=/usr/local/ucb/eqn
134 NEQN=/usr/local/ucb/neqn
135 TCAT=/usr/local/ucb/dpost
136 COL=/usr/local/ucb/col -x | ul
137 MACSET=-mandoc
138