LinuxCommandLibrary

refer

Process bibliographic references in troff documents

TLDR

Process a document with bibliographic references

$ refer [document.ms] | troff -ms
copy
Use a specific bibliography database
$ refer -p [references.bib] [document.ms]
copy
Process with groff
$ groff -ms -R [document.ms]
copy
Generate references in footnote style
$ refer -e [document.ms]
copy

SYNOPSIS

refer [-p bibfile] [-e] [-n] [-l m,n] [file...]

DESCRIPTION

refer is a troff preprocessor that handles bibliographic references in documents. It searches bibliography databases for citations and formats them according to specified styles.
Citations in the document are marked with .[ and .] delimiters containing keywords that identify the reference. Refer searches the bibliography for matching entries and inserts formatted citations and reference list entries.
Bibliography files use a simple format with fields identified by single letters (%A for author, %T for title, %J for journal, etc.). Each reference is separated by blank lines.
Refer is typically used in a pipeline with other troff preprocessors (eqn, tbl, pic) and the troff/groff formatter. The -R option to groff invokes refer automatically.

PARAMETERS

-p bibfile

Search specified bibliography file (can be repeated)
-e
Accumulate references and print at end (endnotes style)
-n
Do not search default bibliography file
-l m,n
Label references with m significant letters and n digits
-a n
Reverse first n author names (last name first)
-b
Bare mode; suppress automatic numbering
-c fields
Capitalize fields as specified
-k field
Use specified field as citation key
-s spec
Sort references according to specification
-B field.macro
Set bibliography mode
-S
Produce references compatible with sortbib

BIBLIOGRAPHY FORMAT

%A: Author name (repeatable)
%T: Title
%J: Journal name
%V: Volume number
%N: Issue number
%P: Page numbers
%D: Date
%I: Publisher
%C: City

CAVEATS

Refer is designed for troff/groff document processing, not for modern formats like LaTeX or Markdown. For those, use BibTeX or other format-specific tools.
The default bibliography location varies by system. Use -p to specify explicit bibliography files.
Reference matching uses keywords, which may produce false matches. Use unique identifiers in citations for reliable matching.

HISTORY

Refer was written by Mike Lesk at Bell Labs in the 1970s as part of the Unix document preparation system. It predates BibTeX and established many conventions for bibliography management. The current implementation is part of groff.

SEE ALSO

groff(1), troff(1), sortbib(1), lookbib(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community