annotate docs/SMC15/IEEEtran.bst @ 519:2bde74ae8396 Dev_main

Starting server side scripts. WIP, stash
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Wed, 17 Feb 2016 12:10:55 +0000
parents ffde18e534ff
children
rev   line source
b@12 1 %%
b@12 2 %% IEEEtran.bst
b@12 3 %% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted)
b@12 4 %% Version 1.12 (2007/01/11)
b@12 5 %%
b@12 6 %% Copyright (c) 2003-2007 Michael Shell
b@12 7 %%
b@12 8 %% Original starting code base and algorithms obtained from the output of
b@12 9 %% Patrick W. Daly's makebst package as well as from prior versions of
b@12 10 %% IEEE BibTeX styles:
b@12 11 %%
b@12 12 %% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988)
b@12 13 %% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993)
b@12 14 %%
b@12 15 %% Support sites:
b@12 16 %% http://www.michaelshell.org/tex/ieeetran/
b@12 17 %% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
b@12 18 %% and/or
b@12 19 %% http://www.ieee.org/
b@12 20 %%
b@12 21 %% For use with BibTeX version 0.99a or later
b@12 22 %%
b@12 23 %% This is a numerical citation style.
b@12 24 %%
b@12 25 %%*************************************************************************
b@12 26 %% Legal Notice:
b@12 27 %% This code is offered as-is without any warranty either expressed or
b@12 28 %% implied; without even the implied warranty of MERCHANTABILITY or
b@12 29 %% FITNESS FOR A PARTICULAR PURPOSE!
b@12 30 %% User assumes all risk.
b@12 31 %% In no event shall IEEE or any contributor to this code be liable for
b@12 32 %% any damages or losses, including, but not limited to, incidental,
b@12 33 %% consequential, or any other damages, resulting from the use or misuse
b@12 34 %% of any information contained here.
b@12 35 %%
b@12 36 %% All comments are the opinions of their respective authors and are not
b@12 37 %% necessarily endorsed by the IEEE.
b@12 38 %%
b@12 39 %% This work is distributed under the LaTeX Project Public License (LPPL)
b@12 40 %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
b@12 41 %% distributed and modified. A copy of the LPPL, version 1.3, is included
b@12 42 %% in the base LaTeX documentation of all distributions of LaTeX released
b@12 43 %% 2003/12/01 or later.
b@12 44 %% Retain all contribution notices and credits.
b@12 45 %% ** Modified files should be clearly indicated as such, including **
b@12 46 %% ** renaming them and changing author support contact information. **
b@12 47 %%
b@12 48 %% File list of work: IEEEabrv.bib, IEEEfull.bib, IEEEexample.bib,
b@12 49 %% IEEEtran.bst, IEEEtranS.bst, IEEEtranSA.bst,
b@12 50 %% IEEEtranN.bst, IEEEtranSN.bst, IEEEtran_bst_HOWTO.pdf
b@12 51 %%*************************************************************************
b@12 52 %
b@12 53 %
b@12 54 % Changelog:
b@12 55 %
b@12 56 % 1.00 (2002/08/13) Initial release
b@12 57 %
b@12 58 % 1.10 (2002/09/27)
b@12 59 % 1. Corrected minor bug for improperly formed warning message when a
b@12 60 % book was not given a title. Thanks to Ming Kin Lai for reporting this.
b@12 61 % 2. Added support for CTLname_format_string and CTLname_latex_cmd fields
b@12 62 % in the BST control entry type.
b@12 63 %
b@12 64 % 1.11 (2003/04/02)
b@12 65 % 1. Fixed bug with URLs containing underscores when using url.sty. Thanks
b@12 66 % to Ming Kin Lai for reporting this.
b@12 67 %
b@12 68 % 1.12 (2007/01/11)
b@12 69 % 1. Fixed bug with unwanted comma before "et al." when an entry contained
b@12 70 % more than two author names. Thanks to Pallav Gupta for reporting this.
b@12 71 % 2. Fixed bug with anomalous closing quote in tech reports that have a
b@12 72 % type, but without a number or address. Thanks to Mehrdad Mirreza for
b@12 73 % reporting this.
b@12 74 % 3. Use braces in \providecommand in begin.bib to better support
b@12 75 % latex2html. TeX style length assignments OK with recent versions
b@12 76 % of latex2html - 1.71 (2002/2/1) or later is strongly recommended.
b@12 77 % Use of the language field still causes trouble with latex2html.
b@12 78 % Thanks to Federico Beffa for reporting this.
b@12 79 % 4. Added IEEEtran.bst ID and version comment string to .bbl output.
b@12 80 % 5. Provide a \BIBdecl hook that allows the user to execute commands
b@12 81 % just prior to the first entry.
b@12 82 % 6. Use default urlstyle (is using url.sty) of "same" rather than rm to
b@12 83 % better work with a wider variety of bibliography styles.
b@12 84 % 7. Changed month abbreviations from Sept., July and June to Sep., Jul.,
b@12 85 % and Jun., respectively, as IEEE now does. Thanks to Moritz Borgmann
b@12 86 % for reporting this.
b@12 87 % 8. Control entry types should not be considered when calculating longest
b@12 88 % label width.
b@12 89 % 9. Added alias www for electronic/online.
b@12 90 % 10. Added CTLname_url_prefix control entry type.
b@12 91
b@12 92
b@12 93 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 94 %% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %%
b@12 95 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 96
b@12 97 % These are the defaults for the user adjustable controls. The values used
b@12 98 % here can be overridden by the user via IEEEtranBSTCTL entry type.
b@12 99
b@12 100 % NOTE: The recommended LaTeX command to invoke a control entry type is:
b@12 101 %
b@12 102 %\makeatletter
b@12 103 %\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
b@12 104 %\def\@bstctlcite[#1]#2{\@bsphack
b@12 105 % \@for\@citeb:=#2\do{%
b@12 106 % \edef\@citeb{\expandafter\@firstofone\@citeb}%
b@12 107 % \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
b@12 108 % \@esphack}
b@12 109 %\makeatother
b@12 110 %
b@12 111 % It is called at the start of the document, before the first \cite, like:
b@12 112 % \bstctlcite{IEEEexample:BSTcontrol}
b@12 113 %
b@12 114 % IEEEtran.cls V1.6 and later does provide this command.
b@12 115
b@12 116
b@12 117
b@12 118 % #0 turns off the display of the number for articles.
b@12 119 % #1 enables
b@12 120 FUNCTION {default.is.use.number.for.article} { #1 }
b@12 121
b@12 122
b@12 123 % #0 turns off the display of the paper and type fields in @inproceedings.
b@12 124 % #1 enables
b@12 125 FUNCTION {default.is.use.paper} { #1 }
b@12 126
b@12 127
b@12 128 % #0 turns off the forced use of "et al."
b@12 129 % #1 enables
b@12 130 FUNCTION {default.is.forced.et.al} { #0 }
b@12 131
b@12 132 % The maximum number of names that can be present beyond which an "et al."
b@12 133 % usage is forced. Be sure that num.names.shown.with.forced.et.al (below)
b@12 134 % is not greater than this value!
b@12 135 % Note: There are many instances of references in IEEE journals which have
b@12 136 % a very large number of authors as well as instances in which "et al." is
b@12 137 % used profusely.
b@12 138 FUNCTION {default.max.num.names.before.forced.et.al} { #10 }
b@12 139
b@12 140 % The number of names that will be shown with a forced "et al.".
b@12 141 % Must be less than or equal to max.num.names.before.forced.et.al
b@12 142 FUNCTION {default.num.names.shown.with.forced.et.al} { #1 }
b@12 143
b@12 144
b@12 145 % #0 turns off the alternate interword spacing for entries with URLs.
b@12 146 % #1 enables
b@12 147 FUNCTION {default.is.use.alt.interword.spacing} { #1 }
b@12 148
b@12 149 % If alternate interword spacing for entries with URLs is enabled, this is
b@12 150 % the interword spacing stretch factor that will be used. For example, the
b@12 151 % default "4" here means that the interword spacing in entries with URLs can
b@12 152 % stretch to four times normal. Does not have to be an integer. Note that
b@12 153 % the value specified here can be overridden by the user in their LaTeX
b@12 154 % code via a command such as:
b@12 155 % "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to
b@12 156 % that via the IEEEtranBSTCTL entry type.
b@12 157 FUNCTION {default.ALTinterwordstretchfactor} { "4" }
b@12 158
b@12 159
b@12 160 % #0 turns off the "dashification" of repeated (i.e., identical to those
b@12 161 % of the previous entry) names. IEEE normally does this.
b@12 162 % #1 enables
b@12 163 FUNCTION {default.is.dash.repeated.names} { #1 }
b@12 164
b@12 165
b@12 166 % The default name format control string.
b@12 167 FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" }
b@12 168
b@12 169
b@12 170 % The default LaTeX font command for the names.
b@12 171 FUNCTION {default.name.latex.cmd}{ "" }
b@12 172
b@12 173
b@12 174 % The default URL prefix.
b@12 175 FUNCTION {default.name.url.prefix}{ "[Online]. Available:" }
b@12 176
b@12 177
b@12 178 % Other controls that cannot be accessed via IEEEtranBSTCTL entry type.
b@12 179
b@12 180 % #0 turns off the terminal startup banner/completed message so as to
b@12 181 % operate more quietly.
b@12 182 % #1 enables
b@12 183 FUNCTION {is.print.banners.to.terminal} { #1 }
b@12 184
b@12 185
b@12 186
b@12 187
b@12 188 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 189 %% FILE VERSION AND BANNER %%
b@12 190 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 191
b@12 192 FUNCTION{bst.file.version} { "1.12" }
b@12 193 FUNCTION{bst.file.date} { "2007/01/11" }
b@12 194 FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" }
b@12 195
b@12 196 FUNCTION {banner.message}
b@12 197 { is.print.banners.to.terminal
b@12 198 { "-- IEEEtran.bst version" " " * bst.file.version *
b@12 199 " (" * bst.file.date * ") " * "by Michael Shell." *
b@12 200 top$
b@12 201 "-- " bst.file.website *
b@12 202 top$
b@12 203 "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." *
b@12 204 top$
b@12 205 }
b@12 206 { skip$ }
b@12 207 if$
b@12 208 }
b@12 209
b@12 210 FUNCTION {completed.message}
b@12 211 { is.print.banners.to.terminal
b@12 212 { ""
b@12 213 top$
b@12 214 "Done."
b@12 215 top$
b@12 216 }
b@12 217 { skip$ }
b@12 218 if$
b@12 219 }
b@12 220
b@12 221
b@12 222
b@12 223
b@12 224 %%%%%%%%%%%%%%%%%%%%%%
b@12 225 %% STRING CONSTANTS %%
b@12 226 %%%%%%%%%%%%%%%%%%%%%%
b@12 227
b@12 228 FUNCTION {bbl.and}{ "and" }
b@12 229 FUNCTION {bbl.etal}{ "et~al." }
b@12 230 FUNCTION {bbl.editors}{ "eds." }
b@12 231 FUNCTION {bbl.editor}{ "ed." }
b@12 232 FUNCTION {bbl.edition}{ "ed." }
b@12 233 FUNCTION {bbl.volume}{ "vol." }
b@12 234 FUNCTION {bbl.of}{ "of" }
b@12 235 FUNCTION {bbl.number}{ "no." }
b@12 236 FUNCTION {bbl.in}{ "in" }
b@12 237 FUNCTION {bbl.pages}{ "pp." }
b@12 238 FUNCTION {bbl.page}{ "p." }
b@12 239 FUNCTION {bbl.chapter}{ "ch." }
b@12 240 FUNCTION {bbl.paper}{ "paper" }
b@12 241 FUNCTION {bbl.part}{ "pt." }
b@12 242 FUNCTION {bbl.patent}{ "Patent" }
b@12 243 FUNCTION {bbl.patentUS}{ "U.S." }
b@12 244 FUNCTION {bbl.revision}{ "Rev." }
b@12 245 FUNCTION {bbl.series}{ "ser." }
b@12 246 FUNCTION {bbl.standard}{ "Std." }
b@12 247 FUNCTION {bbl.techrep}{ "Tech. Rep." }
b@12 248 FUNCTION {bbl.mthesis}{ "Master's thesis" }
b@12 249 FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" }
b@12 250 FUNCTION {bbl.st}{ "st" }
b@12 251 FUNCTION {bbl.nd}{ "nd" }
b@12 252 FUNCTION {bbl.rd}{ "rd" }
b@12 253 FUNCTION {bbl.th}{ "th" }
b@12 254
b@12 255
b@12 256 % This is the LaTeX spacer that is used when a larger than normal space
b@12 257 % is called for (such as just before the address:publisher).
b@12 258 FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " }
b@12 259
b@12 260 % The LaTeX code for dashes that are used to represent repeated names.
b@12 261 % Note: Some older IEEE journals used something like
b@12 262 % "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along
b@12 263 % the baseline. However, IEEE now uses a thinner, above baseline,
b@12 264 % six dash long sequence.
b@12 265 FUNCTION {repeated.name.dashes} { "------" }
b@12 266
b@12 267
b@12 268
b@12 269 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 270 %% PREDEFINED STRING MACROS %%
b@12 271 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 272
b@12 273 MACRO {jan} {"Jan."}
b@12 274 MACRO {feb} {"Feb."}
b@12 275 MACRO {mar} {"Mar."}
b@12 276 MACRO {apr} {"Apr."}
b@12 277 MACRO {may} {"May"}
b@12 278 MACRO {jun} {"Jun."}
b@12 279 MACRO {jul} {"Jul."}
b@12 280 MACRO {aug} {"Aug."}
b@12 281 MACRO {sep} {"Sep."}
b@12 282 MACRO {oct} {"Oct."}
b@12 283 MACRO {nov} {"Nov."}
b@12 284 MACRO {dec} {"Dec."}
b@12 285
b@12 286
b@12 287
b@12 288 %%%%%%%%%%%%%%%%%%
b@12 289 %% ENTRY FIELDS %%
b@12 290 %%%%%%%%%%%%%%%%%%
b@12 291
b@12 292 ENTRY
b@12 293 { address
b@12 294 assignee
b@12 295 author
b@12 296 booktitle
b@12 297 chapter
b@12 298 day
b@12 299 dayfiled
b@12 300 edition
b@12 301 editor
b@12 302 howpublished
b@12 303 institution
b@12 304 intype
b@12 305 journal
b@12 306 key
b@12 307 language
b@12 308 month
b@12 309 monthfiled
b@12 310 nationality
b@12 311 note
b@12 312 number
b@12 313 organization
b@12 314 pages
b@12 315 paper
b@12 316 publisher
b@12 317 school
b@12 318 series
b@12 319 revision
b@12 320 title
b@12 321 type
b@12 322 url
b@12 323 volume
b@12 324 year
b@12 325 yearfiled
b@12 326 CTLuse_article_number
b@12 327 CTLuse_paper
b@12 328 CTLuse_forced_etal
b@12 329 CTLmax_names_forced_etal
b@12 330 CTLnames_show_etal
b@12 331 CTLuse_alt_spacing
b@12 332 CTLalt_stretch_factor
b@12 333 CTLdash_repeated_names
b@12 334 CTLname_format_string
b@12 335 CTLname_latex_cmd
b@12 336 CTLname_url_prefix
b@12 337 }
b@12 338 {}
b@12 339 { label }
b@12 340
b@12 341
b@12 342
b@12 343
b@12 344 %%%%%%%%%%%%%%%%%%%%%%%
b@12 345 %% INTEGER VARIABLES %%
b@12 346 %%%%%%%%%%%%%%%%%%%%%%%
b@12 347
b@12 348 INTEGERS { prev.status.punct this.status.punct punct.std
b@12 349 punct.no punct.comma punct.period
b@12 350 prev.status.space this.status.space space.std
b@12 351 space.no space.normal space.large
b@12 352 prev.status.quote this.status.quote quote.std
b@12 353 quote.no quote.close
b@12 354 prev.status.nline this.status.nline nline.std
b@12 355 nline.no nline.newblock
b@12 356 status.cap cap.std
b@12 357 cap.no cap.yes}
b@12 358
b@12 359 INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames }
b@12 360
b@12 361 INTEGERS { is.use.number.for.article
b@12 362 is.use.paper
b@12 363 is.forced.et.al
b@12 364 max.num.names.before.forced.et.al
b@12 365 num.names.shown.with.forced.et.al
b@12 366 is.use.alt.interword.spacing
b@12 367 is.dash.repeated.names}
b@12 368
b@12 369
b@12 370 %%%%%%%%%%%%%%%%%%%%%%
b@12 371 %% STRING VARIABLES %%
b@12 372 %%%%%%%%%%%%%%%%%%%%%%
b@12 373
b@12 374 STRINGS { bibinfo
b@12 375 longest.label
b@12 376 oldname
b@12 377 s
b@12 378 t
b@12 379 ALTinterwordstretchfactor
b@12 380 name.format.string
b@12 381 name.latex.cmd
b@12 382 name.url.prefix}
b@12 383
b@12 384
b@12 385
b@12 386
b@12 387 %%%%%%%%%%%%%%%%%%%%%%%%%
b@12 388 %% LOW LEVEL FUNCTIONS %%
b@12 389 %%%%%%%%%%%%%%%%%%%%%%%%%
b@12 390
b@12 391 FUNCTION {initialize.controls}
b@12 392 { default.is.use.number.for.article 'is.use.number.for.article :=
b@12 393 default.is.use.paper 'is.use.paper :=
b@12 394 default.is.forced.et.al 'is.forced.et.al :=
b@12 395 default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al :=
b@12 396 default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al :=
b@12 397 default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing :=
b@12 398 default.is.dash.repeated.names 'is.dash.repeated.names :=
b@12 399 default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor :=
b@12 400 default.name.format.string 'name.format.string :=
b@12 401 default.name.latex.cmd 'name.latex.cmd :=
b@12 402 default.name.url.prefix 'name.url.prefix :=
b@12 403 }
b@12 404
b@12 405
b@12 406 % This IEEEtran.bst features a very powerful and flexible mechanism for
b@12 407 % controlling the capitalization, punctuation, spacing, quotation, and
b@12 408 % newlines of the formatted entry fields. (Note: IEEEtran.bst does not need
b@12 409 % or use the newline/newblock feature, but it has been implemented for
b@12 410 % possible future use.) The output states of IEEEtran.bst consist of
b@12 411 % multiple independent attributes and, as such, can be thought of as being
b@12 412 % vectors, rather than the simple scalar values ("before.all",
b@12 413 % "mid.sentence", etc.) used in most other .bst files.
b@12 414 %
b@12 415 % The more flexible and complex design used here was motivated in part by
b@12 416 % IEEE's rather unusual bibliography style. For example, IEEE ends the
b@12 417 % previous field item with a period and large space prior to the publisher
b@12 418 % address; the @electronic entry types use periods as inter-item punctuation
b@12 419 % rather than the commas used by the other entry types; and URLs are never
b@12 420 % followed by periods even though they are the last item in the entry.
b@12 421 % Although it is possible to accommodate these features with the conventional
b@12 422 % output state system, the seemingly endless exceptions make for convoluted,
b@12 423 % unreliable and difficult to maintain code.
b@12 424 %
b@12 425 % IEEEtran.bst's output state system can be easily understood via a simple
b@12 426 % illustration of two most recently formatted entry fields (on the stack):
b@12 427 %
b@12 428 % CURRENT_ITEM
b@12 429 % "PREVIOUS_ITEM
b@12 430 %
b@12 431 % which, in this example, is to eventually appear in the bibliography as:
b@12 432 %
b@12 433 % "PREVIOUS_ITEM," CURRENT_ITEM
b@12 434 %
b@12 435 % It is the job of the output routine to take the previous item off of the
b@12 436 % stack (while leaving the current item at the top of the stack), apply its
b@12 437 % trailing punctuation (including closing quote marks) and spacing, and then
b@12 438 % to write the result to BibTeX's output buffer:
b@12 439 %
b@12 440 % "PREVIOUS_ITEM,"
b@12 441 %
b@12 442 % Punctuation (and spacing) between items is often determined by both of the
b@12 443 % items rather than just the first one. The presence of quotation marks
b@12 444 % further complicates the situation because, in standard English, trailing
b@12 445 % punctuation marks are supposed to be contained within the quotes.
b@12 446 %
b@12 447 % IEEEtran.bst maintains two output state (aka "status") vectors which
b@12 448 % correspond to the previous and current (aka "this") items. Each vector
b@12 449 % consists of several independent attributes which track punctuation,
b@12 450 % spacing, quotation, and newlines. Capitalization status is handled by a
b@12 451 % separate scalar because the format routines, not the output routine,
b@12 452 % handle capitalization and, therefore, there is no need to maintain the
b@12 453 % capitalization attribute for both the "previous" and "this" items.
b@12 454 %
b@12 455 % When a format routine adds a new item, it copies the current output status
b@12 456 % vector to the previous output status vector and (usually) resets the
b@12 457 % current (this) output status vector to a "standard status" vector. Using a
b@12 458 % "standard status" vector in this way allows us to redefine what we mean by
b@12 459 % "standard status" at the start of each entry handler and reuse the same
b@12 460 % format routines under the various inter-item separation schemes. For
b@12 461 % example, the standard status vector for the @book entry type may use
b@12 462 % commas for item separators, while the @electronic type may use periods,
b@12 463 % yet both entry handlers exploit many of the exact same format routines.
b@12 464 %
b@12 465 % Because format routines have write access to the output status vector of
b@12 466 % the previous item, they can override the punctuation choices of the
b@12 467 % previous format routine! Therefore, it becomes trivial to implement rules
b@12 468 % such as "Always use a period and a large space before the publisher." By
b@12 469 % pushing the generation of the closing quote mark to the output routine, we
b@12 470 % avoid all the problems caused by having to close a quote before having all
b@12 471 % the information required to determine what the punctuation should be.
b@12 472 %
b@12 473 % The IEEEtran.bst output state system can easily be expanded if needed.
b@12 474 % For instance, it is easy to add a "space.tie" attribute value if the
b@12 475 % bibliography rules mandate that two items have to be joined with an
b@12 476 % unbreakable space.
b@12 477
b@12 478 FUNCTION {initialize.status.constants}
b@12 479 { #0 'punct.no :=
b@12 480 #1 'punct.comma :=
b@12 481 #2 'punct.period :=
b@12 482 #0 'space.no :=
b@12 483 #1 'space.normal :=
b@12 484 #2 'space.large :=
b@12 485 #0 'quote.no :=
b@12 486 #1 'quote.close :=
b@12 487 #0 'cap.no :=
b@12 488 #1 'cap.yes :=
b@12 489 #0 'nline.no :=
b@12 490 #1 'nline.newblock :=
b@12 491 }
b@12 492
b@12 493 FUNCTION {std.status.using.comma}
b@12 494 { punct.comma 'punct.std :=
b@12 495 space.normal 'space.std :=
b@12 496 quote.no 'quote.std :=
b@12 497 nline.no 'nline.std :=
b@12 498 cap.no 'cap.std :=
b@12 499 }
b@12 500
b@12 501 FUNCTION {std.status.using.period}
b@12 502 { punct.period 'punct.std :=
b@12 503 space.normal 'space.std :=
b@12 504 quote.no 'quote.std :=
b@12 505 nline.no 'nline.std :=
b@12 506 cap.yes 'cap.std :=
b@12 507 }
b@12 508
b@12 509 FUNCTION {initialize.prev.this.status}
b@12 510 { punct.no 'prev.status.punct :=
b@12 511 space.no 'prev.status.space :=
b@12 512 quote.no 'prev.status.quote :=
b@12 513 nline.no 'prev.status.nline :=
b@12 514 punct.no 'this.status.punct :=
b@12 515 space.no 'this.status.space :=
b@12 516 quote.no 'this.status.quote :=
b@12 517 nline.no 'this.status.nline :=
b@12 518 cap.yes 'status.cap :=
b@12 519 }
b@12 520
b@12 521 FUNCTION {this.status.std}
b@12 522 { punct.std 'this.status.punct :=
b@12 523 space.std 'this.status.space :=
b@12 524 quote.std 'this.status.quote :=
b@12 525 nline.std 'this.status.nline :=
b@12 526 }
b@12 527
b@12 528 FUNCTION {cap.status.std}{ cap.std 'status.cap := }
b@12 529
b@12 530 FUNCTION {this.to.prev.status}
b@12 531 { this.status.punct 'prev.status.punct :=
b@12 532 this.status.space 'prev.status.space :=
b@12 533 this.status.quote 'prev.status.quote :=
b@12 534 this.status.nline 'prev.status.nline :=
b@12 535 }
b@12 536
b@12 537
b@12 538 FUNCTION {not}
b@12 539 { { #0 }
b@12 540 { #1 }
b@12 541 if$
b@12 542 }
b@12 543
b@12 544 FUNCTION {and}
b@12 545 { { skip$ }
b@12 546 { pop$ #0 }
b@12 547 if$
b@12 548 }
b@12 549
b@12 550 FUNCTION {or}
b@12 551 { { pop$ #1 }
b@12 552 { skip$ }
b@12 553 if$
b@12 554 }
b@12 555
b@12 556
b@12 557 % convert the strings "yes" or "no" to #1 or #0 respectively
b@12 558 FUNCTION {yes.no.to.int}
b@12 559 { "l" change.case$ duplicate$
b@12 560 "yes" =
b@12 561 { pop$ #1 }
b@12 562 { duplicate$ "no" =
b@12 563 { pop$ #0 }
b@12 564 { "unknown boolean " quote$ * swap$ * quote$ *
b@12 565 " in " * cite$ * warning$
b@12 566 #0
b@12 567 }
b@12 568 if$
b@12 569 }
b@12 570 if$
b@12 571 }
b@12 572
b@12 573
b@12 574 % pushes true if the single char string on the stack is in the
b@12 575 % range of "0" to "9"
b@12 576 FUNCTION {is.num}
b@12 577 { chr.to.int$
b@12 578 duplicate$ "0" chr.to.int$ < not
b@12 579 swap$ "9" chr.to.int$ > not and
b@12 580 }
b@12 581
b@12 582 % multiplies the integer on the stack by a factor of 10
b@12 583 FUNCTION {bump.int.mag}
b@12 584 { #0 'multiresult :=
b@12 585 { duplicate$ #0 > }
b@12 586 { #1 -
b@12 587 multiresult #10 +
b@12 588 'multiresult :=
b@12 589 }
b@12 590 while$
b@12 591 pop$
b@12 592 multiresult
b@12 593 }
b@12 594
b@12 595 % converts a single character string on the stack to an integer
b@12 596 FUNCTION {char.to.integer}
b@12 597 { duplicate$
b@12 598 is.num
b@12 599 { chr.to.int$ "0" chr.to.int$ - }
b@12 600 {"noninteger character " quote$ * swap$ * quote$ *
b@12 601 " in integer field of " * cite$ * warning$
b@12 602 #0
b@12 603 }
b@12 604 if$
b@12 605 }
b@12 606
b@12 607 % converts a string on the stack to an integer
b@12 608 FUNCTION {string.to.integer}
b@12 609 { duplicate$ text.length$ 'namesleft :=
b@12 610 #1 'nameptr :=
b@12 611 #0 'numnames :=
b@12 612 { nameptr namesleft > not }
b@12 613 { duplicate$ nameptr #1 substring$
b@12 614 char.to.integer numnames bump.int.mag +
b@12 615 'numnames :=
b@12 616 nameptr #1 +
b@12 617 'nameptr :=
b@12 618 }
b@12 619 while$
b@12 620 pop$
b@12 621 numnames
b@12 622 }
b@12 623
b@12 624
b@12 625
b@12 626
b@12 627 % The output routines write out the *next* to the top (previous) item on the
b@12 628 % stack, adding punctuation and such as needed. Since IEEEtran.bst maintains
b@12 629 % the output status for the top two items on the stack, these output
b@12 630 % routines have to consider the previous output status (which corresponds to
b@12 631 % the item that is being output). Full independent control of punctuation,
b@12 632 % closing quote marks, spacing, and newblock is provided.
b@12 633 %
b@12 634 % "output.nonnull" does not check for the presence of a previous empty
b@12 635 % item.
b@12 636 %
b@12 637 % "output" does check for the presence of a previous empty item and will
b@12 638 % remove an empty item rather than outputing it.
b@12 639 %
b@12 640 % "output.warn" is like "output", but will issue a warning if it detects
b@12 641 % an empty item.
b@12 642
b@12 643 FUNCTION {output.nonnull}
b@12 644 { swap$
b@12 645 prev.status.punct punct.comma =
b@12 646 { "," * }
b@12 647 { skip$ }
b@12 648 if$
b@12 649 prev.status.punct punct.period =
b@12 650 { add.period$ }
b@12 651 { skip$ }
b@12 652 if$
b@12 653 prev.status.quote quote.close =
b@12 654 { "''" * }
b@12 655 { skip$ }
b@12 656 if$
b@12 657 prev.status.space space.normal =
b@12 658 { " " * }
b@12 659 { skip$ }
b@12 660 if$
b@12 661 prev.status.space space.large =
b@12 662 { large.space * }
b@12 663 { skip$ }
b@12 664 if$
b@12 665 write$
b@12 666 prev.status.nline nline.newblock =
b@12 667 { newline$ "\newblock " write$ }
b@12 668 { skip$ }
b@12 669 if$
b@12 670 }
b@12 671
b@12 672 FUNCTION {output}
b@12 673 { duplicate$ empty$
b@12 674 'pop$
b@12 675 'output.nonnull
b@12 676 if$
b@12 677 }
b@12 678
b@12 679 FUNCTION {output.warn}
b@12 680 { 't :=
b@12 681 duplicate$ empty$
b@12 682 { pop$ "empty " t * " in " * cite$ * warning$ }
b@12 683 'output.nonnull
b@12 684 if$
b@12 685 }
b@12 686
b@12 687 % "fin.entry" is the output routine that handles the last item of the entry
b@12 688 % (which will be on the top of the stack when "fin.entry" is called).
b@12 689
b@12 690 FUNCTION {fin.entry}
b@12 691 { this.status.punct punct.no =
b@12 692 { skip$ }
b@12 693 { add.period$ }
b@12 694 if$
b@12 695 this.status.quote quote.close =
b@12 696 { "''" * }
b@12 697 { skip$ }
b@12 698 if$
b@12 699 write$
b@12 700 newline$
b@12 701 }
b@12 702
b@12 703
b@12 704 FUNCTION {is.last.char.not.punct}
b@12 705 { duplicate$
b@12 706 "}" * add.period$
b@12 707 #-1 #1 substring$ "." =
b@12 708 }
b@12 709
b@12 710 FUNCTION {is.multiple.pages}
b@12 711 { 't :=
b@12 712 #0 'multiresult :=
b@12 713 { multiresult not
b@12 714 t empty$ not
b@12 715 and
b@12 716 }
b@12 717 { t #1 #1 substring$
b@12 718 duplicate$ "-" =
b@12 719 swap$ duplicate$ "," =
b@12 720 swap$ "+" =
b@12 721 or or
b@12 722 { #1 'multiresult := }
b@12 723 { t #2 global.max$ substring$ 't := }
b@12 724 if$
b@12 725 }
b@12 726 while$
b@12 727 multiresult
b@12 728 }
b@12 729
b@12 730 FUNCTION {capitalize}{ "u" change.case$ "t" change.case$ }
b@12 731
b@12 732 FUNCTION {emphasize}
b@12 733 { duplicate$ empty$
b@12 734 { pop$ "" }
b@12 735 { "\emph{" swap$ * "}" * }
b@12 736 if$
b@12 737 }
b@12 738
b@12 739 FUNCTION {do.name.latex.cmd}
b@12 740 { name.latex.cmd
b@12 741 empty$
b@12 742 { skip$ }
b@12 743 { name.latex.cmd "{" * swap$ * "}" * }
b@12 744 if$
b@12 745 }
b@12 746
b@12 747 % IEEEtran.bst uses its own \BIBforeignlanguage command which directly
b@12 748 % invokes the TeX hyphenation patterns without the need of the Babel
b@12 749 % package. Babel does a lot more than switch hyphenation patterns and
b@12 750 % its loading can cause unintended effects in many class files (such as
b@12 751 % IEEEtran.cls).
b@12 752 FUNCTION {select.language}
b@12 753 { duplicate$ empty$ 'pop$
b@12 754 { language empty$ 'skip$
b@12 755 { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * }
b@12 756 if$
b@12 757 }
b@12 758 if$
b@12 759 }
b@12 760
b@12 761 FUNCTION {tie.or.space.prefix}
b@12 762 { duplicate$ text.length$ #3 <
b@12 763 { "~" }
b@12 764 { " " }
b@12 765 if$
b@12 766 swap$
b@12 767 }
b@12 768
b@12 769 FUNCTION {get.bbl.editor}
b@12 770 { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
b@12 771
b@12 772 FUNCTION {space.word}{ " " swap$ * " " * }
b@12 773
b@12 774
b@12 775 % Field Conditioners, Converters, Checkers and External Interfaces
b@12 776
b@12 777 FUNCTION {empty.field.to.null.string}
b@12 778 { duplicate$ empty$
b@12 779 { pop$ "" }
b@12 780 { skip$ }
b@12 781 if$
b@12 782 }
b@12 783
b@12 784 FUNCTION {either.or.check}
b@12 785 { empty$
b@12 786 { pop$ }
b@12 787 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
b@12 788 if$
b@12 789 }
b@12 790
b@12 791 FUNCTION {empty.entry.warn}
b@12 792 { author empty$ title empty$ howpublished empty$
b@12 793 month empty$ year empty$ note empty$ url empty$
b@12 794 and and and and and and
b@12 795 { "all relevant fields are empty in " cite$ * warning$ }
b@12 796 'skip$
b@12 797 if$
b@12 798 }
b@12 799
b@12 800
b@12 801 % The bibinfo system provides a way for the electronic parsing/acquisition
b@12 802 % of a bibliography's contents as is done by ReVTeX. For example, a field
b@12 803 % could be entered into the bibliography as:
b@12 804 % \bibinfo{volume}{2}
b@12 805 % Only the "2" would show up in the document, but the LaTeX \bibinfo command
b@12 806 % could do additional things with the information. IEEEtran.bst does provide
b@12 807 % a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is
b@12 808 % currently not used as the bogus bibinfo functions defined here output the
b@12 809 % entry values directly without the \bibinfo wrapper. The bibinfo functions
b@12 810 % themselves (and the calls to them) are retained for possible future use.
b@12 811 %
b@12 812 % bibinfo.check avoids acting on missing fields while bibinfo.warn will
b@12 813 % issue a warning message if a missing field is detected. Prior to calling
b@12 814 % the bibinfo functions, the user should push the field value and then its
b@12 815 % name string, in that order.
b@12 816
b@12 817 FUNCTION {bibinfo.check}
b@12 818 { swap$ duplicate$ missing$
b@12 819 { pop$ pop$ "" }
b@12 820 { duplicate$ empty$
b@12 821 { swap$ pop$ }
b@12 822 { swap$ pop$ }
b@12 823 if$
b@12 824 }
b@12 825 if$
b@12 826 }
b@12 827
b@12 828 FUNCTION {bibinfo.warn}
b@12 829 { swap$ duplicate$ missing$
b@12 830 { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" }
b@12 831 { duplicate$ empty$
b@12 832 { swap$ "empty " swap$ * " in " * cite$ * warning$ }
b@12 833 { swap$ pop$ }
b@12 834 if$
b@12 835 }
b@12 836 if$
b@12 837 }
b@12 838
b@12 839
b@12 840 % IEEE separates large numbers with more than 4 digits into groups of
b@12 841 % three. IEEE uses a small space to separate these number groups.
b@12 842 % Typical applications include patent and page numbers.
b@12 843
b@12 844 % number of consecutive digits required to trigger the group separation.
b@12 845 FUNCTION {large.number.trigger}{ #5 }
b@12 846
b@12 847 % For numbers longer than the trigger, this is the blocksize of the groups.
b@12 848 % The blocksize must be less than the trigger threshold, and 2 * blocksize
b@12 849 % must be greater than the trigger threshold (can't do more than one
b@12 850 % separation on the initial trigger).
b@12 851 FUNCTION {large.number.blocksize}{ #3 }
b@12 852
b@12 853 % What is actually inserted between the number groups.
b@12 854 FUNCTION {large.number.separator}{ "\," }
b@12 855
b@12 856 % So as to save on integer variables by reusing existing ones, numnames
b@12 857 % holds the current number of consecutive digits read and nameptr holds
b@12 858 % the number that will trigger an inserted space.
b@12 859 FUNCTION {large.number.separate}
b@12 860 { 't :=
b@12 861 ""
b@12 862 #0 'numnames :=
b@12 863 large.number.trigger 'nameptr :=
b@12 864 { t empty$ not }
b@12 865 { t #-1 #1 substring$ is.num
b@12 866 { numnames #1 + 'numnames := }
b@12 867 { #0 'numnames :=
b@12 868 large.number.trigger 'nameptr :=
b@12 869 }
b@12 870 if$
b@12 871 t #-1 #1 substring$ swap$ *
b@12 872 t #-2 global.max$ substring$ 't :=
b@12 873 numnames nameptr =
b@12 874 { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$
b@12 875 nameptr large.number.blocksize - #1 + global.max$ substring$
b@12 876 large.number.separator swap$ * *
b@12 877 nameptr large.number.blocksize - 'numnames :=
b@12 878 large.number.blocksize #1 + 'nameptr :=
b@12 879 }
b@12 880 { skip$ }
b@12 881 if$
b@12 882 }
b@12 883 while$
b@12 884 }
b@12 885
b@12 886 % Converts all single dashes "-" to double dashes "--".
b@12 887 FUNCTION {n.dashify}
b@12 888 { large.number.separate
b@12 889 't :=
b@12 890 ""
b@12 891 { t empty$ not }
b@12 892 { t #1 #1 substring$ "-" =
b@12 893 { t #1 #2 substring$ "--" = not
b@12 894 { "--" *
b@12 895 t #2 global.max$ substring$ 't :=
b@12 896 }
b@12 897 { { t #1 #1 substring$ "-" = }
b@12 898 { "-" *
b@12 899 t #2 global.max$ substring$ 't :=
b@12 900 }
b@12 901 while$
b@12 902 }
b@12 903 if$
b@12 904 }
b@12 905 { t #1 #1 substring$ *
b@12 906 t #2 global.max$ substring$ 't :=
b@12 907 }
b@12 908 if$
b@12 909 }
b@12 910 while$
b@12 911 }
b@12 912
b@12 913
b@12 914 % This function detects entries with names that are identical to that of
b@12 915 % the previous entry and replaces the repeated names with dashes (if the
b@12 916 % "is.dash.repeated.names" user control is nonzero).
b@12 917 FUNCTION {name.or.dash}
b@12 918 { 's :=
b@12 919 oldname empty$
b@12 920 { s 'oldname := s }
b@12 921 { s oldname =
b@12 922 { is.dash.repeated.names
b@12 923 { repeated.name.dashes }
b@12 924 { s 'oldname := s }
b@12 925 if$
b@12 926 }
b@12 927 { s 'oldname := s }
b@12 928 if$
b@12 929 }
b@12 930 if$
b@12 931 }
b@12 932
b@12 933 % Converts the number string on the top of the stack to
b@12 934 % "numerical ordinal form" (e.g., "7" to "7th"). There is
b@12 935 % no artificial limit to the upper bound of the numbers as the
b@12 936 % least significant digit always determines the ordinal form.
b@12 937 FUNCTION {num.to.ordinal}
b@12 938 { duplicate$ #-1 #1 substring$ "1" =
b@12 939 { bbl.st * }
b@12 940 { duplicate$ #-1 #1 substring$ "2" =
b@12 941 { bbl.nd * }
b@12 942 { duplicate$ #-1 #1 substring$ "3" =
b@12 943 { bbl.rd * }
b@12 944 { bbl.th * }
b@12 945 if$
b@12 946 }
b@12 947 if$
b@12 948 }
b@12 949 if$
b@12 950 }
b@12 951
b@12 952 % If the string on the top of the stack begins with a number,
b@12 953 % (e.g., 11th) then replace the string with the leading number
b@12 954 % it contains. Otherwise retain the string as-is. s holds the
b@12 955 % extracted number, t holds the part of the string that remains
b@12 956 % to be scanned.
b@12 957 FUNCTION {extract.num}
b@12 958 { duplicate$ 't :=
b@12 959 "" 's :=
b@12 960 { t empty$ not }
b@12 961 { t #1 #1 substring$
b@12 962 t #2 global.max$ substring$ 't :=
b@12 963 duplicate$ is.num
b@12 964 { s swap$ * 's := }
b@12 965 { pop$ "" 't := }
b@12 966 if$
b@12 967 }
b@12 968 while$
b@12 969 s empty$
b@12 970 'skip$
b@12 971 { pop$ s }
b@12 972 if$
b@12 973 }
b@12 974
b@12 975 % Converts the word number string on the top of the stack to
b@12 976 % Arabic string form. Will be successful up to "tenth".
b@12 977 FUNCTION {word.to.num}
b@12 978 { duplicate$ "l" change.case$ 's :=
b@12 979 s "first" =
b@12 980 { pop$ "1" }
b@12 981 { skip$ }
b@12 982 if$
b@12 983 s "second" =
b@12 984 { pop$ "2" }
b@12 985 { skip$ }
b@12 986 if$
b@12 987 s "third" =
b@12 988 { pop$ "3" }
b@12 989 { skip$ }
b@12 990 if$
b@12 991 s "fourth" =
b@12 992 { pop$ "4" }
b@12 993 { skip$ }
b@12 994 if$
b@12 995 s "fifth" =
b@12 996 { pop$ "5" }
b@12 997 { skip$ }
b@12 998 if$
b@12 999 s "sixth" =
b@12 1000 { pop$ "6" }
b@12 1001 { skip$ }
b@12 1002 if$
b@12 1003 s "seventh" =
b@12 1004 { pop$ "7" }
b@12 1005 { skip$ }
b@12 1006 if$
b@12 1007 s "eighth" =
b@12 1008 { pop$ "8" }
b@12 1009 { skip$ }
b@12 1010 if$
b@12 1011 s "ninth" =
b@12 1012 { pop$ "9" }
b@12 1013 { skip$ }
b@12 1014 if$
b@12 1015 s "tenth" =
b@12 1016 { pop$ "10" }
b@12 1017 { skip$ }
b@12 1018 if$
b@12 1019 }
b@12 1020
b@12 1021
b@12 1022 % Converts the string on the top of the stack to numerical
b@12 1023 % ordinal (e.g., "11th") form.
b@12 1024 FUNCTION {convert.edition}
b@12 1025 { duplicate$ empty$ 'skip$
b@12 1026 { duplicate$ #1 #1 substring$ is.num
b@12 1027 { extract.num
b@12 1028 num.to.ordinal
b@12 1029 }
b@12 1030 { word.to.num
b@12 1031 duplicate$ #1 #1 substring$ is.num
b@12 1032 { num.to.ordinal }
b@12 1033 { "edition ordinal word " quote$ * edition * quote$ *
b@12 1034 " may be too high (or improper) for conversion" * " in " * cite$ * warning$
b@12 1035 }
b@12 1036 if$
b@12 1037 }
b@12 1038 if$
b@12 1039 }
b@12 1040 if$
b@12 1041 }
b@12 1042
b@12 1043
b@12 1044
b@12 1045
b@12 1046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 1047 %% LATEX BIBLIOGRAPHY CODE %%
b@12 1048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b@12 1049
b@12 1050 FUNCTION {start.entry}
b@12 1051 { newline$
b@12 1052 "\bibitem{" write$
b@12 1053 cite$ write$
b@12 1054 "}" write$
b@12 1055 newline$
b@12 1056 ""
b@12 1057 initialize.prev.this.status
b@12 1058 }
b@12 1059
b@12 1060 % Here we write out all the LaTeX code that we will need. The most involved
b@12 1061 % code sequences are those that control the alternate interword spacing and
b@12 1062 % foreign language hyphenation patterns. The heavy use of \providecommand
b@12 1063 % gives users a way to override the defaults. Special thanks to Javier Bezos,
b@12 1064 % Johannes Braams, Robin Fairbairns, Heiko Oberdiek, Donald Arseneau and all
b@12 1065 % the other gurus on comp.text.tex for their help and advice on the topic of
b@12 1066 % \selectlanguage, Babel and BibTeX.
b@12 1067 FUNCTION {begin.bib}
b@12 1068 { "% Generated by IEEEtran.bst, version: " bst.file.version * " (" * bst.file.date * ")" *
b@12 1069 write$ newline$
b@12 1070 preamble$ empty$ 'skip$
b@12 1071 { preamble$ write$ newline$ }
b@12 1072 if$
b@12 1073 "\begin{thebibliography}{" longest.label * "}" *
b@12 1074 write$ newline$
b@12 1075 "\providecommand{\url}[1]{#1}"
b@12 1076 write$ newline$
b@12 1077 "\csname url@samestyle\endcsname"
b@12 1078 write$ newline$
b@12 1079 "\providecommand{\newblock}{\relax}"
b@12 1080 write$ newline$
b@12 1081 "\providecommand{\bibinfo}[2]{#2}"
b@12 1082 write$ newline$
b@12 1083 "\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}"
b@12 1084 write$ newline$
b@12 1085 "\providecommand{\BIBentryALTinterwordstretchfactor}{"
b@12 1086 ALTinterwordstretchfactor * "}" *
b@12 1087 write$ newline$
b@12 1088 "\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus "
b@12 1089 write$ newline$
b@12 1090 "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}"
b@12 1091 write$ newline$
b@12 1092 "\providecommand{\BIBforeignlanguage}[2]{{%"
b@12 1093 write$ newline$
b@12 1094 "\expandafter\ifx\csname l@#1\endcsname\relax"
b@12 1095 write$ newline$
b@12 1096 "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%"
b@12 1097 write$ newline$
b@12 1098 "\typeout{** loaded for the language `#1'. Using the pattern for}%"
b@12 1099 write$ newline$
b@12 1100 "\typeout{** the default language instead.}%"
b@12 1101 write$ newline$
b@12 1102 "\else"
b@12 1103 write$ newline$
b@12 1104 "\language=\csname l@#1\endcsname"
b@12 1105 write$ newline$
b@12 1106 "\fi"
b@12 1107 write$ newline$
b@12 1108 "#2}}"
b@12 1109 write$ newline$
b@12 1110 "\providecommand{\BIBdecl}{\relax}"
b@12 1111 write$ newline$
b@12 1112 "\BIBdecl"
b@12 1113 write$ newline$
b@12 1114 }
b@12 1115
b@12 1116 FUNCTION {end.bib}
b@12 1117 { newline$ "\end{thebibliography}" write$ newline$ }
b@12 1118
b@12 1119 FUNCTION {if.url.alt.interword.spacing}
b@12 1120 { is.use.alt.interword.spacing
b@12 1121 {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$}
b@12 1122 { skip$ }
b@12 1123 if$
b@12 1124 }
b@12 1125
b@12 1126 FUNCTION {if.url.std.interword.spacing}
b@12 1127 { is.use.alt.interword.spacing
b@12 1128 {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$}
b@12 1129 { skip$ }
b@12 1130 if$
b@12 1131 }
b@12 1132
b@12 1133
b@12 1134
b@12 1135
b@12 1136 %%%%%%%%%%%%%%%%%%%%%%%%
b@12 1137 %% LONGEST LABEL PASS %%
b@12 1138 %%%%%%%%%%%%%%%%%%%%%%%%
b@12 1139
b@12 1140 FUNCTION {initialize.longest.label}
b@12 1141 { "" 'longest.label :=
b@12 1142 #1 'number.label :=
b@12 1143 #0 'longest.label.width :=
b@12 1144 }
b@12 1145
b@12 1146 FUNCTION {longest.label.pass}
b@12 1147 { type$ "ieeetranbstctl" =
b@12 1148 { skip$ }
b@12 1149 { number.label int.to.str$ 'label :=
b@12 1150 number.label #1 + 'number.label :=
b@12 1151 label width$ longest.label.width >
b@12 1152 { label 'longest.label :=
b@12 1153 label width$ 'longest.label.width :=
b@12 1154 }
b@12 1155 { skip$ }
b@12 1156 if$
b@12 1157 }
b@12 1158 if$
b@12 1159 }
b@12 1160
b@12 1161
b@12 1162
b@12 1163
b@12 1164 %%%%%%%%%%%%%%%%%%%%%
b@12 1165 %% FORMAT HANDLERS %%
b@12 1166 %%%%%%%%%%%%%%%%%%%%%
b@12 1167
b@12 1168 %% Lower Level Formats (used by higher level formats)
b@12 1169
b@12 1170 FUNCTION {format.address.org.or.pub.date}
b@12 1171 { 't :=
b@12 1172 ""
b@12 1173 year empty$
b@12 1174 { "empty year in " cite$ * warning$ }
b@12 1175 { skip$ }
b@12 1176 if$
b@12 1177 address empty$ t empty$ and
b@12 1178 year empty$ and month empty$ and
b@12 1179 { skip$ }
b@12 1180 { this.to.prev.status
b@12 1181 this.status.std
b@12 1182 cap.status.std
b@12 1183 address "address" bibinfo.check *
b@12 1184 t empty$
b@12 1185 { skip$ }
b@12 1186 { punct.period 'prev.status.punct :=
b@12 1187 space.large 'prev.status.space :=
b@12 1188 address empty$
b@12 1189 { skip$ }
b@12 1190 { ": " * }
b@12 1191 if$
b@12 1192 t *
b@12 1193 }
b@12 1194 if$
b@12 1195 year empty$ month empty$ and
b@12 1196 { skip$ }
b@12 1197 { t empty$ address empty$ and
b@12 1198 { skip$ }
b@12 1199 { ", " * }
b@12 1200 if$
b@12 1201 month empty$
b@12 1202 { year empty$
b@12 1203 { skip$ }
b@12 1204 { year "year" bibinfo.check * }
b@12 1205 if$
b@12 1206 }
b@12 1207 { month "month" bibinfo.check *
b@12 1208 year empty$
b@12 1209 { skip$ }
b@12 1210 { " " * year "year" bibinfo.check * }
b@12 1211 if$
b@12 1212 }
b@12 1213 if$
b@12 1214 }
b@12 1215 if$
b@12 1216 }
b@12 1217 if$
b@12 1218 }
b@12 1219
b@12 1220
b@12 1221 FUNCTION {format.names}
b@12 1222 { 'bibinfo :=
b@12 1223 duplicate$ empty$ 'skip$ {
b@12 1224 this.to.prev.status
b@12 1225 this.status.std
b@12 1226 's :=
b@12 1227 "" 't :=
b@12 1228 #1 'nameptr :=
b@12 1229 s num.names$ 'numnames :=
b@12 1230 numnames 'namesleft :=
b@12 1231 { namesleft #0 > }
b@12 1232 { s nameptr
b@12 1233 name.format.string
b@12 1234 format.name$
b@12 1235 bibinfo bibinfo.check
b@12 1236 't :=
b@12 1237 nameptr #1 >
b@12 1238 { nameptr num.names.shown.with.forced.et.al #1 + =
b@12 1239 numnames max.num.names.before.forced.et.al >
b@12 1240 is.forced.et.al and and
b@12 1241 { "others" 't :=
b@12 1242 #1 'namesleft :=
b@12 1243 }
b@12 1244 { skip$ }
b@12 1245 if$
b@12 1246 namesleft #1 >
b@12 1247 { ", " * t do.name.latex.cmd * }
b@12 1248 { s nameptr "{ll}" format.name$ duplicate$ "others" =
b@12 1249 { 't := }
b@12 1250 { pop$ }
b@12 1251 if$
b@12 1252 t "others" =
b@12 1253 { " " * bbl.etal emphasize * }
b@12 1254 { numnames #2 >
b@12 1255 { "," * }
b@12 1256 { skip$ }
b@12 1257 if$
b@12 1258 bbl.and
b@12 1259 space.word * t do.name.latex.cmd *
b@12 1260 }
b@12 1261 if$
b@12 1262 }
b@12 1263 if$
b@12 1264 }
b@12 1265 { t do.name.latex.cmd }
b@12 1266 if$
b@12 1267 nameptr #1 + 'nameptr :=
b@12 1268 namesleft #1 - 'namesleft :=
b@12 1269 }
b@12 1270 while$
b@12 1271 cap.status.std
b@12 1272 } if$
b@12 1273 }
b@12 1274
b@12 1275
b@12 1276
b@12 1277
b@12 1278 %% Higher Level Formats
b@12 1279
b@12 1280 %% addresses/locations
b@12 1281
b@12 1282 FUNCTION {format.address}
b@12 1283 { address duplicate$ empty$ 'skip$
b@12 1284 { this.to.prev.status
b@12 1285 this.status.std
b@12 1286 cap.status.std
b@12 1287 }
b@12 1288 if$
b@12 1289 }
b@12 1290
b@12 1291
b@12 1292
b@12 1293 %% author/editor names
b@12 1294
b@12 1295 FUNCTION {format.authors}{ author "author" format.names }
b@12 1296
b@12 1297 FUNCTION {format.editors}
b@12 1298 { editor "editor" format.names duplicate$ empty$ 'skip$
b@12 1299 { ", " *
b@12 1300 get.bbl.editor
b@12 1301 capitalize
b@12 1302 *
b@12 1303 }
b@12 1304 if$
b@12 1305 }
b@12 1306
b@12 1307
b@12 1308
b@12 1309 %% date
b@12 1310
b@12 1311 FUNCTION {format.date}
b@12 1312 {
b@12 1313 month "month" bibinfo.check duplicate$ empty$
b@12 1314 year "year" bibinfo.check duplicate$ empty$
b@12 1315 { swap$ 'skip$
b@12 1316 { this.to.prev.status
b@12 1317 this.status.std
b@12 1318 cap.status.std
b@12 1319 "there's a month but no year in " cite$ * warning$ }
b@12 1320 if$
b@12 1321 *
b@12 1322 }
b@12 1323 { this.to.prev.status
b@12 1324 this.status.std
b@12 1325 cap.status.std
b@12 1326 swap$ 'skip$
b@12 1327 {
b@12 1328 swap$
b@12 1329 " " * swap$
b@12 1330 }
b@12 1331 if$
b@12 1332 *
b@12 1333 }
b@12 1334 if$
b@12 1335 }
b@12 1336
b@12 1337 FUNCTION {format.date.electronic}
b@12 1338 { month "month" bibinfo.check duplicate$ empty$
b@12 1339 year "year" bibinfo.check duplicate$ empty$
b@12 1340 { swap$
b@12 1341 { pop$ }
b@12 1342 { "there's a month but no year in " cite$ * warning$
b@12 1343 pop$ ")" * "(" swap$ *
b@12 1344 this.to.prev.status
b@12 1345 punct.no 'this.status.punct :=
b@12 1346 space.normal 'this.status.space :=
b@12 1347 quote.no 'this.status.quote :=
b@12 1348 cap.yes 'status.cap :=
b@12 1349 }
b@12 1350 if$
b@12 1351 }
b@12 1352 { swap$
b@12 1353 { swap$ pop$ ")" * "(" swap$ * }
b@12 1354 { "(" swap$ * ", " * swap$ * ")" * }
b@12 1355 if$
b@12 1356 this.to.prev.status
b@12 1357 punct.no 'this.status.punct :=
b@12 1358 space.normal 'this.status.space :=
b@12 1359 quote.no 'this.status.quote :=
b@12 1360 cap.yes 'status.cap :=
b@12 1361 }
b@12 1362 if$
b@12 1363 }
b@12 1364
b@12 1365
b@12 1366
b@12 1367 %% edition/title
b@12 1368
b@12 1369 % Note: IEEE considers the edition to be closely associated with
b@12 1370 % the title of a book. So, in IEEEtran.bst the edition is normally handled
b@12 1371 % within the formatting of the title. The format.edition function is
b@12 1372 % retained here for possible future use.
b@12 1373 FUNCTION {format.edition}
b@12 1374 { edition duplicate$ empty$ 'skip$
b@12 1375 { this.to.prev.status
b@12 1376 this.status.std
b@12 1377 convert.edition
b@12 1378 status.cap
b@12 1379 { "t" }
b@12 1380 { "l" }
b@12 1381 if$ change.case$
b@12 1382 "edition" bibinfo.check
b@12 1383 "~" * bbl.edition *
b@12 1384 cap.status.std
b@12 1385 }
b@12 1386 if$
b@12 1387 }
b@12 1388
b@12 1389 % This is used to format the booktitle of a conference proceedings.
b@12 1390 % Here we use the "intype" field to provide the user a way to
b@12 1391 % override the word "in" (e.g., with things like "presented at")
b@12 1392 % Use of intype stops the emphasis of the booktitle to indicate that
b@12 1393 % we no longer mean the written conference proceedings, but the
b@12 1394 % conference itself.
b@12 1395 FUNCTION {format.in.booktitle}
b@12 1396 { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
b@12 1397 { this.to.prev.status
b@12 1398 this.status.std
b@12 1399 select.language
b@12 1400 intype missing$
b@12 1401 { emphasize
b@12 1402 bbl.in " " *
b@12 1403 }
b@12 1404 { intype " " * }
b@12 1405 if$
b@12 1406 swap$ *
b@12 1407 cap.status.std
b@12 1408 }
b@12 1409 if$
b@12 1410 }
b@12 1411
b@12 1412 % This is used to format the booktitle of collection.
b@12 1413 % Here the "intype" field is not supported, but "edition" is.
b@12 1414 FUNCTION {format.in.booktitle.edition}
b@12 1415 { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$
b@12 1416 { this.to.prev.status
b@12 1417 this.status.std
b@12 1418 select.language
b@12 1419 emphasize
b@12 1420 edition empty$ 'skip$
b@12 1421 { ", " *
b@12 1422 edition
b@12 1423 convert.edition
b@12 1424 "l" change.case$
b@12 1425 * "~" * bbl.edition *
b@12 1426 }
b@12 1427 if$
b@12 1428 bbl.in " " * swap$ *
b@12 1429 cap.status.std
b@12 1430 }
b@12 1431 if$
b@12 1432 }
b@12 1433
b@12 1434 FUNCTION {format.article.title}
b@12 1435 { title duplicate$ empty$ 'skip$
b@12 1436 { this.to.prev.status
b@12 1437 this.status.std
b@12 1438 "t" change.case$
b@12 1439 }
b@12 1440 if$
b@12 1441 "title" bibinfo.check
b@12 1442 duplicate$ empty$ 'skip$
b@12 1443 { quote.close 'this.status.quote :=
b@12 1444 is.last.char.not.punct
b@12 1445 { punct.std 'this.status.punct := }
b@12 1446 { punct.no 'this.status.punct := }
b@12 1447 if$
b@12 1448 select.language
b@12 1449 "``" swap$ *
b@12 1450 cap.status.std
b@12 1451 }
b@12 1452 if$
b@12 1453 }
b@12 1454
b@12 1455 FUNCTION {format.article.title.electronic}
b@12 1456 { title duplicate$ empty$ 'skip$
b@12 1457 { this.to.prev.status
b@12 1458 this.status.std
b@12 1459 cap.status.std
b@12 1460 "t" change.case$
b@12 1461 }
b@12 1462 if$
b@12 1463 "title" bibinfo.check
b@12 1464 duplicate$ empty$
b@12 1465 { skip$ }
b@12 1466 { select.language }
b@12 1467 if$
b@12 1468 }
b@12 1469
b@12 1470 FUNCTION {format.book.title.edition}
b@12 1471 { title "title" bibinfo.check
b@12 1472 duplicate$ empty$
b@12 1473 { "empty title in " cite$ * warning$ }
b@12 1474 { this.to.prev.status
b@12 1475 this.status.std
b@12 1476 select.language
b@12 1477 emphasize
b@12 1478 edition empty$ 'skip$
b@12 1479 { ", " *
b@12 1480 edition
b@12 1481 convert.edition
b@12 1482 status.cap
b@12 1483 { "t" }
b@12 1484 { "l" }
b@12 1485 if$
b@12 1486 change.case$
b@12 1487 * "~" * bbl.edition *
b@12 1488 }
b@12 1489 if$
b@12 1490 cap.status.std
b@12 1491 }
b@12 1492 if$
b@12 1493 }
b@12 1494
b@12 1495 FUNCTION {format.book.title}
b@12 1496 { title "title" bibinfo.check
b@12 1497 duplicate$ empty$ 'skip$
b@12 1498 { this.to.prev.status
b@12 1499 this.status.std
b@12 1500 cap.status.std
b@12 1501 select.language
b@12 1502 emphasize
b@12 1503 }
b@12 1504 if$
b@12 1505 }
b@12 1506
b@12 1507
b@12 1508
b@12 1509 %% journal
b@12 1510
b@12 1511 FUNCTION {format.journal}
b@12 1512 { journal duplicate$ empty$ 'skip$
b@12 1513 { this.to.prev.status
b@12 1514 this.status.std
b@12 1515 cap.status.std
b@12 1516 select.language
b@12 1517 emphasize
b@12 1518 }
b@12 1519 if$
b@12 1520 }
b@12 1521
b@12 1522
b@12 1523
b@12 1524 %% how published
b@12 1525
b@12 1526 FUNCTION {format.howpublished}
b@12 1527 { howpublished duplicate$ empty$ 'skip$
b@12 1528 { this.to.prev.status
b@12 1529 this.status.std
b@12 1530 cap.status.std
b@12 1531 }
b@12 1532 if$
b@12 1533 }
b@12 1534
b@12 1535
b@12 1536
b@12 1537 %% institutions/organization/publishers/school
b@12 1538
b@12 1539 FUNCTION {format.institution}
b@12 1540 { institution duplicate$ empty$ 'skip$
b@12 1541 { this.to.prev.status
b@12 1542 this.status.std
b@12 1543 cap.status.std
b@12 1544 }
b@12 1545 if$
b@12 1546 }
b@12 1547
b@12 1548 FUNCTION {format.organization}
b@12 1549 { organization duplicate$ empty$ 'skip$
b@12 1550 { this.to.prev.status
b@12 1551 this.status.std
b@12 1552 cap.status.std
b@12 1553 }
b@12 1554 if$
b@12 1555 }
b@12 1556
b@12 1557 FUNCTION {format.address.publisher.date}
b@12 1558 { publisher "publisher" bibinfo.warn format.address.org.or.pub.date }
b@12 1559
b@12 1560 FUNCTION {format.address.publisher.date.nowarn}
b@12 1561 { publisher "publisher" bibinfo.check format.address.org.or.pub.date }
b@12 1562
b@12 1563 FUNCTION {format.address.organization.date}
b@12 1564 { organization "organization" bibinfo.check format.address.org.or.pub.date }
b@12 1565
b@12 1566 FUNCTION {format.school}
b@12 1567 { school duplicate$ empty$ 'skip$
b@12 1568 { this.to.prev.status
b@12 1569 this.status.std
b@12 1570 cap.status.std
b@12 1571 }
b@12 1572 if$
b@12 1573 }
b@12 1574
b@12 1575
b@12 1576
b@12 1577 %% volume/number/series/chapter/pages
b@12 1578
b@12 1579 FUNCTION {format.volume}
b@12 1580 { volume empty.field.to.null.string
b@12 1581 duplicate$ empty$ 'skip$
b@12 1582 { this.to.prev.status
b@12 1583 this.status.std
b@12 1584 bbl.volume
b@12 1585 status.cap
b@12 1586 { capitalize }
b@12 1587 { skip$ }
b@12 1588 if$
b@12 1589 swap$ tie.or.space.prefix
b@12 1590 "volume" bibinfo.check
b@12 1591 * *
b@12 1592 cap.status.std
b@12 1593 }
b@12 1594 if$
b@12 1595 }
b@12 1596
b@12 1597 FUNCTION {format.number}
b@12 1598 { number empty.field.to.null.string
b@12 1599 duplicate$ empty$ 'skip$
b@12 1600 { this.to.prev.status
b@12 1601 this.status.std
b@12 1602 status.cap
b@12 1603 { bbl.number capitalize }
b@12 1604 { bbl.number }
b@12 1605 if$
b@12 1606 swap$ tie.or.space.prefix
b@12 1607 "number" bibinfo.check
b@12 1608 * *
b@12 1609 cap.status.std
b@12 1610 }
b@12 1611 if$
b@12 1612 }
b@12 1613
b@12 1614 FUNCTION {format.number.if.use.for.article}
b@12 1615 { is.use.number.for.article
b@12 1616 { format.number }
b@12 1617 { "" }
b@12 1618 if$
b@12 1619 }
b@12 1620
b@12 1621 % IEEE does not seem to tie the series so closely with the volume
b@12 1622 % and number as is done in other bibliography styles. Instead the
b@12 1623 % series is treated somewhat like an extension of the title.
b@12 1624 FUNCTION {format.series}
b@12 1625 { series empty$
b@12 1626 { "" }
b@12 1627 { this.to.prev.status
b@12 1628 this.status.std
b@12 1629 bbl.series " " *
b@12 1630 series "series" bibinfo.check *
b@12 1631 cap.status.std
b@12 1632 }
b@12 1633 if$
b@12 1634 }
b@12 1635
b@12 1636
b@12 1637 FUNCTION {format.chapter}
b@12 1638 { chapter empty$
b@12 1639 { "" }
b@12 1640 { this.to.prev.status
b@12 1641 this.status.std
b@12 1642 type empty$
b@12 1643 { bbl.chapter }
b@12 1644 { type "l" change.case$
b@12 1645 "type" bibinfo.check
b@12 1646 }
b@12 1647 if$
b@12 1648 chapter tie.or.space.prefix
b@12 1649 "chapter" bibinfo.check
b@12 1650 * *
b@12 1651 cap.status.std
b@12 1652 }
b@12 1653 if$
b@12 1654 }
b@12 1655
b@12 1656
b@12 1657 % The intended use of format.paper is for paper numbers of inproceedings.
b@12 1658 % The paper type can be overridden via the type field.
b@12 1659 % We allow the type to be displayed even if the paper number is absent
b@12 1660 % for things like "postdeadline paper"
b@12 1661 FUNCTION {format.paper}
b@12 1662 { is.use.paper
b@12 1663 { paper empty$
b@12 1664 { type empty$
b@12 1665 { "" }
b@12 1666 { this.to.prev.status
b@12 1667 this.status.std
b@12 1668 type "type" bibinfo.check
b@12 1669 cap.status.std
b@12 1670 }
b@12 1671 if$
b@12 1672 }
b@12 1673 { this.to.prev.status
b@12 1674 this.status.std
b@12 1675 type empty$
b@12 1676 { bbl.paper }
b@12 1677 { type "type" bibinfo.check }
b@12 1678 if$
b@12 1679 " " * paper
b@12 1680 "paper" bibinfo.check
b@12 1681 *
b@12 1682 cap.status.std
b@12 1683 }
b@12 1684 if$
b@12 1685 }
b@12 1686 { "" }
b@12 1687 if$
b@12 1688 }
b@12 1689
b@12 1690
b@12 1691 FUNCTION {format.pages}
b@12 1692 { pages duplicate$ empty$ 'skip$
b@12 1693 { this.to.prev.status
b@12 1694 this.status.std
b@12 1695 duplicate$ is.multiple.pages
b@12 1696 {
b@12 1697 bbl.pages swap$
b@12 1698 n.dashify
b@12 1699 }
b@12 1700 {
b@12 1701 bbl.page swap$
b@12 1702 }
b@12 1703 if$
b@12 1704 tie.or.space.prefix
b@12 1705 "pages" bibinfo.check
b@12 1706 * *
b@12 1707 cap.status.std
b@12 1708 }
b@12 1709 if$
b@12 1710 }
b@12 1711
b@12 1712
b@12 1713
b@12 1714 %% technical report number
b@12 1715
b@12 1716 FUNCTION {format.tech.report.number}
b@12 1717 { number "number" bibinfo.check
b@12 1718 this.to.prev.status
b@12 1719 this.status.std
b@12 1720 cap.status.std
b@12 1721 type duplicate$ empty$
b@12 1722 { pop$
b@12 1723 bbl.techrep
b@12 1724 }
b@12 1725 { skip$ }
b@12 1726 if$
b@12 1727 "type" bibinfo.check
b@12 1728 swap$ duplicate$ empty$
b@12 1729 { pop$ }
b@12 1730 { tie.or.space.prefix * * }
b@12 1731 if$
b@12 1732 }
b@12 1733
b@12 1734
b@12 1735
b@12 1736 %% note
b@12 1737
b@12 1738 FUNCTION {format.note}
b@12 1739 { note empty$
b@12 1740 { "" }
b@12 1741 { this.to.prev.status
b@12 1742 this.status.std
b@12 1743 punct.period 'this.status.punct :=
b@12 1744 note #1 #1 substring$
b@12 1745 duplicate$ "{" =
b@12 1746 { skip$ }
b@12 1747 { status.cap
b@12 1748 { "u" }
b@12 1749 { "l" }
b@12 1750 if$
b@12 1751 change.case$
b@12 1752 }
b@12 1753 if$
b@12 1754 note #2 global.max$ substring$ * "note" bibinfo.check
b@12 1755 cap.yes 'status.cap :=
b@12 1756 }
b@12 1757 if$
b@12 1758 }
b@12 1759
b@12 1760
b@12 1761
b@12 1762 %% patent
b@12 1763
b@12 1764 FUNCTION {format.patent.date}
b@12 1765 { this.to.prev.status
b@12 1766 this.status.std
b@12 1767 year empty$
b@12 1768 { monthfiled duplicate$ empty$
b@12 1769 { "monthfiled" bibinfo.check pop$ "" }
b@12 1770 { "monthfiled" bibinfo.check }
b@12 1771 if$
b@12 1772 dayfiled duplicate$ empty$
b@12 1773 { "dayfiled" bibinfo.check pop$ "" * }
b@12 1774 { "dayfiled" bibinfo.check
b@12 1775 monthfiled empty$
b@12 1776 { "dayfiled without a monthfiled in " cite$ * warning$
b@12 1777 *
b@12 1778 }
b@12 1779 { " " swap$ * * }
b@12 1780 if$
b@12 1781 }
b@12 1782 if$
b@12 1783 yearfiled empty$
b@12 1784 { "no year or yearfiled in " cite$ * warning$ }
b@12 1785 { yearfiled "yearfiled" bibinfo.check
b@12 1786 swap$
b@12 1787 duplicate$ empty$
b@12 1788 { pop$ }
b@12 1789 { ", " * swap$ * }
b@12 1790 if$
b@12 1791 }
b@12 1792 if$
b@12 1793 }
b@12 1794 { month duplicate$ empty$
b@12 1795 { "month" bibinfo.check pop$ "" }
b@12 1796 { "month" bibinfo.check }
b@12 1797 if$
b@12 1798 day duplicate$ empty$
b@12 1799 { "day" bibinfo.check pop$ "" * }
b@12 1800 { "day" bibinfo.check
b@12 1801 month empty$
b@12 1802 { "day without a month in " cite$ * warning$
b@12 1803 *
b@12 1804 }
b@12 1805 { " " swap$ * * }
b@12 1806 if$
b@12 1807 }
b@12 1808 if$
b@12 1809 year "year" bibinfo.check
b@12 1810 swap$
b@12 1811 duplicate$ empty$
b@12 1812 { pop$ }
b@12 1813 { ", " * swap$ * }
b@12 1814 if$
b@12 1815 }
b@12 1816 if$
b@12 1817 cap.status.std
b@12 1818 }
b@12 1819
b@12 1820 FUNCTION {format.patent.nationality.type.number}
b@12 1821 { this.to.prev.status
b@12 1822 this.status.std
b@12 1823 nationality duplicate$ empty$
b@12 1824 { "nationality" bibinfo.warn pop$ "" }
b@12 1825 { "nationality" bibinfo.check
b@12 1826 duplicate$ "l" change.case$ "united states" =
b@12 1827 { pop$ bbl.patentUS }
b@12 1828 { skip$ }
b@12 1829 if$
b@12 1830 " " *
b@12 1831 }
b@12 1832 if$
b@12 1833 type empty$
b@12 1834 { bbl.patent "type" bibinfo.check }
b@12 1835 { type "type" bibinfo.check }
b@12 1836 if$
b@12 1837 *
b@12 1838 number duplicate$ empty$
b@12 1839 { "number" bibinfo.warn pop$ }
b@12 1840 { "number" bibinfo.check
b@12 1841 large.number.separate
b@12 1842 swap$ " " * swap$ *
b@12 1843 }
b@12 1844 if$
b@12 1845 cap.status.std
b@12 1846 }
b@12 1847
b@12 1848
b@12 1849
b@12 1850 %% standard
b@12 1851
b@12 1852 FUNCTION {format.organization.institution.standard.type.number}
b@12 1853 { this.to.prev.status
b@12 1854 this.status.std
b@12 1855 organization duplicate$ empty$
b@12 1856 { pop$
b@12 1857 institution duplicate$ empty$
b@12 1858 { "institution" bibinfo.warn }
b@12 1859 { "institution" bibinfo.warn " " * }
b@12 1860 if$
b@12 1861 }
b@12 1862 { "organization" bibinfo.warn " " * }
b@12 1863 if$
b@12 1864 type empty$
b@12 1865 { bbl.standard "type" bibinfo.check }
b@12 1866 { type "type" bibinfo.check }
b@12 1867 if$
b@12 1868 *
b@12 1869 number duplicate$ empty$
b@12 1870 { "number" bibinfo.check pop$ }
b@12 1871 { "number" bibinfo.check
b@12 1872 large.number.separate
b@12 1873 swap$ " " * swap$ *
b@12 1874 }
b@12 1875 if$
b@12 1876 cap.status.std
b@12 1877 }
b@12 1878
b@12 1879 FUNCTION {format.revision}
b@12 1880 { revision empty$
b@12 1881 { "" }
b@12 1882 { this.to.prev.status
b@12 1883 this.status.std
b@12 1884 bbl.revision
b@12 1885 revision tie.or.space.prefix
b@12 1886 "revision" bibinfo.check
b@12 1887 * *
b@12 1888 cap.status.std
b@12 1889 }
b@12 1890 if$
b@12 1891 }
b@12 1892
b@12 1893
b@12 1894 %% thesis
b@12 1895
b@12 1896 FUNCTION {format.master.thesis.type}
b@12 1897 { this.to.prev.status
b@12 1898 this.status.std
b@12 1899 type empty$
b@12 1900 {
b@12 1901 bbl.mthesis
b@12 1902 }
b@12 1903 {
b@12 1904 type "type" bibinfo.check
b@12 1905 }
b@12 1906 if$
b@12 1907 cap.status.std
b@12 1908 }
b@12 1909
b@12 1910 FUNCTION {format.phd.thesis.type}
b@12 1911 { this.to.prev.status
b@12 1912 this.status.std
b@12 1913 type empty$
b@12 1914 {
b@12 1915 bbl.phdthesis
b@12 1916 }
b@12 1917 {
b@12 1918 type "type" bibinfo.check
b@12 1919 }
b@12 1920 if$
b@12 1921 cap.status.std
b@12 1922 }
b@12 1923
b@12 1924
b@12 1925
b@12 1926 %% URL
b@12 1927
b@12 1928 FUNCTION {format.url}
b@12 1929 { url empty$
b@12 1930 { "" }
b@12 1931 { this.to.prev.status
b@12 1932 this.status.std
b@12 1933 cap.yes 'status.cap :=
b@12 1934 name.url.prefix " " *
b@12 1935 "\url{" * url * "}" *
b@12 1936 punct.no 'this.status.punct :=
b@12 1937 punct.period 'prev.status.punct :=
b@12 1938 space.normal 'this.status.space :=
b@12 1939 space.normal 'prev.status.space :=
b@12 1940 quote.no 'this.status.quote :=
b@12 1941 }
b@12 1942 if$
b@12 1943 }
b@12 1944
b@12 1945
b@12 1946
b@12 1947
b@12 1948 %%%%%%%%%%%%%%%%%%%%
b@12 1949 %% ENTRY HANDLERS %%
b@12 1950 %%%%%%%%%%%%%%%%%%%%
b@12 1951
b@12 1952
b@12 1953 % Note: In many journals, IEEE (or the authors) tend not to show the number
b@12 1954 % for articles, so the display of the number is controlled here by the
b@12 1955 % switch "is.use.number.for.article"
b@12 1956 FUNCTION {article}
b@12 1957 { std.status.using.comma
b@12 1958 start.entry
b@12 1959 if.url.alt.interword.spacing
b@12 1960 format.authors "author" output.warn
b@12 1961 name.or.dash
b@12 1962 format.article.title "title" output.warn
b@12 1963 format.journal "journal" bibinfo.check "journal" output.warn
b@12 1964 format.volume output
b@12 1965 format.number.if.use.for.article output
b@12 1966 format.pages output
b@12 1967 format.date "year" output.warn
b@12 1968 format.note output
b@12 1969 format.url output
b@12 1970 fin.entry
b@12 1971 if.url.std.interword.spacing
b@12 1972 }
b@12 1973
b@12 1974 FUNCTION {book}
b@12 1975 { std.status.using.comma
b@12 1976 start.entry
b@12 1977 if.url.alt.interword.spacing
b@12 1978 author empty$
b@12 1979 { format.editors "author and editor" output.warn }
b@12 1980 { format.authors output.nonnull }
b@12 1981 if$
b@12 1982 name.or.dash
b@12 1983 format.book.title.edition output
b@12 1984 format.series output
b@12 1985 author empty$
b@12 1986 { skip$ }
b@12 1987 { format.editors output }
b@12 1988 if$
b@12 1989 format.address.publisher.date output
b@12 1990 format.volume output
b@12 1991 format.number output
b@12 1992 format.note output
b@12 1993 format.url output
b@12 1994 fin.entry
b@12 1995 if.url.std.interword.spacing
b@12 1996 }
b@12 1997
b@12 1998 FUNCTION {booklet}
b@12 1999 { std.status.using.comma
b@12 2000 start.entry
b@12 2001 if.url.alt.interword.spacing
b@12 2002 format.authors output
b@12 2003 name.or.dash
b@12 2004 format.article.title "title" output.warn
b@12 2005 format.howpublished "howpublished" bibinfo.check output
b@12 2006 format.organization "organization" bibinfo.check output
b@12 2007 format.address "address" bibinfo.check output
b@12 2008 format.date output
b@12 2009 format.note output
b@12 2010 format.url output
b@12 2011 fin.entry
b@12 2012 if.url.std.interword.spacing
b@12 2013 }
b@12 2014
b@12 2015 FUNCTION {electronic}
b@12 2016 { std.status.using.period
b@12 2017 start.entry
b@12 2018 if.url.alt.interword.spacing
b@12 2019 format.authors output
b@12 2020 name.or.dash
b@12 2021 format.date.electronic output
b@12 2022 format.article.title.electronic output
b@12 2023 format.howpublished "howpublished" bibinfo.check output
b@12 2024 format.organization "organization" bibinfo.check output
b@12 2025 format.address "address" bibinfo.check output
b@12 2026 format.note output
b@12 2027 format.url output
b@12 2028 fin.entry
b@12 2029 empty.entry.warn
b@12 2030 if.url.std.interword.spacing
b@12 2031 }
b@12 2032
b@12 2033 FUNCTION {inbook}
b@12 2034 { std.status.using.comma
b@12 2035 start.entry
b@12 2036 if.url.alt.interword.spacing
b@12 2037 author empty$
b@12 2038 { format.editors "author and editor" output.warn }
b@12 2039 { format.authors output.nonnull }
b@12 2040 if$
b@12 2041 name.or.dash
b@12 2042 format.book.title.edition output
b@12 2043 format.series output
b@12 2044 format.address.publisher.date output
b@12 2045 format.volume output
b@12 2046 format.number output
b@12 2047 format.chapter output
b@12 2048 format.pages output
b@12 2049 format.note output
b@12 2050 format.url output
b@12 2051 fin.entry
b@12 2052 if.url.std.interword.spacing
b@12 2053 }
b@12 2054
b@12 2055 FUNCTION {incollection}
b@12 2056 { std.status.using.comma
b@12 2057 start.entry
b@12 2058 if.url.alt.interword.spacing
b@12 2059 format.authors "author" output.warn
b@12 2060 name.or.dash
b@12 2061 format.article.title "title" output.warn
b@12 2062 format.in.booktitle.edition "booktitle" output.warn
b@12 2063 format.series output
b@12 2064 format.editors output
b@12 2065 format.address.publisher.date.nowarn output
b@12 2066 format.volume output
b@12 2067 format.number output
b@12 2068 format.chapter output
b@12 2069 format.pages output
b@12 2070 format.note output
b@12 2071 format.url output
b@12 2072 fin.entry
b@12 2073 if.url.std.interword.spacing
b@12 2074 }
b@12 2075
b@12 2076 FUNCTION {inproceedings}
b@12 2077 { std.status.using.comma
b@12 2078 start.entry
b@12 2079 if.url.alt.interword.spacing
b@12 2080 format.authors "author" output.warn
b@12 2081 name.or.dash
b@12 2082 format.article.title "title" output.warn
b@12 2083 format.in.booktitle "booktitle" output.warn
b@12 2084 format.series output
b@12 2085 format.editors output
b@12 2086 format.volume output
b@12 2087 format.number output
b@12 2088 publisher empty$
b@12 2089 { format.address.organization.date output }
b@12 2090 { format.organization "organization" bibinfo.check output
b@12 2091 format.address.publisher.date output
b@12 2092 }
b@12 2093 if$
b@12 2094 format.paper output
b@12 2095 format.pages output
b@12 2096 format.note output
b@12 2097 format.url output
b@12 2098 fin.entry
b@12 2099 if.url.std.interword.spacing
b@12 2100 }
b@12 2101
b@12 2102 FUNCTION {manual}
b@12 2103 { std.status.using.comma
b@12 2104 start.entry
b@12 2105 if.url.alt.interword.spacing
b@12 2106 format.authors output
b@12 2107 name.or.dash
b@12 2108 format.book.title.edition "title" output.warn
b@12 2109 format.howpublished "howpublished" bibinfo.check output
b@12 2110 format.organization "organization" bibinfo.check output
b@12 2111 format.address "address" bibinfo.check output
b@12 2112 format.date output
b@12 2113 format.note output
b@12 2114 format.url output
b@12 2115 fin.entry
b@12 2116 if.url.std.interword.spacing
b@12 2117 }
b@12 2118
b@12 2119 FUNCTION {mastersthesis}
b@12 2120 { std.status.using.comma
b@12 2121 start.entry
b@12 2122 if.url.alt.interword.spacing
b@12 2123 format.authors "author" output.warn
b@12 2124 name.or.dash
b@12 2125 format.article.title "title" output.warn
b@12 2126 format.master.thesis.type output.nonnull
b@12 2127 format.school "school" bibinfo.warn output
b@12 2128 format.address "address" bibinfo.check output
b@12 2129 format.date "year" output.warn
b@12 2130 format.note output
b@12 2131 format.url output
b@12 2132 fin.entry
b@12 2133 if.url.std.interword.spacing
b@12 2134 }
b@12 2135
b@12 2136 FUNCTION {misc}
b@12 2137 { std.status.using.comma
b@12 2138 start.entry
b@12 2139 if.url.alt.interword.spacing
b@12 2140 format.authors output
b@12 2141 name.or.dash
b@12 2142 format.article.title output
b@12 2143 format.howpublished "howpublished" bibinfo.check output
b@12 2144 format.organization "organization" bibinfo.check output
b@12 2145 format.address "address" bibinfo.check output
b@12 2146 format.pages output
b@12 2147 format.date output
b@12 2148 format.note output
b@12 2149 format.url output
b@12 2150 fin.entry
b@12 2151 empty.entry.warn
b@12 2152 if.url.std.interword.spacing
b@12 2153 }
b@12 2154
b@12 2155 FUNCTION {patent}
b@12 2156 { std.status.using.comma
b@12 2157 start.entry
b@12 2158 if.url.alt.interword.spacing
b@12 2159 format.authors output
b@12 2160 name.or.dash
b@12 2161 format.article.title output
b@12 2162 format.patent.nationality.type.number output
b@12 2163 format.patent.date output
b@12 2164 format.note output
b@12 2165 format.url output
b@12 2166 fin.entry
b@12 2167 empty.entry.warn
b@12 2168 if.url.std.interword.spacing
b@12 2169 }
b@12 2170
b@12 2171 FUNCTION {periodical}
b@12 2172 { std.status.using.comma
b@12 2173 start.entry
b@12 2174 if.url.alt.interword.spacing
b@12 2175 format.editors output
b@12 2176 name.or.dash
b@12 2177 format.book.title "title" output.warn
b@12 2178 format.series output
b@12 2179 format.volume output
b@12 2180 format.number output
b@12 2181 format.organization "organization" bibinfo.check output
b@12 2182 format.date "year" output.warn
b@12 2183 format.note output
b@12 2184 format.url output
b@12 2185 fin.entry
b@12 2186 if.url.std.interword.spacing
b@12 2187 }
b@12 2188
b@12 2189 FUNCTION {phdthesis}
b@12 2190 { std.status.using.comma
b@12 2191 start.entry
b@12 2192 if.url.alt.interword.spacing
b@12 2193 format.authors "author" output.warn
b@12 2194 name.or.dash
b@12 2195 format.article.title "title" output.warn
b@12 2196 format.phd.thesis.type output.nonnull
b@12 2197 format.school "school" bibinfo.warn output
b@12 2198 format.address "address" bibinfo.check output
b@12 2199 format.date "year" output.warn
b@12 2200 format.note output
b@12 2201 format.url output
b@12 2202 fin.entry
b@12 2203 if.url.std.interword.spacing
b@12 2204 }
b@12 2205
b@12 2206 FUNCTION {proceedings}
b@12 2207 { std.status.using.comma
b@12 2208 start.entry
b@12 2209 if.url.alt.interword.spacing
b@12 2210 format.editors output
b@12 2211 name.or.dash
b@12 2212 format.book.title "title" output.warn
b@12 2213 format.series output
b@12 2214 format.volume output
b@12 2215 format.number output
b@12 2216 publisher empty$
b@12 2217 { format.address.organization.date output }
b@12 2218 { format.organization "organization" bibinfo.check output
b@12 2219 format.address.publisher.date output
b@12 2220 }
b@12 2221 if$
b@12 2222 format.note output
b@12 2223 format.url output
b@12 2224 fin.entry
b@12 2225 if.url.std.interword.spacing
b@12 2226 }
b@12 2227
b@12 2228 FUNCTION {standard}
b@12 2229 { std.status.using.comma
b@12 2230 start.entry
b@12 2231 if.url.alt.interword.spacing
b@12 2232 format.authors output
b@12 2233 name.or.dash
b@12 2234 format.book.title "title" output.warn
b@12 2235 format.howpublished "howpublished" bibinfo.check output
b@12 2236 format.organization.institution.standard.type.number output
b@12 2237 format.revision output
b@12 2238 format.date output
b@12 2239 format.note output
b@12 2240 format.url output
b@12 2241 fin.entry
b@12 2242 if.url.std.interword.spacing
b@12 2243 }
b@12 2244
b@12 2245 FUNCTION {techreport}
b@12 2246 { std.status.using.comma
b@12 2247 start.entry
b@12 2248 if.url.alt.interword.spacing
b@12 2249 format.authors "author" output.warn
b@12 2250 name.or.dash
b@12 2251 format.article.title "title" output.warn
b@12 2252 format.howpublished "howpublished" bibinfo.check output
b@12 2253 format.institution "institution" bibinfo.warn output
b@12 2254 format.address "address" bibinfo.check output
b@12 2255 format.tech.report.number output.nonnull
b@12 2256 format.date "year" output.warn
b@12 2257 format.note output
b@12 2258 format.url output
b@12 2259 fin.entry
b@12 2260 if.url.std.interword.spacing
b@12 2261 }
b@12 2262
b@12 2263 FUNCTION {unpublished}
b@12 2264 { std.status.using.comma
b@12 2265 start.entry
b@12 2266 if.url.alt.interword.spacing
b@12 2267 format.authors "author" output.warn
b@12 2268 name.or.dash
b@12 2269 format.article.title "title" output.warn
b@12 2270 format.date output
b@12 2271 format.note "note" output.warn
b@12 2272 format.url output
b@12 2273 fin.entry
b@12 2274 if.url.std.interword.spacing
b@12 2275 }
b@12 2276
b@12 2277
b@12 2278 % The special entry type which provides the user interface to the
b@12 2279 % BST controls
b@12 2280 FUNCTION {IEEEtranBSTCTL}
b@12 2281 { is.print.banners.to.terminal
b@12 2282 { "** IEEEtran BST control entry " quote$ * cite$ * quote$ * " detected." *
b@12 2283 top$
b@12 2284 }
b@12 2285 { skip$ }
b@12 2286 if$
b@12 2287 CTLuse_article_number
b@12 2288 empty$
b@12 2289 { skip$ }
b@12 2290 { CTLuse_article_number
b@12 2291 yes.no.to.int
b@12 2292 'is.use.number.for.article :=
b@12 2293 }
b@12 2294 if$
b@12 2295 CTLuse_paper
b@12 2296 empty$
b@12 2297 { skip$ }
b@12 2298 { CTLuse_paper
b@12 2299 yes.no.to.int
b@12 2300 'is.use.paper :=
b@12 2301 }
b@12 2302 if$
b@12 2303 CTLuse_forced_etal
b@12 2304 empty$
b@12 2305 { skip$ }
b@12 2306 { CTLuse_forced_etal
b@12 2307 yes.no.to.int
b@12 2308 'is.forced.et.al :=
b@12 2309 }
b@12 2310 if$
b@12 2311 CTLmax_names_forced_etal
b@12 2312 empty$
b@12 2313 { skip$ }
b@12 2314 { CTLmax_names_forced_etal
b@12 2315 string.to.integer
b@12 2316 'max.num.names.before.forced.et.al :=
b@12 2317 }
b@12 2318 if$
b@12 2319 CTLnames_show_etal
b@12 2320 empty$
b@12 2321 { skip$ }
b@12 2322 { CTLnames_show_etal
b@12 2323 string.to.integer
b@12 2324 'num.names.shown.with.forced.et.al :=
b@12 2325 }
b@12 2326 if$
b@12 2327 CTLuse_alt_spacing
b@12 2328 empty$
b@12 2329 { skip$ }
b@12 2330 { CTLuse_alt_spacing
b@12 2331 yes.no.to.int
b@12 2332 'is.use.alt.interword.spacing :=
b@12 2333 }
b@12 2334 if$
b@12 2335 CTLalt_stretch_factor
b@12 2336 empty$
b@12 2337 { skip$ }
b@12 2338 { CTLalt_stretch_factor
b@12 2339 'ALTinterwordstretchfactor :=
b@12 2340 "\renewcommand{\BIBentryALTinterwordstretchfactor}{"
b@12 2341 ALTinterwordstretchfactor * "}" *
b@12 2342 write$ newline$
b@12 2343 }
b@12 2344 if$
b@12 2345 CTLdash_repeated_names
b@12 2346 empty$
b@12 2347 { skip$ }
b@12 2348 { CTLdash_repeated_names
b@12 2349 yes.no.to.int
b@12 2350 'is.dash.repeated.names :=
b@12 2351 }
b@12 2352 if$
b@12 2353 CTLname_format_string
b@12 2354 empty$
b@12 2355 { skip$ }
b@12 2356 { CTLname_format_string
b@12 2357 'name.format.string :=
b@12 2358 }
b@12 2359 if$
b@12 2360 CTLname_latex_cmd
b@12 2361 empty$
b@12 2362 { skip$ }
b@12 2363 { CTLname_latex_cmd
b@12 2364 'name.latex.cmd :=
b@12 2365 }
b@12 2366 if$
b@12 2367 CTLname_url_prefix
b@12 2368 missing$
b@12 2369 { skip$ }
b@12 2370 { CTLname_url_prefix
b@12 2371 'name.url.prefix :=
b@12 2372 }
b@12 2373 if$
b@12 2374
b@12 2375
b@12 2376 num.names.shown.with.forced.et.al max.num.names.before.forced.et.al >
b@12 2377 { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$
b@12 2378 max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al :=
b@12 2379 }
b@12 2380 { skip$ }
b@12 2381 if$
b@12 2382 }
b@12 2383
b@12 2384
b@12 2385 %%%%%%%%%%%%%%%%%%%
b@12 2386 %% ENTRY ALIASES %%
b@12 2387 %%%%%%%%%%%%%%%%%%%
b@12 2388 FUNCTION {conference}{inproceedings}
b@12 2389 FUNCTION {online}{electronic}
b@12 2390 FUNCTION {internet}{electronic}
b@12 2391 FUNCTION {webpage}{electronic}
b@12 2392 FUNCTION {www}{electronic}
b@12 2393 FUNCTION {default.type}{misc}
b@12 2394
b@12 2395
b@12 2396
b@12 2397 %%%%%%%%%%%%%%%%%%
b@12 2398 %% MAIN PROGRAM %%
b@12 2399 %%%%%%%%%%%%%%%%%%
b@12 2400
b@12 2401 READ
b@12 2402
b@12 2403 EXECUTE {initialize.controls}
b@12 2404 EXECUTE {initialize.status.constants}
b@12 2405 EXECUTE {banner.message}
b@12 2406
b@12 2407 EXECUTE {initialize.longest.label}
b@12 2408 ITERATE {longest.label.pass}
b@12 2409
b@12 2410 EXECUTE {begin.bib}
b@12 2411 ITERATE {call.type$}
b@12 2412 EXECUTE {end.bib}
b@12 2413
b@12 2414 EXECUTE{completed.message}
b@12 2415
b@12 2416
b@12 2417 %% That's all folks, mds.