annotate IEEEtran.bst @ 75:8a146c651475 tip

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