annotate docs/SMC15/IEEEtran.bst @ 789:3539d6c992e4

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