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