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