OSDN Git Service

(split) LDP: Translation snapshots for ja.po.
[linuxjm/LDP_man-pages.git] / draft / man7 / man.7
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 .\" Modified Sun Jan  6 18:26:25 2002 by Martin Schulze <joey@infodrom.org>
29 .\" Modified Tue Jul 27 20:12:02 2004 by Colin Watson <cjwatson@debian.org>
30 .\" 2007-05-30, mtk: various rewrites and moved much text to new man-pages.7.
31 .\"
32 .\" Japanese Version Copyright (c) 1997-2000 OZASA Hiromasa and NAKANO Takeo
33 .\"         all rights reserved.
34 .\" Translated 1997-07-25, OZASA Hiromasa <ozasa@cpsy.is.tohoku.ac.jp>
35 .\" Updated 2000-01-14, NAKANO Takeo <nakano@apm.seikei.ac.jp>
36 .\" Updated 2001-12-27, Kentaro Shirakata <argrath@ub32.org>
37 .\" Updated 2002-03-23, Kentaro Shirakata <argrath@ub32.org>
38 .\" Updated 2005-02-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\" Updated 2005-04-17, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\" Updated 2007-06-13, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.53
41 .\" Updated 2007-06-13, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.54
42 .\"
43 .\"WORD:        prevailing indent       優先インデント
44 .\"
45 .TH MAN 7 2007-05-30 "Linux" "Linux Programmer's Manual"
46 .\"O .SH NAME
47 .SH 名前
48 .\"O man \- macros to format man pages
49 man \- man ページを整形するマクロ
50 .\"O .SH SYNOPSIS
51 .SH 書式
52 .B groff \-Tascii \-man
53 .I file
54 \&...
55 .LP
56 .B groff \-Tps \-man
57 .I file
58 \&...
59 .LP
60 .B man
61 .RI [ section ]
62 .I title
63 .\"O .SH DESCRIPTION
64 .SH 説明
65 .\"O This manual page explains the
66 .\"O .B "groff an.tmac"
67 .\"O macro package (often called the
68 .\"O .B man
69 .\"O macro package).
70 .\"O This macro package should be used by developers when
71 .\"O writing or porting man pages for Linux.
72 .\"O It is fairly compatible with other
73 .\"O versions of this macro package, so porting man pages should not be a major
74 .\"O problem (exceptions include the NET-2 BSD release, which uses a totally
75 .\"O different macro package called mdoc; see
76 .\"O .BR mdoc (7)).
77 このマニュアルページでは、
78 .B "groff an.tmac"
79 のマクロパッケージ
80 .RB ( man
81 マクロパッケージとも呼ばれることも多い) について説明する。
82 このマクロパッケージは、
83 Linux の man ページを書いたり移植したりするときに、
84 開発者が用いるものである。
85 このマクロパッケージはバージョン間での互換性が高く、
86 man page の移植にあたっては大きな問題はないだろう
87 (但し、NET-2 BSD release は例外である。
88 こちらでは mdoc と呼ばれる全く異なるマクロパッケージが使用されている。
89 .BR mdoc (7)
90 を参照)。
91 .PP
92 .\"O Note that NET-2 BSD mdoc man pages can be used with
93 .\"O .B groff
94 .\"O simply by specifying the
95 .\"O .B \-mdoc
96 .\"O option instead of the
97 .\"O .B \-man
98 .\"O option.
99 .\"O Using the
100 .\"O .B \-mandoc
101 .\"O option is, however, recommended, since this will automatically detect which
102 .\"O macro package is in use.
103 NET-2 BSD の man ページも、
104 .B groff
105 のオプションとして
106 .B \-man
107 の代わりに
108 .B \-mdoc
109 を指定するだけで、利用することができる。
110 .B \-mandoc
111 オプションを使えばどのマクロパッケージが用いられているか
112 自動的に検出できるので、このオプションを使うのがお薦めである。
113 .PP
114 .\"O For conventions that should be employed when writing man pages
115 .\"O for the Linux \fIman-pages\fP package, see
116 .\"O .BR man-pages (7).
117 Linux \fIman-pages\fP プロジェクトのマニュアルページを書く際に
118 従うべき決まり事については
119 .BR man-pages (7)
120 を参照。
121 .\"O .SS Title line
122 .SS タイトル行
123 .\"O The first command in a man page (after comment lines,
124 .\"O that is, lines that start with \fB.\\"\fP) should be
125 man ページの (コメント行を除く) 最初のコマンドは、
126 以下のようにする必要がある。
127 コメント行とは \fB.\\"\fP で始まる行のことである。
128 .RS
129 .sp
130 .B \&.TH
131 .I "title section date source manual"
132 .sp
133 .RE
134 .\"O For details of the arguments that should be supplied to the \fBTH\fP
135 .\"O command, see
136 .\"O .BR man-pages (7).
137 \fBTH\fP に渡す引き数の詳細については
138 .BR man-pages (7)
139 を参照。
140 .PP
141 .\"O Note that BSD mdoc-formatted pages begin with the
142 .\"O .B Dd
143 .\"O command, not the
144 .\"O .B TH
145 .\"O command.
146 なお BSD の mdoc フォーマットのページは
147 .B TH
148 コマンドではなく
149 .B Dd
150 コマンドから始まる。
151 .\"O .SS Sections
152 .SS セクション
153 .\"O Sections are started with
154 .\"O .B \&.SH
155 .\"O followed by the heading name.
156 .\"O .\" The following doesn't seem to be required (see Debian bug 411303),
157 .\"O .\" If the name contains spaces and appears
158 .\"O .\" on the same line as
159 .\"O .\" .BR \&.SH ,
160 .\"O .\" then place the heading in double quotes.
161 セクションは
162 .B \&.SH
163 で始まり、見出し名がそれに続く。
164 .\" 以下は必須ではないようだ (Debian bug 411303 参照),
165 .\" スペースが含まれている名前を
166 .\" .BR \&.SH
167 .\" と同じ行に置く場合は、見出し名はダブルクォートで囲む。
168
169 .\"O The only mandatory heading is NAME, which should be the first section and
170 .\"O be followed on the next line by a one line description of the program:
171 NAME (名前) という見出しだけは必ず置かないといけない。
172 この見出しは一番最初のセクションにすべきで、見出しの
173 次の行にはプログラムの説明を一行で書く。
174 .RS
175 .sp
176 \&.SH NAME
177 .br
178 .sp
179 .RE
180 .\"O It is extremely important that this format is followed, and that there is a
181 .\"O backslash before the single dash which follows the command name.
182 .\"O This syntax is used by the
183 .\"O .BR makewhatis (8)
184 .\"O program to create a database of short command descriptions for the
185 .\"O .BR whatis (1)
186 .\"O and
187 .\"O .BR apropos (1)
188 .\"O commands.
189 このフォーマットに従い、コマンド名に続くシングルダッシュ (-)
190 の前には必ずバックスラッシュを置くこと。
191 この文法は、
192 .BR makewhatis (8)
193 プログラムが
194 .BR whatis (1)
195
196 .BR apropos (1)
197 コマンド用の (コマンドの短い説明の) データベースを生成する際に利用される。
198 .PP
199 .\"O For a list of other sections that might appear in a manual page, see
200 .\"O .BR man-pages (7).
201 マニュアルページに登場する可能性のあるこれ以外のセクションのリストに
202 ついては
203 .BR man-pages (7)
204 を参照。
205 .\"O .SS Fonts
206 .SS フォント
207 .\"O The commands to select the type face are:
208 タイプフェイスを選択するコマンドは以下のように指定する:
209 .TP 4
210 .B \&.B
211 .\"O Bold
212 ボールド。
213 .TP
214 .B \&.BI
215 .\"O Bold alternating with italics
216 .\"O (especially useful for function specifications)
217 ボールドとイタリックとを交互に
218 (特に関数指定に便利)。
219 .TP
220 .B \&.BR
221 .\"O Bold alternating with Roman
222 .\"O (especially useful for referring to other
223 .\"O manual pages)
224 ボールドとローマンとを交互に
225 (特に他のマニュアルページを参照するときに便利)。
226 .TP
227 .B \&.I
228 .\"O Italics
229 イタリック。
230 .TP
231 .B \&.IB
232 .\"O Italics alternating with bold
233 イタリックとボールドとを交互に。
234 .TP
235 .B \&.IR
236 .\"O Italics alternating with Roman
237 イタリックとローマンとを交互に。
238 .TP
239 .B \&.RB
240 .\"O Roman alternating with bold
241 ローマンとボールドとを交互に。
242 .TP
243 .B \&.RI
244 .\"O Roman alternating with italics
245 ローマンとイタリックとを交互に。
246 .TP
247 .B \&.SB
248 .\"O Small alternating with bold
249 スモールとボールドを交互に。
250 .TP
251 .B \&.SM
252 .\"O Small (useful for acronyms)
253 スモール (頭字語などに用いる)
254 .LP
255 .\"O Traditionally, each command can have up to six arguments, but the GNU
256 .\"O implementation removes this limitation (you might still want to limit
257 .\"O yourself to 6 arguments for portability's sake).
258 .\"O Arguments are delimited by
259 .\"O spaces.
260 .\"O Double quotes can be used to specify an argument which contains spaces.
261 .\"O All of the arguments will be printed next to each other without
262 .\"O intervening spaces, so that the
263 .\"O .B \&.BR
264 .\"O command can be used to specify a word in bold followed by a mark of
265 .\"O punctuation in Roman.
266 .\"O If no arguments are given, the command is applied to the following line
267 .\"O of text.
268 慣例としては、各コマンドは 6 つまでの引き数を持つ事が可能だが、
269 GNU の実装では制限はないようだ (しかし移植性を保持するためには
270 引き数は 6 までに限っておくのが良いだろう)。
271 引き数はスペースで区切られる。
272 スペースを含んだ引き数を与えるには、ダブルクォートで囲えばよい。
273 すべての引き数はスペースを取り除いて並べられるので、
274 .B \&.BR
275 コマンドを使えば、単語はボールドで、句読点をローマンで表すことができる。
276 引き数が全く与えられなければ、
277 そのコマンドは次の行のテキストに適用される。
278 .\"O .SS "Other Macros and Strings"
279 .SS その他のマクロや文字列
280 .PP
281 .\"O Below are other relevant macros and predefined strings.
282 .\"O Unless noted otherwise, all macros
283 .\"O cause a break (end the current line of text).
284 .\"O Many of these macros set or use the "prevailing indent."
285 .\"O The "prevailing indent" value is set by any macro with the parameter
286 .\"O .I i
287 .\"O below;
288 .\"O macros may omit
289 .\"O .I i
290 .\"O in which case the current prevailing indent will be used.
291 .\"O As a result, successive indented paragraphs can use the same indent without
292 .\"O respecifying the indent value.
293 .\"O A normal (nonindented) paragraph resets the prevailing indent value
294 .\"O to its default value (0.5 inches).
295 .\"O By default a given indent is measured in ens;
296 .\"O try to use ens or ems as units for
297 .\"O indents, since these will automatically adjust to font size changes.
298 .\"O The other key macro definitions are:
299 以下に、他のマクロや定義済みの文字列を示す。
300 特に記述がない限り、マクロを使うと改行が行われる
301 (テキストの現在の行を終了する)。
302 多くのマクロは
303 「優先インデント (prevailing indent)」を設定したり、使用する。
304 優先インデントの値は、どのマクロからもパラメータ
305 .I i
306 によって指定できる (以下に示す)。
307 マクロでは
308 .I i
309 を省略することもでき、その場合は現在の優先インデントの値が用いられる。
310 これにより結果として、インデントされた段落が連続している場合、
311 インデントの値を再指定しなくてもインデント量を同じにすることができる。
312 通常の (インデントされていない) 段落が登場すると、
313 優先インデントの値はデフォルトの値 (0.5 インチ) にリセットされる。
314 デフォルトでは、与えたインデントの値は ens 単位である。
315 インデントの単位には ens や ems を用いるとよい。これらの単位は
316 フォントサイズが変更されると自動的に調整されるからである。
317 他の重要なマクロ定義は以下の通り:
318 .\"O .SS "Normal Paragraphs"
319 .SS 通常の段落
320 .TP 9m
321 .B \&.LP
322 .\"O Same as
323 .\"O .B \&.PP
324 .\"O (begin a new paragraph).
325 .B \&.PP
326 と同じ (新たな段落の開始)。
327 .TP
328 .B \&.P
329 .\"O Same as
330 .\"O .B \&.PP
331 .\"O (begin a new paragraph).
332 .B \&.PP
333 と同じ (新たな段落の開始)。
334 .TP
335 .B \&.PP
336 .\"O Begin a new paragraph and reset prevailing indent.
337 新しい段落を開始し、インデントをリセットする。
338 .\"O .SS "Relative Margin Indent"
339 .SS 相対マージンインデント
340 .TP 9m
341 .BI \&.RS " i"
342 .\"O Start relative margin indent: moves the left margin
343 .\"O .I i
344 .\"O to the right (if
345 .\"O .I i
346 .\"O is omitted, the prevailing indent value is used).
347 .\"O A new prevailing indent is set to 0.5 inches.
348 .\"O As a result, all following paragraph(s) will be
349 .\"O indented until the corresponding
350 .\"O .BR \&.RE .
351 相対マージンインデント (relative margin indent) を開始する。
352 左マージンを
353 .I i
354 だけ右に移動する
355 .RI ( i
356 が省略されると優先インデントの値が用いられる)。
357 新たな優先インデントは 0.5 インチにセットされる。
358 結果として、以下の段落は対応する
359 .B \&.RE
360 が現れるまでインデントされる。
361 .TP
362 .B \&.RE
363 .\"O End relative margin indent and
364 .\"O restores the previous value of the prevailing indent.
365 相対マージンインデントを終了し、
366 優先インデントの値を元に戻す。
367 .\"O .SS "Indented Paragraph Macros"
368 .SS 段落をインデントするマクロ
369 .TP 9m
370 .BI \&.HP " i"
371 .\"O Begin paragraph with a hanging indent
372 .\"O (the first line of the paragraph is at the left margin of
373 .\"O normal paragraphs, and the rest of the paragraph's lines are indented).
374 ぶらさがりインデントの段落を開始する
375 (段落の先頭行は通常の段落の左マージンとなり、
376 段落の残りの行はインデントされる)。
377 .TP
378 .BI \&.IP " x i"
379 .\"O Indented paragraph with optional hanging tag.
380 .\"O If the tag
381 .\"O .I x
382 .\"O is omitted, the entire following paragraph is indented by
383 .\"O .IR i .
384 .\"O If the tag
385 .\"O .I x
386 .\"O is provided, it is hung at the left margin
387 .\"O before the following indented paragraph
388 .\"O (this is just like
389 .\"O .B \&.TP
390 .\"O except the tag is included with the command instead of being on the
391 .\"O following line).
392 .\"O If the tag is too long, the text after the tag will be moved down to the
393 .\"O next line (text will not be lost or garbled).
394 .\"O For bulleted lists, use this macro with \e(bu (bullet) or \e(em (em dash)
395 .\"O as the tag, and for numbered lists, use the number or letter followed by
396 .\"O a period as the tag;
397 .\"O this simplifies translation to other formats.
398 インデントされた段落。オプションとしてぶらさがりタグをとる。
399 タグ
400 .I x
401 が省略されると、以下の段落すべてが
402 .I i
403 でインデントされる。タグ
404 .I x
405 が与えられると、タグはインデントされた段落の前にぶら下げられる
406 .RB ( \&.TP
407 とちょうど同じ。ただしタグを次の行に書く代わりにコマンドに指定する)。
408 タグが長すぎる場合には、タグに続くテキストは次の行に移動する
409 (テキストが失われたり混ざったりすることはない)。
410 箇条書きをするには、 \e(bu (点) あるいは \e(em (ダッシュ)
411 をタグにしてこのマクロを用いるとよい。番号付きで箇条書きをする場合は、
412 数字または文字にピリオドを付けたものをタグにすればよい。
413 こうすれば他のフォーマットへの変換が簡単になる。
414 .TP
415 .BI \&.TP " i"
416 .\"O Begin paragraph with hanging tag.
417 .\"O The tag is given on the next line, but
418 .\"O its results are like those of the
419 .\"O .B \&.IP
420 .\"O command.
421 ぶらさがりタグの段落を開始する。タグは次の行に指定する。
422 結果は
423 .B \&.IP
424 コマンドと似たものになる。
425 .\"O .SS "Hypertext Link Macros"
426 .SS ハイパーテキストリンク用のマクロ
427 .\"O (Feature supported with
428 .\"O .B groff
429 .\"O only.)
430 .\"O In order to use hypertext link macros, it is necessary to load the
431 .\"O .B www.tmac
432 .\"O macro package.
433 .\"O Use the request
434 .\"O .B .mso www.tmac
435 .\"O to do this.
436 .RB ( groff
437 だけでサポートされている機能)
438 ハイパーテキストリンク用のマクロを使用するためには、
439 .B www.tmac
440 マクロパッケージをロードする必要がある。
441 ロードを行うには
442 .B .mso www.tmac
443 リクエストを使用する。
444 .TP 9m
445 .BI \&.URL " link url trailer"
446 .\" motoki: 原文では .URL url link trailer となっているが、誤記。
447 .\"O Inserts a hypertext link to the URI (URL)
448 .\"O .IR url ,
449 .\"O with
450 .\"O .I link
451 .\"O as the text of the link.
452 .\"O The
453 .\"O .I trailer
454 .\"O will be printed immediately afterward.
455 URI (URL)
456 .I url
457 へのハイパーテキストリンクを挿入する。
458 .I link
459 はリンク名のテキストであり、
460 .I trailer
461 の内容はリンクの直後に表示される。
462 .\"O When generating HTML this should translate into the HTML command
463 .\"O \fB<A HREF="\fP\fIurl\fP\fB">\fP\fIlink\fP\fB</A>\fP\fItrailer\fP.
464 HTML を生成する時に、このマクロは
465 \fB<A HREF="\fP\fIurl\fP\fB">\fP\fIlink\fP\fB</A>\fP\fItrailer\fP
466 という HTML コマンドに変換される。
467 .\"O .\" The following is a kludge to get a paragraph into the listing.
468 .\" 以下はリスト表示の中で段落を作るためのその場しのぎの方法である。
469 .TP
470 .B " "
471 .\"O This and other related macros are new, and
472 .\"O many tools won't do anything with them, but
473 .\"O since many tools (including troff) will simply ignore undefined macros
474 .\"O (or at worst insert their text) these are safe to insert.
475 このマクロや他の関連マクロは新しく、
476 多くのツールはこれらに対しては何もしないであろう。
477 (troff を含めた) 多くのツールは未定義のマクロを単に無視するだけ
478 (あるいは最悪でもマクロをテキストとして挿入するだけ)
479 なので、これらを書いても危険はない。
480 .\"O .\" The following is a kludge to get a paragraph into the listing.
481 .\" 以下はリスト表示の中で段落を作るためのその場しのぎの方法である。
482 .TP
483 .B " "
484 .\"O It can be useful to define your own
485 .\"O .B URL
486 .\"O macro in manual pages for the benefit of those viewing it with a roff
487 .\"O viewer other than
488 .\"O .BR groff .
489 .\"O That way, the URL, link text, and trailer text (if any) are still visible.
490 マニュアルページ内で自分で
491 .B URL
492 マクロを定義して、
493 .B groff
494 以外の roff ビューアでも表示されるようにするのもいいだろう。
495 こうすることで、URL も、リンク用のテキストも、(もしあれば) それに続く
496 テキストも、表示できるようになる。
497 .\"O .\" The following is a kludge to get a paragraph into the listing.
498 .\" 以下はリスト表示の中で段落を作るためのその場しのぎの方法である。
499 .TP
500 .B " "
501 .\"O Here's an example:
502 以下に例を挙げる:
503 .RS 1.5i
504 \&.de URL
505 .br
506 \\\\$2 \\(laURL: \\\\$1 \\(ra\\\\$3
507 .br
508 \&..
509 .br
510 \&.if \\n[.g] .mso www.tmac
511 .br
512 \&.TH
513 .I ...
514 .br
515 .I (later in the page)
516 .br
517 This software comes from the
518 .br
519 \&.URL "http://www.gnu.org/" "GNU Project" " of the"
520 .br
521 \&.URL "http://www.fsf.org/" "Free Software Foundation" .
522 .RE
523 .\"O .\" The following is a kludge to get a paragraph into the listing.
524 .\" 以下はリスト表示の中で段落を作るためのその場しのぎの方法である。
525 .TP
526 .B " "
527 .\"O In the above, if
528 .\"O .B groff
529 .\"O is being used, the
530 .\"O .B www.tmac
531 .\"O macro package's definition of the URL macro will supersede the locally
532 .\"O defined one.
533 上記の例において、
534 .B groff
535 を使って表示しようとした場合には、
536 .B www.tmac
537 マクロパッケージの URL マクロの定義の方が
538 ローカルで行われた定義よりも優先される。
539 .PP
540 .\"O A number of other link macros are available.
541 .\"O See
542 .\"O .BR groff_www (7)
543 .\"O for more details.
544 .\" motoki: groff_mwww (7) の誤記と思われる。
545 他にもいくつかのリンク用のマクロが用意されている。
546 詳しくは
547 .BR groff_mwww (7)
548 を参照のこと。
549 .BR
550 .\"O .SS "Miscellaneous Macros"
551 .SH その他のマクロ
552 .TP 9m
553 .B \&.DT
554 .\"O Reset tabs to default tab values (every 0.5 inches);
555 .\"O does not cause a break.
556 タブをデフォルトのタブ値 (0.5 インチごと) にリセットする。
557 改行はしない。
558 .TP
559 .BI \&.PD " d"
560 .\"O Set inter-paragraph vertical distance to d
561 .\"O (if omitted, d=0.4v);
562 .\"O does not cause a break.
563 パラグラフ間の間隔を引き数にセットする
564 (省略されると d=0.4v となる)。
565 .TP
566 .BI \&.SS " t"
567 .\"O Subheading
568 .\"O .I t
569 .\"O (like
570 .\"O .BR \&.SH ,
571 .\"O but used for a subsection inside a section).
572 サブヘッダ
573 .I t
574 .RB ( \&.SH
575 のようなものだが、サブセクションのために用いる)。
576 .\"O .SS "Predefined Strings"
577 .SS 定義済みの文字列
578 .\"O The
579 .\"O .B man
580 .\"O package has the following predefined strings:
581 .B man
582 パッケージには、以下のような定義済みの文字列がある:
583 .IP \e*R
584 .\"O Registration Symbol: \*R
585 登録シンボル: \*R
586 .IP \e*S
587 .\"O Change to default font size
588 デフォルトフォントサイズを変更する
589 .IP \e*(Tm
590 .\"O Trademark Symbol: \*(Tm
591 商標シンボル: \*(Tm
592 .IP \e*(lq
593 .\"O Left angled double quote: \*(lq
594 左に傾いたダブルクォート: \*(lq
595 .IP \e*(rq
596 .\"O Right angled double quote: \*(rq
597 右に傾いたダブルクォート: \*(rq
598 .\"O .SS "Safe Subset"
599 .SS 安全なサブセット
600 .\"O Although technically
601 .\"O .B man
602 .\"O is a troff macro package, in reality a large number of other tools
603 .\"O process man page files that don't implement all of troff's abilities.
604 .\"O Thus, it's best to avoid some of troff's more exotic abilities
605 .\"O where possible to permit these other tools to work correctly.
606 .\"O Avoid using the various troff preprocessors
607 .\"O (if you must, go ahead and use
608 .\"O .BR tbl (1),
609 .\"O but try to use the
610 .\"O .B IP
611 .\"O and
612 .\"O .B TP
613 .\"O commands instead for two-column tables).
614 .\"O Avoid using computations; most other tools can't process them.
615 .\"O Use simple commands that are easy to translate to other formats.
616 .\"O The following troff macros are believed to be safe (though in many cases
617 .\"O they will be ignored by translators):
618 技術的には
619 .B man
620 は troff のマクロパッケージだが、実際には多数の別のツールが
621 man ページのファイルを処理しており、それらは troff の全ての機能を
622 実装していないこともある。したがって、他のツールでも正しく処理できるように、
623 troff のあまり一般的でない機能は、可能ならば用いないのが望ましい。
624 様々な troff プリプロセッサ
625 も用いないほうが良いだろう (やむを得ない場合は
626 .BR tbl (1)
627 は用いても良い。しかし 2 列の表なら、代わりに
628 .B IP
629
630 .B TP
631 コマンドを用いてみよう)。
632 計算機能も用いない方が良いだろう。他のツールのほとんどはこれらを処理できない。
633 他のフォーマットに変換が容易な、単純なコマンドを使うようにしよう。
634 以下の troff コマンドは、使っても問題ないと考えてよいだろう
635 (多くの場合、変換コマンドによって無視されるかもしれないが)。
636 .BR \e" ,
637 .BR . ,
638 .BR ad ,
639 .BR bp ,
640 .BR br ,
641 .BR ce ,
642 .BR de ,
643 .BR ds ,
644 .BR el ,
645 .BR ie ,
646 .BR if ,
647 .BR fi ,
648 .BR ft ,
649 .BR hy ,
650 .BR ig ,
651 .BR in ,
652 .BR na ,
653 .BR ne ,
654 .BR nf ,
655 .BR nh ,
656 .BR ps ,
657 .BR so ,
658 .BR sp ,
659 .BR ti ,
660 .\"O .BR tr .
661 .B tr
662 .PP
663 .\"O You may also use many troff escape sequences (those sequences beginning
664 .\"O with \e).
665 .\"O When you need to include the backslash character as normal text,
666 .\"O use \ee.
667 .\"O Other sequences you may use, where x or xx are any characters and N
668 .\"O is any digit, include:
669 troff のエスケープシーケンスの多くも利用できる
670 (これらのエスケープシーケンスは \e で始まる)。
671 バックスラッシュ文字を通常のテキストとして使いたい場合は \ee とする。
672 利用できる他のシーケンスには以下のようなものがある (x や xx
673 は任意の文字, N は任意の数字):
674 .BR \e' ,
675 .BR \e` ,
676 .BR \e- ,
677 .BR \e. ,
678 .BR \e" ,
679 .BR \e% ,
680 .BR \e*x ,
681 .BR \e*(xx ,
682 .BR \e(xx ,
683 .BR \e$N ,
684 .BR \enx ,
685 .BR \en(xx ,
686 .BR \efx ,
687 .\"O and
688 .BR \ef(xx .
689 .\"O Avoid using the escape sequences for drawing graphics.
690 グラフィックの描画にはエスケープシーケンスは用いないほうが良い。
691 .PP
692 .\"O Do not use the optional parameter for
693 .\"O .B bp
694 .\"O (break page).
695 .\"O Use only positive values for
696 .\"O .B sp
697 .\"O (vertical space).
698 .\"O Don't define a macro
699 .\"O .RB ( de )
700 .\"O with the same name as a macro in this or the
701 .\"O mdoc macro package with a different meaning; it's likely that
702 .\"O such redefinitions will be ignored.
703 .\"O Every positive indent
704 .\"O .RB ( in )
705 .\"O should be paired with a matching negative indent
706 .\"O (although you should be using the
707 .\"O .B RS
708 .\"O and
709 .\"O .B RE
710 .\"O macros instead).
711 .\"O The condition test
712 .\"O .RB ( if,ie )
713 .\"O should only have \(aqt\(aq or \(aqn\(aq as the condition.
714 .\"O Only translations
715 .\"O .RB ( tr )
716 .\"O that can be ignored should be used.
717 .\"O Font changes
718 .\"O .RB ( ft
719 .\"O and the \fB\ef\fP escape sequence)
720 .\"O should only have the values 1, 2, 3, 4, R, I, B, P, or CW
721 .\"O (the ft command may also have no parameters).
722 .B bp
723 (改頁) にはオプションパラメータを用いないこと。
724 .B sp
725 (垂直スペース) には正の値のみを用いること。
726 man や mdoc マクロパッケージにあるマクロと、
727 名前が同じで機能の異なるマクロを定義
728 .RB ( de )
729 しないこと。そのような再定義は無視される可能性が高い。
730 正方向へのインデント
731 .RB ( in )
732 には、負のインデントを対応させること (このマクロの代わりに
733 .B RS
734
735 .B RE
736 マクロを使った方がよいのだが)。
737 条件テスト
738 .RB ( if , ie )
739 は状態として \(aqt\(aq または \(aqn\(aq だけを持つようにすること。
740 変換
741 .RB ( tr )
742 には無視できるものだけを使うこと。
743 フォントの変更
744 .RB ( ft
745 と \fB\ef\fP エスケープシーケンス) には
746 1, 2, 3, 4, R, I, B, P, CW のみを用いること
747 (ft コマンドの場合はパラメータを指定しなくてもよい)。
748 .PP
749 .\"O If you use capabilities beyond these, check the
750 .\"O results carefully on several tools.
751 .\"O Once you've confirmed that the additional capability is safe,
752 .\"O let the maintainer of this
753 .\"O document know about the safe command or sequence
754 .\"O that should be added to this list.
755 この制限を越えて機能を用いる場合は、いくつかのツールを使って、
756 その結果を注意してチェックすること。追加した機能が安全だと
757 確信したら、この文書の管理者にその安全なコマンドまたはシーケンスを
758 教えてほしい。リストに追加する。
759 .\"O .SH FILES
760 .SH ファイル
761 .IR /usr/share/groff/ [*/] tmac/an.tmac
762 .br
763 .I /usr/man/whatis
764 .\"O .SH NOTES
765 .SH 注意
766 .PP
767 .\"O By all means include full URLs (or URIs) in the text itself;
768 .\"O some tools such as
769 .\"O .BR man2html (1)
770 .\"O can automatically turn them into hypertext links.
771 .\"O You can also use the new
772 .\"O .B URL
773 .\"O macro to identify links to related information.
774 .\"O If you include URLs, use the full URL
775 .\"O (e.g., <http://www.kernelnotes.org>) to ensure that tools
776 .\"O can automatically find the URLs.
777 テキストにはぜひとも完全な URL (または URI) を書くようにすること。
778 .BR man2html (1)
779 のようなツールは、これらを自動的にハイパーテキストリンクに変換する。
780 新たに取り入れられた
781 .B URL
782 マクロを関連情報へのリンクに用いても良い。 URL を書く場合は、
783 例えば <http://www.kernelnotes.org> のように完全な形式で書き、
784 ツールによる URL 自動検知ができるようにすること。
785 .PP
786 .\"O Tools processing these files should open the file and examine the first
787 .\"O nonwhitespace character.
788 .\"O A period (.) or single quote (') at the beginning
789 .\"O of a line indicates a troff-based file (such as man or mdoc).
790 .\"O A left angle bracket (<) indicates an SGML/XML-based
791 .\"O file (such as HTML or Docbook).
792 .\"O Anything else suggests simple ASCII
793 .\"O text (e.g., a "catman" result).
794 これらのファイルを処理するツールは、ファイルをオープンして
795 最初の空白以外の文字を調べる。行の先頭にピリオド (.)
796 またはシングルクォート (') があると、これは troff ベースの
797 ファイル (man や mdoc) であるとみなす。左角括弧 (<) は
798 SGML/XML ベースのファイル (HTML や Docbook) であるとみなす。
799 それ以外は単純な ASCII テキスト ("catman" の結果など) とみなす。
800 .PP
801 .\"O Many man pages begin with \fB\'\e"\fP followed by a
802 .\"O space and a list of characters,
803 .\"O indicating how the page is to be preprocessed.
804 .\"O For portability's sake to non-troff translators we recommend
805 .\"O that you avoid using anything other than
806 .\"O .BR tbl (1),
807 .\"O and Linux can detect that automatically.
808 .\"O However, you might want to include this information so your man page
809 .\"O can be handled by other (less capable) systems.
810 .\"O Here are the definitions of the preprocessors invoked by these characters:
811 多くの man ページは、最初の行が \fB\'\e"\fP とスペースで始まっており、
812 そこにはそのページが処理されるべきプリプロセスを表す文字が書いてある。
813 troff 以外の変換プログラムへの移植性のため、
814 .BR tbl (1)
815 や、 Linux が自動的に検知できるもの以外は使わないようにすることを勧める。
816 しかし、この情報を記述して、書いたページが他の (より低機能な) システムでも
817 扱えるようにしたい場合もあるかも知れない。
818 以下にこれらの文字によって起動されるプリプロセッサの定義を示す:
819 .TP 3
820 .B e
821 eqn(1)
822 .TP
823 .B g
824 grap(1)
825 .TP
826 .B p
827 pic(1)
828 .TP
829 .B r
830 refer(1)
831 .TP
832 .B t
833 tbl(1)
834 .TP
835 .B v
836 vgrind(1)
837 .\"O .SH BUGS
838 .SH バグ
839 .PP
840 .\"O Most of the macros describe formatting (e.g., font type and spacing) instead
841 .\"O of marking semantic content (e.g., this text is a reference to another page),
842 .\"O compared to formats like mdoc and DocBook (even HTML has more semantic
843 .\"O markings).
844 .\"O This situation makes it harder to vary the
845 .\"O .B man
846 .\"O format for different media,
847 .\"O to make the formatting consistent for a given media, and to automatically
848 .\"O insert cross-references.
849 .\"O By sticking to the safe subset described above, it should be easier to
850 .\"O automate transitioning to a different reference page format in the future.
851 mdoc や DocBook に比べると、
852 マクロの多くは書式 (フォントタイプやスペーシングなど) に関するものであり、
853 意味上のもの (このテキストは他のページへの参照である、など) ではない
854 (HTML ですら意味的なマーキングに思える)。
855 このため、
856 .B man
857 フォーマットを他のメディアへ変換したり、
858 フォーマットを他のメディアで有効なものにしたり、
859 相互参照を自動的に挿入したりすることが困難になっている。
860 上に挙げたような安全なサブセットを守れば、
861 将来別のリファレンスページフォーマットへ変換する作業が簡単になるだろう。
862 .LP
863 .\"O The Sun macro
864 .\"O .B TX
865 .\"O is not implemented.
866 Sun のマクロである
867 .B TX
868 は定義されていない。
869 .\"O .\" .SH AUTHORS
870 .\" .SH 著者
871 .\"O .\" .IP \(em 3m
872 .\"O .\" James Clark (jjc@jclark.com) wrote the implementation of the macro package.
873 .\"O .\" .IP \(em
874 .\"O .\" Rickard E. Faith (faith@cs.unc.edu) wrote the initial version of
875 .\"O .\" this manual page.
876 .\"O .\" .IP \(em
877 .\"O .\" Jens Schweikhardt (schweikh@noc.fdn.de) wrote the Linux Man-Page Mini-HOWTO
878 .\"O .\" (which influenced this manual page).
879 .\"O .\" .IP \(em
880 .\"O .\" David A. Wheeler (dwheeler@ida.org) heavily modified this
881 .\"O .\" manual page, such as adding detailed information on sections and macros.
882 .\" .IP \(em 3m
883 .\" James Clark (jjc@jclark.com) がマクロパッケージの実装を書いた。
884 .\" .IP \(em
885 .\" Rickard E. Faith (faith@cs.unc.edu) がこのマニュアルページの最初の版を書いた。
886 .\" .IP \(em
887 .\" Jens Schweikhardt (schweikh@noc.fdn.de) は Linux Man-Page Mini-HOWTO
888 .\" を書いた (本マニュアルページもこの文書の影響を受けている)。
889 .\" .IP \(em
890 .\" David A. Wheeler (dwheeler@ida.org) はこのマニュアルページを大きく変更し、
891 .\" セクションやマクロに関する細かな情報を追加するなどを行った。
892 .\"O .SH "SEE ALSO"
893 .SH 関連項目
894 .BR apropos (1),
895 .BR groff (1),
896 .BR man (1),
897 .BR man2html (1),
898 .BR whatis (1),
899 .BR groff_man (7),
900 .BR groff_www (7),
901 .BR man-pages (7),
902 .BR mdoc (7),
903 .BR mdoc.samples (7)