Advertisement
Guest User

Untitled

a guest
Apr 15th, 2017
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.62 KB | None | 0 0
  1. ENTRY
  2. { address
  3. author
  4. booktitle
  5. chapter
  6. doi
  7. eid
  8. edition
  9. editor
  10. howpublished
  11. institution
  12. isbn
  13. issn
  14. journal
  15. key
  16. month
  17. note
  18. number
  19. organization
  20. pages
  21. publisher
  22. school
  23. series
  24. title
  25. type
  26. url
  27. volume
  28. year
  29. annotate
  30. }
  31. {}
  32. { label extra.label sort.label short.list }
  33.  
  34. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  35.  
  36. FUNCTION {init.state.consts}
  37. { #0 'before.all :=
  38. #1 'mid.sentence :=
  39. #2 'after.sentence :=
  40. #3 'after.block :=
  41. }
  42.  
  43. STRINGS { s t }
  44.  
  45. FUNCTION {output.nonnull}
  46. { 's :=
  47. output.state mid.sentence =
  48. { ", " * write$ }
  49. { output.state after.block =
  50. { add.period$ write$
  51. newline$
  52. "\newblock " write$
  53. }
  54. { output.state before.all =
  55. 'write$
  56. { add.period$ " " * write$ }
  57. if$
  58. }
  59. if$
  60. mid.sentence 'output.state :=
  61. }
  62. if$
  63. s
  64. }
  65.  
  66. FUNCTION {output}
  67. { duplicate$ empty$
  68. 'pop$
  69. 'output.nonnull
  70. if$
  71. }
  72.  
  73. FUNCTION {output.check}
  74. { 't :=
  75. duplicate$ empty$
  76. { pop$ "empty " t * " in " * cite$ * warning$ }
  77. 'output.nonnull
  78. if$
  79. }
  80.  
  81. FUNCTION {fin.entry}
  82. { add.period$
  83. write$
  84. newline$
  85. }
  86.  
  87. FUNCTION {new.block}
  88. { output.state before.all =
  89. 'skip$
  90. { after.block 'output.state := }
  91. if$
  92. }
  93.  
  94. FUNCTION {new.sentence}
  95. { output.state after.block =
  96. 'skip$
  97. { output.state before.all =
  98. 'skip$
  99. { after.sentence 'output.state := }
  100. if$
  101. }
  102. if$
  103. }
  104.  
  105. FUNCTION {not}
  106. { { #0 }
  107. { #1 }
  108. if$
  109. }
  110.  
  111. FUNCTION {and}
  112. { 'skip$
  113. { pop$ #0 }
  114. if$
  115. }
  116.  
  117. FUNCTION {or}
  118. { { pop$ #1 }
  119. 'skip$
  120. if$
  121. }
  122.  
  123. FUNCTION {new.block.checka}
  124. { empty$
  125. 'skip$
  126. 'new.block
  127. if$
  128. }
  129.  
  130. FUNCTION {new.block.checkb}
  131. { empty$
  132. swap$ empty$
  133. and
  134. 'skip$
  135. 'new.block
  136. if$
  137. }
  138.  
  139. FUNCTION {new.sentence.checka}
  140. { empty$
  141. 'skip$
  142. 'new.sentence
  143. if$
  144. }
  145.  
  146. FUNCTION {new.sentence.checkb}
  147. { empty$
  148. swap$ empty$
  149. and
  150. 'skip$
  151. 'new.sentence
  152. if$
  153. }
  154.  
  155. FUNCTION {field.or.null}
  156. { duplicate$ empty$
  157. { pop$ "" }
  158. 'skip$
  159. if$
  160. }
  161.  
  162. FUNCTION {emphasize}
  163. { duplicate$ empty$
  164. { pop$ "" }
  165. { "\emph{" swap$ * "}" * }
  166. if$
  167. }
  168.  
  169. INTEGERS { nameptr namesleft numnames }
  170.  
  171. FUNCTION {format.names}
  172. { 's :=
  173. "" 't :=
  174. #1 'nameptr :=
  175. s num.names$ 'numnames :=
  176. numnames 'namesleft :=
  177. { namesleft #0 > }
  178. { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  179. nameptr #1 >
  180. { namesleft #1 >
  181. { ", " * t * }
  182. { s nameptr "{ll}" format.name$ duplicate$ "others" =
  183. { 't := }
  184. { pop$ }
  185. if$
  186. t "others" =
  187. { " \bbletal{}." * }
  188. { " \bbland{} " * t * }
  189. if$
  190. }
  191. if$
  192. }
  193. 't
  194. if$
  195. nameptr #1 + 'nameptr :=
  196. namesleft #1 - 'namesleft :=
  197. }
  198. while$
  199. }
  200.  
  201. FUNCTION {format.key}
  202. { empty$
  203. { key field.or.null }
  204. { "" }
  205. if$
  206. }
  207.  
  208. FUNCTION {format.authors}
  209. { author empty$
  210. { "" }
  211. { author format.names }
  212. if$
  213. }
  214.  
  215. FUNCTION {format.editors}
  216. { editor empty$
  217. { "" }
  218. { editor format.names
  219. editor num.names$ #1 >
  220. { ", \bbleditors{}" * }
  221. { ", \bbleditor{}" * }
  222. if$
  223. }
  224. if$
  225. }
  226.  
  227. FUNCTION {format.isbn}
  228. { isbn empty$
  229. { "" }
  230. { new.block "ISBN " isbn * }
  231. if$
  232. }
  233.  
  234. FUNCTION {format.issn}
  235. { issn empty$
  236. { "" }
  237. { new.block "ISSN " issn * }
  238. if$
  239. }
  240.  
  241. FUNCTION {format.url}
  242. { url empty$
  243. { "" }
  244. { new.block "URL \url{" url * "}" * }
  245. if$
  246. }
  247.  
  248. FUNCTION {format.doi}
  249. { doi empty$
  250. { "" }
  251. { new.block "\doi{" doi * "}" * }
  252. if$
  253. }
  254.  
  255. FUNCTION {format.title}
  256. { title empty$
  257. { "" }
  258. { title "t" change.case$ }
  259. if$
  260. }
  261.  
  262. FUNCTION {format.full.names}
  263. {'s :=
  264. #1 'nameptr :=
  265. s num.names$ 'numnames :=
  266. numnames 'namesleft :=
  267. { namesleft #0 > }
  268. { s nameptr
  269. "{vv~}{ll}" format.name$ 't :=
  270. nameptr #1 >
  271. {
  272. namesleft #1 >
  273. { ", " * t * }
  274. {
  275. numnames #2 >
  276. { "," * }
  277. 'skip$
  278. if$
  279. t "others" =
  280. { " \bbletal{}." * }
  281. { " \bbland{} " * t * }
  282. if$
  283. }
  284. if$
  285. }
  286. 't
  287. if$
  288. nameptr #1 + 'nameptr :=
  289. namesleft #1 - 'namesleft :=
  290. }
  291. while$
  292. }
  293.  
  294. FUNCTION {author.editor.full}
  295. { author empty$
  296. { editor empty$
  297. { "" }
  298. { editor format.full.names }
  299. if$
  300. }
  301. { author format.full.names }
  302. if$
  303. }
  304.  
  305. FUNCTION {author.full}
  306. { author empty$
  307. { "" }
  308. { author format.full.names }
  309. if$
  310. }
  311.  
  312. FUNCTION {editor.full}
  313. { editor empty$
  314. { "" }
  315. { editor format.full.names }
  316. if$
  317. }
  318.  
  319. FUNCTION {make.full.names}
  320. { type$ "book" =
  321. type$ "inbook" =
  322. or
  323. 'author.editor.full
  324. { type$ "proceedings" =
  325. 'editor.full
  326. 'author.full
  327. if$
  328. }
  329. if$
  330. }
  331.  
  332. FUNCTION {output.bibitem}
  333. { newline$
  334. "\bibitem[" write$
  335. label write$
  336. ")" make.full.names duplicate$ short.list =
  337. { pop$ }
  338. { * }
  339. if$
  340. "]{" * write$
  341. cite$ write$
  342. "}" write$
  343. newline$
  344. ""
  345. before.all 'output.state :=
  346. }
  347.  
  348. FUNCTION {n.dashify}
  349. { 't :=
  350. ""
  351. { t empty$ not }
  352. { t #1 #1 substring$ "-" =
  353. { t #1 #2 substring$ "--" = not
  354. { "--" *
  355. t #2 global.max$ substring$ 't :=
  356. }
  357. { { t #1 #1 substring$ "-" = }
  358. { "-" *
  359. t #2 global.max$ substring$ 't :=
  360. }
  361. while$
  362. }
  363. if$
  364. }
  365. { t #1 #1 substring$ *
  366. t #2 global.max$ substring$ 't :=
  367. }
  368. if$
  369. }
  370. while$
  371. }
  372.  
  373. FUNCTION {format.date}
  374. { year duplicate$ empty$
  375. { "empty year in " cite$ * warning$
  376. pop$ "" }
  377. 'skip$
  378. if$
  379. month empty$
  380. 'skip$
  381. { month
  382. " " * swap$ *
  383. }
  384. if$
  385. extra.label *
  386. }
  387.  
  388. FUNCTION {format.btitle}
  389. { title emphasize
  390. }
  391.  
  392. FUNCTION {tie.or.space.connect}
  393. { duplicate$ text.length$ #3 <
  394. { "~" }
  395. { " " }
  396. if$
  397. swap$ * *
  398. }
  399.  
  400. FUNCTION {either.or.check}
  401. { empty$
  402. 'pop$
  403. { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  404. if$
  405. }
  406.  
  407. FUNCTION {format.bvolume}
  408. { volume empty$
  409. { "" }
  410. { "\bblvolume{}" volume tie.or.space.connect
  411. series empty$
  412. 'skip$
  413. { " \bblof{} " * series emphasize * }
  414. if$
  415. "volume and number" number either.or.check
  416. }
  417. if$
  418. }
  419.  
  420. FUNCTION {capitalize}
  421. { "\capitalize" swap$ * }
  422.  
  423. FUNCTION {format.number.series}
  424. { volume empty$
  425. { number empty$
  426. { series field.or.null }
  427. { output.state mid.sentence =
  428. { "\bblnumber{}" }
  429. { "\bblnumber{}" capitalize }
  430. if$
  431. number tie.or.space.connect
  432. series empty$
  433. { "there's a number but no series in " cite$ * warning$ }
  434. { " \bblins{} " * series * }
  435. if$
  436. }
  437. if$
  438. }
  439. { "" }
  440. if$
  441. }
  442.  
  443. FUNCTION {eng.ord}
  444. { duplicate$ "1" swap$ *
  445. #-2 #1 substring$ "1" =
  446. { "\bblth{}" * }
  447. { duplicate$ #-1 #1 substring$
  448. duplicate$ "1" =
  449. { pop$ "\bblst{}" * }
  450. { duplicate$ "2" =
  451. { pop$ "\bblnd{}" * }
  452. { "3" =
  453. { "\bblrd{}" * }
  454. { "\bblth{}" * }
  455. if$
  456. }
  457. if$
  458. }
  459. if$
  460. }
  461. if$
  462. }
  463.  
  464. FUNCTION {is.num}
  465. { chr.to.int$
  466. duplicate$ "0" chr.to.int$ < not
  467. swap$ "9" chr.to.int$ > not and
  468. }
  469.  
  470. FUNCTION {extract.num}
  471. { duplicate$ 't :=
  472. "" 's :=
  473. { t empty$ not }
  474. { t #1 #1 substring$
  475. t #2 global.max$ substring$ 't :=
  476. duplicate$ is.num
  477. { s swap$ * 's := }
  478. { pop$ "" 't := }
  479. if$
  480. }
  481. while$
  482. s empty$
  483. 'skip$
  484. { pop$ s }
  485. if$
  486. }
  487.  
  488. FUNCTION {convert.edition}
  489. { edition extract.num "l" change.case$ 's :=
  490. s "first" = s "1" = or
  491. { "\bblfirst{}" 't := }
  492. { s "second" = s "2" = or
  493. { "\bblsecond{}" 't := }
  494. { s "third" = s "3" = or
  495. { "\bblthird{}" 't := }
  496. { s "fourth" = s "4" = or
  497. { "\bblfourth{}" 't := }
  498. { s "fifth" = s "5" = or
  499. { "\bblfifth{}" 't := }
  500. { s #1 #1 substring$ is.num
  501. { s eng.ord 't := }
  502. { edition 't := }
  503. if$
  504. }
  505. if$
  506. }
  507. if$
  508. }
  509. if$
  510. }
  511. if$
  512. }
  513. if$
  514. t
  515. }
  516.  
  517. FUNCTION {format.edition}
  518. { edition empty$
  519. { "" }
  520. { output.state mid.sentence =
  521. { convert.edition "l" change.case$ " " * "\bbledition{}" * }
  522. { convert.edition "t" change.case$ " " * "\bbledition{}" * }
  523. if$
  524. }
  525. if$
  526. }
  527.  
  528. INTEGERS { multiresult }
  529.  
  530. FUNCTION {multi.page.check}
  531. { 't :=
  532. #0 'multiresult :=
  533. { multiresult not
  534. t empty$ not
  535. and
  536. }
  537. { t #1 #1 substring$
  538. duplicate$ "-" =
  539. swap$ duplicate$ "," =
  540. swap$ "+" =
  541. or or
  542. { #1 'multiresult := }
  543. { t #2 global.max$ substring$ 't := }
  544. if$
  545. }
  546. while$
  547. multiresult
  548. }
  549.  
  550. FUNCTION {format.pages}
  551. { pages empty$
  552. { "" }
  553. { pages multi.page.check
  554. { "\bblpages{}" pages n.dashify tie.or.space.connect }
  555. { "\bblpage{}" pages tie.or.space.connect }
  556. if$
  557. }
  558. if$
  559. }
  560.  
  561. FUNCTION {format.eid}
  562. { eid empty$
  563. { "" }
  564. { "art." eid tie.or.space.connect }
  565. if$
  566. }
  567.  
  568. FUNCTION {format.vol.num.pages}
  569. { volume field.or.null
  570. number empty$
  571. 'skip$
  572. { "\penalty0 :" number * "" * *
  573. volume empty$
  574. { "there's a number but no volume in " cite$ * warning$ }
  575. 'skip$
  576. if$
  577. }
  578. if$
  579. pages empty$
  580. 'skip$
  581. { duplicate$ empty$
  582. { pop$ format.pages }
  583. { ". \penalty0 " * pages * }
  584. if$
  585. }
  586. if$
  587. }
  588.  
  589. FUNCTION {format.vol.num.eid}
  590. { volume field.or.null
  591. number empty$
  592. 'skip$
  593. { "\penalty0 (" number * ")" * *
  594. volume empty$
  595. { "there's a number but no volume in " cite$ * warning$ }
  596. 'skip$
  597. if$
  598. }
  599. if$
  600. eid empty$
  601. 'skip$
  602. { duplicate$ empty$
  603. { pop$ format.eid }
  604. { ":\penalty0 " * eid * }
  605. if$
  606. }
  607. if$
  608. }
  609.  
  610. FUNCTION {format.chapter.pages}
  611. { chapter empty$
  612. 'format.pages
  613. { type empty$
  614. { "\bblchapter{}" }
  615. { type "l" change.case$ }
  616. if$
  617. chapter tie.or.space.connect
  618. pages empty$
  619. 'skip$
  620. { ", " * format.pages * }
  621. if$
  622. }
  623. if$
  624. }
  625.  
  626. FUNCTION {format.in.ed.booktitle}
  627. { booktitle empty$
  628. { "" }
  629. { editor empty$
  630. { "\bblin{} " capitalize booktitle emphasize * }
  631. { "\bblin{} " booktitle emphasize * ", " * capitalize format.editors * }
  632. if$
  633. }
  634. if$
  635. }
  636.  
  637. FUNCTION {format.in.ed.booktitle.proc}
  638. { booktitle empty$
  639. { "" }
  640. { editor empty$
  641. { " " booktitle emphasize * }
  642. { " " booktitle emphasize * ", " * format.editors * }
  643. if$
  644. }
  645. if$
  646. }
  647.  
  648. FUNCTION {empty.misc.check}
  649. { author empty$ title empty$ howpublished empty$
  650. month empty$ year empty$ note empty$
  651. and and and and and
  652. key empty$ not and
  653. { "all relevant fields are empty in " cite$ * warning$ }
  654. 'skip$
  655. if$
  656. }
  657.  
  658. FUNCTION {format.thesis.type}
  659. { type empty$
  660. 'skip$
  661. { pop$
  662. type "t" change.case$
  663. }
  664. if$
  665. }
  666.  
  667. FUNCTION {format.tr.number}
  668. { type empty$
  669. { "\bbltechreport{}" capitalize }
  670. 'type
  671. if$
  672. number empty$
  673. { "t" change.case$ }
  674. { number tie.or.space.connect }
  675. if$
  676. }
  677.  
  678. FUNCTION {format.article.crossref}
  679. { key empty$
  680. { journal empty$
  681. { "need key or journal for " cite$ * " to crossref " * crossref *
  682. warning$
  683. ""
  684. }
  685. { "\bblinj{} " capitalize * "\emph{" journal * "}" * }
  686. if$
  687. }
  688. { "\bblin{} " capitalize key * }
  689. if$
  690. " \citep{" * crossref * "}" *
  691. }
  692.  
  693. FUNCTION {format.book.crossref}
  694. { volume empty$
  695. { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  696. "\bblin{} " capitalize
  697. }
  698. { "\bblvolume{}" capitalize volume tie.or.space.connect
  699. " \bblof{} " *
  700. }
  701. if$
  702. editor empty$
  703. editor field.or.null author field.or.null =
  704. or
  705. { key empty$
  706. { series empty$
  707. { "need editor, key, or series for " cite$ * " to crossref " *
  708. crossref * warning$
  709. "" *
  710. }
  711. { "\emph{" * series * "}" * }
  712. if$
  713. }
  714. { key * }
  715. if$
  716. }
  717. 'skip$
  718. if$
  719. ", \citet{" * crossref * "}" *
  720. }
  721.  
  722. FUNCTION {format.incoll.inproc.crossref}
  723. { editor empty$
  724. editor field.or.null author field.or.null =
  725. or
  726. { key empty$
  727. { booktitle empty$
  728. { "need editor, key, or booktitle for " cite$ * " to crossref " *
  729. crossref * warning$
  730. ""
  731. }
  732. { "\bblin{} " capitalize * "\emph{" booktitle * "}" * }
  733. if$
  734. }
  735. { "\bblin{} " capitalize key * }
  736. if$
  737. }
  738. { "\bblin{} " capitalize }
  739. if$
  740. " \citet{" * crossref * "}" *
  741. }
  742.  
  743. FUNCTION {article}
  744. { output.bibitem
  745. format.authors "author" output.check
  746. format.date "year" output.check
  747. author format.key output
  748. new.block
  749. format.title "title" output.check
  750. new.block
  751. crossref missing$
  752. { journal emphasize "journal" output.check
  753. new.block
  754. "[Verkkolehti]" output
  755. new.block
  756. eid empty$
  757. { format.vol.num.pages output }
  758. { format.vol.num.eid output }
  759. if$
  760. }
  761. { format.article.crossref output.nonnull
  762. eid empty$
  763. { format.pages output }
  764. { format.eid output }
  765. if$
  766. }
  767. if$
  768. new.block
  769. annotate output
  770. format.issn output
  771. format.doi output
  772. format.url output
  773. new.block
  774. note output
  775. fin.entry
  776. }
  777.  
  778. FUNCTION {book}
  779. { output.bibitem
  780. author empty$
  781. { format.editors "author and editor" output.check
  782. editor format.key output
  783. }
  784. { format.authors output.nonnull
  785. crossref missing$
  786. { "author and editor" editor either.or.check }
  787. 'skip$
  788. if$
  789. }
  790. if$
  791. new.block
  792. format.date "year" output.check
  793. format.btitle "title" output.check
  794. format.edition output
  795. crossref missing$
  796. { format.bvolume output
  797. new.block
  798. format.number.series output
  799. new.sentence
  800. publisher "publisher" output.check
  801. address output
  802. }
  803. { new.block
  804. format.book.crossref output.nonnull
  805. }
  806. if$
  807. pages output
  808. format.isbn output
  809. format.doi output
  810. format.url output
  811. new.block
  812. note output
  813. fin.entry
  814. }
  815.  
  816. FUNCTION {booklet}
  817. { output.bibitem
  818. format.authors output
  819. author format.key output
  820. new.block
  821. format.title "title" output.check
  822. howpublished address new.block.checkb
  823. howpublished output
  824. address output
  825. format.date output
  826. format.isbn output
  827. format.doi output
  828. format.url output
  829. new.block
  830. note output
  831. fin.entry
  832. }
  833.  
  834. FUNCTION {inbook}
  835. { output.bibitem
  836. author empty$
  837. { format.editors "author and editor" output.check
  838. editor format.key output
  839. }
  840. { format.authors output.nonnull
  841. crossref missing$
  842. { "author and editor" editor either.or.check }
  843. 'skip$
  844. if$
  845. }
  846. if$
  847. new.block
  848. format.btitle "title" output.check
  849. crossref missing$
  850. { format.bvolume output
  851. format.chapter.pages "chapter and pages" output.check
  852. new.block
  853. format.number.series output
  854. new.sentence
  855. publisher "publisher" output.check
  856. address output
  857. }
  858. { format.chapter.pages "chapter and pages" output.check
  859. new.block
  860. format.book.crossref output.nonnull
  861. }
  862. if$
  863. format.edition output
  864. format.date "year" output.check
  865. format.isbn output
  866. format.doi output
  867. format.url output
  868. new.block
  869. note output
  870. fin.entry
  871. }
  872.  
  873. FUNCTION {incollection}
  874. { output.bibitem
  875. format.authors "author" output.check
  876. author format.key output
  877. new.block
  878. format.title "title" output.check
  879. new.block
  880. crossref missing$
  881. { format.in.ed.booktitle "booktitle" output.check
  882. format.bvolume output
  883. format.number.series output
  884. format.chapter.pages output
  885. new.sentence
  886. publisher "publisher" output.check
  887. address output
  888. format.edition output
  889. format.date "year" output.check
  890. }
  891. { format.incoll.inproc.crossref output.nonnull
  892. format.chapter.pages output
  893. }
  894. if$
  895. format.isbn output
  896. format.doi output
  897. format.url output
  898. new.block
  899. note output
  900. fin.entry
  901. }
  902.  
  903. FUNCTION {inproceedings}
  904. { output.bibitem
  905. format.authors "author" output.check
  906. author format.key output
  907. new.block
  908. format.title "title" output.check
  909. new.block
  910. crossref missing$
  911. { format.in.ed.booktitle.proc "booktitle" output.check
  912. format.bvolume output
  913. format.number.series output
  914. format.pages output
  915. address empty$
  916. { organization publisher new.sentence.checkb
  917. organization output
  918. publisher output
  919. format.date "year" output.check
  920. }
  921. { address output.nonnull
  922. format.date "year" output.check
  923. new.sentence
  924. organization output
  925. publisher output
  926. }
  927. if$
  928. }
  929. { format.incoll.inproc.crossref output.nonnull
  930. format.pages output
  931. }
  932. if$
  933. format.isbn output
  934. format.doi output
  935. format.url output
  936. new.block
  937. note output
  938. fin.entry
  939. }
  940.  
  941. FUNCTION {conference} { inproceedings }
  942.  
  943. FUNCTION {manual}
  944. { output.bibitem
  945. format.authors output
  946. author format.key output
  947. new.block
  948. format.btitle "title" output.check
  949. organization address new.block.checkb
  950. organization output
  951. address output
  952. format.edition output
  953. format.date output
  954. format.url output
  955. new.block
  956. note output
  957. fin.entry
  958. }
  959.  
  960. FUNCTION {mastersthesis}
  961. { output.bibitem
  962. format.authors "author" output.check
  963. author format.key output
  964. new.block
  965. format.title "title" output.check
  966. new.block
  967. "\bblmthesis{}" capitalize format.thesis.type output.nonnull
  968. school "school" output.check
  969. address output
  970. format.date "year" output.check
  971. format.url output
  972. new.block
  973. note output
  974. fin.entry
  975. }
  976.  
  977. FUNCTION {misc}
  978. { output.bibitem
  979. format.authors output
  980. author format.key output
  981. title howpublished new.block.checkb
  982. format.title output
  983. howpublished new.block.checka
  984. howpublished output
  985. format.date output
  986. format.issn output
  987. format.url output
  988. new.block
  989. note output
  990. fin.entry
  991. empty.misc.check
  992. }
  993.  
  994. FUNCTION {phdthesis}
  995. { output.bibitem
  996. format.authors "author" output.check
  997. author format.key output
  998. new.block
  999. format.btitle "title" output.check
  1000. new.block
  1001. "\bblphdthesis{}" capitalize format.thesis.type output.nonnull
  1002. school "school" output.check
  1003. address output
  1004. format.date "year" output.check
  1005. format.url output
  1006. new.block
  1007. note output
  1008. fin.entry
  1009. }
  1010.  
  1011. FUNCTION {proceedings}
  1012. { output.bibitem
  1013. format.editors output
  1014. editor format.key output
  1015. new.block
  1016. format.btitle "title" output.check
  1017. format.bvolume output
  1018. format.number.series output
  1019. address output
  1020. format.date "year" output.check
  1021. new.sentence
  1022. organization output
  1023. publisher output
  1024. format.isbn output
  1025. format.doi output
  1026. format.url output
  1027. new.block
  1028. note output
  1029. fin.entry
  1030. }
  1031.  
  1032. FUNCTION {techreport}
  1033. { output.bibitem
  1034. format.authors "author" output.check
  1035. author format.key output
  1036. new.block
  1037. format.title "title" output.check
  1038. new.block
  1039. format.tr.number output.nonnull
  1040. institution "institution" output.check
  1041. address output
  1042. format.date "year" output.check
  1043. format.url output
  1044. new.block
  1045. note output
  1046. fin.entry
  1047. }
  1048.  
  1049. FUNCTION {unpublished}
  1050. { output.bibitem
  1051. format.authors "author" output.check
  1052. author format.key output
  1053. new.block
  1054. format.title "title" output.check
  1055. format.url output
  1056. new.block
  1057. note "note" output.check
  1058. format.date output
  1059. fin.entry
  1060. }
  1061.  
  1062. FUNCTION {default.type} { misc }
  1063.  
  1064.  
  1065. MACRO {jan} {"\bbljan{}"}
  1066.  
  1067. MACRO {feb} {"\bblfeb{}"}
  1068.  
  1069. MACRO {mar} {"\bblmar{}"}
  1070.  
  1071. MACRO {apr} {"\bblapr{}"}
  1072.  
  1073. MACRO {may} {"\bblmay{}"}
  1074.  
  1075. MACRO {jun} {"\bbljun{}"}
  1076.  
  1077. MACRO {jul} {"\bbljul{}"}
  1078.  
  1079. MACRO {aug} {"\bblaug{}"}
  1080.  
  1081. MACRO {sep} {"\bblsep{}"}
  1082.  
  1083. MACRO {oct} {"\bbloct{}"}
  1084.  
  1085. MACRO {nov} {"\bblnov{}"}
  1086.  
  1087. MACRO {dec} {"\bbldec{}"}
  1088.  
  1089.  
  1090.  
  1091. MACRO {acmcs} {"ACM Computing Surveys"}
  1092.  
  1093. MACRO {acta} {"Acta Informatica"}
  1094.  
  1095. MACRO {cacm} {"Communications of the ACM"}
  1096.  
  1097. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  1098.  
  1099. MACRO {ibmsj} {"IBM Systems Journal"}
  1100.  
  1101. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  1102.  
  1103. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  1104.  
  1105. MACRO {ieeetcad}
  1106. {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  1107.  
  1108. MACRO {ipl} {"Information Processing Letters"}
  1109.  
  1110. MACRO {jacm} {"Journal of the ACM"}
  1111.  
  1112. MACRO {jcss} {"Journal of Computer and System Sciences"}
  1113.  
  1114. MACRO {scp} {"Science of Computer Programming"}
  1115.  
  1116. MACRO {sicomp} {"SIAM Journal on Computing"}
  1117.  
  1118. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  1119.  
  1120. MACRO {tods} {"ACM Transactions on Database Systems"}
  1121.  
  1122. MACRO {tog} {"ACM Transactions on Graphics"}
  1123.  
  1124. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  1125.  
  1126. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  1127.  
  1128. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  1129.  
  1130. MACRO {tcs} {"Theoretical Computer Science"}
  1131.  
  1132.  
  1133. READ
  1134.  
  1135. FUNCTION {sortify}
  1136. { purify$
  1137. "l" change.case$
  1138. }
  1139.  
  1140. INTEGERS { len }
  1141.  
  1142. FUNCTION {chop.word}
  1143. { 's :=
  1144. 'len :=
  1145. s #1 len substring$ =
  1146. { s len #1 + global.max$ substring$ }
  1147. 's
  1148. if$
  1149. }
  1150.  
  1151. FUNCTION {format.lab.names}
  1152. { 's :=
  1153. s #1 "{vv~}{ll}" format.name$
  1154. s num.names$ duplicate$
  1155. #2 >
  1156. { pop$ " \bbletal{}." * }
  1157. { #2 <
  1158. 'skip$
  1159. { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1160. { " \bbletal{}." * }
  1161. { " \bbland{} " * s #2 "{vv~}{ll}" format.name$ * }
  1162. if$
  1163. }
  1164. if$
  1165. }
  1166. if$
  1167. }
  1168.  
  1169. FUNCTION {author.key.label}
  1170. { author empty$
  1171. { key empty$
  1172. { cite$ #1 #3 substring$ }
  1173. 'key
  1174. if$
  1175. }
  1176. { author format.lab.names }
  1177. if$
  1178. }
  1179.  
  1180. FUNCTION {author.editor.key.label}
  1181. { author empty$
  1182. { editor empty$
  1183. { key empty$
  1184. { cite$ #1 #3 substring$ }
  1185. 'key
  1186. if$
  1187. }
  1188. { editor format.lab.names }
  1189. if$
  1190. }
  1191. { author format.lab.names }
  1192. if$
  1193. }
  1194.  
  1195. FUNCTION {author.key.organization.label}
  1196. { author empty$
  1197. { key empty$
  1198. { organization empty$
  1199. { cite$ #1 #3 substring$ }
  1200. { "The " #4 organization chop.word #3 text.prefix$ }
  1201. if$
  1202. }
  1203. 'key
  1204. if$
  1205. }
  1206. { author format.lab.names }
  1207. if$
  1208. }
  1209.  
  1210. FUNCTION {editor.key.organization.label}
  1211. { editor empty$
  1212. { key empty$
  1213. { organization empty$
  1214. { cite$ #1 #3 substring$ }
  1215. { "The " #4 organization chop.word #3 text.prefix$ }
  1216. if$
  1217. }
  1218. 'key
  1219. if$
  1220. }
  1221. { editor format.lab.names }
  1222. if$
  1223. }
  1224.  
  1225. FUNCTION {calc.short.authors}
  1226. { type$ "book" =
  1227. type$ "inbook" =
  1228. or
  1229. 'author.editor.key.label
  1230. { type$ "proceedings" =
  1231. 'editor.key.organization.label
  1232. { type$ "manual" =
  1233. 'author.key.organization.label
  1234. 'author.key.label
  1235. if$
  1236. }
  1237. if$
  1238. }
  1239. if$
  1240. 'short.list :=
  1241. }
  1242.  
  1243. FUNCTION {calc.label}
  1244. { calc.short.authors
  1245. short.list
  1246. "("
  1247. *
  1248. year duplicate$ empty$
  1249. short.list key field.or.null = or
  1250. { pop$ "" }
  1251. 'skip$
  1252. if$
  1253. *
  1254. 'label :=
  1255. }
  1256.  
  1257. FUNCTION {sort.format.names}
  1258. { 's :=
  1259. #1 'nameptr :=
  1260. ""
  1261. s num.names$ 'numnames :=
  1262. numnames 'namesleft :=
  1263. { namesleft #0 > }
  1264. {
  1265. s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
  1266. nameptr #1 >
  1267. {
  1268. " " *
  1269. namesleft #1 = t "others" = and
  1270. { "zzzzz" * }
  1271. { numnames #2 > nameptr #2 = and
  1272. { "zz" * year field.or.null * " " * }
  1273. 'skip$
  1274. if$
  1275. t sortify *
  1276. }
  1277. if$
  1278. }
  1279. { t sortify * }
  1280. if$
  1281. nameptr #1 + 'nameptr :=
  1282. namesleft #1 - 'namesleft :=
  1283. }
  1284. while$
  1285. }
  1286.  
  1287. FUNCTION {sort.format.title}
  1288. { 't :=
  1289. "A " #2
  1290. "An " #3
  1291. "The " #4 t chop.word
  1292. chop.word
  1293. chop.word
  1294. sortify
  1295. #1 global.max$ substring$
  1296. }
  1297.  
  1298. FUNCTION {author.sort}
  1299. { author empty$
  1300. { key empty$
  1301. { "to sort, need author or key in " cite$ * warning$
  1302. ""
  1303. }
  1304. { key sortify }
  1305. if$
  1306. }
  1307. { author sort.format.names }
  1308. if$
  1309. }
  1310.  
  1311. FUNCTION {author.editor.sort}
  1312. { author empty$
  1313. { editor empty$
  1314. { key empty$
  1315. { "to sort, need author, editor, or key in " cite$ * warning$
  1316. ""
  1317. }
  1318. { key sortify }
  1319. if$
  1320. }
  1321. { editor sort.format.names }
  1322. if$
  1323. }
  1324. { author sort.format.names }
  1325. if$
  1326. }
  1327.  
  1328. FUNCTION {author.organization.sort}
  1329. { author empty$
  1330. { organization empty$
  1331. { key empty$
  1332. { "to sort, need author, organization, or key in " cite$ * warning$
  1333. ""
  1334. }
  1335. { key sortify }
  1336. if$
  1337. }
  1338. { "The " #4 organization chop.word sortify }
  1339. if$
  1340. }
  1341. { author sort.format.names }
  1342. if$
  1343. }
  1344.  
  1345. FUNCTION {editor.organization.sort}
  1346. { editor empty$
  1347. { organization empty$
  1348. { key empty$
  1349. { "to sort, need editor, organization, or key in " cite$ * warning$
  1350. ""
  1351. }
  1352. { key sortify }
  1353. if$
  1354. }
  1355. { "The " #4 organization chop.word sortify }
  1356. if$
  1357. }
  1358. { editor sort.format.names }
  1359. if$
  1360. }
  1361.  
  1362.  
  1363. FUNCTION {presort}
  1364. { calc.label
  1365. label sortify
  1366. " "
  1367. *
  1368. type$ "book" =
  1369. type$ "inbook" =
  1370. or
  1371. 'author.editor.sort
  1372. { type$ "proceedings" =
  1373. 'editor.organization.sort
  1374. { type$ "manual" =
  1375. 'author.organization.sort
  1376. 'author.sort
  1377. if$
  1378. }
  1379. if$
  1380. }
  1381. if$
  1382. " "
  1383. *
  1384. cite$
  1385. *
  1386. #1 entry.max$ substring$
  1387. 'sort.label :=
  1388. sort.label *
  1389. #1 entry.max$ substring$
  1390. 'sort.key$ :=
  1391. }
  1392.  
  1393. ITERATE {presort}
  1394.  
  1395. SORT
  1396.  
  1397. STRINGS { longest.label last.label next.extra }
  1398.  
  1399. INTEGERS { longest.label.width last.extra.num number.label }
  1400.  
  1401. FUNCTION {initialize.longest.label}
  1402. { "" 'longest.label :=
  1403. #0 int.to.chr$ 'last.label :=
  1404. "" 'next.extra :=
  1405. #0 'longest.label.width :=
  1406. #0 'last.extra.num :=
  1407. #0 'number.label :=
  1408. }
  1409.  
  1410. FUNCTION {forward.pass}
  1411. { last.label label =
  1412. { last.extra.num #1 + 'last.extra.num :=
  1413. last.extra.num int.to.chr$ 'extra.label :=
  1414. }
  1415. { "a" chr.to.int$ 'last.extra.num :=
  1416. "" 'extra.label :=
  1417. label 'last.label :=
  1418. }
  1419. if$
  1420. number.label #1 + 'number.label :=
  1421. }
  1422.  
  1423. FUNCTION {reverse.pass}
  1424. { next.extra "b" =
  1425. { "a" 'extra.label := }
  1426. 'skip$
  1427. if$
  1428. extra.label 'next.extra :=
  1429. extra.label
  1430. duplicate$ empty$
  1431. 'skip$
  1432. { "{\natexlab{" swap$ * "}}" * }
  1433. if$
  1434. 'extra.label :=
  1435. label extra.label * 'label :=
  1436. }
  1437.  
  1438. EXECUTE {initialize.longest.label}
  1439.  
  1440. ITERATE {forward.pass}
  1441.  
  1442. REVERSE {reverse.pass}
  1443.  
  1444. FUNCTION {bib.sort.order}
  1445. { sort.label
  1446. " "
  1447. *
  1448. year field.or.null sortify
  1449. *
  1450. " "
  1451. *
  1452. title field.or.null
  1453. sort.format.title
  1454. *
  1455. #1 entry.max$ substring$
  1456. 'sort.key$ :=
  1457. }
  1458.  
  1459. ITERATE {bib.sort.order}
  1460.  
  1461. SORT
  1462.  
  1463. FUNCTION {begin.bib}
  1464. { preamble$ empty$
  1465. 'skip$
  1466. { preamble$ write$ newline$ }
  1467. if$
  1468. "\begin{thebibliography}{" number.label int.to.str$ * "}" *
  1469. write$ newline$
  1470. "\input babelbst.tex" write$ newline$
  1471. "\newcommand{\Capitalize}[1]{\uppercase{#1}}" write$ newline$
  1472. "\newcommand{\capitalize}[1]{\expandafter\Capitalize#1}" write$ newline$
  1473. "\providecommand{\natexlab}[1]{#1}"
  1474. write$ newline$
  1475. "\providecommand{\url}[1]{\texttt{#1}}"
  1476. write$ newline$
  1477. "\expandafter\ifx\csname urlstyle\endcsname\relax"
  1478. write$ newline$
  1479. " \providecommand{\doi}[1]{Saatavissa: DOI #1}\else"
  1480. write$ newline$
  1481. " \providecommand{\doi}{Saatavissa: DOI \begingroup \urlstyle{rm}\Url}\fi"
  1482. write$ newline$
  1483. }
  1484.  
  1485. EXECUTE {begin.bib}
  1486.  
  1487. EXECUTE {init.state.consts}
  1488.  
  1489. ITERATE {call.type$}
  1490.  
  1491. FUNCTION {end.bib}
  1492. { newline$
  1493. "\end{thebibliography}" write$ newline$
  1494. }
  1495.  
  1496. EXECUTE {end.bib}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement