WIPIVERSE

refer (software)

refer is a Unix command-line program for managing bibliographic references and citing them in Roff (troff, nroff, groff) documents. It is implemented as a preprocessor that scans input files for citation markers, searches a bibliographic database, and inserts formatted citations and reference lists into the output.

History

refer was written by Mike Lesk at Bell Laboratories in or before 1978. It became part of most Unix-like operating systems and is now available as part of the GNU Troff (groff) typesetting system. A separate reimplementation named Neatrefer exists as part of the Neatroff project, though it lacks full backward compatibility with the original AT&T refer.

Function

refer works with a flat-file database of bibliographic records. Each record contains line-delimited fields beginning with a % character followed by a letter identifying the field type (e.g., %A for author, %T for title, %D for date). Records are separated by blank lines.

In a Roff document, citations are specified using .[ and .] markers enclosing keywords that match entries in the database. When processed, refer replaces these markers with numbered citations in the text and generates a corresponding bibliography or footnote list.

Example Database Fields

Field Meaning
%A Author name
%B Book title (for articles in a book)
%C Place (city) of publication
%D Date of publication
%E Editor name
%I Publisher (issuer)
%J Journal name
%K Keywords for searching
%N Journal issue number
%P Page numbers
%T Title
%V Volume number

Usage

A typical invocation uses the -R flag to enable the refer preprocessor:

$ REFER=/path/to/bibliography.db groff -R -ms document.ms

Decline

As of 2015, refer sees little use, primarily because troff itself is no longer widely used for longer technical writing that would benefit from automated reference and citation management. Some modern reference management software (e.g., RefWorks) can still import refer-formatted data.

See Also

  • BibTeX – a text-based data format used by LaTeX for bibliographic references
  • EndNote – a similar data scheme used by the EndNote program
  • RIS – a text-based data scheme from Research Information Systems
  • Comparison of reference management software
Browse

More topics to explore

    Browse all articles