xref: /original-bsd/contrib/bib/man/bib.1 (revision a95f03a8)
"@(#)bib.1 4.6 05/25/86";
BIB 1 "" "Univ of Arizona"
C 4
NAME
bib, listrefs - bibliographic formatter; list bibliographic reference items
SYNOPSIS
bib [options] ...

listrefs [options] ...

DESCRIPTION
Bib is a preprocessor for nroff or troff(1) that formats citations and bibliographies. The input files (standard input default) are copied to the standard output, except for text between [. and .] pairs, which are assumed to be keywords for searching a bibliographic database. If a matching reference is found a citation is generated replacing the text. References are collected, optionally sorted, and written out at a location specified by the user. Citation and reference formats are controlled by the -t option.

Reference databases are created using the invert utility.

The following options are available. Note that standard format styles (see the -t option) set options automatically. Thus if a standard format style is used the user need not indicate any further options for most documents.

-aa 8m
reduce author\*(CQs first names to abbreviations.
-arnum
reverse the first num author's names. If a number is not given all authors names are reversed.
-ax
print authors last names in Caps-Small Caps style. For example Budd becomes B\s-2UDD\s+2. This style is used by certain ACM publications.
-cstr
build citations according to the template str. See the reference format designer\*(CQs guide for more information on templates.
-ea
reduce editors first names to abbreviations.
-ex
print editors last names in Caps-Small Caps style (see -ax option).
-ernum
reverse the first num editors names. If a number is not given all editors names are reversed.
-f
instead of collecting references, dump each reference immediately following the line on which the citation is placed (used for footnoted references).
"-i file"
.ns
-ifile
process the indicated file, such as a file of definitions. (see technical report for a description of file format).
-h
replace citations to three or more adjacent reference items with a hyphenated string (eg 2,3,4,5 becomes 2-5). This option implies the -o option.
-nstr
turn off indicated options. str must be composed of the letters afhosx.
-o
contiguous citations are ordered according the the reference list before being printed (default).
"-p file"
.ns
-pfile
instead of searching the file INDEX, search the indicated reference files before searching the system file. files is a comma separated list of inverted indices, created using the invert utility.
-sstr
sort references according to the template str.
"-t type"
.ns
-ttype
use the standard macros and switch settings for the indicated style to generate citations and references. There are a number of standard styles provided. In addition users can generate their own style macros. See the format designers guide for details.

Listrefs formats an entire reference database file. Options to listrefs are the same as for bib.

Bib was designed initially for use with the -ms macros, and uses a couple of the -ms macros (.ip and .lp) in its macro definitions. To use it with the -me macros, prefix the file being sent to nroff/troff with the following macro definitions:

.de IP
.ip \\$1 \\$2
..
.de LP
.lp
..

A file "bibmac.me" containing these macro definitions may be found in /usr/new/lib/bmac.

FILES
INDEX inverted index for reference database

/usr/dict/papers/INDEX default system index

/usr/new/lib/bmac/bmac.* formatting macro packages

/usr/tmp/bibr* scratch file for collecting references

/usr/tmp/bibp* output of pass one of bib

SEE ALSO
A UNIX Bibliographic Database Facility, Timothy A. Budd and Gary M. Levin, University of Arizona Technical Report 82-1, 1982. (includes format designers guide).

invert(1), troff(1)