Advertisement
Guest User

Untitled

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