]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" (C) Copyright 1992-1999 Rickard E. Faith and David A. Wheeler |
2 | .\" (faith@cs.unc.edu and dwheeler@ida.org) | |
3 | .\" | |
4 | .\" Permission is granted to make and distribute verbatim copies of this | |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
12 | .\" | |
13 | .\" Since the Linux kernel and libraries are constantly changing, this | |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
20 | .\" | |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
23 | .\" | |
24 | .\" Modified Sun Jul 25 11:06:05 1993 by Rik Faith (faith@cs.unc.edu) | |
25 | .\" Modified Sat Jun 8 00:39:52 1996 by aeb | |
26 | .\" Modified Wed Jun 16 23:00:00 1999 by David A. Wheeler (dwheeler@ida.org) | |
27 | .\" Modified Thu Jul 15 12:43:28 1999 by aeb | |
28 | .\" [todo: split this into man.7 describing the macros | |
29 | .\" and manpage.7 describing the Linux man page conventions] | |
30 | .\" Modified Sun Jan 6 18:26:25 2002 by Martin Schulze <joey@infodrom.org> | |
31 | .\" Modified Tue Jul 27 20:12:02 2004 by Colin Watson <cjwatson@debian.org> | |
32 | .\" | |
33 | .TH MAN 7 2004-07-27 "Linux" "Linux Programmer's Manual" | |
34 | .SH NAME | |
35 | man \- macros to format man pages | |
36 | .SH SYNOPSIS | |
37 | .B groff \-Tascii \-man | |
38 | .I file | |
39 | \&... | |
40 | .LP | |
41 | .B groff \-Tps \-man | |
42 | .I file | |
43 | \&... | |
44 | .LP | |
45 | .B man | |
46 | .RI [ section ] | |
47 | .I title | |
48 | .SH DESCRIPTION | |
49 | This manual page explains the | |
50 | .B "groff tmac.an" | |
51 | macro package (often called the | |
52 | .B man | |
53 | macro package) and related conventions for creating manual (man) pages. | |
54 | This macro package should be used by developers when | |
55 | writing or porting man pages for Linux. It is fairly compatible with other | |
56 | versions of this macro package, so porting man pages should not be a major | |
57 | problem (exceptions include the NET-2 BSD release, which uses a totally | |
58 | different macro package called mdoc; see | |
59 | .BR mdoc (7)). | |
60 | .PP | |
61 | Note that NET-2 BSD mdoc man pages can be used with | |
62 | .B groff | |
63 | simply by specifying the | |
64 | .B \-mdoc | |
65 | option instead of the | |
66 | .B \-man | |
67 | option. Using the | |
68 | .B \-mandoc | |
69 | option is, however, recommended, since this will automatically detect which | |
70 | macro package is in use. | |
71 | .SH PREAMBLE | |
72 | The first command in a man page (after comment lines) should be | |
73 | .RS | |
74 | .sp | |
75 | .B \&.TH | |
76 | .IR "title section date source manual" , | |
77 | .sp | |
78 | .RE | |
79 | where: | |
80 | .RS | |
81 | .TP 10 | |
82 | .I title | |
83 | The title of the man page (e.g., | |
84 | .IR MAN ). | |
85 | .TP | |
86 | .I section | |
87 | The section number the man page should be placed in (e.g., | |
88 | .IR 7 ). | |
89 | .TP | |
90 | .I date | |
91 | The date of the last revision\(emremember to change this every time a | |
92 | change is made to the man page, since this is the most general way of doing | |
93 | version control. | |
94 | .TP | |
95 | .I source | |
96 | The source of the command. | |
97 | .sp | |
98 | For binaries, use something like: | |
99 | .IR GNU ", " NET-2 ", " "SLS Distribution" ", " "MCC Distribution" . | |
100 | .sp | |
101 | For system calls, use the version of the kernel that you are currently | |
102 | looking at: | |
103 | .IR "Linux 0.99.11" . | |
104 | .sp | |
105 | For library calls, use the source of the function: | |
b14d4aa5 | 106 | .IR GNU ", " "4.3BSD" ", " "Linux DLL 4.4.1" . |
fea681da MK |
107 | .TP |
108 | .I manual | |
109 | The title of the manual (e.g., | |
110 | .IR "Linux Programmer's Manual" ). | |
111 | .RE | |
112 | .PP | |
113 | Note that BSD mdoc-formatted pages begin with the | |
114 | .B Dd | |
115 | command, not the | |
116 | .B TH | |
117 | command. | |
118 | .PP | |
119 | The manual sections are traditionally defined as follows: | |
120 | .RS | |
121 | .TP 10 | |
122 | .B 1 Commands | |
123 | Those commands that can be executed by the user from within | |
124 | a shell. | |
125 | .TP | |
126 | .B 2 System calls | |
127 | Those functions which must be performed by the kernel. | |
128 | .TP | |
129 | .B 3 Library calls | |
130 | Most of the | |
131 | .I libc | |
132 | functions, such as | |
133 | .BR qsort (3). | |
134 | .TP | |
135 | .B 4 Special files | |
136 | Files found in | |
137 | .IR /dev . | |
138 | .TP | |
139 | .B 5 File formats and conventions | |
140 | The format for | |
141 | .I /etc/passwd | |
142 | and other human-readable files. | |
143 | .TP | |
144 | .B 6 Games | |
145 | .TP | |
146 | .B 7 Conventions and miscellaneous | |
147 | A description of the standard file system layout, network protocols, | |
148 | ASCII and other character codes, this man page, and other things. | |
149 | .TP | |
150 | .B 8 System management commands | |
151 | Commands like | |
152 | .BR mount (8), | |
153 | many of which only root can execute. | |
154 | .TP | |
155 | .B 9 Kernel routines | |
156 | This is an obsolete manual section. | |
157 | Once it was thought a good idea to document the Linux kernel here, | |
158 | but in fact very little has been documented, and the documentation | |
159 | that exists is outdated already. There are better sources of | |
160 | information for kernel developers. | |
161 | .RE | |
162 | .SH SECTIONS | |
163 | Sections are started with | |
164 | .B \&.SH | |
165 | followed by the heading name. If the name contains spaces and appears | |
166 | on the same line as | |
167 | .BR \&.SH , | |
168 | then place the heading in double quotes. Traditional or suggested | |
169 | headings include: | |
170 | NAME, SYNOPSIS, DESCRIPTION, RETURN VALUE, | |
171 | EXIT STATUS, ERROR HANDLING, ERRORS, | |
172 | OPTIONS, USAGE, EXAMPLES, FILES, ENVIRONMENT, DIAGNOSTICS, SECURITY, | |
173 | CONFORMING TO, NOTES, BUGS, AUTHOR, and SEE ALSO. | |
174 | Where a traditional heading would apply, please use it; | |
175 | this kind of consistency can make the information easier to understand. | |
176 | However, feel free to create your own headings if they make things easier | |
177 | to understand. | |
178 | The only required heading is NAME, which should be the first section and | |
179 | be followed on the next line by a one line description of the program: | |
180 | .RS | |
181 | .sp | |
182 | \&.SH NAME | |
183 | .br | |
184 | chess \\- the game of chess | |
185 | .sp | |
186 | .RE | |
187 | It is extremely important that this format is followed, and that there is a | |
188 | backslash before the single dash which follows the command name. This | |
189 | syntax is used by the | |
190 | .BR makewhatis (8) | |
191 | program to create a database of short command descriptions for the | |
192 | .BR whatis (1) | |
193 | and | |
194 | .BR apropos (1) | |
195 | commands. | |
196 | .PP | |
197 | Some other traditional sections have the following contents: | |
198 | .TP 14 | |
199 | .B SYNOPSIS | |
200 | briefly describes the command or function's interface. | |
201 | For commands, this shows the syntax of the command and its arguments | |
202 | (including options); | |
203 | boldface is used for as-is text and italics are used to indicate replaceable | |
204 | arguments. Brackets ([]) surround optional arguments, vertical bars (|) | |
205 | separate choices, and ellipses (\&...) can be repeated. | |
206 | For functions, it shows any required data declarations or | |
207 | .B #include | |
208 | directives, followed by the function declaration. | |
209 | .TP | |
210 | .B DESCRIPTION | |
211 | gives an explanation of what the command, function, or format does. | |
212 | Discuss how it interacts with files and standard input, and what it | |
213 | produces on standard output or standard error. | |
214 | Omit internals and implementation details unless they're critical for | |
215 | understanding the interface. | |
216 | Describe the usual case; for information on options use the | |
217 | .B OPTIONS | |
218 | section. | |
219 | If there is some kind of input grammar or complex set of subcommands, | |
220 | consider describing them in a separate | |
221 | .B USAGE | |
222 | section (and just place an overview in the | |
223 | .B DESCRIPTION | |
224 | section). | |
225 | .TP | |
226 | .B RETURN VALUE | |
227 | gives a | |
228 | list of the values the library routine will return to the caller | |
229 | and the conditions that cause these values to be returned. | |
230 | .TP | |
231 | .B EXIT STATUS | |
232 | lists the possible exit status values or a program and | |
233 | the conditions that cause these values to be returned. | |
234 | .TP | |
235 | .B OPTIONS | |
236 | describes the options accepted by the program and how they change | |
237 | its behavior. | |
238 | .TP | |
239 | .B USAGE | |
240 | describes the grammar of any sublanguage this implements. | |
241 | .TP | |
242 | .B EXAMPLES | |
243 | provides one or more examples describing how this function, file or | |
244 | command is used. | |
245 | .TP | |
246 | .B FILES | |
247 | lists the files the program or function uses, such as | |
248 | configuration files, startup files, | |
249 | and files the program directly operates on. | |
250 | Give the full pathname of these files, and use the installation | |
251 | process to modify the directory part to match user preferences. | |
252 | For many programs, the default installation location is in | |
253 | .IR /usr/local , | |
254 | so your base manual page should use | |
255 | .I /usr/local | |
256 | as the base. | |
257 | .TP | |
258 | .B ENVIRONMENT | |
259 | lists all environment variables that affect your program or function | |
260 | and how they affect it. | |
261 | .TP | |
262 | .B DIAGNOSTICS | |
263 | gives an overview of the most common error messages and how to | |
264 | cope with them. You don't need to explain system error messages | |
265 | or fatal signals that can appear during execution of any program | |
266 | unless they're special in some way to your program. | |
267 | .TP | |
268 | .B SECURITY | |
269 | discusses security issues and implications. | |
270 | Warn about configurations or environments that should be avoided, | |
271 | commands that may have security implications, and so on, especially | |
272 | if they aren't obvious. | |
273 | Discussing security in a separate section isn't necessary; | |
274 | if it's easier to understand, place security information in the | |
275 | other sections (such as the | |
276 | .B DESCRIPTION | |
277 | or | |
278 | .B USAGE | |
279 | section). | |
280 | However, please include security information somewhere! | |
281 | .TP | |
282 | .B CONFORMING TO | |
283 | describes any standards or conventions this implements. | |
284 | .TP | |
285 | .B NOTES | |
286 | provides miscellaneous notes. | |
287 | .TP | |
288 | .B BUGS | |
289 | lists limitations, known defects or inconveniences, | |
290 | and other questionable activities. | |
291 | .TP | |
292 | .B AUTHOR | |
293 | lists authors of the documentation or program so you can mail in bug | |
294 | reports. | |
295 | .TP | |
296 | .B SEE ALSO | |
297 | lists related man pages in alphabetical order, possibly followed by | |
298 | other related pages or documents. | |
299 | Conventionally this is the last section. | |
300 | .SH FONTS | |
301 | Although there are many arbitrary conventions for man pages in the UNIX | |
302 | world, the existence of several hundred Linux-specific man pages defines our | |
303 | font standards: | |
304 | .IP | |
305 | For functions, the arguments are always specified using italics, | |
306 | .IR "even in the SYNOPSIS section" , | |
307 | where the rest of the function is specified in bold: | |
308 | .RS | |
309 | .BI "int myfunction(int " argc ", char **" argv ); | |
310 | .RE | |
311 | .IP | |
312 | Filenames are always in italics (e.g., | |
313 | .IR "/usr/include/stdio.h" ), | |
314 | except in the SYNOPSIS section, where included files are in bold (e.g., | |
315 | .BR "#include <stdio.h>" ). | |
316 | .IP | |
317 | Special macros, which are usually in upper case, are in bold (e.g., | |
318 | .BR MAXINT ). | |
319 | .IP | |
320 | When enumerating a list of error codes, the codes are in bold (this list | |
321 | usually uses the | |
322 | .B \&.TP | |
323 | macro). | |
324 | .IP | |
325 | Any reference to another man page (or to the subject of the current man | |
326 | page) is in bold. If the manual section number is given, it is given in | |
327 | Roman (normal) font, without any spaces (e.g., | |
328 | .BR man (7)). | |
329 | .LP | |
330 | The commands to select the type face are: | |
331 | .TP 4 | |
332 | .B \&.B | |
333 | Bold | |
334 | .TP | |
335 | .B \&.BI | |
336 | Bold alternating with italics | |
337 | (especially useful for function specifications) | |
338 | .TP | |
339 | .B \&.BR | |
340 | Bold alternating with Roman | |
341 | (especially useful for referring to other | |
342 | manual pages) | |
343 | .TP | |
344 | .B \&.I | |
345 | Italics | |
346 | .TP | |
347 | .B \&.IB | |
348 | Italics alternating with bold | |
349 | .TP | |
350 | .B \&.IR | |
351 | Italics alternating with Roman | |
352 | .TP | |
353 | .B \&.RB | |
354 | Roman alternating with bold | |
355 | .TP | |
356 | .B \&.RI | |
357 | Roman alternating with italics | |
358 | .TP | |
359 | .B \&.SB | |
360 | Small alternating with bold | |
361 | .TP | |
362 | .B \&.SM | |
363 | Small (useful for acronyms) | |
364 | .LP | |
365 | Traditionally, each command can have up to six arguments, but the GNU | |
366 | implementation removes this limitation (you might still want to limit | |
367 | yourself to 6 arguments for portability's sake). | |
368 | Arguments are delimited by | |
369 | spaces. Double quotes can be used to specify an argument which contains | |
370 | spaces. All of the arguments will be printed next to each other without | |
371 | intervening spaces, so that the | |
372 | .B \&.BR | |
373 | command can be used to specify a word in bold followed by a mark of | |
374 | punctuation in Roman. | |
375 | If no arguments are given, the command is applied to the following line | |
376 | of text. | |
377 | .SH "OTHER MACROS AND STRINGS" | |
378 | .PP | |
379 | Below are other relevant macros and predefined strings. | |
380 | Unless noted otherwise, all macros | |
381 | cause a break (end the current line of text). | |
382 | Many of these macros set or use the "prevailing indent." | |
383 | The "prevailing indent" value is set by any macro with the parameter | |
384 | .I i | |
385 | below; | |
386 | macros may omit | |
387 | .I i | |
388 | in which case the current prevailing indent will be used. | |
389 | As a result, successive indented paragraphs can use the same indent without | |
390 | re-specifying the indent value. | |
391 | A normal (non-indented) paragraph resets the prevailing indent value | |
392 | to its default value (0.5 inches). | |
393 | By default a given indent is measured in ens; try to ens or ems as units for | |
394 | indents, since these will automatically adjust to font size changes. | |
395 | The other key macro definitions are: | |
396 | .SS "Normal Paragraphs" | |
397 | .TP 9m | |
398 | .B \&.LP | |
399 | Same as | |
400 | .B \&.PP | |
401 | (begin a new paragraph). | |
402 | .TP | |
403 | .B \&.P | |
404 | Same as | |
405 | .B \&.PP | |
406 | (begin a new paragraph). | |
407 | .TP | |
408 | .B \&.PP | |
409 | Begin a new paragraph and reset prevailing indent. | |
410 | .SS "Relative Margin Indent" | |
411 | .TP 9m | |
412 | .BI \&.RS " i" | |
4d9b6984 | 413 | Start relative margin indent: moves the left margin |
fea681da MK |
414 | .I i |
415 | to the right (if | |
416 | .I i | |
417 | is omitted, the prevailing indent value is used). | |
418 | A new prevailing indent is set to 0.5 inches. | |
419 | As a result, all following paragraph(s) will be | |
420 | indented until the corresponding | |
421 | .BR \&.RE . | |
422 | .TP | |
423 | .B \&.RE | |
424 | End relative margin indent and | |
425 | restores the previous value of the prevailing indent. | |
426 | .SS "Indented Paragraph Macros" | |
427 | .TP 9m | |
428 | .BI \&.HP " i" | |
429 | Begin paragraph with a hanging indent | |
430 | (the first line of the paragraph is at the left margin of | |
431 | normal paragraphs, and the rest of the paragraph's lines are indented). | |
432 | .TP | |
433 | .BI \&.IP " x i" | |
434 | Indented paragraph with optional hanging tag. | |
435 | If the tag | |
436 | .I x | |
437 | is omitted, the entire following paragraph is indented by | |
438 | .IR i . | |
439 | If the tag | |
440 | .I x | |
441 | is provided, it is hung at the left margin | |
442 | before the following indented paragraph | |
443 | (this is just like | |
444 | .BR \&.TP | |
445 | except the tag is included with the command instead of being on the | |
446 | following line). | |
447 | If the tag is too long, the text after the tag will be moved down to the | |
448 | next line (text will not be lost or garbled). | |
449 | For bulleted lists, use this macro with \e(bu (bullet) or \e(em (em dash) | |
450 | as the tag, and for numbered lists, use the number or letter followed by | |
451 | a period as the tag; | |
452 | this simplifies translation to other formats. | |
453 | .TP | |
454 | .BI \&.TP " i" | |
455 | Begin paragraph with hanging tag. The tag is given on the next line, but | |
456 | its results are like those of the | |
457 | .B \&.IP | |
458 | command. | |
459 | .SS "Hypertext Link Macros" | |
dd1b9170 MK |
460 | (Feature supported with |
461 | .B groff | |
462 | only.) | |
fea681da MK |
463 | In order to use hypertext link macros, it is necessary to load the |
464 | .B www.tmac | |
465 | macro package. | |
466 | Use the request | |
467 | .B .mso www.tmac | |
468 | to do this. | |
469 | .TP 9m | |
470 | .BI \&.URL " url link trailer" | |
471 | Inserts a hypertext link to the URI (URL) | |
472 | .IR url , | |
473 | with | |
474 | .I link | |
475 | as the text of the link. | |
476 | The | |
477 | .I trailer | |
478 | will be printed immediately afterwards. | |
479 | When generating HTML this should translate into the HTML command | |
480 | \fB<A HREF="\fP\fIurl\fP\fB">\fIlink\fP\fB</A>\fP\fItrailer\fP. | |
481 | .\" The following is a kludge to get a paragraph into the listing. | |
482 | .TP | |
483 | .B " " | |
484 | This and other related macros are new, and | |
485 | many tools won't do anything with them, but | |
486 | since many tools (including troff) will simply ignore undefined macros | |
487 | (or at worst insert their text) these are safe to insert. | |
dd1b9170 MK |
488 | .\" The following is a kludge to get a paragraph into the listing. |
489 | .TP | |
490 | .B " " | |
491 | It can be useful to define your own | |
492 | .B URL | |
493 | macro in manual pages for the benefit of those viewing it with a roff | |
494 | viewer other than | |
495 | .BR groff . | |
496 | That way, the URL, link text, and trailer text (if any) are still visible. | |
497 | .\" The following is a kludge to get a paragraph into the listing. | |
498 | .TP | |
499 | .B " " | |
500 | Here's an example: | |
501 | .RS 1.5i | |
502 | \&.de URL | |
503 | .br | |
504 | \\\\$2 \\(laURL: \\\\$1 \\(ra\\\\$3 | |
505 | .br | |
506 | \&.. | |
507 | .br | |
508 | \&.if \\n[.g] .mso www.tmac | |
509 | .br | |
510 | \&.TH | |
511 | .I ... | |
512 | .br | |
513 | .I (later in the page) | |
514 | .br | |
515 | This software comes from the | |
516 | .br | |
517 | \&.URL "http://www.gnu.org/" "GNU Project" " of the" | |
518 | .br | |
519 | \&.URL "http://www.fsf.org/" "Free Software Foundation" . | |
520 | .RE | |
521 | .\" The following is a kludge to get a paragraph into the listing. | |
522 | .TP | |
523 | .B " " | |
524 | In the above, if | |
525 | .B groff | |
526 | is being used, the | |
527 | .B www.tmac | |
528 | macro package's definition of the URL macro will supersede the locally | |
529 | defined one. | |
fea681da MK |
530 | .PP |
531 | A number of other link macros are available. See | |
532 | .BR groff_www (7) | |
533 | for more details. | |
534 | .SS "Miscellaneous Macros" | |
535 | .TP 9m | |
536 | .B \&.DT | |
537 | Reset tabs to default tab values (every 0.5 inches); | |
538 | does not cause a break. | |
539 | .TP | |
540 | .BI \&.PD " d" | |
541 | Set inter-paragraph vertical distance to d | |
542 | (if omitted, d=0.4v); | |
543 | does not cause a break. | |
544 | .TP | |
545 | .BI \&.SS " t" | |
546 | Subheading | |
547 | .I t | |
548 | (like | |
549 | .BR \&.SH , | |
550 | but used for a subsection inside a section). | |
551 | .SS "Predefined Strings" | |
552 | The | |
553 | .B man | |
554 | package has the following predefined strings: | |
555 | .IP \e*R | |
556 | Registration Symbol: \*R | |
557 | .IP \e*S | |
558 | Change to default font size | |
559 | .IP \e*(Tm | |
560 | Trademark Symbol: \*(Tm | |
561 | .IP \e*(lq | |
562 | Left angled doublequote: \*(lq | |
563 | .IP \e*(rq | |
564 | Right angled doublequote: \*(rq | |
565 | .SH "SAFE SUBSET" | |
566 | Although technically | |
567 | .B man | |
568 | is a troff macro package, in reality a large number of other tools | |
569 | process man page files that don't implement all of troff's abilities. | |
570 | Thus, it's best to avoid some of troff's more exotic abilities where possible | |
571 | to permit these other tools to work correctly. | |
572 | Avoid using the various troff preprocessors | |
573 | (if you must, go ahead and use | |
574 | .BR tbl (1), | |
575 | but try to use the | |
576 | .B IP | |
577 | and | |
578 | .B TP | |
579 | commands instead for two-column tables). | |
580 | Avoid using computations; most other tools can't process them. | |
581 | Use simple commands that are easy to translate to other formats. | |
582 | The following troff macros are believed to be safe (though in many cases | |
583 | they will be ignored by translators): | |
584 | .BR \e" , | |
585 | .BR . , | |
586 | .BR ad , | |
587 | .BR bp , | |
588 | .BR br , | |
589 | .BR ce , | |
590 | .BR de , | |
591 | .BR ds , | |
592 | .BR el , | |
593 | .BR ie , | |
594 | .BR if , | |
595 | .BR fi , | |
596 | .BR ft , | |
597 | .BR hy , | |
598 | .BR ig , | |
599 | .BR in , | |
600 | .BR na , | |
601 | .BR ne , | |
602 | .BR nf , | |
603 | .BR nh , | |
604 | .BR ps , | |
605 | .BR so , | |
606 | .BR sp , | |
607 | .BR ti , | |
608 | .BR tr . | |
609 | .PP | |
610 | You may also use many troff escape sequences (those sequences beginning | |
611 | with \e). | |
612 | When you need to include the backslash character as normal text, | |
613 | use \ee. | |
614 | Other sequences you may use, where x or xx are any characters and N | |
615 | is any digit, include: | |
616 | .BR \e' , | |
617 | .BR \e` , | |
618 | .BR \e- , | |
619 | .BR \e. , | |
620 | .BR \e" , | |
621 | .BR \e% , | |
622 | .BR \e*x , | |
623 | .BR \e*(xx , | |
624 | .BR \e(xx , | |
625 | .BR \e$N , | |
626 | .BR \enx , | |
627 | .BR \en(xx , | |
628 | .BR \efx , | |
629 | and | |
630 | .BR \ef(xx . | |
631 | Avoid using the escape sequences for drawing graphics. | |
632 | .PP | |
633 | Do not use the optional parameter for | |
634 | .B bp | |
635 | (break page). | |
636 | Use only positive values for | |
637 | .B sp | |
638 | (vertical space). | |
639 | Don't define a macro | |
640 | .RB ( de ) | |
641 | with the same name as a macro in this or the | |
642 | mdoc macro package with a different meaning; it's likely that | |
643 | such redefinitions will be ignored. | |
644 | Every positive indent | |
645 | .RB ( in ) | |
646 | should be paired with a matching negative indent | |
647 | (although you should be using the | |
648 | .B RS | |
649 | and | |
650 | .B RE | |
651 | macros instead). | |
652 | The condition test | |
653 | .RB ( if,ie ) | |
654 | should only have 't' or 'n' as the condition. | |
655 | Only translations | |
656 | .RB ( tr ) | |
657 | that can be ignored should be used. | |
658 | Font changes | |
659 | .RB ( ft | |
660 | and the \fB\ef\fP escape sequence) | |
661 | should only have the values 1, 2, 3, 4, R, I, B, P, or CW | |
662 | (the ft command may also have no parameters). | |
663 | .PP | |
664 | If you use capabilities beyond these, check the | |
665 | results carefully on several tools. | |
666 | Once you've confirmed that the additional capability is safe, | |
667 | let the maintainer of this | |
668 | document know about the safe command or sequence | |
669 | that should be added to this list. | |
670 | .SH NOTES | |
671 | .PP | |
672 | By all means include full URLs (or URIs) in the text itself; | |
673 | some tools such as | |
674 | .BR man2html (1) | |
675 | can automatically turn them into hypertext links. | |
676 | You can also use the new | |
677 | .B URL | |
678 | macro to identify links to related information. | |
679 | If you include URLs, use the full URL | |
680 | (e.g., <http://www.kernelnotes.org>) to ensure that tools | |
681 | can automatically find the URLs. | |
682 | .PP | |
683 | Tools processing these files should open the file and examine the first | |
684 | non-whitespace character. A period (.) or single quote (') | |
685 | at the beginning of a line indicates a troff-based file (such as man or mdoc). | |
686 | A left angle bracket (<) indicates an SGML/XML-based | |
687 | file (such as HTML or Docbook). Anything else suggests simple ASCII | |
688 | text (e.g., a "catman" result). | |
689 | .PP | |
690 | Many man pages begin with '\e" followed by a space and a list of characters, | |
691 | indicating how the page is to be preprocessed. | |
692 | For portability's sake to non-troff translators we recommend that you avoid | |
693 | using anything other than | |
694 | .BR tbl (1), | |
695 | and Linux can detect that automatically. | |
696 | However, you might want to include this information so your man page | |
697 | can be handled by other (less capable) systems. | |
698 | Here are the definitions of the preprocessors invoked by these characters: | |
699 | .TP 3 | |
700 | .B e | |
701 | eqn(1) | |
702 | .TP | |
703 | .B g | |
704 | grap(1) | |
705 | .TP | |
706 | .B p | |
707 | pic(1) | |
708 | .TP | |
709 | .B r | |
710 | refer(1) | |
711 | .TP | |
712 | .B t | |
713 | tbl(1) | |
714 | .TP | |
715 | .B v | |
716 | vgrind(1) | |
717 | .SH FILES | |
718 | .IR /usr/share/groff/ [*/] tmac/tmac.an | |
719 | .br | |
720 | .I /usr/man/whatis | |
721 | .SH BUGS | |
722 | .PP | |
723 | Most of the macros describe formatting (e.g., font type and spacing) instead | |
724 | of marking semantic content (e.g., this text is a reference to another page), | |
725 | compared to formats like mdoc and DocBook (even HTML has more semantic | |
726 | markings). | |
727 | This situation makes it harder to vary the | |
728 | .B man | |
729 | format for different media, | |
730 | to make the formatting consistent for a given media, and to automatically | |
731 | insert cross-references. | |
732 | By sticking to the safe subset described above, it should be easier to | |
733 | automate transitioning to a different reference page format in the future. | |
734 | .LP | |
735 | The Sun macro | |
736 | .B TX | |
737 | is not implemented. | |
738 | .SH AUTHORS | |
739 | .IP \(em 3m | |
740 | James Clark (jjc@jclark.com) wrote the implementation of the macro package. | |
741 | .IP \(em | |
742 | Rickard E. Faith (faith@cs.unc.edu) wrote the initial version of | |
743 | this manual page. | |
744 | .IP \(em | |
745 | Jens Schweikhardt (schweikh@noc.fdn.de) wrote the Linux Man-Page Mini-HOWTO | |
746 | (which influenced this manual page). | |
747 | .IP \(em | |
748 | David A. Wheeler (dwheeler@ida.org) heavily modified this | |
749 | manual page, such as adding detailed information on sections and macros. | |
750 | .SH "SEE ALSO" | |
751 | .BR apropos (1), | |
752 | .BR groff (1), | |
753 | .BR man (1), | |
754 | .BR man2html (1), | |
755 | .BR mdoc (7), | |
756 | .BR mdoc.samples (7), | |
757 | .BR groff_www (7), | |
758 | .BR whatis (1) |