REFER(1) — Unix Programmer’s Manual
NAME
refer − find and insert literature references in documents
SYNOPSIS
refer [ options ] [ file ... ]
DESCRIPTION
Refer is a preprocessor for nroff or troff(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 keywords, refer searches a bibliographic database for references containing these keywords anywhere in the title, author, journal, etc. Refer copies the input file (or standard input) to standard output, except for lines between .[ and .] delimiters, which it assumes to contain keywords Refer replaces these lines with information from the bibliographic database. The user may also search different databases, override particular fields, or add new fields. Refer assigns the reference data, from whatever source, to a set of troff strings. Macro packages such as ms(7) print the finished reference text from these strings. By default references are flagged by footnote numbers.
OPTIONS
−an Reverses the first n author names (Jones, J. A. instead of J. A. Jones). If n is omitted all author names are reversed.
−b Bare mode: does not put any flags in text (neither numbers nor labels).
−Bl.m Bibliography mode: takes a file composed of records separated by blank lines, and turn them into troff input. Turns label l into the macro .m with l defaulting to %X and .m defaulting to .AP (annotation paragraph).
−ckeys Capitalizes (with CAPS SMALL CAPS) the fields whose key-letters are in keys.
−e Instead of leaving the references where encountered, accumulates them until a sequence of the form
.[
$LIST$
.]
is encountered, and then write out all references collected so far. Collapses references to same source.
−fn Sets the footnote number to n instead of the default of 1 (one). With labels rather than numbers, this flag is a no-op.
−kx Instead of numbering references, uses labels as specified in a reference data line beginning %x; by default x is L.
−lm,n Instead of numbering references, uses labels made from the senior author’s last name and the year of publication. Only the first m letters of the last name and the last n digits of the date are used. If either m or n is omitted the entire name or date respectively is used.
−n Does not search the default file /usr/dict/papers/Ind. If there is a REFER environment variable, the specified file will be searched instead of the default file; in this case the −n flag has no effect.
−p bib Takes the next argument bib as a file of references to be searched. Searches the default file last.
−P Places punctuation marks .,:;?! after the reference signal, rather than before. (Periods and commas used to be done with strings.)
−skeys Sorts references by fields whose key-letters are in the keys string; permutes reference numbers in text accordingly. Implies −e. The key-letters in keys may be followed by a number to indicate how many such fields are used, with + taken as a very large number. The default is AD which sorts on the senior author and then date. To sort, for example, on all authors and then title, use -sA+T.
−S Produces 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 indxbib(1) on them before using refer; failure to index results in a linear search. When refer is used with the eqn, neqn or tbl preprocessors refer should be first, to minimize the volume of data passed through pipes.
The refer 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 containing 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 ordering and formatting of fields is controlled by the macros specified for nroff/troff (for footnotes and endnotes) or roffbib (for stand-alone bibliographies). For a list of the most common key-letters and their corresponding fields, see addbib(1). An example of a refer entry is given below.
EXAMPLE
%AM. E. Lesk
%TSome Applications of Inverted Indexes on the UNIX System
%BUNIX Programmer’s Manual
%V2b
%IBell Laboratories
%CMurray Hill, NJ
%D1978
FILES
/usr/dict/papersdirectory of default publication lists
/usr/lib/refer directory of companion programs
SEE ALSO
addbib(1), sortbib(1), roffbib(1), indxbib(1), lookbib(1)
BUGS
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.
INTEGRATED SOLUTIONS 4.3 BSD — May 12, 1986