comprefstyle.bst 27 KB

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