555
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2425 lines
58 KiB

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