Refer manual


refer - (utroff) insert iso-690 compliant references in document


@BINDIR@/refer [-abcdeinPS] [-fn] [-kx] [-lm,n] [-p bib] [-skeys] [-Bl.m] [file ...]


Refer is an enhancement of the Heirloom refer preprocessor for nroff and troff 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.

This version adds to Heirloom refer the ability to sort following the iso-690(7) bibliography standart (-i option), a better capitalize option (-d), support editor names like authors names, and insertion of the universal "&" instead of the english "and" to join names.

Given an incomplete citation with sufficiently precise keywords, refer will search a bibliographic database for references 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 particular fields, or add new fields. The reference data, from whatever source, are assigned to a set of troff strings. Macro packages such as ms print the finished reference text from these strings. By default references are flagged by footnote numbers.

The following options are available :

is encountered, and then write out all references collected so far. Collapse references to same source.

To use your own references, put them in the format described below They can be searched more rapidly by running indxbib(1B) 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(1B). An example of a refer entry is given below.


%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


@REFDIR@/papers directory of default publication lists @REFDIR@ directory of companion programs

See also

referformat(7), sortbib(1), mkey(1), inv(1), hunt(1), and Some application of Inverted Indexes in the UNIX System by M. E. Lesk.


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.


Refer is distributed under the CDDL-1.0 license. This manual page is distributed under the original BSD license.

Help and bugs

Don’t hesitate to ask questions at help at utroff dot org. Please, send bugs and patches at help at utroff dot org.


Written by Mike Lesk, modified by Pierre-Jean Fichet.