3 %% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted)
4 %% Version 1.13 (2008/09/30)
6 %% Copyright (c) 2003-2008 Michael Shell
8 %% Original starting code base and algorithms obtained from the output of
9 %% Patrick W. Daly's makebst package as well as from prior versions of
10 %% IEEE BibTeX styles:
12 %% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988)
13 %% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993)
16 %% http://www.michaelshell.org/tex/ieeetran/
17 %% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
19 %% http://www.ieee.org/
21 %% For use with BibTeX version 0.99a or later
23 %% This is a numerical citation style.
25 %%*************************************************************************
27 %% This code is offered as-is without any warranty either expressed or
28 %% implied; without even the implied warranty of MERCHANTABILITY or
29 %% FITNESS FOR A PARTICULAR PURPOSE!
30 %% User assumes all risk.
31 %% In no event shall IEEE or any contributor to this code be liable for
32 %% any damages or losses, including, but not limited to, incidental,
33 %% consequential, or any other damages, resulting from the use or misuse
34 %% of any information contained here.
36 %% All comments are the opinions of their respective authors and are not
37 %% necessarily endorsed by the IEEE.
39 %% This work is distributed under the LaTeX Project Public License (LPPL)
40 %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
41 %% distributed and modified. A copy of the LPPL, version 1.3, is included
42 %% in the base LaTeX documentation of all distributions of LaTeX released
43 %% 2003/12/01 or later.
44 %% Retain all contribution notices and credits.
45 %% ** Modified files should be clearly indicated as such, including **
46 %% ** renaming them and changing author support contact information. **
48 %% File list of work: IEEEabrv.bib, IEEEfull.bib, IEEEexample.bib,
49 %% IEEEtran.bst, IEEEtranS.bst, IEEEtranSA.bst,
50 %% IEEEtranN.bst, IEEEtranSN.bst, IEEEtran_bst_HOWTO.pdf
51 %%*************************************************************************
56 % 1.00 (2002/08/13) Initial release
59 % 1. Corrected minor bug for improperly formed warning message when a
60 % book was not given a title. Thanks to Ming Kin Lai for reporting this.
61 % 2. Added support for CTLname_format_string and CTLname_latex_cmd fields
62 % in the BST control entry type.
65 % 1. Fixed bug with URLs containing underscores when using url.sty. Thanks
66 % to Ming Kin Lai for reporting this.
69 % 1. Fixed bug with unwanted comma before "et al." when an entry contained
70 % more than two author names. Thanks to Pallav Gupta for reporting this.
71 % 2. Fixed bug with anomalous closing quote in tech reports that have a
72 % type, but without a number or address. Thanks to Mehrdad Mirreza for
74 % 3. Use braces in \providecommand in begin.bib to better support
75 % latex2html. TeX style length assignments OK with recent versions
76 % of latex2html - 1.71 (2002/2/1) or later is strongly recommended.
77 % Use of the language field still causes trouble with latex2html.
78 % Thanks to Federico Beffa for reporting this.
79 % 4. Added IEEEtran.bst ID and version comment string to .bbl output.
80 % 5. Provide a \BIBdecl hook that allows the user to execute commands
81 % just prior to the first entry.
82 % 6. Use default urlstyle (is using url.sty) of "same" rather than rm to
83 % better work with a wider variety of bibliography styles.
84 % 7. Changed month abbreviations from Sept., July and June to Sep., Jul.,
85 % and Jun., respectively, as IEEE now does. Thanks to Moritz Borgmann
87 % 8. Control entry types should not be considered when calculating longest
89 % 9. Added alias www for electronic/online.
90 % 10. Added CTLname_url_prefix control entry type.
93 % 1. Fixed bug with edition number to ordinal conversion. Thanks to
94 % Michael Roland for reporting this and correcting the algorithm.
97 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
98 %% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %%
99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
101 % These are the defaults for the user adjustable controls. The values used
102 % here can be overridden by the user via IEEEtranBSTCTL entry type.
104 % NOTE: The recommended LaTeX command to invoke a control entry type is:
107 %\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
108 %\def\@bstctlcite[#1]#2{\@bsphack
109 % \@for\@citeb:=#2\do{%
110 % \edef\@citeb{\expandafter\@firstofone\@citeb}%
111 % \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
115 % It is called at the start of the document, before the first \cite, like:
116 % \bstctlcite{IEEEexample:BSTcontrol}
118 % IEEEtran.cls V1.6 and later does provide this command.
122 % #0 turns off the display of the number for articles.
124 FUNCTION {default.is.use.number.for.article} { #1 }
127 % #0 turns off the display of the paper and type fields in @inproceedings.
129 FUNCTION {default.is.use.paper} { #1 }
132 % #0 turns off the forced use of "et al."
134 FUNCTION {default.is.forced.et.al} { #0 }
136 % The maximum number of names that can be present beyond which an "et al."
137 % usage is forced. Be sure that num.names.shown.with.forced.et.al (below)
138 % is not greater than this value!
139 % Note: There are many instances of references in IEEE journals which have
140 % a very large number of authors as well as instances in which "et al." is
142 FUNCTION {default.max.num.names.before.forced.et.al} { #10 }
144 % The number of names that will be shown with a forced "et al.".
145 % Must be less than or equal to max.num.names.before.forced.et.al
146 FUNCTION {default.num.names.shown.with.forced.et.al} { #1 }
149 % #0 turns off the alternate interword spacing for entries with URLs.
151 FUNCTION {default.is.use.alt.interword.spacing} { #1 }
153 % If alternate interword spacing for entries with URLs is enabled, this is
154 % the interword spacing stretch factor that will be used. For example, the
155 % default "4" here means that the interword spacing in entries with URLs can
156 % stretch to four times normal. Does not have to be an integer. Note that
157 % the value specified here can be overridden by the user in their LaTeX
158 % code via a command such as:
159 % "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to
160 % that via the IEEEtranBSTCTL entry type.
161 FUNCTION {default.ALTinterwordstretchfactor} { "4" }
164 % #0 turns off the "dashification" of repeated (i.e., identical to those
165 % of the previous entry) names. IEEE normally does this.
167 FUNCTION {default.is.dash.repeated.names} { #1 }
170 % The default name format control string.
171 FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" }
174 % The default LaTeX font command for the names.
175 FUNCTION {default.name.latex.cmd}{ "" }
178 % The default URL prefix.
179 FUNCTION {default.name.url.prefix}{ "[Online]. Available:" }
182 % Other controls that cannot be accessed via IEEEtranBSTCTL entry type.
184 % #0 turns off the terminal startup banner/completed message so as to
185 % operate more quietly.
187 FUNCTION {is.print.banners.to.terminal} { #1 }
192 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
193 %% FILE VERSION AND BANNER %%
194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
196 FUNCTION{bst.file.version} { "1.13" }
197 FUNCTION{bst.file.date} { "2008/09/30" }
198 FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" }
200 FUNCTION {banner.message}
201 { is.print.banners.to.terminal
202 { "-- IEEEtran.bst version" " " * bst.file.version *
203 " (" * bst.file.date * ") " * "by Michael Shell." *
205 "-- " bst.file.website *
207 "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." *
214 FUNCTION {completed.message}
215 { is.print.banners.to.terminal
228 %%%%%%%%%%%%%%%%%%%%%%
229 %% STRING CONSTANTS %%
230 %%%%%%%%%%%%%%%%%%%%%%
232 FUNCTION {bbl.and}{ "and" }
233 FUNCTION {bbl.etal}{ "et~al." }
234 FUNCTION {bbl.editors}{ "eds." }
235 FUNCTION {bbl.editor}{ "ed." }
236 FUNCTION {bbl.edition}{ "ed." }
237 FUNCTION {bbl.volume}{ "vol." }
238 FUNCTION {bbl.of}{ "of" }
239 FUNCTION {bbl.number}{ "no." }
240 FUNCTION {bbl.in}{ "in" }
241 FUNCTION {bbl.pages}{ "pp." }
242 FUNCTION {bbl.page}{ "p." }
243 FUNCTION {bbl.chapter}{ "ch." }
244 FUNCTION {bbl.paper}{ "paper" }
245 FUNCTION {bbl.part}{ "pt." }
246 FUNCTION {bbl.patent}{ "Patent" }
247 FUNCTION {bbl.patentUS}{ "U.S." }
248 FUNCTION {bbl.revision}{ "Rev." }
249 FUNCTION {bbl.series}{ "ser." }
250 FUNCTION {bbl.standard}{ "Std." }
251 FUNCTION {bbl.techrep}{ "Tech. Rep." }
252 FUNCTION {bbl.mthesis}{ "Master's thesis" }
253 FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" }
254 FUNCTION {bbl.st}{ "st" }
255 FUNCTION {bbl.nd}{ "nd" }
256 FUNCTION {bbl.rd}{ "rd" }
257 FUNCTION {bbl.th}{ "th" }
260 % This is the LaTeX spacer that is used when a larger than normal space
261 % is called for (such as just before the address:publisher).
262 FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " }
264 % The LaTeX code for dashes that are used to represent repeated names.
265 % Note: Some older IEEE journals used something like
266 % "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along
267 % the baseline. However, IEEE now uses a thinner, above baseline,
268 % six dash long sequence.
269 FUNCTION {repeated.name.dashes} { "------" }
273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
274 %% PREDEFINED STRING MACROS %%
275 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
330 CTLuse_article_number
333 CTLmax_names_forced_etal
336 CTLalt_stretch_factor
337 CTLdash_repeated_names
338 CTLname_format_string
348 %%%%%%%%%%%%%%%%%%%%%%%
349 %% INTEGER VARIABLES %%
350 %%%%%%%%%%%%%%%%%%%%%%%
352 INTEGERS { prev.status.punct this.status.punct punct.std
353 punct.no punct.comma punct.period
354 prev.status.space this.status.space space.std
355 space.no space.normal space.large
356 prev.status.quote this.status.quote quote.std
358 prev.status.nline this.status.nline nline.std
359 nline.no nline.newblock
363 INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames }
365 INTEGERS { is.use.number.for.article
368 max.num.names.before.forced.et.al
369 num.names.shown.with.forced.et.al
370 is.use.alt.interword.spacing
371 is.dash.repeated.names}
374 %%%%%%%%%%%%%%%%%%%%%%
375 %% STRING VARIABLES %%
376 %%%%%%%%%%%%%%%%%%%%%%
383 ALTinterwordstretchfactor
391 %%%%%%%%%%%%%%%%%%%%%%%%%
392 %% LOW LEVEL FUNCTIONS %%
393 %%%%%%%%%%%%%%%%%%%%%%%%%
395 FUNCTION {initialize.controls}
396 { default.is.use.number.for.article 'is.use.number.for.article :=
397 default.is.use.paper 'is.use.paper :=
398 default.is.forced.et.al 'is.forced.et.al :=
399 default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al :=
400 default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al :=
401 default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing :=
402 default.is.dash.repeated.names 'is.dash.repeated.names :=
403 default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor :=
404 default.name.format.string 'name.format.string :=
405 default.name.latex.cmd 'name.latex.cmd :=
406 default.name.url.prefix 'name.url.prefix :=
410 % This IEEEtran.bst features a very powerful and flexible mechanism for
411 % controlling the capitalization, punctuation, spacing, quotation, and
412 % newlines of the formatted entry fields. (Note: IEEEtran.bst does not need
413 % or use the newline/newblock feature, but it has been implemented for
414 % possible future use.) The output states of IEEEtran.bst consist of
415 % multiple independent attributes and, as such, can be thought of as being
416 % vectors, rather than the simple scalar values ("before.all",
417 % "mid.sentence", etc.) used in most other .bst files.
419 % The more flexible and complex design used here was motivated in part by
420 % IEEE's rather unusual bibliography style. For example, IEEE ends the
421 % previous field item with a period and large space prior to the publisher
422 % address; the @electronic entry types use periods as inter-item punctuation
423 % rather than the commas used by the other entry types; and URLs are never
424 % followed by periods even though they are the last item in the entry.
425 % Although it is possible to accommodate these features with the conventional
426 % output state system, the seemingly endless exceptions make for convoluted,
427 % unreliable and difficult to maintain code.
429 % IEEEtran.bst's output state system can be easily understood via a simple
430 % illustration of two most recently formatted entry fields (on the stack):
435 % which, in this example, is to eventually appear in the bibliography as:
437 % "PREVIOUS_ITEM," CURRENT_ITEM
439 % It is the job of the output routine to take the previous item off of the
440 % stack (while leaving the current item at the top of the stack), apply its
441 % trailing punctuation (including closing quote marks) and spacing, and then
442 % to write the result to BibTeX's output buffer:
446 % Punctuation (and spacing) between items is often determined by both of the
447 % items rather than just the first one. The presence of quotation marks
448 % further complicates the situation because, in standard English, trailing
449 % punctuation marks are supposed to be contained within the quotes.
451 % IEEEtran.bst maintains two output state (aka "status") vectors which
452 % correspond to the previous and current (aka "this") items. Each vector
453 % consists of several independent attributes which track punctuation,
454 % spacing, quotation, and newlines. Capitalization status is handled by a
455 % separate scalar because the format routines, not the output routine,
456 % handle capitalization and, therefore, there is no need to maintain the
457 % capitalization attribute for both the "previous" and "this" items.
459 % When a format routine adds a new item, it copies the current output status
460 % vector to the previous output status vector and (usually) resets the
461 % current (this) output status vector to a "standard status" vector. Using a
462 % "standard status" vector in this way allows us to redefine what we mean by
463 % "standard status" at the start of each entry handler and reuse the same
464 % format routines under the various inter-item separation schemes. For
465 % example, the standard status vector for the @book entry type may use
466 % commas for item separators, while the @electronic type may use periods,
467 % yet both entry handlers exploit many of the exact same format routines.
469 % Because format routines have write access to the output status vector of
470 % the previous item, they can override the punctuation choices of the
471 % previous format routine! Therefore, it becomes trivial to implement rules
472 % such as "Always use a period and a large space before the publisher." By
473 % pushing the generation of the closing quote mark to the output routine, we
474 % avoid all the problems caused by having to close a quote before having all
475 % the information required to determine what the punctuation should be.
477 % The IEEEtran.bst output state system can easily be expanded if needed.
478 % For instance, it is easy to add a "space.tie" attribute value if the
479 % bibliography rules mandate that two items have to be joined with an
482 FUNCTION {initialize.status.constants}
494 #1 'nline.newblock :=
497 FUNCTION {std.status.using.comma}
498 { punct.comma 'punct.std :=
499 space.normal 'space.std :=
500 quote.no 'quote.std :=
501 nline.no 'nline.std :=
505 FUNCTION {std.status.using.period}
506 { punct.period 'punct.std :=
507 space.normal 'space.std :=
508 quote.no 'quote.std :=
509 nline.no 'nline.std :=
513 FUNCTION {initialize.prev.this.status}
514 { punct.no 'prev.status.punct :=
515 space.no 'prev.status.space :=
516 quote.no 'prev.status.quote :=
517 nline.no 'prev.status.nline :=
518 punct.no 'this.status.punct :=
519 space.no 'this.status.space :=
520 quote.no 'this.status.quote :=
521 nline.no 'this.status.nline :=
522 cap.yes 'status.cap :=
525 FUNCTION {this.status.std}
526 { punct.std 'this.status.punct :=
527 space.std 'this.status.space :=
528 quote.std 'this.status.quote :=
529 nline.std 'this.status.nline :=
532 FUNCTION {cap.status.std}{ cap.std 'status.cap := }
534 FUNCTION {this.to.prev.status}
535 { this.status.punct 'prev.status.punct :=
536 this.status.space 'prev.status.space :=
537 this.status.quote 'prev.status.quote :=
538 this.status.nline 'prev.status.nline :=
561 % convert the strings "yes" or "no" to #1 or #0 respectively
562 FUNCTION {yes.no.to.int}
563 { "l" change.case$ duplicate$
568 { "unknown boolean " quote$ * swap$ * quote$ *
569 " in " * cite$ * warning$
578 % pushes true if the single char string on the stack is in the
579 % range of "0" to "9"
582 duplicate$ "0" chr.to.int$ < not
583 swap$ "9" chr.to.int$ > not and
586 % multiplies the integer on the stack by a factor of 10
587 FUNCTION {bump.int.mag}
599 % converts a single character string on the stack to an integer
600 FUNCTION {char.to.integer}
603 { chr.to.int$ "0" chr.to.int$ - }
604 {"noninteger character " quote$ * swap$ * quote$ *
605 " in integer field of " * cite$ * warning$
611 % converts a string on the stack to an integer
612 FUNCTION {string.to.integer}
613 { duplicate$ text.length$ 'namesleft :=
616 { nameptr namesleft > not }
617 { duplicate$ nameptr #1 substring$
618 char.to.integer numnames bump.int.mag +
631 % The output routines write out the *next* to the top (previous) item on the
632 % stack, adding punctuation and such as needed. Since IEEEtran.bst maintains
633 % the output status for the top two items on the stack, these output
634 % routines have to consider the previous output status (which corresponds to
635 % the item that is being output). Full independent control of punctuation,
636 % closing quote marks, spacing, and newblock is provided.
638 % "output.nonnull" does not check for the presence of a previous empty
641 % "output" does check for the presence of a previous empty item and will
642 % remove an empty item rather than outputing it.
644 % "output.warn" is like "output", but will issue a warning if it detects
647 FUNCTION {output.nonnull}
649 prev.status.punct punct.comma =
653 prev.status.punct punct.period =
657 prev.status.quote quote.close =
661 prev.status.space space.normal =
665 prev.status.space space.large =
670 prev.status.nline nline.newblock =
671 { newline$ "\newblock " write$ }
683 FUNCTION {output.warn}
686 { pop$ "empty " t * " in " * cite$ * warning$ }
691 % "fin.entry" is the output routine that handles the last item of the entry
692 % (which will be on the top of the stack when "fin.entry" is called).
695 { this.status.punct punct.no =
699 this.status.quote quote.close =
708 FUNCTION {is.last.char.not.punct}
711 #-1 #1 substring$ "." =
714 FUNCTION {is.multiple.pages}
723 swap$ duplicate$ "," =
726 { #1 'multiresult := }
727 { t #2 global.max$ substring$ 't := }
734 FUNCTION {capitalize}{ "u" change.case$ "t" change.case$ }
739 { "\emph{" swap$ * "}" * }
743 FUNCTION {do.name.latex.cmd}
747 { name.latex.cmd "{" * swap$ * "}" * }
751 % IEEEtran.bst uses its own \BIBforeignlanguage command which directly
752 % invokes the TeX hyphenation patterns without the need of the Babel
753 % package. Babel does a lot more than switch hyphenation patterns and
754 % its loading can cause unintended effects in many class files (such as
756 FUNCTION {select.language}
757 { duplicate$ empty$ 'pop$
758 { language empty$ 'skip$
759 { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * }
765 FUNCTION {tie.or.space.prefix}
766 { duplicate$ text.length$ #3 <
773 FUNCTION {get.bbl.editor}
774 { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
776 FUNCTION {space.word}{ " " swap$ * " " * }
779 % Field Conditioners, Converters, Checkers and External Interfaces
781 FUNCTION {empty.field.to.null.string}
788 FUNCTION {either.or.check}
791 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
795 FUNCTION {empty.entry.warn}
796 { author empty$ title empty$ howpublished empty$
797 month empty$ year empty$ note empty$ url empty$
798 and and and and and and
799 { "all relevant fields are empty in " cite$ * warning$ }
805 % The bibinfo system provides a way for the electronic parsing/acquisition
806 % of a bibliography's contents as is done by ReVTeX. For example, a field
807 % could be entered into the bibliography as:
808 % \bibinfo{volume}{2}
809 % Only the "2" would show up in the document, but the LaTeX \bibinfo command
810 % could do additional things with the information. IEEEtran.bst does provide
811 % a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is
812 % currently not used as the bogus bibinfo functions defined here output the
813 % entry values directly without the \bibinfo wrapper. The bibinfo functions
814 % themselves (and the calls to them) are retained for possible future use.
816 % bibinfo.check avoids acting on missing fields while bibinfo.warn will
817 % issue a warning message if a missing field is detected. Prior to calling
818 % the bibinfo functions, the user should push the field value and then its
819 % name string, in that order.
821 FUNCTION {bibinfo.check}
822 { swap$ duplicate$ missing$
832 FUNCTION {bibinfo.warn}
833 { swap$ duplicate$ missing$
834 { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" }
836 { swap$ "empty " swap$ * " in " * cite$ * warning$ }
844 % IEEE separates large numbers with more than 4 digits into groups of
845 % three. IEEE uses a small space to separate these number groups.
846 % Typical applications include patent and page numbers.
848 % number of consecutive digits required to trigger the group separation.
849 FUNCTION {large.number.trigger}{ #5 }
851 % For numbers longer than the trigger, this is the blocksize of the groups.
852 % The blocksize must be less than the trigger threshold, and 2 * blocksize
853 % must be greater than the trigger threshold (can't do more than one
854 % separation on the initial trigger).
855 FUNCTION {large.number.blocksize}{ #3 }
857 % What is actually inserted between the number groups.
858 FUNCTION {large.number.separator}{ "\," }
860 % So as to save on integer variables by reusing existing ones, numnames
861 % holds the current number of consecutive digits read and nameptr holds
862 % the number that will trigger an inserted space.
863 FUNCTION {large.number.separate}
867 large.number.trigger 'nameptr :=
869 { t #-1 #1 substring$ is.num
870 { numnames #1 + 'numnames := }
872 large.number.trigger 'nameptr :=
875 t #-1 #1 substring$ swap$ *
876 t #-2 global.max$ substring$ 't :=
878 { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$
879 nameptr large.number.blocksize - #1 + global.max$ substring$
880 large.number.separator swap$ * *
881 nameptr large.number.blocksize - 'numnames :=
882 large.number.blocksize #1 + 'nameptr :=
890 % Converts all single dashes "-" to double dashes "--".
892 { large.number.separate
896 { t #1 #1 substring$ "-" =
897 { t #1 #2 substring$ "--" = not
899 t #2 global.max$ substring$ 't :=
901 { { t #1 #1 substring$ "-" = }
903 t #2 global.max$ substring$ 't :=
909 { t #1 #1 substring$ *
910 t #2 global.max$ substring$ 't :=
918 % This function detects entries with names that are identical to that of
919 % the previous entry and replaces the repeated names with dashes (if the
920 % "is.dash.repeated.names" user control is nonzero).
921 FUNCTION {name.or.dash}
926 { is.dash.repeated.names
927 { repeated.name.dashes }
937 % Converts the number string on the top of the stack to
938 % "numerical ordinal form" (e.g., "7" to "7th"). There is
939 % no artificial limit to the upper bound of the numbers as the
940 % two least significant digits determine the ordinal form.
941 FUNCTION {num.to.ordinal}
942 { duplicate$ #-2 #1 substring$ "1" =
944 { duplicate$ #-1 #1 substring$ "1" =
946 { duplicate$ #-1 #1 substring$ "2" =
948 { duplicate$ #-1 #1 substring$ "3" =
960 % If the string on the top of the stack begins with a number,
961 % (e.g., 11th) then replace the string with the leading number
962 % it contains. Otherwise retain the string as-is. s holds the
963 % extracted number, t holds the part of the string that remains
965 FUNCTION {extract.num}
970 t #2 global.max$ substring$ 't :=
983 % Converts the word number string on the top of the stack to
984 % Arabic string form. Will be successful up to "tenth".
985 FUNCTION {word.to.num}
986 { duplicate$ "l" change.case$ 's :=
1030 % Converts the string on the top of the stack to numerical
1031 % ordinal (e.g., "11th") form.
1032 FUNCTION {convert.edition}
1033 { duplicate$ empty$ 'skip$
1034 { duplicate$ #1 #1 substring$ is.num
1039 duplicate$ #1 #1 substring$ is.num
1041 { "edition ordinal word " quote$ * edition * quote$ *
1042 " may be too high (or improper) for conversion" * " in " * cite$ * warning$
1054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1055 %% LATEX BIBLIOGRAPHY CODE %%
1056 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1058 FUNCTION {start.entry}
1065 initialize.prev.this.status
1068 % Here we write out all the LaTeX code that we will need. The most involved
1069 % code sequences are those that control the alternate interword spacing and
1070 % foreign language hyphenation patterns. The heavy use of \providecommand
1071 % gives users a way to override the defaults. Special thanks to Javier Bezos,
1072 % Johannes Braams, Robin Fairbairns, Heiko Oberdiek, Donald Arseneau and all
1073 % the other gurus on comp.text.tex for their help and advice on the topic of
1074 % \selectlanguage, Babel and BibTeX.
1075 FUNCTION {begin.bib}
1076 { "% Generated by IEEEtran.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
1078 preamble$ empty$ 'skip$
1079 { preamble$ write$ newline$ }
1081 "\begin{thebibliography}{" longest.label * "}" *
1083 "\providecommand{\url}[1]{#1}"
1085 "\csname url@samestyle\endcsname"
1087 "\providecommand{\newblock}{\relax}"
1089 "\providecommand{\bibinfo}[2]{#2}"
1091 "\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}"
1093 "\providecommand{\BIBentryALTinterwordstretchfactor}{"
1094 ALTinterwordstretchfactor * "}" *
1096 "\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus "
1098 "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}"
1100 "\providecommand{\BIBforeignlanguage}[2]{{%"
1102 "\expandafter\ifx\csname l@#1\endcsname\relax"
1104 "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%"
1106 "\typeout{** loaded for the language `#1'. Using the pattern for}%"
1108 "\typeout{** the default language instead.}%"
1112 "\language=\csname l@#1\endcsname"
1118 "\providecommand{\BIBdecl}{\relax}"
1125 { newline$ "\end{thebibliography}" write$ newline$ }
1127 FUNCTION {if.url.alt.interword.spacing}
1128 { is.use.alt.interword.spacing
1129 {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$}
1134 FUNCTION {if.url.std.interword.spacing}
1135 { is.use.alt.interword.spacing
1136 {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$}
1144 %%%%%%%%%%%%%%%%%%%%%%%%
1145 %% LONGEST LABEL PASS %%
1146 %%%%%%%%%%%%%%%%%%%%%%%%
1148 FUNCTION {initialize.longest.label}
1149 { "" 'longest.label :=
1151 #0 'longest.label.width :=
1154 FUNCTION {longest.label.pass}
1155 { type$ "ieeetranbstctl" =
1157 { number.label int.to.str$ 'label :=
1158 number.label #1 + 'number.label :=
1159 label width$ longest.label.width >
1160 { label 'longest.label :=
1161 label width$ 'longest.label.width :=
1172 %%%%%%%%%%%%%%%%%%%%%
1173 %% FORMAT HANDLERS %%
1174 %%%%%%%%%%%%%%%%%%%%%
1176 %% Lower Level Formats (used by higher level formats)
1178 FUNCTION {format.address.org.or.pub.date}
1182 { "empty year in " cite$ * warning$ }
1185 address empty$ t empty$ and
1186 year empty$ and month empty$ and
1188 { this.to.prev.status
1191 address "address" bibinfo.check *
1194 { punct.period 'prev.status.punct :=
1195 space.large 'prev.status.space :=
1203 year empty$ month empty$ and
1205 { t empty$ address empty$ and
1212 { year "year" bibinfo.check * }
1215 { month "month" bibinfo.check *
1218 { " " * year "year" bibinfo.check * }
1229 FUNCTION {format.names}
1231 duplicate$ empty$ 'skip$ {
1237 s num.names$ 'numnames :=
1238 numnames 'namesleft :=
1243 bibinfo bibinfo.check
1246 { nameptr num.names.shown.with.forced.et.al #1 + =
1247 numnames max.num.names.before.forced.et.al >
1248 is.forced.et.al and and
1255 { ", " * t do.name.latex.cmd * }
1256 { s nameptr "{ll}" format.name$ duplicate$ "others" =
1261 { " " * bbl.etal emphasize * }
1267 space.word * t do.name.latex.cmd *
1273 { t do.name.latex.cmd }
1275 nameptr #1 + 'nameptr :=
1276 namesleft #1 - 'namesleft :=
1286 %% Higher Level Formats
1288 %% addresses/locations
1290 FUNCTION {format.address}
1291 { address duplicate$ empty$ 'skip$
1292 { this.to.prev.status
1301 %% author/editor names
1303 FUNCTION {format.authors}{ author "author" format.names }
1305 FUNCTION {format.editors}
1306 { editor "editor" format.names duplicate$ empty$ 'skip$
1319 FUNCTION {format.date}
1321 month "month" bibinfo.check duplicate$ empty$
1322 year "year" bibinfo.check duplicate$ empty$
1324 { this.to.prev.status
1327 "there's a month but no year in " cite$ * warning$ }
1331 { this.to.prev.status
1345 FUNCTION {format.date.electronic}
1346 { month "month" bibinfo.check duplicate$ empty$
1347 year "year" bibinfo.check duplicate$ empty$
1350 { "there's a month but no year in " cite$ * warning$
1351 pop$ ")" * "(" swap$ *
1353 punct.no 'this.status.punct :=
1354 space.normal 'this.status.space :=
1355 quote.no 'this.status.quote :=
1356 cap.yes 'status.cap :=
1361 { swap$ pop$ ")" * "(" swap$ * }
1362 { "(" swap$ * ", " * swap$ * ")" * }
1365 punct.no 'this.status.punct :=
1366 space.normal 'this.status.space :=
1367 quote.no 'this.status.quote :=
1368 cap.yes 'status.cap :=
1377 % Note: IEEE considers the edition to be closely associated with
1378 % the title of a book. So, in IEEEtran.bst the edition is normally handled
1379 % within the formatting of the title. The format.edition function is
1380 % retained here for possible future use.
1381 FUNCTION {format.edition}
1382 { edition duplicate$ empty$ 'skip$
1383 { this.to.prev.status
1390 "edition" bibinfo.check
1397 % This is used to format the booktitle of a conference proceedings.
1398 % Here we use the "intype" field to provide the user a way to
1399 % override the word "in" (e.g., with things like "presented at")
1400 % Use of intype stops the emphasis of the booktitle to indicate that
1401 % we no longer mean the written conference proceedings, but the
1402 % conference itself.
1403 FUNCTION {format.in.booktitle}
1404 { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
1405 { this.to.prev.status
1420 % This is used to format the booktitle of collection.
1421 % Here the "intype" field is not supported, but "edition" is.
1422 FUNCTION {format.in.booktitle.edition}
1423 { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
1424 { this.to.prev.status
1428 edition empty$ 'skip$
1433 * "~" * bbl.edition *
1436 bbl.in " " * swap$ *
1442 FUNCTION {format.article.title}
1443 { title duplicate$ empty$ 'skip$
1444 { this.to.prev.status
1449 "title" bibinfo.check
1450 duplicate$ empty$ 'skip$
1451 { quote.close 'this.status.quote :=
1452 is.last.char.not.punct
1453 { punct.std 'this.status.punct := }
1454 { punct.no 'this.status.punct := }
1463 FUNCTION {format.article.title.electronic}
1464 { title duplicate$ empty$ 'skip$
1465 { this.to.prev.status
1471 "title" bibinfo.check
1478 FUNCTION {format.book.title.edition}
1479 { title "title" bibinfo.check
1481 { "empty title in " cite$ * warning$ }
1482 { this.to.prev.status
1486 edition empty$ 'skip$
1495 * "~" * bbl.edition *
1503 FUNCTION {format.book.title}
1504 { title "title" bibinfo.check
1505 duplicate$ empty$ 'skip$
1506 { this.to.prev.status
1519 FUNCTION {format.journal}
1520 { journal duplicate$ empty$ 'skip$
1521 { this.to.prev.status
1534 FUNCTION {format.howpublished}
1535 { howpublished duplicate$ empty$ 'skip$
1536 { this.to.prev.status
1545 %% institutions/organization/publishers/school
1547 FUNCTION {format.institution}
1548 { institution duplicate$ empty$ 'skip$
1549 { this.to.prev.status
1556 FUNCTION {format.organization}
1557 { organization duplicate$ empty$ 'skip$
1558 { this.to.prev.status
1565 FUNCTION {format.address.publisher.date}
1566 { publisher "publisher" bibinfo.warn format.address.org.or.pub.date }
1568 FUNCTION {format.address.publisher.date.nowarn}
1569 { publisher "publisher" bibinfo.check format.address.org.or.pub.date }
1571 FUNCTION {format.address.organization.date}
1572 { organization "organization" bibinfo.check format.address.org.or.pub.date }
1574 FUNCTION {format.school}
1575 { school duplicate$ empty$ 'skip$
1576 { this.to.prev.status
1585 %% volume/number/series/chapter/pages
1587 FUNCTION {format.volume}
1588 { volume empty.field.to.null.string
1589 duplicate$ empty$ 'skip$
1590 { this.to.prev.status
1597 swap$ tie.or.space.prefix
1598 "volume" bibinfo.check
1605 FUNCTION {format.number}
1606 { number empty.field.to.null.string
1607 duplicate$ empty$ 'skip$
1608 { this.to.prev.status
1611 { bbl.number capitalize }
1614 swap$ tie.or.space.prefix
1615 "number" bibinfo.check
1622 FUNCTION {format.number.if.use.for.article}
1623 { is.use.number.for.article
1629 % IEEE does not seem to tie the series so closely with the volume
1630 % and number as is done in other bibliography styles. Instead the
1631 % series is treated somewhat like an extension of the title.
1632 FUNCTION {format.series}
1635 { this.to.prev.status
1638 series "series" bibinfo.check *
1645 FUNCTION {format.chapter}
1648 { this.to.prev.status
1652 { type "l" change.case$
1653 "type" bibinfo.check
1656 chapter tie.or.space.prefix
1657 "chapter" bibinfo.check
1665 % The intended use of format.paper is for paper numbers of inproceedings.
1666 % The paper type can be overridden via the type field.
1667 % We allow the type to be displayed even if the paper number is absent
1668 % for things like "postdeadline paper"
1669 FUNCTION {format.paper}
1674 { this.to.prev.status
1676 type "type" bibinfo.check
1681 { this.to.prev.status
1685 { type "type" bibinfo.check }
1688 "paper" bibinfo.check
1699 FUNCTION {format.pages}
1700 { pages duplicate$ empty$ 'skip$
1701 { this.to.prev.status
1703 duplicate$ is.multiple.pages
1713 "pages" bibinfo.check
1722 %% technical report number
1724 FUNCTION {format.tech.report.number}
1725 { number "number" bibinfo.check
1729 type duplicate$ empty$
1735 "type" bibinfo.check
1736 swap$ duplicate$ empty$
1738 { tie.or.space.prefix * * }
1746 FUNCTION {format.note}
1749 { this.to.prev.status
1751 punct.period 'this.status.punct :=
1752 note #1 #1 substring$
1762 note #2 global.max$ substring$ * "note" bibinfo.check
1763 cap.yes 'status.cap :=
1772 FUNCTION {format.patent.date}
1773 { this.to.prev.status
1776 { monthfiled duplicate$ empty$
1777 { "monthfiled" bibinfo.check pop$ "" }
1778 { "monthfiled" bibinfo.check }
1780 dayfiled duplicate$ empty$
1781 { "dayfiled" bibinfo.check pop$ "" * }
1782 { "dayfiled" bibinfo.check
1784 { "dayfiled without a monthfiled in " cite$ * warning$
1792 { "no year or yearfiled in " cite$ * warning$ }
1793 { yearfiled "yearfiled" bibinfo.check
1802 { month duplicate$ empty$
1803 { "month" bibinfo.check pop$ "" }
1804 { "month" bibinfo.check }
1806 day duplicate$ empty$
1807 { "day" bibinfo.check pop$ "" * }
1808 { "day" bibinfo.check
1810 { "day without a month in " cite$ * warning$
1817 year "year" bibinfo.check
1828 FUNCTION {format.patent.nationality.type.number}
1829 { this.to.prev.status
1831 nationality duplicate$ empty$
1832 { "nationality" bibinfo.warn pop$ "" }
1833 { "nationality" bibinfo.check
1834 duplicate$ "l" change.case$ "united states" =
1835 { pop$ bbl.patentUS }
1842 { bbl.patent "type" bibinfo.check }
1843 { type "type" bibinfo.check }
1846 number duplicate$ empty$
1847 { "number" bibinfo.warn pop$ }
1848 { "number" bibinfo.check
1849 large.number.separate
1860 FUNCTION {format.organization.institution.standard.type.number}
1861 { this.to.prev.status
1863 organization duplicate$ empty$
1865 institution duplicate$ empty$
1866 { "institution" bibinfo.warn }
1867 { "institution" bibinfo.warn " " * }
1870 { "organization" bibinfo.warn " " * }
1873 { bbl.standard "type" bibinfo.check }
1874 { type "type" bibinfo.check }
1877 number duplicate$ empty$
1878 { "number" bibinfo.check pop$ }
1879 { "number" bibinfo.check
1880 large.number.separate
1887 FUNCTION {format.revision}
1890 { this.to.prev.status
1893 revision tie.or.space.prefix
1894 "revision" bibinfo.check
1904 FUNCTION {format.master.thesis.type}
1905 { this.to.prev.status
1912 type "type" bibinfo.check
1918 FUNCTION {format.phd.thesis.type}
1919 { this.to.prev.status
1926 type "type" bibinfo.check
1936 FUNCTION {format.url}
1939 { this.to.prev.status
1941 cap.yes 'status.cap :=
1942 name.url.prefix " " *
1943 "\url{" * url * "}" *
1944 punct.no 'this.status.punct :=
1945 punct.period 'prev.status.punct :=
1946 space.normal 'this.status.space :=
1947 space.normal 'prev.status.space :=
1948 quote.no 'this.status.quote :=
1956 %%%%%%%%%%%%%%%%%%%%
1957 %% ENTRY HANDLERS %%
1958 %%%%%%%%%%%%%%%%%%%%
1961 % Note: In many journals, IEEE (or the authors) tend not to show the number
1962 % for articles, so the display of the number is controlled here by the
1963 % switch "is.use.number.for.article"
1965 { std.status.using.comma
1967 if.url.alt.interword.spacing
1968 format.authors "author" output.warn
1970 format.article.title "title" output.warn
1971 format.journal "journal" bibinfo.check "journal" output.warn
1972 format.volume output
1973 format.number.if.use.for.article output
1975 format.date "year" output.warn
1979 if.url.std.interword.spacing
1983 { std.status.using.comma
1985 if.url.alt.interword.spacing
1987 { format.editors "author and editor" output.warn }
1988 { format.authors output.nonnull }
1991 format.book.title.edition output
1992 format.series output
1995 { format.editors output }
1997 format.address.publisher.date output
1998 format.volume output
1999 format.number output
2003 if.url.std.interword.spacing
2007 { std.status.using.comma
2009 if.url.alt.interword.spacing
2010 format.authors output
2012 format.article.title "title" output.warn
2013 format.howpublished "howpublished" bibinfo.check output
2014 format.organization "organization" bibinfo.check output
2015 format.address "address" bibinfo.check output
2020 if.url.std.interword.spacing
2023 FUNCTION {electronic}
2024 { std.status.using.period
2026 if.url.alt.interword.spacing
2027 format.authors output
2029 format.date.electronic output
2030 format.article.title.electronic output
2031 format.howpublished "howpublished" bibinfo.check output
2032 format.organization "organization" bibinfo.check output
2033 format.address "address" bibinfo.check output
2038 if.url.std.interword.spacing
2042 { std.status.using.comma
2044 if.url.alt.interword.spacing
2046 { format.editors "author and editor" output.warn }
2047 { format.authors output.nonnull }
2050 format.book.title.edition output
2051 format.series output
2052 format.address.publisher.date output
2053 format.volume output
2054 format.number output
2055 format.chapter output
2060 if.url.std.interword.spacing
2063 FUNCTION {incollection}
2064 { std.status.using.comma
2066 if.url.alt.interword.spacing
2067 format.authors "author" output.warn
2069 format.article.title "title" output.warn
2070 format.in.booktitle.edition "booktitle" output.warn
2071 format.series output
2072 format.editors output
2073 format.address.publisher.date.nowarn output
2074 format.volume output
2075 format.number output
2076 format.chapter output
2081 if.url.std.interword.spacing
2084 FUNCTION {inproceedings}
2085 { std.status.using.comma
2087 if.url.alt.interword.spacing
2088 format.authors "author" output.warn
2090 format.article.title "title" output.warn
2091 format.in.booktitle "booktitle" output.warn
2092 format.series output
2093 format.editors output
2094 format.volume output
2095 format.number output
2097 { format.address.organization.date output }
2098 { format.organization "organization" bibinfo.check output
2099 format.address.publisher.date output
2107 if.url.std.interword.spacing
2111 { std.status.using.comma
2113 if.url.alt.interword.spacing
2114 format.authors output
2116 format.book.title.edition "title" output.warn
2117 format.howpublished "howpublished" bibinfo.check output
2118 format.organization "organization" bibinfo.check output
2119 format.address "address" bibinfo.check output
2124 if.url.std.interword.spacing
2127 FUNCTION {mastersthesis}
2128 { std.status.using.comma
2130 if.url.alt.interword.spacing
2131 format.authors "author" output.warn
2133 format.article.title "title" output.warn
2134 format.master.thesis.type output.nonnull
2135 format.school "school" bibinfo.warn output
2136 format.address "address" bibinfo.check output
2137 format.date "year" output.warn
2141 if.url.std.interword.spacing
2145 { std.status.using.comma
2147 if.url.alt.interword.spacing
2148 format.authors output
2150 format.article.title output
2151 format.howpublished "howpublished" bibinfo.check output
2152 format.organization "organization" bibinfo.check output
2153 format.address "address" bibinfo.check output
2160 if.url.std.interword.spacing
2164 { std.status.using.comma
2166 if.url.alt.interword.spacing
2167 format.authors output
2169 format.article.title output
2170 format.patent.nationality.type.number output
2171 format.patent.date output
2176 if.url.std.interword.spacing
2179 FUNCTION {periodical}
2180 { std.status.using.comma
2182 if.url.alt.interword.spacing
2183 format.editors output
2185 format.book.title "title" output.warn
2186 format.series output
2187 format.volume output
2188 format.number output
2189 format.organization "organization" bibinfo.check output
2190 format.date "year" output.warn
2194 if.url.std.interword.spacing
2197 FUNCTION {phdthesis}
2198 { std.status.using.comma
2200 if.url.alt.interword.spacing
2201 format.authors "author" output.warn
2203 format.article.title "title" output.warn
2204 format.phd.thesis.type output.nonnull
2205 format.school "school" bibinfo.warn output
2206 format.address "address" bibinfo.check output
2207 format.date "year" output.warn
2211 if.url.std.interword.spacing
2214 FUNCTION {proceedings}
2215 { std.status.using.comma
2217 if.url.alt.interword.spacing
2218 format.editors output
2220 format.book.title "title" output.warn
2221 format.series output
2222 format.volume output
2223 format.number output
2225 { format.address.organization.date output }
2226 { format.organization "organization" bibinfo.check output
2227 format.address.publisher.date output
2233 if.url.std.interword.spacing
2237 { std.status.using.comma
2239 if.url.alt.interword.spacing
2240 format.authors output
2242 format.book.title "title" output.warn
2243 format.howpublished "howpublished" bibinfo.check output
2244 format.organization.institution.standard.type.number output
2245 format.revision output
2250 if.url.std.interword.spacing
2253 FUNCTION {techreport}
2254 { std.status.using.comma
2256 if.url.alt.interword.spacing
2257 format.authors "author" output.warn
2259 format.article.title "title" output.warn
2260 format.howpublished "howpublished" bibinfo.check output
2261 format.institution "institution" bibinfo.warn output
2262 format.address "address" bibinfo.check output
2263 format.tech.report.number output.nonnull
2264 format.date "year" output.warn
2268 if.url.std.interword.spacing
2271 FUNCTION {unpublished}
2272 { std.status.using.comma
2274 if.url.alt.interword.spacing
2275 format.authors "author" output.warn
2277 format.article.title "title" output.warn
2279 format.note "note" output.warn
2282 if.url.std.interword.spacing
2286 % The special entry type which provides the user interface to the
2288 FUNCTION {IEEEtranBSTCTL}
2289 { is.print.banners.to.terminal
2290 { "** IEEEtran BST control entry " quote$ * cite$ * quote$ * " detected." *
2295 CTLuse_article_number
2298 { CTLuse_article_number
2300 'is.use.number.for.article :=
2314 { CTLuse_forced_etal
2319 CTLmax_names_forced_etal
2322 { CTLmax_names_forced_etal
2324 'max.num.names.before.forced.et.al :=
2330 { CTLnames_show_etal
2332 'num.names.shown.with.forced.et.al :=
2338 { CTLuse_alt_spacing
2340 'is.use.alt.interword.spacing :=
2343 CTLalt_stretch_factor
2346 { CTLalt_stretch_factor
2347 'ALTinterwordstretchfactor :=
2348 "\renewcommand{\BIBentryALTinterwordstretchfactor}{"
2349 ALTinterwordstretchfactor * "}" *
2353 CTLdash_repeated_names
2356 { CTLdash_repeated_names
2358 'is.dash.repeated.names :=
2361 CTLname_format_string
2364 { CTLname_format_string
2365 'name.format.string :=
2378 { CTLname_url_prefix
2384 num.names.shown.with.forced.et.al max.num.names.before.forced.et.al >
2385 { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$
2386 max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al :=
2396 FUNCTION {conference}{inproceedings}
2397 FUNCTION {online}{electronic}
2398 FUNCTION {internet}{electronic}
2399 FUNCTION {webpage}{electronic}
2400 FUNCTION {www}{electronic}
2401 FUNCTION {default.type}{misc}
2411 EXECUTE {initialize.controls}
2412 EXECUTE {initialize.status.constants}
2413 EXECUTE {banner.message}
2415 EXECUTE {initialize.longest.label}
2416 ITERATE {longest.label.pass}
2419 ITERATE {call.type$}
2422 EXECUTE{completed.message}
2425 %% That's all folks, mds.