• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

LICENSE.d/H09-Mar-2016-1,4251,161

checknr/H09-Mar-2016-836626

col/H09-Mar-2016-678567

doc/H09-Mar-2016-21,39417,942

eqn/H09-Mar-2016-4,3073,308

grap/H09-Mar-2016-3,8923,319

include/H09-Mar-2016-1815

mpm/H09-Mar-2016-3,0822,488

pic/H09-Mar-2016-4,8744,159

picpack/H09-Mar-2016-1,044529

ptx/H09-Mar-2016-1,2981,120

refer/H03-May-2022-7,7346,315

soelim/H09-Mar-2016-249162

stuff/H09-Mar-2016-1,6151,231

tbl/H09-Mar-2016-4,2043,456

test/H09-Mar-2016-4,7713,989

troff/H09-Mar-2016-125,653111,380

vgrind/H09-Mar-2016-2,5851,832

.gitignoreH A D09-Mar-2016264 2019

CHANGESH A D09-Mar-20169.7 KiB328246

CHANGES_GRH A D09-Mar-201668.4 KiB1,2141,182

LICENSEH A D09-Mar-201617.9 KiB346278

READMEH A D09-Mar-20165.7 KiB138108

README.mdH A D09-Mar-20161.4 KiB3326

configureH A D09-Mar-20163.5 KiB179126

heirloom-doctools.specH A D09-Mar-20162.4 KiB8366

makefileH A D09-Mar-20161.7 KiB8974

mk.configH A D09-Mar-20161.7 KiB12299

pkginfoH A D09-Mar-2016282 1211

version.mkH A D09-Mar-201656 31

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

README.md

1For information about the Heirloom doctools please visit the project
2[webpage](http://n-t-roff.github.io/heirloom/doctools.html).
3
4Stable source code versions are available in the
5[releases archive](https://github.com/n-t-roff/heirloom-doctools/releases).
6
7Development snapshots can be downloaded as a zip archive with the "Download ZIP" button
8or with the git command
9```bash
10git clone https://github.com/n-t-roff/heirloom-doctools.git
11```
12Installation paths and compiler settings are adjusted in `mk.config`.
13The software is build with `make` and installed with `make install`.
14Generated files are removed with `make mrproper` afterwards.
15A git repository can be kept up-to-date with
16`git pull`.
17
18Bugs can be reported at the
19[issue list](https://github.com/n-t-roff/heirloom-doctools/issues).
20Please wait before creating a patch or a pull request,
21since someone else could already be working on this issue or has a solution.
22
23If there are any problems please send a mail to
24<troff [at] arcor [dot] de>.
25
26The GNU roff (groff) [mailing list](https://lists.gnu.org/mailman/listinfo/groff) is used for Heirloom doctools announcements and can also be used for discussions.
27The subject need to start with `[Heirloom]` in this case.
28
29It is recommended to subscribe to the groff mailing list for every ∗roff user.
30But please *don't* send Heirloom bug reports to the groff list, use the
31[issue list](https://github.com/n-t-roff/heirloom-doctools/issues)
32instead.
33