home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

17.4 refer

Along with several associated commands, refer is a preprocessor for managing a database of bibliographic references. The database is kept in a separate file, and short references within a document are replaced by an expanded formal version.

The alphabetical command summary at the end of this section lists the usage and options for refer and the other commands that work with bibliographic databases.

refer is not supplied with SVR4, but it is a standard part of Solaris.

17.4.1 Bibliographic Entries

Bibliographic databases are text files, with each entry separated from the next by one or more blank lines. Within an entry, each field consists of a key letter (given as % letter ) and associated value. Values may continue onto subsequent lines, ending at the next line that starts with a % . For example:

%T 5-by-5 Palindromic Word Squares
%A M.D. McIlroy
%J Word Ways
%V 9
%P 199-202
%D 1976

Except for %A (the author), fields should only be supplied once. Irrelevant or inapplicable fields should not be provided.

Key Meaning

Author's name


Book containing article


City (place where published)


Date of publication


Editor of book containing article


Footnote number or label (supplied by refer )


Government order number


Header commentary, printed before reference


Issuer (publisher)


Journal containing article


Keywords to use in locating reference


Label field used by refer -k


Bell Labs Memorandum


Number within volume


Other commentary, printed at end of reference


Page number(s)


Corporate or Foreign Author (unreversed)


Report, paper, or thesis (unpublished)


Series title


Title of article or book


Volume number


Abstract (used by roffbib , not refer )

%Y , %Z

Ignored by refer

17.4.2 General Coding Scheme

In a document, use of refer might look like this:

Palindromes are fun.
Very large ones can be used to impress your friends.
Palindromic word squares
%A McIlroy
are even more amazing,
and should be reserved for impressing your boss.

The document shown here uses refer 's collection mode (-e ), where all the references are printed at the end of the document, instead of at each place they are referenced.

Previous: 17.3 pic UNIX in a Nutshell: System V Edition Next: IV. Software Development
17.3 pic Book Index IV. Software Development

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System