1REFER(1) General Commands Manual REFER(1)
2
3
4
6 refer - find and insert literature references in documents
7
9 refer [ -a ] [ -b ] [ -c ] [ -e ] [ -fn ] [ -kx ] [ -lm,n ] [ -n ] [ -p
10 bib ] [ -skeys ] [ -Bl.m ] [ -P ] [ -S ] [ file ... ]
11
13 Refer is a preprocessor for nroff or troff(1) that finds and formats
14 references for footnotes or endnotes. It is also the base for a series
15 of programs designed to index, search, sort, and print stand-alone bib‐
16 liographies, or other data entered in the appropriate form.
17
18 Given an incomplete citation with sufficiently precise keywords, refer
19 will search a bibliographic database for references containing these
20 keywords anywhere in the title, author, journal, etc. The input file
21 (or standard input) is copied to standard output, except for lines
22 between .[ and .] delimiters, which are assumed to contain keywords,
23 and are replaced by information from the bibliographic database. The
24 user may also search different databases, override particular fields,
25 or add new fields. The reference data, from whatever source, are
26 assigned to a set of troff strings. Macro packages such as ms(7) print
27 the finished reference text from these strings. By default references
28 are flagged by footnote numbers.
29
30 The following options are available:
31
32 -an Reverse the first n author names (Jones, J. A. instead of J. A.
33 Jones). If n is omitted all author names are reversed.
34
35 -b Bare mode: do not put any flags in text (neither numbers nor
36 labels).
37
38 -ckeys
39 Capitalize (with CAPS SMALL CAPS) the fields whose key-letters
40 are in keys.
41
42 -e Instead of leaving the references where encountered, accumulate
43 them until a sequence of the form
44 .[
45 $LIST$
46 .]
47 is encountered, and then write out all references collected so
48 far. Collapse references to same source.
49
50 -fn Set the footnote number to n instead of the default of 1 (one).
51 With labels rather than numbers, this flag is a no-op.
52
53 -kx Instead of numbering references, use labels as specified in a
54 reference data line beginning %x; by default x is L.
55
56 -lm,n Instead of numbering references, use labels made from the senior
57 author's last name and the year of publication. Only the first m
58 letters of the last name and the last n digits of the date are
59 used. If either m or n is omitted the entire name or date
60 respectively is used.
61
62 -n Do not search the default file /usr/dict/papers/Ind. If there is
63 a REFER environment variable, the specified file will be searched
64 instead of the default file; in this case the -n flag has no
65 effect.
66
67 -p bib
68 Take the next argument bib as a file of references to be
69 searched. The default file is searched last.
70
71 -skeys
72 Sort references by fields whose key-letters are in the keys
73 string; permute reference numbers in text accordingly. Implies
74 -e. The key-letters in keys may be followed by a number to indi‐
75 cate how many such fields are used, with + taken as a very large
76 number. The default is AD which sorts on the senior author and
77 then date; to sort, for example, on all authors and then title,
78 use -sA+T.
79
80 -Bl.m Bibliography mode. Take a file composed of records separated by
81 blank lines, and turn them into troff input. Label l will be
82 turned into the macro .m with l defaulting to %X and .m default‐
83 ing to .AP (annotation paragraph).
84
85 -P Place punctuation marks .,:;?! after the reference signal, rather
86 than before. (Periods and commas used to be done with strings.)
87
88 -S Produce references in the Natural or Social Science format.
89
90 To use your own references, put them in the format described below.
91 They can be searched more rapidly by running indxbib(1) on them before
92 using refer; failure to index results in a linear search. When refer
93 is used with the eqn, neqn or tbl preprocessors refer should be first,
94 to minimize the volume of data passed through pipes.
95
96 The refer preprocessor and associated programs expect input from a file
97 of references composed of records separated by blank lines. A record
98 is a set of lines (fields), each containing one kind of information.
99 Fields start on a line beginning with a ``%'', followed by a key-let‐
100 ter, then a blank, and finally the contents of the field, and continue
101 until the next line starting with ``%''. The output ordering and for‐
102 matting of fields is controlled by the macros specified for nroff/troff
103 (for footnotes and endnotes) or roffbib (for stand-alone bibliogra‐
104 phies). For a list of the most common key-letters and their corre‐
105 sponding fields, see addbib(1). An example of a refer entry is given
106 below.
107
109 %A M. E. Lesk
110 %T Some Applications of Inverted Indexes on the UNIX System
111 %B UNIX Programmer's Manual
112 %V 2b
113 %I Bell Laboratories
114 %C Murray Hill, NJ
115 %D 1978
116
118 /usr/dict/papers directory of default publication lists
119 /usr/libexec/refer directory of companion programs
120
122 addbib(1), sortbib(1), roffbib(1), indxbib(1), lookbib(1)
123
125 Mike Lesk
126
128 Blank spaces at the end of lines in bibliography fields will cause the
129 records to sort and reverse incorrectly. Sorting large numbers of ref‐
130 erences causes a core dump.
131
132
133
1347th Edition October 22, 1996 REFER(1)