Advertisement
Guest User

Untitled

a guest
May 19th, 2012
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BibTeX 26.48 KB | None | 0 0
  1. % UT Physics bibliographic style, ver. 2.7. Based on:
  2. %
  3. %X     IEEE Transactions bibliography style (29-Jan-88 version)
  4. %X       numeric labels, order-of-reference, IEEE abbreviations,
  5. %X       quotes around article titles, commas separate all fields
  6. %X       except after book titles and before "notes".  Otherwise,
  7. %X       much like the "plain" family, from which this is adapted.
  8. %X
  9. %X       History
  10. %X       9/30/85    (HWT)   Original version, by Howard Trickey.
  11. %X       1/29/88    (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
  12. %X       THIS `ieeetr' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
  13. %
  14. %  Modifications: 1) added hypertex support and "archive", "eprint"
  15. %                    and "url" fields.
  16. %                 2) parentheses around dates, and no "pp." for article entries
  17. %                 3) "publisher, address" instead of "address: publisher"
  18. %                 4) added "report" field for article entries.
  19. %                 5) particle physics-oriented abbreviations, rather than ieee.
  20. %                 6) added "collaboration" field, as per
  21. %                    Jonathan Flynn' suggestion. SPIRES now supports this field.
  22. %                 7) Improved output of Proceedings entries
  23. %
  24. %    Modified by Jacques Distler, 2/11
  25. %           History: ver 1.0  9/96
  26. %                    ver 1.1 10/96 - added "collaboration" field
  27. %                    ver 1.2  7/97 - added a "\providecommand{\href}[2]{#2}"
  28. %                                    to handle case where \href is not defined
  29. %                    ver 1.3 12/97 - fixed lousy-looking proceedings output.
  30. %                    ver 1.4  1/98 - fixed format.number, address in
  31. %                                    proceedings entries
  32. %                    ver 1.5  3/99 - added (nonprinting) CITATION field for
  33. %                                    SLAC internal use
  34. %                    ver 1.6  4/99 - Fix to ensure %%CITATION output not broken
  35. %                                    across lines. Added new.sentence to ensure
  36. %                                    previous output properly terminated.
  37. %                                    (Moral: test before you release.)
  38. %                    ver 1.7 10/99 - "et.~al." should be "et al." Morons!
  39. %                    ver 1.8 11/99 - Changed the Web URL to the more portable
  40. %                                    arxiv.org. The "archive" field functions as
  41. %                                    a true base-URL. This is NOT A
  42. %                                    BACKWARDS-COMPATIBLE change!
  43. %                   ver 1.8a 12/99 - MACROs for arXiv and cogprints
  44. %                                    BaseURL's defined.
  45. %                   ver 1.9   6/05 - eprint support for other entry types
  46. %                   ver 2.0   4/08 - support "new-style" eprint identifiers
  47. %                   ver 2.1   4/08 - support for "url" field
  48. %                   ver 2.2   4/08 - support for "doi" field
  49. %                   ver 2.3   8/09 - fix month formatting
  50. %                   ver 2.4   7/10 - remove some deprecated font-constructws.
  51. %                                    fix journal number formatting.
  52. %                   ver 2.5   9/10 - Internationalization and some more journal
  53. %                                    MACROs (thanks to Mateus Araujo)
  54. %                   ver 2.6   2/11 - Yipes! Fix capitalization of titles, spooged
  55. %                                    in previous version. (Reported by Ling Weak)
  56. %                   ver 2.7   8/11 - Fix "et~al." in format.crossref.editor, too.
  57. %                                    (Reported by Blake Stacey)
  58. %
  59. % HyperTeX Wizardry:
  60. %
  61. % The following are equivalent:
  62. %   archive  =  arXiv
  63. %   eprint   = "hep-th/9605023"
  64. % and
  65. %   eprint   = "hep-th/9605023"
  66. % both produce
  67. %
  68. %    \href{http://arxiv.org/abs/hep-th/9605023}{{\ttfamily hep-th/9605023}}
  69. %
  70. % in the bibliographic output at the appropriate point. More generally,
  71. % if the archive field is present, we produce a URL of the form
  72. % "archive/eprint" as the first argument of the \href. If absent, the base
  73. % URL defaults to "http://arxiv.org/abs"
  74. % If you are using a hypertex macropackage, like hyperref.sty, this command
  75. % will create a link to the eprint at Los Alamos (or wherever).
  76. %
  77. % "New-style" arXiv identifiers are also supported.
  78. %
  79. %     archivePrefix = "arXiv",
  80. %     eprint    = "0707.3168",
  81. %     primaryClass = "hep-th",
  82. %
  83. % produces
  84. %
  85. %     \href{http://arxiv.org/abs/0707.3168}{{\ttfamily arXiv:0707.3168 [hep-th]}}
  86. %
  87. % Another (non-arXiv) example:
  88. %
  89. %     archive = "http://cogprints.org",
  90. %     eprint = "5542",
  91. %     archivePrefix = "Cogprints",
  92. %
  93. %  produces
  94. %
  95. %     \href{http://cogprints.org/5542}{{\ttfamily Cogprints:5542}}
  96. %
  97. %  If a
  98. %
  99. %       doi = "10.xxxx"
  100. %
  101. %  field is present, then the journal reference becomes a
  102. %  clickable hyperlink to the online journal version of the paper.
  103. %
  104. % The bibtex output produced by SPIRES, while far from perfect, is pretty
  105. % suitable for use with this style. Indeed, this style was designed with
  106. % SPIRES in mind.
  107.  
  108. FUNCTION {string.and} {" ja "}
  109. FUNCTION {string.editors} {", toim."}
  110. FUNCTION {string.editor} {", toim."}
  111. FUNCTION {string.edition} {"~trükk "}
  112. FUNCTION {string.volume} {"köide.~"}
  113. FUNCTION {string.capsvolume} {"Köide.~"}
  114. FUNCTION {string.of} {" kogust "}
  115. FUNCTION {string.number} {"nr.~"}
  116. FUNCTION {string.capsnumber} {"Nr.~"}
  117. FUNCTION {string.in} {"kogus "}
  118. FUNCTION {string.spacein} {" kogus "}
  119. FUNCTION {string.capsin} {"Kogus "}
  120. FUNCTION {string.multipages} {"lk.~"}
  121. FUNCTION {string.pages} {"lk.~"}
  122. FUNCTION {string.chapter} {"ptk.~"}
  123. FUNCTION {string.techrep} {"Tech. Rep."}
  124. FUNCTION {string.mastersthesis} {"magistritöö"}
  125. FUNCTION {string.phdthesis} {"doktoritöö"}
  126.  
  127. MACRO {jan} {"jan."}
  128. MACRO {feb} {"veb."}
  129. MACRO {mar} {"mar."}
  130. MACRO {apr} {"apr."}
  131. MACRO {may} {"mai"}
  132. MACRO {jun} {"jun."}
  133. MACRO {jul} {"jul."}
  134. MACRO {aug} {"aug."}
  135. MACRO {sep} {"sept."}
  136. MACRO {oct} {"okt."}
  137. MACRO {nov} {"nov."}
  138. MACRO {dec} {"dets."}
  139. MACRO {am} {"Acta Math."}
  140. MACRO {amj} {"Am. J. Phys."}
  141. MACRO {ap} {"Ann. Phys."}
  142. MACRO {cmp} {"Comm. Math. Phys."}
  143. MACRO {ijmp} {"Int. Jour. Mod. Phys."}
  144. MACRO {mpl} {"Mod. Phys. Lett."}
  145. MACRO {njp} {"New J. Phys"}
  146. MACRO {nup} {"Nucl. Phys."}
  147. MACRO {pl} {"Phys. Lett."}
  148. MACRO {pla} {"Phys. Lett. A"}
  149. MACRO {pr} {"Phys. Rev."}
  150. MACRO {pra} {"Phys. Rev. A"}
  151. MACRO {prl} {"Phys. Rev. Lett."}
  152. MACRO {repmp} {"Rep. Math. Phys"}
  153. MACRO {rmp} {"Rev. Mod. Phys."}
  154.  
  155. MACRO {arXiv}     {"http://arxiv.org/abs"}
  156. MACRO {cogprints} {"http://cogprints.org"}
  157. MACRO {pubmed}    {"http://www.ncbi.nlm.nih.gov/pubmed"}
  158.  
  159. ENTRY
  160.   { address
  161.    author
  162.    booktitle
  163.    chapter
  164.    edition
  165.    editor
  166.    howpublished
  167.    institution
  168.    journal
  169.    key
  170.    month
  171.    note
  172.    number
  173.    organization
  174.    pages
  175.    publisher
  176.    school
  177.    series
  178.    title
  179.    type
  180.    volume
  181.    year
  182.    archive
  183.    eprint
  184.    report
  185.    collaboration
  186.    SLACcitation
  187.    archivePrefix
  188.    primaryClass
  189.    url
  190.    doi
  191.  }
  192.   {}
  193.   { label }
  194.  
  195. INTEGERS { output.state before.all mid.sentence after.quote after.sentence
  196.         after.quoted.block after.block addurls }
  197.  
  198. FUNCTION {init.state.consts}
  199. { #0 'before.all :=
  200.  #1 'mid.sentence :=
  201.  #2 'after.quote :=
  202.  #3 'after.sentence :=
  203.  #4 'after.quoted.block :=
  204.  #5 'after.block :=
  205. }
  206.  
  207. FUNCTION {init.config.constants}
  208. {
  209.  #0 'addurls     :=
  210. }
  211.  
  212. STRINGS { s t }
  213.  
  214. FUNCTION {output.nonnull}
  215. { 's :=
  216.  output.state mid.sentence =
  217.    { ", " * write$ }
  218.    { output.state after.quote =
  219.     { " " * write$ }
  220.     { output.state after.block =
  221.         { add.period$ write$
  222.           newline$
  223.           "\newblock " write$
  224.         }
  225.         { output.state before.all =
  226.         'write$
  227.         { output.state after.quoted.block =
  228.             { write$
  229.               newline$
  230.               "\newblock " write$
  231.             }
  232.             { add.period$ " " * write$ }
  233.           if$
  234.         }
  235.           if$
  236.         }
  237.       if$
  238.     }
  239.      if$
  240.      mid.sentence 'output.state :=
  241.    }
  242.  if$
  243.  s
  244. }
  245.  
  246. FUNCTION {output}
  247. { duplicate$ empty$
  248.    'pop$
  249.    'output.nonnull
  250.  if$
  251. }
  252.  
  253. FUNCTION {output.check}
  254. { 't :=
  255.  duplicate$ empty$
  256.    { pop$ "empty " t * " in " * cite$ * warning$ }
  257.    'output.nonnull
  258.  if$
  259. }
  260.  
  261. FUNCTION {output.bibitem}
  262. { newline$
  263.  "\bibitem{" write$
  264.  cite$ write$
  265.  "}" write$
  266.  newline$
  267.  ""
  268.  before.all 'output.state :=
  269. }
  270.  
  271. FUNCTION {blank.sep}
  272. { after.quote 'output.state :=
  273. }
  274.  
  275. FUNCTION {fin.entry}
  276. { output.state after.quoted.block =
  277.    'skip$
  278.    'add.period$
  279.  if$
  280.  write$
  281.  newline$
  282. }
  283.  
  284. FUNCTION {new.block}
  285. { output.state before.all =
  286.    'skip$
  287.    { output.state after.quote =
  288.     { after.quoted.block 'output.state := }
  289.     { after.block 'output.state := }
  290.      if$
  291.    }
  292.  if$
  293. }
  294.  
  295. FUNCTION {new.sentence}
  296. { output.state after.block =
  297.    'skip$
  298.    { output.state before.all =
  299.     'skip$
  300.     { after.sentence 'output.state := }
  301.      if$
  302.    }
  303.  if$
  304. }
  305.  
  306. FUNCTION {not}
  307. {   { #0 }
  308.    { #1 }
  309.  if$
  310. }
  311.  
  312. FUNCTION {and}
  313. {   'skip$
  314.    { pop$ #0 }
  315.  if$
  316. }
  317.  
  318. FUNCTION {or}
  319. {   { pop$ #1 }
  320.    'skip$
  321.  if$
  322. }
  323.  
  324. FUNCTION {new.block.checka}
  325. { empty$
  326.    'skip$
  327.    'new.block
  328.  if$
  329. }
  330.  
  331. FUNCTION {new.block.checkb}
  332. { empty$
  333.  swap$ empty$
  334.  and
  335.    'skip$
  336.    'new.block
  337.  if$
  338. }
  339.  
  340. FUNCTION {new.sentence.checka}
  341. { empty$
  342.    'skip$
  343.    'new.sentence
  344.  if$
  345. }
  346.  
  347. FUNCTION {field.or.null}
  348. { duplicate$ empty$
  349.    { pop$ "" }
  350.    'skip$
  351.  if$
  352. }
  353.  
  354. FUNCTION {emphasize}
  355. { duplicate$ empty$
  356.    { pop$ "" }
  357.    { "{\em " swap$ * "}" * }
  358.  if$
  359. }
  360.  
  361. FUNCTION {capitalize}
  362. { "u" change.case$ "t" change.case$ }
  363.  
  364. INTEGERS { nameptr namesleft numnames }
  365.  
  366. FUNCTION {format.names}
  367. { 's :=
  368.  #1 'nameptr :=
  369.  s num.names$ 'numnames :=
  370.  numnames 'namesleft :=
  371.    { namesleft #0 > }
  372.    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  373.      nameptr #1 >
  374.     { namesleft #1 >
  375.         { ", " * t * }
  376.         { %numnames #2 >
  377.         %{ "," * }
  378.     %   'skip$
  379.         %  if$
  380.           t "others" =
  381.         { " {\em et~al.}" * }
  382.         { string.and * t * }
  383.           if$
  384.         }
  385.       if$
  386.     }
  387.     't
  388.      if$
  389.      nameptr #1 + 'nameptr :=
  390.      namesleft #1 - 'namesleft :=
  391.    }
  392.  while$
  393. }
  394.  
  395. FUNCTION {format.authors}
  396. { author empty$
  397.    { "" }
  398.    { author format.names }
  399.  if$
  400. }
  401.  
  402. FUNCTION {format.archive}
  403. {
  404.  archivePrefix empty$
  405.      { "" }
  406.      { archivePrefix ":" *}
  407.  if$            
  408. }
  409.  
  410. FUNCTION {format.primaryClass}
  411. {
  412.  primaryClass empty$
  413.      { "" }
  414.      { " [" primaryClass * "]" *}
  415.  if$            
  416. }
  417.  
  418. FUNCTION {format.eprint}
  419. { eprint empty$
  420.     { ""}
  421.     { archive empty$
  422.          {"\href{http://arxiv.org/abs/" eprint * "}" *
  423.             "{{\ttfamily " * format.archive * eprint *
  424.              format.primaryClass * "}}" *}
  425.          {"\href{" archive *  "/" * eprint * "}" *
  426.             "{{\ttfamily " * format.archive * eprint *
  427.              format.primaryClass * "}}" *}
  428.       if$
  429.     }
  430.     if$
  431. }
  432.  
  433. FUNCTION {format.url}
  434. { addurls not url empty$ or%  addurls not url empty$ not and
  435.    { "" }
  436.    {"\url{" url * "}" *}
  437.  if$
  438. }
  439.  
  440. FUNCTION {add.doi}
  441. { duplicate$ empty$
  442.    { skip$ }
  443.    { doi empty$
  444.        {}
  445.        {"\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" *}
  446.      if$
  447.    }
  448.  if$
  449. }
  450.  
  451. FUNCTION {format.report}
  452. { report empty$
  453.     { ""}
  454.     { report}
  455.     if$
  456. }
  457.  
  458. FUNCTION {format.howpublished}
  459. { howpublished empty$
  460.    { "" }
  461.    { howpublished capitalize
  462.    }
  463.  if$
  464. }
  465.  
  466. FUNCTION {format.editors}
  467. { editor empty$
  468.    { "" }
  469.    { editor format.names
  470.      editor num.names$ #1 >
  471.     { string.editors * }
  472.     { string.editor * }
  473.      if$
  474.    }
  475.  if$
  476. }
  477.  
  478. FUNCTION {format.title}
  479. { title empty$
  480.    { "" }
  481.    { "``" title "t" change.case$ * ",''" * }
  482.  if$
  483. }
  484.  
  485. FUNCTION {format.title.p}
  486. { title empty$
  487.    { "" }
  488.    { "``" title "t" change.case$ * ".''" * }
  489.  if$
  490. }
  491.  
  492. FUNCTION {n.dashify}
  493. { 't :=
  494.  ""
  495.    { t empty$ not }
  496.    { t #1 #1 substring$ "-" =
  497.     { t #1 #2 substring$ "--" = not
  498.         { "--" *
  499.           t #2 global.max$ substring$ 't :=
  500.         }
  501.         {   { t #1 #1 substring$ "-" = }
  502.         { "-" *
  503.           t #2 global.max$ substring$ 't :=
  504.         }
  505.           while$
  506.         }
  507.       if$
  508.     }
  509.     { t #1 #1 substring$ *
  510.       t #2 global.max$ substring$ 't :=
  511.     }
  512.      if$
  513.    }
  514.  while$
  515. }
  516.  
  517. FUNCTION {format.date}
  518. { year empty$
  519.    { month empty$
  520.     { "" }
  521.     { "there's a month but no year in " cite$ * warning$
  522.       month
  523.     }
  524.      if$
  525.    }
  526.    { month empty$
  527.     'year
  528.     { month capitalize ", " * year * }
  529.      if$
  530.    }
  531.  if$
  532. }
  533.  
  534. FUNCTION {format.date.paren}
  535. { year empty$
  536.    { month empty$
  537.     { "" }
  538.     { "there's a month but no year in " cite$ * warning$
  539.       month
  540.     }
  541.      if$
  542.    }
  543.    { month empty$
  544.     {"(" year * ") " *}
  545.     {"(" month capitalize * ", " * year * ") " *}
  546.      if$
  547.    }
  548.  if$
  549. }
  550.  
  551. FUNCTION {format.collaboration}
  552. { collaboration empty$
  553.    { "" }
  554.    { "{\bfseries " collaboration * "}" * }
  555.  if$
  556. }
  557.  
  558. FUNCTION {format.SLACcitation}
  559. { SLACcitation empty$
  560.  {""}
  561.   { newline$ SLACcitation output "" newline$ }
  562.  if$
  563. }
  564.  
  565. FUNCTION {format.btitle}
  566. { title emphasize
  567. }
  568.  
  569. FUNCTION {tie.or.space.connect}
  570. { duplicate$ text.length$ #3 <
  571.    { "~" }
  572.    { " " }
  573.  if$
  574.  swap$ * *
  575. }
  576.  
  577. FUNCTION {either.or.check}
  578. { empty$
  579.    'pop$
  580.    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  581.  if$
  582. }
  583.  
  584. FUNCTION {format.bvolume}
  585. { volume empty$
  586.    { "" }
  587.    { string.volume volume *
  588.      series empty$
  589.     'skip$
  590.     { string.of * series emphasize * }
  591.      if$
  592.      "volume and number" number either.or.check
  593.    }
  594.  if$
  595. }
  596.  
  597. FUNCTION {format.number.series}
  598. { volume empty$
  599.    { number empty$
  600.     { series field.or.null }
  601.     { output.state mid.sentence =
  602.         { string.number }
  603.         { string.capsnumber }
  604.       if$
  605.       number *
  606.       series empty$
  607.         { "there's a number but no series in " cite$ * warning$ }
  608.         { string.spacein * series * }
  609.       if$
  610.     }
  611.      if$
  612.    }
  613.    { "" }
  614.  if$
  615. }
  616.  
  617. FUNCTION {format.edition}
  618. { edition empty$
  619.    { "" }
  620.    { edition "l" change.case$ string.edition * }
  621.  if$
  622. }
  623.  
  624. INTEGERS { multiresult }
  625.  
  626. FUNCTION {multi.page.check}
  627. { 't :=
  628.  #0 'multiresult :=
  629.    { multiresult not
  630.      t empty$ not
  631.      and
  632.    }
  633.    { t #1 #1 substring$
  634.      duplicate$ "-" =
  635.      swap$ duplicate$ "," =
  636.      swap$ "+" =
  637.      or or
  638.     { #1 'multiresult := }
  639.     { t #2 global.max$ substring$ 't := }
  640.      if$
  641.    }
  642.  while$
  643.  multiresult
  644. }
  645.  
  646. FUNCTION {format.pages}
  647. { pages empty$
  648.    { "" }
  649.    { pages multi.page.check
  650.     { string.multipages pages n.dashify * }
  651.     { string.pages pages * }
  652.      if$
  653.    }
  654.  if$
  655. }
  656.  
  657. FUNCTION {format.pages.nopp}
  658. { pages empty$
  659.    { "empty pages in " cite$ * warning$
  660.      ""
  661.    }
  662.    { pages multi.page.check
  663.     { pages n.dashify  }
  664.     { pages }
  665.      if$
  666.    }
  667.  if$
  668. }
  669.  
  670.  
  671. FUNCTION {format.volume}
  672. { volume empty$
  673.    { "" }
  674.    { "{\bfseries " volume * "} " * }
  675.  if$
  676. }
  677.  
  678. FUNCTION {format.number}
  679. { number empty$
  680.    { "" }
  681.    { "no.~" number * ", " *}
  682.  if$
  683. }
  684.  
  685. FUNCTION {format.chapter.pages}
  686. { chapter empty$
  687.    'format.pages
  688.    { type empty$
  689.     { string.chapter chapter * }
  690.     { type "l" change.case$ chapter tie.or.space.connect }
  691.      if$
  692.      pages empty$
  693.     'skip$
  694.     { ", " * format.pages * }
  695.      if$
  696.    }
  697.  if$
  698. }
  699.  
  700. FUNCTION {format.in.ed.booktitle}
  701. { booktitle empty$
  702.    { "" }
  703.    { string.in booktitle emphasize *
  704.      editor empty$
  705.     'skip$
  706.     { ", " * format.editors *  }
  707.      if$
  708.    }
  709.  if$
  710. }
  711.  
  712. FUNCTION {format.thesis.type}
  713. { type empty$
  714.    'skip$
  715.    { pop$
  716.      output.state after.block =
  717.     { type "t" change.case$ }
  718.     { type "l" change.case$ }
  719.      if$
  720.    }
  721.  if$
  722. }
  723.  
  724. FUNCTION {empty.misc.check}
  725. { author empty$ title empty$ howpublished empty$
  726.  month empty$ year empty$ note empty$
  727.  and and and and and
  728.    { "all relevant fields are empty in " cite$ * warning$ }
  729.    'skip$
  730.  if$
  731. }
  732.  
  733. FUNCTION {format.tr.number}
  734. { type empty$
  735.    { string.techrep }
  736.    'type
  737.  if$
  738.  number empty$
  739.    { "l" change.case$ }
  740.    { number tie.or.space.connect }
  741.  if$
  742. }
  743.  
  744. FUNCTION {format.paddress}
  745. { address empty$
  746.    { "" }
  747.    { "(" address * ")" * }
  748.  if$
  749. }
  750.  
  751. FUNCTION {format.article.crossref}
  752. { key empty$
  753.    { journal empty$
  754.     { "need key or journal for " cite$ * " to crossref " * crossref *
  755.       warning$
  756.       ""
  757.     }
  758.     { string.in "{\em " * journal * "\/}" * }
  759.      if$
  760.    }
  761.    { string.in key * }
  762.  if$
  763.  " \cite{" * crossref * "}" *
  764. }
  765.  
  766. FUNCTION {format.crossref.editor}
  767. { editor #1 "{vv~}{ll}" format.name$
  768.  editor num.names$ duplicate$
  769.  #2 >
  770.    { pop$ " {\em et~al.}" * }
  771.    { #2 <
  772.     'skip$
  773.     { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  774.         { " {\em et~al.}" * }
  775.         { string.and * editor #2 "{vv~}{ll}" format.name$ * }
  776.       if$
  777.     }
  778.      if$
  779.    }
  780.  if$
  781. }
  782.  
  783. FUNCTION {format.book.crossref}
  784. { volume empty$
  785.    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  786.      string.capsin
  787.    }
  788.    { string.capsvolume volume *
  789.      string.of *
  790.    }
  791.  if$
  792.  editor empty$
  793.  editor field.or.null author field.or.null =
  794.  or
  795.    { key empty$
  796.     { series empty$
  797.         { "need editor, key, or series for " cite$ * " to crossref " *
  798.           crossref * warning$
  799.           "" *
  800.         }
  801.         { "{\em " * series * "\/}" * }
  802.       if$
  803.     }
  804.     { key * }
  805.      if$
  806.    }
  807.    { format.crossref.editor * }
  808.  if$
  809.  " \cite{" * crossref * "}" *
  810. }
  811.  
  812. FUNCTION {format.incoll.inproc.crossref}
  813. { editor empty$
  814.  editor field.or.null author field.or.null =
  815.  or
  816.    { key empty$
  817.     { booktitle empty$
  818.         { "need editor, key, or booktitle for " cite$ * " to crossref " *
  819.           crossref * warning$
  820.           ""
  821.         }
  822.         { string.in "{\em " * booktitle * "\/}" * }
  823.       if$
  824.     }
  825.     { string.in key * }
  826.      if$
  827.    }
  828.    { string.in format.crossref.editor * }
  829.  if$
  830.  " \cite{" * crossref * "}" *
  831. }
  832.  
  833. FUNCTION {format.journal}
  834. { journal missing$  
  835.    { "" }
  836.    {journal emphasize " " *
  837.     format.volume *
  838.     format.number *
  839.     format.date.paren *
  840.     format.pages.nopp *
  841.      }
  842.    if$
  843. }
  844.  
  845. FUNCTION {article}
  846. { output.bibitem
  847.  format.collaboration output
  848.  format.authors "author" output.check
  849.  format.title "title" output.check
  850.  blank.sep
  851.  crossref missing$
  852.  { journal missing$  
  853.        {}
  854.        { format.journal add.doi "journal" output.check}
  855.      if$
  856.    report missing$
  857.        {format.eprint output}
  858.        {blank.sep format.report output format.eprint output}
  859.      if$
  860.    }
  861.    { format.article.crossref output.nonnull
  862.      format.pages output
  863.      format.eprint output
  864.    }
  865.  if$
  866.  new.sentence
  867.  format.url output
  868.  new.sentence
  869.  note output
  870.  new.sentence
  871.  format.SLACcitation output
  872.  fin.entry
  873. }
  874.  
  875. FUNCTION {book}
  876. { output.bibitem
  877.  format.collaboration output
  878.  author empty$
  879.    { format.editors "author and editor" output.check }
  880.    { format.authors output.nonnull
  881.      crossref missing$
  882.     { "author and editor" editor either.or.check }
  883.     'skip$
  884.      if$
  885.    }
  886.  if$
  887.  format.btitle add.doi "title" output.check
  888.  crossref missing$
  889.    { format.bvolume output
  890.      new.block
  891.      format.number.series output
  892.      new.sentence
  893.      publisher "publisher" output.check
  894.      address output
  895.    }
  896.    { new.block
  897.      format.book.crossref output.nonnull
  898.    }
  899.  if$
  900.  format.edition output
  901.  format.date "year" output.check
  902.  new.block
  903.  format.eprint output
  904.  new.block
  905.  format.url output
  906.  new.block
  907.  note output
  908.  new.sentence
  909.  format.SLACcitation output
  910.  fin.entry
  911. }
  912.  
  913. FUNCTION {booklet}
  914. { output.bibitem
  915.  format.collaboration output
  916.  format.authors output
  917.  title empty$
  918.    { "empty title in " cite$ * warning$
  919.      howpublished new.sentence.checka
  920.    }
  921.    { howpublished empty$ not
  922.      address empty$ month empty$ year empty$ and and
  923.      or
  924.     { format.title.p output.nonnull }
  925.     { format.title output.nonnull }
  926.      if$
  927.      blank.sep
  928.    }
  929.  if$
  930.  format.howpublished output
  931.  address output
  932.  format.date output
  933.  new.block
  934.  format.eprint output
  935.  new.block
  936.  format.url output
  937.  new.block
  938.  note output
  939.  new.sentence
  940.  format.SLACcitation output
  941.  fin.entry
  942. }
  943.  
  944. FUNCTION {inbook}
  945. { output.bibitem
  946.  format.collaboration output
  947.  author empty$
  948.    { format.editors "author and editor" output.check }
  949.    { format.authors output.nonnull
  950.      crossref missing$
  951.     { "author and editor" editor either.or.check }
  952.     'skip$
  953.      if$
  954.    }
  955.  if$
  956.  format.btitle "title" output.check
  957.  crossref missing$
  958.    { format.bvolume output
  959.      format.chapter.pages add.doi "chapter and pages" output.check
  960.      new.block
  961.      format.number.series output
  962.      new.block
  963.      publisher "publisher" output.check
  964.      address output
  965.    }
  966.    { format.chapter.pages add.doi "chapter and pages" output.check
  967.      new.block
  968.      format.book.crossref output.nonnull
  969.    }
  970.  if$
  971.  format.edition output
  972.  format.date "year" output.check
  973.  new.block
  974.  format.eprint output
  975.  new.block
  976.  format.url output
  977.  new.block
  978.  note output
  979.  new.sentence
  980.  format.SLACcitation output
  981.  fin.entry
  982. }
  983.  
  984. FUNCTION {incollection}
  985. { output.bibitem
  986.  format.collaboration output
  987.  format.authors "author" output.check
  988.  format.title add.doi "title" output.check
  989.  blank.sep
  990.  crossref missing$
  991.    { format.in.ed.booktitle "booktitle" output.check
  992.      format.bvolume output
  993.      format.number.series output
  994.      format.chapter.pages output
  995.      new.block
  996.      publisher "publisher" output.check
  997.      address output
  998.      format.edition output
  999.      format.date "year" output.check
  1000.    }
  1001.    { format.incoll.inproc.crossref output.nonnull
  1002.      format.chapter.pages output
  1003.    }
  1004.  if$
  1005.  new.block
  1006.  format.eprint output
  1007.  new.block
  1008.  format.url output
  1009.  new.block
  1010.  note output
  1011.  new.sentence
  1012.  format.SLACcitation output
  1013.  fin.entry
  1014. }
  1015.  
  1016. FUNCTION {inproceedings}
  1017. { output.bibitem
  1018.  format.collaboration output
  1019.  format.authors "author" output.check
  1020.  format.title add.doi "title" output.check
  1021.  blank.sep
  1022.  crossref missing$
  1023.    { format.in.ed.booktitle "booktitle" output.check
  1024.      format.bvolume output
  1025.      format.number.series output
  1026.      format.pages output
  1027.      organization output
  1028.      new.block
  1029.      publisher output
  1030.      address output
  1031.      format.date "year" output.check
  1032.    }
  1033.    { format.incoll.inproc.crossref output.nonnull
  1034.      format.pages output
  1035.    }
  1036.  if$
  1037.  new.block
  1038.  format.eprint output
  1039.  new.block
  1040.  format.url output
  1041.  new.block
  1042.  note output
  1043.  new.sentence
  1044.  format.SLACcitation output
  1045.  fin.entry
  1046. }
  1047.  
  1048. FUNCTION {conference} { inproceedings }
  1049.  
  1050. FUNCTION {manual}
  1051. { output.bibitem
  1052.  format.collaboration output
  1053.  author empty$
  1054.    { organization empty$
  1055.     'skip$
  1056.     { organization output.nonnull
  1057.       address output
  1058.     }
  1059.      if$
  1060.    }
  1061.    { format.authors output.nonnull }
  1062.  if$
  1063.  format.btitle "title" output.check
  1064.  author empty$
  1065.    { organization empty$
  1066.     { address new.block.checka
  1067.       address output
  1068.     }
  1069.     'skip$
  1070.      if$
  1071.    }
  1072.    { organization address new.block.checkb
  1073.      organization output
  1074.      address output
  1075.    }
  1076.  if$
  1077.  format.edition output
  1078.  format.date output
  1079.  new.block
  1080.  format.eprint output
  1081.  new.block
  1082.  format.url output
  1083.  new.block
  1084.  note output
  1085.  fin.entry
  1086. }
  1087.  
  1088. FUNCTION {mastersthesis}
  1089. { output.bibitem
  1090.  format.authors "author" output.check
  1091.  format.title add.doi "title" output.check
  1092.  blank.sep
  1093.  string.mastersthesis format.thesis.type output.nonnull
  1094.  school "school" output.check
  1095.  address output
  1096.  format.date "year" output.check
  1097.  new.block
  1098.  format.url output
  1099.  new.block
  1100.  note output
  1101.  fin.entry
  1102. }
  1103.  
  1104. FUNCTION {misc}
  1105. { output.bibitem
  1106.  format.collaboration output
  1107.  format.authors output
  1108.  title empty$
  1109.    { howpublished new.sentence.checka }
  1110.    { howpublished empty$ not
  1111.      month empty$ year empty$ and
  1112.      or
  1113.     { format.title.p output.nonnull }
  1114.     { format.title output.nonnull }
  1115.      if$
  1116.      blank.sep
  1117.    }
  1118.  if$
  1119.  format.howpublished output
  1120.  format.date output
  1121.  new.block
  1122.  format.url output
  1123.  new.sentence
  1124.  note output
  1125.  new.sentence
  1126.  fin.entry
  1127.  empty.misc.check
  1128. }
  1129.  
  1130. FUNCTION {phdthesis}
  1131. { output.bibitem
  1132.  format.authors "author" output.check
  1133.  format.btitle add.doi "title" output.check
  1134.  new.block
  1135.  string.phdthesis format.thesis.type output.nonnull
  1136.  school "school" output.check
  1137.  address output
  1138.  format.date "year" output.check
  1139.  new.block
  1140.  format.eprint output
  1141.  new.block
  1142.  format.url output
  1143.  new.block
  1144.  note output
  1145.  new.sentence
  1146.  format.SLACcitation output
  1147.  fin.entry
  1148. }
  1149.  
  1150. FUNCTION {proceedings}
  1151. { output.bibitem
  1152.  editor empty$
  1153.    { organization output }
  1154.    { format.editors output.nonnull }
  1155.  if$
  1156.  format.btitle add.doi "title" output.check
  1157.  format.bvolume output
  1158.  format.number.series output
  1159.  editor empty$
  1160.    'skip$
  1161.    { organization output }
  1162.  if$
  1163.  new.block
  1164.  publisher output
  1165.  address output
  1166.  format.date "year" output.check
  1167.  new.block
  1168.  format.eprint output
  1169.  new.block
  1170.  format.url output
  1171.  new.block
  1172.  note output
  1173.  new.sentence
  1174.  format.SLACcitation output
  1175.  fin.entry
  1176. }
  1177.  
  1178. FUNCTION {techreport}
  1179. { output.bibitem
  1180.  format.collaboration output
  1181.  format.authors "author" output.check
  1182.  format.title add.doi "title" output.check
  1183.  blank.sep
  1184.  format.tr.number output.nonnull
  1185.  institution "institution" output.check
  1186.  address output
  1187.  format.date "year" output.check
  1188.  new.block
  1189.  format.eprint output
  1190.  new.block
  1191.  format.url output
  1192.  new.block
  1193.  note output
  1194.  fin.entry
  1195. }
  1196.  
  1197. FUNCTION {unpublished}
  1198. { output.bibitem
  1199.  format.collaboration output
  1200.  format.authors "author" output.check
  1201.  format.title.p "title" output.check
  1202.  blank.sep
  1203.  note "note" output.check
  1204.  format.date output
  1205.  new.sentence
  1206.  format.SLACcitation output
  1207.  fin.entry
  1208. }
  1209.  
  1210. FUNCTION {default.type} { misc }
  1211.  
  1212. READ
  1213.  
  1214. STRINGS { longest.label }
  1215.  
  1216. INTEGERS { number.label longest.label.width }
  1217.  
  1218. FUNCTION {initialize.longest.label}
  1219. { "" 'longest.label :=
  1220.  #1 'number.label :=
  1221.  #0 'longest.label.width :=
  1222. }
  1223.  
  1224. FUNCTION {longest.label.pass}
  1225. { number.label int.to.str$ 'label :=
  1226.  number.label #1 + 'number.label :=
  1227.  label width$ longest.label.width >
  1228.    { label 'longest.label :=
  1229.      label width$ 'longest.label.width :=
  1230.    }
  1231.    'skip$
  1232.  if$
  1233. }
  1234.  
  1235. EXECUTE {initialize.longest.label}
  1236.  
  1237. ITERATE {longest.label.pass}
  1238.  
  1239. FUNCTION {begin.bib}
  1240. { preamble$ empty$
  1241.    'skip$
  1242.    { preamble$ write$ newline$ }
  1243.  if$
  1244.  "\providecommand{\href}[2]{#2}"
  1245.  "\begingroup\raggedright\begin{thebibliography}{" * longest.label  *
  1246.  "}" * write$ newline$ }
  1247.  
  1248. EXECUTE {begin.bib}
  1249.  
  1250. EXECUTE {init.config.constants}
  1251.  
  1252. EXECUTE {init.state.consts}
  1253.  
  1254. ITERATE {call.type$}
  1255.  
  1256. FUNCTION {end.bib}
  1257. { newline$
  1258.  "\end{thebibliography}\endgroup" write$ newline$
  1259. }
  1260.  
  1261. EXECUTE {end.bib}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement