.\" (C) Copyright 1992-1999 Rickard E. Faith and David A. Wheeler .\" (faith@cs.unc.edu and dwheeler@ida.org) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified Sun Jul 25 11:06:05 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sat Jun 8 00:39:52 1996 by aeb .\" Modified Wed Jun 16 23:00:00 1999 by David A. Wheeler (dwheeler@ida.org) .\" Modified Thu Jul 15 12:43:28 1999 by aeb .\" Modified Sun Jan 6 18:26:25 2002 by Martin Schulze .\" Modified Tue Jul 27 20:12:02 2004 by Colin Watson .\" 2007-05-30, mtk: various rewrites and moved much text to new man-pages.7. .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997-2000 OZASA Hiromasa and NAKANO Takeo .\" all rights reserved. .\" Translated 1997-07-25, OZASA Hiromasa .\" Updated 2000-01-14, NAKANO Takeo .\" Updated 2001-12-27, Kentaro Shirakata .\" Updated 2002-03-23, Kentaro Shirakata .\" Updated 2005-02-23, Akihiro MOTOKI .\" Updated 2005-04-17, Akihiro MOTOKI .\" Updated 2007-06-13, Akihiro MOTOKI , LDP v2.53 .\" Updated 2007-06-13, Akihiro MOTOKI , LDP v2.54 .\" Updated 2012-04-30, Akihiro MOTOKI .\" .TH MAN 7 2020\-11\-01 Linux "Linux Programmer's Manual" .SH 名前 man \- man ページを整形するマクロ .SH 書式 \fBgroff \-Tascii \-man\fP \fIfile\fP \&... .PP \fBgroff \-Tps \-man\fP \fIfile\fP \&... .PP \fBman\fP [\fIsection\fP] \fItitle\fP .SH 説明 このマニュアルページでは、 \fBgroff an.tmac\fP のマクロパッケージ (\fBman\fP マクロパッケージとも呼ばれることも多い) について説明する。 このマクロパッケージは、 Linux の man ページを書いたり移植したりするときに、 開発者が用いるものである。 このマクロパッケージはバージョン間での互換性が高く、 man page の移植にあたっては大きな問題はないだろう (但し、NET\-2 BSD release は例外である。 こちらでは mdoc と呼ばれる全く異なるマクロパッケージが使用されている。 \fBmdoc\fP(7) を参照)。 .PP NET\-2 BSD の man ページも、 \fBgroff\fP のオプションとして \fB\-man\fP の代わりに \fB\-mdoc\fP を指定するだけで、利用することができる。 \fB\-mandoc\fP オプションを使えばどのマクロパッケージが用いられているか 自動的に検出できるので、このオプションを使うのがお薦めである。 .PP Linux \fIman\-pages\fP プロジェクトのマニュアルページを書く際に 従うべき決まり事については \fBman\-pages\fP(7) を参照。 .SS タイトル行 man ページの (コメント行を除く) 最初のコマンドは、 以下のようにする必要がある。 コメント行とは \fB.\e"\fP で始まる行のことである。 .PP .RS \fB\&.TH\fP \fItitle section date source manual\fP .RE .PP \fBTH\fP に渡す引数の詳細については \fBman\-pages\fP(7) を参照。 .PP なお BSD の mdoc フォーマットのページは \fBTH\fP コマンドではなく \fBDd\fP コマンドから始まる。 .SS セクション .\" The following doesn't seem to be required (see Debian bug 411303), .\" If the name contains spaces and appears .\" on the same line as .\" .BR \&.SH , .\" then place the heading in double quotes. セクションは \fB\&.SH\fP で始まり、見出し名がそれに続く。 .PP NAME (名前) という見出しだけは必ず置かないといけない。 この見出しは一番最初のセクションにすべきで、見出しの 次の行にはプログラムの説明を一行で書く。 .PP .RS \&.SH NAME .br item \e\- description .RE .PP このフォーマットに従い、コマンド名に続くシングルダッシュ (\-) の前には必ず バックスラッシュを置くこと。 この文法は、 \fBmabdb\fP(8) プログラムが \fBwhatis\fP(1) や \fBapropos\fP(1) コマンド用の短い説明のデータベースを 生成する際に利用される。 .PP マニュアルページに登場する可能性のあるこれ以外のセクションのリストに ついては \fBman\-pages\fP(7) を参照。 .SS フォント タイプフェイスを選択するコマンドは以下のように指定する: .TP 4 \fB\&.B\fP ボールド。 .TP \fB\&.BI\fP ボールドとイタリックとを交互に (特に関数指定に便利)。 .TP \fB\&.BR\fP ボールドとローマンとを交互に (特に他のマニュアルページを参照するときに便利)。 .TP \fB\&.I\fP イタリック。 .TP \fB\&.IB\fP イタリックとボールドとを交互に。 .TP \fB\&.IR\fP イタリックとローマンとを交互に。 .TP \fB\&.RB\fP ローマンとボールドとを交互に。 .TP \fB\&.RI\fP ローマンとイタリックとを交互に。 .TP \fB\&.SB\fP スモールとボールドを交互に。 .TP \fB\&.SM\fP スモール (頭字語などに用いる) .PP Traditionally, each command can have up to six arguments, but the GNU implementation removes this limitation (you might still want to limit yourself to 6 arguments for portability's sake). Arguments are delimited by spaces. Double quotes can be used to specify an argument which contains spaces. For the macros that produce alternating type faces, the arguments will be printed next to each other without intervening spaces, so that the \fB\&.BR\fP command can be used to specify a word in bold followed by a mark of punctuation in Roman. If no arguments are given, the command is applied to the following line of text. .SS その他のマクロや文字列 Below are other relevant macros and predefined strings. Unless noted otherwise, all macros cause a break (end the current line of text). Many of these macros set or use the "prevailing indent." The "prevailing indent" value is set by any macro with the parameter \fIi\fP below; macros may omit \fIi\fP in which case the current prevailing indent will be used. As a result, successive indented paragraphs can use the same indent without respecifying the indent value. A normal (nonindented) paragraph resets the prevailing indent value to its default value (0.5 inches). By default, a given indent is measured in ens; try to use ens or ems as units for indents, since these will automatically adjust to font size changes. The other key macro definitions are: .SS 通常の段落 .TP 9m \fB\&.LP\fP \fB\&.PP\fP と同じ (新たな段落の開始)。 .TP \fB\&.P\fP \fB\&.PP\fP と同じ (新たな段落の開始)。 .TP \fB\&.PP\fP 新しい段落を開始し、インデントをリセットする。 .SS 相対マージンインデント .TP 9m \fB\&.RS\fP\fI i\fP 相対マージンインデント (relative margin indent) を開始する。 左マージンを \fIi\fP だけ右に移動する (\fIi\fP が省略されると優先インデントの値が用いられる)。 新たな優先インデントは 0.5 インチにセットされる。 結果として、以下の段落は対応する \fB\&.RE\fP が現れるまでインデントされる。 .TP \fB\&.RE\fP 相対マージンインデントを終了し、 優先インデントの値を元に戻す。 .SS 段落をインデントするマクロ .TP 9m \fB\&.HP\fP\fI i\fP ぶらさがりインデントの段落を開始する (段落の先頭行は通常の段落の左マージンとなり、 段落の残りの行はインデントされる)。 .TP \fB\&.IP\fP\fI x i\fP インデントされた段落。オプションとしてぶらさがりタグをとる。 タグ \fIx\fP が省略されると、以下の段落すべてが \fIi\fP でインデントされる。タグ \fIx\fP が与えられると、タグはインデントされた段落の前にぶら下げられる (\fB\&.TP\fP とちょうど同じ。ただしタグを次の行に書く代わりにコマンドに指定する)。 タグが長すぎる場合には、タグに続くテキストは次の行に移動する (テキストが失われたり混ざったりすることはない)。 箇条書きをするには、 \e(bu (点) あるいは \e(em (ダッシュ) をタグにしてこのマクロを用いるとよい。番号付きで箇条書きをする場合は、 数字または文字にピリオドを付けたものをタグにすればよい。 こうすれば他のフォーマットへの変換が簡単になる。 .TP \fB\&.TP\fP\fI i\fP ぶらさがりタグの段落を開始する。タグは次の行に指定する。 結果は \fB\&.IP\fP コマンドと似たものになる。 .SS ハイパーテキストリンク用のマクロ .TP \fB\&.UR\fP\fI url\fP Insert a hypertext link to the URI (URL) \fIurl\fP, with all text up to the following \fB\&.UE\fP macro as the link text. .TP \fB\&.UE\fP [ \fItrailer\fP ] Terminate the link text of the preceding \fB\&.UR\fP macro, with the optional \fItrailer\fP (if present, usually a closing parenthesis and/or end\-of\-sentence punctuation) immediately following. For non\-HTML output devices (e.g., \fBman \-Tutf8\fP), the link text is followed by the URL in angle brackets; if there is no link text, the URL is printed as its own link text, surrounded by angle brackets. (Angle brackets may not be available on all output devices.) For the HTML output device, the link text is hyperlinked to the URL; if there is no link text, the URL is printed as its own link text. .PP These macros have been supported since GNU Troff 1.20 (2009\-01\-05) and Heirloom Doctools Troff since 160217 (2016\-02\-17). .SS その他のマクロ .TP 9m \fB\&.DT\fP タブをデフォルトのタブ値 (0.5 インチごと) にリセットする。 改行はしない。 .TP \fB\&.PD\fP\fI d\fP パラグラフ間の間隔を引数にセットする (省略されると d=0.4v となる)。 .TP \fB\&.SS\fP\fI t\fP サブヘッダー \fIt\fP (\fB\&.SH\fP のようなものだが、サブセクションのために用いる)。 .SS 定義済みの文字列 \fBman\fP パッケージには、以下のような定義済みの文字列がある: .IP \e*R 登録シンボル: \*R .IP \e*S デフォルトフォントサイズを変更する .IP \e*(Tm 商標シンボル: \*(Tm .IP \e*(lq 左に傾いたダブルクォート: \*(lq .IP \e*(rq 右に傾いたダブルクォート: \*(rq .SS 安全なサブセット 技術的には \fBman\fP は troff のマクロパッケージだが、実際には多数の別のツールが man ページのファイルを処理しており、それらは troff の全ての機能を 実装していないこともある。したがって、他のツールでも正しく処理できるように、 troff のあまり一般的でない機能は、可能ならば用いないのが望ましい。 様々な troff プリプロセッサ も用いないほうが良いだろう (やむを得ない場合は \fBtbl\fP(1) は用いても良い。しかし 2 列の表なら、代わりに \fBIP\fP や \fBTP\fP コマンドを用いてみよう)。 計算機能も用いない方が良いだろう。他のツールのほとんどはこれらを処理できない。 他のフォーマットに変換が容易な、単純なコマンドを使うようにしよう。 以下の troff コマンドは、使っても問題ないと考えてよいだろう (多くの場合、変換コマンドによって無視されるかもしれないが)。 \fB\e"\fP, \&\fB.\fP, \fBad\fP, \fBbp\fP, \fBbr\fP, \fBce\fP, \fBde\fP, \fBds\fP, \fBel\fP, \fBie\fP, \fBif\fP, \fBfi\fP, \fBft\fP, \fBhy\fP, \fBig\fP, \fBin\fP, \fBna\fP, \fBne\fP, \fBnf\fP, \fBnh\fP, \fBps\fP, \fBso\fP, \fBsp\fP, \fBti\fP, \fBtr\fP .PP You may also use many troff escape sequences (those sequences beginning with \e). When you need to include the backslash character as normal text, use \ee. Other sequences you may use, where x or xx are any characters and N is any digit, include: \fB\e\(aq\fP, \fB\e\(ga\fP, \fB\e\-\fP, \fB\e.\fP, \fB\e"\fP, \fB\e%\fP, \fB\e*x\fP, \fB\e*(xx\fP, \fB\e(xx\fP, \fB\e$N\fP, \fB\enx\fP, \fB\en(xx\fP, \fB\efx\fP, and \fB\ef(xx\fP. Avoid using the escape sequences for drawing graphics. .PP \fBbp\fP (改頁) にはオプションパラメーターを用いないこと。 \fBsp\fP (垂直スペース) には正の値のみを用いること。 man や mdoc マクロパッケージにあるマクロと、 名前が同じで機能の異なるマクロを定義 (\fBde\fP) しないこと。そのような再定義は無視される可能性が高い。 正方向へのインデント (\fBin\fP) には、負のインデントを対応させること (このマクロの代わりに \fBRS\fP と \fBRE\fP マクロを使った方がよいのだが)。 条件テスト (\fBif\fP,\fBie\fP) は状態として \(aqt\(aq または \(aqn\(aq だけを持つようにすること。 変換 (\fBtr\fP) には無視できるものだけを使うこと。 フォントの変更 (\fBft\fP と \fB\ef\fP エスケープシーケンス) には 1, 2, 3, 4, R, I, B, P, CW のみを用いること (ft コマンドの場合はパラメーターを指定しなくてもよい)。 .PP この制限を越えて機能を用いる場合は、いくつかのツールを使って、 その結果を注意してチェックすること。追加した機能が安全だと 確信したら、この文書の管理者にその安全なコマンドまたはシーケンスを 教えてほしい。リストに追加する。 .SH ファイル \fI/usr/share/groff/\fP[*/]\fItmac/an.tmac\fP .br \fI/usr/man/whatis\fP .SH 注意 By all means include full URLs (or URIs) in the text itself; some tools such as \fBman2html\fP(1) can automatically turn them into hypertext links. You can also use the \fBUR\fP and \fBUE\fP macros to identify links to related information. If you include URLs, use the full URL (e.g., .UR http://www.kernel.org .UE ) to ensure that tools can automatically find the URLs. .PP Tools processing these files should open the file and examine the first nonwhitespace character. A period (.) or single quote (\(aq) at the beginning of a line indicates a troff\-based file (such as man or mdoc). A left angle bracket (<) indicates an SGML/XML\-based file (such as HTML or Docbook). Anything else suggests simple ASCII text (e.g., a "catman" result). .PP Many man pages begin with \fB\(aq\e"\fP followed by a space and a list of characters, indicating how the page is to be preprocessed. For portability's sake to non\-troff translators we recommend that you avoid using anything other than \fBtbl\fP(1), and Linux can detect that automatically. However, you might want to include this information so your man page can be handled by other (less capable) systems. Here are the definitions of the preprocessors invoked by these characters: .TP 3 \fBe\fP eqn(1) .TP \fBg\fP grap(1) .TP \fBp\fP pic(1) .TP \fBr\fP refer(1) .TP \fBt\fP tbl(1) .TP \fBv\fP vgrind(1) .SH バグ mdoc や DocBook に比べると、 マクロの多くは書式 (フォントタイプやスペーシングなど) に関するものであり、 意味上のもの (このテキストは他のページへの参照である、など) ではない (HTML ですら意味的なマーキングに思える)。 このため、 \fBman\fP フォーマットを他のメディアへ変換したり、 フォーマットを他のメディアで有効なものにしたり、 相互参照を自動的に挿入したりすることが困難になっている。 上に挙げたような安全なサブセットを守れば、 将来別のリファレンスページフォーマットへ変換する作業が簡単になるだろう。 .PP .\" .SH AUTHORS .\" .IP \(em 3m .\" James Clark (jjc@jclark.com) wrote the implementation of the macro package. .\" .IP \(em .\" Rickard E. Faith (faith@cs.unc.edu) wrote the initial version of .\" this manual page. .\" .IP \(em .\" Jens Schweikhardt (schweikh@noc.fdn.de) wrote the Linux Man-Page Mini-HOWTO .\" (which influenced this manual page). .\" .IP \(em .\" David A. Wheeler (dwheeler@ida.org) heavily modified this .\" manual page, such as adding detailed information on sections and macros. Sun のマクロである \fBTX\fP は定義されていない。 .SH 関連項目 \fBapropos\fP(1), \fBgroff\fP(1), \fBlexgrog\fP(1), \fBman\fP(1), \fBman2html\fP(1), \fBwhatis\fP(1), \fBgroff_man\fP(7), \fBgroff_www\fP(7), \fBman\-pages\fP(7), \fBmdoc\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。