3 %% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted)
4 %% Version 1.14 (2015/08/26)
6 %% Copyright (c) 2003-2015 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/pkg/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 the 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. **
47 %%*************************************************************************
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 %% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %%
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 % These are the defaults for the user adjustable controls. The values used
55 % here can be overridden by the user via IEEEtranBSTCTL entry type.
57 % NOTE: The recommended LaTeX command to invoke a control entry type is:
60 %\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
61 %\def\@bstctlcite[#1]#2{\@bsphack
62 % \@for\@citeb:=#2\do{%
63 % \edef\@citeb{\expandafter\@firstofone\@citeb}%
64 % \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
68 % It is called at the start of the document, before the first \cite, like:
69 % \bstctlcite{IEEEexample:BSTcontrol}
71 % IEEEtran.cls V1.6 and later does provide this command.
75 % #0 turns off the display of the number for articles.
77 FUNCTION {default.is.use.number.for.article} { #1 }
80 % #0 turns off the display of the paper and type fields in @inproceedings.
82 FUNCTION {default.is.use.paper} { #1 }
85 % #0 turns off the display of urls
87 FUNCTION {default.is.use.url} { #1 }
90 % #0 turns off the forced use of "et al."
92 FUNCTION {default.is.forced.et.al} { #0 }
95 % The maximum number of names that can be present beyond which an "et al."
96 % usage is forced. Be sure that num.names.shown.with.forced.et.al (below)
97 % is not greater than this value!
98 % Note: There are many instances of references in IEEE journals which have
99 % a very large number of authors as well as instances in which "et al." is
101 FUNCTION {default.max.num.names.before.forced.et.al} { #10 }
104 % The number of names that will be shown with a forced "et al.".
105 % Must be less than or equal to max.num.names.before.forced.et.al
106 FUNCTION {default.num.names.shown.with.forced.et.al} { #1 }
109 % #0 turns off the alternate interword spacing for entries with URLs.
111 FUNCTION {default.is.use.alt.interword.spacing} { #1 }
114 % If alternate interword spacing for entries with URLs is enabled, this is
115 % the interword spacing stretch factor that will be used. For example, the
116 % default "4" here means that the interword spacing in entries with URLs can
117 % stretch to four times normal. Does not have to be an integer. Note that
118 % the value specified here can be overridden by the user in their LaTeX
119 % code via a command such as:
120 % "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to
121 % that via the IEEEtranBSTCTL entry type.
122 FUNCTION {default.ALTinterwordstretchfactor} { "4" }
125 % #0 turns off the "dashification" of repeated (i.e., identical to those
126 % of the previous entry) names. The IEEE normally does this.
128 FUNCTION {default.is.dash.repeated.names} { #1 }
131 % The default name format control string.
132 FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" }
135 % The default LaTeX font command for the names.
136 FUNCTION {default.name.latex.cmd}{ "" }
139 % The default URL prefix.
140 FUNCTION {default.name.url.prefix}{ "[Online]. Available:" }
143 % Other controls that cannot be accessed via IEEEtranBSTCTL entry type.
145 % #0 turns off the terminal startup banner/completed message so as to
146 % operate more quietly.
148 FUNCTION {is.print.banners.to.terminal} { #1 }
153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154 %% FILE VERSION AND BANNER %%
155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157 FUNCTION{bst.file.version} { "1.14" }
158 FUNCTION{bst.file.date} { "2015/08/26" }
159 FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" }
161 FUNCTION {banner.message}
162 { is.print.banners.to.terminal
163 { "-- IEEEtran.bst version" " " * bst.file.version *
164 " (" * bst.file.date * ") " * "by Michael Shell." *
166 "-- " bst.file.website *
168 "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." *
175 FUNCTION {completed.message}
176 { is.print.banners.to.terminal
189 %%%%%%%%%%%%%%%%%%%%%%
190 %% STRING CONSTANTS %%
191 %%%%%%%%%%%%%%%%%%%%%%
193 FUNCTION {bbl.and}{ "and" }
194 FUNCTION {bbl.etal}{ "et~al." }
195 FUNCTION {bbl.editors}{ "eds." }
196 FUNCTION {bbl.editor}{ "ed." }
197 FUNCTION {bbl.edition}{ "ed." }
198 FUNCTION {bbl.volume}{ "vol." }
199 FUNCTION {bbl.of}{ "of" }
200 FUNCTION {bbl.number}{ "no." }
201 FUNCTION {bbl.in}{ "in" }
202 FUNCTION {bbl.pages}{ "pp." }
203 FUNCTION {bbl.page}{ "p." }
204 FUNCTION {bbl.chapter}{ "ch." }
205 FUNCTION {bbl.paper}{ "paper" }
206 FUNCTION {bbl.part}{ "pt." }
207 FUNCTION {bbl.patent}{ "Patent" }
208 FUNCTION {bbl.patentUS}{ "U.S." }
209 FUNCTION {bbl.revision}{ "Rev." }
210 FUNCTION {bbl.series}{ "ser." }
211 FUNCTION {bbl.standard}{ "Std." }
212 FUNCTION {bbl.techrep}{ "Tech. Rep." }
213 FUNCTION {bbl.mthesis}{ "Master's thesis" }
214 FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" }
215 FUNCTION {bbl.st}{ "st" }
216 FUNCTION {bbl.nd}{ "nd" }
217 FUNCTION {bbl.rd}{ "rd" }
218 FUNCTION {bbl.th}{ "th" }
221 % This is the LaTeX spacer that is used when a larger than normal space
222 % is called for (such as just before the address:publisher).
223 FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " }
225 % The LaTeX code for dashes that are used to represent repeated names.
226 % Note: Some older IEEE journals used something like
227 % "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along
228 % the baseline. However, the IEEE now uses a thinner, above baseline,
229 % six dash long sequence.
230 FUNCTION {repeated.name.dashes} { "------" }
234 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
235 %% PREDEFINED STRING MACROS %%
236 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
291 CTLuse_article_number
295 CTLmax_names_forced_etal
298 CTLalt_stretch_factor
299 CTLdash_repeated_names
300 CTLname_format_string
310 %%%%%%%%%%%%%%%%%%%%%%%
311 %% INTEGER VARIABLES %%
312 %%%%%%%%%%%%%%%%%%%%%%%
314 INTEGERS { prev.status.punct this.status.punct punct.std
315 punct.no punct.comma punct.period
316 prev.status.space this.status.space space.std
317 space.no space.normal space.large
318 prev.status.quote this.status.quote quote.std
320 prev.status.nline this.status.nline nline.std
321 nline.no nline.newblock
325 INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames }
327 INTEGERS { is.use.number.for.article
331 max.num.names.before.forced.et.al
332 num.names.shown.with.forced.et.al
333 is.use.alt.interword.spacing
334 is.dash.repeated.names}
337 %%%%%%%%%%%%%%%%%%%%%%
338 %% STRING VARIABLES %%
339 %%%%%%%%%%%%%%%%%%%%%%
346 ALTinterwordstretchfactor
354 %%%%%%%%%%%%%%%%%%%%%%%%%
355 %% LOW LEVEL FUNCTIONS %%
356 %%%%%%%%%%%%%%%%%%%%%%%%%
358 FUNCTION {initialize.controls}
359 { default.is.use.number.for.article 'is.use.number.for.article :=
360 default.is.use.paper 'is.use.paper :=
361 default.is.use.url 'is.use.url :=
362 default.is.forced.et.al 'is.forced.et.al :=
363 default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al :=
364 default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al :=
365 default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing :=
366 default.is.dash.repeated.names 'is.dash.repeated.names :=
367 default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor :=
368 default.name.format.string 'name.format.string :=
369 default.name.latex.cmd 'name.latex.cmd :=
370 default.name.url.prefix 'name.url.prefix :=
374 % This IEEEtran.bst features a very powerful and flexible mechanism for
375 % controlling the capitalization, punctuation, spacing, quotation, and
376 % newlines of the formatted entry fields. (Note: IEEEtran.bst does not need
377 % or use the newline/newblock feature, but it has been implemented for
378 % possible future use.) The output states of IEEEtran.bst consist of
379 % multiple independent attributes and, as such, can be thought of as being
380 % vectors, rather than the simple scalar values ("before.all",
381 % "mid.sentence", etc.) used in most other .bst files.
383 % The more flexible and complex design used here was motivated in part by
384 % the IEEE's rather unusual bibliography style. For example, the IEEE ends the
385 % previous field item with a period and large space prior to the publisher
386 % address; the @electronic entry types use periods as inter-item punctuation
387 % rather than the commas used by the other entry types; and URLs are never
388 % followed by periods even though they are the last item in the entry.
389 % Although it is possible to accommodate these features with the conventional
390 % output state system, the seemingly endless exceptions make for convoluted,
391 % unreliable and difficult to maintain code.
393 % IEEEtran.bst's output state system can be easily understood via a simple
394 % illustration of two most recently formatted entry fields (on the stack):
399 % which, in this example, is to eventually appear in the bibliography as:
401 % "PREVIOUS_ITEM," CURRENT_ITEM
403 % It is the job of the output routine to take the previous item off of the
404 % stack (while leaving the current item at the top of the stack), apply its
405 % trailing punctuation (including closing quote marks) and spacing, and then
406 % to write the result to BibTeX's output buffer:
410 % Punctuation (and spacing) between items is often determined by both of the
411 % items rather than just the first one. The presence of quotation marks
412 % further complicates the situation because, in standard English, trailing
413 % punctuation marks are supposed to be contained within the quotes.
415 % IEEEtran.bst maintains two output state (aka "status") vectors which
416 % correspond to the previous and current (aka "this") items. Each vector
417 % consists of several independent attributes which track punctuation,
418 % spacing, quotation, and newlines. Capitalization status is handled by a
419 % separate scalar because the format routines, not the output routine,
420 % handle capitalization and, therefore, there is no need to maintain the
421 % capitalization attribute for both the "previous" and "this" items.
423 % When a format routine adds a new item, it copies the current output status
424 % vector to the previous output status vector and (usually) resets the
425 % current (this) output status vector to a "standard status" vector. Using a
426 % "standard status" vector in this way allows us to redefine what we mean by
427 % "standard status" at the start of each entry handler and reuse the same
428 % format routines under the various inter-item separation schemes. For
429 % example, the standard status vector for the @book entry type may use
430 % commas for item separators, while the @electronic type may use periods,
431 % yet both entry handlers exploit many of the exact same format routines.
433 % Because format routines have write access to the output status vector of
434 % the previous item, they can override the punctuation choices of the
435 % previous format routine! Therefore, it becomes trivial to implement rules
436 % such as "Always use a period and a large space before the publisher." By
437 % pushing the generation of the closing quote mark to the output routine, we
438 % avoid all the problems caused by having to close a quote before having all
439 % the information required to determine what the punctuation should be.
441 % The IEEEtran.bst output state system can easily be expanded if needed.
442 % For instance, it is easy to add a "space.tie" attribute value if the
443 % bibliography rules mandate that two items have to be joined with an
446 FUNCTION {initialize.status.constants}
458 #1 'nline.newblock :=
461 FUNCTION {std.status.using.comma}
462 { punct.comma 'punct.std :=
463 space.normal 'space.std :=
464 quote.no 'quote.std :=
465 nline.no 'nline.std :=
469 FUNCTION {std.status.using.period}
470 { punct.period 'punct.std :=
471 space.normal 'space.std :=
472 quote.no 'quote.std :=
473 nline.no 'nline.std :=
477 FUNCTION {initialize.prev.this.status}
478 { punct.no 'prev.status.punct :=
479 space.no 'prev.status.space :=
480 quote.no 'prev.status.quote :=
481 nline.no 'prev.status.nline :=
482 punct.no 'this.status.punct :=
483 space.no 'this.status.space :=
484 quote.no 'this.status.quote :=
485 nline.no 'this.status.nline :=
486 cap.yes 'status.cap :=
489 FUNCTION {this.status.std}
490 { punct.std 'this.status.punct :=
491 space.std 'this.status.space :=
492 quote.std 'this.status.quote :=
493 nline.std 'this.status.nline :=
496 FUNCTION {cap.status.std}{ cap.std 'status.cap := }
498 FUNCTION {this.to.prev.status}
499 { this.status.punct 'prev.status.punct :=
500 this.status.space 'prev.status.space :=
501 this.status.quote 'prev.status.quote :=
502 this.status.nline 'prev.status.nline :=
525 % convert the strings "yes" or "no" to #1 or #0 respectively
526 FUNCTION {yes.no.to.int}
527 { "l" change.case$ duplicate$
532 { "unknown boolean " quote$ * swap$ * quote$ *
533 " in " * cite$ * warning$
542 % pushes true if the single char string on the stack is in the
543 % range of "0" to "9"
546 duplicate$ "0" chr.to.int$ < not
547 swap$ "9" chr.to.int$ > not and
550 % multiplies the integer on the stack by a factor of 10
551 FUNCTION {bump.int.mag}
563 % converts a single character string on the stack to an integer
564 FUNCTION {char.to.integer}
567 { chr.to.int$ "0" chr.to.int$ - }
568 {"noninteger character " quote$ * swap$ * quote$ *
569 " in integer field of " * cite$ * warning$
575 % converts a string on the stack to an integer
576 FUNCTION {string.to.integer}
577 { duplicate$ text.length$ 'namesleft :=
580 { nameptr namesleft > not }
581 { duplicate$ nameptr #1 substring$
582 char.to.integer numnames bump.int.mag +
595 % The output routines write out the *next* to the top (previous) item on the
596 % stack, adding punctuation and such as needed. Since IEEEtran.bst maintains
597 % the output status for the top two items on the stack, these output
598 % routines have to consider the previous output status (which corresponds to
599 % the item that is being output). Full independent control of punctuation,
600 % closing quote marks, spacing, and newblock is provided.
602 % "output.nonnull" does not check for the presence of a previous empty
605 % "output" does check for the presence of a previous empty item and will
606 % remove an empty item rather than outputing it.
608 % "output.warn" is like "output", but will issue a warning if it detects
611 FUNCTION {output.nonnull}
613 prev.status.punct punct.comma =
617 prev.status.punct punct.period =
621 prev.status.quote quote.close =
625 prev.status.space space.normal =
629 prev.status.space space.large =
634 prev.status.nline nline.newblock =
635 { newline$ "\newblock " write$ }
647 FUNCTION {output.warn}
650 { pop$ "empty " t * " in " * cite$ * warning$ }
655 % "fin.entry" is the output routine that handles the last item of the entry
656 % (which will be on the top of the stack when "fin.entry" is called).
659 { this.status.punct punct.no =
663 this.status.quote quote.close =
672 FUNCTION {is.last.char.not.punct}
675 #-1 #1 substring$ "." =
678 FUNCTION {is.multiple.pages}
687 swap$ duplicate$ "," =
690 { #1 'multiresult := }
691 { t #2 global.max$ substring$ 't := }
698 FUNCTION {capitalize}{ "u" change.case$ "t" change.case$ }
703 { "\emph{" swap$ * "}" * }
707 FUNCTION {do.name.latex.cmd}
711 { name.latex.cmd "{" * swap$ * "}" * }
715 % IEEEtran.bst uses its own \BIBforeignlanguage command which directly
716 % invokes the TeX hyphenation patterns without the need of the Babel
717 % package. Babel does a lot more than switch hyphenation patterns and
718 % its loading can cause unintended effects in many class files (such as
720 FUNCTION {select.language}
721 { duplicate$ empty$ 'pop$
722 { language empty$ 'skip$
723 { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * }
729 FUNCTION {tie.or.space.prefix}
730 { duplicate$ text.length$ #3 <
737 FUNCTION {get.bbl.editor}
738 { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
740 FUNCTION {space.word}{ " " swap$ * " " * }
743 % Field Conditioners, Converters, Checkers and External Interfaces
745 FUNCTION {empty.field.to.null.string}
752 FUNCTION {either.or.check}
755 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
759 FUNCTION {empty.entry.warn}
760 { author empty$ title empty$ howpublished empty$
761 month empty$ year empty$ note empty$ url empty$
762 and and and and and and
763 { "all relevant fields are empty in " cite$ * warning$ }
769 % The bibinfo system provides a way for the electronic parsing/acquisition
770 % of a bibliography's contents as is done by ReVTeX. For example, a field
771 % could be entered into the bibliography as:
772 % \bibinfo{volume}{2}
773 % Only the "2" would show up in the document, but the LaTeX \bibinfo command
774 % could do additional things with the information. IEEEtran.bst does provide
775 % a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is
776 % currently not used as the bogus bibinfo functions defined here output the
777 % entry values directly without the \bibinfo wrapper. The bibinfo functions
778 % themselves (and the calls to them) are retained for possible future use.
780 % bibinfo.check avoids acting on missing fields while bibinfo.warn will
781 % issue a warning message if a missing field is detected. Prior to calling
782 % the bibinfo functions, the user should push the field value and then its
783 % name string, in that order.
785 FUNCTION {bibinfo.check}
786 { swap$ duplicate$ missing$
796 FUNCTION {bibinfo.warn}
797 { swap$ duplicate$ missing$
798 { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" }
800 { swap$ "empty " swap$ * " in " * cite$ * warning$ }
808 % The IEEE separates large numbers with more than 4 digits into groups of
809 % three. The IEEE uses a small space to separate these number groups.
810 % Typical applications include patent and page numbers.
812 % number of consecutive digits required to trigger the group separation.
813 FUNCTION {large.number.trigger}{ #5 }
815 % For numbers longer than the trigger, this is the blocksize of the groups.
816 % The blocksize must be less than the trigger threshold, and 2 * blocksize
817 % must be greater than the trigger threshold (can't do more than one
818 % separation on the initial trigger).
819 FUNCTION {large.number.blocksize}{ #3 }
821 % What is actually inserted between the number groups.
822 FUNCTION {large.number.separator}{ "\," }
824 % So as to save on integer variables by reusing existing ones, numnames
825 % holds the current number of consecutive digits read and nameptr holds
826 % the number that will trigger an inserted space.
827 FUNCTION {large.number.separate}
831 large.number.trigger 'nameptr :=
833 { t #-1 #1 substring$ is.num
834 { numnames #1 + 'numnames := }
836 large.number.trigger 'nameptr :=
839 t #-1 #1 substring$ swap$ *
840 t #-2 global.max$ substring$ 't :=
842 { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$
843 nameptr large.number.blocksize - #1 + global.max$ substring$
844 large.number.separator swap$ * *
845 nameptr large.number.blocksize - 'numnames :=
846 large.number.blocksize #1 + 'nameptr :=
854 % Converts all single dashes "-" to double dashes "--".
856 { large.number.separate
860 { t #1 #1 substring$ "-" =
861 { t #1 #2 substring$ "--" = not
863 t #2 global.max$ substring$ 't :=
865 { { t #1 #1 substring$ "-" = }
867 t #2 global.max$ substring$ 't :=
873 { t #1 #1 substring$ *
874 t #2 global.max$ substring$ 't :=
882 % This function detects entries with names that are identical to that of
883 % the previous entry and replaces the repeated names with dashes (if the
884 % "is.dash.repeated.names" user control is nonzero).
885 FUNCTION {name.or.dash}
890 { is.dash.repeated.names
891 { repeated.name.dashes }
901 % Converts the number string on the top of the stack to
902 % "numerical ordinal form" (e.g., "7" to "7th"). There is
903 % no artificial limit to the upper bound of the numbers as the
904 % two least significant digits determine the ordinal form.
905 FUNCTION {num.to.ordinal}
906 { duplicate$ #-2 #1 substring$ "1" =
908 { duplicate$ #-1 #1 substring$ "1" =
910 { duplicate$ #-1 #1 substring$ "2" =
912 { duplicate$ #-1 #1 substring$ "3" =
924 % If the string on the top of the stack begins with a number,
925 % (e.g., 11th) then replace the string with the leading number
926 % it contains. Otherwise retain the string as-is. s holds the
927 % extracted number, t holds the part of the string that remains
929 FUNCTION {extract.num}
934 t #2 global.max$ substring$ 't :=
947 % Converts the word number string on the top of the stack to
948 % Arabic string form. Will be successful up to "tenth".
949 FUNCTION {word.to.num}
950 { duplicate$ "l" change.case$ 's :=
994 % Converts the string on the top of the stack to numerical
995 % ordinal (e.g., "11th") form.
996 FUNCTION {convert.edition}
997 { duplicate$ empty$ 'skip$
998 { duplicate$ #1 #1 substring$ is.num
1003 duplicate$ #1 #1 substring$ is.num
1005 { "edition ordinal word " quote$ * edition * quote$ *
1006 " may be too high (or improper) for conversion" * " in " * cite$ * warning$
1018 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1019 %% LATEX BIBLIOGRAPHY CODE %%
1020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1022 FUNCTION {start.entry}
1029 initialize.prev.this.status
1032 % Here we write out all the LaTeX code that we will need. The most involved
1033 % code sequences are those that control the alternate interword spacing and
1034 % foreign language hyphenation patterns. The heavy use of \providecommand
1035 % gives users a way to override the defaults. Special thanks to Javier Bezos,
1036 % Johannes Braams, Robin Fairbairns, Heiko Oberdiek, Donald Arseneau and all
1037 % the other gurus on comp.text.tex for their help and advice on the topic of
1038 % \selectlanguage, Babel and BibTeX.
1039 FUNCTION {begin.bib}
1040 { "% Generated by IEEEtran.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
1042 preamble$ empty$ 'skip$
1043 { preamble$ write$ newline$ }
1045 "\begin{thebibliography}{" longest.label * "}" *
1047 "\providecommand{\url}[1]{#1}"
1049 "\csname url@samestyle\endcsname"
1051 "\providecommand{\newblock}{\relax}"
1053 "\providecommand{\bibinfo}[2]{#2}"
1055 "\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}"
1057 "\providecommand{\BIBentryALTinterwordstretchfactor}{"
1058 ALTinterwordstretchfactor * "}" *
1060 "\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus "
1062 "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}"
1064 "\providecommand{\BIBforeignlanguage}[2]{{%"
1066 "\expandafter\ifx\csname l@#1\endcsname\relax"
1068 "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%"
1070 "\typeout{** loaded for the language `#1'. Using the pattern for}%"
1072 "\typeout{** the default language instead.}%"
1076 "\language=\csname l@#1\endcsname"
1082 "\providecommand{\BIBdecl}{\relax}"
1089 { newline$ "\end{thebibliography}" write$ newline$ }
1091 FUNCTION {if.url.alt.interword.spacing}
1092 { is.use.alt.interword.spacing
1094 { url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$ }
1102 FUNCTION {if.url.std.interword.spacing}
1103 { is.use.alt.interword.spacing
1105 { url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$ }
1116 %%%%%%%%%%%%%%%%%%%%%%%%
1117 %% LONGEST LABEL PASS %%
1118 %%%%%%%%%%%%%%%%%%%%%%%%
1120 FUNCTION {initialize.longest.label}
1121 { "" 'longest.label :=
1123 #0 'longest.label.width :=
1126 FUNCTION {longest.label.pass}
1127 { type$ "ieeetranbstctl" =
1129 { number.label int.to.str$ 'label :=
1130 number.label #1 + 'number.label :=
1131 label width$ longest.label.width >
1132 { label 'longest.label :=
1133 label width$ 'longest.label.width :=
1144 %%%%%%%%%%%%%%%%%%%%%
1145 %% FORMAT HANDLERS %%
1146 %%%%%%%%%%%%%%%%%%%%%
1148 %% Lower Level Formats (used by higher level formats)
1150 FUNCTION {format.address.org.or.pub.date}
1154 { "empty year in " cite$ * warning$ }
1157 address empty$ t empty$ and
1158 year empty$ and month empty$ and
1160 { this.to.prev.status
1163 address "address" bibinfo.check *
1166 { punct.period 'prev.status.punct :=
1167 space.large 'prev.status.space :=
1175 year empty$ month empty$ and
1177 { t empty$ address empty$ and
1184 { year "year" bibinfo.check * }
1187 { month "month" bibinfo.check *
1190 { " " * year "year" bibinfo.check * }
1201 FUNCTION {format.names}
1203 duplicate$ empty$ 'skip$ {
1209 s num.names$ 'numnames :=
1210 numnames 'namesleft :=
1215 bibinfo bibinfo.check
1218 { nameptr num.names.shown.with.forced.et.al #1 + =
1219 numnames max.num.names.before.forced.et.al >
1220 is.forced.et.al and and
1227 { ", " * t do.name.latex.cmd * }
1228 { s nameptr "{ll}" format.name$ duplicate$ "others" =
1233 { " " * bbl.etal emphasize * }
1239 space.word * t do.name.latex.cmd *
1245 { t do.name.latex.cmd }
1247 nameptr #1 + 'nameptr :=
1248 namesleft #1 - 'namesleft :=
1258 %% Higher Level Formats
1260 %% addresses/locations
1262 FUNCTION {format.address}
1263 { address duplicate$ empty$ 'skip$
1264 { this.to.prev.status
1273 %% author/editor names
1275 FUNCTION {format.authors}{ author "author" format.names }
1277 FUNCTION {format.editors}
1278 { editor "editor" format.names duplicate$ empty$ 'skip$
1291 FUNCTION {format.date}
1293 month "month" bibinfo.check duplicate$ empty$
1294 year "year" bibinfo.check duplicate$ empty$
1296 { this.to.prev.status
1299 "there's a month but no year in " cite$ * warning$ }
1303 { this.to.prev.status
1317 FUNCTION {format.date.electronic}
1318 { month "month" bibinfo.check duplicate$ empty$
1319 year "year" bibinfo.check duplicate$ empty$
1322 { "there's a month but no year in " cite$ * warning$
1323 pop$ ")" * "(" swap$ *
1325 punct.no 'this.status.punct :=
1326 space.normal 'this.status.space :=
1327 quote.no 'this.status.quote :=
1328 cap.yes 'status.cap :=
1333 { swap$ pop$ ")" * "(" swap$ * }
1334 { "(" swap$ * ", " * swap$ * ")" * }
1337 punct.no 'this.status.punct :=
1338 space.normal 'this.status.space :=
1339 quote.no 'this.status.quote :=
1340 cap.yes 'status.cap :=
1349 % Note: The IEEE considers the edition to be closely associated with
1350 % the title of a book. So, in IEEEtran.bst the edition is normally handled
1351 % within the formatting of the title. The format.edition function is
1352 % retained here for possible future use.
1353 FUNCTION {format.edition}
1354 { edition duplicate$ empty$ 'skip$
1355 { this.to.prev.status
1362 "edition" bibinfo.check
1369 % This is used to format the booktitle of a conference proceedings.
1370 % Here we use the "intype" field to provide the user a way to
1371 % override the word "in" (e.g., with things like "presented at")
1372 % Use of intype stops the emphasis of the booktitle to indicate that
1373 % we no longer mean the written conference proceedings, but the
1374 % conference itself.
1375 FUNCTION {format.in.booktitle}
1376 { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
1377 { this.to.prev.status
1392 % This is used to format the booktitle of collection.
1393 % Here the "intype" field is not supported, but "edition" is.
1394 FUNCTION {format.in.booktitle.edition}
1395 { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
1396 { this.to.prev.status
1400 edition empty$ 'skip$
1405 * "~" * bbl.edition *
1408 bbl.in " " * swap$ *
1414 FUNCTION {format.article.title}
1415 { title duplicate$ empty$ 'skip$
1416 { this.to.prev.status
1421 "title" bibinfo.check
1422 duplicate$ empty$ 'skip$
1423 { quote.close 'this.status.quote :=
1424 is.last.char.not.punct
1425 { punct.std 'this.status.punct := }
1426 { punct.no 'this.status.punct := }
1435 FUNCTION {format.article.title.electronic}
1436 { title duplicate$ empty$ 'skip$
1437 { this.to.prev.status
1443 "title" bibinfo.check
1450 FUNCTION {format.book.title.edition}
1451 { title "title" bibinfo.check
1453 { "empty title in " cite$ * warning$ }
1454 { this.to.prev.status
1458 edition empty$ 'skip$
1467 * "~" * bbl.edition *
1475 FUNCTION {format.book.title}
1476 { title "title" bibinfo.check
1477 duplicate$ empty$ 'skip$
1478 { this.to.prev.status
1491 FUNCTION {format.journal}
1492 { journal duplicate$ empty$ 'skip$
1493 { this.to.prev.status
1506 FUNCTION {format.howpublished}
1507 { howpublished duplicate$ empty$ 'skip$
1508 { this.to.prev.status
1517 %% institutions/organization/publishers/school
1519 FUNCTION {format.institution}
1520 { institution duplicate$ empty$ 'skip$
1521 { this.to.prev.status
1528 FUNCTION {format.organization}
1529 { organization duplicate$ empty$ 'skip$
1530 { this.to.prev.status
1537 FUNCTION {format.address.publisher.date}
1538 { publisher "publisher" bibinfo.warn format.address.org.or.pub.date }
1540 FUNCTION {format.address.publisher.date.nowarn}
1541 { publisher "publisher" bibinfo.check format.address.org.or.pub.date }
1543 FUNCTION {format.address.organization.date}
1544 { organization "organization" bibinfo.check format.address.org.or.pub.date }
1546 FUNCTION {format.school}
1547 { school duplicate$ empty$ 'skip$
1548 { this.to.prev.status
1557 %% volume/number/series/chapter/pages
1559 FUNCTION {format.volume}
1560 { volume empty.field.to.null.string
1561 duplicate$ empty$ 'skip$
1562 { this.to.prev.status
1569 swap$ tie.or.space.prefix
1570 "volume" bibinfo.check
1577 FUNCTION {format.number}
1578 { number empty.field.to.null.string
1579 duplicate$ empty$ 'skip$
1580 { this.to.prev.status
1583 { bbl.number capitalize }
1586 swap$ tie.or.space.prefix
1587 "number" bibinfo.check
1594 FUNCTION {format.number.if.use.for.article}
1595 { is.use.number.for.article
1601 % The IEEE does not seem to tie the series so closely with the volume
1602 % and number as is done in other bibliography styles. Instead the
1603 % series is treated somewhat like an extension of the title.
1604 FUNCTION {format.series}
1607 { this.to.prev.status
1610 series "series" bibinfo.check *
1617 FUNCTION {format.chapter}
1620 { this.to.prev.status
1624 { type "l" change.case$
1625 "type" bibinfo.check
1628 chapter tie.or.space.prefix
1629 "chapter" bibinfo.check
1637 % The intended use of format.paper is for paper numbers of inproceedings.
1638 % The paper type can be overridden via the type field.
1639 % We allow the type to be displayed even if the paper number is absent
1640 % for things like "postdeadline paper"
1641 FUNCTION {format.paper}
1646 { this.to.prev.status
1648 type "type" bibinfo.check
1653 { this.to.prev.status
1657 { type "type" bibinfo.check }
1660 "paper" bibinfo.check
1671 FUNCTION {format.pages}
1672 { pages duplicate$ empty$ 'skip$
1673 { this.to.prev.status
1675 duplicate$ is.multiple.pages
1685 "pages" bibinfo.check
1694 %% technical report number
1696 FUNCTION {format.tech.report.number}
1697 { number "number" bibinfo.check
1701 type duplicate$ empty$
1707 "type" bibinfo.check
1708 swap$ duplicate$ empty$
1710 { tie.or.space.prefix * * }
1718 FUNCTION {format.note}
1721 { this.to.prev.status
1723 punct.period 'this.status.punct :=
1724 note #1 #1 substring$
1734 note #2 global.max$ substring$ * "note" bibinfo.check
1735 cap.yes 'status.cap :=
1744 FUNCTION {format.patent.date}
1745 { this.to.prev.status
1748 { monthfiled duplicate$ empty$
1749 { "monthfiled" bibinfo.check pop$ "" }
1750 { "monthfiled" bibinfo.check }
1752 dayfiled duplicate$ empty$
1753 { "dayfiled" bibinfo.check pop$ "" * }
1754 { "dayfiled" bibinfo.check
1756 { "dayfiled without a monthfiled in " cite$ * warning$
1764 { "no year or yearfiled in " cite$ * warning$ }
1765 { yearfiled "yearfiled" bibinfo.check
1774 { month duplicate$ empty$
1775 { "month" bibinfo.check pop$ "" }
1776 { "month" bibinfo.check }
1778 day duplicate$ empty$
1779 { "day" bibinfo.check pop$ "" * }
1780 { "day" bibinfo.check
1782 { "day without a month in " cite$ * warning$
1789 year "year" bibinfo.check
1800 FUNCTION {format.patent.nationality.type.number}
1801 { this.to.prev.status
1803 nationality duplicate$ empty$
1804 { "nationality" bibinfo.warn pop$ "" }
1805 { "nationality" bibinfo.check
1806 duplicate$ "l" change.case$ "united states" =
1807 { pop$ bbl.patentUS }
1814 { bbl.patent "type" bibinfo.check }
1815 { type "type" bibinfo.check }
1818 number duplicate$ empty$
1819 { "number" bibinfo.warn pop$ }
1820 { "number" bibinfo.check
1821 large.number.separate
1832 FUNCTION {format.organization.institution.standard.type.number}
1833 { this.to.prev.status
1835 organization duplicate$ empty$
1837 institution duplicate$ empty$
1838 { "institution" bibinfo.warn }
1839 { "institution" bibinfo.warn " " * }
1842 { "organization" bibinfo.warn " " * }
1845 { bbl.standard "type" bibinfo.check }
1846 { type "type" bibinfo.check }
1849 number duplicate$ empty$
1850 { "number" bibinfo.check pop$ }
1851 { "number" bibinfo.check
1852 large.number.separate
1859 FUNCTION {format.revision}
1862 { this.to.prev.status
1865 revision tie.or.space.prefix
1866 "revision" bibinfo.check
1876 FUNCTION {format.master.thesis.type}
1877 { this.to.prev.status
1884 type "type" bibinfo.check
1890 FUNCTION {format.phd.thesis.type}
1891 { this.to.prev.status
1898 type "type" bibinfo.check
1908 FUNCTION {format.url}
1912 { this.to.prev.status
1914 cap.yes 'status.cap :=
1915 name.url.prefix " " *
1916 "\url{" * url * "}" *
1917 punct.no 'this.status.punct :=
1918 punct.period 'prev.status.punct :=
1919 space.normal 'this.status.space :=
1920 space.normal 'prev.status.space :=
1921 quote.no 'this.status.quote :=
1932 %%%%%%%%%%%%%%%%%%%%
1933 %% ENTRY HANDLERS %%
1934 %%%%%%%%%%%%%%%%%%%%
1937 % Note: In many journals, the IEEE (or the authors) tend not to show the number
1938 % for articles, so the display of the number is controlled here by the
1939 % switch "is.use.number.for.article"
1941 { std.status.using.comma
1943 if.url.alt.interword.spacing
1944 format.authors "author" output.warn
1946 format.article.title "title" output.warn
1947 format.journal "journal" bibinfo.check "journal" output.warn
1948 format.volume output
1949 format.number.if.use.for.article output
1951 format.date "year" output.warn
1955 if.url.std.interword.spacing
1959 { std.status.using.comma
1961 if.url.alt.interword.spacing
1963 { format.editors "author and editor" output.warn }
1964 { format.authors output.nonnull }
1967 format.book.title.edition output
1968 format.series output
1971 { format.editors output }
1973 format.address.publisher.date output
1974 format.volume output
1975 format.number output
1979 if.url.std.interword.spacing
1983 { std.status.using.comma
1985 if.url.alt.interword.spacing
1986 format.authors output
1988 format.article.title "title" output.warn
1989 format.howpublished "howpublished" bibinfo.check output
1990 format.organization "organization" bibinfo.check output
1991 format.address "address" bibinfo.check output
1996 if.url.std.interword.spacing
1999 FUNCTION {electronic}
2000 { std.status.using.period
2002 if.url.alt.interword.spacing
2003 format.authors output
2005 format.date.electronic output
2006 format.article.title.electronic output
2007 format.howpublished "howpublished" bibinfo.check output
2008 format.organization "organization" bibinfo.check output
2009 format.address "address" bibinfo.check output
2014 if.url.std.interword.spacing
2018 { std.status.using.comma
2020 if.url.alt.interword.spacing
2022 { format.editors "author and editor" output.warn }
2023 { format.authors output.nonnull }
2026 format.book.title.edition output
2027 format.series output
2028 format.address.publisher.date output
2029 format.volume output
2030 format.number output
2031 format.chapter output
2036 if.url.std.interword.spacing
2039 FUNCTION {incollection}
2040 { std.status.using.comma
2042 if.url.alt.interword.spacing
2043 format.authors "author" output.warn
2045 format.article.title "title" output.warn
2046 format.in.booktitle.edition "booktitle" output.warn
2047 format.series output
2048 format.editors output
2049 format.address.publisher.date.nowarn output
2050 format.volume output
2051 format.number output
2052 format.chapter output
2057 if.url.std.interword.spacing
2060 FUNCTION {inproceedings}
2061 { std.status.using.comma
2063 if.url.alt.interword.spacing
2064 format.authors "author" output.warn
2066 format.article.title "title" output.warn
2067 format.in.booktitle "booktitle" output.warn
2068 format.series output
2069 format.editors output
2070 format.volume output
2071 format.number output
2073 { format.address.organization.date output }
2074 { format.organization "organization" bibinfo.check output
2075 format.address.publisher.date output
2083 if.url.std.interword.spacing
2087 { std.status.using.comma
2089 if.url.alt.interword.spacing
2090 format.authors output
2092 format.book.title.edition "title" output.warn
2093 format.howpublished "howpublished" bibinfo.check output
2094 format.organization "organization" bibinfo.check output
2095 format.address "address" bibinfo.check output
2100 if.url.std.interword.spacing
2103 FUNCTION {mastersthesis}
2104 { std.status.using.comma
2106 if.url.alt.interword.spacing
2107 format.authors "author" output.warn
2109 format.article.title "title" output.warn
2110 format.master.thesis.type output.nonnull
2111 format.school "school" bibinfo.warn output
2112 format.address "address" bibinfo.check output
2113 format.date "year" output.warn
2117 if.url.std.interword.spacing
2121 { std.status.using.comma
2123 if.url.alt.interword.spacing
2124 format.authors output
2126 format.article.title output
2127 format.howpublished "howpublished" bibinfo.check output
2128 format.organization "organization" bibinfo.check output
2129 format.address "address" bibinfo.check output
2136 if.url.std.interword.spacing
2140 { std.status.using.comma
2142 if.url.alt.interword.spacing
2143 format.authors output
2145 format.article.title output
2146 format.patent.nationality.type.number output
2147 format.patent.date output
2152 if.url.std.interword.spacing
2155 FUNCTION {periodical}
2156 { std.status.using.comma
2158 if.url.alt.interword.spacing
2159 format.editors output
2161 format.book.title "title" output.warn
2162 format.series output
2163 format.volume output
2164 format.number output
2165 format.organization "organization" bibinfo.check output
2166 format.date "year" output.warn
2170 if.url.std.interword.spacing
2173 FUNCTION {phdthesis}
2174 { std.status.using.comma
2176 if.url.alt.interword.spacing
2177 format.authors "author" output.warn
2179 format.article.title "title" output.warn
2180 format.phd.thesis.type output.nonnull
2181 format.school "school" bibinfo.warn output
2182 format.address "address" bibinfo.check output
2183 format.date "year" output.warn
2187 if.url.std.interword.spacing
2190 FUNCTION {proceedings}
2191 { std.status.using.comma
2193 if.url.alt.interword.spacing
2194 format.editors output
2196 format.book.title "title" output.warn
2197 format.series output
2198 format.volume output
2199 format.number output
2201 { format.address.organization.date output }
2202 { format.organization "organization" bibinfo.check output
2203 format.address.publisher.date output
2209 if.url.std.interword.spacing
2213 { std.status.using.comma
2215 if.url.alt.interword.spacing
2216 format.authors output
2218 format.book.title "title" output.warn
2219 format.howpublished "howpublished" bibinfo.check output
2220 format.organization.institution.standard.type.number output
2221 format.revision output
2226 if.url.std.interword.spacing
2229 FUNCTION {techreport}
2230 { std.status.using.comma
2232 if.url.alt.interword.spacing
2233 format.authors "author" output.warn
2235 format.article.title "title" output.warn
2236 format.howpublished "howpublished" bibinfo.check output
2237 format.institution "institution" bibinfo.warn output
2238 format.address "address" bibinfo.check output
2239 format.tech.report.number output.nonnull
2240 format.date "year" output.warn
2244 if.url.std.interword.spacing
2247 FUNCTION {unpublished}
2248 { std.status.using.comma
2250 if.url.alt.interword.spacing
2251 format.authors "author" output.warn
2253 format.article.title "title" output.warn
2255 format.note "note" output.warn
2258 if.url.std.interword.spacing
2262 % The special entry type which provides the user interface to the
2264 FUNCTION {IEEEtranBSTCTL}
2265 { is.print.banners.to.terminal
2266 { "** IEEEtran BST control entry " quote$ * cite$ * quote$ * " detected." *
2271 CTLuse_article_number
2274 { CTLuse_article_number
2276 'is.use.number.for.article :=
2298 { CTLuse_forced_etal
2303 CTLmax_names_forced_etal
2306 { CTLmax_names_forced_etal
2308 'max.num.names.before.forced.et.al :=
2314 { CTLnames_show_etal
2316 'num.names.shown.with.forced.et.al :=
2322 { CTLuse_alt_spacing
2324 'is.use.alt.interword.spacing :=
2327 CTLalt_stretch_factor
2330 { CTLalt_stretch_factor
2331 'ALTinterwordstretchfactor :=
2332 "\renewcommand{\BIBentryALTinterwordstretchfactor}{"
2333 ALTinterwordstretchfactor * "}" *
2337 CTLdash_repeated_names
2340 { CTLdash_repeated_names
2342 'is.dash.repeated.names :=
2345 CTLname_format_string
2348 { CTLname_format_string
2349 'name.format.string :=
2362 { CTLname_url_prefix
2368 num.names.shown.with.forced.et.al max.num.names.before.forced.et.al >
2369 { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$
2370 max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al :=
2380 FUNCTION {conference}{inproceedings}
2381 FUNCTION {online}{electronic}
2382 FUNCTION {internet}{electronic}
2383 FUNCTION {webpage}{electronic}
2384 FUNCTION {www}{electronic}
2385 FUNCTION {default.type}{misc}
2395 EXECUTE {initialize.controls}
2396 EXECUTE {initialize.status.constants}
2397 EXECUTE {banner.message}
2399 EXECUTE {initialize.longest.label}
2400 ITERATE {longest.label.pass}
2403 ITERATE {call.type$}
2406 EXECUTE{completed.message}
2409 %% That's all folks, mds.