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
%A

Author's name

%B

Book containing article

%C

City (place where published)

%D

Date of publication

%E

Editor of book containing article

%F

Footnote number or label (supplied by refer )

%G

Government order number

%H

Header commentary, printed before reference

%I

Issuer (publisher)

%J

Journal containing article

%K

Keywords to use in locating reference

%L

Label field used by refer -k

%M

Bell Labs Memorandum

%N

Number within volume

%O

Other commentary, printed at end of reference

%P

Page number(s)

%Q

Corporate or Foreign Author (unreversed)

%R

Report, paper, or thesis (unpublished)

%S

Series title

%T

Title of article or book

%V

Volume number

%X

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.
...
.SH REFERENCES
.[
$LIST$
.]

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