4.3BSD beta release manual page
[unix-history] / usr / src / old / refer / refer / refer.1
CommitLineData
3f91bd63 1.\" @(#)refer.1 6.1 (Berkeley) %G%
ed6becc3 2.\"
3f91bd63 3.TH REFER 1 ""
ed6becc3
KM
4.AT 3
5.SH NAME
f9479105 6refer \- find and insert literature references in documents
ed6becc3
KM
7.SH SYNOPSIS
8.B refer
f9479105
KM
9[
10.B \-a
11] [
12.B \-b
13] [
14.B \-c
15] [
16.B \-e
17] [
18.BI \-f n
19] [
20.BI \-k x
21] [
22.BI \-l m,n
23] [
24.B \-n
25] [
26.B \-p
27bib
28] [
29.BI \-s keys
30] [
31.BI \-B l.m
32] [
33.B \-P
34] [
35.B \-S
36] [ file ... ]
ed6becc3 37.SH DESCRIPTION
ed6becc3
KM
38.I Refer
39is a preprocessor for
40.I nroff
41or
42.IR troff (1)
f9479105
KM
43that finds and formats references for footnotes or endnotes.
44It is also the base for a series of programs designed to
45index, search, sort, and print stand-alone bibliographies,
46or other data entered in the appropriate form.
47.PP
48Given an incomplete citation with sufficiently precise keywords,
49.I refer
50will search a bibliographic database for references
51containing these keywords anywhere in the title, author, journal, etc.
52The input file (or standard input)
53is copied to standard output,
54except for lines between .[ and .] delimiters,
55which are assumed to contain keywords,
56and are replaced by information from the bibliographic database.
57The user may also search different databases,
58override particular fields, or add new fields.
ed6becc3
KM
59The reference data, from whatever source, are assigned to a set of
60.I troff
61strings.
62Macro packages such as
63.IR ms (7)
64print the finished reference text from these strings.
f9479105
KM
65By default references are flagged by footnote numbers.
66.PP
ed6becc3
KM
67The following options are available:
68.TP 6
3f91bd63 69.BI \-a n
ed6becc3 70Reverse the first
f9479105 71.I n
ed6becc3
KM
72author names (Jones, J. A. instead of J. A. Jones).
73If
f9479105 74.I n
ed6becc3
KM
75is omitted all author names are reversed.
76.ns
77.TP
78.B \-b
79Bare mode: do not put any flags in text (neither numbers nor labels).
80.ns
81.TP
f9479105 82.BI \-c keys
ed6becc3
KM
83Capitalize (with C\s-2APS\s0 S\s-2MALL\s+2 C\s-2APS\s0)
84the fields whose key-letters are in
f9479105 85.IR keys .
ed6becc3
KM
86.ns
87.TP
88.B \-e
89Instead of leaving the references where encountered,
f9479105 90accumulate them until a sequence of the form
ed6becc3 91.nf
f9479105
KM
92 .[
93 $LIST$
94 .]
ed6becc3 95.fi
f9479105
KM
96is encountered, and then write out all references collected so far.
97Collapse references to same source.
98.ns
99.TP
100.BI \-f n
101Set the footnote number to
102.I n
103instead of the default of 1 (one).
104With labels rather than numbers,
105this flag is a no-op.
ed6becc3
KM
106.ns
107.TP
108.BI \-k x
f9479105
KM
109Instead of numbering references, use labels as specified in a
110reference data line beginning
ed6becc3 111.I %x;
f9479105 112by default
ed6becc3
KM
113.I x
114is
115.B L.
116.ns
117.TP
118.BI \-l m , n
119Instead of numbering references, use labels made from
120the senior author's last name and the year of publication.
121Only the first
122.I m
123letters of the last name
124and the last
125.I n
126digits of the date are used.
127If either
128.I m
129or
f9479105 130.I n
ed6becc3
KM
131is omitted the entire name or date respectively is used.
132.ns
133.TP
f9479105
KM
134.B \-n
135Do not search the default file /usr/dict/papers/Ind.
136If there is a REFER environment variable,
137the specified file will be searched instead of the default file;
138in this case the
139.B \-n
140flag has no effect.
ed6becc3
KM
141.ns
142.TP
f9479105
KM
143.BI \-p \0bib
144Take the next argument
145.I bib
146as a file of references to be searched.
147The default file is searched last.
ed6becc3
KM
148.ns
149.TP
150.BI \-s keys
f9479105 151Sort references by fields whose key-letters are in the
ed6becc3
KM
152.I keys
153string;
f9479105 154permute reference numbers in text accordingly.
ed6becc3
KM
155Implies
156.BR \-e .
157The key-letters in
158.I keys
159may be followed by a number to indicate how many such fields
160are used, with
161.B +
162taken as a very large number.
163The default is
164.B AD
165which sorts on the senior author and then date; to sort, for example,
166on all authors and then title use
167.BR -sA+T .
f9479105
KM
168.ns
169.TP
170.BI \-B l.m
171Bibliography mode.
172Take a file composed of records separated by blank lines,
173and turn them into
174.I troff
175input.
176Label
177.I l
178will be turned into the macro
179.I .m
180with
181.I l
182defaulting to
183.B %X
184and
185.I .m
186defaulting to
187.B .AP
188(annotation paragraph).
189.ns
190.TP
191.B \-P
192Place punctuation marks .,:;?! after the reference signal,
193rather than before.
194(Periods and commas used to be done with strings.)
195.ns
196.TP
197.B \-S
198Produce references in the Natural or Social Science format.
ed6becc3 199.PP
f9479105
KM
200To use your own references,
201put them in the format described below.
202They can be searched more rapidly by running
203.IR indxbib (1)
204on them before using
205.I refer;
206failure to index results in a linear search.
ed6becc3
KM
207When
208.I refer
f9479105 209is used with the
ed6becc3
KM
210.I eqn,
211.I neqn
212or
f9479105
KM
213.I tbl
214preprocessors
ed6becc3
KM
215.I refer
216should be first, to minimize the volume
f9479105
KM
217of data passed through pipes.
218.PP
219The
220.I refer
221preprocessor and associated programs
222expect input from a file of references
223composed of records separated by blank lines.
224A record is a set of lines (fields),
225each containing one kind of information.
226Fields start on a line beginning with a ``%'',
227followed by a key-letter, then a blank,
228and finally the contents of the field,
229and continue until the next line starting with ``%''.
230The output ordering and formatting of fields
231is controlled by the macros specified for
232.I nroff/troff
233(for footnotes and endnotes) or
234.I roffbib
235(for stand-alone bibliographies).
236For a list of the most common key-letters
237and their corresponding fields, see
238.IR addbib (1).
239An example of a
240.I refer
241entry is given below.
242.SH EXAMPLE
243.PP
244.nf
245%A M. E. Lesk
246%T Some Applications of Inverted Indexes on the \s-1UNIX\s0 System
247%B \s-1UNIX\s0 Programmer's Manual
248%V 2b
249%I Bell Laboratories
250%C Murray Hill, NJ
251%D 1978
252.fi
ed6becc3 253.SH FILES
f9479105
KM
254.ta \w'/usr/dict/papers\0\0'u
255/usr/dict/papers directory of default publication lists
ed6becc3 256.br
f9479105 257/usr/lib/refer directory of companion programs
ed6becc3 258.SH SEE ALSO
f9479105
KM
259addbib(1), sortbib(1), roffbib(1), indxbib(1), lookbib(1)
260.SH AUTHOR
261Mike Lesk
262.SH BUGS
263Blank spaces at the end of lines in bibliography fields
264will cause the records to sort and reverse incorrectly.
265Sorting large numbers of references causes a core dump.