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