usage: refer [-benvCPRS] [-aN] [-cXYZ] [-fN] [-iXYZ] [-kX] [-lM,N] [-p file] [-sXYZ] [-tN] [-BL.M] [files ...]
usage: refer [-benvCPRS] [-aN] [-cXYZ] [-fN] [-iXYZ] [-kX] [-lM,N] [-p file] [-sXYZ] [-tN] [-BL.M] [files ...]
REFER(1) REFER(1)
名称
refer - groff のための参考文献目録プリプロセッサ
書式
refer [ -benvCPRS ] [ -an ] [ -cfields ] [ -fn ] [ -ifields ]
[ -kfield ] [ -lm,n ] [ -pfilename ] [ -sfields ] [ -tn ]
[ -Bfield.macro ] [ filename... ]
コマンドラインオプションとパラメータの間に、空白を置くことが可能です。
解説
本ファイルでは groff ドキュメントフォーマッティングシステムの一部である
GNU バージョンの refer について記述します。 refer は .[ と .] で囲まれ
た 引用として解釈される行と、 .R1 と .R2 で囲まれた引用の処理方法を記述
したコマンドとして解釈される行を除き、 filename... の内容を標準出力 に
コピーします。
各 々の引用では参考文献を指定します。引用では、ある参考文献にのみ含まれ
るキーワードの集合を与えることによって、その参考文献を図書目録データ ベ
ー スから指定できます。また、引用の中でデータベースレコードを指定するこ
とによっても参考文献を指定できます。これらの方法を組み合わせることも 可
能です。
各々の引用において refer はテキストの中にマークを作成できます。このマー
クは色々な方法でテキストや他のラベルから区別されるいくつかのラベルか ら
構 成されます。各引用における参考文献をマクロパッケージを使ってフォーマ
ットして出力するための groff コマンドを出力することもできます。そのため
には refer の出力は適切なマクロパッケージを使って処理されなければなりま
せん。 -ms と -me はいずれも適切なマクロです。引用の参考文献をフォー マ
ッ トするコマンドを引用の直後に出力することも、参考文献を蓄積して後でコ
マンドを出力することもできます。参考文献を蓄積した時、同じ参考文献が 複
数から引用されている場合には、参考文献は 1 つにまとめてフォーマットされ
ます。
GNU refer の新しい機能として .R1 と .R2 の間の行はコマンドとして解釈 さ
れ ます。この機能を使用して作成されたドキュメントは、ドキュメントの先頭
に
.de R1
.ig R2
..
の行を追加することにより UNIX refer でも処理できます。この指定によっ て
troff は .R1 と .R2 の間をすべて無視します。このオプションによっていく
つかのコマンドと同等の効果を得ることができます。これらのオプションは 主
に Unix refer との互換性のためにサポートされているものです。通常はコマ
ンドを使った方が便利です。
refer は refer の出力を読むコマンドによって生成されるメッセージの中のフ
ァ イ ル 名と行番号が正しくなるように .lf 行を生成します。入力が soelim
(1) のようなコマンドによって前処理されている場合でも、メッセージ中の フ
ァ イル名と行番号と生成される .lf 行が正確になるように .lf で始まる行も
解釈します。
オプション
ほとんどのオプションには同等なコマンドがあります (これらのコマンドに つ
いては コマンドセクションの説明を参照して下さい)。
-b no-label-in-text; no-label-in-reference
-e accumulate
-n no-default-database
-C compatible
-P move-punctuation
-S label "(A.n|Q) ’, ’ (D.y|D)"; bracket-label " (" ) "; "
-an reverse An
-cfields
capitalize fields
-fn label %n
-ifields
search-ignore fields
-k label L∼%a
-kfield
label field∼%a
-l label A.nD.y%a
-lm label A.n+mD.y%a
-l,n label A.nD.y-n%a
-lm,n label A.n+mD.y-n%a
-pfilename
database filename
-sspec sort spec
-tn search-truncate n
こ れらのオプションは以下のコマンドと同等です。ただし、通常の方法のかわ
りにコマンド行で指定されるファイル名が bibliography コマンドへの引数 で
あるように処理されます。
-B annotate X AP; no-label-in-reference
-Bfield.macro
annotate field macro; no-label-in-reference
以下のオプションには同等なコマンドはありません。
-v バージョン番号を表示します。
-R .R1 / .R2 で始まる行を認識しません。
使用法
図書目録データベース
図書目録データベースは 1 行以上の空白行で区切られたレコードからなるテキ
ストファイルです。各レコードではフィールドは % で始まる行で開始します。
各 フィールドには % に続く 1 文字の名称があります。フィールドの名称には
大文字か小文字のみを使うのが最良の方法です。フィールドの名称の後には 正
確に 1 つのスペースが続かなければなりません。空のフィールドは無視されま
す。各フィールドの慣例的な意味は次の通りです。
A 作者の名前。名前の末尾に Jr. のような肩書が含まれる場合はコンマ
で ラストネームと区切られていなければなりません。 A フィールドは
複数回現れても構いません。出現する順番は意味を持ちます。 A フ ィ
ールドか Q フィールドは常に指定するのが良いでしょう。
B ある本の一部である記事において、その本のタイトルです。
C 出版社の所在地 (都市) です。
D 出版された日付です。出版年に略称を使用してはいけません。もし出版
月を指定する場合は数字による月ではなく、月名を使わなければなりま
せんが、最初の 3 文字を指定すれば十分です。 D フィールドは常に指
定するのが良いでしょう。ただし、出版の日付が分からなけ れ ば in
press や unknown のような値を使うこともできます。
E ある本の一部である記事において、その本の編集者の名前です。出版作
業が著者のない編集だけのものであった場合、編集者の名前を A フ ィ
ー ルドで指定し、 , (ed) または , (eds) を最後の著者の後に指定し
なければなりません。
G 米国政府注文番号です。
I 出版者 (発行人) です。
J 定期刊行物の記事における、その刊行物の名称です。
K 検索に使われるキーワードです。
L ラベルです。
N 定期刊行物の発行番号です。
O その他の情報です。これは通常参考文献の末尾に印刷されます。
P ページ番号です。ページ番号の範囲は m - n で指定できます。
Q 著者が個人でない場合の著者の名称です。これは A フィールドがな い
場合にのみ使用されます。 Q フィールドは 1 つのみ使うことができま
す。
R 技術報告書番号です。
S シリーズの名称です。
T タイトルです。本や定期刊行物中の記事ではこれは記事のタイトルとな
ります。
V 定期刊行物もしくは本のボリューム番号です。
X 注釈です。
A と E を除くすべてのフィールドで、あるレコードに複数の特定のフィールド
がある場合、最後のフィールドのみが使用されます。
アクセント文字列はアクセントをつける文字に引き続いて指定されなければ な
りません。これは AM マクロは -ms マクロとともに使用しなければならないこ
とを意味します。アクセント文字列は引用符で囲んではいけません。また、 \
は 2 つでなく 1 つのみ使って下さい。
引用
引用のフォーマットは
.[opening-text
flags keywords
fields
.]closing-text
となります。
opening-text と closing-text と flags のコンポーネントは省略可能です。
keywords か fields のいずれか 1 つのコンポーネントを指定する必要があ り
ます。
keywords コンポーネントは keywords に含まれる全ての単語を含む参考文献を
文献データベースから検索するために指定します。もし複数の参考文献が見 つ
かった場合はエラーとなります。
fields コンポーネントは参考文献の中で指定されるものを置き換えるか付け加
えるための追加フィールドを指定します。参考文献が蓄積される設定で、 key-
words コンポーネントが空でなければ、追加フィールドはある特定の参考文献
が引用されている最初の部分においてのみ指定されなければならず、その参 考
文献を引用している全ての部分に適用されます。
opening-text と closing-text コンポーネントは bracket-label コマンドに
おいて指定される文字列の代わりにラベルを囲むために使われる文字列を指 定
します。これらのいずれもが空でなければ、 bracket-label コマンドで指定さ
れている文字列は使われません。この処理は [ と ] フラグを使って置き換 え
る ことができます。これらのコンポーネントの前と後につくスペースは意味を
持つことに注意して下さい。
flags コンポーネントはここでの引用の扱いを変更するためのアルファベッ ト
以 外の文字のリストです。 Unix refer はこれらのフラグをキーワードの一部
として処理しますが、それらはアルファベットでないため無視します。以下 の
フラグが現在認識されるものです。
# これは short-label コマンドによって指定されるラベルを label コマ
ンドで指定されるものの代わりに使用することを指示します。もしショ
ートラベルが指定されなければ、通常のラベルが使用されます。普通は
ショートラベルは auther-date ラベルに使用され、日付とおそらく は
曖 昧さが取り除かれた文字から構成されます。ここで、 # はラベルの
数字によるタイプを示唆するものと考えられます。
[ bracket-label コマンドの中で指定される最初の文字 列 が opening-
text の前に置かれます。
] bracket-label コマンドの中で指定される 2 番目の文字列が closing-
text の後に置かれます。
opening-text と closing-text の中に括弧を含めるのではなく、 [ と ] フラ
グ を使うことの 1 つの利点は bracket-label コマンドで変更するだけでドキ
ュメントの中で使っている括弧のスタイルを変更できることです。もう 1 つの
利 点として、これらのフラグを使うことによって引用のソートとマージを禁止
する必要がないことがあげられます。
もしラベルがテキスト中に挿入されるべきものであれば、それは .[ 行の前 の
行 に挿入されます。そのような行がない場合には .[ の前に余分の行が挿入さ
れて警告が表示されます。
複数の参考文献に対する引用を作成する特別の表記法はありません。ただ引 用
を 1 つの参考文献につき 1 つずつ連続して使用します。引用の間には何も入
れないで下さい。全ての引用に対するラベルは最初の引用の前の行に付加さ れ
ま す。ラベルはまたソートしたり、マージしたりすることもできます。ラベル
の表記法 <> とコマンド sort-adjacent-labels と abbreviate-label-ranges
の説明を参照して下さい。ラベルは引用に空でない opening-text か closing-
text がある時にはマージされません。しかし、 opening-text が伴わず [ フ
ラグを使った引用がその直後に続く、 closing-text を伴わない ] フラグを使
った引用のラベルは最初の引用の opening-text か次の引用 の closing-text
が 空でない場合においても、ソートとマージを行なうことができます。 (もし
これを行ないたくない場合は、最初の引用で closing-text を \& としてく だ
さい。)
コマンド
コ マンドは .R1 で始まる行と .R2 の間に指定されます。これらの行は -R オ
プションを使うことによって認識されないようにできます。 .R1 行が認識され
た 時、すべての蓄積されている参考文献は消去されます。 .R1 行と .R2 行お
よびこれらの間に指定されたものはすべて出力されません。
コマンドは改行か ; によって区切られます。 # からその行の最後まではコ メ
ン トとなります (しかし、改行自身は改行としてあつかわれます)。各コマン
ドはワードに分割されます。ワードはスペースかタブによって区切られます 。
" で始まるワードは次の " (ただしもう 1 つの " が直後にないもの) までが
ワードとして扱われます。もし、次の " がない場合にはその行の最後までがワ
ードとなります。 " で始まるワード中の " のペアはひとつの " として扱われ
ます。 " の中では # と ; は認識されません。行は末尾に \ をつけること に
よって継続できます。ただし # の後の場合は継続されません。
* でマークされた各コマンド name には name の効果を打ち消す否定コマンド
no-name があります。例えば、 no-sort コマンドは参考文献をソートしないこ
とを指定します。否定コマンドは引数を取りません。
以下の説明で各引数はひとつのワードとなります。 field はフィールドの名前
となる 1 文字の小文字または大文字です。 fields はそのような文字のシーケ
ン スです。 m と n は非負の数字です。 string は任意の文字列です。 file-
name はファイル名です。
abbreviate* fields string1 string2 string3 string4
fields のファーストネームを短縮形にします。 頭
文字ともう 1 つの頭文字の間には string1 が挿入
されます。ラストネームとの間には string2 が 挿
入され、その他のもの ( von や de のようなもの)
との間には string3 が挿入されます。これらの ス
トリングのデフォルトはピリオドにスペースが続い
たものとなります。ハイフンで区切られたファース
ト ネ ー ム の中で、名前の最初の部分の頭文字は
string4 (デフォルトはピリオド) によってハイ フ
ンと分離されます。省略形に起因する曖昧さについ
ては特に考慮していません。名前はソートする前お
よびラベルが構築される前に省略形にされます。
abbreviate-label-ranges* string
連 続した参考文献を参照する 3 つ以上の隣接する
ラベルは、最初のラベル string 最後のラベルの順
か らなる 1 つのラベルに省略されます。これは主
に数字ラベルにおいて便利です。 string が省略さ
れた場合のデフォルトは - です。
accumulate* 各参考文献を出現するたびに書き出すのではなく、
参考文献を蓄積していきます。蓄積された参考文献
は すべての入力ファイルが処理され .R1 行が認識
された後に、
.[
$LIST$
.]
の形式の参照が指定された時に書き出されます。
annotate* field string field は注釈です。注釈は参考文献の最後に
.string
の行の後にパラグラフとして印刷されます。 macro
が省略されるとデフォルトの AP となります。もし
、 field も省略されるとデフォルトの X となりま
す。注釈になれるフィールドは 1 つのみです。
articles string... string... は定冠詞もしくは不定冠詞であり、ソ
ートされる時にはフィールド T の最初では無視 さ
れなければなりません。初期状態では the と a と
an が冠詞として認識されます。
bibliography filename... 図書目録データベース filename... に含まれる全
ての参考文献を書き出します。
bracket-label string1 string2 string3
テキスト中で、各ラベルを string1 と string2 で
囲みます。 string2 の直後に string1 が現れた場
合 は string3 に置き換えられます。デフォルトで
は
bracket-label \*([. \*(.] ", "
となります。
capitalize fields fields を大文字とそれに続く小文字に変換しま す
。
compatible* スペースや改行以外の文字が次に続く場合でも .R1
と .R2 を認識します。
database filename... 図書目録データベース filename... を検索します
。各々の filename について、もし indxbib(1) に
よって生成されたインデックス filename.i が存在
すれば、それが代わりに検索されます。各インデッ
クスは複数のデータベースをカバーできます。
date-as-label* string string はラベルを構成した後にフィールド D を置
き換える文字列を指定するラベル式です。ラベル式
の説明については ラベル式の項を参照して下さ い
。このコマンドは参考文献リストの中で明示的なラ
ベルは使いたくないが、何らかの方法で日付を修飾
することによって曖昧さを取り除きたい場合に便利
です。通常、テキスト中で使用されているラベルは
作者と日付の組み合わせになります。ほとんどの場
合、 no-label-in-reference コマンドも使う必 要
があります。例えば、
date-as-label D.+yD.y%a*D.-y
は 参考文献中のフィールド D の年の部分に曖昧さ
を取り除く文字を追加します。
default-database* デフォルトのデータベースを検索します。これはデ
フォルトの動作であり、このコマンドの否定バージ
ョンが有用です。 refer は検索を行なう必要が 最
初に出てきた場合、デフォルトのデータベースを検
索するべきかどうかを決定します。そのた め no-
default-database コマンドを有効とするためには
、それ以前に指定しておく必要があります。
discard* fields 参考文献が読み込まれた時、 fields を無効としま
す。 fields の文字列の定義は出力されません。初
期状態では fields は XYZ となっています。
et-al* string m n ラベル式における式 @ の評価での et al の使い方
を制御します。著者のシーケンスを明確にするため
に必要な著者の数を u 、著者の合計が t とすると
、 最後の t-u の著者が string によって置換され
、 t-u が m より小さくなく、 t が n より小さく
ないようになります。デフォルトでは
et-al " et al" 2 3
となります。
include filename filename をインクルードし、その内容をコマンド
として解釈します。
join-authors string1 string2 string3
これはどのように作者を連結するかを指定します。
ちょうど 2 人の作者がある場合、 string1 によっ
て連結されます。 2 人より多い作者がある場合 、
最後の 2 人を除いた作者は string2 で連結され、
最後の 2 人の作者は string3 で連結されます。も
し string3 が 省 略 さ れると、デフォルトは
string1 となります。もし string2 も省略され る
と、デフォルトは string1 となります。例えば、
join-authors " and " ", " ", and "
は作者の連結をデフォルトの方法に戻します。
label-in-reference* 参考文献を出力する時に、文字列 [F を参考文献の
ラベルに定義します。これはデフォルトの動作です
。このコマンドの否定バージョンが有用です。
label-in-text* 各参考文献においてテキスト中のラベルを出力しま
す。ラベルは bracket-label コマンドに記述さ れ
ているようにそれを囲むテキストと分離されます。
これはデフォルトの動作です。このコマンドの否定
バージョンが有用です。
label string string はどのように各参考文献にラベルをつける
かを記述するラベル式となります。
separate-label-second-parts string
2つの部分からなるラベルをマージする時、2 番 目
の ラベルの 2 番目の部分を string で最初のラベ
ルと分離します。ラベル式については <> のラベル
式の説明を参照して下さい。
move-punctuation* テキストにおいてラベルの後の行末の句読点を移動
します。ラベルに肩文字の数字を使っていなければ
、このコマンドを使うといいでしょう。
reverse* string 名前が string 中にあるフィールドを逆にします。
各フィールド名の後にはいくつのフィールドが逆に
されるかを示す数が指定されます。フィールドにこ
の数が指定されなければ、そのフィールドは全て逆
になります。
search-ignore* fields インデックスが存在しないデータベースでキーを検
索している際に、 fields の内容を無視します。初
期状態ではフィールド XYZ が無視されます。
search-truncate* n キーの最初の n 文字が与えられることのみを要求
します。実際にデータベース中で与えられたキーを
検 索する時には n とキーの長さの大きい方の長さ
に切られます。初期状態では n は 6 です。
short-label* string string はラベルのもう 1 つの (通常は短縮形 の)
ス タイルを指定するラベル式です。これは # フラ
グが引用で与えられている時に 使 わ れ ま す 。
author-date スタイルのラベルを使う時、作者は文
脈から明らかに識別できることがあり、ラベルでは
作 者を省略したいことがあります。通常、 short-
label コマンドは日付と (多分) 明確な文字のみを
含むラベルを指定するために使用されます。
sort* string string に従って参考文献をソートします。参考文
献は自動的に累積されます。 string はフィールド
名のリストであり、各フィールド名にはソートに使
われる名前にいくつのフィールドがあるかを示す数
字 が続きます。 + を名前のついた全てのフィール
ドを使うことを示すために使うことができます。ま
た、 . を参考文献が (一時的な) ラベルを使って
ソートされることを示すために使うこともできます
。 ( ラベル式のセクションで一時的なラベルの概
念について説明しています。)
sort-adjacent-labels* 参考文献リスト中での位置に従って、テキスト中の
隣接しているラベルをソートします。このコマンド
は通常は abbreviate-label-ranges コマンドが 与
えられている時か、ラベル式に <> 式が含まれてい
る時に使用するべきです。これは参考文献が累積さ
れていないと影響がありません。
ラベル式
ラ ベル式は通常もしくは一時的に評価できます。通常評価の結果は出力に使わ
れます。一時的評価の結果は一時的ラベルと呼ばれ、通常評価でラベルを明 確
に する必要がある情報を集めるために使われます。 date-as-label と short-
label コマンドで指定されるラベル式は一時的には評価されません。通常評 価
と一時的評価は @ と * と % の式を除いた全てのタイプの式で同じです。以下
の説明は特に指定された場合を除き通常評価に適用されます。
field
field n
field の n 番めの部分です。 n が省略された場合はデフォルト は 1
となります。
’string’
string 中の文字は文字通り解釈されます。
@ 全ての作者を join-authors コマンドで指定された通りに連結します。
各々の作者名の全体が使用されます。しかし参考文献が作者でソートさ
れ ると (すなわち A+ で始まるソート仕様)、作者のラストネームが代
わりに使用され (これは曖昧さを持ち込みません)、また作者の頭文 字
のシーケンスが全ての作者の代わりに使用されます (これも曖昧さを持
ち込みません)。いくつかの参考文献の i番目の作者にラストネーム だ
けを使うのは他に参考文献がある時には曖昧であると考えられます。す
なわち参考文献の最初の i-1 人の作者が同じで、 i番目の作者は同 じ
でないが、 i番目の作者のラストネームが同じであるような場合です。
いくつかの参考文献の作者のシーケンスの適切な頭文字のサブシーケン
スは、適切な頭文字のサブシーケンスとしてのサブシーケンスをもつ作
者の別のシーケンスをとる参考文献がある場合には、曖昧であると考え
られます。作者の頭文字のサブシーケンスが使われる場合、残りの作者
は et-al コマンドで指定された文字列で置き換えられます。このコ マ
ンドは頭文字のシーケンスを使うことができる以前に満たされる追加の
要求も指定できます。 @ は一時的に作者の正式の表現に評価され、 ソ
ートのために同等かどうかを比較する作者は同じ表現となります。
%n
%a
%A
%i
%I 参考文献のシリアル番号は % が続く文字に従ってフォーマットされま
す。参考文献のシリアル番号はこの参考文献として同じ一時的ラベルを
も つ先に現れた参考文献の番号に 1 を加えたものとなります。これら
の式は一時的に空の文字列に評価されます。
expr* この参考文献としての同じ一時的ラベルを持つもう 1 つの参考文献 が
ある場合、空の文字列でなければ expr となります。これは一時的に評
価され、空の文字列になります。
expr+n
expr-n expr の最初 (+) または末尾 (-) の n 文字の大文字か小文字か数字で
す。 troff の ( \(’a のような) 特別文字は 1 文字としてカウントさ
れます。アクセント文字列は保持されますが、合計にはカウントされま
せん。
expr.l expr を小文字に変換したものです。
expr.u expr を大文字に変換したものです。
expr.c expr を大文字とそれに続く小文字に変換したものです。
expr.r expr をラストネームが最初に来るように逆にしたものです。
expr.a ファーストネームが略称になった expr です。 abbreviate コマンドに
よって指定されたフィールドはラベルが評価される前に略称にされます
。このため、 .a は参考文献の中ではなくラベルの中でのみフィールド
を略称にしたい時のみ有用です。
expr.y expr の年の部分です。
expr.+y
expr の年の前の部分、もしくはそれが年を含んでいなければ expr の
全体となります。
expr.-y
expr の年の後の部分、もしくは expr が年を含んでいなければ空の文
字列となります。
expr.n expr のラストネームの部分となります。
expr1∼expr2
expr1 となります。ただし、 expr1 の最後の文字が - である場 合 は
expr2 に置き換えられます。
expr1 expr2
expr1 と expr2 の結合です。
expr1|expr2
expr1 が空でなければ expr1 となり、それ以外では expr2 となります
。
expr1&expr2
expr1 が空でなければ expr2 となり、それ以外では空の文字列とな り
ます。
expr1?expr2:expr3
expr1 が空でなければ expr2 となりそれ以外では expr3 となります。
REFER(1) REFER(1)
NAME
refer - preprocess bibliographic references for groff
SYNOPSIS
refer [ -benvCPRS ] [ -an ] [ -cfields ] [ -fn ] [ -ifields ]
[ -kfield ] [ -lm,n ] [ -pfilename ] [ -sfields ] [ -tn ]
[ -Bfield.macro ] [ filename... ]
It is possible to have whitespace between a command line option and its
parameter.
DESCRIPTION
This file documents the GNU version of refer, which is part of the
groff document formatting system. refer copies the contents of file-
name... to the standard output, except that lines between .[ and .]
are interpreted as citations, and lines between .R1 and .R2 are inter-
preted as commands about how citations are to be processed.
Each citation specifies a reference. The citation can specify a refer-
ence that is contained in a bibliographic database by giving a set of
keywords that only that reference contains. Alternatively it can spec-
ify a reference by supplying a database record in the citation. A com-
bination of these alternatives is also possible.
For each citation, refer can produce a mark in the text. This mark
consists of some label which can be separated from the text and from
other labels in various ways. For each reference it also outputs groff
commands that can be used by a macro package to produce a formatted
reference for each citation. The output of refer must therefore be
processed using a suitable macro package. The -ms and -me macros are
both suitable. The commands to format a citation’s reference can be
output immediately after the citation, or the references may be accumu-
lated, and the commands output at some later point. If the references
are accumulated, then multiple citations of the same reference will
produce a single formatted reference.
The interpretation of lines between .R1 and .R2 as commands is a new
feature of GNU refer. Documents making use of this feature can still
be processed by Unix refer just by adding the lines
.de R1
.ig R2
..
to the beginning of the document. This will cause troff to ignore
everything between .R1 and .R2. The effect of some commands can also
be achieved by options. These options are supported mainly for compat-
ibility with Unix refer. It is usually more convenient to use com-
mands.
refer generates .lf lines so that filenames and line numbers in mes-
sages produced by commands that read refer output will be correct; it
also interprets lines beginning with .lf so that filenames and line
numbers in the messages and .lf lines that it produces will be accurate
even if the input has been preprocessed by a command such as soelim(1).
OPTIONS
Most options are equivalent to commands (for a description of these
commands see the Commands subsection):
-b no-label-in-text; no-label-in-reference
-e accumulate
-n no-default-database
-C compatible
-P move-punctuation
-S label "(A.n|Q) ’, ’ (D.y|D)"; bracket-label " (" ) "; "
-an reverse An
-cfields
capitalize fields
-fn label %n
-ifields
search-ignore fields
-k label L∼%a
-kfield
label field∼%a
-l label A.nD.y%a
-lm label A.n+mD.y%a
-l,n label A.nD.y-n%a
-lm,n label A.n+mD.y-n%a
-pfilename
database filename
-sspec sort spec
-tn search-truncate n
These options are equivalent to the following commands with the addi-
tion that the filenames specified on the command line are processed as
if they were arguments to the bibliography command instead of in the
normal way:
-B annotate X AP; no-label-in-reference
-Bfield.macro
annotate field macro; no-label-in-reference
The following options have no equivalent commands:
-v Print the version number.
-R Don’t recognize lines beginning with .R1/.R2.
USAGE
Bibliographic databases
The bibliographic database is a text file consisting of records sepa-
rated by one or more blank lines. Within each record fields start with
a % at the beginning of a line. Each field has a one character name
that immediately follows the %. It is best to use only upper and lower
case letters for the names of fields. The name of the field should be
followed by exactly one space, and then by the contents of the field.
Empty fields are ignored. The conventional meaning of each field is as
follows:
A The name of an author. If the name contains a title such as Jr.
at the end, it should be separated from the last name by a
comma. There can be multiple occurrences of the A field. The
order is significant. It is a good idea always to supply an A
field or a Q field.
B For an article that is part of a book, the title of the book
C The place (city) of publication.
D The date of publication. The year should be specified in full.
If the month is specified, the name rather than the number of
the month should be used, but only the first three letters are
required. It is a good idea always to supply a D field; if the
date is unknown, a value such as in press or unknown can be
used.
E For an article that is part of a book, the name of an editor of
the book. Where the work has editors and no authors, the names
of the editors should be given as A fields and , (ed) or , (eds)
should be appended to the last author.
G US Government ordering number.
I The publisher (issuer).
J For an article in a journal, the name of the journal.
K Keywords to be used for searching.
L Label.
N Journal issue number.
O Other information. This is usually printed at the end of the
reference.
P Page number. A range of pages can be specified as m-n.
Q The name of the author, if the author is not a person. This
will only be used if there are no A fields. There can only be
one Q field.
R Technical report number.
S Series name.
T Title. For an article in a book or journal, this should be the
title of the article.
V Volume number of the journal or book.
X Annotation.
For all fields except A and E, if there is more than one occurrence of
a particular field in a record, only the last such field will be used.
If accent strings are used, they should follow the character to be
accented. This means that the AM macro must be used with the -ms
macros. Accent strings should not be quoted: use one \ rather than
two.
Citations
The format of a citation is
.[opening-text
flags keywords
fields
.]closing-text
The opening-text, closing-text and flags components are optional. Only
one of the keywords and fields components need be specified.
The keywords component says to search the bibliographic databases for a
reference that contains all the words in keywords. It is an error if
more than one reference if found.
The fields components specifies additional fields to replace or supple-
ment those specified in the reference. When references are being accu-
mulated and the keywords component is non-empty, then additional fields
should be specified only on the first occasion that a particular refer-
ence is cited, and will apply to all citations of that reference.
The opening-text and closing-text component specifies strings to be
used to bracket the label instead of the strings specified in the
bracket-label command. If either of these components is non-empty, the
strings specified in the bracket-label command will not be used; this
behaviour can be altered using the [ and ] flags. Note that leading
and trailing spaces are significant for these components.
The flags component is a list of non-alphanumeric characters each of
which modifies the treatment of this particular citation. Unix refer
will treat these flags as part of the keywords and so will ignore them
since they are non-alphanumeric. The following flags are currently
recognized:
# This says to use the label specified by the short-label command,
instead of that specified by the label command. If no short
label has been specified, the normal label will be used. Typi-
cally the short label is used with author-date labels and con-
sists of only the date and possibly a disambiguating letter; the
# is supposed to be suggestive of a numeric type of label.
[ Precede opening-text with the first string specified in the
bracket-label command.
] Follow closing-text with the second string specified in the
bracket-label command.
One advantages of using the [ and ] flags rather than including the
brackets in opening-text and closing-text is that you can change the
style of bracket used in the document just by changing the bracket-
label command. Another advantage is that sorting and merging of cita-
tions will not necessarily be inhibited if the flags are used.
If a label is to be inserted into the text, it will be attached to the
line preceding the .[ line. If there is no such line, then an extra
line will be inserted before the .[ line and a warning will be given.
There is no special notation for making a citation to multiple refer-
ences. Just use a sequence of citations, one for each reference.
Don’t put anything between the citations. The labels for all the cita-
tions will be attached to the line preceding the first citation. The
labels may also be sorted or merged. See the description of the <>
label expression, and of the sort-adjacent-labels and abbreviate-label-
ranges command. A label will not be merged if its citation has a non-
empty opening-text or closing-text. However, the labels for a citation
using the ] flag and without any closing-text immediately followed by a
citation using the [ flag and without any opening-text may be sorted
and merged even though the first citation’s opening-text or the second
citation’s closing-text is non-empty. (If you wish to prevent this
just make the first citation’s closing-text \&.)
Commands
Commands are contained between lines starting with .R1 and .R2. Recog-
nition of these lines can be prevented by the -R option. When a .R1
line is recognized any accumulated references are flushed out. Neither
.R1 nor .R2 lines, nor anything between them is output.
Commands are separated by newlines or ;s. # introduces a comment that
extends to the end of the line (but does not conceal the newline).
Each command is broken up into words. Words are separated by spaces or
tabs. A word that begins with " extends to the next " that is not fol-
lowed by another ". If there is no such " the word extends to the end
of the line. Pairs of " in a word beginning with " collapse to a sin-
gle ". Neither # nor ; are recognized inside "s. A line can be con-
tinued by ending it with \; this works everywhere except after a #.
Each command name that is marked with * has an associated negative com-
mand no-name that undoes the effect of name. For example, the no-sort
command specifies that references should not be sorted. The negative
commands take no arguments.
In the following description each argument must be a single word; field
is used for a single upper or lower case letter naming a field; fields
is used for a sequence of such letters; m and n are used for a non-neg-
ative numbers; string is used for an arbitrary string; filename is used
for the name of a file.
abbreviate* fields string1 string2 string3 string4
Abbreviate the first names of fields. An ini-
tial letter will be separated from another
initial letter by string1, from the last name
by string2, and from anything else (such as a
von or de) by string3. These default to a
period followed by a space. In a hyphenated
first name, the initial of the first part of
the name will be separated from the hyphen by
string4; this defaults to a period. No
attempt is made to handle any ambiguities that
might result from abbreviation. Names are
abbreviated before sorting and before label
construction.
abbreviate-label-ranges* string
Three or more adjacent labels that refer to
consecutive references will be abbreviated to
a label consisting of the first label, fol-
lowed by string followed by the last label.
This is mainly useful with numeric labels. If
string is omitted it defaults to -.
accumulate* Accumulate references instead of writing out
each reference as it is encountered. Accumu-
lated references will be written out whenever
a reference of the form
.[
$LIST$
.]
is encountered, after all input files hve been
processed, and whenever .R1 line is recog-
nized.
annotate* field string field is an annotation; print it at the end of
the reference as a paragraph preceded by the
line
.string
If macro is omitted it will default to AP; if
field is also omitted it will default to X.
Only one field can be an annotation.
articles string... string... are definite or indefinite arti-
cles, and should be ignored at the beginning
of T fields when sorting. Initially, the, a
and an are recognized as articles.
bibliography filename... Write out all the references contained in the
bibliographic databases filename...
bracket-label string1 string2 string3
In the text, bracket each label with string1
and string2. An occurrence of string2 immedi-
ately followed by string1 will be turned into
string3. The default behaviour is
bracket-label \*([. \*(.] ", "
capitalize fields Convert fields to caps and small caps.
compatible* Recognize .R1 and .R2 even when followed by a
character other than space or newline.
database filename... Search the bibliographic databases filename...
For each filename if an index filename.i cre-
ated by indxbib(1) exists, then it will be
searched instead; each index can cover multi-
ple databases.
date-as-label* string string is a label expression that specifies a
string with which to replace the D field after
constructing the label. See the Label expres-
sions subsection for a description of label
expressions. This command is useful if you do
not want explicit labels in the reference
list, but instead want to handle any necessary
disambiguation by qualifying the date in some
way. The label used in the text would typi-
cally be some combination of the author and
date. In most cases you should also use the
no-label-in-reference command. For example,
date-as-label D.+yD.y%a*D.-y
would attach a disambiguating letter to the
year part of the D field in the reference.
default-database* The default database should be searched. This
is the default behaviour, so the negative ver-
sion of this command is more useful. refer
determines whether the default database should
be searched on the first occasion that it
needs to do a search. Thus a no-default-
database command must be given before then, in
order to be effective.
discard* fields When the reference is read, fields should be
discarded; no string definitions for fields
will be output. Initially, fields are XYZ.
et-al* string m n Control use of et al in the evaluation of @
expressions in label expressions. If the num-
ber of authors needed to make the author
sequence unambiguous is u and the total number
of authors is t then the last t-u authors will
be replaced by string provided that t-u is not
less than m and t is not less than n. The
default behaviour is
et-al " et al" 2 3
include filename Include filename and interpret the contents as
commands.
join-authors string1 string2 string3
This says how authors should be joined
together. When there are exactly two authors,
they will be joined with string1. When there
are more than two authors, all but the last
two will be joined with string2, and the last
two authors will be joined with string3. If
string3 is omitted, it will default to
string1; if string2 is also omitted it will
also default to string1. For example,
join-authors " and " ", " ", and "
will restore the default method for joining
authors.
label-in-reference* When outputting the reference, define the
string [F to be the reference’s label. This
is the default behaviour; so the negative ver-
sion of this command is more useful.
label-in-text* For each reference output a label in the text.
The label will be separated from the surround-
ing text as described in the bracket-label
command. This is the default behaviour; so
the negative version of this command is more
useful.
label string string is a label expression describing how to
label each reference.
separate-label-second-parts string
When merging two-part labels, separate the
second part of the second label from the first
label with string. See the description of the
<> label expression.
move-punctuation* In the text, move any punctuation at the end
of line past the label. It is usually a good
idea to give this command unless you are using
superscripted numbers as labels.
reverse* string Reverse the fields whose names are in string.
Each field name can be followed by a number
which says how many such fields should be
reversed. If no number is given for a field,
all such fields will be reversed.
search-ignore* fields While searching for keys in databases for
which no index exists, ignore the contents of
fields. Initially, fields XYZ are ignored.
search-truncate* n Only require the first n characters of keys to
be given. In effect when searching for a
given key words in the database are truncated
to the maximum of n and the length of the key.
Initially n is 6.
short-label* string string is a label expression that specifies an
alternative (usually shorter) style of label.
This is used when the # flag is given in the
citation. When using author-date style
labels, the identity of the author or authors
is sometimes clear from the context, and so it
may be desirable to omit the author or authors
from the label. The short-label command will
typically be used to specify a label contain-
ing just a date and possibly a disambiguating
letter.
sort* string Sort references according to string. Refer-
ences will automatically be accumulated.
string should be a list of field names, each
followed by a number, indicating how many
fields with the name should be used for sort-
ing. + can be used to indicate that all the
fields with the name should be used. Also .
can be used to indicate the references should
be sorted using the (tentative) label. (The
Label expressions subsection describes the
concept of a tentative label.)
sort-adjacent-labels* Sort labels that are adjacent in the text
according to their position in the reference
list. This command should usually be given if
the abbreviate-label-ranges command has been
given, or if the label expression contains a
<> expression. This will have no effect
unless references are being accumulated.
Label expressions
Label expressions can be evaluated both normally and tentatively. The
result of normal evaluation is used for output. The result of tenta-
tive evaluation, called the tentative label, is used to gather the
information that normal evaluation needs to disambiguate the label.
Label expressions specified by the date-as-label and short-label com-
mands are not evaluated tentatively. Normal and tentative evaluation
are the same for all types of expression other than @, *, and % expres-
sions. The description below applies to normal evaluation, except
where otherwise specified.
field
field n
The n-th part of field. If n is omitted, it defaults to 1.
’string’
The characters in string literally.
@ All the authors joined as specified by the join-authors command.
The whole of each author’s name will be used. However, if the
references are sorted by author (that is the sort specification
starts with A+), then authors’ last names will be used instead,
provided that this does not introduce ambiguity, and also an
initial subsequence of the authors may be used instead of all
the authors, again provided that this does not introduce ambigu-
ity. The use of only the last name for the i-th author of some
reference is considered to be ambiguous if there is some other
reference, such that the first i-1 authors of the references are
the same, the i-th authors are not the same, but the i-th
authors’ last names are the same. A proper initial subsequence
of the sequence of authors for some reference is considered to
be ambiguous if there is a reference with some other sequence of
authors which also has that subsequence as a proper initial sub-
sequence. When an initial subsequence of authors is used, the
remaining authors are replaced by the string specified by the
et-al command; this command may also specify additional require-
ments that must be met before an initial subsequence can be
used. @ tentatively evaluates to a canonical representation of
the authors, such that authors that compare equally for sorting
purpose will have the same representation.
%n
%a
%A
%i
%I The serial number of the reference formatted according to the
character following the %. The serial number of a reference is
1 plus the number of earlier references with same tentative
label as this reference. These expressions tentatively evaluate
to an empty string.
expr* If there is another reference with the same tentative label as
this reference, then expr, otherwise an empty string. It tenta-
tively evaluates to an empty string.
expr+n
expr-n The first (+) or last (-) n upper or lower case letters or dig-
its of expr. Troff special characters (such as \(’a) count as a
single letter. Accent strings are retained but do not count
towards the total.
expr.l expr converted to lowercase.
expr.u expr converted to uppercase.
expr.c expr converted to caps and small caps.
expr.r expr reversed so that the last name is first.
expr.a expr with first names abbreviated. Note that fields specified
in the abbreviate command are abbreviated before any labels are
evaluated. Thus .a is useful only when you want a field to be
abbreviated in a label but not in a reference.
expr.y The year part of expr.
expr.+y
The part of expr before the year, or the whole of expr if it
does not contain a year.
expr.-y
The part of expr after the year, or an empty string if expr does
not contain a year.
expr.n The last name part of expr.
expr1∼expr2
expr1 except that if the last character of expr1 is - then it
will be replaced by expr2.
expr1 expr2
The concatenation of expr1 and expr2.
expr1|expr2
If expr1 is non-empty then expr1 otherwise expr2.
expr1&expr2
If expr1 is non-empty then expr2 otherwise an empty string.
expr1?expr2:expr3
If expr1 is non-empty then expr2 otherwise expr3.
コロナウイルスの日ごとの感染者数・死者数をグラフ化してみました。どの国が増加傾向にあり、どの国が終息に向かっているかを視覚化しています。
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa