IEEEtran.bst 60 KB

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