Template_LastNameFirst_Alphabetical.bst 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435
  1. %% File: `plainnat.bst'
  2. %% A modification of `plain.bst' for use with natbib package
  3. %%
  4. %% Copyright 1993-2007 Patrick W Daly
  5. %% Max-Planck-Institut f\"ur Sonnensystemforschung
  6. %% Max-Planck-Str. 2
  7. %% D-37191 Katlenburg-Lindau
  8. %% Germany
  9. %% E-mail: daly@mps.mpg.de
  10. %%
  11. %% This program can be redistributed and/or modified under the terms
  12. %% of the LaTeX Project Public License Distributed from CTAN
  13. %% archives in directory macros/latex/base/lppl.txt; either
  14. %% version 1 of the License, or any later version.
  15. %%
  16. % Version and source file information:
  17. % \ProvidesFile{natbst.mbs}[2007/11/26 1.93 (PWD)]
  18. %
  19. % BibTeX `plainnat' family
  20. % version 0.99b for BibTeX versions 0.99a or later,
  21. % for LaTeX versions 2.09 and 2e.
  22. %
  23. % For use with the `natbib.sty' package; emulates the corresponding
  24. % member of the `plain' family, but with author-year citations.
  25. %
  26. % With version 6.0 of `natbib.sty', it may also be used for numerical
  27. % citations, while retaining the commands \citeauthor, \citefullauthor,
  28. % and \citeyear to print the corresponding information.
  29. %
  30. % For version 7.0 of `natbib.sty', the KEY field replaces missing
  31. % authors/editors, and the date is left blank in \bibitem.
  32. %
  33. % Includes field EID for the sequence/citation number of electronic journals
  34. % which is used instead of page numbers.
  35. %
  36. % Includes fields ISBN and ISSN.
  37. %
  38. % Includes field URL for Internet addresses.
  39. %
  40. % Includes field DOI for Digital Object Idenfifiers.
  41. %
  42. % Works best with the url.sty package of Donald Arseneau.
  43. %
  44. % Works with identical authors and year are further sorted by
  45. % citation key, to preserve any natural sequence.
  46. %
  47. ENTRY
  48. { address
  49. author
  50. booktitle
  51. chapter
  52. doi
  53. eid
  54. edition
  55. editor
  56. howpublished
  57. institution
  58. isbn
  59. issn
  60. journal
  61. key
  62. month
  63. note
  64. number
  65. organization
  66. pages
  67. publisher
  68. school
  69. series
  70. title
  71. type
  72. url
  73. volume
  74. year
  75. }
  76. {}
  77. { label extra.label sort.label short.list }
  78. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  79. FUNCTION {init.state.consts}
  80. { #0 'before.all :=
  81. #1 'mid.sentence :=
  82. #2 'after.sentence :=
  83. #3 'after.block :=
  84. }
  85. STRINGS { s t }
  86. FUNCTION {output.nonnull}
  87. { 's :=
  88. output.state mid.sentence =
  89. { ", " * write$ }
  90. { output.state after.block =
  91. { add.period$ write$
  92. newline$
  93. "\newblock " write$
  94. }
  95. { output.state before.all =
  96. 'write$
  97. { add.period$ " " * write$ }
  98. if$
  99. }
  100. if$
  101. mid.sentence 'output.state :=
  102. }
  103. if$
  104. s
  105. }
  106. FUNCTION {output}
  107. { duplicate$ empty$
  108. 'pop$
  109. 'output.nonnull
  110. if$
  111. }
  112. FUNCTION {output.check}
  113. { 't :=
  114. duplicate$ empty$
  115. { pop$ "empty " t * " in " * cite$ * warning$ }
  116. 'output.nonnull
  117. if$
  118. }
  119. FUNCTION {fin.entry}
  120. { add.period$
  121. write$
  122. newline$
  123. }
  124. FUNCTION {new.block}
  125. { output.state before.all =
  126. 'skip$
  127. { after.block 'output.state := }
  128. if$
  129. }
  130. FUNCTION {new.sentence}
  131. { output.state after.block =
  132. 'skip$
  133. { output.state before.all =
  134. 'skip$
  135. { after.sentence 'output.state := }
  136. if$
  137. }
  138. if$
  139. }
  140. FUNCTION {not}
  141. { { #0 }
  142. { #1 }
  143. if$
  144. }
  145. FUNCTION {and}
  146. { 'skip$
  147. { pop$ #0 }
  148. if$
  149. }
  150. FUNCTION {or}
  151. { { pop$ #1 }
  152. 'skip$
  153. if$
  154. }
  155. FUNCTION {new.block.checka}
  156. { empty$
  157. 'skip$
  158. 'new.block
  159. if$
  160. }
  161. FUNCTION {new.block.checkb}
  162. { empty$
  163. swap$ empty$
  164. and
  165. 'skip$
  166. 'new.block
  167. if$
  168. }
  169. FUNCTION {new.sentence.checka}
  170. { empty$
  171. 'skip$
  172. 'new.sentence
  173. if$
  174. }
  175. FUNCTION {new.sentence.checkb}
  176. { empty$
  177. swap$ empty$
  178. and
  179. 'skip$
  180. 'new.sentence
  181. if$
  182. }
  183. FUNCTION {field.or.null}
  184. { duplicate$ empty$
  185. { pop$ "" }
  186. 'skip$
  187. if$
  188. }
  189. FUNCTION {emphasize}
  190. { duplicate$ empty$
  191. { pop$ "" }
  192. { "\emph{" swap$ * "}" * }
  193. if$
  194. }
  195. INTEGERS { nameptr namesleft numnames }
  196. FUNCTION {format.names}
  197. { 's :=
  198. #1 'nameptr :=
  199. s num.names$ 'numnames :=
  200. numnames 'namesleft :=
  201. { namesleft #0 > }
  202. { s nameptr "{ll,~}{ff}{vv~}{, jj}" format.name$ 't :=
  203. nameptr #1 >
  204. { namesleft #1 >
  205. { ", " * t * }
  206. { numnames #2 >
  207. { "," * }
  208. 'skip$
  209. if$
  210. t "others" =
  211. { " et~al." * }
  212. { " and " * t * }
  213. if$
  214. }
  215. if$
  216. }
  217. 't
  218. if$
  219. nameptr #1 + 'nameptr :=
  220. namesleft #1 - 'namesleft :=
  221. }
  222. while$
  223. }
  224. FUNCTION {format.key}
  225. { empty$
  226. { key field.or.null }
  227. { "" }
  228. if$
  229. }
  230. FUNCTION {format.authors}
  231. { author empty$
  232. { "" }
  233. { author format.names }
  234. if$
  235. }
  236. FUNCTION {format.editors}
  237. { editor empty$
  238. { "" }
  239. { editor format.names
  240. editor num.names$ #1 >
  241. { ", editors" * }
  242. { ", editor" * }
  243. if$
  244. }
  245. if$
  246. }
  247. FUNCTION {format.isbn}
  248. { isbn empty$
  249. { "" }
  250. { new.block "ISBN " isbn * }
  251. if$
  252. }
  253. FUNCTION {format.issn}
  254. { issn empty$
  255. { "" }
  256. { new.block "ISSN " issn * }
  257. if$
  258. }
  259. FUNCTION {format.url}
  260. { url empty$
  261. { "" }
  262. { new.block "URL \url{" url * "}" * }
  263. if$
  264. }
  265. FUNCTION {format.doi}
  266. { doi empty$
  267. { "" }
  268. { new.block "\doi{" doi * "}" * }
  269. if$
  270. }
  271. FUNCTION {format.title}
  272. { title empty$
  273. { "" }
  274. { title "t" change.case$ }
  275. if$
  276. }
  277. FUNCTION {format.full.names}
  278. {'s :=
  279. #1 'nameptr :=
  280. s num.names$ 'numnames :=
  281. numnames 'namesleft :=
  282. { namesleft #0 > }
  283. { s nameptr "{jj}{vv~}{ll,~}{ff}" format.name$ 't :=
  284. nameptr #1 >
  285. {
  286. namesleft #1 >
  287. { ", " * t * }
  288. {
  289. numnames #2 >
  290. { "," * }
  291. 'skip$
  292. if$
  293. t "others" =
  294. { " et~al." * }
  295. { " and " * t * }
  296. if$
  297. }
  298. if$
  299. }
  300. 't
  301. if$
  302. nameptr #1 + 'nameptr :=
  303. namesleft #1 - 'namesleft :=
  304. }
  305. while$
  306. }
  307. FUNCTION {author.editor.full}
  308. { author empty$
  309. { editor empty$
  310. { "" }
  311. { editor format.full.names }
  312. if$
  313. }
  314. { author format.full.names }
  315. if$
  316. }
  317. FUNCTION {author.full}
  318. { author empty$
  319. { "" }
  320. { author format.full.names }
  321. if$
  322. }
  323. FUNCTION {editor.full}
  324. { editor empty$
  325. { "" }
  326. { editor format.full.names }
  327. if$
  328. }
  329. FUNCTION {make.full.names}
  330. { type$ "book" =
  331. type$ "inbook" =
  332. or
  333. 'author.editor.full
  334. { type$ "proceedings" =
  335. 'editor.full
  336. 'author.full
  337. if$
  338. }
  339. if$
  340. }
  341. FUNCTION {output.bibitem}
  342. { newline$
  343. "\bibitem[" write$
  344. label write$
  345. ")" make.full.names duplicate$ short.list =
  346. { pop$ }
  347. { * }
  348. if$
  349. "]{" * write$
  350. cite$ write$
  351. "}" write$
  352. newline$
  353. ""
  354. before.all 'output.state :=
  355. }
  356. FUNCTION {n.dashify}
  357. { 't :=
  358. ""
  359. { t empty$ not }
  360. { t #1 #1 substring$ "-" =
  361. { t #1 #2 substring$ "--" = not
  362. { "--" *
  363. t #2 global.max$ substring$ 't :=
  364. }
  365. { { t #1 #1 substring$ "-" = }
  366. { "-" *
  367. t #2 global.max$ substring$ 't :=
  368. }
  369. while$
  370. }
  371. if$
  372. }
  373. { t #1 #1 substring$ *
  374. t #2 global.max$ substring$ 't :=
  375. }
  376. if$
  377. }
  378. while$
  379. }
  380. FUNCTION {format.date}
  381. { year duplicate$ empty$
  382. { "empty year in " cite$ * warning$
  383. pop$ "" }
  384. 'skip$
  385. if$
  386. month empty$
  387. 'skip$
  388. { month
  389. " " * swap$ *
  390. }
  391. if$
  392. extra.label *
  393. }
  394. FUNCTION {format.btitle}
  395. { title emphasize
  396. }
  397. FUNCTION {tie.or.space.connect}
  398. { duplicate$ text.length$ #3 <
  399. { "~" }
  400. { " " }
  401. if$
  402. swap$ * *
  403. }
  404. FUNCTION {either.or.check}
  405. { empty$
  406. 'pop$
  407. { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  408. if$
  409. }
  410. FUNCTION {format.bvolume}
  411. { volume empty$
  412. { "" }
  413. { "volume" volume tie.or.space.connect
  414. series empty$
  415. 'skip$
  416. { " of " * series emphasize * }
  417. if$
  418. "volume and number" number either.or.check
  419. }
  420. if$
  421. }
  422. FUNCTION {format.number.series}
  423. { volume empty$
  424. { number empty$
  425. { series field.or.null }
  426. { output.state mid.sentence =
  427. { "number" }
  428. { "Number" }
  429. if$
  430. number tie.or.space.connect
  431. series empty$
  432. { "there's a number but no series in " cite$ * warning$ }
  433. { " in " * series * }
  434. if$
  435. }
  436. if$
  437. }
  438. { "" }
  439. if$
  440. }
  441. FUNCTION {format.edition}
  442. { edition empty$
  443. { "" }
  444. { output.state mid.sentence =
  445. { edition "l" change.case$ " edition" * }
  446. { edition "t" change.case$ " edition" * }
  447. if$
  448. }
  449. if$
  450. }
  451. INTEGERS { multiresult }
  452. FUNCTION {multi.page.check}
  453. { 't :=
  454. #0 'multiresult :=
  455. { multiresult not
  456. t empty$ not
  457. and
  458. }
  459. { t #1 #1 substring$
  460. duplicate$ "-" =
  461. swap$ duplicate$ "," =
  462. swap$ "+" =
  463. or or
  464. { #1 'multiresult := }
  465. { t #2 global.max$ substring$ 't := }
  466. if$
  467. }
  468. while$
  469. multiresult
  470. }
  471. FUNCTION {format.pages}
  472. { pages empty$
  473. { "" }
  474. { pages multi.page.check
  475. { "pages" pages n.dashify tie.or.space.connect }
  476. { "page" pages tie.or.space.connect }
  477. if$
  478. }
  479. if$
  480. }
  481. FUNCTION {format.eid}
  482. { eid empty$
  483. { "" }
  484. { "art." eid tie.or.space.connect }
  485. if$
  486. }
  487. FUNCTION {format.vol.num.pages}
  488. { volume field.or.null
  489. number empty$
  490. 'skip$
  491. { "\penalty0 (" number * ")" * *
  492. volume empty$
  493. { "there's a number but no volume in " cite$ * warning$ }
  494. 'skip$
  495. if$
  496. }
  497. if$
  498. pages empty$
  499. 'skip$
  500. { duplicate$ empty$
  501. { pop$ format.pages }
  502. { ":\penalty0 " * pages n.dashify * }
  503. if$
  504. }
  505. if$
  506. }
  507. FUNCTION {format.vol.num.eid}
  508. { volume field.or.null
  509. number empty$
  510. 'skip$
  511. { "\penalty0 (" number * ")" * *
  512. volume empty$
  513. { "there's a number but no volume in " cite$ * warning$ }
  514. 'skip$
  515. if$
  516. }
  517. if$
  518. eid empty$
  519. 'skip$
  520. { duplicate$ empty$
  521. { pop$ format.eid }
  522. { ":\penalty0 " * eid * }
  523. if$
  524. }
  525. if$
  526. }
  527. FUNCTION {format.chapter.pages}
  528. { chapter empty$
  529. 'format.pages
  530. { type empty$
  531. { "chapter" }
  532. { type "l" change.case$ }
  533. if$
  534. chapter tie.or.space.connect
  535. pages empty$
  536. 'skip$
  537. { ", " * format.pages * }
  538. if$
  539. }
  540. if$
  541. }
  542. FUNCTION {format.in.ed.booktitle}
  543. { booktitle empty$
  544. { "" }
  545. { editor empty$
  546. { "In " booktitle emphasize * }
  547. { "In " format.editors * ", " * booktitle emphasize * }
  548. if$
  549. }
  550. if$
  551. }
  552. FUNCTION {empty.misc.check}
  553. { author empty$ title empty$ howpublished empty$
  554. month empty$ year empty$ note empty$
  555. and and and and and
  556. key empty$ not and
  557. { "all relevant fields are empty in " cite$ * warning$ }
  558. 'skip$
  559. if$
  560. }
  561. FUNCTION {format.thesis.type}
  562. { type empty$
  563. 'skip$
  564. { pop$
  565. type "t" change.case$
  566. }
  567. if$
  568. }
  569. FUNCTION {format.tr.number}
  570. { type empty$
  571. { "Technical Report" }
  572. 'type
  573. if$
  574. number empty$
  575. { "t" change.case$ }
  576. { number tie.or.space.connect }
  577. if$
  578. }
  579. FUNCTION {format.article.crossref}
  580. { key empty$
  581. { journal empty$
  582. { "need key or journal for " cite$ * " to crossref " * crossref *
  583. warning$
  584. ""
  585. }
  586. { "In \emph{" journal * "}" * }
  587. if$
  588. }
  589. { "In " }
  590. if$
  591. " \citet{" * crossref * "}" *
  592. }
  593. FUNCTION {format.book.crossref}
  594. { volume empty$
  595. { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  596. "In "
  597. }
  598. { "Volume" volume tie.or.space.connect
  599. " of " *
  600. }
  601. if$
  602. editor empty$
  603. editor field.or.null author field.or.null =
  604. or
  605. { key empty$
  606. { series empty$
  607. { "need editor, key, or series for " cite$ * " to crossref " *
  608. crossref * warning$
  609. "" *
  610. }
  611. { "\emph{" * series * "}" * }
  612. if$
  613. }
  614. 'skip$
  615. if$
  616. }
  617. 'skip$
  618. if$
  619. " \citet{" * crossref * "}" *
  620. }
  621. FUNCTION {format.incoll.inproc.crossref}
  622. { editor empty$
  623. editor field.or.null author field.or.null =
  624. or
  625. { key empty$
  626. { booktitle empty$
  627. { "need editor, key, or booktitle for " cite$ * " to crossref " *
  628. crossref * warning$
  629. ""
  630. }
  631. { "In \emph{" booktitle * "}" * }
  632. if$
  633. }
  634. { "In " }
  635. if$
  636. }
  637. { "In " }
  638. if$
  639. " \citet{" * crossref * "}" *
  640. }
  641. FUNCTION {article}
  642. { output.bibitem
  643. format.authors "author" output.check
  644. author format.key output
  645. new.block
  646. format.title "title" output.check
  647. new.block
  648. crossref missing$
  649. { journal emphasize "journal" output.check
  650. eid empty$
  651. { format.vol.num.pages output }
  652. { format.vol.num.eid output }
  653. if$
  654. format.date "year" output.check
  655. }
  656. { format.article.crossref output.nonnull
  657. eid empty$
  658. { format.pages output }
  659. { format.eid output }
  660. if$
  661. }
  662. if$
  663. format.issn output
  664. format.doi output
  665. format.url output
  666. new.block
  667. note output
  668. fin.entry
  669. }
  670. FUNCTION {book}
  671. { output.bibitem
  672. author empty$
  673. { format.editors "author and editor" output.check
  674. editor format.key output
  675. }
  676. { format.authors output.nonnull
  677. crossref missing$
  678. { "author and editor" editor either.or.check }
  679. 'skip$
  680. if$
  681. }
  682. if$
  683. new.block
  684. format.btitle "title" output.check
  685. crossref missing$
  686. { format.bvolume output
  687. new.block
  688. format.number.series output
  689. new.sentence
  690. publisher "publisher" output.check
  691. address output
  692. }
  693. { new.block
  694. format.book.crossref output.nonnull
  695. }
  696. if$
  697. format.edition output
  698. format.date "year" output.check
  699. format.isbn output
  700. format.doi output
  701. format.url output
  702. new.block
  703. note output
  704. fin.entry
  705. }
  706. FUNCTION {booklet}
  707. { output.bibitem
  708. format.authors output
  709. author format.key output
  710. new.block
  711. format.title "title" output.check
  712. howpublished address new.block.checkb
  713. howpublished output
  714. address output
  715. format.date output
  716. format.isbn output
  717. format.doi output
  718. format.url output
  719. new.block
  720. note output
  721. fin.entry
  722. }
  723. FUNCTION {inbook}
  724. { output.bibitem
  725. author empty$
  726. { format.editors "author and editor" output.check
  727. editor format.key output
  728. }
  729. { format.authors output.nonnull
  730. crossref missing$
  731. { "author and editor" editor either.or.check }
  732. 'skip$
  733. if$
  734. }
  735. if$
  736. new.block
  737. format.btitle "title" output.check
  738. crossref missing$
  739. { format.bvolume output
  740. format.chapter.pages "chapter and pages" output.check
  741. new.block
  742. format.number.series output
  743. new.sentence
  744. publisher "publisher" output.check
  745. address output
  746. }
  747. { format.chapter.pages "chapter and pages" output.check
  748. new.block
  749. format.book.crossref output.nonnull
  750. }
  751. if$
  752. format.edition output
  753. format.date "year" output.check
  754. format.isbn output
  755. format.doi output
  756. format.url output
  757. new.block
  758. note output
  759. fin.entry
  760. }
  761. FUNCTION {incollection}
  762. { output.bibitem
  763. format.authors "author" output.check
  764. author format.key output
  765. new.block
  766. format.title "title" output.check
  767. new.block
  768. crossref missing$
  769. { format.in.ed.booktitle "booktitle" output.check
  770. format.bvolume output
  771. format.number.series output
  772. format.chapter.pages output
  773. new.sentence
  774. publisher "publisher" output.check
  775. address output
  776. format.edition output
  777. format.date "year" output.check
  778. }
  779. { format.incoll.inproc.crossref output.nonnull
  780. format.chapter.pages output
  781. }
  782. if$
  783. format.isbn output
  784. format.doi output
  785. format.url output
  786. new.block
  787. note output
  788. fin.entry
  789. }
  790. FUNCTION {inproceedings}
  791. { output.bibitem
  792. format.authors "author" output.check
  793. author format.key output
  794. new.block
  795. format.title "title" output.check
  796. new.block
  797. crossref missing$
  798. { format.in.ed.booktitle "booktitle" output.check
  799. format.bvolume output
  800. format.number.series output
  801. format.pages output
  802. address empty$
  803. { organization publisher new.sentence.checkb
  804. organization output
  805. publisher output
  806. format.date "year" output.check
  807. }
  808. { address output.nonnull
  809. format.date "year" output.check
  810. new.sentence
  811. organization output
  812. publisher output
  813. }
  814. if$
  815. }
  816. { format.incoll.inproc.crossref output.nonnull
  817. format.pages output
  818. }
  819. if$
  820. format.isbn output
  821. format.doi output
  822. format.url output
  823. new.block
  824. note output
  825. fin.entry
  826. }
  827. FUNCTION {conference} { inproceedings }
  828. FUNCTION {manual}
  829. { output.bibitem
  830. format.authors output
  831. author format.key output
  832. new.block
  833. format.btitle "title" output.check
  834. organization address new.block.checkb
  835. organization output
  836. address output
  837. format.edition output
  838. format.date output
  839. format.url output
  840. new.block
  841. note output
  842. fin.entry
  843. }
  844. FUNCTION {mastersthesis}
  845. { output.bibitem
  846. format.authors "author" output.check
  847. author format.key output
  848. new.block
  849. format.title "title" output.check
  850. new.block
  851. "Master's thesis" format.thesis.type output.nonnull
  852. school "school" output.check
  853. address output
  854. format.date "year" output.check
  855. format.url output
  856. new.block
  857. note output
  858. fin.entry
  859. }
  860. FUNCTION {misc}
  861. { output.bibitem
  862. format.authors output
  863. author format.key output
  864. title howpublished new.block.checkb
  865. format.title output
  866. howpublished new.block.checka
  867. howpublished output
  868. format.date output
  869. format.issn output
  870. format.url output
  871. new.block
  872. note output
  873. fin.entry
  874. empty.misc.check
  875. }
  876. FUNCTION {phdthesis}
  877. { output.bibitem
  878. format.authors "author" output.check
  879. author format.key output
  880. new.block
  881. format.btitle "title" output.check
  882. new.block
  883. "PhD thesis" format.thesis.type output.nonnull
  884. school "school" output.check
  885. address output
  886. format.date "year" output.check
  887. format.url output
  888. new.block
  889. note output
  890. fin.entry
  891. }
  892. FUNCTION {proceedings}
  893. { output.bibitem
  894. format.editors output
  895. editor format.key output
  896. new.block
  897. format.btitle "title" output.check
  898. format.bvolume output
  899. format.number.series output
  900. address output
  901. format.date "year" output.check
  902. new.sentence
  903. organization output
  904. publisher output
  905. format.isbn output
  906. format.doi output
  907. format.url output
  908. new.block
  909. note output
  910. fin.entry
  911. }
  912. FUNCTION {techreport}
  913. { output.bibitem
  914. format.authors "author" output.check
  915. author format.key output
  916. new.block
  917. format.title "title" output.check
  918. new.block
  919. format.tr.number output.nonnull
  920. institution "institution" output.check
  921. address output
  922. format.date "year" output.check
  923. format.url output
  924. new.block
  925. note output
  926. fin.entry
  927. }
  928. FUNCTION {unpublished}
  929. { output.bibitem
  930. format.authors "author" output.check
  931. author format.key output
  932. new.block
  933. format.title "title" output.check
  934. new.block
  935. note "note" output.check
  936. format.date output
  937. format.url output
  938. fin.entry
  939. }
  940. FUNCTION {default.type} { misc }
  941. MACRO {jan} {"January"}
  942. MACRO {feb} {"February"}
  943. MACRO {mar} {"March"}
  944. MACRO {apr} {"April"}
  945. MACRO {may} {"May"}
  946. MACRO {jun} {"June"}
  947. MACRO {jul} {"July"}
  948. MACRO {aug} {"August"}
  949. MACRO {sep} {"September"}
  950. MACRO {oct} {"October"}
  951. MACRO {nov} {"November"}
  952. MACRO {dec} {"December"}
  953. MACRO {acmcs} {"ACM Computing Surveys"}
  954. MACRO {acta} {"Acta Informatica"}
  955. MACRO {cacm} {"Communications of the ACM"}
  956. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  957. MACRO {ibmsj} {"IBM Systems Journal"}
  958. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  959. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  960. MACRO {ieeetcad}
  961. {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  962. MACRO {ipl} {"Information Processing Letters"}
  963. MACRO {jacm} {"Journal of the ACM"}
  964. MACRO {jcss} {"Journal of Computer and System Sciences"}
  965. MACRO {scp} {"Science of Computer Programming"}
  966. MACRO {sicomp} {"SIAM Journal on Computing"}
  967. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  968. MACRO {tods} {"ACM Transactions on Database Systems"}
  969. MACRO {tog} {"ACM Transactions on Graphics"}
  970. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  971. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  972. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  973. MACRO {tcs} {"Theoretical Computer Science"}
  974. READ
  975. FUNCTION {sortify}
  976. { purify$
  977. "l" change.case$
  978. }
  979. INTEGERS { len }
  980. FUNCTION {chop.word}
  981. { 's :=
  982. 'len :=
  983. s #1 len substring$ =
  984. { s len #1 + global.max$ substring$ }
  985. 's
  986. if$
  987. }
  988. FUNCTION {format.lab.names}
  989. { 's :=
  990. s #1 "{vv~}{ll}" format.name$
  991. s num.names$ duplicate$
  992. #2 >
  993. { pop$ " et~al." * }
  994. { #2 <
  995. 'skip$
  996. { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  997. { " et~al." * }
  998. { " and " * s #2 "{vv~}{ll}" format.name$ * }
  999. if$
  1000. }
  1001. if$
  1002. }
  1003. if$
  1004. }
  1005. FUNCTION {author.key.label}
  1006. { author empty$
  1007. { key empty$
  1008. { cite$ #1 #3 substring$ }
  1009. 'key
  1010. if$
  1011. }
  1012. { author format.lab.names }
  1013. if$
  1014. }
  1015. FUNCTION {author.editor.key.label}
  1016. { author empty$
  1017. { editor empty$
  1018. { key empty$
  1019. { cite$ #1 #3 substring$ }
  1020. 'key
  1021. if$
  1022. }
  1023. { editor format.lab.names }
  1024. if$
  1025. }
  1026. { author format.lab.names }
  1027. if$
  1028. }
  1029. FUNCTION {author.key.organization.label}
  1030. { author empty$
  1031. { key empty$
  1032. { organization empty$
  1033. { cite$ #1 #3 substring$ }
  1034. { "The " #4 organization chop.word #3 text.prefix$ }
  1035. if$
  1036. }
  1037. 'key
  1038. if$
  1039. }
  1040. { author format.lab.names }
  1041. if$
  1042. }
  1043. FUNCTION {editor.key.organization.label}
  1044. { editor empty$
  1045. { key empty$
  1046. { organization empty$
  1047. { cite$ #1 #3 substring$ }
  1048. { "The " #4 organization chop.word #3 text.prefix$ }
  1049. if$
  1050. }
  1051. 'key
  1052. if$
  1053. }
  1054. { editor format.lab.names }
  1055. if$
  1056. }
  1057. FUNCTION {calc.short.authors}
  1058. { type$ "book" =
  1059. type$ "inbook" =
  1060. or
  1061. 'author.editor.key.label
  1062. { type$ "proceedings" =
  1063. 'editor.key.organization.label
  1064. { type$ "manual" =
  1065. 'author.key.organization.label
  1066. 'author.key.label
  1067. if$
  1068. }
  1069. if$
  1070. }
  1071. if$
  1072. 'short.list :=
  1073. }
  1074. FUNCTION {calc.label}
  1075. { calc.short.authors
  1076. short.list
  1077. "("
  1078. *
  1079. year duplicate$ empty$
  1080. short.list key field.or.null = or
  1081. { pop$ "" }
  1082. 'skip$
  1083. if$
  1084. *
  1085. 'label :=
  1086. }
  1087. FUNCTION {sort.format.names}
  1088. { 's :=
  1089. #1 'nameptr :=
  1090. ""
  1091. s num.names$ 'numnames :=
  1092. numnames 'namesleft :=
  1093. { namesleft #0 > }
  1094. {
  1095. s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
  1096. nameptr #1 >
  1097. {
  1098. " " *
  1099. namesleft #1 = t "others" = and
  1100. { "zzzzz" * }
  1101. { numnames #2 > nameptr #2 = and
  1102. { "zz" * year field.or.null * " " * }
  1103. 'skip$
  1104. if$
  1105. t sortify *
  1106. }
  1107. if$
  1108. }
  1109. { t sortify * }
  1110. if$
  1111. nameptr #1 + 'nameptr :=
  1112. namesleft #1 - 'namesleft :=
  1113. }
  1114. while$
  1115. }
  1116. FUNCTION {sort.format.title}
  1117. { 't :=
  1118. "A " #2
  1119. "An " #3
  1120. "The " #4 t chop.word
  1121. chop.word
  1122. chop.word
  1123. sortify
  1124. #1 global.max$ substring$
  1125. }
  1126. FUNCTION {author.sort}
  1127. { author empty$
  1128. { key empty$
  1129. { "to sort, need author or key in " cite$ * warning$
  1130. ""
  1131. }
  1132. { key sortify }
  1133. if$
  1134. }
  1135. { author sort.format.names }
  1136. if$
  1137. }
  1138. FUNCTION {author.editor.sort}
  1139. { author empty$
  1140. { editor empty$
  1141. { key empty$
  1142. { "to sort, need author, editor, or key in " cite$ * warning$
  1143. ""
  1144. }
  1145. { key sortify }
  1146. if$
  1147. }
  1148. { editor sort.format.names }
  1149. if$
  1150. }
  1151. { author sort.format.names }
  1152. if$
  1153. }
  1154. FUNCTION {author.organization.sort}
  1155. { author empty$
  1156. { organization empty$
  1157. { key empty$
  1158. { "to sort, need author, organization, or key in " cite$ * warning$
  1159. ""
  1160. }
  1161. { key sortify }
  1162. if$
  1163. }
  1164. { "The " #4 organization chop.word sortify }
  1165. if$
  1166. }
  1167. { author sort.format.names }
  1168. if$
  1169. }
  1170. FUNCTION {editor.organization.sort}
  1171. { editor empty$
  1172. { organization empty$
  1173. { key empty$
  1174. { "to sort, need editor, organization, or key in " cite$ * warning$
  1175. ""
  1176. }
  1177. { key sortify }
  1178. if$
  1179. }
  1180. { "The " #4 organization chop.word sortify }
  1181. if$
  1182. }
  1183. { editor sort.format.names }
  1184. if$
  1185. }
  1186. FUNCTION {presort}
  1187. { calc.label
  1188. label sortify
  1189. " "
  1190. *
  1191. type$ "book" =
  1192. type$ "inbook" =
  1193. or
  1194. 'author.editor.sort
  1195. { type$ "proceedings" =
  1196. 'editor.organization.sort
  1197. { type$ "manual" =
  1198. 'author.organization.sort
  1199. 'author.sort
  1200. if$
  1201. }
  1202. if$
  1203. }
  1204. if$
  1205. " "
  1206. *
  1207. year field.or.null sortify
  1208. *
  1209. " "
  1210. *
  1211. cite$
  1212. *
  1213. #1 entry.max$ substring$
  1214. 'sort.label :=
  1215. sort.label *
  1216. #1 entry.max$ substring$
  1217. 'sort.key$ :=
  1218. }
  1219. ITERATE {presort}
  1220. SORT
  1221. STRINGS { longest.label last.label next.extra }
  1222. INTEGERS { longest.label.width last.extra.num number.label }
  1223. FUNCTION {initialize.longest.label}
  1224. { "" 'longest.label :=
  1225. #0 int.to.chr$ 'last.label :=
  1226. "" 'next.extra :=
  1227. #0 'longest.label.width :=
  1228. #0 'last.extra.num :=
  1229. #0 'number.label :=
  1230. }
  1231. FUNCTION {forward.pass}
  1232. { last.label label =
  1233. { last.extra.num #1 + 'last.extra.num :=
  1234. last.extra.num int.to.chr$ 'extra.label :=
  1235. }
  1236. { "a" chr.to.int$ 'last.extra.num :=
  1237. "" 'extra.label :=
  1238. label 'last.label :=
  1239. }
  1240. if$
  1241. number.label #1 + 'number.label :=
  1242. }
  1243. FUNCTION {reverse.pass}
  1244. { next.extra "b" =
  1245. { "a" 'extra.label := }
  1246. 'skip$
  1247. if$
  1248. extra.label 'next.extra :=
  1249. extra.label
  1250. duplicate$ empty$
  1251. 'skip$
  1252. { "{\natexlab{" swap$ * "}}" * }
  1253. if$
  1254. 'extra.label :=
  1255. label extra.label * 'label :=
  1256. }
  1257. EXECUTE {initialize.longest.label}
  1258. ITERATE {forward.pass}
  1259. REVERSE {reverse.pass}
  1260. FUNCTION {bib.sort.order}
  1261. { sort.label 'sort.key$ :=
  1262. }
  1263. ITERATE {bib.sort.order}
  1264. SORT
  1265. FUNCTION {begin.bib}
  1266. { preamble$ empty$
  1267. 'skip$
  1268. { preamble$ write$ newline$ }
  1269. if$
  1270. "\begin{thebibliography}{" number.label int.to.str$ * "}" *
  1271. write$ newline$
  1272. "\providecommand{\natexlab}[1]{#1}"
  1273. write$ newline$
  1274. "\providecommand{\url}[1]{\texttt{#1}}"
  1275. write$ newline$
  1276. "\expandafter\ifx\csname urlstyle\endcsname\relax"
  1277. write$ newline$
  1278. " \providecommand{\doi}[1]{doi: #1}\else"
  1279. write$ newline$
  1280. " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
  1281. write$ newline$
  1282. }
  1283. EXECUTE {begin.bib}
  1284. EXECUTE {init.state.consts}
  1285. ITERATE {call.type$}
  1286. FUNCTION {end.bib}
  1287. { newline$
  1288. "\end{thebibliography}" write$ newline$
  1289. }
  1290. EXECUTE {end.bib}