Advertisement
Guest User

Untitled

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