Debian Codegraph @

texmf-dist/bibtex/bst/base/siam.bst

raw
1 % Copyright (C) 1986, 1987, 1988, 2010 Howard Trickey and Oren Patashnik.
2 % Unlimited copying and redistribution of this file are permitted as long as
3 % it is unmodified. Modifications (and redistribution of modified versions)
4 % are also permitted, but only if the resulting file is renamed.
5 %
6 % SIAM bibliography style (8-Dec-10 version)
7 % numeric labels, alphabetic order, Mathematical Reviews abbreviations,
8 % names in \sc, titles in italics, book titles mixed upper-lower and article
9 % titles lowercase, commas separate all fields except before "notes".
10 %
11 % History
12 % 1/30/86 (HWT) Original version, by Howard Trickey.
13 % 6/15/87 (HWT) Fix format.editors---Martin Costabel.
14 % 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
15 % THIS `siam' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
16 % 12/ 8/10 (OP&HWT) Clarify license.
17
18 ENTRY
19 { address
20 author
21 booktitle
22 chapter
23 edition
24 editor
25 howpublished
26 institution
27 journal
28 key
29 month
30 note
31 number
32 organization
33 pages
34 publisher
35 school
36 series
37 title
38 type
39 volume
40 year
41 }
42 {}
43 { label }
44
45 INTEGERS { output.state before.all mid.sentence after.block }
46
47 FUNCTION {init.state.consts}
48 { #0 'before.all :=
49 #1 'mid.sentence :=
50 #2 'after.block :=
51 }
52
53 STRINGS { s t }
54
55 FUNCTION {output.nonnull}
56 { 's :=
57 output.state mid.sentence =
58 { ", " * write$ }
59 { output.state after.block =
60 { add.period$ write$
61 newline$
62 "\newblock " write$
63 }
64 'write$
65 if$
66 mid.sentence 'output.state :=
67 }
68 if$
69 s
70 }
71
72 FUNCTION {output}
73 { duplicate$ empty$
74 'pop$
75 'output.nonnull
76 if$
77 }
78
79 FUNCTION {output.check}
80 { 't :=
81 duplicate$ empty$
82 { pop$ "empty " t * " in " * cite$ * warning$ }
83 'output.nonnull
84 if$
85 }
86
87 FUNCTION {output.bibitem}
88 { newline$
89 "\bibitem{" write$
90 cite$ write$
91 "}" write$
92 newline$
93 ""
94 before.all 'output.state :=
95 }
96
97 FUNCTION {fin.entry}
98 { add.period$
99 write$
100 newline$
101 }
102
103 FUNCTION {new.block}
104 { output.state before.all =
105 'skip$
106 { after.block 'output.state := }
107 if$
108 }
109
110 FUNCTION {not}
111 { { #0 }
112 { #1 }
113 if$
114 }
115
116 FUNCTION {and}
117 { 'skip$
118 { pop$ #0 }
119 if$
120 }
121
122 FUNCTION {or}
123 { { pop$ #1 }
124 'skip$
125 if$
126 }
127
128 FUNCTION {new.block.checka}
129 { empty$
130 'skip$
131 'new.block
132 if$
133 }
134
135 FUNCTION {field.or.null}
136 { duplicate$ empty$
137 { pop$ "" }
138 'skip$
139 if$
140 }
141
142 FUNCTION {emphasize}
143 { duplicate$ empty$
144 { pop$ "" }
145 { "{\em " swap$ * "}" * }
146 if$
147 }
148
149 FUNCTION {scapify}
150 { duplicate$ empty$
151 { pop$ "" }
152 { "{\sc " swap$ * "}" * }
153 if$
154 }
155
156 INTEGERS { nameptr namesleft numnames }
157
158 FUNCTION {format.names}
159 { 's :=
160 #1 'nameptr :=
161 s num.names$ 'numnames :=
162 numnames 'namesleft :=
163 { namesleft #0 > }
164 { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
165 nameptr #1 >
166 { namesleft #1 >
167 { ", " * t * }
168 { numnames #2 >
169 { "," * }
170 'skip$
171 if$
172 t "others" =
173 { " et~al." * }
174 { " and " * t * }
175 if$
176 }
177 if$
178 }
179 't
180 if$
181 nameptr #1 + 'nameptr :=
182 namesleft #1 - 'namesleft :=
183 }
184 while$
185 }
186
187 STRINGS { last.authors }
188
189 FUNCTION {init.last.authors}
190 { "" 'last.authors :=
191 }
192
193 FUNCTION {format.authors}
194 { author empty$
195 { "" 'last.authors :=
196 ""
197 }
198 { author last.authors =
199 { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
200 { author format.names scapify }
201 if$
202 author 'last.authors :=
203 }
204 if$
205 }
206
207 FUNCTION {format.organization}
208 { organization empty$
209 { "" 'last.authors :=
210 ""
211 }
212 { organization last.authors =
213 { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
214 { organization scapify }
215 if$
216 organization 'last.authors :=
217 }
218 if$
219 }
220
221 FUNCTION {format.editors}
222 { editor empty$
223 { "" 'last.authors :=
224 ""
225 }
226 { editor last.authors =
227 { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
228 { editor format.names scapify }
229 if$
230 editor num.names$ #1 >
231 { ", eds." * }
232 { ", ed." * }
233 if$
234 editor 'last.authors :=
235 }
236 if$
237 }
238
239 FUNCTION {format.ineditors}
240 { editor empty$
241 { "" }
242 { editor format.names
243 editor num.names$ #1 >
244 { ", eds." * }
245 { ", ed." * }
246 if$
247 }
248 if$
249 }
250
251 FUNCTION {format.title}
252 { title empty$
253 { "" }
254 { title "t" change.case$ emphasize }
255 if$
256 }
257
258 FUNCTION {n.dashify}
259 { 't :=
260 ""
261 { t empty$ not }
262 { t #1 #1 substring$ "-" =
263 { t #1 #2 substring$ "--" = not
264 { "--" *
265 t #2 global.max$ substring$ 't :=
266 }
267 { { t #1 #1 substring$ "-" = }
268 { "-" *
269 t #2 global.max$ substring$ 't :=
270 }
271 while$
272 }
273 if$
274 }
275 { t #1 #1 substring$ *
276 t #2 global.max$ substring$ 't :=
277 }
278 if$
279 }
280 while$
281 }
282
283 FUNCTION {format.date}
284 { year empty$
285 { month empty$
286 { "" }
287 { "there's a month but no year in " cite$ * warning$
288 month
289 }
290 if$
291 }
292 { month empty$
293 'year
294 { month " " * year * }
295 if$
296 }
297 if$
298 }
299
300 FUNCTION {format.btitle}
301 { title emphasize
302 }
303
304 FUNCTION {tie.or.space.connect}
305 { duplicate$ text.length$ #3 <
306 { "~" }
307 { " " }
308 if$
309 swap$ * *
310 }
311
312 FUNCTION {either.or.check}
313 { empty$
314 'pop$
315 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
316 if$
317 }
318
319 FUNCTION {format.bvolume}
320 { volume empty$
321 { "" }
322 { "vol.~" volume *
323 series empty$
324 'skip$
325 { " of " * series * }
326 if$
327 "volume and number" number either.or.check
328 }
329 if$
330 }
331
332 FUNCTION {format.number.series}
333 { volume empty$
334 { number empty$
335 { series field.or.null }
336 { "no.~" number *
337 series empty$
338 { "there's a number but no series in " cite$ * warning$ }
339 { " in " * series * }
340 if$
341 }
342 if$
343 }
344 { "" }
345 if$
346 }
347
348 FUNCTION {format.edition}
349 { edition empty$
350 { "" }
351 { edition "l" change.case$ "~ed." * }
352 if$
353 }
354
355 INTEGERS { multiresult }
356
357 FUNCTION {multi.page.check}
358 { 't :=
359 #0 'multiresult :=
360 { multiresult not
361 t empty$ not
362 and
363 }
364 { t #1 #1 substring$
365 duplicate$ "-" =
366 swap$ duplicate$ "," =
367 swap$ "+" =
368 or or
369 { #1 'multiresult := }
370 { t #2 global.max$ substring$ 't := }
371 if$
372 }
373 while$
374 multiresult
375 }
376
377 FUNCTION {format.pages}
378 { pages empty$
379 { "" }
380 { pages multi.page.check
381 { "pp.~" pages n.dashify * }
382 { "p.~" pages * }
383 if$
384 }
385 if$
386 }
387
388 FUNCTION {format.vol.year}
389 { volume field.or.null
390 year empty$
391 { "empty year in " cite$ * warning$ }
392 { " (" year * ")" * * }
393 if$
394 }
395
396 FUNCTION {format.chapter.pages}
397 { chapter empty$
398 'format.pages
399 { type empty$
400 { "ch.~" chapter * }
401 { type "l" change.case$ chapter tie.or.space.connect }
402 if$
403 pages empty$
404 'skip$
405 { ", " * format.pages * }
406 if$
407 }
408 if$
409 }
410
411 FUNCTION {format.in.ed.booktitle}
412 { booktitle empty$
413 { "" }
414 { editor empty$
415 { "in " booktitle * }
416 { "in " booktitle * ", " * format.ineditors * }
417 if$
418 }
419 if$
420 }
421
422 FUNCTION {empty.misc.check}
423 { author empty$ title empty$ howpublished empty$
424 month empty$ year empty$ note empty$
425 and and and and and
426 key empty$ not and
427 { "all relevant fields are empty in " cite$ * warning$ }
428 'skip$
429 if$
430 }
431
432 FUNCTION {format.thesis.type}
433 { type empty$
434 'skip$
435 { pop$
436 type "l" change.case$
437 }
438 if$
439 }
440
441 FUNCTION {format.tr.number}
442 { type empty$
443 { "Tech. Rep." }
444 'type
445 if$
446 number empty$
447 { "l" change.case$ }
448 { number tie.or.space.connect }
449 if$
450 }
451
452 FUNCTION {format.article.crossref}
453 { key empty$
454 { journal empty$
455 { "need key or journal for " cite$ * " to crossref " * crossref *
456 warning$
457 ""
458 }
459 { "in " journal * }
460 if$
461 }
462 { "in " key * }
463 if$
464 " \cite{" * crossref * "}" *
465 }
466
467 FUNCTION {format.crossref.editor}
468 { editor #1 "{vv~}{ll}" format.name$
469 editor num.names$ duplicate$
470 #2 >
471 { pop$ " et~al." * }
472 { #2 <
473 'skip$
474 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
475 { " et~al." * }
476 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
477 if$
478 }
479 if$
480 }
481 if$
482 }
483
484 FUNCTION {format.book.crossref}
485 { volume empty$
486 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
487 "in "
488 }
489 { "vol.~" volume *
490 " of " *
491 }
492 if$
493 editor empty$
494 editor field.or.null author field.or.null =
495 or
496 { key empty$
497 { series empty$
498 { "need editor, key, or series for " cite$ * " to crossref " *
499 crossref * warning$
500 "" *
501 }
502 { series * }
503 if$
504 }
505 { key * }
506 if$
507 }
508 { format.crossref.editor * }
509 if$
510 " \cite{" * crossref * "}" *
511 }
512
513 FUNCTION {format.incoll.inproc.crossref}
514 { editor empty$
515 editor field.or.null author field.or.null =
516 or
517 { key empty$
518 { booktitle empty$
519 { "need editor, key, or booktitle for " cite$ * " to crossref " *
520 crossref * warning$
521 ""
522 }
523 { "in " booktitle * }
524 if$
525 }
526 { "in " key * }
527 if$
528 }
529 { "in " format.crossref.editor * }
530 if$
531 " \cite{" * crossref * "}" *
532 }
533
534 FUNCTION {article}
535 { output.bibitem
536 format.authors "author" output.check
537 format.title "title" output.check
538 crossref missing$
539 { journal "journal" output.check
540 format.vol.year output
541 }
542 { format.article.crossref output.nonnull }
543 if$
544 format.pages output
545 new.block
546 note output
547 fin.entry
548 }
549
550 FUNCTION {book}
551 { output.bibitem
552 author empty$
553 { format.editors "author and editor" output.check }
554 { format.authors output.nonnull
555 crossref missing$
556 { "author and editor" editor either.or.check }
557 'skip$
558 if$
559 }
560 if$
561 format.btitle "title" output.check
562 crossref missing$
563 { format.bvolume output
564 format.number.series output
565 publisher "publisher" output.check
566 address output
567 }
568 { format.book.crossref output.nonnull }
569 if$
570 format.edition output
571 format.date "year" output.check
572 new.block
573 note output
574 fin.entry
575 }
576
577 FUNCTION {booklet}
578 { output.bibitem
579 format.authors output
580 format.title "title" output.check
581 howpublished new.block.checka
582 howpublished output
583 address output
584 format.date output
585 new.block
586 note output
587 fin.entry
588 }
589
590 FUNCTION {inbook}
591 { output.bibitem
592 author empty$
593 { format.editors "author and editor" output.check }
594 { format.authors output.nonnull
595 crossref missing$
596 { "author and editor" editor either.or.check }
597 'skip$
598 if$
599 }
600 if$
601 format.btitle "title" output.check
602 crossref missing$
603 { format.bvolume output
604 format.number.series output
605 publisher "publisher" output.check
606 address output
607 }
608 { format.book.crossref output.nonnull }
609 if$
610 format.edition output
611 format.date "year" output.check
612 format.chapter.pages "chapter and pages" output.check
613 new.block
614 note output
615 fin.entry
616 }
617
618 FUNCTION {incollection}
619 { output.bibitem
620 format.authors "author" output.check
621 format.title "title" output.check
622 crossref missing$
623 { format.in.ed.booktitle "booktitle" output.check
624 format.bvolume output
625 format.number.series output
626 publisher "publisher" output.check
627 address output
628 format.edition output
629 format.date "year" output.check
630 }
631 { format.incoll.inproc.crossref output.nonnull }
632 if$
633 format.chapter.pages output
634 new.block
635 note output
636 fin.entry
637 }
638
639 FUNCTION {inproceedings}
640 { output.bibitem
641 format.authors "author" output.check
642 format.title "title" output.check
643 crossref missing$
644 { format.in.ed.booktitle "booktitle" output.check
645 format.bvolume output
646 format.number.series output
647 address empty$
648 { organization output
649 publisher output
650 format.date "year" output.check
651 }
652 { address output.nonnull
653 format.date "year" output.check
654 organization output
655 publisher output
656 }
657 if$
658 }
659 { format.incoll.inproc.crossref output.nonnull }
660 if$
661 format.pages output
662 new.block
663 note output
664 fin.entry
665 }
666
667 FUNCTION {conference} { inproceedings }
668
669 FUNCTION {manual}
670 { output.bibitem
671 author empty$
672 { format.organization output }
673 { format.authors output.nonnull }
674 if$
675 format.btitle "title" output.check
676 author empty$
677 'skip$
678 { organization output }
679 if$
680 address output
681 format.edition output
682 format.date output
683 new.block
684 note output
685 fin.entry
686 }
687
688 FUNCTION {mastersthesis}
689 { output.bibitem
690 format.authors "author" output.check
691 format.title "title" output.check
692 "Master's thesis" format.thesis.type output.nonnull
693 school "school" output.check
694 address output
695 format.date "year" output.check
696 new.block
697 note output
698 fin.entry
699 }
700
701 FUNCTION {misc}
702 { output.bibitem
703 format.authors output
704 format.title output
705 howpublished new.block.checka
706 howpublished output
707 format.date output
708 new.block
709 note output
710 fin.entry
711 empty.misc.check
712 }
713
714 FUNCTION {phdthesis}
715 { output.bibitem
716 format.authors "author" output.check
717 format.btitle "title" output.check
718 "PhD thesis" format.thesis.type output.nonnull
719 school "school" output.check
720 address output
721 format.date "year" output.check
722 new.block
723 note output
724 fin.entry
725 }
726
727 FUNCTION {proceedings}
728 { output.bibitem
729 editor empty$
730 { format.organization output }
731 { format.editors output.nonnull }
732 if$
733 format.btitle "title" output.check
734 format.bvolume output
735 format.number.series output
736 address empty$
737 { editor empty$
738 'skip$
739 { organization output }
740 if$
741 publisher output
742 format.date "year" output.check
743 }
744 { address output.nonnull
745 format.date "year" output.check
746 editor empty$
747 'skip$
748 { organization output }
749 if$
750 publisher output
751 }
752 if$
753 new.block
754 note output
755 fin.entry
756 }
757
758 FUNCTION {techreport}
759 { output.bibitem
760 format.authors "author" output.check
761 format.title "title" output.check
762 format.tr.number output.nonnull
763 institution "institution" output.check
764 address output
765 format.date "year" output.check
766 new.block
767 note output
768 fin.entry
769 }
770
771 FUNCTION {unpublished}
772 { output.bibitem
773 format.authors "author" output.check
774 format.title "title" output.check
775 new.block
776 note "note" output.check
777 format.date output
778 fin.entry
779 }
780
781 FUNCTION {default.type} { misc }
782
783 MACRO {jan} {"Jan."}
784
785 MACRO {feb} {"Feb."}
786
787 MACRO {mar} {"Mar."}
788
789 MACRO {apr} {"Apr."}
790
791 MACRO {may} {"May"}
792
793 MACRO {jun} {"June"}
794
795 MACRO {jul} {"July"}
796
797 MACRO {aug} {"Aug."}
798
799 MACRO {sep} {"Sept."}
800
801 MACRO {oct} {"Oct."}
802
803 MACRO {nov} {"Nov."}
804
805 MACRO {dec} {"Dec."}
806
807 MACRO {acmcs} {"ACM Comput. Surveys"}
808
809 MACRO {acta} {"Acta Inf."}
810
811 MACRO {cacm} {"Comm. ACM"}
812
813 MACRO {ibmjrd} {"IBM J. Res. Dev."}
814
815 MACRO {ibmsj} {"IBM Syst.~J."}
816
817 MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
818
819 MACRO {ieeetc} {"IEEE Trans. Comput."}
820
821 MACRO {ieeetcad}
822 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
823
824 MACRO {ipl} {"Inf. Process. Lett."}
825
826 MACRO {jacm} {"J.~Assoc. Comput. Mach."}
827
828 MACRO {jcss} {"J.~Comput. System Sci."}
829
830 MACRO {scp} {"Sci. Comput. Programming"}
831
832 MACRO {sicomp} {"SIAM J. Comput."}
833
834 MACRO {tocs} {"ACM Trans. Comput. Syst."}
835
836 MACRO {tods} {"ACM Trans. Database Syst."}
837
838 MACRO {tog} {"ACM Trans. Gr."}
839
840 MACRO {toms} {"ACM Trans. Math. Softw."}
841
842 MACRO {toois} {"ACM Trans. Office Inf. Syst."}
843
844 MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
845
846 MACRO {tcs} {"Theoretical Comput. Sci."}
847
848 READ
849
850 FUNCTION {sortify}
851 { purify$
852 "l" change.case$
853 }
854
855 INTEGERS { len }
856
857 FUNCTION {chop.word}
858 { 's :=
859 'len :=
860 s #1 len substring$ =
861 { s len #1 + global.max$ substring$ }
862 's
863 if$
864 }
865
866 FUNCTION {sort.format.names}
867 { 's :=
868 #1 'nameptr :=
869 ""
870 s num.names$ 'numnames :=
871 numnames 'namesleft :=
872 { namesleft #0 > }
873 { nameptr #1 >
874 { " " * }
875 'skip$
876 if$
877 s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
878 nameptr numnames = t "others" = and
879 { "et al" * }
880 { t sortify * }
881 if$
882 nameptr #1 + 'nameptr :=
883 namesleft #1 - 'namesleft :=
884 }
885 while$
886 }
887
888 FUNCTION {sort.format.title}
889 { 't :=
890 "A " #2
891 "An " #3
892 "The " #4 t chop.word
893 chop.word
894 chop.word
895 sortify
896 #1 global.max$ substring$
897 }
898
899 FUNCTION {author.sort}
900 { author empty$
901 { key empty$
902 { "to sort, need author or key in " cite$ * warning$
903 ""
904 }
905 { key sortify }
906 if$
907 }
908 { author sort.format.names }
909 if$
910 }
911
912 FUNCTION {author.editor.sort}
913 { author empty$
914 { editor empty$
915 { key empty$
916 { "to sort, need author, editor, or key in " cite$ * warning$
917 ""
918 }
919 { key sortify }
920 if$
921 }
922 { editor sort.format.names }
923 if$
924 }
925 { author sort.format.names }
926 if$
927 }
928
929 FUNCTION {author.organization.sort}
930 { author empty$
931 { organization empty$
932 { key empty$
933 { "to sort, need author, organization, or key in " cite$ * warning$
934 ""
935 }
936 { key sortify }
937 if$
938 }
939 { "The " #4 organization chop.word sortify }
940 if$
941 }
942 { author sort.format.names }
943 if$
944 }
945
946 FUNCTION {editor.organization.sort}
947 { editor empty$
948 { organization empty$
949 { key empty$
950 { "to sort, need editor, organization, or key in " cite$ * warning$
951 ""
952 }
953 { key sortify }
954 if$
955 }
956 { "The " #4 organization chop.word sortify }
957 if$
958 }
959 { editor sort.format.names }
960 if$
961 }
962
963 FUNCTION {presort}
964 { type$ "book" =
965 type$ "inbook" =
966 or
967 'author.editor.sort
968 { type$ "proceedings" =
969 'editor.organization.sort
970 { type$ "manual" =
971 'author.organization.sort
972 'author.sort
973 if$
974 }
975 if$
976 }
977 if$
978 " "
979 *
980 year field.or.null sortify
981 *
982 " "
983 *
984 title field.or.null
985 sort.format.title
986 *
987 #1 entry.max$ substring$
988 'sort.key$ :=
989 }
990
991 ITERATE {presort}
992
993 SORT
994
995 STRINGS { longest.label }
996
997 INTEGERS { number.label longest.label.width }
998
999 FUNCTION {initialize.longest.label}
1000 { "" 'longest.label :=
1001 #1 'number.label :=
1002 #0 'longest.label.width :=
1003 }
1004
1005 FUNCTION {longest.label.pass}
1006 { number.label int.to.str$ 'label :=
1007 number.label #1 + 'number.label :=
1008 label width$ longest.label.width >
1009 { label 'longest.label :=
1010 label width$ 'longest.label.width :=
1011 }
1012 'skip$
1013 if$
1014 }
1015
1016 EXECUTE {initialize.longest.label}
1017
1018 ITERATE {longest.label.pass}
1019
1020 FUNCTION {begin.bib}
1021 { preamble$ empty$
1022 'skip$
1023 { preamble$ write$ newline$ }
1024 if$
1025 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1026 }
1027
1028 EXECUTE {begin.bib}
1029
1030 EXECUTE {init.state.consts}
1031
1032 EXECUTE {init.last.authors}
1033
1034 ITERATE {call.type$}
1035
1036 FUNCTION {end.bib}
1037 { newline$
1038 "\end{thebibliography}" write$ newline$
1039 }
1040
1041 EXECUTE {end.bib}