Advertisement
Guest User

Untitled

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