2
%% This is file `elsarticle-harv.bst',
4
%% Copyright 2007, 2008, 2009 Elsevier Ltd
6
%% This file is part of the 'Elsarticle Bundle'.
7
%% ---------------------------------------------
9
%% It may be distributed under the conditions of the LaTeX Project Public
10
%% License, either version 1.2 of this license or (at your option) any
11
%% later version. The latest version of this license is in
12
%% http://www.latex-project.org/lppl.txt
13
%% and version 1.2 or later is part of all distributions of LaTeX
14
%% version 1999/12/01 or later.
16
%% The list of all files belonging to the 'Elsarticle Bundle' is
17
%% given in the file `manifest.txt'.
20
%% $Id: elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp $
23
%%-------------------------------------------------------------------
24
%% This bibliography style file is intended for texts in ENGLISH
25
%% This is an author-year citation style bibliography. As such, it is
26
%% non-standard LaTeX, and requires a special package file
27
%% to function properly.
28
%% Such a package is natbib.sty by Patrick W. Daly
29
%% The form of the \bibitem entries is
30
%% \bibitem[Jones et al.(1990)]{key}...
31
%% \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
32
%% The essential feature is that the label (the part in brackets) consists
33
%% of the author names, as they should appear in the citation, with the year
34
%% in parentheses following. There must be no space before the opening
36
%% With natbib v5.3, a full list of authors may also follow the year.
37
%% In natbib.sty, it is possible to define the type of enclosures that is
38
%% really wanted (brackets or parentheses), but in either case, there must
39
%% be parentheses in the label.
40
%% The \cite command functions as follows:
41
%% \citet{key} ==>> Jones et al. (1990)
42
%% \citet*{key} ==>> Jones, Baker, and Smith (1990)
43
%% \citep{key} ==>> (Jones et al., 1990)
44
%% \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
45
%% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
46
%% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
47
%% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32)
48
%% \citeauthor{key} ==>> Jones et al.
49
%% \citeauthor*{key} ==>> Jones, Baker, and Smith
50
%% \citeyear{key} ==>> 1990
51
%%---------------------------------------------------------------------
79
{ label extra.label sort.label short.list }
81
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
83
FUNCTION {init.state.consts}
92
FUNCTION {output.nonnull}
94
output.state mid.sentence =
96
{ output.state after.block =
101
{ output.state before.all =
103
{ add.period$ " " * write$ }
107
mid.sentence 'output.state :=
120
FUNCTION {output.check}
123
{ pop$ "empty " t * " in " * cite$ * warning$ }
135
{ output.state before.all =
137
{ after.block 'output.state := }
141
FUNCTION {new.sentence}
142
{ output.state after.block =
144
{ output.state before.all =
146
{ after.sentence 'output.state := }
155
{ " " * before.all 'output.state :=
158
FUNCTION {date.block}
181
FUNCTION {new.block.checkb}
190
FUNCTION {field.or.null}
200
FUNCTION {capitalize}
201
{ "u" change.case$ "t" change.case$ }
203
FUNCTION {space.word}
204
{ " " swap$ * " " * }
206
%% Here are the language-specific definitions for explicit words.
207
%% Each function has a name bbl.xxx where xxx is the English word.
208
%% The language selected here is ENGLISH
215
FUNCTION {bbl.editors}
218
FUNCTION {bbl.editor}
224
FUNCTION {bbl.edition}
227
FUNCTION {bbl.volume}
233
FUNCTION {bbl.number}
248
FUNCTION {bbl.chapter}
251
FUNCTION {bbl.techrep}
254
FUNCTION {bbl.mthesis}
255
{ "Master's thesis" }
257
FUNCTION {bbl.phdthesis}
263
FUNCTION {bbl.second}
269
FUNCTION {bbl.fourth}
312
{ duplicate$ "1" swap$ *
313
#-2 #1 substring$ "1" =
315
{ duplicate$ #-1 #1 substring$
332
MACRO {acmcs} {"ACM Comput. Surv."}
334
MACRO {acta} {"Acta Inf."}
336
MACRO {cacm} {"Commun. ACM"}
338
MACRO {ibmjrd} {"IBM J. Res. Dev."}
340
MACRO {ibmsj} {"IBM Syst.~J."}
342
MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
344
MACRO {ieeetc} {"IEEE Trans. Comput."}
347
{"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
349
MACRO {ipl} {"Inf. Process. Lett."}
351
MACRO {jacm} {"J.~ACM"}
353
MACRO {jcss} {"J.~Comput. Syst. Sci."}
355
MACRO {scp} {"Sci. Comput. Programming"}
357
MACRO {sicomp} {"SIAM J. Comput."}
359
MACRO {tocs} {"ACM Trans. Comput. Syst."}
361
MACRO {tods} {"ACM Trans. Database Syst."}
363
MACRO {tog} {"ACM Trans. Gr."}
365
MACRO {toms} {"ACM Trans. Math. Softw."}
367
MACRO {toois} {"ACM Trans. Office Inf. Syst."}
369
MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
371
MACRO {tcs} {"Theoretical Comput. Sci."}
376
{ "\newline\urlprefix\url{" url * "}" * write$ newline$ }
380
INTEGERS { nameptr namesleft numnames }
382
FUNCTION {format.names}
385
s num.names$ 'numnames :=
386
numnames 'namesleft :=
389
"{vv~}{ll}{, jj}{, f.}" format.name$
397
s nameptr "{ll}" format.name$ duplicate$ "others" =
412
nameptr #1 + 'nameptr :=
413
namesleft #1 - 'namesleft :=
417
FUNCTION {format.names.ed}
419
FUNCTION {format.key}
421
{ key field.or.null }
426
FUNCTION {format.authors}
429
{ author format.names }
433
FUNCTION {format.editors}
436
{ editor format.names
437
editor num.names$ #1 >
438
{ " (" * bbl.editors * ")" * }
439
{ " (" * bbl.editor * ")" * }
445
FUNCTION {format.in.editors}
448
{ editor format.names.ed
449
editor num.names$ #1 >
450
{ " (" * bbl.editors * ")" * }
451
{ " (" * bbl.editor * ")" * }
457
FUNCTION {format.note}
461
{ note #1 #1 substring$
464
{ output.state mid.sentence =
471
note #2 global.max$ substring$ *
476
FUNCTION {format.title}
479
{ title "t" change.case$
484
FUNCTION {format.full.names}
487
s num.names$ 'numnames :=
488
numnames 'namesleft :=
491
"{vv~}{ll}" format.name$
502
s nameptr "{ll}" format.name$ duplicate$ "others" =
519
nameptr #1 + 'nameptr :=
520
namesleft #1 - 'namesleft :=
525
FUNCTION {author.editor.key.full}
529
{ cite$ #1 #3 substring$ }
533
{ editor format.full.names }
536
{ author format.full.names }
540
FUNCTION {author.key.full}
543
{ cite$ #1 #3 substring$ }
547
{ author format.full.names }
551
FUNCTION {editor.key.full}
554
{ cite$ #1 #3 substring$ }
558
{ editor format.full.names }
562
FUNCTION {make.full.names}
566
'author.editor.key.full
567
{ type$ "proceedings" =
575
FUNCTION {output.bibitem}
579
")" make.full.names duplicate$ short.list =
588
before.all 'output.state :=
596
{ t #1 #1 substring$ "-" =
597
{ t #1 #2 substring$ "--" = not
599
t #2 global.max$ substring$ 't :=
601
{ { t #1 #1 substring$ "-" = }
603
t #2 global.max$ substring$ 't :=
609
{ t #1 #1 substring$ *
610
t #2 global.max$ substring$ 't :=
622
FUNCTION {format.date}
623
{ year duplicate$ empty$
624
{ "empty year in " cite$ * "; set to ????" * warning$
635
before.all 'output.state :=
639
FUNCTION {format.btitle}
643
FUNCTION {tie.or.space.connect}
644
{ duplicate$ text.length$ #3 <
651
FUNCTION {either.or.check}
654
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
658
FUNCTION {format.bvolume}
661
{ bbl.volume volume tie.or.space.connect
664
{ bbl.of space.word * series emphasize * }
666
"volume and number" number either.or.check
671
FUNCTION {format.number.series}
674
{ series field.or.null }
675
{ output.state mid.sentence =
677
{ bbl.number capitalize }
679
number tie.or.space.connect
681
{ "there's a number but no series in " cite$ * warning$ }
682
{ bbl.in space.word * series * }
693
duplicate$ "0" chr.to.int$ < not
694
swap$ "9" chr.to.int$ > not and
697
FUNCTION {extract.num}
702
t #2 global.max$ substring$ 't :=
715
FUNCTION {convert.edition}
716
{ edition extract.num "l" change.case$ 's :=
717
s "first" = s "1" = or
719
{ s "second" = s "2" = or
721
{ s "third" = s "3" = or
723
{ s "fourth" = s "4" = or
725
{ s "fifth" = s "5" = or
727
{ s #1 #1 substring$ is.num
744
FUNCTION {format.edition}
747
{ output.state mid.sentence =
748
{ convert.edition "l" change.case$ " " * bbl.edition * }
749
{ convert.edition "t" change.case$ " " * bbl.edition * }
755
INTEGERS { multiresult }
757
FUNCTION {multi.page.check}
766
swap$ duplicate$ "," =
769
{ #1 'multiresult := }
770
{ t #2 global.max$ substring$ 't := }
777
FUNCTION {format.pages}
780
{ pages multi.page.check
781
{ bbl.pages pages n.dashify tie.or.space.connect }
782
{ bbl.page pages tie.or.space.connect }
788
FUNCTION {format.journal.pages}
792
{ pop$ format.pages }
803
%% Only used in articles
804
FUNCTION {format.vol.num.pages}
807
%% Add the leading space only if there is a volume
808
%% volume field.or.null
817
"~(" number * ")" * *
819
{ "there's a number but no volume in " cite$ * warning$ }
826
FUNCTION {format.chapter.pages}
831
{ type "l" change.case$ }
833
chapter tie.or.space.connect
838
FUNCTION {format.in.ed.booktitle}
842
{ word.in booktitle * }
843
{ word.in format.in.editors * ", " *
850
FUNCTION {format.thesis.type}
854
type "t" change.case$
859
FUNCTION {format.tr.number}
866
{ number tie.or.space.connect }
870
FUNCTION {format.article.crossref}
873
" \cite{" * crossref * "}" *
876
FUNCTION {format.book.crossref}
878
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
881
{ bbl.volume capitalize
882
volume tie.or.space.connect
886
" \cite{" * crossref * "}" *
889
FUNCTION {format.incoll.inproc.crossref}
892
" \cite{" * crossref * "}" *
895
FUNCTION {format.org.or.pub}
898
address empty$ t empty$ and
918
FUNCTION {format.publisher.address}
920
{ "empty publisher in " cite$ * warning$
928
FUNCTION {format.organization.address}
929
{ organization empty$
938
format.authors "author" output.check
939
author format.key output
940
format.date "year" output.check
942
format.title "title" output.check
946
"journal" output.check
948
%% Add the space in format.vol.num.pages
950
before.all 'output.state :=
951
format.vol.num.pages output
953
{ format.article.crossref output.nonnull
966
{ format.editors "author and editor" output.check
967
editor format.key output
969
{ format.authors output.nonnull
971
{ "author and editor" editor either.or.check }
976
format.date "year" output.check
978
format.btitle "title" output.check
980
{ format.edition output
982
format.bvolume output
983
format.number.series output
985
format.publisher.address output
989
format.book.crossref output.nonnull
999
format.authors output
1000
author format.key output
1001
format.date "year" output.check
1003
format.title "title" output.check
1015
{ format.editors "author and editor" output.check
1016
editor format.key output
1018
{ format.authors output.nonnull
1020
{ "author and editor" editor either.or.check }
1025
format.date "year" output.check
1027
format.btitle "title" output.check
1030
format.edition output
1032
format.bvolume output
1033
format.number.series output
1035
format.publisher.address output
1036
format.chapter.pages "chapter and pages" output.check
1039
format.chapter.pages "chapter and pages" output.check
1041
format.book.crossref output.nonnull
1044
format.pages "pages" output.check
1050
FUNCTION {incollection}
1052
format.authors "author" output.check
1053
author format.key output
1054
format.date "year" output.check
1056
format.title "title" output.check
1059
{ format.in.ed.booktitle "booktitle" output.check
1060
format.edition output
1062
format.bvolume output
1063
format.number.series output
1065
format.publisher.address output
1066
format.chapter.pages output
1068
{ format.incoll.inproc.crossref output.nonnull
1069
format.chapter.pages output
1072
format.pages "pages" output.check
1078
FUNCTION {inproceedings}
1080
format.authors "author" output.check
1081
author format.key output
1082
format.date "year" output.check
1084
format.title "title" output.check
1087
{ format.in.ed.booktitle "booktitle" output.check
1088
format.edition output
1090
format.bvolume output
1091
format.number.series output
1094
{ format.organization.address output }
1095
{ organization output
1096
format.publisher.address output
1100
%% format.pages output
1102
{ format.incoll.inproc.crossref output.nonnull
1104
%% format.pages output
1108
format.pages "pages" output.check
1114
FUNCTION {conference} { inproceedings }
1118
format.authors output
1119
author format.key output
1120
format.date "year" output.check
1122
format.btitle "title" output.check
1126
format.edition output
1132
FUNCTION {mastersthesis}
1134
format.authors "author" output.check
1135
author format.key output
1136
format.date "year" output.check
1138
format.title "title" output.check
1140
bbl.mthesis format.thesis.type output.nonnull
1141
school "school" output.check
1150
format.authors output
1151
author format.key output
1152
format.date "year" output.check
1162
FUNCTION {phdthesis}
1164
format.authors "author" output.check
1165
author format.key output
1166
format.date "year" output.check
1168
format.title "title" output.check
1170
bbl.phdthesis format.thesis.type output.nonnull
1171
school "school" output.check
1178
FUNCTION {proceedings}
1180
format.editors output
1181
editor format.key output
1182
format.date "year" output.check
1184
format.btitle "title" output.check
1186
format.bvolume output
1187
format.number.series output
1190
{ format.organization.address output }
1191
{ organization output
1192
format.publisher.address output
1200
FUNCTION {techreport}
1202
format.authors "author" output.check
1203
author format.key output
1204
format.date "year" output.check
1206
format.title "title" output.check
1208
format.tr.number output.nonnull
1209
institution "institution" output.check
1216
FUNCTION {unpublished}
1218
format.authors "author" output.check
1219
author format.key output
1220
format.date "year" output.check
1222
format.title "title" output.check
1223
format.note "note" output.check
1228
FUNCTION {default.type} { misc }
1239
FUNCTION {chop.word}
1242
s #1 len substring$ =
1243
{ s len #1 + global.max$ substring$ }
1248
FUNCTION {format.lab.names}
1250
s #1 "{vv~}{ll}" format.name$
1251
s num.names$ duplicate$
1258
{ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1262
{ bbl.and space.word * s #2 "{vv~}{ll}" format.name$
1271
FUNCTION {author.key.label}
1274
{ cite$ #1 #3 substring$ }
1278
{ author format.lab.names }
1282
FUNCTION {author.editor.key.label}
1286
{ cite$ #1 #3 substring$ }
1290
{ editor format.lab.names }
1293
{ author format.lab.names }
1297
FUNCTION {editor.key.label}
1300
{ cite$ #1 #3 substring$ }
1304
{ editor format.lab.names }
1308
FUNCTION {calc.short.authors}
1312
'author.editor.key.label
1313
{ type$ "proceedings" =
1322
FUNCTION {calc.label}
1323
{ calc.short.authors
1327
year duplicate$ empty$
1335
FUNCTION {sort.format.names}
1339
s num.names$ 'numnames :=
1340
numnames 'namesleft :=
1343
"{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
1348
namesleft #1 = t "others" = and
1355
nameptr #1 + 'nameptr :=
1356
namesleft #1 - 'namesleft :=
1361
FUNCTION {sort.format.title}
1365
"The " #4 t chop.word
1369
#1 global.max$ substring$
1372
FUNCTION {author.sort}
1375
{ "to sort, need author or key in " cite$ * warning$
1381
{ author sort.format.names }
1385
FUNCTION {author.editor.sort}
1389
{ "to sort, need author, editor, or key in " cite$ * warning$
1395
{ editor sort.format.names }
1398
{ author sort.format.names }
1402
FUNCTION {editor.sort}
1405
{ "to sort, need editor or key in " cite$ * warning$
1411
{ editor sort.format.names }
1424
{ type$ "proceedings" =
1430
#1 entry.max$ substring$
1439
#1 entry.max$ substring$
1447
STRINGS { last.label next.extra }
1449
INTEGERS { last.extra.num number.label }
1451
FUNCTION {initialize.extra.label.stuff}
1452
{ #0 int.to.chr$ 'last.label :=
1454
#0 'last.extra.num :=
1458
FUNCTION {forward.pass}
1459
{ last.label label =
1460
{ last.extra.num #1 + 'last.extra.num :=
1461
last.extra.num int.to.chr$ 'extra.label :=
1463
{ "a" chr.to.int$ 'last.extra.num :=
1465
label 'last.label :=
1468
number.label #1 + 'number.label :=
1471
FUNCTION {reverse.pass}
1473
{ "a" 'extra.label := }
1476
extra.label 'next.extra :=
1480
{ "{\natexlab{" swap$ * "}}" * }
1483
label extra.label * 'label :=
1486
EXECUTE {initialize.extra.label.stuff}
1488
ITERATE {forward.pass}
1490
REVERSE {reverse.pass}
1492
FUNCTION {bib.sort.order}
1496
year field.or.null sortify
1503
#1 entry.max$ substring$
1507
ITERATE {bib.sort.order}
1511
FUNCTION {begin.bib}
1514
{ preamble$ write$ newline$ }
1516
"\begin{thebibliography}{" number.label int.to.str$ * "}" *
1518
"\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
1520
"\expandafter\ifx\csname url\endcsname\relax"
1522
" \def\url#1{\texttt{#1}}\fi"
1524
"\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
1530
EXECUTE {init.state.consts}
1532
ITERATE {call.type$}
1536
"\end{thebibliography}" write$ newline$
1540
%% End of customized bst file
1542
%% End of file `elsarticle-harv.bst'.