annotate docs/SMC15/IEEEtran.bst @ 1011:2df5ba8845b3

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