annotate smc2012/IEEEtran.bst @ 58:a63c438b3f65 tip

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