Debian Codegraph @

texmf-dist/bibtex/bst/mciteplus/IEEEtranMN.bst

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