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