annotate docs/SMC15/IEEEtran.bst @ 1079:24eeac8994bf

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