4.4BSD/usr/share/man/cat1/refer.0

Compare this file to the similar file:
Show the results in this format:




REFER(1)               BSD Reference Manual              REFER(1)


NNAAMMEE
       refer - preprocess bibliographic references for groff

SSYYNNOOPPSSIISS
       rreeffeerr [ --bbeennvvCCPPRRSS ] [ --aa_n ] [ --cc_f_i_e_l_d_s ] [ --ff_n ]
             [ --ii_f_i_e_l_d_s ] [ --kk_f_i_e_l_d ] [ --ll_m_,_n ] [ --pp_f_i_l_e_n_a_m_e ]
             [ --ss_f_i_e_l_d_s ] [ --tt_n ] [ --BB_f_i_e_l_d_._m_a_c_r_o ]
             [ _f_i_l_e_n_a_m_e... ]

DDEESSCCRRIIPPTTIIOONN
       This file documents the GNU version  of  rreeffeerr,  which  is
       part  of  the  groff  document  formatting  system.  rreeffeerr
       copies the contents of _f_i_l_e_n_a_m_e...  to the  standard  out-
       put,  except that lines between ..[[ and ..]]  are interpreted
       as citations, and lines between ..RR11  and  ..RR22  are  inter-
       preted  as  commands  about  how  citations are to be pro-
       cessed.

       Each citation specifies a  reference.   The  citation  can
       specify  a  reference that is contained in a bibliographic
       database by giving a set of keywords that only that refer-
       ence  contains.   Alternatively it can specify a reference
       by supplying a database record in the citation.  A  combi-
       nation of these alternatives is also possible.

       For  each  citation, rreeffeerr can produce a mark in the text.
       This mark consists of some label which  can  be  separated
       from  the text and from other labels in various ways.  For
       each reference it also outputs ggrrooffff commands that can  be
       used  by  a macro package to produce a formatted reference
       for each citation.  The output of rreeffeerr must therefore  be
       processed using a suitable macro package.  The --mmss and --mmee
       macros are both suitable.  The commands to format a  cita-
       tion's reference can be output immediately after the cita-
       tion, or the references may be accumulated, and  the  com-
       mands  output  at some later point.  If the references are
       accumulated, then multiple citations of the same reference
       will produce a single formatted reference.

       The  interpretation  of  lines between ..RR11 and ..RR22 as com-
       mands is a new feature of GNU refer.  Documents making use
       of  this feature can still be processed by Unix refer just
       by adding the lines

              ..ddee RR11
              ..iigg RR22
              ....
       to the beginning of the document.  This will  cause  ttrrooffff
       to  ignore  everything between ..RR11 and ..RR22.  The effect of
       some commands can also  be  achieved  by  options.   These
       options  are  supported mainly for compatibility with Unix



Groff Version 1.08       19 February 1993                       1








REFER(1)               BSD Reference Manual              REFER(1)


       refer.  It is usually more convenient to use commands.

       rreeffeerr generates ..llff lines so that filenames and line  num-
       bers in messages produced by commands that read rreeffeerr out-
       put will be correct; it also  interprets  lines  beginning
       with  ..llff  so  that filenames and line numbers in the mes-
       sages and ..llff lines that it produces will be accurate even
       if  the  input  has been preprocessed by a command such as
       ssooeelliimm(1).

OOPPTTIIOONNSS
       Most options are equivalent to commands (for a description
       of these commands see the CCoommmmaannddss subsection):

       --bb     nnoo--llaabbeell--iinn--tteexxtt;; nnoo--llaabbeell--iinn--rreeffeerreennccee

       --ee     aaccccuummuullaattee

       --nn     nnoo--ddeeffaauulltt--ddaattaabbaassee

       --CC     ccoommppaattiibbllee

       --PP     mmoovvee--ppuunnttuuaattiioonn

       --SS     llaabbeell  ""((AA..nn||QQ)) '',, '' ((DD..yy||DD))"";; bbrraacckkeett--llaabbeell "" (("" ))
              "";; ""

       --aa_n    rreevveerrssee AA_n

       --cc_f_i_e_l_d_s
              ccaappiittaalliizzee _f_i_e_l_d_s

       --ff_n    llaabbeell %%_n

       --ii_f_i_e_l_d_s
              sseeaarrcchh--iiggnnoorree _f_i_e_l_d_s

       --kk     llaabbeell LL~~%%aa

       --kk_f_i_e_l_d
              llaabbeell _f_i_e_l_d~~%%aa

       --ll     llaabbeell AA..nnDD..yy%%aa

       --ll_m    llaabbeell AA..nn++_mDD..yy%%aa

       --ll,,_n   llaabbeell AA..nnDD..yy--_n%%aa

       --ll_m,,_n  llaabbeell AA..nn++_mDD..yy--_n%%aa





Groff Version 1.08       19 February 1993                       2








REFER(1)               BSD Reference Manual              REFER(1)


       --pp_f_i_l_e_n_a_m_e
              ddaattaabbaassee _f_i_l_e_n_a_m_e

       --ss_s_p_e_c ssoorrtt _s_p_e_c

       --tt_n    sseeaarrcchh--ttrruunnccaattee _n

       These options are equivalent  to  the  following  commands
       with the addition that the filenames specified on the com-
       mand line are processed as if they were arguments  to  the
       bbiibblliiooggrraapphhyy command instead of in the normal way:

       --BB     aannnnoottaattee XX AAPP;; nnoo--llaabbeell--iinn--rreeffeerreennccee

       --BB_f_i_e_l_d.._m_a_c_r_o
              aannnnoottaattee _f_i_e_l_d _m_a_c_r_o;; nnoo--llaabbeell--iinn--rreeffeerreennccee

       The following options have no equivalent commands:

       --vv     Print the version number.

       --RR     Don't recognize lines beginning with ..RR11/..RR22.

UUSSAAGGEE
   BBiibblliiooggrraapphhiicc ddaattaabbaasseess
       The  bibliographic  database  is a text file consisting of
       records separated by one or more blank lines.  Within each
       record  fields  start with a %% at the beginning of a line.
       Each field has a one character name that immediately  fol-
       lows  the  %%.  It is best to use only upper and lower case
       letters for the names of fields.  The name  of  the  field
       should  be  followed by exactly one space, and then by the
       contents of the field.  Empty  fields  are  ignored.   The
       conventional meaning of each field is as follows:

       AA      The  name  of  an  author.   If the name contains a
              title such as JJrr..  at the end, it should  be  sepa-
              rated  from the last name by a comma.  There can be
              multiple occurences of the AA field.  The  order  is
              siginificant.   It  is a good idea always to supply
              an AA field or a QQ field.

       BB      For an article that is part of a book, the title of
              the book

       CC      The place (city) of publication.

       DD      The date of publication.  The year should be speci-
              fied in full.  If the month is specified, the  name
              rather than the number of the month should be used,
              but only the first three letters are required.   It



Groff Version 1.08       19 February 1993                       3








REFER(1)               BSD Reference Manual              REFER(1)


              is  a  good idea always to supply a DD field; if the
              date is unknown,  a  value  such  as  iinn  pprreessss  or
              uunnkknnoowwnn can be used.

       EE      For  an article that is part of a book, the name of
              an editor of the book.  Where the work has  editors
              and  no authors, the names of the editors should be
              given as AA fields and ,, ((eedd)) or ,, ((eeddss))  should  be
              appended to the last author.

       GG      US Government ordering number.

       II      The publisher (issuer).

       JJ      For  an article in a journal, the name of the jour-
              nal.

       KK      Keywords to be used for searching.

       LL      Label.

       NN      Journal issue number.

       OO      Other information.  This is usually printed at  the
              end of the reference.

       PP      Page  number.  A range of pages can be specified as
              _m--_n.

       QQ      The name of the author, if the author is not a per-
              son.   This  will  only  be  used if there are no AA
              fields.  There can only be one QQ field.

       RR      Technical report number.

       SS      Series name.

       TT      Title.  For an article in a book or  journal,  this
              should be the title of the article.

       VV      Volume number of the journal or book.

       XX      Annotation.

       For  all  fields except AA and EE, if there is more than one
       occurence of a particular field in a record, only the last
       such field will be used.

       If  accent  strings  are  used,  they  should  follow  the
       charater to be accented.  This means  that  the  AAMM  macro
       must  be  used with the --mmss macros.  Accent strings should



Groff Version 1.08       19 February 1993                       4








REFER(1)               BSD Reference Manual              REFER(1)


       not be quoted: use one \\ rather than two.

   CCiittaattiioonnss
       The format of a citation is
              ..[[_o_p_e_n_i_n_g_-_t_e_x_t
              _f_l_a_g_s _k_e_y_w_o_r_d_s
              _f_i_e_l_d_s
              ..]]_c_l_o_s_i_n_g_-_t_e_x_t

       The _o_p_e_n_i_n_g_-_t_e_x_t, _c_l_o_s_i_n_g_-_t_e_x_t and  _f_l_a_g_s  components  are
       optional.   Only one of the _k_e_y_w_o_r_d_s and _f_i_e_l_d_s components
       need be specified.

       The _k_e_y_w_o_r_d_s component says to  search  the  bibliographic
       databases  for  a reference that contains all the words in
       _k_e_y_w_o_r_d_s.  It is an error if more than  one  reference  if
       found.

       The  _f_i_e_l_d_s  components  specifies  additional  fields  to
       replace or supplement those specified  in  the  reference.
       When  references  are  being  accumulated and the _k_e_y_w_o_r_d_s
       component is non-empty, then additional fields  should  be
       specified  only  on  the  first occasion that a particular
       reference is cited, and will apply  to  all  citations  of
       that reference.

       The  _o_p_e_n_i_n_g_-_t_e_x_t  and  _c_l_o_s_i_n_g_-_t_e_x_t  component  specifies
       strings to be used to bracket the  label  instead  of  the
       strings specified in the bbrraacckkeett--llaabbeell command.  If either
       of these components is non-empty, the strings specified in
       the bbrraacckkeett--llaabbeell command will not be used; this behaviour
       can be altered using the [[ and ]] flags.  Note that leading
       and  trailing spaces are significant for these components.

       The _f_l_a_g_s component is a list of non-alphanumeric  charac-
       ters each of which modifies the treatment of this particu-
       lar citation.  Unix refer will treat these flags  as  part
       of  the  keywords  and  so will ignore them since they are
       non-alphanumeric.  The following flags are currently  rec-
       ognized:

       ##      This  says to use the label specified by the sshhoorrtt--
              llaabbeell command, instead of  that  specified  by  the
              llaabbeell  command.   If no short label has been speci-
              fied, the normal label will be used.  Typically the
              short  label  is  used  with author-date labels and
              consists of only the date  and  possibly  a  disam-
              biguating  letter;  the ## is supposed to be sugges-
              tive of a numeric type of label.

       [[      Precede  _o_p_e_n_i_n_g_-_t_e_x_t   with   the   first   string



Groff Version 1.08       19 February 1993                       5








REFER(1)               BSD Reference Manual              REFER(1)


              specified in the bbrraacckkeett--llaabbeell command.

       ]]      Follow  _c_l_o_s_i_n_g_-_t_e_x_t  with the second string speci-
              fied in the bbrraacckkeett--llaabbeell command.

       One advantages of using the [[  and  ]]  flags  rather  than
       including the brackets in _o_p_e_n_i_n_g_-_t_e_x_t and _c_l_o_s_i_n_g_-_t_e_x_t is
       that you can change the style of bracket used in the docu-
       ment  just by changing the bbrraacckkeett--llaabbeell command.  Another
       advantage is that sorting and merging  of  citations  will
       not necessarily be inhibited if the flags are used.

       If  a  label  is  to be inserted into the text, it will be
       attached to the line preceding the ..[[ line.  If  there  is
       no  such  line, then an extra line will be inserted before
       the ..[[ line and a warning will be given.

       There is no special notation for making a citation to mul-
       tiple  references.   Just use a sequence of citations, one
       for each reference.  Don't put anything between the  cita-
       tions.   The labels for all the citations will be attached
       to the line preceding the first citation.  The labels  may
       also  be  sorted or merged.  See the description of the <<>>
       label expression,  and  of  the  ssoorrtt--aaddjjaacceenntt--llaabbeellss  and
       aabbbbrreevviiaattee--llaabbeell--rraannggeess  command.   A  label  will  not be
       merged if its citation has  a  non-empty  _o_p_e_n_i_n_g_-_t_e_x_t  or
       _c_l_o_s_i_n_g_-_t_e_x_t.   However,  the  labels for a citation using
       the ]] flag and without any _c_l_o_s_i_n_g_-_t_e_x_t  immediately  fol-
       lowed by a citation using the [[ flag and without any _o_p_e_n_-
       _i_n_g_-_t_e_x_t may be sorted and merged even  though  the  first
       citation's  _o_p_e_n_i_n_g_-_t_e_x_t or the second citation's _c_l_o_s_i_n_g_-
       _t_e_x_t is non-empty.  (If you wish to prevent this just make
       the first citation's _c_l_o_s_i_n_g_-_t_e_x_t \\&&.)

   CCoommmmaannddss
       Commands are contained between lines starting with ..RR11 and
       ..RR22.  Recognition of these lines can be prevented  by  the
       --RR  option.  When a ..RR11 line is recognized any accumulated
       references are flushed out.  Neither ..RR11  nor  ..RR22  lines,
       nor anything between them is output.

       Commands  are separated by newlines or ;;s.  ## introduces a
       comment that extends to the end of the line (but does  not
       conceal  the  newline).   Each  command  is broken up into
       words.  Words are separated by spaces  or  tabs.   A  word
       that  begins with "" extends to the next "" that is not fol-
       lowed by another "".  If  there  is  no  such  ""  the  word
       extends  to  the  end  of  the line.  Pairs of "" in a word
       beginning with "" collapse to a single "".  Neither ## nor  ;;
       are recognized inside ""s.  A line can be continued by end-
       ing it with \\; this works everywhere except after a ##.



Groff Version 1.08       19 February 1993                       6








REFER(1)               BSD Reference Manual              REFER(1)


       Each command _n_a_m_e that is marked with * has an  associated
       negative  command  nnoo--_n_a_m_e that undoes the effect of _n_a_m_e.
       For example, the nnoo--ssoorrtt command specifies that references
       should not be sorted.  The negative commands take no argu-
       ments.

       In the following description each argument must be a  sin-
       gle  word;  _f_i_e_l_d is used for a single upper or lower case
       letter naming a field; _f_i_e_l_d_s is used for  a  sequence  of
       such letters; _m and _n are used for a non-negative numbers;
       _s_t_r_i_n_g is used for an arbitrary string; _f_i_l_e_n_a_m_e  is  used
       for the name of a file.

       aabbbbrreevviiaattee* _f_i_e_l_d_s _s_t_r_i_n_g_1 _s_t_r_i_n_g_2 _s_t_r_i_n_g_3 _s_t_r_i_n_g_4
                                Abbreviate  the  first  names  of
                                _f_i_e_l_d_s.  An initial  letter  will
                                be separated from another initial
                                letter by _s_t_r_i_n_g_1, from the  last
                                name  by  _s_t_r_i_n_g_2,  and from any-
                                thing else (such as a vvoonn or  ddee)
                                by  _s_t_r_i_n_g_3.   These default to a
                                period followed by a space.  In a
                                hyphenated  first  name, the ini-
                                tial of the  first  part  of  the
                                name  will  be separated from the
                                hyphen by _s_t_r_i_n_g_4; this  defaults
                                to  a period.  No attempt is made
                                to handle  any  ambiguities  that
                                might  result  from abbreviation.
                                Names  are   abbreviated   before
                                sorting  and  before  label  con-
                                struction.

       aabbbbrreevviiaattee--llaabbeell--rraannggeess* _s_t_r_i_n_g
                                Three  or  more  adjacent  labels
                                that  refer to consecutive refer-
                                ences will be  abbreviated  to  a
                                label  consisting  of  the  first
                                label, followed  by  _s_t_r_i_n_g  fol-
                                lowed by the last label.  This is
                                mainly   useful   with    numeric
                                labels.   If _s_t_r_i_n_g is omitted it
                                defaults to --.

       aaccccuummuullaattee*              Accumulate references instead  of
                                writing  out each reference as it
                                is encountered.  Accumulated ref-
                                erences will be written out when-
                                ever a reference of the form

                                       ..[[



Groff Version 1.08       19 February 1993                       7








REFER(1)               BSD Reference Manual              REFER(1)


                                       $$LLIISSTT$$
                                       ..]]

                                is encountered, after  all  input
                                files  hve  been  processed,  and
                                whenever ..RR11 line is  recognized.

       aannnnoottaattee* _f_i_e_l_d _s_t_r_i_n_g   _f_i_e_l_d  is an annotation; print it
                                at the end of the reference as  a
                                paragraph preceded by the line

                                       .._s_t_r_i_n_g

                                If   _m_a_c_r_o  is  omitted  it  will
                                default to AAPP; if _f_i_e_l_d  is  also
                                omitted  it  will  default  to XX.
                                Only one field can be an  annota-
                                tion.

       aarrttiicclleess _s_t_r_i_n_g...       _s_t_r_i_n_g...  are definite or indef-
                                inite  articles,  and  should  be
                                ignored  at  the  beginning  of TT
                                fields when sorting.   Initially,
                                tthhee,  aa  and aann are recognized as
                                articles.

       bbiibblliiooggrraapphhyy _f_i_l_e_n_a_m_e... Write out all the references con-
                                tained   in   the   bibliographic
                                databases _f_i_l_e_n_a_m_e...

       bbrraacckkeett--llaabbeell _s_t_r_i_n_g_1 _s_t_r_i_n_g_2 _s_t_r_i_n_g_3
                                In the text, bracket  each  label
                                with  _s_t_r_i_n_g_1  and  _s_t_r_i_n_g_2.   An
                                occurrence of _s_t_r_i_n_g_2 immediately
                                followed   by   _s_t_r_i_n_g_1  will  be
                                turned into _s_t_r_i_n_g_3.  The default
                                behaviour is

                                       bbrraacckkeett--llaabbeell  \\**(([[.. \\**((..]]
                                       "",, ""

       ccaappiittaalliizzee _f_i_e_l_d_s        Convert _f_i_e_l_d_s to caps and  small
                                caps.

       ccoommppaattiibbllee*              Recognize  ..RR11  and ..RR22 even when
                                followed  by  a  character  other
                                than space or newline.

       ddaattaabbaassee _f_i_l_e_n_a_m_e...     Search the bibligraphic databases
                                _f_i_l_e_n_a_m_e...  For each _f_i_l_e_n_a_m_e if
                                an  index  _f_i_l_e_n_a_m_e..ii  created by



Groff Version 1.08       19 February 1993                       8








REFER(1)               BSD Reference Manual              REFER(1)


                                iinnddxxbbiibb(1) exists, then  it  will
                                be  searched  instead; each index
                                can cover multiple databases.

       ddaattee--aass--llaabbeell* _s_t_r_i_n_g    _s_t_r_i_n_g is a label expression that
                                specifies  a string with which to
                                replace the DD  field  after  con-
                                structing  the  label.   See  the
                                LLaabbeell eexxpprreessssiioonnss subsection  for
                                a  description  of  label expres-
                                sions.  This command is useful if
                                you  do  not want explicit labels
                                in  the   reference   list,   but
                                instead want to handle any neces-
                                sary disambiguation by qualifying
                                the  date in some way.  The label
                                used in the text would  typically
                                be some combination of the author
                                and  date.   In  most  cases  you
                                should  also use the nnoo--llaabbeell--iinn--
                                rreeffeerreennccee command.  For example,

                                       ddaattee--aass--llaabbeell
                                       DD..++yyDD..yy%%aa**DD..--yy

                                would   attach  a  disambiguating
                                letter to the year part of the  DD
                                field in the reference.

       ddeeffaauulltt--ddaattaabbaassee*        The  default  database  should be
                                searched.  This  is  the  default
                                behaviour,  so  the negative ver-
                                sion of this command is more use-
                                ful.   refer  determines  whether
                                the default  database  should  be
                                searched  on  the  first occasion
                                that it needs  to  do  a  search.
                                Thus  a  nnoo--ddeeffaauulltt--ddaattaabbaassee com-
                                mand must be given  before  then,
                                in order to be effective.

       ddiissccaarrdd* _f_i_e_l_d_s          When   the   reference  is  read,
                                _f_i_e_l_d_s should  be  discarded;  no
                                string   definitions  for  _f_i_e_l_d_s
                                will   be   output.    Initially,
                                _f_i_e_l_d_s are XXYYZZ.

       eett--aall* _s_t_r_i_n_g _m _n        Control use of eett aall in the eval-
                                uation of @@ expressions in  label
                                expressions.   If  the  number of
                                authors needed to make the author



Groff Version 1.08       19 February 1993                       9








REFER(1)               BSD Reference Manual              REFER(1)


                                sequence unambiguous is _u and the
                                total number of authors is _t then
                                the  last  _t-_u  authors  will  be
                                replaced by _s_t_r_i_n_g provided  that
                                _t-_u  is  not less than _m and _t is
                                not less  than  _n.   The  default
                                behaviour is

                                       eett--aall "" eett aall"" 22 33

       iinncclluuddee _f_i_l_e_n_a_m_e         Include  _f_i_l_e_n_a_m_e  and  interpret
                                the contents as commands.

       jjooiinn--aauutthhoorrss _s_t_r_i_n_g_1 _s_t_r_i_n_g_2 _s_t_r_i_n_g_3
                                This says how authors  should  be
                                joined  together.  When there are
                                exactly two authors, they will be
                                joined  with _s_t_r_i_n_g_1.  When there
                                are more than  two  authors,  all
                                but  the  last two will be joined
                                with _s_t_r_i_n_g_2, and  the  last  two
                                authors   will   be  joined  with
                                _s_t_r_i_n_g_3.  If _s_t_r_i_n_g_3 is  omitted,
                                it  will  default  to _s_t_r_i_n_g_1; if
                                _s_t_r_i_n_g_2 is also omitted  it  will
                                also  default  to  _s_t_r_i_n_g_1.   For
                                example,

                                       jjooiinn--aauutthhoorrss "" aanndd "" "",,  ""
                                       "",, aanndd ""

                                will  restore  the default method
                                for joining authors.

       llaabbeell--iinn--rreeffeerreennccee*      When  outputting  the  reference,
                                define  the  string  [[FF to be the
                                reference's label.  This  is  the
                                default  behaviour;  so the nega-
                                tive version of this  command  is
                                more useful.

       llaabbeell--iinn--tteexxtt*           For each reference output a label
                                in the text.  The label  will  be
                                separated  from  the  surrounding
                                text as described in the bbrraacckkeett--
                                llaabbeell   command.    This  is  the
                                default behaviour; so  the  nega-
                                tive  version  of this command is
                                more useful.

       llaabbeell _s_t_r_i_n_g             _s_t_r_i_n_g  is  a  label   expression



Groff Version 1.08       19 February 1993                      10








REFER(1)               BSD Reference Manual              REFER(1)


                                describing how to label each ref-
                                erence.

       sseeppaarraattee--llaabbeell--sseeccoonndd--ppaarrttss _s_t_r_i_n_g
                                When  merging  two-part   labels,
                                separate  the  second part of the
                                second label from the first label
                                with _s_t_r_i_n_g.  See the description
                                of the <<>> label expression.

       mmoovvee--ppuunnccttuuaattiioonn*        In the text, move any punctuation
                                at  the  end  of  line  past  the
                                label.  It is usually a good idea
                                to  give  this command unless you
                                are using  superscripted  numbers
                                as labels.

       rreevveerrssee* _s_t_r_i_n_g          Reverse  the  fields  whose names
                                are in _s_t_r_i_n_g.  Each  field  name
                                can be followed by a number which
                                says how many such fields  should
                                be  reversed.   If  no  number is
                                given  for  a  field,  all   such
                                fields will be reversed.

       sseeaarrcchh--iiggnnoorree* _f_i_e_l_d_s    While   searching   for  keys  in
                                databases  for  which  no   index
                                exists,  ignore  the  contents of
                                _f_i_e_l_d_s.   Initially,  fields  XXYYZZ
                                are ignored.

       sseeaarrcchh--ttrruunnccaattee* _n       Only  require the first _n charac-
                                ters of keys  to  be  given.   In
                                effect when searching for a given
                                key words  in  the  database  are
                                truncated to the maximum of _n and
                                the length of the key.  Initially
                                _n is 6.

       sshhoorrtt--llaabbeell* _s_t_r_i_n_g      _s_t_r_i_n_g is a label expression that
                                specifies an alternative (usually
                                shorter) style of label.  This is
                                used when the ## flag is given  in
                                the citation.  When using author-
                                date style labels,  the  identity
                                of the author or authors is some-
                                times clear from the context, and
                                so  it  may  be desirable to omit
                                the author or  authors  from  the
                                label.   The  sshhoorrtt--llaabbeell command
                                will typically be used to specify



Groff Version 1.08       19 February 1993                      11








REFER(1)               BSD Reference Manual              REFER(1)


                                a  label  containing  just a date
                                and  possibly  a   disambiguating
                                letter.

       ssoorrtt* _s_t_r_i_n_g             Sort   references   according  to
                                ssttrriinngg.  References will automat-
                                ically  be  accumulated.   _s_t_r_i_n_g
                                should be a list of field  names,
                                each  followed by a number, indi-
                                cating how many fields  with  the
                                name  should be used for sorting.
                                ++ can be used  to  indicate  that
                                all  the  fields  with  the  name
                                should be used.  Also ..   can  be
                                used  to  indicate the references
                                should be sorted using the  (ten-
                                tative)    label.    (The   LLaabbeell
                                eexxpprreessssiioonnss subsection  describes
                                the   concept   of   a  tentative
                                label.)

       ssoorrtt--aaddjjaacceenntt--llaabbeellss*    Sort labels that are adjacent  in
                                the text according to their posi-
                                tion in the reference list.  This
                                command  should  usually be given
                                if  the   aabbbbrreevviiaattee--llaabbeell--rraannggeess
                                command has been given, or if the
                                label expression  contains  a  <<>>
                                expression.   This  will  have no
                                effect  unless   references   are
                                being accumulated.

   LLaabbeell eexxpprreessssiioonnss
       Label  expressions can be evaluated both normally and ten-
       tatively.  The result of normal  evaluation  is  used  for
       output.   The  result  of tentative evaluation, called the
       _t_e_n_t_a_t_i_v_e _l_a_b_e_l_, is used to gather  the  information  that
       normal  evaluation needs to disambiguate the label.  Label
       expressions specified by the ddaattee--aass--llaabbeell and sshhoorrtt--llaabbeell
       commands are not evaluated tentatively.  Normal and tenta-
       tive evaluation are the same for all types  of  expression
       other than @@, **, and %% expressions.  The description below
       applies to normal evaluation, except where otherwise spec-
       ified.

       _f_i_e_l_d
       _f_i_e_l_d _n
              The  _n-th  part  of  _f_i_e_l_d.   If  _n  is omitted, it
              defaults to 1.





Groff Version 1.08       19 February 1993                      12








REFER(1)               BSD Reference Manual              REFER(1)


       ''_s_t_r_i_n_g''
              The characters in _s_t_r_i_n_g literally.

       @@      All the authors joined as specified  by  the  jjooiinn--
              aauutthhoorrss  command.   The whole of each author's name
              will be  used.   However,  if  the  references  are
              sorted  by  author  (that is the sort specification
              starts with AA++), then authors' last names  will  be
              used instead, provided that this does not introduce
              ambiguity, and also an initial subsequence  of  the
              authors  may  be  used  instead of all the authors,
              again provided that this does not introduce ambigu-
              ity.   The  use  of only the last name for the _i-th
              author  of  some  reference  is  considered  to  be
              ambiguous  if  there  is some other reference, such
              that the first _i-1 authors of  the  references  are
              the  same,  the  _i-th authors are not the same, but
              the _i-th authors'  last  names  are  the  same.   A
              proper  initial  subsequence  of  the  sequence  of
              authors for some  reference  is  considered  to  be
              ambiguous  if  there is a reference with some other
              sequence of authors which also has that subsequence
              as  a  proper initial subsequence.  When an initial
              subsequence  of  authors  is  used,  the  remaining
              authors are replaced by the string specified by the
              eett--aall command; this command may also specify  addi-
              tional requirements that must be met before an ini-
              tial subsequence can be used.  @@ tentatively evalu-
              ates  to a canonical representation of the authors,
              such that authors that compare equally for  sorting
              purpose will have the same representation.

       %%_n
       %%aa
       %%AA
       %%ii
       %%II     The   serial  number  of  the  reference  formatted
              according to the character following  the  %%.   The
              serial  number  of a reference is 1 plus the number
              of earlier references with same tentative label  as
              this   reference.   These  expressions  tentatively
              evaluate to an empty string.

       _e_x_p_r**  If there is another reference with the same  tenta-
              tive  label as this reference, then _e_x_p_r, otherwise
              an empty string.  It tentatively  evaluates  to  an
              empty string.

       _e_x_p_r++_n
       _e_x_p_r--_n The  first  (++)  or  last (--) _n upper or lower case
              letters  or  digits   of   _e_x_p_r.    Troff   special



Groff Version 1.08       19 February 1993                      13








REFER(1)               BSD Reference Manual              REFER(1)


              characters (such as \\((''aa) count as a single letter.
              Accent  strings  are  retained  but  do  not  count
              towards the total.

       _e_x_p_r..ll _e_x_p_r converted to lowercase.

       _e_x_p_r..uu _e_x_p_r converted to uppercase.

       _e_x_p_r..cc _e_x_p_r converted to caps and small caps.

       _e_x_p_r..rr _e_x_p_r reversed so that the last name is first.

       _e_x_p_r..aa _e_x_p_r  with  first  names  abbreviated.   Note  that
              fields specified  in  the  aabbbbrreevviiaattee  command  are
              abbreviated  before any labels are evaluated.  Thus
              ..aa is useful only when  you  want  a  field  to  be
              abbreviated in a label but not in a reference.

       _e_x_p_r..yy The year part of _e_x_p_r.

       _e_x_p_r..++yy
              The  part  of _e_x_p_r before the year, or the whole of
              _e_x_p_r if it does not contain a year.

       _e_x_p_r..--yy
              The part of _e_x_p_r after the year, or an empty string
              if _e_x_p_r does not contain a year.

       _e_x_p_r..nn The last name part of _e_x_p_r.

       _e_x_p_r_1~~_e_x_p_r_2
              _e_x_p_r_1 except that if the last character of _e_x_p_r_1 is
              -- then it will be replaced by _e_x_p_r_2.

       _e_x_p_r_1 _e_x_p_r_2
              The concatenation of _e_x_p_r_1 and _e_x_p_r_2.

       _e_x_p_r_1||_e_x_p_r_2
              If _e_x_p_r_1 is non-empty then _e_x_p_r_1 otherwise _e_x_p_r_2.

       _e_x_p_r_1&&_e_x_p_r_2
              If _e_x_p_r_1 is non-empty then _e_x_p_r_2 otherwise an empty
              string.

       _e_x_p_r_1??_e_x_p_r_2::_e_x_p_r_3
              If _e_x_p_r_1 is non-empty then _e_x_p_r_2 otherwise _e_x_p_r_3.

       <<_e_x_p_r>> The  label  is in two parts, which are separated by
              _e_x_p_r.  Two adjacent two-part labels which have  the
              same  first  part  will  be merged by appending the
              second part of the  second  label  onto  the  first



Groff Version 1.08       19 February 1993                      14








REFER(1)               BSD Reference Manual              REFER(1)


              label separated by the string specified in the sseepp--
              aarraattee--llaabbeell--sseeccoonndd--ppaarrttss  command   (initially,   a
              comma  followed  by  a  space); the resulting label
              will also be a two-part label with the  same  first
              part  as  before  merging, and so additional labels
              can be merged into it.  Note that it is permissible
              for  the  first part to be empty; this maybe desir-
              able for expressions used in the  sshhoorrtt--llaabbeell  com-
              mand.

       ((_e_x_p_r)) The same as _e_x_p_r.  Used for grouping.

       The  above  expressions  are listed in order of precedence
       (highest first); && and || have the same precedence.

   MMaaccrroo iinntteerrffaaccee
       Each reference starts with a call to the  macro  ]]--.   The
       string  [[FF will be defined to be the label for this refer-
       ence, unless the nnoo--llaabbeell--iinn--rreeffeerreennccee  command  has  been
       given.  There then follows a series of string definitions,
       one for each field: string [[_X corresponds to field _X.  The
       number  register  [[PP is set to 1 if the PP field contains a
       range of pages.  The [[TT, [[AA and [[OO  number  registers  are
       set  to  1 according as the TT, AA and OO fields end with one
       of the characters ..??!!.  The [[EE number register will be set
       to  1  if  the [[EE string contains more than one name.  The
       reference is followed by a call  to  the  ]][[  macro.   The
       first  argument  to this macro gives a number representing
       the type of the reference.  If a reference  contains  a  JJ
       field,  it  will  be classified as type 1, otherwise if it
       contains a BB field, it will type 3, otherwise if  it  con-
       tains  a GG or RR field it will be type 4, otherwise if con-
       tains a II field it will be type 2, otherwise  it  will  be
       type  0.   The  second argument is a symbolic name for the
       type: ootthheerr,  jjoouurrnnaall--aarrttiiccllee,  bbooookk,  aarrttiiccllee--iinn--bbooookk  or
       tteecchh--rreeppoorrtt.   Groups of references that have been accumu-
       lated or are produced by the bbiibblliiooggrraapphhyy command are pre-
       ceded  by a call to the ]]<< macro and followed by a call to
       the ]]>> macro.

FFIILLEESS
       //uussrr//sshhaarree//ddiicctt//ppaappeerrss//IInndd  Default database.

       _f_i_l_e..ii                      Index files.

SSEEEE AALLSSOO
       iinnddxxbbiibb(1), llooookkbbiibb(1), llkkbbiibb(1)

BBUUGGSS
       In label expressions, <<>> expressions  are  ignored  inside
       .._c_h_a_r expressions.



Groff Version 1.08       19 February 1993                      15