2 %% This is file `elsart-num.bst',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% merlin.mbs (with options: `,seq-no,nm-init,ed-au,dt-end,yr-par,yrp-x,jttl-rm,thtit-a,vnum-sp,volp-blk,jdt-p,pp-last,jnm-x,btit-rm,bt-rm,pub-date,pub-xpar,pre-edn,url,url-nl,edpar,blk-com,in-col,pp,ed,abr,ednx,ord,jabr,and-xcom,xand,em-x,nfss')
8 %% After docstrip generation some manual changes were made (SP)
11 % Changed the pages output for inproceedings
13 % Add the leading space in format.vol.num.pages only if there is a volume
15 %% ----------------------------------------
16 %% *** Numerical reference style for elsart ***
17 %% $Id: elsart-num.bst,v 1.1 2004/03/18 15:18:53 iowen Exp $
19 %% Copyright 1994-1999 Patrick W Daly
20 % ===============================================================
22 % This bibliographic style (bst) file has been generated from one or
23 % more master bibliographic style (mbs) files, listed above.
25 % This generated file can be redistributed and/or modified under the terms
26 % of the LaTeX Project Public License Distributed from CTAN
27 % archives in directory macros/latex/base/lppl.txt; either
28 % version 1 of the License, or any later version.
29 % ===============================================================
30 % Name and version information of the main mbs file:
31 % \ProvidesFile{merlin.mbs}[1999/03/18 3.88 (PWD)]
32 % For use with BibTeX version 0.99a or later
33 %-------------------------------------------------------------------
34 % This bibliography style file is intended for texts in ENGLISH
35 % This is a numerical citation style, and as such is standard LaTeX.
36 % It requires no extra package to interface to the main text.
37 % The form of the \bibitem entries is
39 % Usage of \cite is as follows:
41 % \cite[chap. 2]{key} ==>> [#, chap. 2]
42 % where # is a number determined by the ordering in the reference list.
43 % The order in the reference list is that by which the works were originally
44 % cited in the text, or that in the database.
45 %---------------------------------------------------------------------
75 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
77 FUNCTION {init.state.consts}
86 FUNCTION {output.nonnull}
88 output.state mid.sentence =
90 { output.state after.block =
95 { output.state before.all =
97 { add.period$ " " * write$ }
101 mid.sentence 'output.state :=
114 FUNCTION {output.check}
117 { pop$ "empty " t * " in " * cite$ * warning$ }
129 { output.state before.all =
131 { after.block 'output.state := }
135 FUNCTION {new.sentence}
136 { output.state after.block =
138 { output.state before.all =
140 { after.sentence 'output.state := }
149 { " " * before.all 'output.state :=
152 FUNCTION {date.block}
175 FUNCTION {new.block.checka}
182 FUNCTION {new.block.checkb}
191 FUNCTION {new.sentence.checka}
198 FUNCTION {new.sentence.checkb}
207 FUNCTION {field.or.null}
217 FUNCTION {capitalize}
218 { "u" change.case$ "t" change.case$ }
220 FUNCTION {space.word}
221 { " " swap$ * " " * }
223 % Here are the language-specific definitions for explicit words.
224 % Each function has a name bbl.xxx where xxx is the English word.
225 % The language selected here is ENGLISH
232 FUNCTION {bbl.editors}
235 FUNCTION {bbl.editor}
241 FUNCTION {bbl.edition}
244 FUNCTION {bbl.volume}
250 FUNCTION {bbl.number}
265 FUNCTION {bbl.chapter}
268 FUNCTION {bbl.techrep}
271 FUNCTION {bbl.mthesis}
272 { "Master's thesis" }
274 FUNCTION {bbl.phdthesis}
280 FUNCTION {bbl.second}
286 FUNCTION {bbl.fourth}
329 { duplicate$ "1" swap$ *
330 #-2 #1 substring$ "1" =
332 { duplicate$ #-1 #1 substring$
349 MACRO {acmcs} {"ACM Comput. Surv."}
351 MACRO {acta} {"Acta Inf."}
353 MACRO {cacm} {"Commun. ACM"}
355 MACRO {ibmjrd} {"IBM J. Res. Dev."}
357 MACRO {ibmsj} {"IBM Syst.~J."}
359 MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
361 MACRO {ieeetc} {"IEEE Trans. Comput."}
364 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
366 MACRO {ipl} {"Inf. Process. Lett."}
368 MACRO {jacm} {"J.~ACM"}
370 MACRO {jcss} {"J.~Comput. Syst. Sci."}
372 MACRO {scp} {"Sci. Comput. Programming"}
374 MACRO {sicomp} {"SIAM J. Comput."}
376 MACRO {tocs} {"ACM Trans. Comput. Syst."}
378 MACRO {tods} {"ACM Trans. Database Syst."}
380 MACRO {tog} {"ACM Trans. Gr."}
382 MACRO {toms} {"ACM Trans. Math. Softw."}
384 MACRO {toois} {"ACM Trans. Office Inf. Syst."}
386 MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
388 MACRO {tcs} {"Theoretical Comput. Sci."}
393 { "\newline\urlprefix\url{" url * "}" * write$ newline$ }
398 INTEGERS { nameptr namesleft numnames }
400 FUNCTION {format.names}
403 s num.names$ 'numnames :=
404 numnames 'namesleft :=
407 "{f.~}{vv~}{ll}{, jj}" format.name$
415 s nameptr "{ll}" format.name$ duplicate$ "others" =
430 nameptr #1 + 'nameptr :=
431 namesleft #1 - 'namesleft :=
435 FUNCTION {format.names.ed}
437 FUNCTION {format.authors}
440 { author format.names }
444 FUNCTION {format.editors}
447 { editor format.names
448 editor num.names$ #1 >
449 { " (" * bbl.editors * ")" * }
450 { " (" * bbl.editor * ")" * }
456 FUNCTION {format.in.editors}
459 { editor format.names.ed
460 editor num.names$ #1 >
461 { " (" * bbl.editors * ")" * }
462 { " (" * bbl.editor * ")" * }
468 FUNCTION {format.note}
472 { note #1 #1 substring$
475 { output.state mid.sentence =
482 note #2 global.max$ substring$ *
487 FUNCTION {format.title}
490 { title "t" change.case$
495 FUNCTION {output.bibitem}
502 before.all 'output.state :=
510 { t #1 #1 substring$ "-" =
511 { t #1 #2 substring$ "--" = not
513 t #2 global.max$ substring$ 't :=
515 { { t #1 #1 substring$ "-" = }
517 t #2 global.max$ substring$ 't :=
523 { t #1 #1 substring$ *
524 t #2 global.max$ substring$ 't :=
536 FUNCTION {format.date}
540 { "there's a month but no year in " cite$ * warning$
547 { month " " * year * }
554 before.all 'output.state :=
560 FUNCTION{format.year}
561 { year duplicate$ empty$
562 { "empty year in " cite$ * warning$ pop$ "" }
563 { "(" swap$ * ")" * }
567 FUNCTION {format.btitle}
571 FUNCTION {tie.or.space.connect}
572 { duplicate$ text.length$ #3 <
579 FUNCTION {either.or.check}
582 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
586 FUNCTION {format.bvolume}
589 { bbl.volume volume tie.or.space.connect
592 { bbl.of space.word * series emphasize * }
594 "volume and number" number either.or.check
599 FUNCTION {format.number.series}
602 { series field.or.null }
603 { output.state mid.sentence =
605 { bbl.number capitalize }
607 number tie.or.space.connect
609 { "there's a number but no series in " cite$ * warning$ }
610 { bbl.in space.word * series * }
621 duplicate$ "0" chr.to.int$ < not
622 swap$ "9" chr.to.int$ > not and
625 FUNCTION {extract.num}
630 t #2 global.max$ substring$ 't :=
643 FUNCTION {convert.edition}
644 { edition extract.num "l" change.case$ 's :=
645 s "first" = s "1" = or
647 { s "second" = s "2" = or
649 { s "third" = s "3" = or
651 { s "fourth" = s "4" = or
653 { s "fifth" = s "5" = or
655 { s #1 #1 substring$ is.num
672 FUNCTION {format.edition}
675 { output.state mid.sentence =
676 { convert.edition "l" change.case$ " " * bbl.edition * }
677 { convert.edition "t" change.case$ " " * bbl.edition * }
683 INTEGERS { multiresult }
685 FUNCTION {multi.page.check}
694 swap$ duplicate$ "," =
697 { #1 'multiresult := }
698 { t #2 global.max$ substring$ 't := }
705 FUNCTION {format.pages}
708 { pages multi.page.check
709 { bbl.pages pages n.dashify tie.or.space.connect }
710 { bbl.page pages tie.or.space.connect }
716 FUNCTION {format.journal.pages}
720 { pop$ format.pages }
732 % Only used in articles
733 FUNCTION {format.vol.num.pages}
736 % Add the leading space only if there is a volume
737 % volume field.or.null
746 "~(" number * ")" * *
748 { "there's a number but no volume in " cite$ * warning$ }
755 FUNCTION {format.chapter.pages}
760 { type "l" change.case$ }
762 chapter tie.or.space.connect
767 FUNCTION {format.in.ed.booktitle}
771 { word.in booktitle * }
772 { word.in format.in.editors * ", " *
779 FUNCTION {empty.misc.check}
780 { author empty$ title empty$ howpublished empty$
781 month empty$ year empty$ note empty$
783 { "all relevant fields are empty in " cite$ * warning$ }
788 FUNCTION {format.thesis.type}
792 type "t" change.case$
797 FUNCTION {format.tr.number}
804 { number tie.or.space.connect }
808 FUNCTION {format.article.crossref}
812 { "need key or journal for " cite$ * " to crossref " * crossref *
816 { word.in journal emphasize * }
819 { word.in key * " " *}
821 " \cite{" * crossref * "}" *
824 FUNCTION {format.crossref.editor}
825 { editor #1 "{vv~}{ll}" format.name$
826 editor num.names$ duplicate$
833 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
837 { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$
846 FUNCTION {format.book.crossref}
848 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
851 { bbl.volume volume tie.or.space.connect
856 editor field.or.null author field.or.null =
860 { "need editor, key, or series for " cite$ * " to crossref " *
864 { series emphasize * }
870 { format.crossref.editor * }
872 " \cite{" * crossref * "}" *
875 FUNCTION {format.incoll.inproc.crossref}
878 editor field.or.null author field.or.null =
882 { "need editor, key, or booktitle for " cite$ * " to crossref " *
886 { word.in booktitle * }
889 { word.in key * " " *}
892 { word.in format.crossref.editor * " " *}
894 " \cite{" * crossref * "}" *
897 FUNCTION {format.org.or.pub}
901 { "empty year in " cite$ * warning$ }
904 address empty$ t empty$ and
923 { t empty$ address empty$ and
934 FUNCTION {format.publisher.address}
936 { "empty publisher in " cite$ * warning$
944 FUNCTION {format.organization.address}
945 { organization empty$
954 format.authors "author" output.check
955 format.title "title" output.check
958 "journal" output.check
960 % Add the space in format.vol.num.pages
962 before.all 'output.state :=
963 format.vol.num.pages output
965 { format.article.crossref output.nonnull
978 { format.editors "author and editor" output.check
980 { format.authors output.nonnull
982 { "author and editor" editor either.or.check }
987 format.btitle "title" output.check
989 { format.edition output
990 format.bvolume output
991 format.number.series output
992 format.publisher.address output
995 format.book.crossref output.nonnull
1005 format.authors output
1006 format.title "title" output.check
1018 { format.editors "author and editor" output.check
1020 { format.authors output.nonnull
1022 { "author and editor" editor either.or.check }
1027 format.btitle "title" output.check
1030 format.edition output
1031 format.bvolume output
1032 format.number.series output
1033 format.publisher.address output
1034 format.chapter.pages "chapter and pages" output.check
1037 format.chapter.pages "chapter and pages" output.check
1038 format.book.crossref output.nonnull
1041 format.pages "pages" output.check
1047 FUNCTION {incollection}
1049 format.authors "author" output.check
1050 format.title "title" output.check
1052 { format.in.ed.booktitle "booktitle" output.check
1053 format.edition output
1054 format.bvolume output
1055 format.number.series output
1056 format.publisher.address output
1057 format.chapter.pages output
1059 { format.incoll.inproc.crossref output.nonnull
1060 format.chapter.pages output
1063 format.pages "pages" output.check
1069 FUNCTION {inproceedings}
1071 format.authors "author" output.check
1072 format.title "title" output.check
1074 { format.in.ed.booktitle "booktitle" output.check
1075 format.edition output
1076 format.bvolume output
1077 format.number.series output
1079 { format.organization.address output }
1080 { organization output
1081 format.publisher.address output
1085 % format.pages output
1087 { format.incoll.inproc.crossref output.nonnull
1089 % format.pages output
1093 format.pages "pages" output.check
1099 FUNCTION {conference} { inproceedings }
1104 { organization empty$
1106 { organization output.nonnull
1111 { format.authors output.nonnull }
1113 format.btitle "title" output.check
1115 { organization empty$
1127 format.edition output
1134 FUNCTION {mastersthesis}
1136 format.authors "author" output.check
1137 format.title "title" output.check
1138 bbl.mthesis format.thesis.type output.nonnull
1139 school "school" output.check
1142 format.date "year" output.check
1149 format.authors output
1159 FUNCTION {phdthesis}
1161 format.authors "author" output.check
1162 format.title "title" output.check
1163 bbl.phdthesis format.thesis.type output.nonnull
1164 school "school" output.check
1167 format.date "year" output.check
1172 FUNCTION {proceedings}
1175 { organization output }
1176 { format.editors output.nonnull }
1178 format.btitle "title" output.check
1179 format.bvolume output
1180 format.number.series output
1185 format.publisher.address output
1191 format.organization.address output }
1194 format.publisher.address output
1200 % format.date "year" output.check
1205 FUNCTION {techreport}
1207 format.authors "author" output.check
1208 format.title "title" output.check
1209 format.tr.number output.nonnull
1210 institution "institution" output.check
1213 format.date "year" output.check
1218 FUNCTION {unpublished}
1220 format.authors "author" output.check
1221 format.title "title" output.check
1222 format.note "note" output.check
1228 FUNCTION {default.type} { misc }
1232 STRINGS { longest.label }
1234 INTEGERS { number.label longest.label.width }
1236 FUNCTION {initialize.longest.label}
1237 { "" 'longest.label :=
1239 #0 'longest.label.width :=
1242 FUNCTION {longest.label.pass}
1243 { number.label int.to.str$ 'label :=
1244 number.label #1 + 'number.label :=
1245 label width$ longest.label.width >
1246 { label 'longest.label :=
1247 label width$ 'longest.label.width :=
1253 EXECUTE {initialize.longest.label}
1255 ITERATE {longest.label.pass}
1257 FUNCTION {begin.bib}
1260 { preamble$ write$ newline$ }
1262 "\begin{thebibliography}{" longest.label * "}" *
1264 "\expandafter\ifx\csname url\endcsname\relax"
1266 " \def\url#1{\texttt{#1}}\fi"
1268 "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
1274 EXECUTE {init.state.consts}
1276 ITERATE {call.type$}
1280 "\end{thebibliography}" write$ newline$
1284 %% End of customized bst file
1286 %% End of file `elsart-num.bst'.