beta-0.89.2
[luatex.git] / source / texk / web2c / man / README
blob7f11613a67be546b61cff6da2dbce87255c59b8a
1 (This file written by Nelson H. F. Beebe <beebe@math.utah.edu>.)
3 This directory contains UNIX manual pages for TeXware and MFware.
5 Here are some guidelines for writing UNIX manual page files, based on
6 the standards used by Sun Microsystems.  The manual pages in this
7 directory have been revised to conform to these guidelines.
9 *** The sections of a manual page are identified by these headings:
11 .TH PROGRAM 1 "dd month yyyy"
12 .SH NAME
13 .SH SYNOPSIS
14 .SH DESCRIPTION
15 .SH OPTIONS
16 .SH ENVIRONMENT
17 .SH FILES
18 .SH "SEE ALSO"
19 .SH AUTHOR
21 Additional sections may be supplied, but the above section order
22 should be preserved.  If you are adding a new section, try to find
23 several examples in existing UNIX manual pages to justify the header
24 name you choose.
26 To improve readability of the [nt]roff man page files in this
27 directory, each section header has been prefixed by a comment line of
28 the form
29 .\"=====================================================================
32 ------------------------------------------------------------------------
34 *** The
36 .TH PROGRAM 1 "dd month yyyy"
38 line should be the first [nt]roff dotted command in the .man file,
39 other than comments, which begin with the 3-character sequence .\".
41 The PROGRAM name should be spelled entirely in uppercase letters.
43 The single character following PROGRAM is the manual page section,
44 generally 1 for user commands.  Any character from the set [1-8nl] is
45 recognized by the UNIX man command, but the sections have specific
46 meanings (1=user commands, 2=system calls, 3=library routines, 4=special
47 files, 5=file formats and conventions, 6=games, 7=macro packages and
48 language conventions, 8=maintenance, l=local, and n=new).
50 Historically, man page files were stored in /usr/man/man[1-8nl], with
51 local additions to /usr/man/manl.  That approach offered no
52 subdivision of local additions into sections, so the trend today is to
53 leave the /usr/man tree in the state supplied by the vendor, and to
54 maintain a separate tree, /usr/man/man[1-8nl], to hold local
55 additions.  Most UNIX man implementations support a MANPATH variable
56 to specify a search path, such as /usr/man:/usr/local/man.
58 If your man command doesn't support a MANPATH variable, get the
59 freely-available man implementation man-1.0.tar.Z available on several
60 Internet archive sites, including gatekeeper.dec.com in
61 /.8/GNU/man-1.0.tar.Z.  Some bugs exist in that version, and fixes were
62 supplied to the program's author on 12 December 1992, so look for a new
63 version, or ask Nelson Beebe <beebe@math.utah.edu> for a set of patches.
64 This new man implementation has some nice features, including support
65 for compressed files, and checking of formatted and raw file time stamps
66 to decide whether to reformat or not.  Furthermore, it can be configured
67 to use either [nt]roff, or GNU groff; some UNIX vendors charge extra for
68 [nt]roff, so groff may offer a cheaper man page implementation.
70 The last argument to .TH is the date in the form 01 December 1992; the
71 month is NOT abbreviated.
74 ------------------------------------------------------------------------
76 *** Following
77 .SH NAME
78 should be a single line with NO macros, such as
80 bibtex \- make a bibliography for (La)TeX
82 This line is very important, because it is used by the "man -k" and
83 "apropos" commands to look up commands by keywords; every word in the
84 line is a potential keyword match.
87 ------------------------------------------------------------------------
89 *** Following
90 .SH SYNOPSIS
91 there should be one or more lines in the form
93 .B vftovp
95 .B \-verbose
98 .BI \-charcode-format =format
100 .I vf_file_name
101 .I tfm_file_name
103 .I vpl_file_name
106 Program names and option switches are typeset in bold type (.B), and
107 file names in italics (.I).  Switch values are in italics.
109 Give option switches in alphabetical order in the SYNOPSIS
110 section, and their descriptions in the same order in the OPTIONS
111 section.
114 ------------------------------------------------------------------------
116 *** Here are some general [nt]roff hints for writing the
117 .SH DESCRIPTION
118 section.
121 *** Separate paragraphs by a .PP command, not by blank lines.
124 *** When using the multi-font selectors, like .BI (bold, then italic),
125 remember that fonts alternate in the following space-separated words:
127 .BI aaa bbb ccc ddd
129 will typeset aaa and cccc in bold, and bbb and ddd in italic, with NO
130 intervening spaces, so the result here will be aaabbbcccddd.  If you
131 want spaces between the words, use quotation marks:
133 .BI "aaa " "bbb " "ccc " ddd
135 will produce aaa bbb ccc ddd.
137 Use [nt]roff dotted font change sequences (.I, .B, .BI, .BR, ...)
138 instead of the \fX...\fP alternatives.  The single exception is when
139 you need quotation marks in italics, such as \fIsetenv FOOBAR "foo
140 bar"\fP.
143 *** Represent en dashes by the current font minus (\-), and use the
144 same character in front of option switches.  Hyphens in words, as
145 ``multi-font'', are written with the ASCII minus sign.
148 *** Quotation marks are [nt]roff grouping commands, analogous to curly
149 braces in TeX files.  They will NOT survive in the formatted output.
150 If you want typeset quotation marks, use ``phrase'', just as in TeX.
153 *** Ellipses (...) in [nt]roff are coded as .\|.\|., for the same
154 reason that \ldots{} is used in TeX instead of ....
157 *** UNIX is a trademark of AT&T Bell Laboratories and must be spelled
158 in uppercase letters.
161 *** Watch out for spaces.  Unlike TeX, [nt]roff preserve ALL input
162 spaces.  This means you cannot indent [nt]roff input for readability.
163 Two spaces should follow a sentence-ending period, and otherwise, only
164 one space should be used.  Tabs are special in [nt]roff; they are used
165 to separate columns of tables, like & in TeX, and no other character
166 can be used for that purpose.  The man page files in this directory
167 contain no tabs, and trailing blanks have been stripped from all
168 files.
171 *** Do not used fixed indentation dimensions for displayed material.
172 Instead, use .RS and .RE to mark the indented paragraphs, with .IP to
173 separate paragraphs:
176 Blah blah blah blah blah blah blah blah blah.
177 Blah blah blah blah blah blah blah blah blah.
179 Blah blah blah blah blah blah blah blah blah.
180 Blah blah blah blah blah blah blah blah blah.
184 *** Use macros for phrases that require special typesetting, such as
185 the TeX logo, and provide both nroff and troff definitions:
187 .if n .ds AB nroff-definition
188 .if t .ds AB troff-definition
190 Macro names are exactly 2 characters long, and are referenced by \*(
191 prefixed to their names, e.g. \*(AB.
193 If a macro expansion requires another macro, it must be given after
194 that macro.  For example, the BibTeX and LaTeX macros follow the TeX
195 macro so they can use \*(TX in their definitions.
197 Suitable macros have been provided for TeX, BibTeX, LaTeX, Metafont,
198 and Web, and adjusted for troff's default Times Roman typeface to
199 match their appearance with Computer Modern typefaces.
202 ------------------------------------------------------------------------
204 *** The 
205 .SH ENVIRONMENT
206 section should list all the relevant environment variables, with a brief
207 description and system defaults if appropriate.
210 *** Environment variables are spelled in uppercase letters, e.g.,
211 TEXFONTS, and NO font size changes are made around them.  When font
212 sizes were changed in the past, many inconsistencies were present, so
213 the practice has been abandoned.
216 *** Do not use fixed dimensions for indented labelled paragraphs.
217 Instead, use the width of the longest label, plus 2n, as follows:
219 .TP \w'LONGESTLABEL'u+2n
220 LABEL
221 Blah blah blah blah blah blah blah blah blah.
223 LONGESTLABEL
224 Blah blah blah blah blah blah blah blah blah.
225 Blah blah blah blah blah blah blah blah blah.
227 If the longest label is extremely long, pick a somewhat shorter one so
228 as to avoid having very short paragraph lines.
231 ------------------------------------------------------------------------
233 *** Spell TeX control sequences in Roman letters, doubling the
234 backslash, e.g. \\input, or for better visibility, use italics
235 with the backslash represented as \e:
237 .I \einput
239 Although some [nt]roff implementations support a typewriter font which
240 is conventional for TeX control sequences, historically only roman,
241 bold, italic, and special fonts were available.
244 *** These manual pages in the *.man form are filtered by sedscript to
245 expand @XYZ@ into something else, producing corresponding *.1 files
246 which are installed in the system manual page directories. This is
247 used to insert local paths into the manual pages, so that for example
248 @TEXINPUTS@ is replaced by the local default TEXINPUTS search path.
249 Such paths are set at installation time in the top-level Makefile.
252 *** You can use the UNIX checknr utility to do a rudimentary validation of
253 your manual page files, e.g.
255         checknr -c.BI.BR.IR.IB.RB.RI tex.man
257 The -c.BI.BR.IR.IB.RB.RI is needed because checknr doesn't know about
258 the -man document style, and otherwise complains about those font
259 change commands.  The command "make check" will run checknr with each
260 of the *.1 files.