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