📄 bibdoc.ms
字号:
The A command controls how authors' names are to be formatted. It can befollowed by the following character sequences:.RS.IP A 6mAuthors' names are to be abbreviated(see the section \fBAbbreviations\fP, below)..IP R\fInum\fPThe first \fInum\fP authors' names are to be reversed. If \fInum\fP isomitted, all authors' names are reversed..IP XAuthors' names are to be printed in Caps-Small Caps style..RE.IP EThe E command is equivalent to the A command, except that it controls theformatting of editors' names..IP FThe F command indicates that references are to be dumped immediately aftera line containing a citation, such as when the references are to be placedin footnotes..IP "S \fItemplate\fP"The S command indicates references are to be sorted before being dumped.The comparison used in sorting is based on the \fItemplate\fP. Seethe discussion in the section \fBSort Template\fP for an explanation of templates..IP "C \fItemplate\fP"The \fItemplate\fP is used as a model in constructing citations.See the discussion below in the section \fBCitation Templates\fP..IP "D \fI\0word \0definition\fP"The word-definition pair is placed into a table.Before each reference is dumped it is examined for theoccurrence of these words. Any occurrence of a word from this table is replacedby the definition, which is then rescanned for other words.Words are limited to alphanumeric characters, ampersand and underscore.Definitions can extend over multiple lines by ending lines with a backslash(\e). The backslash will be removed, and the definition, including the newlineand the next line,will be entered into the table. This is useful for including severalfields as part of a single definition (city names can be included as partof a definition for a publishing house, for example)..IP\fIBib\fP has been enhanced to recognize macro calls where the macro name is surrounded by vertical \(brbars\(br. This enhancement was implemented toto provide a little more compatibility between \fIbib\fP and Tib,a preprocessor that uses a database format very similar to \fIbib\fP's.To have \fIbib\fP recognize only macro names surrounded by verticalbars, invoke the \-Tib option..IP "I \fIfilename\fP"The indicated file is included at the current point. The included file maycontain other formatting commands..IP HThree or more contiguous citations that refer to adjacent items in thereference list are replaced by a hyphenated string. For example, thecitation 2,3,4,5 would be replaced by 2-5. This is most useful withnumeric citations. The H option implies the O option..IP OContiguous citations are sorted according to the order given by the referencelist..IP "R \fInumber\fP"The first \fInumber\fP author's names are reversed on output (i.e. T. A. Buddbecomes Budd, T. A.).If number is omitted all names are reversed..IP "T \fIstr\fP"The \fIstr\fP is a list of field names. Each time a definition string fora named field is produced, a second string containing just the last characterwill also be generated. See the section \fBTrailing Characters\fP below..IP XAuthors' last names are to be printed in Caps/Small Capsformat (i.e., Budd becomes B\s-2UDD\s+2)..PP\fB ** NOTE ** The first line encountered in the format input that does not match a format commandcauses that line, and all subsequent lines, to be immediately copied tothe output without further processing.\fP.SHFile Naming Conventions.PPStandard database format files are kept in a standard library area.The string BMACLIB in bib.h points to this directory (/usr/new/lib/bmac inthe distribution). In addition, this name is always defined whenreading format files, and is defined with the l] macro when processingwith \fItroff\fP.The first command output by \fIbib\fP defines the string l] to be thisstandard macro database directory. This allows macro files to beindependent of where they are actually stored.There are three types of files:.IP bib.xxx 10mThese files contain bib commands to format documents in the xxx style..IP bmac.xxxThese files are the \fItroff\fP macros to actually implement a style.They are generally not examined by \fIbib\fP at all, but are processedby troff in response to a .so command..IP bibinc.xxxThese files contain information (such as definitions) used by more than onestyle database. The two usual files are bibinc.fullnames and bibinc.shortnames. Both of these include files bibinc.Xlocal (where Xis full or short, respectively). Due to the way \fIbib\fP searches forfiles, if the user has these in his local directory, they will be readjust before the contents of bibinc.Xnames are processed..SHTroff Naming Conventions.PPThere is a simple naming convention for strings, registers and macros usedby \fIbib\fP during processing by \fItrof\fP. All strings, registers and macros are denoted by two characternames containing either a left or right brace. The following are general rules:.IP [\fIx\fPIf \fIx\fP is alphanumeric, the string contains the value of a reference field.If \fIx\fP is nonalphanumeric, this is a formatting string preceding a citation..IP ]\fIx\fPIf \fIx\fP is alphanumeric, this is the final character from a reference field.If \fIx\fP is nonalphanumeric, the string is formatting information within a citation..IP \fIx\fP[Strings in this format, where \fIx\fP is can be any character, are defined by thespecific macro package in use and are not specified by \fIbib\fP..IP \fIx\fP]If \fIx\fP is nonalphanumeric these strings represent formatting commands followingcitations (the inverse of [\fIx\fP commands). Other strings representmiscellaneous formatting commands,such as the space between leading letters in abbreviated names..PPThere are two such macro names to be particularly aware of: .s[ and .e[\&.The first is called at the beginning of formatting a reference and thelatter is called at the end of the formatting. The user can have somecontrol over the formatting ofreferences by redefining these macros..PPIt might be noted here that the best way to understand this stuff is tolook at some existing definition files, and start making small changeshere and there..SHSort Templates.PPThe sort template is used in comparing two references to generatethe sorted reference list. The sort template is a sequence ofsort objects. Each sort object consists of an optional negative sign, followedby a field character, followed by an optional signed size. The leading negativesign, if present, specifies the sort is to be in decreasing order, rather thanincreasing. The field character indicates which field in the referenceis to be compared. The entire field is used, except in the case of the `A'field, in which case only the senior author's last name is used.A positive number following the field character indicates that only the firstn characters are to be examined in the comparison. The negative value indicatesonly the last \fIn\fP characters. Thus, for example, the template AD\-2 indicatesthat sorting is to be done by the senior author followed by the last twocharacters of the date..PPThe sort algorithm is stable, so that two documents which compare equallywill be listed in citation order..PPNote that in sorting, citation construction, and elsewhere, if an authorfield is not present the senior editor will be used. If neither author noreditor fields are present the institution name will be used..SHCitation Templates.PPA citation template is similar to a sort template, with the followingadditions: .IP 0suppresses all printing. \fB[[True? can anyone tell me what this does?]]\fP.IP 1refers to the number whichrepresents the position of the reference in the reference list (after sorting)..IP 2generates a three character sequence: if thepaper being referenced has only one author, this is the first three charactersof the author's last name; for two author papers, this is the first twocharacters of the senior author, followed by the first character of the secondauthor; for papers with three or more authors the first letter of the firstthree authors is used..IP 3used to specify a format consisting of the authors'last names, or the senior author followed by the text `et al' if more thanfour authors are listed. This is the Astrophysical Journal style ofcitation..IP 4the Computing Surveys style of citation..IP 8full alphabetic..IP 9last name of senior author..PP.PPEach object can be followed by either of the letters `u' or`l' and the field will be printed in all upper or all lower case,respectively..PPIf necessary for disambiguating, the character `@' can be used asa separator between objects in the citation template. Any text which shouldbe inserted into the citation uninterpreted should be surrounded by either\&'{\&..}' or '<\&..>' pairs..SHCitation Formatting in Troff.PPIn the output, each citation is surrounded by the strings \e*([[ and \e*(]](or in the alternative style \e*([{ and \e*(}]).Multiple citations are separated by the string \e*(],.The text portion of a format file should contain \fItroff\fP definitions forthese strings to achieve the appropriate typographic effect..PPCitations that are preceded by a period, comma, space or other punctuationare surrounded by string values for formatting the punctuation in theappropriate location.Again, \fItroff\fP commands should be given to insure the appropriate values are produced..KS.PPThe following table summarizes the string values that must be definedto handle citations..TScenter;l l l.[[ ]] Standard citation beginning and ending{[ }] Alternate citation beginning and ending[\&. .] Period before and after citation[, ,] Comma before and after citation[? ?] Question mark before and after citation[! !] Exclamation Point before and after citation[: :] Colon before and after citation[; ;] Semi-Colon before and after citation[" "] Double Quote before and after citation[' '] Single Quote before and after citation[< >] Space before and after citation], Multiple citation separator]- Separator for a range of citations.TE.KE.SHName Formatting in Troff.PPAuthors' (and editors') names can be abbreviated, reversed, and/or printedin Caps-small Caps format. In producing the string values for an author,formatting strings are inserted to give the macro writer greater flexibilityin producing the final output. Currently the following strings are used:.TScenter;l l.a] gap between successive initialsb] comma between last name and initial in reversed textc] comma between authorsn] \fIand\fP between two authorsm] \fIand\fP between last two authorsp] period following initial.TE.PPFor example, suppose the name `William E. Howden' is abbreviatedand reversed. It will come out looking like.ceHowden\\*(b]W\\*(p]\\*(a]E\e*(p].SHReference Formatting in Troff.PPThe particular style used in printing references is decided by macrospassed to \fItroff\fP. Basically, for each reference,\fIbib\fP generates a sequence of string definitions, one for each field in thereference, followed by a call on the formatting macro. For example anentry which in the reference file looks like:.KS.nf.ta 3m.sp%A M. A. Harrison%A W. L. Ruzzo%A J. D. Ullman%T Protection in Operating Systems%J CACM%V 19%N 8%P 461-471%D 1976%K hru.sp.KE.LPis converted into the following sequence of \fItroff\fP commands.KS.nf.sp .[\- .ds [F 1 .ds [A M\e*(p]\e*(a]A\e*(p] Harrison .as [A \e*(c]W\e*(p]\e*(a]L\e*(p] Ruzzo .as [A \e*(m]J\e*(p]\e*(a]D\e*(p] Ullman .ds [T Protection in Operating Systems .ds [J Communications of the ACM .ds [V 19 .ds [N 8 .nr [P 1 .ds [P 461-471 .ds [D 1976 .ds [K hru .][.sp.KE.PPNote that the commands are preceded by a call on the macro `.[\-'.This can be used by the macro routines for initialization, for example todelete old string values. (For some reason, the ending macro .e[ also calls.[\- which seems redundant.).PPThe string [F is the citation string used in the document.Note that the string CACM has been expanded..PPThe strings c], n] and m] are used to separate authors. c] separatesthe initial authors in multi-author documents (it is usually a commawith some space before and after), n] separates authors in two authordocuments (usually `\ and\ '), and m] separates the last two authorsin multi-author documents (either `\ and\ ' or `,\ and\ ')..PPIf abbreviation is specified, the string a] is used to separate initialsin the author's first name, and the string p] determines the punctuationto use (usually a period)..PPThe \fIbib\fP system provides minimal assistance indeciding format types. For example note that the number register [P hasbeen set of 1, to indicate that the article is on more than one page.Similarly, in documents with editors, the register [E is set to the numberof editors..SHTrailing Characters.PPThere is a problem with fields that end with punctuation characters causingmultiple occurrences of those characters to be printed. For example, supposeauthor fields are terminated with a period, as in T. A. Budd. If namesare reversed, this could be printed as Budd, T. A.. Even if names are notreversed, abbreviations, such as in Jr. can cause problems..PPTo avoid this problem \fIbib\fP, if instructed, generates the lastcharacter from a particular field as a separate string. The string nameis a right brace followed by the field character (e.g. ]A for theauthor field). Macro packages shouldtest this value before generating punctuation..SHAbbreviations.PPThe algorithm used to generate abbreviations from first names is fairlysimple: Each word in the first name field that begins with a capitalis reduced to that capital letter followed by a period.In some cases, this may not be sufficient. For example, supposeOle-Johan Dahl should be abbreviated `O\-J. Dahl'. The onlyway to achieve this (short of editing the output) is to include \fItroff\fP commandsin the reference file that alter the strings produced by \fIbib\fP, as in the following.RS.sp ... %A Ole-Johan Dahl .ds [A O\-J. Dahl ....sp.RE.PPIn fact, if absolutely necessary, any \fItroff\fP commands can be entered in the middle of a referenceentry, and the commands are copied uninterpreted to the output.For example, the user may wish to have a switch indicating whether the nameis to be abbreviated or not:.RS.sp ... %A Ole-Johan Dahl .if \en(i[ .ds [A O\-J. Dahl ....sp.RE.PPHowever, keep in mind the restrictions this imposes on the portabilityand convertibility of the database..bp.SHAn Example.PPFigure 1 shows the format file for the standard alphabetic format.The I command includes a file of definitionsfor common strings, such as dates and journal names. A portion of thisfile is shown in figure 2.The sort command indicates that sorting is to be done by senior author,followed by the last two digits of the date. The citation templateindicates that citations will be a three character sequence followed by the last two characters of the date (e.g. AHU79)(described in the section on citations above).Author and editor names will be abbreviated.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -