annotate docs/SMC15/IEEEtran.bst @ 1037:309a63c5d360

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