BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / refer.0
REFER(1) UNIX Programmer's Manual REFER(1)
N\bNA\bAM\bME\bE
refer - find and insert literature references in documents
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
r\bre\bef\bfe\ber\br [ -\b-a\ba ] [ -\b-b\bb ] [ -\b-c\bc ] [ -\b-e\be ] [ -\b-f\bf_\bn ] [ -\b-k\bk_\bx ] [ -\b-l\bl_\bm,_\bn ]
[ -\b-n\bn ] [ -\b-p\bp bib ] [ -\b-s\bs_\bk_\be_\by_\bs ] [ -\b-B\bB_\bl._\bm ] [ -\b-P\bP ] [ -\b-S\bS ] [ file
... ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bR_\be_\bf_\be_\br is a preprocessor for _\bn_\br_\bo_\bf_\bf or _\bt_\br_\bo_\bf_\bf(1) that finds and
formats references for footnotes or endnotes. It is also
the base for a series of programs designed to index, search,
sort, and print stand-alone bibliographies, or other data
entered in the appropriate form.
Given an incomplete citation with sufficiently precise key-
words, _\br_\be_\bf_\be_\br will search a bibliographic database for refer-
ences containing these keywords anywhere in the title,
author, journal, etc. The input file (or standard input) is
copied to standard output, except for lines between .[ and
.] delimiters, which are assumed to contain keywords, and
are replaced by information from the bibliographic database.
The user may also search different databases, override par-
ticular fields, or add new fields. The reference data, from
whatever source, are assigned to a set of _\bt_\br_\bo_\bf_\bf strings.
Macro packages such as _\bm_\bs(7) print the finished reference
text from these strings. By default references are flagged
by footnote numbers.
The following options are available:
-\b-a\ba_\bn Reverse the first _\bn author names (Jones, J. A. instead
of J. A. Jones). If _\bn is omitted all author names are
reversed.
-\b-b\bb Bare mode: do not put any flags in text (neither
numbers nor labels).
-\b-c\bc_\bk_\be_\by_\bs
Capitalize (with CAPS SMALL CAPS) the fields whose
key-letters are in _\bk_\be_\by_\bs.
-\b-e\be Instead of leaving the references where encountered,
accumulate them until a sequence of the form
.[
$LIST$
.]
is encountered, and then write out all references col-
lected so far. Collapse references to same source.
-\b-f\bf_\bn Set the footnote number to _\bn instead of the default of
1 (one). With labels rather than numbers, this flag
Printed 7/9/88 May 12, 1986 1
REFER(1) UNIX Programmer's Manual REFER(1)
is a no-op.
-\b-k\bk_\bx Instead of numbering references, use labels as speci-
fied in a reference data line beginning %_\bx; by default
_\bx is L\bL.\b.
-\b-l\bl_\bm,\b,_\bn Instead of numbering references, use labels made from
the senior author's last name and the year of publica-
tion. Only the first _\bm letters of the last name and
the last _\bn digits of the date are used. If either _\bm
or _\bn is omitted the entire name or date respectively
is used.
-\b-n\bn Do not search the default file /usr/dict/papers/Ind.
If there is a REFER environment variable, the speci-
fied file will be searched instead of the default
file; in this case the -\b-n\bn flag has no effect.
-\b-p\bp _\bb_\bi_\bb
Take the next argument _\bb_\bi_\bb as a file of references to
be searched. The default file is searched last.
-\b-s\bs_\bk_\be_\by_\bs
Sort references by fields whose key-letters are in the
_\bk_\be_\by_\bs string; permute reference numbers in text accord-
ingly. Implies -\b-e\be. The key-letters in _\bk_\be_\by_\bs may be
followed by a number to indicate how many such fields
are used, with +\b+ taken as a very large number. The
default is A\bAD\bD which sorts on the senior author and
then date; to sort, for example, on all authors and
then title, use -\b-s\bsA\bA+\b+T\bT.
-\b-B\bB_\bl._\bm Bibliography mode. Take a file composed of records
separated by blank lines, and turn them into _\bt_\br_\bo_\bf_\bf
input. Label _\bl will be turned into the macro ._\bm with
_\bl defaulting to %\b%X\bX and ._\bm defaulting to .\b.A\bAP\bP (annota-
tion paragraph).
-\b-P\bP Place punctuation marks .,:;?! after the reference
signal, rather than before. (Periods and commas used
to be done with strings.)
-\b-S\bS Produce references in the Natural or Social Science
format.
To use your own references, put them in the format described
below. They can be searched more rapidly by running _\bi_\bn_\bd_\bx_\b-
_\bb_\bi_\bb(1) on them before using _\br_\be_\bf_\be_\br; failure to index results
in a linear search. When _\br_\be_\bf_\be_\br is used with the _\be_\bq_\bn, _\bn_\be_\bq_\bn
or _\bt_\bb_\bl preprocessors _\br_\be_\bf_\be_\br should be first, to minimize the
volume of data passed through pipes.
Printed 7/9/88 May 12, 1986 2
REFER(1) UNIX Programmer's Manual REFER(1)
The _\br_\be_\bf_\be_\br preprocessor and associated programs expect input
from a file of references composed of records separated by
blank lines. A record is a set of lines (fields), each con-
taining one kind of information. Fields start on a line
beginning with a ``%'', followed by a key-letter, then a
blank, and finally the contents of the field, and continue
until the next line starting with ``%''. The output order-
ing and formatting of fields is controlled by the macros
specified for _\bn_\br_\bo_\bf_\bf/_\bt_\br_\bo_\bf_\bf (for footnotes and endnotes) or
_\br_\bo_\bf_\bf_\bb_\bi_\bb (for stand-alone bibliographies). For a list of the
most common key-letters and their corresponding fields, see
_\ba_\bd_\bd_\bb_\bi_\bb(1). An example of a _\br_\be_\bf_\be_\br entry is given below.
E\bEX\bXA\bAM\bMP\bPL\bLE\bE
%A M. E. Lesk
%T Some Applications of Inverted Indexes on the UNIX System
%B UNIX Programmer's Manual
%V 2b
%I Bell Laboratories
%C Murray Hill, NJ
%D 1978
F\bFI\bIL\bLE\bES\bS
/usr/dict/papers directory of default publication lists
/usr/lib/refer directory of companion programs
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
addbib(1), sortbib(1), roffbib(1), indxbib(1), lookbib(1)
A\bAU\bUT\bTH\bHO\bOR\bR
Mike Lesk
B\bBU\bUG\bGS\bS
Blank spaces at the end of lines in bibliography fields will
cause the records to sort and reverse incorrectly. Sorting
large numbers of references causes a core dump.
Printed 7/9/88 May 12, 1986 3