mdpi.bst 22 KB

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