1 |
|
%%% Modification of BibTeX style file agu.bst |
2 |
|
%%% ... by urlbst, version 0.5 (marked with "% urlbst") |
3 |
|
%%% See <http://www.astro.gla.ac.uk/users/norman/distrib/urlbst/> |
4 |
|
%%% Added webpage entry type, and url and lastchecked fields. |
5 |
|
%%% Added eprint support. |
6 |
|
%%% Added DOI support. |
7 |
|
%%% Added hyperref support. |
8 |
|
%%% Original headers follow... |
9 |
|
|
10 |
%% |
%% |
11 |
%% This is file `agu.bst', generated |
%% This is file `agu.bst', generated |
12 |
%% on <1994/5/27> with the docstrip utility (2.2e). |
%% on <1994/5/27> with the docstrip utility (2.2e). |
101 |
type |
type |
102 |
volume |
volume |
103 |
year |
year |
104 |
|
eprint % urlbst |
105 |
|
doi % urlbst |
106 |
|
url % urlbst |
107 |
|
lastchecked % urlbst |
108 |
} |
} |
109 |
{} |
{} |
110 |
{ label extra.label sort.label } |
{ label extra.label sort.label } |
111 |
|
|
112 |
INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
113 |
|
|
114 |
|
STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl } % urlbst... |
115 |
|
INTEGERS { hrefform addeprints adddoiresolver } |
116 |
|
% Following constants may be adjusted by hand, if desired |
117 |
|
FUNCTION {init.config.constants} |
118 |
|
{ |
119 |
|
"Available from: " 'urlintro := % prefix before URL |
120 |
|
"http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref |
121 |
|
"arXiv:" 'eprintprefix := % text prefix printed before eprint ref |
122 |
|
"http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI |
123 |
|
"doi:" 'doiprefix := % text prefix printed before DOI ref |
124 |
|
#1 'addeprints := % 0=no eprints; 1=include eprints |
125 |
|
#1 'adddoiresolver := % 0=no DOI resolver; 1=include it |
126 |
|
#2 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs |
127 |
|
} |
128 |
|
INTEGERS { |
129 |
|
bracket.state |
130 |
|
outside.brackets |
131 |
|
open.brackets |
132 |
|
within.brackets |
133 |
|
close.brackets |
134 |
|
} |
135 |
|
% ...urlbst to here |
136 |
FUNCTION {init.state.consts} |
FUNCTION {init.state.consts} |
137 |
{ #0 'before.all := |
{ #0 'outside.brackets := % urlbst |
138 |
|
#1 'open.brackets := |
139 |
|
#2 'within.brackets := |
140 |
|
#3 'close.brackets := |
141 |
|
|
142 |
|
#0 'before.all := |
143 |
#1 'mid.sentence := |
#1 'mid.sentence := |
144 |
#2 'after.sentence := |
#2 'after.sentence := |
145 |
#3 'after.block := |
#3 'after.block := |
147 |
|
|
148 |
STRINGS { s t } |
STRINGS { s t } |
149 |
|
|
150 |
FUNCTION {output.nonnull} |
% urlbst |
151 |
|
FUNCTION {output.nonnull.original} |
152 |
{ 's := |
{ 's := |
153 |
output.state mid.sentence = |
output.state mid.sentence = |
154 |
{ ", " * write$ } |
{ ", " * write$ } |
169 |
s |
s |
170 |
} |
} |
171 |
|
|
172 |
|
% urlbst... |
173 |
|
FUNCTION {output.nonnull} |
174 |
|
{ % Save the thing we've been asked to output |
175 |
|
's := |
176 |
|
% If the bracket-state is close.brackets, then add a close-bracket to |
177 |
|
% what is currently at the top of the stack, and set bracket.state |
178 |
|
% to outside.brackets |
179 |
|
bracket.state close.brackets = |
180 |
|
{ "]" * |
181 |
|
outside.brackets 'bracket.state := |
182 |
|
} |
183 |
|
'skip$ |
184 |
|
if$ |
185 |
|
bracket.state outside.brackets = |
186 |
|
{ % We're outside all brackets -- this is the normal situation. |
187 |
|
% Write out what's currently at the top of the stack, using the |
188 |
|
% original output.nonnull function. |
189 |
|
s |
190 |
|
output.nonnull.original |
191 |
|
} |
192 |
|
{ % Still in brackets. Add open-bracket or (continuation) comma, add the |
193 |
|
% new text (in s) to the top of the stack, and move to the close-brackets |
194 |
|
% state, ready for next time (unless inbrackets resets it). If we come |
195 |
|
% into this branch, then output.state is carefully undisturbed. |
196 |
|
bracket.state open.brackets = |
197 |
|
{ " [" * } |
198 |
|
{ ", " * } % bracket.state will be within.brackets |
199 |
|
if$ |
200 |
|
s * |
201 |
|
close.brackets 'bracket.state := |
202 |
|
} |
203 |
|
if$ |
204 |
|
} |
205 |
|
|
206 |
|
% Call this function just before adding something which should be presented in |
207 |
|
% brackets. bracket.state is handled specially within output.nonnull. |
208 |
|
FUNCTION {inbrackets} |
209 |
|
{ bracket.state close.brackets = |
210 |
|
{ within.brackets 'bracket.state := } % reset the state: not open nor closed |
211 |
|
{ open.brackets 'bracket.state := } |
212 |
|
if$ |
213 |
|
} |
214 |
|
|
215 |
|
FUNCTION {format.lastchecked} |
216 |
|
{ lastchecked empty$ |
217 |
|
{ "" } |
218 |
|
{ inbrackets "cited " lastchecked * } |
219 |
|
if$ |
220 |
|
} |
221 |
|
% ...urlbst to here |
222 |
|
|
223 |
FUNCTION {output} |
FUNCTION {output} |
224 |
{ duplicate$ empty$ |
{ duplicate$ empty$ |
225 |
'pop$ |
'pop$ |
236 |
} |
} |
237 |
|
|
238 |
FUNCTION {output.bibitem} |
FUNCTION {output.bibitem} |
239 |
{ newline$ |
{ outside.brackets 'bracket.state := % urlbst |
240 |
|
newline$ |
241 |
"\bibitem[" write$ |
"\bibitem[" write$ |
242 |
label write$ |
label write$ |
243 |
")]{" write$ |
")]{" write$ |
249 |
} |
} |
250 |
|
|
251 |
FUNCTION {fin.entry} |
FUNCTION {fin.entry} |
252 |
{ add.period$ |
{ |
253 |
|
bracket.state close.brackets = % urlbst |
254 |
|
{ "]" * } |
255 |
|
'skip$ |
256 |
|
if$ |
257 |
|
add.period$ |
258 |
write$ |
write$ |
259 |
newline$ |
newline$ |
260 |
} |
} |
656 |
"\cite{" * crossref * "}" * |
"\cite{" * crossref * "}" * |
657 |
} |
} |
658 |
|
|
659 |
|
% urlbst... |
660 |
|
% Functions for making hypertext links. |
661 |
|
% In all cases, the stack has (link-text href-url) |
662 |
|
% |
663 |
|
% make 'null' specials |
664 |
|
FUNCTION {make.href.null} |
665 |
|
{ |
666 |
|
pop$ |
667 |
|
} |
668 |
|
% make hypertex specials |
669 |
|
FUNCTION {make.href.hypertex} |
670 |
|
{ |
671 |
|
"\special {html:<a href=" quote$ * |
672 |
|
swap$ * quote$ * "> }" * swap$ * |
673 |
|
"\special {html:</a>}" * |
674 |
|
} |
675 |
|
% make hyperref specials |
676 |
|
FUNCTION {make.href.hyperref} |
677 |
|
{ |
678 |
|
" \href{" swap$ * "}{" * swap$ * "}" * |
679 |
|
} |
680 |
|
FUNCTION {make.href} |
681 |
|
{ hrefform #2 = |
682 |
|
'make.href.hyperref % hrefform = 2 |
683 |
|
{ hrefform #1 = |
684 |
|
'make.href.hypertex % hrefform = 1 |
685 |
|
'make.href.null % hrefform = 0 (or anything else) |
686 |
|
if$ |
687 |
|
} |
688 |
|
if$ |
689 |
|
} |
690 |
|
|
691 |
|
FUNCTION {format.url} |
692 |
|
{ url empty$ |
693 |
|
{ "" } |
694 |
|
{ hrefform #1 = |
695 |
|
{ % special case -- add HyperTeX specials |
696 |
|
urlintro "\url{" url * "}" * url make.href.hypertex * } |
697 |
|
{ urlintro "\url{" * url * "}" * } |
698 |
|
if$ |
699 |
|
} |
700 |
|
if$ |
701 |
|
} |
702 |
|
|
703 |
|
FUNCTION {format.eprint} |
704 |
|
{ eprint empty$ |
705 |
|
{ "" } |
706 |
|
{ eprintprefix eprint * eprinturl eprint * make.href } |
707 |
|
if$ |
708 |
|
} |
709 |
|
|
710 |
|
FUNCTION {format.doi} |
711 |
|
{ doi empty$ |
712 |
|
{ "" } |
713 |
|
{ doiprefix doi * doiurl doi * make.href } |
714 |
|
if$ |
715 |
|
} |
716 |
|
|
717 |
|
% Output a URL. We can't use the more normal idiom (something like |
718 |
|
% `format.url output'), because the `inbrackets' within |
719 |
|
% format.lastchecked applies to everything between calls to `output', |
720 |
|
% so that `format.url format.lastchecked * output' ends up with both |
721 |
|
% the URL and the lastchecked in brackets. |
722 |
|
FUNCTION {output.url} |
723 |
|
{ url empty$ |
724 |
|
'skip$ |
725 |
|
{ new.block |
726 |
|
format.url output |
727 |
|
format.lastchecked output |
728 |
|
} |
729 |
|
if$ |
730 |
|
} |
731 |
|
|
732 |
|
FUNCTION {output.web.refs} |
733 |
|
{ |
734 |
|
new.block |
735 |
|
output.url |
736 |
|
addeprints eprint empty$ not and |
737 |
|
{ format.eprint output.nonnull } |
738 |
|
'skip$ |
739 |
|
if$ |
740 |
|
adddoiresolver doi empty$ not and |
741 |
|
{ format.doi output.nonnull } |
742 |
|
'skip$ |
743 |
|
if$ |
744 |
|
% addeprints |
745 |
|
% { eprint empty$ |
746 |
|
% 'skip$ |
747 |
|
% { format.eprint output.nonnull } |
748 |
|
% if$ |
749 |
|
% } |
750 |
|
% 'skip$ |
751 |
|
% if$ |
752 |
|
} |
753 |
|
|
754 |
|
% Webpage entry type. |
755 |
|
% Title and url fields required; |
756 |
|
% author, note, year, month, and lastchecked fields optional |
757 |
|
% See references |
758 |
|
% ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm |
759 |
|
% http://www.classroom.net/classroom/CitingNetResources.html |
760 |
|
% http://neal.ctstateu.edu/history/cite.html |
761 |
|
% http://www.cas.usf.edu/english/walker/mla.html |
762 |
|
% for citation formats for web pages. |
763 |
|
FUNCTION {webpage} |
764 |
|
{ output.bibitem |
765 |
|
author empty$ |
766 |
|
{ editor empty$ |
767 |
|
'skip$ % author and editor both optional |
768 |
|
{ format.editors output.nonnull } |
769 |
|
if$ |
770 |
|
} |
771 |
|
{ editor empty$ |
772 |
|
{ format.authors output.nonnull } |
773 |
|
{ "can't use both author and editor fields in " cite$ * warning$ } |
774 |
|
if$ |
775 |
|
} |
776 |
|
if$ |
777 |
|
% author empty$ |
778 |
|
% 'skip$ |
779 |
|
% { format.authors output.nonnull } |
780 |
|
% if$ |
781 |
|
new.block |
782 |
|
format.title "title" output.check |
783 |
|
inbrackets "online" output |
784 |
|
new.block |
785 |
|
year empty$ |
786 |
|
'skip$ |
787 |
|
{ format.date "year" output.check } |
788 |
|
if$ |
789 |
|
lastchecked empty$ |
790 |
|
'skip$ |
791 |
|
{ format.lastchecked output } |
792 |
|
if$ |
793 |
|
new.block |
794 |
|
format.url "url" output.check |
795 |
|
new.block |
796 |
|
note output |
797 |
|
fin.entry |
798 |
|
} |
799 |
|
% ...urlbst to here |
800 |
|
|
801 |
|
|
802 |
FUNCTION {article} |
FUNCTION {article} |
803 |
{ output.bibitem |
{ output.bibitem |
804 |
format.authors "author" output.check |
format.authors "author" output.check |
814 |
if$ |
if$ |
815 |
note output |
note output |
816 |
format.date "year" output.check |
format.date "year" output.check |
817 |
|
output.web.refs % urlbst |
818 |
fin.entry |
fin.entry |
819 |
} |
} |
820 |
|
|
846 |
format.edition output |
format.edition output |
847 |
note output |
note output |
848 |
format.date "year" output.check |
format.date "year" output.check |
849 |
|
output.web.refs % urlbst |
850 |
fin.entry |
fin.entry |
851 |
} |
} |
852 |
|
|
859 |
address output |
address output |
860 |
note output |
note output |
861 |
format.date "year" output.check |
format.date "year" output.check |
862 |
|
output.web.refs % urlbst |
863 |
fin.entry |
fin.entry |
864 |
} |
} |
865 |
|
|
892 |
format.edition output |
format.edition output |
893 |
note output |
note output |
894 |
format.date "year" output.check |
format.date "year" output.check |
895 |
|
output.web.refs % urlbst |
896 |
fin.entry |
fin.entry |
897 |
} |
} |
898 |
|
|
917 |
if$ |
if$ |
918 |
note output |
note output |
919 |
format.date "year" output.check |
format.date "year" output.check |
920 |
|
output.web.refs % urlbst |
921 |
fin.entry |
fin.entry |
922 |
} |
} |
923 |
|
|
942 |
if$ |
if$ |
943 |
note output |
note output |
944 |
format.date "year" output.check |
format.date "year" output.check |
945 |
|
output.web.refs % urlbst |
946 |
fin.entry |
fin.entry |
947 |
} |
} |
948 |
|
|
958 |
format.edition output |
format.edition output |
959 |
note output |
note output |
960 |
format.date "year" output.check |
format.date "year" output.check |
961 |
|
output.web.refs % urlbst |
962 |
fin.entry |
fin.entry |
963 |
} |
} |
964 |
|
|
972 |
address output |
address output |
973 |
note output |
note output |
974 |
format.date "year" output.check |
format.date "year" output.check |
975 |
|
output.web.refs % urlbst |
976 |
fin.entry |
fin.entry |
977 |
} |
} |
978 |
|
|
984 |
howpublished output |
howpublished output |
985 |
note output |
note output |
986 |
format.date "year" output.check |
format.date "year" output.check |
987 |
|
output.web.refs % urlbst |
988 |
fin.entry |
fin.entry |
989 |
} |
} |
990 |
|
|
998 |
address output |
address output |
999 |
note output |
note output |
1000 |
format.date "year" output.check |
format.date "year" output.check |
1001 |
|
output.web.refs % urlbst |
1002 |
fin.entry |
fin.entry |
1003 |
} |
} |
1004 |
|
|
1015 |
publisher output |
publisher output |
1016 |
note output |
note output |
1017 |
format.date "year" output.check |
format.date "year" output.check |
1018 |
|
output.web.refs % urlbst |
1019 |
fin.entry |
fin.entry |
1020 |
} |
} |
1021 |
|
|
1029 |
address output |
address output |
1030 |
note output |
note output |
1031 |
format.date "year" output.check |
format.date "year" output.check |
1032 |
|
output.web.refs % urlbst |
1033 |
fin.entry |
fin.entry |
1034 |
} |
} |
1035 |
|
|
1040 |
format.title "title" output.check |
format.title "title" output.check |
1041 |
note "note" output.check |
note "note" output.check |
1042 |
format.date "year" output.check |
format.date "year" output.check |
1043 |
|
output.web.refs % urlbst |
1044 |
fin.entry |
fin.entry |
1045 |
} |
} |
1046 |
|
|
1386 |
|
|
1387 |
EXECUTE {begin.bib} |
EXECUTE {begin.bib} |
1388 |
|
|
1389 |
|
EXECUTE {init.config.constants} |
1390 |
EXECUTE {init.state.consts} |
EXECUTE {init.state.consts} |
1391 |
|
|
1392 |
ITERATE {call.type$} |
ITERATE {call.type$} |