iopart-num.bst 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722
  1. % iopart-num.bst -- BibTeX style for IOP journals (Harvard-like numeric style)
  2. % M. A. Caprio
  3. %
  4. % DESCRIPTION
  5. %
  6. % Further documenation may be found in iopart-num.pdf.
  7. %
  8. % Available from CTAN as /biblio/bibtex/contrib/iopart-num.
  9. %
  10. % COPYRIGHT/LICENSE
  11. %
  12. % Copyright 2009 M. A. Caprio
  13. %
  14. % This work may be distributed and/or modified under the
  15. % conditions of the LaTeX Project Public License, either
  16. % version 1.3 of this license or (at your option) any later
  17. % version. The latest version of this license is in
  18. % http://www.latex-project.org/lppl.txt
  19. % and version 1.3 or later is part of all distributions of
  20. % LaTeX version 2005/12/01 or later.
  21. %
  22. % This work has the LPPL maintenance status "maintained".
  23. %
  24. % The Current Maintainer of this work is the author.
  25. %
  26. % The contents of this work are listed in the README file.
  27. %
  28. % HISTORY
  29. %
  30. % Version 1.0 (2005/07/11)
  31. % Created using custom-bib (merlin.mbs), with following manual modifications:
  32. % -- remove trailing period from predefined volume, page, etc., abbreviations
  33. % -- provide command \newblock to fix incompatibility between natbib
  34. % and iopart (as of iopart version 1996/06/10)
  35. % -- move edition after booktitle
  36. % -- add version identifier to generated output
  37. % -- for incollection and inproceedings, move volume from after publisher to before
  38. % -- for any series with number, number after series
  39. % Version 2.0 (2006/12/21)
  40. % -- define section field for proper formatting of lettered journal sections
  41. % (suggested by Chris Latham)
  42. % -- suppress printing of number for article, but provide issue field
  43. % for periodicals with issue-based page numbering (suggested by Chris Latham)
  44. % -- patch remove.dots to not strip "\." control sequence (bug reported by Kevin Bube)
  45. % -- define epilog field (undocumented)
  46. % -- delete predefined computer science journal names
  47. % -- bring book volume+number or series+number formatting into IOP form
  48. % -- for book, inbook, and proceedings with editors but no author, fix formating of editors
  49. % -- for incollection and inproceedings, put editors in correct location
  50. % -- for journal: use same page formatting even if volume missing
  51. % Version 2.1 (2009/01/22)
  52. % -- for incollection and inproceedings: support title of chapter (not appropriate
  53. % to inbook)
  54. % -- for book, proceedings, etc.: support volumetitle for multivolume book
  55. %
  56. % LIMITATIONS
  57. %
  58. % Still not in IOP form:
  59. % -- for incollection and inproceedings, editors initials should preceed rather
  60. % than follow last name
  61. % Other:
  62. % -- hyphenated first names lose hyphen
  63. %% This is file `iopart-num.bst',
  64. %% generated with the docstrip utility.
  65. %%
  66. %% The original source files were:
  67. %%
  68. %% merlin.mbs (with options: `seq-no,nm-rv,dt-beg,yr-blk,xmth,yrp-x,jtit-x,vol-bf,volp-blk,num-xser,jnm-x,add-pub,pub-par,pre-pub,isbn,issn,blk-com,com-blank,fin-bare,pp,ed,abr,ednx,mth-bare,ord,jabr,and-xcom,etal-it,revdata,eprint,url,url-blk')
  69. %% ----------------------------------------
  70. %% *** Institute of Physics (IOP) journals; Harvard-like numeric style ***
  71. %%
  72. %% Copyright 1994-2002 Patrick W Daly
  73. % ===============================================================
  74. % IMPORTANT NOTICE:
  75. % This bibliographic style (bst) file has been generated from one or
  76. % more master bibliographic style (mbs) files, listed above.
  77. %
  78. % This generated file can be redistributed and/or modified under the terms
  79. % of the LaTeX Project Public License Distributed from CTAN
  80. % archives in directory macros/latex/base/lppl.txt; either
  81. % version 1 of the License, or any later version.
  82. % ===============================================================
  83. % Name and version information of the main mbs file:
  84. % \ProvidesFile{merlin.mbs}[2002/10/21 4.05 (PWD, AO, DPC)]
  85. % For use with BibTeX version 0.99a or later
  86. %-------------------------------------------------------------------
  87. % This bibliography style file is intended for texts in ENGLISH
  88. % This is a numerical citation style, and as such is standard LaTeX.
  89. % It requires no extra package to interface to the main text.
  90. % The form of the \bibitem entries is
  91. % \bibitem{key}...
  92. % Usage of \cite is as follows:
  93. % \cite{key} ==>> [#]
  94. % \cite[chap. 2]{key} ==>> [#, chap. 2]
  95. % where # is a number determined by the ordering in the reference list.
  96. % The order in the reference list is that by which the works were originally
  97. % cited in the text, or that in the database.
  98. %---------------------------------------------------------------------
  99. ENTRY
  100. { address
  101. archive
  102. author
  103. booktitle
  104. chapter
  105. collaboration
  106. edition
  107. editor
  108. eid
  109. eprint
  110. howpublished
  111. institution
  112. isbn
  113. issn
  114. journal
  115. key
  116. month
  117. note
  118. number
  119. numpages
  120. organization
  121. pages
  122. publisher
  123. school
  124. series
  125. title
  126. type
  127. url
  128. volume
  129. year
  130. %mc
  131. issue
  132. section
  133. epilog
  134. volumetitle
  135. transjournal
  136. transsection
  137. transvolume
  138. transnumber
  139. transissue
  140. transpages
  141. transyear
  142. }
  143. {}
  144. { label }
  145. FUNCTION {not}
  146. { { #0 }
  147. { #1 }
  148. if$
  149. }
  150. FUNCTION {and}
  151. { 'skip$
  152. { pop$ #0 }
  153. if$
  154. }
  155. FUNCTION {or}
  156. { { pop$ #1 }
  157. 'skip$
  158. if$
  159. }
  160. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  161. % mc utilities
  162. % require merlin.mbs logical operators and field.or.null
  163. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  164. % hang -- {hang} suspends execution, for debugging purposes
  165. % Note that not all pending output may have been flushed.
  166. FUNCTION {hang}
  167. {
  168. {#1} {skip$} while$
  169. }
  170. % string.length -- {s string.length} returns the true character length of s
  171. % In contrast, text.length$ gives special treatment to LaTeX
  172. % accents ("special characters") and braces.
  173. % Example: "" string.length -> 0
  174. % Example: "hello" string.length -> 5
  175. STRINGS {string.length.s }
  176. INTEGERS {string.length.i }
  177. FUNCTION {string.length}
  178. {
  179. 'string.length.s :=
  180. #0 'string.length.i :=
  181. {
  182. string.length.s #1 #1 substring$ "" = not
  183. }
  184. {
  185. string.length.i #1 + 'string.length.i :=
  186. string.length.s #2 global.max$ substring$ 'string.length.s :=
  187. }
  188. while$
  189. string.length.i
  190. }
  191. % shared working variables for stripping functions
  192. STRINGS { strip.s strip.t }
  193. INTEGERS { strip.i }
  194. % strip.leading -- {s t strip.leading} strips t from s if it appears
  195. % as an initial substring
  196. % Example: "abcdef" "abc" strip.leading -> "def"
  197. % Example: "abcdef" "xyz" strip.leading -> "abcdef"
  198. FUNCTION{strip.leading}
  199. {
  200. 'strip.t :=
  201. 'strip.s :=
  202. strip.t string.length 'strip.i :=
  203. strip.s #1 strip.i substring$ strip.t =
  204. { strip.s strip.i #1 + global.max$ substring$ }
  205. { strip.s }
  206. if$
  207. }
  208. % strip.trailing -- {s t strip.trailing} strips t from s if it appears
  209. % as a terminal substring
  210. % Example: "abcdef" "def" strip.trailing -> "abc"
  211. % Example: "abcdef" "xyz" strip.trailing -> "abcdef"
  212. FUNCTION{strip.trailing}
  213. {
  214. 'strip.t :=
  215. 'strip.s :=
  216. strip.t string.length 'strip.i :=
  217. strip.s #-1 strip.i substring$ strip.t =
  218. { strip.s #-1 strip.i - global.max$ substring$ }
  219. { strip.s }
  220. if$
  221. }
  222. % trim -- {s trim} strips any trailing whitespace from s
  223. % Example: "abcdef " trim -> "abcdef"
  224. STRINGS {trim.s trim.t}
  225. FUNCTION{trim}
  226. {
  227. 'trim.s :=
  228. {
  229. trim.s #-1 #1 substring$ 'trim.t :=
  230. trim.t empty$ trim.t string.length #0 > and
  231. }
  232. { trim.s #-2 global.max$ substring$ 'trim.s := }
  233. while$
  234. trim.s
  235. }
  236. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  237. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  238. FUNCTION {init.state.consts}
  239. { #0 'before.all :=
  240. #1 'mid.sentence :=
  241. #2 'after.sentence :=
  242. #3 'after.block :=
  243. }
  244. STRINGS { s t}
  245. FUNCTION {output.nonnull}
  246. { 's :=
  247. output.state mid.sentence =
  248. { " " * write$ }
  249. { output.state after.block =
  250. { add.period$ write$
  251. newline$
  252. "\newblock " write$
  253. }
  254. { output.state before.all =
  255. 'write$
  256. { add.period$ " " * write$ }
  257. if$
  258. }
  259. if$
  260. mid.sentence 'output.state :=
  261. }
  262. if$
  263. s
  264. }
  265. FUNCTION {output}
  266. { duplicate$ empty$
  267. 'pop$
  268. 'output.nonnull
  269. if$
  270. }
  271. FUNCTION {output.check}
  272. { 't :=
  273. duplicate$ empty$
  274. { pop$ "empty " t * " in " * cite$ * warning$ }
  275. 'output.nonnull
  276. if$
  277. }
  278. %mc
  279. FUNCTION {format.epilog}
  280. { epilog duplicate$ empty$
  281. { pop$ }
  282. { * }
  283. if$
  284. }
  285. %mc end
  286. FUNCTION {fin.entry}
  287. {
  288. %mc
  289. format.epilog
  290. %mc end
  291. duplicate$ empty$
  292. 'pop$
  293. 'write$
  294. if$
  295. newline$
  296. }
  297. FUNCTION {new.block}
  298. { output.state before.all =
  299. 'skip$
  300. { after.block 'output.state := }
  301. if$
  302. }
  303. FUNCTION {new.sentence}
  304. { output.state after.block =
  305. 'skip$
  306. { output.state before.all =
  307. 'skip$
  308. { after.sentence 'output.state := }
  309. if$
  310. }
  311. if$
  312. }
  313. FUNCTION {add.blank}
  314. { " " * before.all 'output.state :=
  315. }
  316. FUNCTION {date.block}
  317. {
  318. add.blank
  319. }
  320. STRINGS {z}
  321. FUNCTION {remove.dots}
  322. { 'z :=
  323. ""
  324. { z empty$ not }
  325. {
  326. %mc patch to preserve the control sequence \. if it appears in a name
  327. z #1 #2 substring$ "\." =
  328. {
  329. % process "\." sequence
  330. z #3 global.max$ substring$ 'z :=
  331. "\." *
  332. }
  333. {
  334. % process regular character
  335. z #1 #1 substring$
  336. z #2 global.max$ substring$ 'z :=
  337. duplicate$ "." = 'pop$
  338. { * }
  339. if$
  340. }
  341. if$
  342. %mc
  343. }
  344. while$
  345. }
  346. FUNCTION {new.block.checka}
  347. { empty$
  348. 'skip$
  349. 'new.block
  350. if$
  351. }
  352. FUNCTION {new.block.checkb}
  353. { empty$
  354. swap$ empty$
  355. and
  356. 'skip$
  357. 'new.block
  358. if$
  359. }
  360. FUNCTION {new.sentence.checka}
  361. { empty$
  362. 'skip$
  363. 'new.sentence
  364. if$
  365. }
  366. FUNCTION {new.sentence.checkb}
  367. { empty$
  368. swap$ empty$
  369. and
  370. 'skip$
  371. 'new.sentence
  372. if$
  373. }
  374. FUNCTION {field.or.null}
  375. { duplicate$ empty$
  376. { pop$ "" }
  377. 'skip$
  378. if$
  379. }
  380. FUNCTION {emphasize}
  381. { duplicate$ empty$
  382. { pop$ "" }
  383. { "{\em " swap$ * "\/}" * }
  384. if$
  385. }
  386. FUNCTION {bolden}
  387. { duplicate$ empty$
  388. { pop$ "" }
  389. { "{\bf " swap$ * "}" * }
  390. if$
  391. }
  392. FUNCTION {tie.or.space.prefix}
  393. { duplicate$ text.length$ #3 <
  394. { "~" }
  395. { " " }
  396. if$
  397. swap$
  398. }
  399. FUNCTION {capitalize}
  400. { "u" change.case$ "t" change.case$ }
  401. FUNCTION {space.word}
  402. { " " swap$ * " " * }
  403. % Here are the language-specific definitions for explicit words.
  404. % Each function has a name bbl.xxx where xxx is the English word.
  405. % The language selected here is ENGLISH
  406. FUNCTION {bbl.and}
  407. { "and"}
  408. FUNCTION {bbl.etal}
  409. { "et~al." }
  410. FUNCTION {bbl.editors}
  411. { "eds" }
  412. FUNCTION {bbl.editor}
  413. { "ed" }
  414. FUNCTION {bbl.edby}
  415. { "edited by" }
  416. FUNCTION {bbl.edition}
  417. { "ed" }
  418. FUNCTION {bbl.volume}
  419. { "vol" }
  420. FUNCTION {bbl.of}
  421. { "of" }
  422. FUNCTION {bbl.number}
  423. { "no" }
  424. FUNCTION {bbl.nr}
  425. { "no" }
  426. FUNCTION {bbl.in}
  427. { "in" }
  428. FUNCTION {bbl.pages}
  429. { "pp" }
  430. FUNCTION {bbl.page}
  431. { "p" }
  432. FUNCTION {bbl.eidpp}
  433. { "pages" }
  434. FUNCTION {bbl.chapter}
  435. { "chap" }
  436. FUNCTION {bbl.techrep}
  437. { "Tech. Rep." }
  438. FUNCTION {bbl.mthesis}
  439. { "Master's thesis" }
  440. FUNCTION {bbl.phdthesis}
  441. { "Ph.D. thesis" }
  442. FUNCTION {bbl.first}
  443. { "1st" }
  444. FUNCTION {bbl.second}
  445. { "2nd" }
  446. FUNCTION {bbl.third}
  447. { "3rd" }
  448. FUNCTION {bbl.fourth}
  449. { "4th" }
  450. FUNCTION {bbl.fifth}
  451. { "5th" }
  452. FUNCTION {bbl.st}
  453. { "st" }
  454. FUNCTION {bbl.nd}
  455. { "nd" }
  456. FUNCTION {bbl.rd}
  457. { "rd" }
  458. FUNCTION {bbl.th}
  459. { "th" }
  460. MACRO {jan} {"Jan."}
  461. MACRO {feb} {"Feb."}
  462. MACRO {mar} {"Mar."}
  463. MACRO {apr} {"Apr."}
  464. MACRO {may} {"May"}
  465. MACRO {jun} {"Jun."}
  466. MACRO {jul} {"Jul."}
  467. MACRO {aug} {"Aug."}
  468. MACRO {sep} {"Sep."}
  469. MACRO {oct} {"Oct."}
  470. MACRO {nov} {"Nov."}
  471. MACRO {dec} {"Dec."}
  472. FUNCTION {eng.ord}
  473. { duplicate$ "1" swap$ *
  474. #-2 #1 substring$ "1" =
  475. { bbl.th * }
  476. { duplicate$ #-1 #1 substring$
  477. duplicate$ "1" =
  478. { pop$ bbl.st * }
  479. { duplicate$ "2" =
  480. { pop$ bbl.nd * }
  481. { "3" =
  482. { bbl.rd * }
  483. { bbl.th * }
  484. if$
  485. }
  486. if$
  487. }
  488. if$
  489. }
  490. if$
  491. }
  492. FUNCTION {bibinfo.check}
  493. { swap$
  494. duplicate$ missing$
  495. {
  496. pop$ pop$
  497. ""
  498. }
  499. { duplicate$ empty$
  500. {
  501. swap$ pop$
  502. }
  503. { swap$
  504. pop$
  505. }
  506. if$
  507. }
  508. if$
  509. }
  510. FUNCTION {bibinfo.warn}
  511. { swap$
  512. duplicate$ missing$
  513. {
  514. swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
  515. ""
  516. }
  517. { duplicate$ empty$
  518. {
  519. swap$ "empty " swap$ * " in " * cite$ * warning$
  520. }
  521. { swap$
  522. pop$
  523. }
  524. if$
  525. }
  526. if$
  527. }
  528. %% FUNCTION {format.eprint}
  529. %% { eprint duplicate$ empty$
  530. %% 'skip$
  531. %% { "\eprint"
  532. %% archive empty$
  533. %% 'skip$
  534. %% { "[" * archive * "]" * }
  535. %% if$
  536. %% "{" * swap$ * "}" *
  537. %% }
  538. %% if$
  539. %% }
  540. FUNCTION {format.eprint}
  541. { eprint duplicate$ empty$
  542. 'skip$
  543. {
  544. "(\textit{Preprint} "
  545. swap$
  546. "\eprint"
  547. archive empty$
  548. 'skip$
  549. { "[" * archive * "]" * }
  550. if$
  551. "{" * swap$ * "}" *
  552. *
  553. ")"
  554. *
  555. }
  556. if$
  557. }
  558. FUNCTION {format.url}
  559. { url empty$
  560. { "" }
  561. { "\urlprefix\url{" url * "}" * }
  562. if$
  563. }
  564. STRINGS { bibinfo}
  565. INTEGERS { nameptr namesleft numnames }
  566. FUNCTION {format.names}
  567. { 'bibinfo :=
  568. duplicate$ empty$ 'skip$ {
  569. 's :=
  570. "" 't :=
  571. #1 'nameptr :=
  572. s num.names$ 'numnames :=
  573. numnames 'namesleft :=
  574. { namesleft #0 > }
  575. { s nameptr
  576. "{vv~}{ll}{ jj}{ f{~}}"
  577. format.name$
  578. remove.dots
  579. bibinfo bibinfo.check
  580. 't :=
  581. nameptr #1 >
  582. {
  583. namesleft #1 >
  584. { ", " * t * }
  585. {
  586. s nameptr "{ll}" format.name$ duplicate$ "others" =
  587. { 't := }
  588. { pop$ }
  589. if$
  590. t "others" =
  591. {
  592. " " * bbl.etal emphasize *
  593. }
  594. {
  595. bbl.and
  596. space.word * t *
  597. }
  598. if$
  599. }
  600. if$
  601. }
  602. 't
  603. if$
  604. nameptr #1 + 'nameptr :=
  605. namesleft #1 - 'namesleft :=
  606. }
  607. while$
  608. } if$
  609. }
  610. FUNCTION {format.names.ed}
  611. {
  612. 'bibinfo :=
  613. duplicate$ empty$ 'skip$ {
  614. 's :=
  615. "" 't :=
  616. #1 'nameptr :=
  617. s num.names$ 'numnames :=
  618. numnames 'namesleft :=
  619. { namesleft #0 > }
  620. { s nameptr
  621. "{f{~}~}{vv~}{ll}{ jj}"
  622. format.name$
  623. remove.dots
  624. bibinfo bibinfo.check
  625. 't :=
  626. nameptr #1 >
  627. {
  628. namesleft #1 >
  629. { ", " * t * }
  630. {
  631. s nameptr "{ll}" format.name$ duplicate$ "others" =
  632. { 't := }
  633. { pop$ }
  634. if$
  635. t "others" =
  636. {
  637. " " * bbl.etal emphasize *
  638. }
  639. {
  640. bbl.and
  641. space.word * t *
  642. }
  643. if$
  644. }
  645. if$
  646. }
  647. 't
  648. if$
  649. nameptr #1 + 'nameptr :=
  650. namesleft #1 - 'namesleft :=
  651. }
  652. while$
  653. } if$
  654. }
  655. FUNCTION {format.authors}
  656. { author "author" format.names
  657. duplicate$ empty$ 'skip$
  658. { collaboration "collaboration" bibinfo.check
  659. duplicate$ empty$ 'skip$
  660. { " (" swap$ * ")" * }
  661. if$
  662. *
  663. }
  664. if$
  665. }
  666. FUNCTION {get.bbl.editor}
  667. { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
  668. FUNCTION {format.editors}
  669. { editor "editor" format.names duplicate$ empty$ 'skip$
  670. {
  671. %% "," *
  672. %% " " *
  673. %% get.bbl.editor
  674. %% *
  675. %mc
  676. " " *
  677. "(" *
  678. get.bbl.editor
  679. *
  680. ")" *
  681. %mc end
  682. }
  683. if$
  684. }
  685. %mc
  686. FUNCTION {format.editors.inline}
  687. { editor "editor" format.names duplicate$ empty$ 'skip$
  688. {
  689. bbl.editor " " *
  690. swap$
  691. *
  692. }
  693. if$
  694. }
  695. %mc end
  696. FUNCTION {format.isbn}
  697. { isbn "isbn" bibinfo.check
  698. duplicate$ empty$ 'skip$
  699. {
  700. "ISBN " swap$ *
  701. }
  702. if$
  703. }
  704. FUNCTION {format.issn}
  705. { issn "issn" bibinfo.check
  706. duplicate$ empty$ 'skip$
  707. {
  708. "ISSN " swap$ *
  709. }
  710. if$
  711. }
  712. FUNCTION {format.note}
  713. {
  714. note empty$
  715. { "" }
  716. { note #1 #1 substring$
  717. duplicate$ "{" =
  718. 'skip$
  719. { output.state mid.sentence =
  720. { "l" }
  721. { "u" }
  722. if$
  723. change.case$
  724. }
  725. if$
  726. note #2 global.max$ substring$ * "note" bibinfo.check
  727. }
  728. if$
  729. }
  730. FUNCTION {format.title}
  731. { title
  732. duplicate$ empty$ 'skip$
  733. { "t" change.case$ }
  734. if$
  735. "title" bibinfo.check
  736. }
  737. FUNCTION {output.bibitem}
  738. { newline$
  739. "\bibitem{" write$
  740. cite$ write$
  741. "}" write$
  742. newline$
  743. ""
  744. before.all 'output.state :=
  745. }
  746. FUNCTION {n.dashify}
  747. {
  748. 't :=
  749. ""
  750. { t empty$ not }
  751. { t #1 #1 substring$ "-" =
  752. { t #1 #2 substring$ "--" = not
  753. { "--" *
  754. t #2 global.max$ substring$ 't :=
  755. }
  756. { { t #1 #1 substring$ "-" = }
  757. { "-" *
  758. t #2 global.max$ substring$ 't :=
  759. }
  760. while$
  761. }
  762. if$
  763. }
  764. { t #1 #1 substring$ *
  765. t #2 global.max$ substring$ 't :=
  766. }
  767. if$
  768. }
  769. while$
  770. }
  771. FUNCTION {word.in}
  772. { bbl.in
  773. " " * }
  774. FUNCTION {format.date}
  775. {
  776. ""
  777. duplicate$ empty$
  778. year "year" bibinfo.check duplicate$ empty$
  779. { swap$ 'skip$
  780. { "there's a month but no year in " cite$ * warning$ }
  781. if$
  782. *
  783. }
  784. { swap$ 'skip$
  785. {
  786. swap$
  787. " " * swap$
  788. }
  789. if$
  790. *
  791. remove.dots
  792. }
  793. if$
  794. duplicate$ empty$
  795. 'skip$
  796. {
  797. before.all 'output.state :=
  798. " " swap$ *
  799. }
  800. if$
  801. }
  802. FUNCTION {format.btitle}
  803. { title "title" bibinfo.check
  804. duplicate$ empty$ 'skip$
  805. {
  806. emphasize
  807. }
  808. if$
  809. }
  810. FUNCTION {either.or.check}
  811. { empty$
  812. 'pop$
  813. { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  814. if$
  815. }
  816. FUNCTION {format.bvolume}
  817. { volume empty$
  818. % no volume: return blank
  819. { "" }
  820. %% { bbl.volume volume tie.or.space.prefix
  821. %% "volume" bibinfo.check * *
  822. %% series "series" bibinfo.check
  823. %% duplicate$ empty$ 'pop$
  824. %% { swap$ bbl.of space.word * swap$
  825. %% emphasize * }
  826. %% if$
  827. %% "volume and number" number either.or.check
  828. %% }
  829. %mc
  830. {
  831. series "series" bibinfo.check
  832. empty$
  833. % no series: must be multivolume book
  834. {
  835. bbl.volume volume tie.or.space.prefix "volume" bibinfo.check * *
  836. volumetitle empty$
  837. 'skip$
  838. % volumetitle: book volume has title
  839. { " " volumetitle "volumetitle" bibinfo.check emphasize * * }
  840. if$
  841. }
  842. % series: format as volume in series
  843. {
  844. "("
  845. series "series" bibinfo.check emphasize *
  846. " " * bbl.volume *
  847. volume tie.or.space.prefix "volume" bibinfo.check *
  848. ")" * *
  849. }
  850. if$
  851. "volume and number" number either.or.check
  852. }
  853. %mc end
  854. if$
  855. }
  856. FUNCTION {format.number.series}
  857. { volume empty$
  858. { number empty$
  859. { series field.or.null }
  860. { series empty$
  861. { number "number" bibinfo.check }
  862. {
  863. %% output.state mid.sentence =
  864. %% { bbl.number }
  865. %% { bbl.number capitalize }
  866. %% if$
  867. %% number tie.or.space.prefix "number" bibinfo.check * *
  868. %% bbl.in space.word *
  869. %% series "series" bibinfo.check *
  870. %% " " * bbl.number *
  871. %% number tie.or.space.prefix "number" bibinfo.check * *
  872. %mc
  873. "("
  874. series "series" bibinfo.check emphasize *
  875. " " * bbl.number *
  876. number tie.or.space.prefix "number" bibinfo.check *
  877. ")" *
  878. *
  879. %mc end
  880. }
  881. if$
  882. }
  883. if$
  884. }
  885. { "" }
  886. if$
  887. }
  888. FUNCTION {is.num}
  889. { chr.to.int$
  890. duplicate$ "0" chr.to.int$ < not
  891. swap$ "9" chr.to.int$ > not and
  892. }
  893. FUNCTION {extract.num}
  894. { duplicate$ 't :=
  895. "" 's :=
  896. { t empty$ not }
  897. { t #1 #1 substring$
  898. t #2 global.max$ substring$ 't :=
  899. duplicate$ is.num
  900. { s swap$ * 's := }
  901. { pop$ "" 't := }
  902. if$
  903. }
  904. while$
  905. s empty$
  906. 'skip$
  907. { pop$ s }
  908. if$
  909. }
  910. FUNCTION {convert.edition}
  911. { extract.num "l" change.case$ 's :=
  912. s "first" = s "1" = or
  913. { bbl.first 't := }
  914. { s "second" = s "2" = or
  915. { bbl.second 't := }
  916. { s "third" = s "3" = or
  917. { bbl.third 't := }
  918. { s "fourth" = s "4" = or
  919. { bbl.fourth 't := }
  920. { s "fifth" = s "5" = or
  921. { bbl.fifth 't := }
  922. { s #1 #1 substring$ is.num
  923. { s eng.ord 't := }
  924. { edition 't := }
  925. if$
  926. }
  927. if$
  928. }
  929. if$
  930. }
  931. if$
  932. }
  933. if$
  934. }
  935. if$
  936. t
  937. }
  938. FUNCTION {format.edition}
  939. { edition duplicate$ empty$ 'skip$
  940. {
  941. convert.edition
  942. output.state mid.sentence =
  943. { "l" }
  944. { "t" }
  945. if$ change.case$
  946. "edition" bibinfo.check
  947. " " * bbl.edition *
  948. }
  949. if$
  950. }
  951. INTEGERS { multiresult }
  952. FUNCTION {multi.page.check}
  953. { 't :=
  954. #0 'multiresult :=
  955. { multiresult not
  956. t empty$ not
  957. and
  958. }
  959. { t #1 #1 substring$
  960. duplicate$ "-" =
  961. swap$ duplicate$ "," =
  962. swap$ "+" =
  963. or or
  964. { #1 'multiresult := }
  965. { t #2 global.max$ substring$ 't := }
  966. if$
  967. }
  968. while$
  969. multiresult
  970. }
  971. FUNCTION {format.pages}
  972. { pages duplicate$ empty$ 'skip$
  973. { duplicate$ multi.page.check
  974. {
  975. bbl.pages swap$
  976. n.dashify
  977. }
  978. {
  979. bbl.page swap$
  980. }
  981. if$
  982. tie.or.space.prefix
  983. "pages" bibinfo.check
  984. * *
  985. }
  986. if$
  987. }
  988. FUNCTION {format.journal.pages}
  989. { pages duplicate$ empty$ 'pop$
  990. %mc { swap$ duplicate$ empty$
  991. %mc { pop$ pop$ format.pages }
  992. %mc {
  993. %mc " " *
  994. %mc swap$
  995. %mc n.dashify
  996. %mc "pages" bibinfo.check
  997. %mc *
  998. %mc }
  999. %mc if$
  1000. %mc }
  1001. { swap$
  1002. " " *
  1003. swap$
  1004. n.dashify
  1005. "pages" bibinfo.check
  1006. *
  1007. }
  1008. if$
  1009. }
  1010. FUNCTION {format.journal.eid}
  1011. { eid "eid" bibinfo.check
  1012. duplicate$ empty$ 'skip$
  1013. { swap$ duplicate$ empty$ 'skip$
  1014. {
  1015. " " *
  1016. }
  1017. if$
  1018. swap$
  1019. numpages empty$ 'skip$
  1020. { bbl.eidpp numpages tie.or.space.prefix
  1021. "numpages" bibinfo.check * *
  1022. " (" swap$ * ")" * *
  1023. }
  1024. if$
  1025. }
  1026. if$ *
  1027. }
  1028. FUNCTION {format.vol.num.pages}
  1029. { volume field.or.null
  1030. %mc section handling
  1031. section field.or.null strip.leading
  1032. section field.or.null strip.trailing trim
  1033. %mc end
  1034. duplicate$ empty$ 'skip$
  1035. {
  1036. "volume" bibinfo.check
  1037. }
  1038. if$
  1039. bolden
  1040. %mc number "number" bibinfo.check duplicate$ empty$ 'skip$
  1041. issue "issue" bibinfo.check duplicate$ empty$ 'skip$
  1042. {
  1043. swap$ duplicate$ empty$
  1044. %mc { "there's a number but no volume in " cite$ * warning$ }
  1045. { "there's an issue but no volume in " cite$ * warning$ }
  1046. 'skip$
  1047. if$
  1048. swap$
  1049. "(" swap$ * ")" *
  1050. }
  1051. if$ *
  1052. eid empty$
  1053. { format.journal.pages }
  1054. { format.journal.eid }
  1055. if$
  1056. }
  1057. FUNCTION {format.chapter.pages}
  1058. { chapter empty$
  1059. 'format.pages
  1060. { type empty$
  1061. { bbl.chapter }
  1062. { type "l" change.case$
  1063. "type" bibinfo.check
  1064. }
  1065. if$
  1066. chapter tie.or.space.prefix
  1067. "chapter" bibinfo.check
  1068. * *
  1069. pages empty$
  1070. 'skip$
  1071. { ", " * format.pages * }
  1072. if$
  1073. }
  1074. if$
  1075. }
  1076. FUNCTION {format.booktitle}
  1077. {
  1078. booktitle "booktitle" bibinfo.check
  1079. emphasize
  1080. }
  1081. %% FUNCTION {format.in.ed.booktitle}
  1082. %% { format.booktitle duplicate$ empty$ 'skip$
  1083. %% {
  1084. %% editor "editor" format.names.ed duplicate$ empty$ 'pop$
  1085. %% {
  1086. %% "," *
  1087. %% " " *
  1088. %% get.bbl.editor
  1089. %% ", " *
  1090. %% * swap$
  1091. %% * }
  1092. %% if$
  1093. %% word.in swap$ *
  1094. %% }
  1095. %% if$
  1096. %% }
  1097. FUNCTION {empty.misc.check}
  1098. { author empty$ title empty$ howpublished empty$
  1099. month empty$ year empty$ note empty$
  1100. and and and and and
  1101. { "all relevant fields are empty in " cite$ * warning$ }
  1102. 'skip$
  1103. if$
  1104. }
  1105. FUNCTION {format.thesis.type}
  1106. { type duplicate$ empty$
  1107. 'pop$
  1108. { swap$ pop$
  1109. "t" change.case$ "type" bibinfo.check
  1110. }
  1111. if$
  1112. }
  1113. FUNCTION {format.tr.number}
  1114. { number "number" bibinfo.check
  1115. type duplicate$ empty$
  1116. { pop$ bbl.techrep }
  1117. 'skip$
  1118. if$
  1119. "type" bibinfo.check
  1120. swap$ duplicate$ empty$
  1121. { pop$ "t" change.case$ }
  1122. { tie.or.space.prefix * * }
  1123. if$
  1124. }
  1125. FUNCTION {format.article.crossref}
  1126. {
  1127. key duplicate$ empty$
  1128. { pop$
  1129. journal duplicate$ empty$
  1130. { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
  1131. { "journal" bibinfo.check emphasize word.in swap$ * }
  1132. if$
  1133. }
  1134. { word.in swap$ * " " *}
  1135. if$
  1136. " \cite{" * crossref * "}" *
  1137. }
  1138. FUNCTION {format.crossref.editor}
  1139. { editor #1 "{vv~}{ll}" format.name$
  1140. "editor" bibinfo.check
  1141. editor num.names$ duplicate$
  1142. #2 >
  1143. { pop$
  1144. "editor" bibinfo.check
  1145. " " * bbl.etal
  1146. emphasize
  1147. *
  1148. }
  1149. { #2 <
  1150. 'skip$
  1151. { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1152. {
  1153. "editor" bibinfo.check
  1154. " " * bbl.etal
  1155. emphasize
  1156. *
  1157. }
  1158. {
  1159. bbl.and space.word
  1160. * editor #2 "{vv~}{ll}" format.name$
  1161. "editor" bibinfo.check
  1162. *
  1163. }
  1164. if$
  1165. }
  1166. if$
  1167. }
  1168. if$
  1169. }
  1170. FUNCTION {format.book.crossref}
  1171. { volume duplicate$ empty$
  1172. { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  1173. pop$ word.in
  1174. }
  1175. { bbl.volume
  1176. swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
  1177. }
  1178. if$
  1179. editor empty$
  1180. editor field.or.null author field.or.null =
  1181. or
  1182. { key empty$
  1183. { series empty$
  1184. { "need editor, key, or series for " cite$ * " to crossref " *
  1185. crossref * warning$
  1186. "" *
  1187. }
  1188. { series emphasize * }
  1189. if$
  1190. }
  1191. { key * }
  1192. if$
  1193. }
  1194. { format.crossref.editor * }
  1195. if$
  1196. " \cite{" * crossref * "}" *
  1197. }
  1198. FUNCTION {format.incoll.inproc.crossref}
  1199. {
  1200. editor empty$
  1201. editor field.or.null author field.or.null =
  1202. or
  1203. { key empty$
  1204. { format.booktitle duplicate$ empty$
  1205. { "need editor, key, or booktitle for " cite$ * " to crossref " *
  1206. crossref * warning$
  1207. }
  1208. { word.in swap$ * }
  1209. if$
  1210. }
  1211. { word.in key * " " *}
  1212. if$
  1213. }
  1214. { word.in format.crossref.editor * " " *}
  1215. if$
  1216. " \cite{" * crossref * "}" *
  1217. }
  1218. FUNCTION {format.org.or.pub}
  1219. { 't :=
  1220. ""
  1221. address empty$ t empty$ and
  1222. 'skip$
  1223. {
  1224. add.blank "(" *
  1225. address "address" bibinfo.check *
  1226. t empty$
  1227. 'skip$
  1228. { address empty$
  1229. 'skip$
  1230. { ": " * }
  1231. if$
  1232. t *
  1233. }
  1234. if$
  1235. ")" *
  1236. }
  1237. if$
  1238. }
  1239. FUNCTION {format.publisher.address}
  1240. { publisher "publisher" bibinfo.warn format.org.or.pub
  1241. }
  1242. FUNCTION {format.organization.address}
  1243. { organization "organization" bibinfo.check format.org.or.pub
  1244. }
  1245. FUNCTION {article}
  1246. { output.bibitem
  1247. format.authors "author" output.check
  1248. format.date "year" output.check
  1249. date.block
  1250. crossref missing$
  1251. {
  1252. %mc add section handling
  1253. %mc journal
  1254. %mc "journal" bibinfo.check
  1255. %mc emphasize
  1256. %mc "journal" output.check
  1257. %mc add.blank
  1258. journal
  1259. "journal" bibinfo.check
  1260. section field.or.null strip.trailing trim
  1261. emphasize
  1262. "journal" output.check
  1263. add.blank
  1264. section empty$
  1265. { skip$ }
  1266. { section * add.blank}
  1267. if$
  1268. %mc end
  1269. format.vol.num.pages output
  1270. }
  1271. { format.article.crossref output.nonnull
  1272. format.pages output
  1273. }
  1274. if$
  1275. format.issn output
  1276. format.note output
  1277. format.eprint output
  1278. format.url output
  1279. fin.entry
  1280. }
  1281. FUNCTION {book}
  1282. { output.bibitem
  1283. author empty$
  1284. { format.editors "author and editor" output.check
  1285. }
  1286. { format.authors output.nonnull
  1287. crossref missing$
  1288. { "author and editor" editor either.or.check }
  1289. 'skip$
  1290. if$
  1291. }
  1292. if$
  1293. format.date "year" output.check
  1294. date.block
  1295. format.btitle "title" output.check
  1296. format.edition output
  1297. crossref missing$
  1298. { format.bvolume output
  1299. format.number.series output
  1300. format.publisher.address output
  1301. }
  1302. {
  1303. format.book.crossref output.nonnull
  1304. }
  1305. if$
  1306. %% format.edition output
  1307. format.isbn output
  1308. format.note output
  1309. format.eprint output
  1310. format.url output
  1311. fin.entry
  1312. }
  1313. FUNCTION {booklet}
  1314. { output.bibitem
  1315. format.authors output
  1316. format.date output
  1317. date.block
  1318. format.title "title" output.check
  1319. howpublished "howpublished" bibinfo.check output
  1320. address "address" bibinfo.check output
  1321. format.isbn output
  1322. format.note output
  1323. format.eprint output
  1324. format.url output
  1325. fin.entry
  1326. }
  1327. FUNCTION {inbook}
  1328. { output.bibitem
  1329. author empty$
  1330. { format.editors "author and editor" output.check
  1331. }
  1332. { format.authors output.nonnull
  1333. crossref missing$
  1334. { "author and editor" editor either.or.check }
  1335. 'skip$
  1336. if$
  1337. }
  1338. if$
  1339. format.date "year" output.check
  1340. date.block
  1341. format.btitle "title" output.check
  1342. crossref missing$
  1343. {
  1344. format.bvolume output
  1345. format.publisher.address output
  1346. %% format.bvolume output
  1347. format.chapter.pages "chapter and pages" output.check
  1348. format.number.series output
  1349. }
  1350. {
  1351. format.chapter.pages "chapter and pages" output.check
  1352. format.book.crossref output.nonnull
  1353. }
  1354. if$
  1355. format.edition output
  1356. crossref missing$
  1357. { format.isbn output }
  1358. 'skip$
  1359. if$
  1360. format.note output
  1361. format.eprint output
  1362. format.url output
  1363. fin.entry
  1364. }
  1365. FUNCTION {incollection}
  1366. { output.bibitem
  1367. format.authors "author" output.check
  1368. format.date "year" output.check
  1369. date.block
  1370. format.title "title" output.check
  1371. crossref missing$
  1372. {
  1373. %% format.in.ed.booktitle "booktitle" output.check
  1374. %mc
  1375. format.booktitle "booktitle" output.check
  1376. format.bvolume output
  1377. format.number.series output
  1378. format.editors.inline output
  1379. %mc end
  1380. format.publisher.address output
  1381. %% format.bvolume output
  1382. %% format.number.series output
  1383. format.chapter.pages output
  1384. format.edition output
  1385. format.isbn output
  1386. }
  1387. { format.incoll.inproc.crossref output.nonnull
  1388. format.chapter.pages output
  1389. }
  1390. if$
  1391. format.note output
  1392. format.eprint output
  1393. format.url output
  1394. fin.entry
  1395. }
  1396. FUNCTION {inproceedings}
  1397. { output.bibitem
  1398. format.authors "author" output.check
  1399. format.date "year" output.check
  1400. date.block
  1401. format.title "title" output.check
  1402. crossref missing$
  1403. {
  1404. %%format.in.ed.booktitle "booktitle" output.check
  1405. %mc
  1406. format.booktitle "booktitle" output.check
  1407. format.bvolume output
  1408. format.number.series output
  1409. format.editors.inline output
  1410. %mc end
  1411. publisher empty$
  1412. { format.organization.address output }
  1413. { organization "organization" bibinfo.check output
  1414. format.publisher.address output
  1415. }
  1416. if$
  1417. %% format.bvolume output
  1418. %% format.number.series output
  1419. format.pages output
  1420. format.isbn output
  1421. format.issn output
  1422. }
  1423. { format.incoll.inproc.crossref output.nonnull
  1424. format.pages output
  1425. }
  1426. if$
  1427. format.note output
  1428. format.eprint output
  1429. format.url output
  1430. fin.entry
  1431. }
  1432. FUNCTION {conference} { inproceedings }
  1433. FUNCTION {manual}
  1434. { output.bibitem
  1435. author empty$
  1436. { organization "organization" bibinfo.check
  1437. duplicate$ empty$ 'pop$
  1438. { output
  1439. address "address" bibinfo.check output
  1440. }
  1441. if$
  1442. }
  1443. { format.authors output.nonnull }
  1444. if$
  1445. format.date output
  1446. date.block
  1447. format.btitle "title" output.check
  1448. author empty$
  1449. { organization empty$
  1450. {
  1451. address "address" bibinfo.check output
  1452. }
  1453. 'skip$
  1454. if$
  1455. }
  1456. {
  1457. organization "organization" bibinfo.check output
  1458. address "address" bibinfo.check output
  1459. }
  1460. if$
  1461. format.edition output
  1462. format.note output
  1463. format.eprint output
  1464. format.url output
  1465. fin.entry
  1466. }
  1467. FUNCTION {mastersthesis}
  1468. { output.bibitem
  1469. format.authors "author" output.check
  1470. format.date "year" output.check
  1471. date.block
  1472. format.btitle
  1473. "title" output.check
  1474. bbl.mthesis format.thesis.type output.nonnull
  1475. school "school" bibinfo.warn output
  1476. address "address" bibinfo.check output
  1477. format.note output
  1478. format.eprint output
  1479. format.url output
  1480. fin.entry
  1481. }
  1482. FUNCTION {misc}
  1483. { output.bibitem
  1484. format.authors output
  1485. format.date output
  1486. format.title output
  1487. howpublished "howpublished" bibinfo.check output
  1488. format.note output
  1489. format.eprint output
  1490. format.url output
  1491. fin.entry
  1492. empty.misc.check
  1493. }
  1494. FUNCTION {phdthesis}
  1495. { output.bibitem
  1496. format.authors "author" output.check
  1497. format.date "year" output.check
  1498. date.block
  1499. format.btitle
  1500. "title" output.check
  1501. bbl.phdthesis format.thesis.type output.nonnull
  1502. school "school" bibinfo.warn output
  1503. address "address" bibinfo.check output
  1504. format.note output
  1505. format.eprint output
  1506. format.url output
  1507. fin.entry
  1508. }
  1509. FUNCTION {proceedings}
  1510. { output.bibitem
  1511. editor empty$
  1512. { organization "organization" bibinfo.check output
  1513. }
  1514. { format.editors output.nonnull }
  1515. if$
  1516. format.date "year" output.check
  1517. date.block
  1518. format.btitle "title" output.check
  1519. format.bvolume output
  1520. format.number.series output
  1521. editor empty$
  1522. { publisher empty$
  1523. 'skip$
  1524. {
  1525. format.publisher.address output
  1526. }
  1527. if$
  1528. }
  1529. { publisher empty$
  1530. {
  1531. format.organization.address output }
  1532. {
  1533. organization "organization" bibinfo.check output
  1534. format.publisher.address output
  1535. }
  1536. if$
  1537. }
  1538. if$
  1539. format.isbn output
  1540. format.issn output
  1541. format.note output
  1542. format.eprint output
  1543. format.url output
  1544. fin.entry
  1545. }
  1546. FUNCTION {techreport}
  1547. { output.bibitem
  1548. format.authors "author" output.check
  1549. format.date "year" output.check
  1550. date.block
  1551. format.title
  1552. "title" output.check
  1553. format.tr.number output.nonnull
  1554. institution "institution" bibinfo.warn output
  1555. address "address" bibinfo.check output
  1556. format.note output
  1557. format.eprint output
  1558. format.url output
  1559. fin.entry
  1560. }
  1561. FUNCTION {unpublished}
  1562. { output.bibitem
  1563. format.authors "author" output.check
  1564. format.date output
  1565. date.block
  1566. format.title "title" output.check
  1567. format.note "note" output.check
  1568. format.eprint output
  1569. format.url output
  1570. fin.entry
  1571. }
  1572. FUNCTION {default.type} { misc }
  1573. READ
  1574. STRINGS { longest.label }
  1575. INTEGERS { number.label longest.label.width }
  1576. FUNCTION {initialize.longest.label}
  1577. { "" 'longest.label :=
  1578. #1 'number.label :=
  1579. #0 'longest.label.width :=
  1580. }
  1581. FUNCTION {longest.label.pass}
  1582. { number.label int.to.str$ 'label :=
  1583. number.label #1 + 'number.label :=
  1584. label width$ longest.label.width >
  1585. { label 'longest.label :=
  1586. label width$ 'longest.label.width :=
  1587. }
  1588. 'skip$
  1589. if$
  1590. }
  1591. EXECUTE {initialize.longest.label}
  1592. ITERATE {longest.label.pass}
  1593. FUNCTION {begin.bib}
  1594. { preamble$ empty$
  1595. 'skip$
  1596. { preamble$ write$ newline$ }
  1597. if$
  1598. "\providecommand{\newblock}{}"
  1599. write$ newline$
  1600. "\begin{thebibliography}{" longest.label * "}" *
  1601. write$ newline$
  1602. "\expandafter\ifx\csname url\endcsname\relax"
  1603. write$ newline$
  1604. " \def\url#1{{\tt #1}}\fi"
  1605. write$ newline$
  1606. "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
  1607. write$ newline$
  1608. "\providecommand{\eprint}[2][]{\url{#2}}"
  1609. write$ newline$
  1610. "% Bibliography created with iopart-num v2.1"
  1611. write$ newline$
  1612. "% /biblio/bibtex/contrib/iopart-num"
  1613. write$ newline$
  1614. }
  1615. EXECUTE {begin.bib}
  1616. EXECUTE {init.state.consts}
  1617. ITERATE {call.type$}
  1618. FUNCTION {end.bib}
  1619. { newline$
  1620. "\end{thebibliography}" write$ newline$
  1621. }
  1622. EXECUTE {end.bib}
  1623. %% End of customized bst file
  1624. %%
  1625. %% End of file `iopart-num.bst'.