annotate SMC2015latex/IEEEtran.bst @ 65:d756734b5dd9

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