{
    "content": [
        {
            "type": "text",
            "text": "# refer (man)\n\n## DESCRIPTION\n\nThe GNU implementation of refer is part of the \u001b]8;;man:groff(1)\u001b\\groff(1)\u001b]8;;\u001b\\ document formatting system.  refer is\na  \u001b]8;;man:troff(1)\u001b\\troff(1)\u001b]8;;\u001b\\  preprocessor that prepares bibilographic citations by looking up keywords speci‐\nfied in a \u001b]8;;man:roff(7)\u001b\\roff(7)\u001b]8;;\u001b\\ input document, obviating the need to type such annotations, and permitting\nthe citation style in formatted output to be altered independently  and  systematically.   It\ncopies  the  contents  of  each file to the standard output stream, except that it interprets\nlines between .[ and .] as citations to be translated into groff input, and lines between .R1\nand .R2 as instructions regarding how citations are to be processed.  Normally, refer is  not\nexecuted  directly  by  the user, but invoked by specifying the -R option to \u001b]8;;man:groff(1)\u001b\\groff(1)\u001b]8;;\u001b\\.  If no\nfile operands are given on the command line, or if file is “-”, the standard input stream  is\nread.\n\n## Sections\n\n- **Name**\n- **Synopsis** (3 subsections)\n- **Description** (5 subsections)\n- **Options** (23 subsections)\n- **Environment**\n- **Files**\n- **Bugs**\n- **Examples**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "refer",
        "section": "",
        "mode": "man",
        "summary": null,
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-R",
                "long": null,
                "arg": null,
                "description": "Other options are equivalent to refer commands."
            },
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-b",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-k",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-k",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-S",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "The B option has command equivalents with the addition that the file names specified on the command line are processed as if they were arguments to the bibliography command instead of in the normal way."
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": ""
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Name",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "Synopsis",
                "lines": 3,
                "subsections": [
                    {
                        "name": "refer --help",
                        "lines": 1
                    },
                    {
                        "name": "refer -v",
                        "lines": 1
                    },
                    {
                        "name": "refer --version",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "Description",
                "lines": 41,
                "subsections": [
                    {
                        "name": "Bibliographic databases",
                        "lines": 63
                    },
                    {
                        "name": "Citations",
                        "lines": 58
                    },
                    {
                        "name": "Commands",
                        "lines": 180
                    },
                    {
                        "name": "Label expressions",
                        "lines": 102
                    },
                    {
                        "name": "Macro interface",
                        "lines": 15
                    }
                ]
            },
            {
                "name": "Options",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-R",
                        "lines": 2,
                        "flag": "-R"
                    },
                    {
                        "name": "-a _",
                        "lines": 1,
                        "flag": "-a"
                    },
                    {
                        "name": "-b              no-label-in-text; no-label-in-reference",
                        "lines": 1,
                        "flag": "-b"
                    },
                    {
                        "name": "-B",
                        "lines": 1,
                        "flag": "-B"
                    },
                    {
                        "name": "-c _",
                        "lines": 1,
                        "flag": "-c"
                    },
                    {
                        "name": "-C              compatible",
                        "lines": 1,
                        "flag": "-C"
                    },
                    {
                        "name": "-e              accumulate",
                        "lines": 1,
                        "flag": "-e"
                    },
                    {
                        "name": "-f _",
                        "lines": 1,
                        "flag": "-f"
                    },
                    {
                        "name": "-i _",
                        "lines": 1,
                        "flag": "-i"
                    },
                    {
                        "name": "-k              label L~%a",
                        "lines": 1,
                        "flag": "-k"
                    },
                    {
                        "name": "-k _",
                        "lines": 1,
                        "flag": "-k"
                    },
                    {
                        "name": "-l              label A.nD.y%a",
                        "lines": 1,
                        "flag": "-l"
                    },
                    {
                        "name": "-l _",
                        "lines": 1,
                        "flag": "-l"
                    },
                    {
                        "name": "-l ,_",
                        "lines": 1,
                        "flag": "-l"
                    },
                    {
                        "name": "-l _",
                        "lines": 1,
                        "flag": "-l"
                    },
                    {
                        "name": "-n              no-default-database",
                        "lines": 1,
                        "flag": "-n"
                    },
                    {
                        "name": "-p _",
                        "lines": 1,
                        "flag": "-p"
                    },
                    {
                        "name": "-P              move-punctuation",
                        "lines": 1,
                        "flag": "-P"
                    },
                    {
                        "name": "-s _",
                        "lines": 1,
                        "flag": "-s"
                    },
                    {
                        "name": "-S              label \"(A.n|Q) ', ' (D.y|D)\"; bracket-label \" (\" ) \"; \"",
                        "lines": 1,
                        "flag": "-S"
                    },
                    {
                        "name": "-t _",
                        "lines": 4,
                        "flag": "-t"
                    },
                    {
                        "name": "-B              annotate X AP; no-label-in-reference",
                        "lines": 1,
                        "flag": "-B"
                    },
                    {
                        "name": "-B _",
                        "lines": 1,
                        "flag": "-B"
                    }
                ]
            },
            {
                "name": "Environment",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "Files",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "Bugs",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "Examples",
                "lines": 62,
                "subsections": []
            }
        ],
        "sections": {
            "Name": {
                "content": "refer - process bibliographic references for groff\n",
                "subsections": []
            },
            "Synopsis": {
                "content": "refer [-bCenPRS] [-a n] [-B field.macro] [-c fields] [-f n] [-i fields] [-k field] [-l range-\nexpression] [-p database-file] [-s fields] [-t n] [file ...]\n",
                "subsections": [
                    {
                        "name": "refer --help",
                        "content": ""
                    },
                    {
                        "name": "refer -v",
                        "content": ""
                    },
                    {
                        "name": "refer --version",
                        "content": ""
                    }
                ]
            },
            "Description": {
                "content": "The GNU implementation of refer is part of the \u001b]8;;man:groff(1)\u001b\\groff(1)\u001b]8;;\u001b\\ document formatting system.  refer is\na  \u001b]8;;man:troff(1)\u001b\\troff(1)\u001b]8;;\u001b\\  preprocessor that prepares bibilographic citations by looking up keywords speci‐\nfied in a \u001b]8;;man:roff(7)\u001b\\roff(7)\u001b]8;;\u001b\\ input document, obviating the need to type such annotations, and permitting\nthe citation style in formatted output to be altered independently  and  systematically.   It\ncopies  the  contents  of  each file to the standard output stream, except that it interprets\nlines between .[ and .] as citations to be translated into groff input, and lines between .R1\nand .R2 as instructions regarding how citations are to be processed.  Normally, refer is  not\nexecuted  directly  by  the user, but invoked by specifying the -R option to \u001b]8;;man:groff(1)\u001b\\groff(1)\u001b]8;;\u001b\\.  If no\nfile operands are given on the command line, or if file is “-”, the standard input stream  is\nread.\n\nEach  citation specifies a reference.  The citation can specify a reference that is contained\nin a bibliographic database by giving a set of keywords that only  that  reference  contains.\nAlternatively  it  can specify a reference by supplying a database record in the citation.  A\ncombination of these alternatives is also possible.\n\nFor each citation, refer can produce a mark in the text.  This mark consists  of  some  label\nwhich  can be separated from the text and from other labels in various ways.  For each refer‐\nence it also outputs \u001b]8;;man:groff(7)\u001b\\groff(7)\u001b]8;;\u001b\\ language commands that can be used by a macro package  to  pro‐\nduce  a  formatted  reference  for  each  citation.   The  output  of refer must therefore be\nprocessed using a suitable macro package, such as me, mm, mom, or ms.  The commands to format\na citation's reference can be output immediately after the citation, or the references may be\naccumulated, and the commands output at some later point.  If the references are accumulated,\nthen multiple citations of the same reference will produce a single formatted reference.\n\nThe interpretation of lines between .R1 and .R2 as prepreocessor commands is a feature of GNU\nrefer.  Documents making use of this feature can still be processed by  AT&T  refer  just  by\nadding the lines\n.de R1\n.ig R2\n..\nto  the beginning of the document.  This will cause \u001b]8;;man:troff(1)\u001b\\troff(1)\u001b]8;;\u001b\\ to ignore everything between .R1\nand .R2.  The effect of some commands can also be achieved by  options.   These  options  are\nsupported  mainly  for  compatibility  with AT&T refer.  It is usually more convenient to use\ncommands.\n\nrefer generates .lf requests so that file names and line numbers in messages produced by com‐\nmands that read refer output will be correct; it also interprets lines beginning with .lf  so\nthat file names and line numbers in the messages and .lf lines that it produces will be accu‐\nrate even if the input has been preprocessed by a command such as \u001b]8;;man:soelim(1)\u001b\\soelim(1)\u001b]8;;\u001b\\.\n",
                "subsections": [
                    {
                        "name": "Bibliographic databases",
                        "content": "The  bibliographic  database  is  a  text file consisting of records separated by one or more\nblank lines.  Within each record fields start with a % at the  beginning  of  a  line.   Each\nfield  has a one character name that immediately follows the %.  It is best to use only upper\nand lower case letters for the names of fields.  The name of the field should be followed  by\nexactly  one  space,  and  then by the contents of the field.  Empty fields are ignored.  The\nconventional meaning of each field is as follows:\n\n%A     The name of an author.  If the name contains a suffix such as “Jr.”, it should be sep‐\narated from the last name by a comma.  There can be multiple  occurrences  of  the  %A\nfield.  The order is significant.  It is a good idea always to supply an %A field or a\n%Q field.\n\n%B     For an article that is part of a book, the title of the book.\n\n%C     The place (city) of publication.\n\n%D     The date of publication.  The year should be specified in full.  If the month is spec‐\nified, the name rather than the number of the month should be used, but only the first\nthree  letters  are  required.   It is a good idea always to supply a %D field; if the\ndate is unknown, a value such as in press or unknown can be used.\n\n%E     For an article that is part of a book, the name of an editor of the book.   Where  the\nwork has editors and no authors, the names of the editors should be given as %A fields\nand “, (ed.)” or “, (eds.)” should be appended to the last author.\n\n%G     U.S. government ordering number.\n\n%I     The publisher (issuer).\n\n%J     For an article in a journal, the name of the journal.\n\n%K     Keywords to be used for searching.\n\n%L     Label.\n\n%N     Journal issue number.\n\n%O     Other information.  This is usually printed at the end of the reference.\n\n%P     Page number.  A range of pages can be specified as m-n.\n\n%Q     The  name  of  the  author,  if the author is not a person.  This will only be used if\nthere are no %A fields.  There can only be one %Q field.\n\n%R     Technical report number.\n\n%S     Series name.\n\n%T     Title.  For an article in a book or journal, this should be the title of the article.\n\n%V     Volume number of the journal or book.\n\n%X     Annotation.\n\nFor all fields except %A and %E, if there is more than one occurrence of a  particular  field\nin a record, only the last such field will be used.\n\nIf accent strings are used, they should follow the character to be accented.  This means that\nan  ms  document  must  call the .AM macro when it initializes.  Accent strings should not be\nquoted: use one \\ rather than two.  Accent strings are an obsolescent feature of the  me  and\nms  macro  packages; modern documents should use groff special character escape sequences in‐\nstead; see \u001b]8;;man:groffchar(7)\u001b\\groffchar(7)\u001b]8;;\u001b\\.\n"
                    },
                    {
                        "name": "Citations",
                        "content": "Citations have a characteristic format.\n.[opening-text\nflags keywords\nfields\n.]closing-text\n\nThe opening-text, closing-text, and flags components are optional.  Only one of the  keywords\nand fields components need be specified.\n\nThe  keywords  component says to search the bibliographic databases for a reference that con‐\ntains all the words in keywords.  It is an error if more than one reference is found.\n\nThe fields components specifies additional fields to replace or supplement those specified in\nthe reference.  When references are being accumulated and  the  keywords  component  is  non-\nempty,  then additional fields should be specified only on the first occasion that a particu‐\nlar reference is cited, and will apply to all citations of that reference.\n\nThe opening-text and closing-text components specify strings to be used to bracket the  label\ninstead  of  those in the bracket-label command.  If either of these components is non-empty,\nthe strings specified in the bracket-label command will not be used; this behavior can be al‐\ntered using the [ and ] flags.  Leading and trailing spaces are significant for these  compo‐\nnents.\n\nThe  flags  component  is  a  list  of non-alphanumeric characters each of which modifies the\ntreatment of this particular citation.  AT&T refer will treat these flags as part of the key‐\nwords and so will ignore them since they are non-alphanumeric.  The following flags are  cur‐\nrently recognized.\n\n#      Use  the  label specified by the short-label command, instead of that specified by the\nlabel command.  If no short label has been specified, the normal label will  be  used.\nTypically  the  short  label  is used with author-date labels and consists of only the\ndate and possibly a disambiguating letter; the “#” is supposed to be suggestive  of  a\nnumeric type of label.\n\n[      Precede opening-text with the first string specified in the bracket-label command.\n\n]      Follow closing-text with the second string specified in the bracket-label command.\n\nAn  advantage  of  using the [ and ] flags rather than including the brackets in opening-text\nand closing-text is that you can change the style of bracket used in  the  document  just  by\nchanging  the  bracket-label  command.  Another is that sorting and merging of citations will\nnot necessarily be inhibited if the flags are used.\n\nIf a label is to be inserted into the text, it will be attached to the line preceding the  .[\nline.  If there is no such line, then an extra line will be inserted before the .[ line and a\nwarning will be given.\n\nThere  is  no  special notation for making a citation to multiple references.  Just use a se‐\nquence of citations, one for each reference.  Don't put anything between the citations.   The\nlabels  for all the citations will be attached to the line preceding the first citation.  The\nlabels may also be sorted or merged.  See the description of the <> label expression, and  of\nthe sort-adjacent-labels and abbreviate-label-ranges commands.  A label will not be merged if\nits  citation  has a non-empty opening-text or closing-text.  However, the labels for a cita‐\ntion using the ] flag and without any closing-text immediately followed by a  citation  using\nthe  [ flag and without any opening-text may be sorted and merged even though the first cita‐\ntion's opening-text or the second citation's closing-text is non-empty.  (If you wish to pre‐\nvent this, use the dummy character escape sequence \\& as the first citation's closing-text.)\n"
                    },
                    {
                        "name": "Commands",
                        "content": "Commands are contained between lines starting with .R1 and .R2.  Recognition of  these  lines\ncan  be prevented by the -R option.  When a .R1 line is recognized any accumulated references\nare flushed out.  Neither .R1 nor .R2 lines, nor anything between them, is output.\n\nCommands are separated by newlines or semicolons.  A number sign  (#)  introduces  a  comment\nthat  extends to the end of the line, but does not conceal the newline.  Each command is bro‐\nken up into words.  Words are separated by spaces or tabs.  A word that begins with  a  (neu‐\ntral)  double quote (\") extends to the next double quote that is not followed by another dou‐\nble quote.  If there is no such double quote, the word extends to the end of the line.  Pairs\nof double quotes in a word beginning with a double quote collapse to one double quote.   Nei‐\nther a number sign nor a semicolon is recognized inside double quotes.  A line can be contin‐\nued by ending it with a backslash “\\”; this works everywhere except after a number sign.\n\nEach  command  name that is marked with * has an associated negative command no-name that un‐\ndoes the effect of name.  For example, the no-sort command specifies that  references  should\nnot be sorted.  The negative commands take no arguments.\n\nIn  the following description each argument must be a single word; field is used for a single\nupper or lower case letter naming a field; fields is used for a sequence of such  letters;  m\nand  n  are  used for a non-negative numbers; string is used for an arbitrary string; file is\nused for the name of a file.\n\nabbreviate* fields string1 string2 string3 string4\nAbbreviate the first names of fields.  An initial letter will be  separated  from  an‐\nother initial letter by string1, from the last name by string2, and from anything else\n(such  as  “von”  or “de”) by string3.  These default to a period followed by a space.\nIn a hyphenated first name, the initial of the first part of the name  will  be  sepa‐\nrated  from  the  hyphen by string4; this defaults to a period.  No attempt is made to\nhandle any ambiguities that might result from abbreviation.  Names are abbreviated be‐\nfore sorting and before label construction.\n\nabbreviate-label-ranges* string\nThree or more adjacent labels that refer to consecutive references will be abbreviated\nto a label consisting of the first label, followed by string, followed by the last la‐\nbel.  This is mainly useful with numeric labels.  If string is omitted, it defaults to\n“-”.\n\naccumulate*\nAccumulate references instead of writing out each reference as it is encountered.  Ac‐\ncumulated references will be written out whenever a reference of the form\n.[\n$LIST$\n.]\nis encountered, after all input files have been processed, and whenever a .R1 line  is\nrecognized.\n\nannotate* field string\nfield  is  an annotation; print it at the end of the reference as a paragraph preceded\nby the line\n\n.string\n\nIf string is omitted, it will default to AP; if field is also omitted it will  default\nto X.  Only one field can be an annotation.\n\narticles string ...\nEach  string  is a definite or indefinite article, and should be ignored at the begin‐\nning of T fields when sorting.  Initially, “a”, “an”, and “the” are recognized as  ar‐\nticles.\n\nbibliography file ...\nWrite out all the references contained in each bibliographic database file.  This com‐\nmand should come last in an .R1/.R2 block.\n\nbracket-label string1 string2 string3\nIn  the  text,  bracket each label with string1 and string2.  An occurrence of string2\nimmediately followed by string1 will be turned into string3.  The default behavior  is\nas follows.\nbracket-label \\*([. \\*(.] \", \"\n\ncapitalize fields\nConvert fields to caps and small caps.\n\ncompatible*\nRecognize .R1 and .R2 even when followed by a character other than space or newline.\n\ndatabase file ...\nSearch each bibliographic database file.  For each file, if an index file.i created by\n\u001b]8;;man:indxbib(1)\u001b\\indxbib(1)\u001b]8;;\u001b\\  exists,  then  it  will be searched instead; each index can cover multiple\ndatabases.\n\ndate-as-label* string\nstring is a label expression that specifies a string with which to replace the D field\nafter constructing the label.  See subsection “Label expressions” below for a descrip‐\ntion of label expressions.  This command is useful if you do not want explicit  labels\nin  the  reference  list,  but  instead want to handle any necessary disambiguation by\nqualifying the date in some way.  The label used in the text would typically  be  some\ncombination  of  the  author  and  date.   In  most  cases  you  should  also  use the\nno-label-in-reference command.  For example,\ndate-as-label D.+yD.y%a*D.-y\nwould attach a disambiguating letter to the year part of the D field in the reference.\n\ndefault-database*\nThe default database should be searched.  This is the default behavior, so  the  nega‐\ntive  version  of  this  command is more useful.  refer determines whether the default\ndatabase should be searched on the first occasion that it needs to do a search.   Thus\na no-default-database command must be given before then, in order to be effective.\n\ndiscard* fields\nWhen  the  reference  is  read,  fields should be discarded; no string definitions for\nfields will be output.  Initially, fields are XYZ.\n\net-al* string m n\nControl use of et al. in the evaluation of @ expressions in label expressions.  If the\nnumber of authors needed to make the author sequence unambiguous is u  and  the  total\nnumber  of  authors is t then the last t-u authors will be replaced by string provided\nthat t-u is not less than m and t is not less than n.  The default behavior is as fol‐\nlows.\net-al \" et al\" 2 3\nNote the absence of a dot from the end of the abbreviation, which is arguably not cor‐\nrect.  (Et al[.]  is short for et alli, as etc. is short for et cetera.)\n\ninclude file\nInclude file and interpret the contents as commands.\n\njoin-authors string1 string2 string3\nJoin multiple authors together with strings.  When there are exactly two authors, they\nwill be joined with string1.  When there are more than two authors, all but  the  last\ntwo will be joined with string2, and the last two authors will be joined with string3.\nIf  string3 is omitted, it will default to string1; if string2 is also omitted it will\nalso default to string1.  For example,\njoin-authors \" and \" \", \" \", and \"\nwill restore the default method for joining authors.\n\nlabel-in-reference*\nWhen outputting the reference, define the string [F to be the reference's label.  This\nis the default behavior, so the negative version of this command is more useful.\n\nlabel-in-text*\nFor each reference output a label in the text.  The label will be separated  from  the\nsurrounding  text  as described in the bracket-label command.  This is the default be‐\nhavior, so the negative version of this command is more useful.\n\nlabel string\nstring is a label expression describing how to label each reference.\n\nseparate-label-second-parts string\nWhen merging two-part labels, separate the second part of the second  label  from  the\nfirst label with string.  See the description of the <> label expression.\n\nmove-punctuation*\nIn  the text, move any punctuation at the end of line past the label.  It is usually a\ngood idea to give this command unless you are using superscripted numbers as labels.\n\nreverse* string\nReverse the fields whose names are in string.  Each field name can be  followed  by  a\nnumber  which says how many such fields should be reversed.  If no number is given for\na field, all such fields will be reversed.\n\nsearch-ignore* fields\nWhile searching for keys in databases for which no index exists, ignore  the  contents\nof fields.  Initially, fields XYZ are ignored.\n\nsearch-truncate* n\nOnly require the first n characters of keys to be given.  In effect when searching for\na  given key words in the database are truncated to the maximum of n and the length of\nthe key.  Initially, n is 6.\n\nshort-label* string\nstring is a label expression that specifies an alternative (usually shorter) style  of\nlabel.  This is used when the # flag is given in the citation.  When using author-date\nstyle  labels,  the identity of the author or authors is sometimes clear from the con‐\ntext, and so it may be desirable to omit the author or authors from  the  label.   The\nshort-label  command  will typically be used to specify a label containing just a date\nand possibly a disambiguating letter.\n\nsort* string\nSort references according to string.  References will  automatically  be  accumulated.\nstring should be a list of field names, each followed by a number, indicating how many\nfields with the name should be used for sorting.  “+” can be used to indicate that all\nthe  fields  with  the name should be used.  Also . can be used to indicate the refer‐\nences should be sorted using the (tentative) label.  (Subsection  “Label  expressions”\nbelow describes the concept of a tentative label.)\n\nsort-adjacent-labels*\nSort labels that are adjacent in the text according to their position in the reference\nlist.  This command should usually be given if the abbreviate-label-ranges command has\nbeen  given,  or  if the label expression contains a <> expression.  This will have no\neffect unless references are being accumulated.\n"
                    },
                    {
                        "name": "Label expressions",
                        "content": "Label expressions can be evaluated both normally and tentatively.  The result of normal eval‐\nuation is used for output.  The result of tentative evaluation, called the  tentative  label,\nis  used  to  gather  the information that normal evaluation needs to disambiguate the label.\nLabel expressions specified by the date-as-label and short-label commands are  not  evaluated\ntentatively.   Normal and tentative evaluation are the same for all types of expression other\nthan @, *, and % expressions.  The description below applies  to  normal  evaluation,  except\nwhere otherwise specified.\n\nfield\nfield n\nThe n-th part of field.  If n is omitted, it defaults to 1.\n\n'string'\nThe characters in string literally.\n\n@      All  the  authors  joined as specified by the join-authors command.  The whole of each\nauthor's name will be used.  However, if the references are sorted by author (that is,\nthe sort specification starts with “A+”), then authors' last names will  be  used  in‐\nstead,  provided  that  this  does not introduce ambiguity, and also an initial subse‐\nquence of the authors may be used instead of all the authors, again provided that this\ndoes not introduce ambiguity.  The use of only the last name for the  i-th  author  of\nsome  reference  is  considered to be ambiguous if there is some other reference, such\nthat the first i-1 authors of the references are the same, the i-th  authors  are  not\nthe  same, but the i-th authors last names are the same.  A proper initial subsequence\nof the sequence of authors for some reference is considered to be ambiguous  if  there\nis  a reference with some other sequence of authors which also has that subsequence as\na proper initial subsequence.  When an initial subsequence of authors is used, the re‐\nmaining authors are replaced by the string specified by the et-al command;  this  com‐\nmand  may also specify additional requirements that must be met before an initial sub‐\nsequence can be used.  @ tentatively evaluates to a canonical  representation  of  the\nauthors, such that authors that compare equally for sorting purpose will have the same\nrepresentation.\n\n%n\n%a\n%A\n%i\n%I     The  serial number of the reference formatted according to the character following the\n%.  The serial number of a reference is 1 plus the number of earlier  references  with\nsame  tentative label as this reference.  These expressions tentatively evaluate to an\nempty string.\n\nexpr*  If there is another reference with the same tentative label as  this  reference,  then\nexpr, otherwise an empty string.  It tentatively evaluates to an empty string.\n\nexpr+n\nexpr-n The  first (+) or last (-) n upper or lower case letters or digits of expr.  roff spe‐\ncial characters (such as \\('a) count as a single letter.  Accent strings are  retained\nbut do not count towards the total.\n\nexpr.l expr converted to lowercase.\n\nexpr.u expr converted to uppercase.\n\nexpr.c expr converted to caps and small caps.\n\nexpr.r expr reversed so that the last name is first.\n\nexpr.a expr with first names abbreviated.  Fields specified in the abbreviate command are ab‐\nbreviated  before  any  labels  are evaluated.  Thus .a is useful only when you want a\nfield to be abbreviated in a label but not in a reference.\n\nexpr.y The year part of expr.\n\nexpr.+y\nThe part of expr before the year, or the whole of expr if it does not contain a year.\n\nexpr.-y\nThe part of expr after the year, or an empty string if expr does not contain a year.\n\nexpr.n The last name part of expr.\n\nexpr1~expr2\nexpr1 except that if the last character of expr1 is - then  it  will  be  replaced  by\nexpr2.\n\nexpr1 expr2\nThe concatenation of expr1 and expr2.\n\nexpr1|expr2\nIf expr1 is non-empty then expr1 otherwise expr2.\n\nexpr1&expr2\nIf expr1 is non-empty then expr2 otherwise an empty string.\n\nexpr1?expr2:expr3\nIf expr1 is non-empty then expr2 otherwise expr3.\n\n<expr> The  label is in two parts, which are separated by expr.  Two adjacent two-part labels\nwhich have the same first part will be merged by appending the second part of the sec‐\nond  label  onto  the  first  label  separated  by  the  string   specified   in   the\nseparate-label-second-parts  command (initially, a comma followed by a space); the re‐\nsulting label will also be a two-part label with the same first part as  before  merg‐\ning,  and so additional labels can be merged into it.  It is permissible for the first\npart to be empty; this may be desirable for expressions used in the  short-label  com‐\nmand.\n\n(expr) The same as expr.  Used for grouping.\n\nThe  above  expressions  are  listed in order of precedence (highest first); & and | have the\nsame precedence.\n"
                    },
                    {
                        "name": "Macro interface",
                        "content": "Each reference starts with a call to the macro ]-.  The string [F will be defined to  be  the\nlabel  for  this  reference,  unless the no-label-in-reference command has been given.  There\nthen follows a series of string definitions, one for each field:  string  [X  corresponds  to\nfield  X.   The register [P is set to 1 if the P field contains a range of pages.  The [T, [A\nand [O registers are set to 1 according as the T, A and O fields end with any of .?! (an end-\nof-sentence character).  The [E register will be set to 1 if the [E string contains more than\none name.  The reference is followed by a call to the ][ macro.  The first argument  to  this\nmacro  gives  a  number  representing the type of the reference.  If a reference contains a J\nfield, it will be classified as type 1, otherwise if it  contains  a  B  field,  it  will  be\ntype  3,  otherwise if it contains a G or R field it will be type 4, otherwise if it contains\nan I field it will be type 2, otherwise it will be type 0.  The second argument is a symbolic\nname for the type: other, journal-article, book, article-in-book, or tech-report.  Groups  of\nreferences  that  have  been accumulated or are produced by the bibliography command are pre‐\nceded by a call to the ]< macro and followed by a call to the ]> macro.\n"
                    }
                ]
            },
            "Options": {
                "content": "--help displays a usage message, while -v and --version show version  information;  all  exit\nafterward.\n",
                "subsections": [
                    {
                        "name": "-R",
                        "content": "Other options are equivalent to refer commands.\n",
                        "flag": "-R"
                    },
                    {
                        "name": "-a _",
                        "content": "",
                        "flag": "-a"
                    },
                    {
                        "name": "-b              no-label-in-text; no-label-in-reference",
                        "content": "",
                        "flag": "-b"
                    },
                    {
                        "name": "-B",
                        "content": "",
                        "flag": "-B"
                    },
                    {
                        "name": "-c _",
                        "content": "",
                        "flag": "-c"
                    },
                    {
                        "name": "-C              compatible",
                        "content": "",
                        "flag": "-C"
                    },
                    {
                        "name": "-e              accumulate",
                        "content": "",
                        "flag": "-e"
                    },
                    {
                        "name": "-f _",
                        "content": "",
                        "flag": "-f"
                    },
                    {
                        "name": "-i _",
                        "content": "",
                        "flag": "-i"
                    },
                    {
                        "name": "-k              label L~%a",
                        "content": "",
                        "flag": "-k"
                    },
                    {
                        "name": "-k _",
                        "content": "",
                        "flag": "-k"
                    },
                    {
                        "name": "-l              label A.nD.y%a",
                        "content": "",
                        "flag": "-l"
                    },
                    {
                        "name": "-l _",
                        "content": "",
                        "flag": "-l"
                    },
                    {
                        "name": "-l ,_",
                        "content": "",
                        "flag": "-l"
                    },
                    {
                        "name": "-l _",
                        "content": "",
                        "flag": "-l"
                    },
                    {
                        "name": "-n              no-default-database",
                        "content": "",
                        "flag": "-n"
                    },
                    {
                        "name": "-p _",
                        "content": "",
                        "flag": "-p"
                    },
                    {
                        "name": "-P              move-punctuation",
                        "content": "",
                        "flag": "-P"
                    },
                    {
                        "name": "-s _",
                        "content": "",
                        "flag": "-s"
                    },
                    {
                        "name": "-S              label \"(A.n|Q) ', ' (D.y|D)\"; bracket-label \" (\" ) \"; \"",
                        "content": "",
                        "flag": "-S"
                    },
                    {
                        "name": "-t _",
                        "content": "The  B  option has command equivalents with the addition that the file names specified on the\ncommand line are processed as if they were arguments to the bibliography command  instead  of\nin the normal way.\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-B              annotate X AP; no-label-in-reference",
                        "content": "",
                        "flag": "-B"
                    },
                    {
                        "name": "-B _",
                        "content": "",
                        "flag": "-B"
                    }
                ]
            },
            "Environment": {
                "content": "REFER  If set, overrides the default database.\n",
                "subsections": []
            },
            "Files": {
                "content": "/usr/dict/papers/Ind\nDefault database.\n\nfile.i Index files.\n\n/usr/share/groff/1.23.0/tmac/refer.tmac\ndefines  macros  and strings facilitating integration with macro packages that wish to\nsupport refer.\n\nrefer uses temporary files.  See the \u001b]8;;man:groff(1)\u001b\\groff(1)\u001b]8;;\u001b\\ man page for details of where  such  files  are\ncreated.\n",
                "subsections": []
            },
            "Bugs": {
                "content": "In label expressions, <> expressions are ignored inside .char expressions.\n",
                "subsections": []
            },
            "Examples": {
                "content": "We  can illustrate the operation of refer with a sample bibliographic database containing one\nentry and a simple roff document to cite that entry.\n\n$ cat > my-db-file\n%A Daniel P.\\& Friedman\n%A Matthias Felleisen\n%C Cambridge, Massachusetts\n%D 1996\n%I The MIT Press\n%T The Little Schemer, Fourth Edition\n$ refer -p my-db-file\nRead the book\n.[\nfriedman\n.]\non your summer vacation.\n<Control+D>\n.lf 1 -\nRead the book\\*([.1\\*(.]\n.ds [F 1\n.]-\n.ds [A Daniel P. Friedman and Matthias Felleisen\n.ds [C Cambridge, Massachusetts\n.ds [D 1996\n.ds [I The MIT Press\n.ds [T The Little Schemer, Fourth Edition\n.nr [T 0\n.nr [A 0\n.][ 2 book\n.lf 5 -\non your summer vacation.\n\nThe foregoing shows us that refer (a) produces a label “1”; (b) brackets that label with  in‐\nterpolations  of the “[.”  and “.]”  strings; (c) calls a macro “]-”; (d) defines strings and\nregisters containing the label and bibliographic data for the reference; (e)  calls  a  macro\n“][”; and (f) uses the lf request to restore the line numbers of the original input.  As dis‐\ncussed  in subsection “Macro interface” above, it is up to the document or a macro package to\nemploy and format this information usefully.  Let us see how we  might  turn  \u001b]8;;man:groffms(7)\u001b\\groffms(7)\u001b]8;;\u001b\\  to\nthis task.\n\n$ REFER=my-db-file groff -R -ms\n.LP\nRead the book\n.[\nfriedman\n.]\non your summer vacation.\nCommentary is available.\\*{*\\*}\n.FS \\*{*\\*}\nSpace reserved for penetrating insight.\n.FE\n\nms's  automatic  footnote  numbering mechanism is not aware of refer's label numbering, so we\nhave manually specified a (superscripted) symbolic footnote for our non-bibliographic aside.\n\nSee also\n“Some Applications of Inverted Indexes on the Unix System”, by M. E. Lesk,  1978,  AT&T  Bell\nLaboratories Computing Science Technical Report No. 69.\n\n\u001b]8;;man:indxbib(1)\u001b\\indxbib(1)\u001b]8;;\u001b\\, \u001b]8;;man:lookbib(1)\u001b\\lookbib(1)\u001b]8;;\u001b\\, \u001b]8;;man:lkbib(1)\u001b\\lkbib(1)\u001b]8;;\u001b\\\n\ngroff 1.23.0                                31 March 2024                                   refer(1)",
                "subsections": []
            }
        }
    }
}