/utphys

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/utphys/

« back to all changes in this revision

Viewing changes to utcaps.bst

  • Committer: Jacques Distler
  • Date: 2008-04-07 16:37:46 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20080407163746-uwe0owx6dtt5tcsz
Add DOI support for various entry types

Show diffs side-by-side

added added

removed removed

84
84
%
85
85
%     \href{http://cogprints.org/5542}{{\tt Cogprints:5542}}  
86
86
%
87
 
%  If a "doi" field is present, then the journal reference becomes a
 
87
%  If a
 
88
%
 
89
%       doi = "10.xxxx"
 
90
%
 
91
%  field is present, then the journal reference becomes a
88
92
%  clickable hyperlink to the online journal version of the paper.
89
93
%
90
94
% The bibtex output produced by SPIRES, while far from perfect, is pretty
367
371
  if$
368
372
}
369
373
 
 
374
FUNCTION {add.doi}
 
375
{ duplicate$ empty$
 
376
    { skip$ }
 
377
    { doi empty$
 
378
        {}
 
379
        {"\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" *}
 
380
      if$
 
381
    }
 
382
  if$
 
383
}
 
384
 
370
385
FUNCTION {format.report}
371
386
{ report empty$
372
387
     { ""}
374
389
     if$
375
390
}
376
391
 
377
 
 
378
 
 
379
392
FUNCTION {format.editors}
380
393
{ editor empty$
381
394
    { "" }
764
777
  blank.sep
765
778
  crossref missing$
766
779
  { journal missing$   
767
 
    {}
768
 
    { doi missing$
769
 
        {format.journal}
770
 
        { "\href{http://dx.doi.org/" doi * "}{" *
771
 
            format.journal * "}" *}
772
 
       if$ output
773
 
      }
774
 
      if$
775
 
      report missing$
776
 
            {format.eprint output}
777
 
            {blank.sep format.report output format.eprint output}
778
 
            if$
 
780
        {}
 
781
        { format.journal add.doi "journal" output.check}
 
782
     if$
 
783
     report missing$
 
784
        {format.eprint output}
 
785
        {blank.sep format.report output format.eprint output}
 
786
       if$
779
787
    }
780
788
    { format.article.crossref output.nonnull
781
789
      format.pages output
803
811
      if$
804
812
    }
805
813
  if$
806
 
  format.btitle "title" output.check
 
814
  format.btitle add.doi "title" output.check
807
815
  crossref missing$
808
816
    { format.bvolume output
809
817
      new.block
875
883
  format.btitle "title" output.check
876
884
  crossref missing$
877
885
    { format.bvolume output
878
 
      format.chapter.pages "chapter and pages" output.check
 
886
      format.chapter.pages add.doi "chapter and pages" output.check
879
887
      new.block
880
888
      format.number.series output
881
889
      new.block
882
890
      publisher "publisher" output.check
883
891
      address output
884
892
    }
885
 
    { format.chapter.pages "chapter and pages" output.check
 
893
    { format.chapter.pages add.doi "chapter and pages" output.check
886
894
      new.block
887
895
      format.book.crossref output.nonnull
888
896
    }
904
912
{ output.bibitem
905
913
  format.collaboration output
906
914
  format.authors "author" output.check
907
 
  format.title "title" output.check
 
915
  format.title add.doi "title" output.check
908
916
  blank.sep
909
917
  crossref missing$
910
918
    { format.in.ed.booktitle "booktitle" output.check
936
944
{ output.bibitem
937
945
  format.collaboration output
938
946
  format.authors "author" output.check
939
 
  format.title "title" output.check
 
947
  format.title add.doi "title" output.check
940
948
  blank.sep
941
949
  crossref missing$
942
950
    { format.in.ed.booktitle "booktitle" output.check
1007
1015
FUNCTION {mastersthesis}
1008
1016
{ output.bibitem
1009
1017
  format.authors "author" output.check
1010
 
  format.title "title" output.check
 
1018
  format.title add.doi "title" output.check
1011
1019
  blank.sep
1012
1020
  "Master's thesis" format.thesis.type output.nonnull
1013
1021
  school "school" output.check
1049
1057
FUNCTION {phdthesis}
1050
1058
{ output.bibitem
1051
1059
  format.authors "author" output.check
1052
 
  format.btitle "title" output.check
 
1060
  format.btitle add.doi "title" output.check
1053
1061
  new.block
1054
1062
  "PhD thesis" format.thesis.type output.nonnull
1055
1063
  school "school" output.check
1072
1080
    { organization output }
1073
1081
    { format.editors output.nonnull }
1074
1082
  if$
1075
 
  format.btitle "title" output.check
 
1083
  format.btitle add.doi "title" output.check
1076
1084
  format.bvolume output
1077
1085
  format.number.series output
1078
1086
  editor empty$
1098
1106
{ output.bibitem
1099
1107
  format.collaboration output
1100
1108
  format.authors "author" output.check
1101
 
  format.title "title" output.check
 
1109
  format.title add.doi "title" output.check
1102
1110
  blank.sep
1103
1111
  format.tr.number output.nonnull
1104
1112
  institution "institution" output.check