Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

addbib(1)

indxbib(1)

lookbib(1)

roffbib(1)

sortbib(1)




refer(1) refer(1)
NAME refer - find and insert literature references in documents SYNOPSIS refer [-a[n]] [-b] [-c keys] [-e] [-fn] [-kx] [-l[m,n]] [-n] [-p bib] [-s keys] [-Bl.m] [-P] [-S] [file...] DESCRIPTION refer is a preprocessor for nroff(1) or troff(1) 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. Given an incomplete citation with sufficiently precise key- words, refer searches a bibliographic database for refer- ences containing these keywords anywhere in the title, au- thor, journal, and so forth. 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 biblio- graphic database. The user may also search different data- bases, override particular fields, or add new fields. The reference data, from whatever source, is assigned to a set of troff strings. Macro packages such as ms(5) print the finished reference text from these strings. By default, references are flagged by footnote numbers. FLAG OPTIONS The following flag options are available. -an Reverse the first n author names, for example, Jones, J. A. instead of J. A. Jones. If n is omitted, all author names are reversed. -b Bare mode: do not put any flags in text (neither numbers nor labels). -ckeys Capitalize (with CAPS SMALL CAPS) the fields whose key-letters are in keys. -e Instead of leaving the references where encountered, accumulate them until a sequence of the form .[ $LIST$ .] is encountered, and then write out all references col- lected so far and collapse the references to the same source. April, 1990 1



refer(1) refer(1)
-fn Set the footnote number to n instead of the default of 1. With labels rather than numbers, this flag is a no-op. -kx Instead of numbering references, use labels as speci- fied in a reference data line beginning %x. By de- fault, x is L. -lm,n Instead of numbering references, use labels made from the senior author's last name and the year of publica- tion. Only the first m letters of the last name and the last n digits of the date are used. If either m or n is omitted, the entire name or date is used. -n Do not search /usr/dict/papers/Ind, the default file. If there is a REFER environment variable, the speci- fied file is searched instead of the default file; in this case the -n flag has no effect. -p bib Take the next argument bib as a file of references to be searched. The default file is searched last. -s keys Sort references by fields whose keyletters are in the keys string; permute the reference numbers in text ac- cordingly. This flag option implies -e. The keyletters in keys may be followed by a number to in- dicate how many such fields are used, with + taken as a very large number. The default is AD, which sorts on the senior author and then date. To sort, for ex- ample, on all authors and then, the title, use -sA+T. -Bl.m Bibliography mode: take a file composed of records separated by blank lines and turn them into troff in- put. Label l is turned into the macro .m with l de- faulting to %X and .m defaulting to .AP (annotation paragraph). -P Place punctuation marks ( . , : ; ? ! ) after the reference signal rather than before. (Periods and commas used to be done with strings.) -S Produce references in the Natural or Social Science format. To use your own references, put them in the format described below. When refer is used with the eqn, neqn, or tbl preprocessors, refer should be first, to minimize the volume of data passed through pipes. 2 April, 1990



refer(1) refer(1)
The 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 con- taining one kind of information. Fields start on a line be- ginning with a %, followed by a keyletter, then a blank, and finally the contents of the field, which continue until the next line starting with %. The output ordering and format- ting of fields is controlled by the macros specified for nroff/troff (for footnotes and endnotes) or roffbib (for stand-alone bibliographies). For a list of the most common key-letters and their corresponding fields, see addbib(1). An example of a refer entry is given below. EXAMPLES %A T. Monroe %T Creating Inverted Indexes %B Text Processing Guide %V 2.6b %I Data Systems %C Berkeley, California %D 1998 FILES /usr/ucb/refer /usr/dict/papers Directory of default publication lists /usr/lib/refer Directory of companion programs SEE ALSO addbib(1), indxbib(1), lookbib(1), roffbib(1), sortbib(1). BUGS 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. April, 1990 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026