.\" from 4.3BSD-Tahoe refer.1 6.2 (Berkeley) 5/12/86 .\" .\" This code contains changes by .\" Gunnar Ritter, Freiburg i. Br., Germany, 2005. All rights reserved. .\" .\" Conditions 1, 2, and 4 and the no-warranty notice below apply .\" to these changes. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowedgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" Redistributions of source code and documentation must retain the .\" above copyright notice, this list of conditions and the following .\" disclaimer. .\" Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed or owned by Caldera .\" International, Inc. .\" Neither the name of Caldera International, Inc. nor the names of .\" other contributors may be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE .\" LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" Sccsid @(#)refer.1b 1.4 (gritter) 12/12/05 .\" .\" .\".TH REFER 1 "May 12, 1986" .TH REFER 1B "12/12/05" "Heirloom Documentation Tools" "BSD System Compatibility" .AT 3 .SH NAME refer \- (BSD) find and insert literature references in documents .SH SYNOPSIS .HP .ad l .nh \fB/usr/ucb/refer\fR [\fB\-abcenPS\fR] [\fB\-f\fIn\fR] [\fB\-k\fIx\fR] [\fB\-l\fIm\fB,\fIn\fR] [\fB\-p\ \fIbib\fR] [\fB\-s\fIkeys\fR] [\fB\-B\fIl\fB.\fIm\fR] [\fIfile\fR ...] .br .hy 1 .ad b .SH DESCRIPTION .I Refer is a preprocessor for .I nroff or .IR troff (1B) that finds and formats references for footnotes or endnotes. It is also the base for a series of programs designed to index, search, sort, and print stand-alone bibliographies, or other data entered in the appropriate form. .PP Given an incomplete citation with sufficiently precise keywords, .I refer will search a bibliographic database for references containing these keywords anywhere in the title, author, journal, etc. The input file (or standard input) is copied to standard output, except for lines between .[ and .] delimiters, which are assumed to contain keywords, and are replaced by information from the bibliographic database. The user may also search different databases, override particular fields, or add new fields. The reference data, from whatever source, are assigned to a set of .I troff strings. Macro packages such as .IR ms (7B) print the finished reference text from these strings. By default references are flagged by footnote numbers. .PP The following options are available: .TP 6 .BI \-a n Reverse the first .I n author names (Jones, J. A. instead of J. A. Jones). If .I n is omitted all author names are reversed. .ns .TP .B \-b Bare mode: do not put any flags in text (neither numbers nor labels). .ns .TP .BI \-c keys Capitalize (with C\s-2APS\s0 S\s-2MALL\s+2 C\s-2APS\s0) the fields whose key-letters are in .IR keys . .ns .TP .B \-e Instead of leaving the references where encountered, accumulate them until a sequence of the form .nf .[ $LIST$ .] .fi is encountered, and then write out all references collected so far. Collapse references to same source. .ns .TP .BI \-f n Set the footnote number to .I n instead of the default of 1 (one). With labels rather than numbers, this flag is a no-op. .ns .TP .BI \-k x Instead of numbering references, use labels as specified in a reference data line beginning .I %x; by default .I x is .B L. .ns .TP .BI \-l m , n Instead of numbering references, use labels made from the senior author's last name and the year of publication. Only the first .I m letters of the last name and the last .I n digits of the date are used. If either .I m or .I n is omitted the entire name or date respectively is used. .ns .TP .B \-n Do not search the default file /usr/ucblib/reftools/papers/Ind. If there is a REFER environment variable, the specified file will be searched instead of the default file; in this case the .B \-n flag has no effect. .ns .TP .BI \-p \0bib Take the next argument .I bib as a file of references to be searched. The default file is searched last. .ns .TP .BI \-s keys Sort references by fields whose key-letters are in the .I keys string; permute reference numbers in text accordingly. Implies .BR \-e . The key-letters in .I keys may be followed by a number to indicate how many such fields are used, with .B + taken as a very large number. The default is .B AD which sorts on the senior author and then date; to sort, for example, on all authors and then title, use .BR -sA+T . .ns .TP .BI \-B l.m Bibliography mode. Take a file composed of records separated by blank lines, and turn them into .I troff input. Label .I l will be turned into the macro .I .m with .I l defaulting to .B %X and .I .m defaulting to .B .AP (annotation paragraph). .ns .TP .B \-P Place punctuation marks .,:;?! after the reference signal, rather than before. (Periods and commas used to be done with strings.) .ns .TP .B \-S Produce references in the Natural or Social Science format. .PP To use your own references, put them in the format described below. They can be searched more rapidly by running .IR indxbib (1B) on them before using .I refer; failure to index results in a linear search. When .I refer is used with the .I eqn, .I neqn or .I tbl preprocessors .I refer should be first, to minimize the volume of data passed through pipes. .PP The .I refer preprocessor and associated programs expect input from a file of references composed of records separated by blank lines. A record is a set of lines (fields), each containing one kind of information. Fields start on a line beginning with a ``%'', followed by a key-letter, then a blank, and finally the contents of the field, and continue until the next line starting with ``%''. The output ordering and formatting of fields is controlled by the macros specified for .I nroff/troff (for footnotes and endnotes) or .I roffbib (for stand-alone bibliographies). For a list of the most common key-letters and their corresponding fields, see .IR addbib (1B). An example of a .I refer entry is given below. .SH EXAMPLE .PP .nf %A M. E. Lesk %T Some Applications of Inverted Indexes on the \s-1UNIX\s0 System %B \s-1UNIX\s0 Programmer's Manual %V 2b %I Bell Laboratories %C Murray Hill, NJ %D 1978 .fi .SH FILES .ta \w'/usr/ucblib/reftools/papers\0\0'u /usr/ucblib/reftools/papers directory of default publication lists .br /usr/ucblib/reftools directory of companion programs .SH SEE ALSO addbib(1B), sortbib(1B), roffbib(1B), indxbib(1B), lookbib(1B) .SH NOTES Blank spaces at the end of lines in bibliography fields will cause the records to sort and reverse incorrectly. Sorting large numbers of references causes a core dump. .PP Written by Mike Lesk.