📄 bibdoc.ms
字号:
The \.so command causes \fItroff\fP to read a basic set of macrodefinitions for formatting the references; the beginning of this file is shown in figure 3;note that a no-op has been inserted into the definition string forBIT in order to avoid further expansion when thedefinition is rescanned.Finally, the \fItroff\fP macro s[ is redefined to turn offhyphenation across line-boundaries, and to make sure the citation is putin the bibliography list indented 10 ens and surrounded by squarebrackets..KS.nf.sp# standard alphabetic formatI bibinc.shortnamesSAD\-2C2D\-2AAEA .so \e*(l]/bmac.std .de s[ \e" start reference by turning off hyphenation .nh .IP [\e\e*([F] 10n \e" indent the citation .\..sp.ce\fBFigure 1\fP.sp.KE.KS.nf.spD ACTA Acta InformaticaD BIT B\e&ITD CACM Communications of the ACM ...D JAN Jan. ...D DEC Dec..sp.ce\fBFigure 2\fP.sp.KE.KS.nf.sp .\e" standard format troff commands .\e" citation formatting strings .ds [[ [ .ds ]] ] .ds ], ,\e\(br .ds ]- - .ds [\&. " \e& .ds .] . .ds [, " \e& .ds ,] , ... .\e" reference formating strings .ds a] " \e& .ds b] , \e& .ds c] , \e& .ds n] "\e& and \e& .ds m] "\e& and \e& .ds e] \e\efIet al.\e\efP .ds p] . ... .\e" reference formating macros .de s[ \e" start reference .nh .IP "[\e*([F]" 5m .. .de e[ \e" end reference .[\- .. .de [] \e" start to display collected references .LP ...sp.ce\fBFigure 3\fP.sp.KE.KS.nf.sp .de ][ \e" choose format .ie !"\e\e*([J"" \e{\e . ie !"\e\e*([V"" .nr t[ 1 \e" journal . el .nr t[ 5 \e" conference paper .\e} .el .ie !"\e\e*([B"" .nr t[ 3 \e" article in book .el .ie !"\e\e*([R"" .nr t[ 4 \e" technical report .el .ie !"\e\e*([I"" .nr t[ 2 \e" book .el .nr t[ 0 \e" other .\e\en(t[[ ...sp.ce\fBFigure 4\fP.sp.KE.PPOn the basis of some simple rules (the presence or absence of certain fields)the document is identified as one of five different types, and a call madeon a different macro for each type. This is shown in figure 4. Notethat how the reference is printed (as a book, a journal articlereference, etc.) is not determined by \fIbib\fP, but by the .][ macroinvoked by \fItroff\fP..PPFinally figure 5 shows the macro for one of those different types, in thiscase the formatting macro for references to books..KS.nf.sp .de 2[ \e" book .s[ .ie !"\e\e*([A"" \e\e*([A, .el .if !"\e\e*([E"" \e{\e . ie \e\en([E-1 \e\e*([E, eds., . el \e\e*([E, ed.,\e} .if !"\e\e*([T"" \e\efI\e\e*([T\e\efP, .rm a[ .if !"\e\e*([I"" .ds a[ \e\e*([I .if !"\e\e*([S"" , \e\e*([S\ec \e" book in a series .if !"\e\e*([C"" \e{\e . if !"\e\e*(a["" .as a[ , \e\e& . as a[ \e\e*([C\e} .if !"\e\e*([D"" \e{\e . if !"\e\e*(a["" .as a[ , \e\e& . as a[ \e\e*([D\e} \e\e*(a[\&. .if !"\e\e*([G"" Gov. ordering no. \e\e*([G. .if !"\e\e*([O"" \e\e*([O. .e[ ...sp.ce\fBFigure 5\fP.sp.KE.bp.ceMiscellaneous Tools.SHBibinc.PPSome editors require journal names in a reference to be spelled outcompletely, while other journals expect a standardized shortenedversion. \fIBib\fP is able to accomodate these requirements by readingdifferent different definition files. For example, standard openalphabetic format (see \fBBMACLIB\fP/\fIbib.opena\fP) expects a definitionfile called \fIbibinc.fullnames\fP, while \fBBMACLIB\fP/\fIbib.spe\fP reads\fIbibinc.shortnames\fP. Maintaining these two files and making surethey are consistent with one another can be tedious. A program isincluded with \fIbib\fP to ease this problem. It allows the userto keep a single file with all definitions, and tohave those definitions sentto the appropriate file(s). In what follows we assume that the name ofthis common file, the input file to \fIbibinc\fP, is called \fIbibinc.names\fP..PPThe format of the lines in \fIbibinc.names\fP is formally:.LD<inputline> ::= '+'<char1> <filename> | '+'<char1> '+'<char2> '+'<char3> ... | '+'<char> <name> <stuff> | '+'<char><stuff> | '?'<name>.DEIn all cases the '+' or '?' must be the first character of a line to berecognized, and there can be no spaces between it and the followingcharacter. Continuation lines are all lines from the preceding '+' tothe following '+'. Any and all whitespace at the beginning of acontinuation line is discarded..PPThe first form defines <char1> to be the character that denotes an outputfilenamed <filename>. It must be the first occurence of <char1> following a '+'in the file. .PPThe second form defines <char1> to be the character that denotes severalpreviously defined outputfiles. It must be the first occurence of '+'<char1>in the file..PPThe third form says that the following line is to be written to the file orfiles denoted by <char> as:.LDD <name> <stuff>.DE.PPThe fourth form allows the inclusion of arbitrary stuff into the file. Note that there is no space between the <stuff> and <char> in the fourth form..PPThe fifth form is used to provide some mechanism to select lines to be processed according to whether one is intending to use \fItib\fP or\fIbib\fP, and whether one is intending to use the TeX or the\fItroff\fP processors.The problem to be solved is that we want to be able to create files for three possibilities:.IP (1) the user is using bib-style macros with troff,.IP (2) the user is using tib-style macros with troff,.IP (3) the user is using tib-style macros with TeX or LaTeX..PPTherefore, the user can type the invocation line as:.LD bibinc bib troff <bibinc.names bibinc bib <bibinc.names (troff implied) bibinc tib troff <bibinc.names bibinc tib tex <bibinc.names bibinc tex <bibinc.names (tib implied).DE(Note that `bibinc bib tex' is illegal: not a supported combination.)If a line of the form "?tib" is encountered in \fIbibinc.names\fP, then the lines following thatline are processed only if "tib" was specified or implied on theinvocation line. This restriction remains true until a linebeginning "?bib" or "?" isencountered. Likewise, "?troff" will permit the processing of the following lines onlyif troff was specified or implied on the invocation line, and this remainstrue until "?tex" or "?" is encountered..SHMore on Tib style macro invocation.PP\fITib\fP macro mechanism is quite differentfrom the \fIbib\fP macro style. In \fIbib\fP, you define and use a macroas follows:.LDD macro expansion text :%A A. Nonymous%T macro on macro.DEThe title will be expanded to `expansion text on expansion text'.In \fItib\fP, macro calls are always enclosed in vertical bars:.LDD macro expansion text :%A A. Nonymous%T The macro as \(brmacro\(br.DEThe title will be expanded to `The macro as expansion text', therewith demonstrating a major benefit of using the vertical \(brbars\(br. Here is anotherbenefit of the bars:.LDD u_um \e"{u}D Karlsruhe Karlsr\(bru_um\(brhe.DEIt's easy now to get the diacritical marks right, and still have a recognizable word to act as a key in the INDEX. It is possible to acheivethis same effect with \fIbib\fP-style macros by using the non-printing space `\e&'..LDD u_um \e*(:uD Karlsruhe Karlsr\e&u_um\e&he.DE.SHA Bibinc Example.PPThe \(brKarlsruhe\(br example has a problem if your database is being usedfor both TeX and ditroff: bib/tib macros have no conditionals, and youhave to choose either the TeX code or the troff code for specialcharacters. Bibinc has a mechanism to solve this. Let's assume youhave the following in a file called bibinc.names:.LD================================== bibinc.names# first line of bibinc.names## first use of a letter after `+' constitutes its definition## define the letter F to mean 'write this line into the fullnames file'?bib?troff+F bibinc.fullnames+S bibinc.shortnames+B +F +S # both?tib?troff+F bibinc-t.fullnames+S bibinc-t.shortnames?tex+F tibinc.fullnames+S tibinc.shortnames? # turns off specialization+B +F +S # both#?tex+B a_um \e"{a}+B o_sl \eo+B o_um \e"{o}+B u_um \e"{u}+B TCOLADA $\embox{TCOL}_\embox{Ada}$+B dash --+B Rn $\embox{R}^\embox{n}$+B AMP \e\e&?troff # either bib or tib+B a_um \e*(:a+B o_sl \e*(/o+B o_um \e*(:o+B u_um \e*(:u+B TCOLADA TCOL\edAda\eu+B dash \e(hy+B Rn \e*(Rn+B AMP &?+B fuer f\(bru_um\(brr#+B IFI Institut \(brfuer\(br Informatik+B Universitat Universit\(bra_um\(brt+B KARLSRUHE Karlsr\(bru_um\(brhe+F Karlsruhe \(brIFI\(br, \(brUniversitat\(br \(brKARLSRUHE\(br %C \(brKARLSRUHE\(br, West Germany # note that leading blanks are removed+S Karlsruhe \(brIFI\(br, \(brUniversitat\(br \(brKARLSRUHE\(br+F SIGPLAN SIG\e&PLAN Notices+S SIGPLAN SIG\e&PLAN+B GUNS Smith \(brAMP\(br Wesson# last line of bibinc.names================================== bibinc.names.DEThis input to bibinc will select the correct expansion for u_um dependingon whether -Tib was specified on its invocation line or not. That is,with the following invocation:.LD% bibinc troff tib <bibinc.names.DEtwo files will be written, bibinc-t.fullnames and bibinc-t.shortnames:.LD================================== bibinc-t.fullnamesD a_um \e*(:aD o_sl \e*(/oD o_um \e*(:oD u_um \e*(:uD TCOLADA TCOL\edAda\euD dash \e(hyD Rn \e*(RnD AMP &D fuer f\(bru_um\(brrD IFI Institut \(brfuer\(br InformatikD Universitat Universit\(bra_um\(brtD KARLSRUHE Karlsr\(bru_um\(brheD Karlsruhe \(brIFI\(br, \(brUniversitat\(br \(brKARLSRUHE\(br\e%C \(brKARLSRUHE\(br, West GermanyD SIGPLAN SIGPLAN Notices================================== bibinc-t.fullnames.DEand.LD================================== bibinc-t.shortnamesD a_um \e*(:aD o_sl \e*(/oD o_um \e*(:oD u_um \e*(:uD TCOLADA TCOL\edAda\euD dash \e(hyD Rn \e*(RnD AMP &D fuer f\(bru_um\(brrD IFI Institut \(brfuer\(br InformatikD Universitat Universit\(bra_um\(brtD KARLSRUHE Karlsr\(bru_um\(brheD Karlsruhe \(brIFI\(br, \(brUniversitat\(br \(brKARLSRUHE\(brD SIGPLAN SIGPLAN================================== bibinc-t.shortnames.DEUsers of bib/ditroff will have to specify -Tib on theirinvocations of bib to use these files..PPThe command:.LD%bibinc bib troff <bibinc.names.DEproduces.LD================================== bibinc.fullnamesD a_um \e*(:aD o_sl \e*(/oD o_um \e*(:oD u_um \e*(:uD TCOLADA TCOL\edAda\euD dash \e(hyD Rn \e*(Rn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -