acl2016.bst 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322
  1. % BibTeX `acl' style file for BibTeX version 0.99c, LaTeX version 2.09
  2. % This version was made by modifying `aaai-named' format based on the master
  3. % file by Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)
  4. % Copyright (C) 1985, all rights reserved.
  5. % Modifications Copyright 1988, Peter F. Patel-Schneider
  6. % Further modifictions by Stuart Shieber, 1991, and Fernando Pereira, 1992.
  7. % Copying of this file is authorized only if either
  8. % (1) you make absolutely no changes to your copy, including name, or
  9. % (2) if you do make changes, you name it something other than
  10. % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  11. % This restriction helps ensure that all standard styles are identical.
  12. % There are undoubtably bugs in this style. If you make bug fixes,
  13. % improvements, etc. please let me know. My e-mail address is:
  14. % pfps@spar.slb.com
  15. % Citation format: [author-last-name, year]
  16. % [author-last-name and author-last-name, year]
  17. % [author-last-name {\em et al.}, year]
  18. %
  19. % Reference list ordering: alphabetical by author or whatever passes
  20. % for author in the absence of one.
  21. %
  22. % This BibTeX style has support for short (year only) citations. This
  23. % is done by having the citations actually look like
  24. % \citename{name-info, }year
  25. % The LaTeX style has to have the following
  26. % \let\@internalcite\cite
  27. % \def\cite{\def\citename##1{##1}\@internalcite}
  28. % \def\shortcite{\def\citename##1{}\@internalcite}
  29. % \def\@biblabel#1{\def\citename##1{##1}[#1]\hfill}
  30. % which makes \shortcite the macro for short citations.
  31. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  32. % Changes made by SMS for thesis style
  33. % no emphasis on "et al."
  34. % "Ph.D." includes periods (not "PhD")
  35. % moved year to immediately after author's name
  36. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  37. ENTRY
  38. { address
  39. author
  40. booktitle
  41. chapter
  42. edition
  43. editor
  44. howpublished
  45. institution
  46. journal
  47. key
  48. month
  49. note
  50. number
  51. organization
  52. pages
  53. publisher
  54. school
  55. series
  56. title
  57. type
  58. volume
  59. year
  60. }
  61. {}
  62. { label extra.label sort.label }
  63. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  64. FUNCTION {init.state.consts}
  65. { #0 'before.all :=
  66. #1 'mid.sentence :=
  67. #2 'after.sentence :=
  68. #3 'after.block :=
  69. }
  70. STRINGS { s t }
  71. FUNCTION {output.nonnull}
  72. { 's :=
  73. output.state mid.sentence =
  74. { ", " * write$ }
  75. { output.state after.block =
  76. { add.period$ write$
  77. newline$
  78. "\newblock " write$
  79. }
  80. { output.state before.all =
  81. 'write$
  82. { add.period$ " " * write$ }
  83. if$
  84. }
  85. if$
  86. mid.sentence 'output.state :=
  87. }
  88. if$
  89. s
  90. }
  91. FUNCTION {output}
  92. { duplicate$ empty$
  93. 'pop$
  94. 'output.nonnull
  95. if$
  96. }
  97. FUNCTION {output.check}
  98. { 't :=
  99. duplicate$ empty$
  100. { pop$ "empty " t * " in " * cite$ * warning$ }
  101. 'output.nonnull
  102. if$
  103. }
  104. FUNCTION {output.bibitem}
  105. { newline$
  106. "\bibitem[" write$
  107. label write$
  108. "]{" write$
  109. cite$ write$
  110. "}" write$
  111. newline$
  112. ""
  113. before.all 'output.state :=
  114. }
  115. FUNCTION {fin.entry}
  116. { add.period$
  117. write$
  118. newline$
  119. }
  120. FUNCTION {new.block}
  121. { output.state before.all =
  122. 'skip$
  123. { after.block 'output.state := }
  124. if$
  125. }
  126. FUNCTION {new.sentence}
  127. { output.state after.block =
  128. 'skip$
  129. { output.state before.all =
  130. 'skip$
  131. { after.sentence 'output.state := }
  132. if$
  133. }
  134. if$
  135. }
  136. FUNCTION {not}
  137. { { #0 }
  138. { #1 }
  139. if$
  140. }
  141. FUNCTION {and}
  142. { 'skip$
  143. { pop$ #0 }
  144. if$
  145. }
  146. FUNCTION {or}
  147. { { pop$ #1 }
  148. 'skip$
  149. if$
  150. }
  151. FUNCTION {new.block.checka}
  152. { empty$
  153. 'skip$
  154. 'new.block
  155. if$
  156. }
  157. FUNCTION {new.block.checkb}
  158. { empty$
  159. swap$ empty$
  160. and
  161. 'skip$
  162. 'new.block
  163. if$
  164. }
  165. FUNCTION {new.sentence.checka}
  166. { empty$
  167. 'skip$
  168. 'new.sentence
  169. if$
  170. }
  171. FUNCTION {new.sentence.checkb}
  172. { empty$
  173. swap$ empty$
  174. and
  175. 'skip$
  176. 'new.sentence
  177. if$
  178. }
  179. FUNCTION {field.or.null}
  180. { duplicate$ empty$
  181. { pop$ "" }
  182. 'skip$
  183. if$
  184. }
  185. FUNCTION {emphasize}
  186. { duplicate$ empty$
  187. { pop$ "" }
  188. { "{\em " swap$ * "}" * }
  189. if$
  190. }
  191. INTEGERS { nameptr namesleft numnames }
  192. FUNCTION {format.names}
  193. { 's :=
  194. #1 'nameptr :=
  195. s num.names$ 'numnames :=
  196. numnames 'namesleft :=
  197. { namesleft #0 > }
  198. { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  199. nameptr #1 >
  200. { namesleft #1 >
  201. { ", " * t * }
  202. { numnames #2 >
  203. { "," * }
  204. 'skip$
  205. if$
  206. t "others" =
  207. { " et~al." * }
  208. { " and " * t * }
  209. if$
  210. }
  211. if$
  212. }
  213. 't
  214. if$
  215. nameptr #1 + 'nameptr :=
  216. namesleft #1 - 'namesleft :=
  217. }
  218. while$
  219. }
  220. FUNCTION {format.authors}
  221. { author empty$
  222. { "" }
  223. { author format.names }
  224. if$
  225. }
  226. FUNCTION {format.editors}
  227. { editor empty$
  228. { "" }
  229. { editor format.names
  230. editor num.names$ #1 >
  231. { ", editors" * }
  232. { ", editor" * }
  233. if$
  234. }
  235. if$
  236. }
  237. FUNCTION {format.title}
  238. { title empty$
  239. { "" }
  240. { title "t" change.case$ }
  241. if$
  242. }
  243. FUNCTION {n.dashify}
  244. { 't :=
  245. ""
  246. { t empty$ not }
  247. { t #1 #1 substring$ "-" =
  248. { t #1 #2 substring$ "--" = not
  249. { "--" *
  250. t #2 global.max$ substring$ 't :=
  251. }
  252. { { t #1 #1 substring$ "-" = }
  253. { "-" *
  254. t #2 global.max$ substring$ 't :=
  255. }
  256. while$
  257. }
  258. if$
  259. }
  260. { t #1 #1 substring$ *
  261. t #2 global.max$ substring$ 't :=
  262. }
  263. if$
  264. }
  265. while$
  266. }
  267. FUNCTION {format.date}
  268. { year empty$
  269. { month empty$
  270. { "" }
  271. { "there's a month but no year in " cite$ * warning$
  272. month
  273. }
  274. if$
  275. }
  276. { month empty$
  277. { "" }
  278. { month }
  279. if$
  280. }
  281. if$
  282. }
  283. FUNCTION {format.btitle}
  284. { title emphasize
  285. }
  286. FUNCTION {tie.or.space.connect}
  287. { duplicate$ text.length$ #3 <
  288. { "~" }
  289. { " " }
  290. if$
  291. swap$ * *
  292. }
  293. FUNCTION {either.or.check}
  294. { empty$
  295. 'pop$
  296. { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  297. if$
  298. }
  299. FUNCTION {format.bvolume}
  300. { volume empty$
  301. { "" }
  302. { "volume" volume tie.or.space.connect
  303. series empty$
  304. 'skip$
  305. { " of " * series emphasize * }
  306. if$
  307. "volume and number" number either.or.check
  308. }
  309. if$
  310. }
  311. FUNCTION {format.number.series}
  312. { volume empty$
  313. { number empty$
  314. { series field.or.null }
  315. { output.state mid.sentence =
  316. { "number" }
  317. { "Number" }
  318. if$
  319. number tie.or.space.connect
  320. series empty$
  321. { "there's a number but no series in " cite$ * warning$ }
  322. { " in " * series * }
  323. if$
  324. }
  325. if$
  326. }
  327. { "" }
  328. if$
  329. }
  330. FUNCTION {format.edition}
  331. { edition empty$
  332. { "" }
  333. { output.state mid.sentence =
  334. { edition "l" change.case$ " edition" * }
  335. { edition "t" change.case$ " edition" * }
  336. if$
  337. }
  338. if$
  339. }
  340. INTEGERS { multiresult }
  341. FUNCTION {multi.page.check}
  342. { 't :=
  343. #0 'multiresult :=
  344. { multiresult not
  345. t empty$ not
  346. and
  347. }
  348. { t #1 #1 substring$
  349. duplicate$ "-" =
  350. swap$ duplicate$ "," =
  351. swap$ "+" =
  352. or or
  353. { #1 'multiresult := }
  354. { t #2 global.max$ substring$ 't := }
  355. if$
  356. }
  357. while$
  358. multiresult
  359. }
  360. FUNCTION {format.pages}
  361. { pages empty$
  362. { "" }
  363. { pages multi.page.check
  364. { "pages" pages n.dashify tie.or.space.connect }
  365. { "page" pages tie.or.space.connect }
  366. if$
  367. }
  368. if$
  369. }
  370. FUNCTION {format.year.label}
  371. { year extra.label *
  372. }
  373. FUNCTION {format.vol.num.pages}
  374. { volume field.or.null
  375. number empty$
  376. 'skip$
  377. { "(" number * ")" * *
  378. volume empty$
  379. { "there's a number but no volume in " cite$ * warning$ }
  380. 'skip$
  381. if$
  382. }
  383. if$
  384. pages empty$
  385. 'skip$
  386. { duplicate$ empty$
  387. { pop$ format.pages }
  388. { ":" * pages n.dashify * }
  389. if$
  390. }
  391. if$
  392. }
  393. FUNCTION {format.chapter.pages}
  394. { chapter empty$
  395. 'format.pages
  396. { type empty$
  397. { "chapter" }
  398. { type "l" change.case$ }
  399. if$
  400. chapter tie.or.space.connect
  401. pages empty$
  402. 'skip$
  403. { ", " * format.pages * }
  404. if$
  405. }
  406. if$
  407. }
  408. FUNCTION {format.in.ed.booktitle}
  409. { booktitle empty$
  410. { "" }
  411. { editor empty$
  412. { "In " booktitle emphasize * }
  413. { "In " format.editors * ", " * booktitle emphasize * }
  414. if$
  415. }
  416. if$
  417. }
  418. FUNCTION {empty.misc.check}
  419. { author empty$ title empty$ howpublished empty$
  420. month empty$ year empty$ note empty$
  421. and and and and and
  422. key empty$ not and
  423. { "all relevant fields are empty in " cite$ * warning$ }
  424. 'skip$
  425. if$
  426. }
  427. FUNCTION {format.thesis.type}
  428. { type empty$
  429. 'skip$
  430. { pop$
  431. type "t" change.case$
  432. }
  433. if$
  434. }
  435. FUNCTION {format.tr.number}
  436. { type empty$
  437. { "Technical Report" }
  438. 'type
  439. if$
  440. number empty$
  441. { "t" change.case$ }
  442. { number tie.or.space.connect }
  443. if$
  444. }
  445. FUNCTION {format.article.crossref}
  446. { key empty$
  447. { journal empty$
  448. { "need key or journal for " cite$ * " to crossref " * crossref *
  449. warning$
  450. ""
  451. }
  452. { "In {\em " journal * "\/}" * }
  453. if$
  454. }
  455. { "In " key * }
  456. if$
  457. " \cite{" * crossref * "}" *
  458. }
  459. FUNCTION {format.crossref.editor}
  460. { editor #1 "{vv~}{ll}" format.name$
  461. editor num.names$ duplicate$
  462. #2 >
  463. { pop$ " et~al." * }
  464. { #2 <
  465. 'skip$
  466. { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  467. { " et~al." * }
  468. { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  469. if$
  470. }
  471. if$
  472. }
  473. if$
  474. }
  475. FUNCTION {format.book.crossref}
  476. { volume empty$
  477. { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  478. "In "
  479. }
  480. { "Volume" volume tie.or.space.connect
  481. " of " *
  482. }
  483. if$
  484. editor empty$
  485. editor field.or.null author field.or.null =
  486. or
  487. { key empty$
  488. { series empty$
  489. { "need editor, key, or series for " cite$ * " to crossref " *
  490. crossref * warning$
  491. "" *
  492. }
  493. { "{\em " * series * "\/}" * }
  494. if$
  495. }
  496. { key * }
  497. if$
  498. }
  499. { format.crossref.editor * }
  500. if$
  501. " \cite{" * crossref * "}" *
  502. }
  503. FUNCTION {format.incoll.inproc.crossref}
  504. { editor empty$
  505. editor field.or.null author field.or.null =
  506. or
  507. { key empty$
  508. { booktitle empty$
  509. { "need editor, key, or booktitle for " cite$ * " to crossref " *
  510. crossref * warning$
  511. ""
  512. }
  513. { "In {\em " booktitle * "\/}" * }
  514. if$
  515. }
  516. { "In " key * }
  517. if$
  518. }
  519. { "In " format.crossref.editor * }
  520. if$
  521. " \cite{" * crossref * "}" *
  522. }
  523. FUNCTION {article}
  524. { output.bibitem
  525. format.authors "author" output.check
  526. new.block
  527. format.year.label "year" output.check
  528. new.block
  529. format.title "title" output.check
  530. new.block
  531. crossref missing$
  532. { journal emphasize "journal" output.check
  533. format.vol.num.pages output
  534. format.date output
  535. }
  536. { format.article.crossref output.nonnull
  537. format.pages output
  538. }
  539. if$
  540. new.block
  541. note output
  542. fin.entry
  543. }
  544. FUNCTION {book}
  545. { output.bibitem
  546. author empty$
  547. { format.editors "author and editor" output.check }
  548. { format.authors output.nonnull
  549. crossref missing$
  550. { "author and editor" editor either.or.check }
  551. 'skip$
  552. if$
  553. }
  554. if$
  555. new.block
  556. format.year.label "year" output.check
  557. new.block
  558. format.btitle "title" output.check
  559. crossref missing$
  560. { format.bvolume output
  561. new.block
  562. format.number.series output
  563. new.sentence
  564. publisher "publisher" output.check
  565. address output
  566. }
  567. { new.block
  568. format.book.crossref output.nonnull
  569. }
  570. if$
  571. format.edition output
  572. format.date output
  573. new.block
  574. note output
  575. fin.entry
  576. }
  577. FUNCTION {booklet}
  578. { output.bibitem
  579. format.authors output
  580. new.block
  581. format.year.label "year" output.check
  582. new.block
  583. format.title "title" output.check
  584. howpublished address new.block.checkb
  585. howpublished output
  586. address output
  587. format.date output
  588. new.block
  589. note output
  590. fin.entry
  591. }
  592. FUNCTION {inbook}
  593. { output.bibitem
  594. author empty$
  595. { format.editors "author and editor" output.check }
  596. { format.authors output.nonnull
  597. crossref missing$
  598. { "author and editor" editor either.or.check }
  599. 'skip$
  600. if$
  601. }
  602. if$
  603. format.year.label "year" output.check
  604. new.block
  605. new.block
  606. format.btitle "title" output.check
  607. crossref missing$
  608. { format.bvolume output
  609. format.chapter.pages "chapter and pages" output.check
  610. new.block
  611. format.number.series output
  612. new.sentence
  613. publisher "publisher" output.check
  614. address output
  615. }
  616. { format.chapter.pages "chapter and pages" output.check
  617. new.block
  618. format.book.crossref output.nonnull
  619. }
  620. if$
  621. format.edition output
  622. format.date output
  623. new.block
  624. note output
  625. fin.entry
  626. }
  627. FUNCTION {incollection}
  628. { output.bibitem
  629. format.authors "author" output.check
  630. new.block
  631. format.year.label "year" output.check
  632. new.block
  633. format.title "title" output.check
  634. new.block
  635. crossref missing$
  636. { format.in.ed.booktitle "booktitle" output.check
  637. format.bvolume output
  638. format.number.series output
  639. format.chapter.pages output
  640. new.sentence
  641. publisher "publisher" output.check
  642. address output
  643. format.edition output
  644. format.date output
  645. }
  646. { format.incoll.inproc.crossref output.nonnull
  647. format.chapter.pages output
  648. }
  649. if$
  650. new.block
  651. note output
  652. fin.entry
  653. }
  654. FUNCTION {inproceedings}
  655. { output.bibitem
  656. format.authors "author" output.check
  657. new.block
  658. format.year.label "year" output.check
  659. new.block
  660. format.title "title" output.check
  661. new.block
  662. crossref missing$
  663. { format.in.ed.booktitle "booktitle" output.check
  664. format.bvolume output
  665. format.number.series output
  666. format.pages output
  667. address empty$
  668. { organization publisher new.sentence.checkb
  669. organization output
  670. publisher output
  671. format.date output
  672. }
  673. { address output.nonnull
  674. format.date output
  675. new.sentence
  676. organization output
  677. publisher output
  678. }
  679. if$
  680. }
  681. { format.incoll.inproc.crossref output.nonnull
  682. format.pages output
  683. }
  684. if$
  685. new.block
  686. note output
  687. fin.entry
  688. }
  689. FUNCTION {conference} { inproceedings }
  690. FUNCTION {manual}
  691. { output.bibitem
  692. author empty$
  693. { organization empty$
  694. 'skip$
  695. { organization output.nonnull
  696. address output
  697. }
  698. if$
  699. }
  700. { format.authors output.nonnull }
  701. if$
  702. format.year.label "year" output.check
  703. new.block
  704. new.block
  705. format.btitle "title" output.check
  706. author empty$
  707. { organization empty$
  708. { address new.block.checka
  709. address output
  710. }
  711. 'skip$
  712. if$
  713. }
  714. { organization address new.block.checkb
  715. organization output
  716. address output
  717. }
  718. if$
  719. format.edition output
  720. format.date output
  721. new.block
  722. note output
  723. fin.entry
  724. }
  725. FUNCTION {mastersthesis}
  726. { output.bibitem
  727. format.authors "author" output.check
  728. new.block
  729. format.year.label "year" output.check
  730. new.block
  731. format.title "title" output.check
  732. new.block
  733. "Master's thesis" format.thesis.type output.nonnull
  734. school "school" output.check
  735. address output
  736. format.date output
  737. new.block
  738. note output
  739. fin.entry
  740. }
  741. FUNCTION {misc}
  742. { output.bibitem
  743. format.authors output
  744. new.block
  745. format.year.label output
  746. new.block
  747. title howpublished new.block.checkb
  748. format.title output
  749. howpublished new.block.checka
  750. howpublished output
  751. format.date output
  752. new.block
  753. note output
  754. fin.entry
  755. empty.misc.check
  756. }
  757. FUNCTION {phdthesis}
  758. { output.bibitem
  759. format.authors "author" output.check
  760. new.block
  761. format.year.label "year" output.check
  762. new.block
  763. format.btitle "title" output.check
  764. new.block
  765. "{Ph.D.} thesis" format.thesis.type output.nonnull
  766. school "school" output.check
  767. address output
  768. format.date output
  769. new.block
  770. note output
  771. fin.entry
  772. }
  773. FUNCTION {proceedings}
  774. { output.bibitem
  775. editor empty$
  776. { organization output }
  777. { format.editors output.nonnull }
  778. if$
  779. new.block
  780. format.year.label "year" output.check
  781. new.block
  782. format.btitle "title" output.check
  783. format.bvolume output
  784. format.number.series output
  785. address empty$
  786. { editor empty$
  787. { publisher new.sentence.checka }
  788. { organization publisher new.sentence.checkb
  789. organization output
  790. }
  791. if$
  792. publisher output
  793. format.date output
  794. }
  795. { address output.nonnull
  796. format.date output
  797. new.sentence
  798. editor empty$
  799. 'skip$
  800. { organization output }
  801. if$
  802. publisher output
  803. }
  804. if$
  805. new.block
  806. note output
  807. fin.entry
  808. }
  809. FUNCTION {techreport}
  810. { output.bibitem
  811. format.authors "author" output.check
  812. new.block
  813. format.year.label "year" output.check
  814. new.block
  815. format.title "title" output.check
  816. new.block
  817. format.tr.number output.nonnull
  818. institution "institution" output.check
  819. address output
  820. format.date output
  821. new.block
  822. note output
  823. fin.entry
  824. }
  825. FUNCTION {unpublished}
  826. { output.bibitem
  827. format.authors "author" output.check
  828. new.block
  829. format.year.label "year" output.check
  830. new.block
  831. format.title "title" output.check
  832. new.block
  833. note "note" output.check
  834. format.date output
  835. fin.entry
  836. }
  837. FUNCTION {default.type} { misc }
  838. MACRO {jan} {"January"}
  839. MACRO {feb} {"February"}
  840. MACRO {mar} {"March"}
  841. MACRO {apr} {"April"}
  842. MACRO {may} {"May"}
  843. MACRO {jun} {"June"}
  844. MACRO {jul} {"July"}
  845. MACRO {aug} {"August"}
  846. MACRO {sep} {"September"}
  847. MACRO {oct} {"October"}
  848. MACRO {nov} {"November"}
  849. MACRO {dec} {"December"}
  850. MACRO {acmcs} {"ACM Computing Surveys"}
  851. MACRO {acta} {"Acta Informatica"}
  852. MACRO {cacm} {"Communications of the ACM"}
  853. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  854. MACRO {ibmsj} {"IBM Systems Journal"}
  855. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  856. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  857. MACRO {ieeetcad}
  858. {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  859. MACRO {ipl} {"Information Processing Letters"}
  860. MACRO {jacm} {"Journal of the ACM"}
  861. MACRO {jcss} {"Journal of Computer and System Sciences"}
  862. MACRO {scp} {"Science of Computer Programming"}
  863. MACRO {sicomp} {"SIAM Journal on Computing"}
  864. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  865. MACRO {tods} {"ACM Transactions on Database Systems"}
  866. MACRO {tog} {"ACM Transactions on Graphics"}
  867. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  868. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  869. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  870. MACRO {tcs} {"Theoretical Computer Science"}
  871. READ
  872. FUNCTION {sortify}
  873. { purify$
  874. "l" change.case$
  875. }
  876. INTEGERS { len }
  877. FUNCTION {chop.word}
  878. { 's :=
  879. 'len :=
  880. s #1 len substring$ =
  881. { s len #1 + global.max$ substring$ }
  882. 's
  883. if$
  884. }
  885. INTEGERS { et.al.char.used }
  886. FUNCTION {initialize.et.al.char.used}
  887. { #0 'et.al.char.used :=
  888. }
  889. EXECUTE {initialize.et.al.char.used}
  890. FUNCTION {format.lab.names}
  891. { 's :=
  892. s num.names$ 'numnames :=
  893. numnames #1 =
  894. { s #1 "{vv }{ll}" format.name$ }
  895. { numnames #2 =
  896. { s #1 "{vv }{ll }and " format.name$ s #2 "{vv }{ll}" format.name$ *
  897. }
  898. { s #1 "{vv }{ll }\bgroup et al.\egroup " format.name$ }
  899. if$
  900. }
  901. if$
  902. }
  903. FUNCTION {author.key.label}
  904. { author empty$
  905. { key empty$
  906. { cite$ #1 #3 substring$ }
  907. { key #3 text.prefix$ }
  908. if$
  909. }
  910. { author format.lab.names }
  911. if$
  912. }
  913. FUNCTION {author.editor.key.label}
  914. { author empty$
  915. { editor empty$
  916. { key empty$
  917. { cite$ #1 #3 substring$ }
  918. { key #3 text.prefix$ }
  919. if$
  920. }
  921. { editor format.lab.names }
  922. if$
  923. }
  924. { author format.lab.names }
  925. if$
  926. }
  927. FUNCTION {author.key.organization.label}
  928. { author empty$
  929. { key empty$
  930. { organization empty$
  931. { cite$ #1 #3 substring$ }
  932. { "The " #4 organization chop.word #3 text.prefix$ }
  933. if$
  934. }
  935. { key #3 text.prefix$ }
  936. if$
  937. }
  938. { author format.lab.names }
  939. if$
  940. }
  941. FUNCTION {editor.key.organization.label}
  942. { editor empty$
  943. { key empty$
  944. { organization empty$
  945. { cite$ #1 #3 substring$ }
  946. { "The " #4 organization chop.word #3 text.prefix$ }
  947. if$
  948. }
  949. { key #3 text.prefix$ }
  950. if$
  951. }
  952. { editor format.lab.names }
  953. if$
  954. }
  955. FUNCTION {calc.label}
  956. { type$ "book" =
  957. type$ "inbook" =
  958. or
  959. 'author.editor.key.label
  960. { type$ "proceedings" =
  961. 'editor.key.organization.label
  962. { type$ "manual" =
  963. 'author.key.organization.label
  964. 'author.key.label
  965. if$
  966. }
  967. if$
  968. }
  969. if$
  970. duplicate$
  971. "\protect\citename{" swap$ * "}" *
  972. year field.or.null purify$ *
  973. 'label :=
  974. year field.or.null purify$ *
  975. sortify 'sort.label :=
  976. }
  977. FUNCTION {sort.format.names}
  978. { 's :=
  979. #1 'nameptr :=
  980. ""
  981. s num.names$ 'numnames :=
  982. numnames 'namesleft :=
  983. { namesleft #0 > }
  984. { nameptr #1 >
  985. { " " * }
  986. 'skip$
  987. if$
  988. s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
  989. nameptr numnames = t "others" = and
  990. { "et al" * }
  991. { t sortify * }
  992. if$
  993. nameptr #1 + 'nameptr :=
  994. namesleft #1 - 'namesleft :=
  995. }
  996. while$
  997. }
  998. FUNCTION {sort.format.title}
  999. { 't :=
  1000. "A " #2
  1001. "An " #3
  1002. "The " #4 t chop.word
  1003. chop.word
  1004. chop.word
  1005. sortify
  1006. #1 global.max$ substring$
  1007. }
  1008. FUNCTION {author.sort}
  1009. { author empty$
  1010. { key empty$
  1011. { "to sort, need author or key in " cite$ * warning$
  1012. ""
  1013. }
  1014. { key sortify }
  1015. if$
  1016. }
  1017. { author sort.format.names }
  1018. if$
  1019. }
  1020. FUNCTION {author.editor.sort}
  1021. { author empty$
  1022. { editor empty$
  1023. { key empty$
  1024. { "to sort, need author, editor, or key in " cite$ * warning$
  1025. ""
  1026. }
  1027. { key sortify }
  1028. if$
  1029. }
  1030. { editor sort.format.names }
  1031. if$
  1032. }
  1033. { author sort.format.names }
  1034. if$
  1035. }
  1036. FUNCTION {author.organization.sort}
  1037. { author empty$
  1038. { organization empty$
  1039. { key empty$
  1040. { "to sort, need author, organization, or key in " cite$ * warning$
  1041. ""
  1042. }
  1043. { key sortify }
  1044. if$
  1045. }
  1046. { "The " #4 organization chop.word sortify }
  1047. if$
  1048. }
  1049. { author sort.format.names }
  1050. if$
  1051. }
  1052. FUNCTION {editor.organization.sort}
  1053. { editor empty$
  1054. { organization empty$
  1055. { key empty$
  1056. { "to sort, need editor, organization, or key in " cite$ * warning$
  1057. ""
  1058. }
  1059. { key sortify }
  1060. if$
  1061. }
  1062. { "The " #4 organization chop.word sortify }
  1063. if$
  1064. }
  1065. { editor sort.format.names }
  1066. if$
  1067. }
  1068. FUNCTION {presort}
  1069. { calc.label
  1070. sort.label
  1071. " "
  1072. *
  1073. type$ "book" =
  1074. type$ "inbook" =
  1075. or
  1076. 'author.editor.sort
  1077. { type$ "proceedings" =
  1078. 'editor.organization.sort
  1079. { type$ "manual" =
  1080. 'author.organization.sort
  1081. 'author.sort
  1082. if$
  1083. }
  1084. if$
  1085. }
  1086. if$
  1087. *
  1088. " "
  1089. *
  1090. year field.or.null sortify
  1091. *
  1092. " "
  1093. *
  1094. title field.or.null
  1095. sort.format.title
  1096. *
  1097. #1 entry.max$ substring$
  1098. 'sort.key$ :=
  1099. }
  1100. ITERATE {presort}
  1101. SORT
  1102. STRINGS { longest.label last.sort.label next.extra }
  1103. INTEGERS { longest.label.width last.extra.num }
  1104. FUNCTION {initialize.longest.label}
  1105. { "" 'longest.label :=
  1106. #0 int.to.chr$ 'last.sort.label :=
  1107. "" 'next.extra :=
  1108. #0 'longest.label.width :=
  1109. #0 'last.extra.num :=
  1110. }
  1111. FUNCTION {forward.pass}
  1112. { last.sort.label sort.label =
  1113. { last.extra.num #1 + 'last.extra.num :=
  1114. last.extra.num int.to.chr$ 'extra.label :=
  1115. }
  1116. { "a" chr.to.int$ 'last.extra.num :=
  1117. "" 'extra.label :=
  1118. sort.label 'last.sort.label :=
  1119. }
  1120. if$
  1121. }
  1122. FUNCTION {reverse.pass}
  1123. { next.extra "b" =
  1124. { "a" 'extra.label := }
  1125. 'skip$
  1126. if$
  1127. label extra.label * 'label :=
  1128. label width$ longest.label.width >
  1129. { label 'longest.label :=
  1130. label width$ 'longest.label.width :=
  1131. }
  1132. 'skip$
  1133. if$
  1134. extra.label 'next.extra :=
  1135. }
  1136. EXECUTE {initialize.longest.label}
  1137. ITERATE {forward.pass}
  1138. REVERSE {reverse.pass}
  1139. FUNCTION {begin.bib}
  1140. { et.al.char.used
  1141. { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
  1142. 'skip$
  1143. if$
  1144. preamble$ empty$
  1145. 'skip$
  1146. { preamble$ write$ newline$ }
  1147. if$
  1148. "\begin{thebibliography}{" "}" * write$ newline$
  1149. }
  1150. EXECUTE {begin.bib}
  1151. EXECUTE {init.state.consts}
  1152. ITERATE {call.type$}
  1153. FUNCTION {end.bib}
  1154. { newline$
  1155. "\end{thebibliography}" write$ newline$
  1156. }
  1157. EXECUTE {end.bib}