b@12: %% b@12: %% IEEEtran.bst b@12: %% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted) b@12: %% Version 1.12 (2007/01/11) b@12: %% b@12: %% Copyright (c) 2003-2007 Michael Shell b@12: %% b@12: %% Original starting code base and algorithms obtained from the output of b@12: %% Patrick W. Daly's makebst package as well as from prior versions of b@12: %% IEEE BibTeX styles: b@12: %% b@12: %% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988) b@12: %% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993) b@12: %% b@12: %% Support sites: b@12: %% http://www.michaelshell.org/tex/ieeetran/ b@12: %% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/ b@12: %% and/or b@12: %% http://www.ieee.org/ b@12: %% b@12: %% For use with BibTeX version 0.99a or later b@12: %% b@12: %% This is a numerical citation style. b@12: %% b@12: %%************************************************************************* b@12: %% Legal Notice: b@12: %% This code is offered as-is without any warranty either expressed or b@12: %% implied; without even the implied warranty of MERCHANTABILITY or b@12: %% FITNESS FOR A PARTICULAR PURPOSE! b@12: %% User assumes all risk. b@12: %% In no event shall IEEE or any contributor to this code be liable for b@12: %% any damages or losses, including, but not limited to, incidental, b@12: %% consequential, or any other damages, resulting from the use or misuse b@12: %% of any information contained here. b@12: %% b@12: %% All comments are the opinions of their respective authors and are not b@12: %% necessarily endorsed by the IEEE. b@12: %% b@12: %% This work is distributed under the LaTeX Project Public License (LPPL) b@12: %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, b@12: %% distributed and modified. A copy of the LPPL, version 1.3, is included b@12: %% in the base LaTeX documentation of all distributions of LaTeX released b@12: %% 2003/12/01 or later. b@12: %% Retain all contribution notices and credits. b@12: %% ** Modified files should be clearly indicated as such, including ** b@12: %% ** renaming them and changing author support contact information. ** b@12: %% b@12: %% File list of work: IEEEabrv.bib, IEEEfull.bib, IEEEexample.bib, b@12: %% IEEEtran.bst, IEEEtranS.bst, IEEEtranSA.bst, b@12: %% IEEEtranN.bst, IEEEtranSN.bst, IEEEtran_bst_HOWTO.pdf b@12: %%************************************************************************* b@12: % b@12: % b@12: % Changelog: b@12: % b@12: % 1.00 (2002/08/13) Initial release b@12: % b@12: % 1.10 (2002/09/27) b@12: % 1. Corrected minor bug for improperly formed warning message when a b@12: % book was not given a title. Thanks to Ming Kin Lai for reporting this. b@12: % 2. Added support for CTLname_format_string and CTLname_latex_cmd fields b@12: % in the BST control entry type. b@12: % b@12: % 1.11 (2003/04/02) b@12: % 1. Fixed bug with URLs containing underscores when using url.sty. Thanks b@12: % to Ming Kin Lai for reporting this. b@12: % b@12: % 1.12 (2007/01/11) b@12: % 1. Fixed bug with unwanted comma before "et al." when an entry contained b@12: % more than two author names. Thanks to Pallav Gupta for reporting this. b@12: % 2. Fixed bug with anomalous closing quote in tech reports that have a b@12: % type, but without a number or address. Thanks to Mehrdad Mirreza for b@12: % reporting this. b@12: % 3. Use braces in \providecommand in begin.bib to better support b@12: % latex2html. TeX style length assignments OK with recent versions b@12: % of latex2html - 1.71 (2002/2/1) or later is strongly recommended. b@12: % Use of the language field still causes trouble with latex2html. b@12: % Thanks to Federico Beffa for reporting this. b@12: % 4. Added IEEEtran.bst ID and version comment string to .bbl output. b@12: % 5. Provide a \BIBdecl hook that allows the user to execute commands b@12: % just prior to the first entry. b@12: % 6. Use default urlstyle (is using url.sty) of "same" rather than rm to b@12: % better work with a wider variety of bibliography styles. b@12: % 7. Changed month abbreviations from Sept., July and June to Sep., Jul., b@12: % and Jun., respectively, as IEEE now does. Thanks to Moritz Borgmann b@12: % for reporting this. b@12: % 8. Control entry types should not be considered when calculating longest b@12: % label width. b@12: % 9. Added alias www for electronic/online. b@12: % 10. Added CTLname_url_prefix control entry type. b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: %% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %% b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: b@12: % These are the defaults for the user adjustable controls. The values used b@12: % here can be overridden by the user via IEEEtranBSTCTL entry type. b@12: b@12: % NOTE: The recommended LaTeX command to invoke a control entry type is: b@12: % b@12: %\makeatletter b@12: %\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}} b@12: %\def\@bstctlcite[#1]#2{\@bsphack b@12: % \@for\@citeb:=#2\do{% b@12: % \edef\@citeb{\expandafter\@firstofone\@citeb}% b@12: % \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}% b@12: % \@esphack} b@12: %\makeatother b@12: % b@12: % It is called at the start of the document, before the first \cite, like: b@12: % \bstctlcite{IEEEexample:BSTcontrol} b@12: % b@12: % IEEEtran.cls V1.6 and later does provide this command. b@12: b@12: b@12: b@12: % #0 turns off the display of the number for articles. b@12: % #1 enables b@12: FUNCTION {default.is.use.number.for.article} { #1 } b@12: b@12: b@12: % #0 turns off the display of the paper and type fields in @inproceedings. b@12: % #1 enables b@12: FUNCTION {default.is.use.paper} { #1 } b@12: b@12: b@12: % #0 turns off the forced use of "et al." b@12: % #1 enables b@12: FUNCTION {default.is.forced.et.al} { #0 } b@12: b@12: % The maximum number of names that can be present beyond which an "et al." b@12: % usage is forced. Be sure that num.names.shown.with.forced.et.al (below) b@12: % is not greater than this value! b@12: % Note: There are many instances of references in IEEE journals which have b@12: % a very large number of authors as well as instances in which "et al." is b@12: % used profusely. b@12: FUNCTION {default.max.num.names.before.forced.et.al} { #10 } b@12: b@12: % The number of names that will be shown with a forced "et al.". b@12: % Must be less than or equal to max.num.names.before.forced.et.al b@12: FUNCTION {default.num.names.shown.with.forced.et.al} { #1 } b@12: b@12: b@12: % #0 turns off the alternate interword spacing for entries with URLs. b@12: % #1 enables b@12: FUNCTION {default.is.use.alt.interword.spacing} { #1 } b@12: b@12: % If alternate interword spacing for entries with URLs is enabled, this is b@12: % the interword spacing stretch factor that will be used. For example, the b@12: % default "4" here means that the interword spacing in entries with URLs can b@12: % stretch to four times normal. Does not have to be an integer. Note that b@12: % the value specified here can be overridden by the user in their LaTeX b@12: % code via a command such as: b@12: % "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to b@12: % that via the IEEEtranBSTCTL entry type. b@12: FUNCTION {default.ALTinterwordstretchfactor} { "4" } b@12: b@12: b@12: % #0 turns off the "dashification" of repeated (i.e., identical to those b@12: % of the previous entry) names. IEEE normally does this. b@12: % #1 enables b@12: FUNCTION {default.is.dash.repeated.names} { #1 } b@12: b@12: b@12: % The default name format control string. b@12: FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" } b@12: b@12: b@12: % The default LaTeX font command for the names. b@12: FUNCTION {default.name.latex.cmd}{ "" } b@12: b@12: b@12: % The default URL prefix. b@12: FUNCTION {default.name.url.prefix}{ "[Online]. Available:" } b@12: b@12: b@12: % Other controls that cannot be accessed via IEEEtranBSTCTL entry type. b@12: b@12: % #0 turns off the terminal startup banner/completed message so as to b@12: % operate more quietly. b@12: % #1 enables b@12: FUNCTION {is.print.banners.to.terminal} { #1 } b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: %% FILE VERSION AND BANNER %% b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: b@12: FUNCTION{bst.file.version} { "1.12" } b@12: FUNCTION{bst.file.date} { "2007/01/11" } b@12: FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" } b@12: b@12: FUNCTION {banner.message} b@12: { is.print.banners.to.terminal b@12: { "-- IEEEtran.bst version" " " * bst.file.version * b@12: " (" * bst.file.date * ") " * "by Michael Shell." * b@12: top$ b@12: "-- " bst.file.website * b@12: top$ b@12: "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." * b@12: top$ b@12: } b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: FUNCTION {completed.message} b@12: { is.print.banners.to.terminal b@12: { "" b@12: top$ b@12: "Done." b@12: top$ b@12: } b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%% b@12: %% STRING CONSTANTS %% b@12: %%%%%%%%%%%%%%%%%%%%%% b@12: b@12: FUNCTION {bbl.and}{ "and" } b@12: FUNCTION {bbl.etal}{ "et~al." } b@12: FUNCTION {bbl.editors}{ "eds." } b@12: FUNCTION {bbl.editor}{ "ed." } b@12: FUNCTION {bbl.edition}{ "ed." } b@12: FUNCTION {bbl.volume}{ "vol." } b@12: FUNCTION {bbl.of}{ "of" } b@12: FUNCTION {bbl.number}{ "no." } b@12: FUNCTION {bbl.in}{ "in" } b@12: FUNCTION {bbl.pages}{ "pp." } b@12: FUNCTION {bbl.page}{ "p." } b@12: FUNCTION {bbl.chapter}{ "ch." } b@12: FUNCTION {bbl.paper}{ "paper" } b@12: FUNCTION {bbl.part}{ "pt." } b@12: FUNCTION {bbl.patent}{ "Patent" } b@12: FUNCTION {bbl.patentUS}{ "U.S." } b@12: FUNCTION {bbl.revision}{ "Rev." } b@12: FUNCTION {bbl.series}{ "ser." } b@12: FUNCTION {bbl.standard}{ "Std." } b@12: FUNCTION {bbl.techrep}{ "Tech. Rep." } b@12: FUNCTION {bbl.mthesis}{ "Master's thesis" } b@12: FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" } b@12: FUNCTION {bbl.st}{ "st" } b@12: FUNCTION {bbl.nd}{ "nd" } b@12: FUNCTION {bbl.rd}{ "rd" } b@12: FUNCTION {bbl.th}{ "th" } b@12: b@12: b@12: % This is the LaTeX spacer that is used when a larger than normal space b@12: % is called for (such as just before the address:publisher). b@12: FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " } b@12: b@12: % The LaTeX code for dashes that are used to represent repeated names. b@12: % Note: Some older IEEE journals used something like b@12: % "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along b@12: % the baseline. However, IEEE now uses a thinner, above baseline, b@12: % six dash long sequence. b@12: FUNCTION {repeated.name.dashes} { "------" } b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: %% PREDEFINED STRING MACROS %% b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: b@12: MACRO {jan} {"Jan."} b@12: MACRO {feb} {"Feb."} b@12: MACRO {mar} {"Mar."} b@12: MACRO {apr} {"Apr."} b@12: MACRO {may} {"May"} b@12: MACRO {jun} {"Jun."} b@12: MACRO {jul} {"Jul."} b@12: MACRO {aug} {"Aug."} b@12: MACRO {sep} {"Sep."} b@12: MACRO {oct} {"Oct."} b@12: MACRO {nov} {"Nov."} b@12: MACRO {dec} {"Dec."} b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%% b@12: %% ENTRY FIELDS %% b@12: %%%%%%%%%%%%%%%%%% b@12: b@12: ENTRY b@12: { address b@12: assignee b@12: author b@12: booktitle b@12: chapter b@12: day b@12: dayfiled b@12: edition b@12: editor b@12: howpublished b@12: institution b@12: intype b@12: journal b@12: key b@12: language b@12: month b@12: monthfiled b@12: nationality b@12: note b@12: number b@12: organization b@12: pages b@12: paper b@12: publisher b@12: school b@12: series b@12: revision b@12: title b@12: type b@12: url b@12: volume b@12: year b@12: yearfiled b@12: CTLuse_article_number b@12: CTLuse_paper b@12: CTLuse_forced_etal b@12: CTLmax_names_forced_etal b@12: CTLnames_show_etal b@12: CTLuse_alt_spacing b@12: CTLalt_stretch_factor b@12: CTLdash_repeated_names b@12: CTLname_format_string b@12: CTLname_latex_cmd b@12: CTLname_url_prefix b@12: } b@12: {} b@12: { label } b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%%% b@12: %% INTEGER VARIABLES %% b@12: %%%%%%%%%%%%%%%%%%%%%%% b@12: b@12: INTEGERS { prev.status.punct this.status.punct punct.std b@12: punct.no punct.comma punct.period b@12: prev.status.space this.status.space space.std b@12: space.no space.normal space.large b@12: prev.status.quote this.status.quote quote.std b@12: quote.no quote.close b@12: prev.status.nline this.status.nline nline.std b@12: nline.no nline.newblock b@12: status.cap cap.std b@12: cap.no cap.yes} b@12: b@12: INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames } b@12: b@12: INTEGERS { is.use.number.for.article b@12: is.use.paper b@12: is.forced.et.al b@12: max.num.names.before.forced.et.al b@12: num.names.shown.with.forced.et.al b@12: is.use.alt.interword.spacing b@12: is.dash.repeated.names} b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%% b@12: %% STRING VARIABLES %% b@12: %%%%%%%%%%%%%%%%%%%%%% b@12: b@12: STRINGS { bibinfo b@12: longest.label b@12: oldname b@12: s b@12: t b@12: ALTinterwordstretchfactor b@12: name.format.string b@12: name.latex.cmd b@12: name.url.prefix} b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%%%%% b@12: %% LOW LEVEL FUNCTIONS %% b@12: %%%%%%%%%%%%%%%%%%%%%%%%% b@12: b@12: FUNCTION {initialize.controls} b@12: { default.is.use.number.for.article 'is.use.number.for.article := b@12: default.is.use.paper 'is.use.paper := b@12: default.is.forced.et.al 'is.forced.et.al := b@12: default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al := b@12: default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al := b@12: default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing := b@12: default.is.dash.repeated.names 'is.dash.repeated.names := b@12: default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor := b@12: default.name.format.string 'name.format.string := b@12: default.name.latex.cmd 'name.latex.cmd := b@12: default.name.url.prefix 'name.url.prefix := b@12: } b@12: b@12: b@12: % This IEEEtran.bst features a very powerful and flexible mechanism for b@12: % controlling the capitalization, punctuation, spacing, quotation, and b@12: % newlines of the formatted entry fields. (Note: IEEEtran.bst does not need b@12: % or use the newline/newblock feature, but it has been implemented for b@12: % possible future use.) The output states of IEEEtran.bst consist of b@12: % multiple independent attributes and, as such, can be thought of as being b@12: % vectors, rather than the simple scalar values ("before.all", b@12: % "mid.sentence", etc.) used in most other .bst files. b@12: % b@12: % The more flexible and complex design used here was motivated in part by b@12: % IEEE's rather unusual bibliography style. For example, IEEE ends the b@12: % previous field item with a period and large space prior to the publisher b@12: % address; the @electronic entry types use periods as inter-item punctuation b@12: % rather than the commas used by the other entry types; and URLs are never b@12: % followed by periods even though they are the last item in the entry. b@12: % Although it is possible to accommodate these features with the conventional b@12: % output state system, the seemingly endless exceptions make for convoluted, b@12: % unreliable and difficult to maintain code. b@12: % b@12: % IEEEtran.bst's output state system can be easily understood via a simple b@12: % illustration of two most recently formatted entry fields (on the stack): b@12: % b@12: % CURRENT_ITEM b@12: % "PREVIOUS_ITEM b@12: % b@12: % which, in this example, is to eventually appear in the bibliography as: b@12: % b@12: % "PREVIOUS_ITEM," CURRENT_ITEM b@12: % b@12: % It is the job of the output routine to take the previous item off of the b@12: % stack (while leaving the current item at the top of the stack), apply its b@12: % trailing punctuation (including closing quote marks) and spacing, and then b@12: % to write the result to BibTeX's output buffer: b@12: % b@12: % "PREVIOUS_ITEM," b@12: % b@12: % Punctuation (and spacing) between items is often determined by both of the b@12: % items rather than just the first one. The presence of quotation marks b@12: % further complicates the situation because, in standard English, trailing b@12: % punctuation marks are supposed to be contained within the quotes. b@12: % b@12: % IEEEtran.bst maintains two output state (aka "status") vectors which b@12: % correspond to the previous and current (aka "this") items. Each vector b@12: % consists of several independent attributes which track punctuation, b@12: % spacing, quotation, and newlines. Capitalization status is handled by a b@12: % separate scalar because the format routines, not the output routine, b@12: % handle capitalization and, therefore, there is no need to maintain the b@12: % capitalization attribute for both the "previous" and "this" items. b@12: % b@12: % When a format routine adds a new item, it copies the current output status b@12: % vector to the previous output status vector and (usually) resets the b@12: % current (this) output status vector to a "standard status" vector. Using a b@12: % "standard status" vector in this way allows us to redefine what we mean by b@12: % "standard status" at the start of each entry handler and reuse the same b@12: % format routines under the various inter-item separation schemes. For b@12: % example, the standard status vector for the @book entry type may use b@12: % commas for item separators, while the @electronic type may use periods, b@12: % yet both entry handlers exploit many of the exact same format routines. b@12: % b@12: % Because format routines have write access to the output status vector of b@12: % the previous item, they can override the punctuation choices of the b@12: % previous format routine! Therefore, it becomes trivial to implement rules b@12: % such as "Always use a period and a large space before the publisher." By b@12: % pushing the generation of the closing quote mark to the output routine, we b@12: % avoid all the problems caused by having to close a quote before having all b@12: % the information required to determine what the punctuation should be. b@12: % b@12: % The IEEEtran.bst output state system can easily be expanded if needed. b@12: % For instance, it is easy to add a "space.tie" attribute value if the b@12: % bibliography rules mandate that two items have to be joined with an b@12: % unbreakable space. b@12: b@12: FUNCTION {initialize.status.constants} b@12: { #0 'punct.no := b@12: #1 'punct.comma := b@12: #2 'punct.period := b@12: #0 'space.no := b@12: #1 'space.normal := b@12: #2 'space.large := b@12: #0 'quote.no := b@12: #1 'quote.close := b@12: #0 'cap.no := b@12: #1 'cap.yes := b@12: #0 'nline.no := b@12: #1 'nline.newblock := b@12: } b@12: b@12: FUNCTION {std.status.using.comma} b@12: { punct.comma 'punct.std := b@12: space.normal 'space.std := b@12: quote.no 'quote.std := b@12: nline.no 'nline.std := b@12: cap.no 'cap.std := b@12: } b@12: b@12: FUNCTION {std.status.using.period} b@12: { punct.period 'punct.std := b@12: space.normal 'space.std := b@12: quote.no 'quote.std := b@12: nline.no 'nline.std := b@12: cap.yes 'cap.std := b@12: } b@12: b@12: FUNCTION {initialize.prev.this.status} b@12: { punct.no 'prev.status.punct := b@12: space.no 'prev.status.space := b@12: quote.no 'prev.status.quote := b@12: nline.no 'prev.status.nline := b@12: punct.no 'this.status.punct := b@12: space.no 'this.status.space := b@12: quote.no 'this.status.quote := b@12: nline.no 'this.status.nline := b@12: cap.yes 'status.cap := b@12: } b@12: b@12: FUNCTION {this.status.std} b@12: { punct.std 'this.status.punct := b@12: space.std 'this.status.space := b@12: quote.std 'this.status.quote := b@12: nline.std 'this.status.nline := b@12: } b@12: b@12: FUNCTION {cap.status.std}{ cap.std 'status.cap := } b@12: b@12: FUNCTION {this.to.prev.status} b@12: { this.status.punct 'prev.status.punct := b@12: this.status.space 'prev.status.space := b@12: this.status.quote 'prev.status.quote := b@12: this.status.nline 'prev.status.nline := b@12: } b@12: b@12: b@12: FUNCTION {not} b@12: { { #0 } b@12: { #1 } b@12: if$ b@12: } b@12: b@12: FUNCTION {and} b@12: { { skip$ } b@12: { pop$ #0 } b@12: if$ b@12: } b@12: b@12: FUNCTION {or} b@12: { { pop$ #1 } b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: b@12: % convert the strings "yes" or "no" to #1 or #0 respectively b@12: FUNCTION {yes.no.to.int} b@12: { "l" change.case$ duplicate$ b@12: "yes" = b@12: { pop$ #1 } b@12: { duplicate$ "no" = b@12: { pop$ #0 } b@12: { "unknown boolean " quote$ * swap$ * quote$ * b@12: " in " * cite$ * warning$ b@12: #0 b@12: } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: b@12: % pushes true if the single char string on the stack is in the b@12: % range of "0" to "9" b@12: FUNCTION {is.num} b@12: { chr.to.int$ b@12: duplicate$ "0" chr.to.int$ < not b@12: swap$ "9" chr.to.int$ > not and b@12: } b@12: b@12: % multiplies the integer on the stack by a factor of 10 b@12: FUNCTION {bump.int.mag} b@12: { #0 'multiresult := b@12: { duplicate$ #0 > } b@12: { #1 - b@12: multiresult #10 + b@12: 'multiresult := b@12: } b@12: while$ b@12: pop$ b@12: multiresult b@12: } b@12: b@12: % converts a single character string on the stack to an integer b@12: FUNCTION {char.to.integer} b@12: { duplicate$ b@12: is.num b@12: { chr.to.int$ "0" chr.to.int$ - } b@12: {"noninteger character " quote$ * swap$ * quote$ * b@12: " in integer field of " * cite$ * warning$ b@12: #0 b@12: } b@12: if$ b@12: } b@12: b@12: % converts a string on the stack to an integer b@12: FUNCTION {string.to.integer} b@12: { duplicate$ text.length$ 'namesleft := b@12: #1 'nameptr := b@12: #0 'numnames := b@12: { nameptr namesleft > not } b@12: { duplicate$ nameptr #1 substring$ b@12: char.to.integer numnames bump.int.mag + b@12: 'numnames := b@12: nameptr #1 + b@12: 'nameptr := b@12: } b@12: while$ b@12: pop$ b@12: numnames b@12: } b@12: b@12: b@12: b@12: b@12: % The output routines write out the *next* to the top (previous) item on the b@12: % stack, adding punctuation and such as needed. Since IEEEtran.bst maintains b@12: % the output status for the top two items on the stack, these output b@12: % routines have to consider the previous output status (which corresponds to b@12: % the item that is being output). Full independent control of punctuation, b@12: % closing quote marks, spacing, and newblock is provided. b@12: % b@12: % "output.nonnull" does not check for the presence of a previous empty b@12: % item. b@12: % b@12: % "output" does check for the presence of a previous empty item and will b@12: % remove an empty item rather than outputing it. b@12: % b@12: % "output.warn" is like "output", but will issue a warning if it detects b@12: % an empty item. b@12: b@12: FUNCTION {output.nonnull} b@12: { swap$ b@12: prev.status.punct punct.comma = b@12: { "," * } b@12: { skip$ } b@12: if$ b@12: prev.status.punct punct.period = b@12: { add.period$ } b@12: { skip$ } b@12: if$ b@12: prev.status.quote quote.close = b@12: { "''" * } b@12: { skip$ } b@12: if$ b@12: prev.status.space space.normal = b@12: { " " * } b@12: { skip$ } b@12: if$ b@12: prev.status.space space.large = b@12: { large.space * } b@12: { skip$ } b@12: if$ b@12: write$ b@12: prev.status.nline nline.newblock = b@12: { newline$ "\newblock " write$ } b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: FUNCTION {output} b@12: { duplicate$ empty$ b@12: 'pop$ b@12: 'output.nonnull b@12: if$ b@12: } b@12: b@12: FUNCTION {output.warn} b@12: { 't := b@12: duplicate$ empty$ b@12: { pop$ "empty " t * " in " * cite$ * warning$ } b@12: 'output.nonnull b@12: if$ b@12: } b@12: b@12: % "fin.entry" is the output routine that handles the last item of the entry b@12: % (which will be on the top of the stack when "fin.entry" is called). b@12: b@12: FUNCTION {fin.entry} b@12: { this.status.punct punct.no = b@12: { skip$ } b@12: { add.period$ } b@12: if$ b@12: this.status.quote quote.close = b@12: { "''" * } b@12: { skip$ } b@12: if$ b@12: write$ b@12: newline$ b@12: } b@12: b@12: b@12: FUNCTION {is.last.char.not.punct} b@12: { duplicate$ b@12: "}" * add.period$ b@12: #-1 #1 substring$ "." = b@12: } b@12: b@12: FUNCTION {is.multiple.pages} b@12: { 't := b@12: #0 'multiresult := b@12: { multiresult not b@12: t empty$ not b@12: and b@12: } b@12: { t #1 #1 substring$ b@12: duplicate$ "-" = b@12: swap$ duplicate$ "," = b@12: swap$ "+" = b@12: or or b@12: { #1 'multiresult := } b@12: { t #2 global.max$ substring$ 't := } b@12: if$ b@12: } b@12: while$ b@12: multiresult b@12: } b@12: b@12: FUNCTION {capitalize}{ "u" change.case$ "t" change.case$ } b@12: b@12: FUNCTION {emphasize} b@12: { duplicate$ empty$ b@12: { pop$ "" } b@12: { "\emph{" swap$ * "}" * } b@12: if$ b@12: } b@12: b@12: FUNCTION {do.name.latex.cmd} b@12: { name.latex.cmd b@12: empty$ b@12: { skip$ } b@12: { name.latex.cmd "{" * swap$ * "}" * } b@12: if$ b@12: } b@12: b@12: % IEEEtran.bst uses its own \BIBforeignlanguage command which directly b@12: % invokes the TeX hyphenation patterns without the need of the Babel b@12: % package. Babel does a lot more than switch hyphenation patterns and b@12: % its loading can cause unintended effects in many class files (such as b@12: % IEEEtran.cls). b@12: FUNCTION {select.language} b@12: { duplicate$ empty$ 'pop$ b@12: { language empty$ 'skip$ b@12: { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {tie.or.space.prefix} b@12: { duplicate$ text.length$ #3 < b@12: { "~" } b@12: { " " } b@12: if$ b@12: swap$ b@12: } b@12: b@12: FUNCTION {get.bbl.editor} b@12: { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } b@12: b@12: FUNCTION {space.word}{ " " swap$ * " " * } b@12: b@12: b@12: % Field Conditioners, Converters, Checkers and External Interfaces b@12: b@12: FUNCTION {empty.field.to.null.string} b@12: { duplicate$ empty$ b@12: { pop$ "" } b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: FUNCTION {either.or.check} b@12: { empty$ b@12: { pop$ } b@12: { "can't use both " swap$ * " fields in " * cite$ * warning$ } b@12: if$ b@12: } b@12: b@12: FUNCTION {empty.entry.warn} b@12: { author empty$ title empty$ howpublished empty$ b@12: month empty$ year empty$ note empty$ url empty$ b@12: and and and and and and b@12: { "all relevant fields are empty in " cite$ * warning$ } b@12: 'skip$ b@12: if$ b@12: } b@12: b@12: b@12: % The bibinfo system provides a way for the electronic parsing/acquisition b@12: % of a bibliography's contents as is done by ReVTeX. For example, a field b@12: % could be entered into the bibliography as: b@12: % \bibinfo{volume}{2} b@12: % Only the "2" would show up in the document, but the LaTeX \bibinfo command b@12: % could do additional things with the information. IEEEtran.bst does provide b@12: % a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is b@12: % currently not used as the bogus bibinfo functions defined here output the b@12: % entry values directly without the \bibinfo wrapper. The bibinfo functions b@12: % themselves (and the calls to them) are retained for possible future use. b@12: % b@12: % bibinfo.check avoids acting on missing fields while bibinfo.warn will b@12: % issue a warning message if a missing field is detected. Prior to calling b@12: % the bibinfo functions, the user should push the field value and then its b@12: % name string, in that order. b@12: b@12: FUNCTION {bibinfo.check} b@12: { swap$ duplicate$ missing$ b@12: { pop$ pop$ "" } b@12: { duplicate$ empty$ b@12: { swap$ pop$ } b@12: { swap$ pop$ } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {bibinfo.warn} b@12: { swap$ duplicate$ missing$ b@12: { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" } b@12: { duplicate$ empty$ b@12: { swap$ "empty " swap$ * " in " * cite$ * warning$ } b@12: { swap$ pop$ } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: b@12: % IEEE separates large numbers with more than 4 digits into groups of b@12: % three. IEEE uses a small space to separate these number groups. b@12: % Typical applications include patent and page numbers. b@12: b@12: % number of consecutive digits required to trigger the group separation. b@12: FUNCTION {large.number.trigger}{ #5 } b@12: b@12: % For numbers longer than the trigger, this is the blocksize of the groups. b@12: % The blocksize must be less than the trigger threshold, and 2 * blocksize b@12: % must be greater than the trigger threshold (can't do more than one b@12: % separation on the initial trigger). b@12: FUNCTION {large.number.blocksize}{ #3 } b@12: b@12: % What is actually inserted between the number groups. b@12: FUNCTION {large.number.separator}{ "\," } b@12: b@12: % So as to save on integer variables by reusing existing ones, numnames b@12: % holds the current number of consecutive digits read and nameptr holds b@12: % the number that will trigger an inserted space. b@12: FUNCTION {large.number.separate} b@12: { 't := b@12: "" b@12: #0 'numnames := b@12: large.number.trigger 'nameptr := b@12: { t empty$ not } b@12: { t #-1 #1 substring$ is.num b@12: { numnames #1 + 'numnames := } b@12: { #0 'numnames := b@12: large.number.trigger 'nameptr := b@12: } b@12: if$ b@12: t #-1 #1 substring$ swap$ * b@12: t #-2 global.max$ substring$ 't := b@12: numnames nameptr = b@12: { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$ b@12: nameptr large.number.blocksize - #1 + global.max$ substring$ b@12: large.number.separator swap$ * * b@12: nameptr large.number.blocksize - 'numnames := b@12: large.number.blocksize #1 + 'nameptr := b@12: } b@12: { skip$ } b@12: if$ b@12: } b@12: while$ b@12: } b@12: b@12: % Converts all single dashes "-" to double dashes "--". b@12: FUNCTION {n.dashify} b@12: { large.number.separate b@12: 't := b@12: "" b@12: { t empty$ not } b@12: { t #1 #1 substring$ "-" = b@12: { t #1 #2 substring$ "--" = not b@12: { "--" * b@12: t #2 global.max$ substring$ 't := b@12: } b@12: { { t #1 #1 substring$ "-" = } b@12: { "-" * b@12: t #2 global.max$ substring$ 't := b@12: } b@12: while$ b@12: } b@12: if$ b@12: } b@12: { t #1 #1 substring$ * b@12: t #2 global.max$ substring$ 't := b@12: } b@12: if$ b@12: } b@12: while$ b@12: } b@12: b@12: b@12: % This function detects entries with names that are identical to that of b@12: % the previous entry and replaces the repeated names with dashes (if the b@12: % "is.dash.repeated.names" user control is nonzero). b@12: FUNCTION {name.or.dash} b@12: { 's := b@12: oldname empty$ b@12: { s 'oldname := s } b@12: { s oldname = b@12: { is.dash.repeated.names b@12: { repeated.name.dashes } b@12: { s 'oldname := s } b@12: if$ b@12: } b@12: { s 'oldname := s } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: % Converts the number string on the top of the stack to b@12: % "numerical ordinal form" (e.g., "7" to "7th"). There is b@12: % no artificial limit to the upper bound of the numbers as the b@12: % least significant digit always determines the ordinal form. b@12: FUNCTION {num.to.ordinal} b@12: { duplicate$ #-1 #1 substring$ "1" = b@12: { bbl.st * } b@12: { duplicate$ #-1 #1 substring$ "2" = b@12: { bbl.nd * } b@12: { duplicate$ #-1 #1 substring$ "3" = b@12: { bbl.rd * } b@12: { bbl.th * } b@12: if$ b@12: } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: % If the string on the top of the stack begins with a number, b@12: % (e.g., 11th) then replace the string with the leading number b@12: % it contains. Otherwise retain the string as-is. s holds the b@12: % extracted number, t holds the part of the string that remains b@12: % to be scanned. b@12: FUNCTION {extract.num} b@12: { duplicate$ 't := b@12: "" 's := b@12: { t empty$ not } b@12: { t #1 #1 substring$ b@12: t #2 global.max$ substring$ 't := b@12: duplicate$ is.num b@12: { s swap$ * 's := } b@12: { pop$ "" 't := } b@12: if$ b@12: } b@12: while$ b@12: s empty$ b@12: 'skip$ b@12: { pop$ s } b@12: if$ b@12: } b@12: b@12: % Converts the word number string on the top of the stack to b@12: % Arabic string form. Will be successful up to "tenth". b@12: FUNCTION {word.to.num} b@12: { duplicate$ "l" change.case$ 's := b@12: s "first" = b@12: { pop$ "1" } b@12: { skip$ } b@12: if$ b@12: s "second" = b@12: { pop$ "2" } b@12: { skip$ } b@12: if$ b@12: s "third" = b@12: { pop$ "3" } b@12: { skip$ } b@12: if$ b@12: s "fourth" = b@12: { pop$ "4" } b@12: { skip$ } b@12: if$ b@12: s "fifth" = b@12: { pop$ "5" } b@12: { skip$ } b@12: if$ b@12: s "sixth" = b@12: { pop$ "6" } b@12: { skip$ } b@12: if$ b@12: s "seventh" = b@12: { pop$ "7" } b@12: { skip$ } b@12: if$ b@12: s "eighth" = b@12: { pop$ "8" } b@12: { skip$ } b@12: if$ b@12: s "ninth" = b@12: { pop$ "9" } b@12: { skip$ } b@12: if$ b@12: s "tenth" = b@12: { pop$ "10" } b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: b@12: % Converts the string on the top of the stack to numerical b@12: % ordinal (e.g., "11th") form. b@12: FUNCTION {convert.edition} b@12: { duplicate$ empty$ 'skip$ b@12: { duplicate$ #1 #1 substring$ is.num b@12: { extract.num b@12: num.to.ordinal b@12: } b@12: { word.to.num b@12: duplicate$ #1 #1 substring$ is.num b@12: { num.to.ordinal } b@12: { "edition ordinal word " quote$ * edition * quote$ * b@12: " may be too high (or improper) for conversion" * " in " * cite$ * warning$ b@12: } b@12: if$ b@12: } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: %% LATEX BIBLIOGRAPHY CODE %% b@12: %%%%%%%%%%%%%%%%%%%%%%%%%%%%% b@12: b@12: FUNCTION {start.entry} b@12: { newline$ b@12: "\bibitem{" write$ b@12: cite$ write$ b@12: "}" write$ b@12: newline$ b@12: "" b@12: initialize.prev.this.status b@12: } b@12: b@12: % Here we write out all the LaTeX code that we will need. The most involved b@12: % code sequences are those that control the alternate interword spacing and b@12: % foreign language hyphenation patterns. The heavy use of \providecommand b@12: % gives users a way to override the defaults. Special thanks to Javier Bezos, b@12: % Johannes Braams, Robin Fairbairns, Heiko Oberdiek, Donald Arseneau and all b@12: % the other gurus on comp.text.tex for their help and advice on the topic of b@12: % \selectlanguage, Babel and BibTeX. b@12: FUNCTION {begin.bib} b@12: { "% Generated by IEEEtran.bst, version: " bst.file.version * " (" * bst.file.date * ")" * b@12: write$ newline$ b@12: preamble$ empty$ 'skip$ b@12: { preamble$ write$ newline$ } b@12: if$ b@12: "\begin{thebibliography}{" longest.label * "}" * b@12: write$ newline$ b@12: "\providecommand{\url}[1]{#1}" b@12: write$ newline$ b@12: "\csname url@samestyle\endcsname" b@12: write$ newline$ b@12: "\providecommand{\newblock}{\relax}" b@12: write$ newline$ b@12: "\providecommand{\bibinfo}[2]{#2}" b@12: write$ newline$ b@12: "\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}" b@12: write$ newline$ b@12: "\providecommand{\BIBentryALTinterwordstretchfactor}{" b@12: ALTinterwordstretchfactor * "}" * b@12: write$ newline$ b@12: "\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus " b@12: write$ newline$ b@12: "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}" b@12: write$ newline$ b@12: "\providecommand{\BIBforeignlanguage}[2]{{%" b@12: write$ newline$ b@12: "\expandafter\ifx\csname l@#1\endcsname\relax" b@12: write$ newline$ b@12: "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%" b@12: write$ newline$ b@12: "\typeout{** loaded for the language `#1'. Using the pattern for}%" b@12: write$ newline$ b@12: "\typeout{** the default language instead.}%" b@12: write$ newline$ b@12: "\else" b@12: write$ newline$ b@12: "\language=\csname l@#1\endcsname" b@12: write$ newline$ b@12: "\fi" b@12: write$ newline$ b@12: "#2}}" b@12: write$ newline$ b@12: "\providecommand{\BIBdecl}{\relax}" b@12: write$ newline$ b@12: "\BIBdecl" b@12: write$ newline$ b@12: } b@12: b@12: FUNCTION {end.bib} b@12: { newline$ "\end{thebibliography}" write$ newline$ } b@12: b@12: FUNCTION {if.url.alt.interword.spacing} b@12: { is.use.alt.interword.spacing b@12: {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$} b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: FUNCTION {if.url.std.interword.spacing} b@12: { is.use.alt.interword.spacing b@12: {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$} b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%%%%% b@12: %% LONGEST LABEL PASS %% b@12: %%%%%%%%%%%%%%%%%%%%%%%% b@12: b@12: FUNCTION {initialize.longest.label} b@12: { "" 'longest.label := b@12: #1 'number.label := b@12: #0 'longest.label.width := b@12: } b@12: b@12: FUNCTION {longest.label.pass} b@12: { type$ "ieeetranbstctl" = b@12: { skip$ } b@12: { number.label int.to.str$ 'label := b@12: number.label #1 + 'number.label := b@12: label width$ longest.label.width > b@12: { label 'longest.label := b@12: label width$ 'longest.label.width := b@12: } b@12: { skip$ } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%%% b@12: %% FORMAT HANDLERS %% b@12: %%%%%%%%%%%%%%%%%%%%% b@12: b@12: %% Lower Level Formats (used by higher level formats) b@12: b@12: FUNCTION {format.address.org.or.pub.date} b@12: { 't := b@12: "" b@12: year empty$ b@12: { "empty year in " cite$ * warning$ } b@12: { skip$ } b@12: if$ b@12: address empty$ t empty$ and b@12: year empty$ and month empty$ and b@12: { skip$ } b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: address "address" bibinfo.check * b@12: t empty$ b@12: { skip$ } b@12: { punct.period 'prev.status.punct := b@12: space.large 'prev.status.space := b@12: address empty$ b@12: { skip$ } b@12: { ": " * } b@12: if$ b@12: t * b@12: } b@12: if$ b@12: year empty$ month empty$ and b@12: { skip$ } b@12: { t empty$ address empty$ and b@12: { skip$ } b@12: { ", " * } b@12: if$ b@12: month empty$ b@12: { year empty$ b@12: { skip$ } b@12: { year "year" bibinfo.check * } b@12: if$ b@12: } b@12: { month "month" bibinfo.check * b@12: year empty$ b@12: { skip$ } b@12: { " " * year "year" bibinfo.check * } b@12: if$ b@12: } b@12: if$ b@12: } b@12: if$ b@12: } b@12: if$ b@12: } b@12: b@12: b@12: FUNCTION {format.names} b@12: { 'bibinfo := b@12: duplicate$ empty$ 'skip$ { b@12: this.to.prev.status b@12: this.status.std b@12: 's := b@12: "" 't := b@12: #1 'nameptr := b@12: s num.names$ 'numnames := b@12: numnames 'namesleft := b@12: { namesleft #0 > } b@12: { s nameptr b@12: name.format.string b@12: format.name$ b@12: bibinfo bibinfo.check b@12: 't := b@12: nameptr #1 > b@12: { nameptr num.names.shown.with.forced.et.al #1 + = b@12: numnames max.num.names.before.forced.et.al > b@12: is.forced.et.al and and b@12: { "others" 't := b@12: #1 'namesleft := b@12: } b@12: { skip$ } b@12: if$ b@12: namesleft #1 > b@12: { ", " * t do.name.latex.cmd * } b@12: { s nameptr "{ll}" format.name$ duplicate$ "others" = b@12: { 't := } b@12: { pop$ } b@12: if$ b@12: t "others" = b@12: { " " * bbl.etal emphasize * } b@12: { numnames #2 > b@12: { "," * } b@12: { skip$ } b@12: if$ b@12: bbl.and b@12: space.word * t do.name.latex.cmd * b@12: } b@12: if$ b@12: } b@12: if$ b@12: } b@12: { t do.name.latex.cmd } b@12: if$ b@12: nameptr #1 + 'nameptr := b@12: namesleft #1 - 'namesleft := b@12: } b@12: while$ b@12: cap.status.std b@12: } if$ b@12: } b@12: b@12: b@12: b@12: b@12: %% Higher Level Formats b@12: b@12: %% addresses/locations b@12: b@12: FUNCTION {format.address} b@12: { address duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% author/editor names b@12: b@12: FUNCTION {format.authors}{ author "author" format.names } b@12: b@12: FUNCTION {format.editors} b@12: { editor "editor" format.names duplicate$ empty$ 'skip$ b@12: { ", " * b@12: get.bbl.editor b@12: capitalize b@12: * b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% date b@12: b@12: FUNCTION {format.date} b@12: { b@12: month "month" bibinfo.check duplicate$ empty$ b@12: year "year" bibinfo.check duplicate$ empty$ b@12: { swap$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: "there's a month but no year in " cite$ * warning$ } b@12: if$ b@12: * b@12: } b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: swap$ 'skip$ b@12: { b@12: swap$ b@12: " " * swap$ b@12: } b@12: if$ b@12: * b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.date.electronic} b@12: { month "month" bibinfo.check duplicate$ empty$ b@12: year "year" bibinfo.check duplicate$ empty$ b@12: { swap$ b@12: { pop$ } b@12: { "there's a month but no year in " cite$ * warning$ b@12: pop$ ")" * "(" swap$ * b@12: this.to.prev.status b@12: punct.no 'this.status.punct := b@12: space.normal 'this.status.space := b@12: quote.no 'this.status.quote := b@12: cap.yes 'status.cap := b@12: } b@12: if$ b@12: } b@12: { swap$ b@12: { swap$ pop$ ")" * "(" swap$ * } b@12: { "(" swap$ * ", " * swap$ * ")" * } b@12: if$ b@12: this.to.prev.status b@12: punct.no 'this.status.punct := b@12: space.normal 'this.status.space := b@12: quote.no 'this.status.quote := b@12: cap.yes 'status.cap := b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% edition/title b@12: b@12: % Note: IEEE considers the edition to be closely associated with b@12: % the title of a book. So, in IEEEtran.bst the edition is normally handled b@12: % within the formatting of the title. The format.edition function is b@12: % retained here for possible future use. b@12: FUNCTION {format.edition} b@12: { edition duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: convert.edition b@12: status.cap b@12: { "t" } b@12: { "l" } b@12: if$ change.case$ b@12: "edition" bibinfo.check b@12: "~" * bbl.edition * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: % This is used to format the booktitle of a conference proceedings. b@12: % Here we use the "intype" field to provide the user a way to b@12: % override the word "in" (e.g., with things like "presented at") b@12: % Use of intype stops the emphasis of the booktitle to indicate that b@12: % we no longer mean the written conference proceedings, but the b@12: % conference itself. b@12: FUNCTION {format.in.booktitle} b@12: { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: select.language b@12: intype missing$ b@12: { emphasize b@12: bbl.in " " * b@12: } b@12: { intype " " * } b@12: if$ b@12: swap$ * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: % This is used to format the booktitle of collection. b@12: % Here the "intype" field is not supported, but "edition" is. b@12: FUNCTION {format.in.booktitle.edition} b@12: { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: select.language b@12: emphasize b@12: edition empty$ 'skip$ b@12: { ", " * b@12: edition b@12: convert.edition b@12: "l" change.case$ b@12: * "~" * bbl.edition * b@12: } b@12: if$ b@12: bbl.in " " * swap$ * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.article.title} b@12: { title duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: "t" change.case$ b@12: } b@12: if$ b@12: "title" bibinfo.check b@12: duplicate$ empty$ 'skip$ b@12: { quote.close 'this.status.quote := b@12: is.last.char.not.punct b@12: { punct.std 'this.status.punct := } b@12: { punct.no 'this.status.punct := } b@12: if$ b@12: select.language b@12: "``" swap$ * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.article.title.electronic} b@12: { title duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: "t" change.case$ b@12: } b@12: if$ b@12: "title" bibinfo.check b@12: duplicate$ empty$ b@12: { skip$ } b@12: { select.language } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.book.title.edition} b@12: { title "title" bibinfo.check b@12: duplicate$ empty$ b@12: { "empty title in " cite$ * warning$ } b@12: { this.to.prev.status b@12: this.status.std b@12: select.language b@12: emphasize b@12: edition empty$ 'skip$ b@12: { ", " * b@12: edition b@12: convert.edition b@12: status.cap b@12: { "t" } b@12: { "l" } b@12: if$ b@12: change.case$ b@12: * "~" * bbl.edition * b@12: } b@12: if$ b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.book.title} b@12: { title "title" bibinfo.check b@12: duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: select.language b@12: emphasize b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% journal b@12: b@12: FUNCTION {format.journal} b@12: { journal duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: select.language b@12: emphasize b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% how published b@12: b@12: FUNCTION {format.howpublished} b@12: { howpublished duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% institutions/organization/publishers/school b@12: b@12: FUNCTION {format.institution} b@12: { institution duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.organization} b@12: { organization duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.address.publisher.date} b@12: { publisher "publisher" bibinfo.warn format.address.org.or.pub.date } b@12: b@12: FUNCTION {format.address.publisher.date.nowarn} b@12: { publisher "publisher" bibinfo.check format.address.org.or.pub.date } b@12: b@12: FUNCTION {format.address.organization.date} b@12: { organization "organization" bibinfo.check format.address.org.or.pub.date } b@12: b@12: FUNCTION {format.school} b@12: { school duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% volume/number/series/chapter/pages b@12: b@12: FUNCTION {format.volume} b@12: { volume empty.field.to.null.string b@12: duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: bbl.volume b@12: status.cap b@12: { capitalize } b@12: { skip$ } b@12: if$ b@12: swap$ tie.or.space.prefix b@12: "volume" bibinfo.check b@12: * * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.number} b@12: { number empty.field.to.null.string b@12: duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: status.cap b@12: { bbl.number capitalize } b@12: { bbl.number } b@12: if$ b@12: swap$ tie.or.space.prefix b@12: "number" bibinfo.check b@12: * * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: FUNCTION {format.number.if.use.for.article} b@12: { is.use.number.for.article b@12: { format.number } b@12: { "" } b@12: if$ b@12: } b@12: b@12: % IEEE does not seem to tie the series so closely with the volume b@12: % and number as is done in other bibliography styles. Instead the b@12: % series is treated somewhat like an extension of the title. b@12: FUNCTION {format.series} b@12: { series empty$ b@12: { "" } b@12: { this.to.prev.status b@12: this.status.std b@12: bbl.series " " * b@12: series "series" bibinfo.check * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: b@12: FUNCTION {format.chapter} b@12: { chapter empty$ b@12: { "" } b@12: { this.to.prev.status b@12: this.status.std b@12: type empty$ b@12: { bbl.chapter } b@12: { type "l" change.case$ b@12: "type" bibinfo.check b@12: } b@12: if$ b@12: chapter tie.or.space.prefix b@12: "chapter" bibinfo.check b@12: * * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: b@12: % The intended use of format.paper is for paper numbers of inproceedings. b@12: % The paper type can be overridden via the type field. b@12: % We allow the type to be displayed even if the paper number is absent b@12: % for things like "postdeadline paper" b@12: FUNCTION {format.paper} b@12: { is.use.paper b@12: { paper empty$ b@12: { type empty$ b@12: { "" } b@12: { this.to.prev.status b@12: this.status.std b@12: type "type" bibinfo.check b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: { this.to.prev.status b@12: this.status.std b@12: type empty$ b@12: { bbl.paper } b@12: { type "type" bibinfo.check } b@12: if$ b@12: " " * paper b@12: "paper" bibinfo.check b@12: * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: { "" } b@12: if$ b@12: } b@12: b@12: b@12: FUNCTION {format.pages} b@12: { pages duplicate$ empty$ 'skip$ b@12: { this.to.prev.status b@12: this.status.std b@12: duplicate$ is.multiple.pages b@12: { b@12: bbl.pages swap$ b@12: n.dashify b@12: } b@12: { b@12: bbl.page swap$ b@12: } b@12: if$ b@12: tie.or.space.prefix b@12: "pages" bibinfo.check b@12: * * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% technical report number b@12: b@12: FUNCTION {format.tech.report.number} b@12: { number "number" bibinfo.check b@12: this.to.prev.status b@12: this.status.std b@12: cap.status.std b@12: type duplicate$ empty$ b@12: { pop$ b@12: bbl.techrep b@12: } b@12: { skip$ } b@12: if$ b@12: "type" bibinfo.check b@12: swap$ duplicate$ empty$ b@12: { pop$ } b@12: { tie.or.space.prefix * * } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% note b@12: b@12: FUNCTION {format.note} b@12: { note empty$ b@12: { "" } b@12: { this.to.prev.status b@12: this.status.std b@12: punct.period 'this.status.punct := b@12: note #1 #1 substring$ b@12: duplicate$ "{" = b@12: { skip$ } b@12: { status.cap b@12: { "u" } b@12: { "l" } b@12: if$ b@12: change.case$ b@12: } b@12: if$ b@12: note #2 global.max$ substring$ * "note" bibinfo.check b@12: cap.yes 'status.cap := b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: %% patent b@12: b@12: FUNCTION {format.patent.date} b@12: { this.to.prev.status b@12: this.status.std b@12: year empty$ b@12: { monthfiled duplicate$ empty$ b@12: { "monthfiled" bibinfo.check pop$ "" } b@12: { "monthfiled" bibinfo.check } b@12: if$ b@12: dayfiled duplicate$ empty$ b@12: { "dayfiled" bibinfo.check pop$ "" * } b@12: { "dayfiled" bibinfo.check b@12: monthfiled empty$ b@12: { "dayfiled without a monthfiled in " cite$ * warning$ b@12: * b@12: } b@12: { " " swap$ * * } b@12: if$ b@12: } b@12: if$ b@12: yearfiled empty$ b@12: { "no year or yearfiled in " cite$ * warning$ } b@12: { yearfiled "yearfiled" bibinfo.check b@12: swap$ b@12: duplicate$ empty$ b@12: { pop$ } b@12: { ", " * swap$ * } b@12: if$ b@12: } b@12: if$ b@12: } b@12: { month duplicate$ empty$ b@12: { "month" bibinfo.check pop$ "" } b@12: { "month" bibinfo.check } b@12: if$ b@12: day duplicate$ empty$ b@12: { "day" bibinfo.check pop$ "" * } b@12: { "day" bibinfo.check b@12: month empty$ b@12: { "day without a month in " cite$ * warning$ b@12: * b@12: } b@12: { " " swap$ * * } b@12: if$ b@12: } b@12: if$ b@12: year "year" bibinfo.check b@12: swap$ b@12: duplicate$ empty$ b@12: { pop$ } b@12: { ", " * swap$ * } b@12: if$ b@12: } b@12: if$ b@12: cap.status.std b@12: } b@12: b@12: FUNCTION {format.patent.nationality.type.number} b@12: { this.to.prev.status b@12: this.status.std b@12: nationality duplicate$ empty$ b@12: { "nationality" bibinfo.warn pop$ "" } b@12: { "nationality" bibinfo.check b@12: duplicate$ "l" change.case$ "united states" = b@12: { pop$ bbl.patentUS } b@12: { skip$ } b@12: if$ b@12: " " * b@12: } b@12: if$ b@12: type empty$ b@12: { bbl.patent "type" bibinfo.check } b@12: { type "type" bibinfo.check } b@12: if$ b@12: * b@12: number duplicate$ empty$ b@12: { "number" bibinfo.warn pop$ } b@12: { "number" bibinfo.check b@12: large.number.separate b@12: swap$ " " * swap$ * b@12: } b@12: if$ b@12: cap.status.std b@12: } b@12: b@12: b@12: b@12: %% standard b@12: b@12: FUNCTION {format.organization.institution.standard.type.number} b@12: { this.to.prev.status b@12: this.status.std b@12: organization duplicate$ empty$ b@12: { pop$ b@12: institution duplicate$ empty$ b@12: { "institution" bibinfo.warn } b@12: { "institution" bibinfo.warn " " * } b@12: if$ b@12: } b@12: { "organization" bibinfo.warn " " * } b@12: if$ b@12: type empty$ b@12: { bbl.standard "type" bibinfo.check } b@12: { type "type" bibinfo.check } b@12: if$ b@12: * b@12: number duplicate$ empty$ b@12: { "number" bibinfo.check pop$ } b@12: { "number" bibinfo.check b@12: large.number.separate b@12: swap$ " " * swap$ * b@12: } b@12: if$ b@12: cap.status.std b@12: } b@12: b@12: FUNCTION {format.revision} b@12: { revision empty$ b@12: { "" } b@12: { this.to.prev.status b@12: this.status.std b@12: bbl.revision b@12: revision tie.or.space.prefix b@12: "revision" bibinfo.check b@12: * * b@12: cap.status.std b@12: } b@12: if$ b@12: } b@12: b@12: b@12: %% thesis b@12: b@12: FUNCTION {format.master.thesis.type} b@12: { this.to.prev.status b@12: this.status.std b@12: type empty$ b@12: { b@12: bbl.mthesis b@12: } b@12: { b@12: type "type" bibinfo.check b@12: } b@12: if$ b@12: cap.status.std b@12: } b@12: b@12: FUNCTION {format.phd.thesis.type} b@12: { this.to.prev.status b@12: this.status.std b@12: type empty$ b@12: { b@12: bbl.phdthesis b@12: } b@12: { b@12: type "type" bibinfo.check b@12: } b@12: if$ b@12: cap.status.std b@12: } b@12: b@12: b@12: b@12: %% URL b@12: b@12: FUNCTION {format.url} b@12: { url empty$ b@12: { "" } b@12: { this.to.prev.status b@12: this.status.std b@12: cap.yes 'status.cap := b@12: name.url.prefix " " * b@12: "\url{" * url * "}" * b@12: punct.no 'this.status.punct := b@12: punct.period 'prev.status.punct := b@12: space.normal 'this.status.space := b@12: space.normal 'prev.status.space := b@12: quote.no 'this.status.quote := b@12: } b@12: if$ b@12: } b@12: b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%%% b@12: %% ENTRY HANDLERS %% b@12: %%%%%%%%%%%%%%%%%%%% b@12: b@12: b@12: % Note: In many journals, IEEE (or the authors) tend not to show the number b@12: % for articles, so the display of the number is controlled here by the b@12: % switch "is.use.number.for.article" b@12: FUNCTION {article} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors "author" output.warn b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.journal "journal" bibinfo.check "journal" output.warn b@12: format.volume output b@12: format.number.if.use.for.article output b@12: format.pages output b@12: format.date "year" output.warn b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {book} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: author empty$ b@12: { format.editors "author and editor" output.warn } b@12: { format.authors output.nonnull } b@12: if$ b@12: name.or.dash b@12: format.book.title.edition output b@12: format.series output b@12: author empty$ b@12: { skip$ } b@12: { format.editors output } b@12: if$ b@12: format.address.publisher.date output b@12: format.volume output b@12: format.number output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {booklet} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors output b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.howpublished "howpublished" bibinfo.check output b@12: format.organization "organization" bibinfo.check output b@12: format.address "address" bibinfo.check output b@12: format.date output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {electronic} b@12: { std.status.using.period b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors output b@12: name.or.dash b@12: format.date.electronic output b@12: format.article.title.electronic output b@12: format.howpublished "howpublished" bibinfo.check output b@12: format.organization "organization" bibinfo.check output b@12: format.address "address" bibinfo.check output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: empty.entry.warn b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {inbook} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: author empty$ b@12: { format.editors "author and editor" output.warn } b@12: { format.authors output.nonnull } b@12: if$ b@12: name.or.dash b@12: format.book.title.edition output b@12: format.series output b@12: format.address.publisher.date output b@12: format.volume output b@12: format.number output b@12: format.chapter output b@12: format.pages output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {incollection} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors "author" output.warn b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.in.booktitle.edition "booktitle" output.warn b@12: format.series output b@12: format.editors output b@12: format.address.publisher.date.nowarn output b@12: format.volume output b@12: format.number output b@12: format.chapter output b@12: format.pages output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {inproceedings} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors "author" output.warn b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.in.booktitle "booktitle" output.warn b@12: format.series output b@12: format.editors output b@12: format.volume output b@12: format.number output b@12: publisher empty$ b@12: { format.address.organization.date output } b@12: { format.organization "organization" bibinfo.check output b@12: format.address.publisher.date output b@12: } b@12: if$ b@12: format.paper output b@12: format.pages output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {manual} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors output b@12: name.or.dash b@12: format.book.title.edition "title" output.warn b@12: format.howpublished "howpublished" bibinfo.check output b@12: format.organization "organization" bibinfo.check output b@12: format.address "address" bibinfo.check output b@12: format.date output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {mastersthesis} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors "author" output.warn b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.master.thesis.type output.nonnull b@12: format.school "school" bibinfo.warn output b@12: format.address "address" bibinfo.check output b@12: format.date "year" output.warn b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {misc} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors output b@12: name.or.dash b@12: format.article.title output b@12: format.howpublished "howpublished" bibinfo.check output b@12: format.organization "organization" bibinfo.check output b@12: format.address "address" bibinfo.check output b@12: format.pages output b@12: format.date output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: empty.entry.warn b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {patent} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors output b@12: name.or.dash b@12: format.article.title output b@12: format.patent.nationality.type.number output b@12: format.patent.date output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: empty.entry.warn b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {periodical} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.editors output b@12: name.or.dash b@12: format.book.title "title" output.warn b@12: format.series output b@12: format.volume output b@12: format.number output b@12: format.organization "organization" bibinfo.check output b@12: format.date "year" output.warn b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {phdthesis} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors "author" output.warn b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.phd.thesis.type output.nonnull b@12: format.school "school" bibinfo.warn output b@12: format.address "address" bibinfo.check output b@12: format.date "year" output.warn b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {proceedings} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.editors output b@12: name.or.dash b@12: format.book.title "title" output.warn b@12: format.series output b@12: format.volume output b@12: format.number output b@12: publisher empty$ b@12: { format.address.organization.date output } b@12: { format.organization "organization" bibinfo.check output b@12: format.address.publisher.date output b@12: } b@12: if$ b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {standard} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors output b@12: name.or.dash b@12: format.book.title "title" output.warn b@12: format.howpublished "howpublished" bibinfo.check output b@12: format.organization.institution.standard.type.number output b@12: format.revision output b@12: format.date output b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {techreport} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors "author" output.warn b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.howpublished "howpublished" bibinfo.check output b@12: format.institution "institution" bibinfo.warn output b@12: format.address "address" bibinfo.check output b@12: format.tech.report.number output.nonnull b@12: format.date "year" output.warn b@12: format.note output b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: FUNCTION {unpublished} b@12: { std.status.using.comma b@12: start.entry b@12: if.url.alt.interword.spacing b@12: format.authors "author" output.warn b@12: name.or.dash b@12: format.article.title "title" output.warn b@12: format.date output b@12: format.note "note" output.warn b@12: format.url output b@12: fin.entry b@12: if.url.std.interword.spacing b@12: } b@12: b@12: b@12: % The special entry type which provides the user interface to the b@12: % BST controls b@12: FUNCTION {IEEEtranBSTCTL} b@12: { is.print.banners.to.terminal b@12: { "** IEEEtran BST control entry " quote$ * cite$ * quote$ * " detected." * b@12: top$ b@12: } b@12: { skip$ } b@12: if$ b@12: CTLuse_article_number b@12: empty$ b@12: { skip$ } b@12: { CTLuse_article_number b@12: yes.no.to.int b@12: 'is.use.number.for.article := b@12: } b@12: if$ b@12: CTLuse_paper b@12: empty$ b@12: { skip$ } b@12: { CTLuse_paper b@12: yes.no.to.int b@12: 'is.use.paper := b@12: } b@12: if$ b@12: CTLuse_forced_etal b@12: empty$ b@12: { skip$ } b@12: { CTLuse_forced_etal b@12: yes.no.to.int b@12: 'is.forced.et.al := b@12: } b@12: if$ b@12: CTLmax_names_forced_etal b@12: empty$ b@12: { skip$ } b@12: { CTLmax_names_forced_etal b@12: string.to.integer b@12: 'max.num.names.before.forced.et.al := b@12: } b@12: if$ b@12: CTLnames_show_etal b@12: empty$ b@12: { skip$ } b@12: { CTLnames_show_etal b@12: string.to.integer b@12: 'num.names.shown.with.forced.et.al := b@12: } b@12: if$ b@12: CTLuse_alt_spacing b@12: empty$ b@12: { skip$ } b@12: { CTLuse_alt_spacing b@12: yes.no.to.int b@12: 'is.use.alt.interword.spacing := b@12: } b@12: if$ b@12: CTLalt_stretch_factor b@12: empty$ b@12: { skip$ } b@12: { CTLalt_stretch_factor b@12: 'ALTinterwordstretchfactor := b@12: "\renewcommand{\BIBentryALTinterwordstretchfactor}{" b@12: ALTinterwordstretchfactor * "}" * b@12: write$ newline$ b@12: } b@12: if$ b@12: CTLdash_repeated_names b@12: empty$ b@12: { skip$ } b@12: { CTLdash_repeated_names b@12: yes.no.to.int b@12: 'is.dash.repeated.names := b@12: } b@12: if$ b@12: CTLname_format_string b@12: empty$ b@12: { skip$ } b@12: { CTLname_format_string b@12: 'name.format.string := b@12: } b@12: if$ b@12: CTLname_latex_cmd b@12: empty$ b@12: { skip$ } b@12: { CTLname_latex_cmd b@12: 'name.latex.cmd := b@12: } b@12: if$ b@12: CTLname_url_prefix b@12: missing$ b@12: { skip$ } b@12: { CTLname_url_prefix b@12: 'name.url.prefix := b@12: } b@12: if$ b@12: b@12: b@12: num.names.shown.with.forced.et.al max.num.names.before.forced.et.al > b@12: { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$ b@12: max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al := b@12: } b@12: { skip$ } b@12: if$ b@12: } b@12: b@12: b@12: %%%%%%%%%%%%%%%%%%% b@12: %% ENTRY ALIASES %% b@12: %%%%%%%%%%%%%%%%%%% b@12: FUNCTION {conference}{inproceedings} b@12: FUNCTION {online}{electronic} b@12: FUNCTION {internet}{electronic} b@12: FUNCTION {webpage}{electronic} b@12: FUNCTION {www}{electronic} b@12: FUNCTION {default.type}{misc} b@12: b@12: b@12: b@12: %%%%%%%%%%%%%%%%%% b@12: %% MAIN PROGRAM %% b@12: %%%%%%%%%%%%%%%%%% b@12: b@12: READ b@12: b@12: EXECUTE {initialize.controls} b@12: EXECUTE {initialize.status.constants} b@12: EXECUTE {banner.message} b@12: b@12: EXECUTE {initialize.longest.label} b@12: ITERATE {longest.label.pass} b@12: b@12: EXECUTE {begin.bib} b@12: ITERATE {call.type$} b@12: EXECUTE {end.bib} b@12: b@12: EXECUTE{completed.message} b@12: b@12: b@12: %% That's all folks, mds.