biblio-hermes.bst 23 KB

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