[0m


REFER(1)	    UNIX Programmer's Manual		 REFER(1)



[1mNAME
     [0mrefer - find and insert literature references in documents

[1mSYNOPSIS
     refer [0m[ [1m-a [0m] [ [1m-b [0m] [ [1m-c [0m] [ [1m-e [0m] [ [1m-f[0m_n ] [ [1m-k[0m_x ] [ [1m-l[0m_m,_n ]
     [ [1m-n [0m] [ [1m-p [0mbib ] [ [1m-s[0m_k_e_y_s ] [ [1m-B[0m_l._m ] [ [1m-P [0m] [ [1m-S [0m] [ file
     ... ]

[1mDESCRIPTION
     [0m_R_e_f_e_r is a preprocessor for _n_r_o_f_f or _t_r_o_f_f(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, _r_e_f_e_r will search a bibliographic database for refer-
     ences 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 par-
     ticular fields, or add new fields.  The reference data, from
     whatever source, are assigned to a set of _t_r_o_f_f strings.
     Macro packages such as _m_s(7) print the finished reference
     text from these strings.  By default references are flagged
     by footnote numbers.

     The following options are available:

     [1m-a[0m_n   Reverse the first _n author names (Jones, J. A. instead
	   of J. A. Jones).  If _n is omitted all author names are
	   reversed.

     [1m-b    [0mBare mode: do not put any flags in text (neither
	   numbers nor labels).

     [1m-c[0m_k_e_y_s
	   Capitalize (with CAPS SMALL CAPS) the fields whose
	   key-letters are in _k_e_y_s.

     [1m-e    [0mInstead 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.  Collapse references to same source.

     [1m-f[0m_n   Set the footnote number to _n instead of the default of
	   1 (one).  With labels rather than numbers, this flag



Printed 31/1/92     Revision 1.2 of 19/10/88			1






REFER(1)	    UNIX Programmer's Manual		 REFER(1)



	   is a no-op.

     [1m-k[0m_x   Instead of numbering references, use labels as speci-
	   fied in a reference data line beginning %_x; by default
	   _x is [1mL.

     -l[0m_m[1m,[0m_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 respectively
	   is used.

     [1m-n    [0mDo not search the default file /usr/dict/papers/Ind.
	   If there is a REFER environment variable, the speci-
	   fied file will be searched instead of the default
	   file; in this case the [1m-n [0mflag has no effect.

     [1m-p [0m_b_i_b
	   Take the next argument _b_i_b as a file of references to
	   be searched.  The default file is searched last.

     [1m-s[0m_k_e_y_s
	   Sort references by fields whose key-letters are in the
	   _k_e_y_s string; permute reference numbers in text accord-
	   ingly.  Implies [1m-e[0m.	The key-letters in _k_e_y_s may be
	   followed by a number to indicate how many such fields
	   are used, with [1m+ [0mtaken as a very large number.  The
	   default is [1mAD [0mwhich sorts on the senior author and
	   then date; to sort, for example, on all authors and
	   then title, use [1m-sA+T[0m.

     [1m-B[0m_l._m Bibliography mode.  Take a file composed of records
	   separated by blank lines, and turn them into _t_r_o_f_f
	   input.  Label _l will be turned into the macro ._m with
	   _l defaulting to [1m%X [0mand ._m defaulting to [1m.AP [0m(annota-
	   tion paragraph).

     [1m-P    [0mPlace punctuation marks .,:;?! after the reference
	   signal, rather than before.	(Periods and commas used
	   to be done with strings.)

     [1m-S    [0mProduce references in the Natural or Social Science
	   format.

     To use your own references, put them in the format described
     below.  They can be searched more rapidly by running _i_n_d_x_-
     _b_i_b(1) on them before using _r_e_f_e_r; failure to index results
     in a linear search.  When _r_e_f_e_r is used with the _e_q_n, _n_e_q_n
     or _t_b_l preprocessors _r_e_f_e_r should be first, to minimize the
     volume of data passed through pipes.




Printed 31/1/92     Revision 1.2 of 19/10/88			2






REFER(1)	    UNIX Programmer's Manual		 REFER(1)



     The _r_e_f_e_r 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
     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 order-
     ing and formatting of fields is controlled by the macros
     specified for _n_r_o_f_f/_t_r_o_f_f (for footnotes and endnotes) or
     _r_o_f_f_b_i_b (for stand-alone bibliographies).	For a list of the
     most common key-letters and their corresponding fields, see
     _a_d_d_b_i_b(1).  An example of a _r_e_f_e_r entry is given below.

[1mEXAMPLE
     [0m%A   M. E. Lesk
     %T   Some Applications of Inverted Indexes on the UNIX System
     %B   UNIX Programmer's Manual
     %V   2b
     %I   Bell Laboratories
     %C   Murray Hill, NJ
     %D   1978

[1mFILES
     [0m/usr/dict/papers  directory of default publication lists
     /usr/lib/refer    directory of companion programs

[1mSEE ALSO
     [0maddbib(1), sortbib(1), roffbib(1), indxbib(1), lookbib(1)

[1mAUTHOR
     [0mMike Lesk

[1mBUGS
     [0mBlank 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.



















Printed 31/1/92     Revision 1.2 of 19/10/88			3



[0m