Debian Codegraph @

texmf-dist/bibtex/bst/savetrees/savetrees.bst

raw
1 %%
2 %% This is file `savetrees.bst',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% savetrees.dtx (with options: `bstfile')
8 %%
9 %% The original, *original* source files were:
10 %%
11 %% merlin.mbs (with options: `,lang,nm-init,ed-au,nmdash,nmlm,x2,m2,isbn,issn,pp,ed,abr,ednx,xedn,jabr,nfss')
12 %%
13 %% In addition, Scott Pakin <[email protected]> slightly modified this
14 %% file by hand.
15 %% ----------------------------------------
16 %% *** Extremely abbreviated BibTeX style ***
17 %%
18 %% Copyright 1994-1999 Patrick W Daly
19 % ===============================================================
20 % IMPORTANT NOTICE:
21 % This bibliographic style (bst) file has been generated from one or
22 % more master bibliographic style (mbs) files, listed above.
23 %
24 % This generated file can be redistributed and/or modified under the terms
25 % of the LaTeX Project Public License Distributed from CTAN
26 % archives in directory macros/latex/base/lppl.txt; either
27 % version 1 of the License, or any later version.
28 % ===============================================================
29 % Name and version information of the main mbs file:
30 % \ProvidesFile{merlin.mbs}[1999/05/28 3.89 (PWD)]
31 % For use with BibTeX version 0.99a or later
32 %-------------------------------------------------------------------
33 % This bibliography style file is intended for texts in ENGLISH
34 % This is a numerical citation style, and as such is standard LaTeX.
35 % It requires no extra package to interface to the main text.
36 % The form of the \bibitem entries is
37 % \bibitem{key}...
38 % Usage of \cite is as follows:
39 % \cite{key} ==>> [#]
40 % \cite[chap. 2]{key} ==>> [#, chap. 2]
41 % where # is a number determined by the ordering in the reference list.
42 % The order in the reference list is alphabetical by authors.
43 %---------------------------------------------------------------------
44
45 ENTRY
46 { address
47 author
48 booktitle
49 chapter
50 edition
51 editor
52 howpublished
53 institution
54 isbn
55 issn
56 journal
57 key
58 language
59 month
60 note
61 number
62 organization
63 pages
64 publisher
65 school
66 series
67 title
68 type
69 volume
70 year
71 }
72 {}
73 { label }
74
75 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
76
77 FUNCTION {init.state.consts}
78 { #0 'before.all :=
79 #1 'mid.sentence :=
80 #2 'after.sentence :=
81 #3 'after.block :=
82 }
83
84 STRINGS { s t }
85
86 FUNCTION {output.nonnull}
87 { 's :=
88 output.state mid.sentence =
89 { ", " * write$ }
90 { output.state after.block =
91 { add.period$ write$
92 newline$
93 "\newblock " write$
94 }
95 { output.state before.all =
96 'write$
97 { add.period$ " " * write$ }
98 if$
99 }
100 if$
101 mid.sentence 'output.state :=
102 }
103 if$
104 s
105 }
106
107 FUNCTION {output}
108 { duplicate$ empty$
109 'pop$
110 'output.nonnull
111 if$
112 }
113
114 FUNCTION {output.check}
115 { 't :=
116 duplicate$ empty$
117 { pop$ "empty " t * " in " * cite$ * warning$ }
118 'output.nonnull
119 if$
120 }
121
122 FUNCTION {fin.entry}
123 { add.period$
124 write$
125 newline$
126 }
127
128 FUNCTION {new.block}
129 { output.state before.all =
130 'skip$
131 { after.block 'output.state := }
132 if$
133 }
134
135 FUNCTION {new.sentence}
136 { output.state after.block =
137 'skip$
138 { output.state before.all =
139 'skip$
140 { after.sentence 'output.state := }
141 if$
142 }
143 if$
144 }
145
146 FUNCTION {add.blank}
147 { " " * before.all 'output.state :=
148 }
149
150 FUNCTION {date.block}
151 {
152 new.block
153 }
154
155 FUNCTION {not}
156 { { #0 }
157 { #1 }
158 if$
159 }
160
161 FUNCTION {and}
162 { 'skip$
163 { pop$ #0 }
164 if$
165 }
166
167 FUNCTION {or}
168 { { pop$ #1 }
169 'skip$
170 if$
171 }
172
173 FUNCTION {new.block.checka}
174 { empty$
175 'skip$
176 'new.block
177 if$
178 }
179
180 FUNCTION {new.block.checkb}
181 { empty$
182 swap$ empty$
183 and
184 'skip$
185 'new.block
186 if$
187 }
188
189 FUNCTION {new.sentence.checka}
190 { empty$
191 'skip$
192 'new.sentence
193 if$
194 }
195
196 FUNCTION {new.sentence.checkb}
197 { empty$
198 swap$ empty$
199 and
200 'skip$
201 'new.sentence
202 if$
203 }
204
205 FUNCTION {field.or.null}
206 { duplicate$ empty$
207 { pop$ "" }
208 'skip$
209 if$
210 }
211
212 FUNCTION {emphasize}
213 { duplicate$ empty$
214 { pop$ "" }
215 { "\emph{" swap$ * "}" * }
216 if$
217 }
218
219 FUNCTION {capitalize}
220 { "u" change.case$ "t" change.case$ }
221
222 FUNCTION {space.word}
223 { " " swap$ * " " * }
224
225 % Here are the language-specific definitions for explicit words.
226 % Each function has a name bbl.xxx where xxx is the English word.
227 % The language selected here is ENGLISH
228 FUNCTION {bbl.and}
229 { "and"}
230
231 FUNCTION {bbl.etal}
232 { "et~al." }
233
234 FUNCTION {bbl.editors}
235 { "eds." }
236
237 FUNCTION {bbl.editor}
238 { "ed." }
239
240 FUNCTION {bbl.edby}
241 { "edited by" }
242
243 FUNCTION {bbl.edition}
244 { "ed." }
245
246 FUNCTION {bbl.volume}
247 { "vol." }
248
249 FUNCTION {bbl.of}
250 { "of" }
251
252 FUNCTION {bbl.number}
253 { "no." }
254
255 FUNCTION {bbl.nr}
256 { "no." }
257
258 FUNCTION {bbl.in}
259 { "in" }
260
261 FUNCTION {bbl.pages}
262 { "pp." }
263
264 FUNCTION {bbl.page}
265 { "p." }
266
267 FUNCTION {bbl.chapter}
268 { "chap." }
269
270 FUNCTION {bbl.techrep}
271 { "Tech. Rep." }
272
273 FUNCTION {bbl.mthesis}
274 { "Master's thesis" }
275
276 FUNCTION {bbl.phdthesis}
277 { "Ph.D. thesis" }
278
279 MACRO {jan} {"Jan."}
280
281 MACRO {feb} {"Feb."}
282
283 MACRO {mar} {"Mar."}
284
285 MACRO {apr} {"Apr."}
286
287 MACRO {may} {"May"}
288
289 MACRO {jun} {"Jun."}
290
291 MACRO {jul} {"Jul."}
292
293 MACRO {aug} {"Aug."}
294
295 MACRO {sep} {"Sep."}
296
297 MACRO {oct} {"Oct."}
298
299 MACRO {nov} {"Nov."}
300
301 MACRO {dec} {"Dec."}
302
303 MACRO {acmcs} {"ACM Comput. Surv."}
304
305 MACRO {acta} {"Acta Inf."}
306
307 MACRO {cacm} {"Commun. ACM"}
308
309 MACRO {ibmjrd} {"IBM J. Res. Dev."}
310
311 MACRO {ibmsj} {"IBM Syst.~J."}
312
313 MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
314
315 MACRO {ieeetc} {"IEEE Trans. Comput."}
316
317 MACRO {ieeetcad}
318 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
319
320 MACRO {ipl} {"Inf. Process. Lett."}
321
322 MACRO {jacm} {"J.~ACM"}
323
324 MACRO {jcss} {"J.~Comput. Syst. Sci."}
325
326 MACRO {scp} {"Sci. Comput. Programming"}
327
328 MACRO {sicomp} {"SIAM J. Comput."}
329
330 MACRO {tocs} {"ACM Trans. Comput. Syst."}
331
332 MACRO {tods} {"ACM Trans. Database Syst."}
333
334 MACRO {tog} {"ACM Trans. Gr."}
335
336 MACRO {toms} {"ACM Trans. Math. Softw."}
337
338 MACRO {toois} {"ACM Trans. Office Inf. Syst."}
339
340 MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
341
342 MACRO {tcs} {"Theoretical Comput. Sci."}
343
344 INTEGERS { nameptr namesleft numnames }
345
346 FUNCTION {format.names}
347 { 's :=
348 "" 't :=
349 #1 'nameptr :=
350 s num.names$ 'numnames :=
351 numnames 'namesleft :=
352 { namesleft #0 > }
353 { s nameptr
354 "{f.~}{vv~}{ll}{, jj}" format.name$
355 't :=
356 nameptr #1 >
357 {
358 nameptr #2
359 #1 + =
360 numnames #2
361 > and
362 { "others" 't :=
363 #1 'namesleft := }
364 'skip$
365 if$
366 namesleft #1 >
367 { ", " * t * }
368 {
369 numnames #2 >
370 { "," * }
371 'skip$
372 if$
373 s nameptr "{ll}" format.name$ duplicate$ "others" =
374 { 't := }
375 { pop$ }
376 if$
377 t "others" =
378 {
379 " " * bbl.etal *
380 }
381 { bbl.and
382 space.word * t *
383 }
384 if$
385 }
386 if$
387 }
388 't
389 if$
390 nameptr #1 + 'nameptr :=
391 namesleft #1 - 'namesleft :=
392 }
393 while$
394 }
395
396 FUNCTION {format.names.ed}
397 { format.names }
398
399 FUNCTION {format.authors}
400 { author empty$
401 { "" }
402 { author format.names }
403 if$
404 }
405
406 FUNCTION {format.editors}
407 { editor empty$
408 { "" }
409 { editor format.names
410 ", " *
411 editor num.names$ #1 >
412 'bbl.editors
413 'bbl.editor
414 if$
415 *
416 }
417 if$
418 }
419
420 FUNCTION {format.in.editors}
421 { editor empty$
422 { "" }
423 { editor format.names.ed
424 editor num.names$ #1 >
425 { ", " * bbl.editors * }
426 { ", " * bbl.editor * }
427 if$
428 }
429 if$
430 }
431
432 FUNCTION {format.isbn}
433 { isbn empty$
434 { "" }
435 {
436 new.block
437 "ISBN " isbn * }
438 if$
439 }
440
441 FUNCTION {format.issn}
442 { issn empty$
443 { "" }
444 {
445 new.block
446 "ISSN " issn * }
447 if$
448 }
449
450 FUNCTION {select.language}
451 { duplicate$ empty$
452 'pop$
453 { language empty$
454 'skip$
455 { "{\selectlanguage{" language * "}" * swap$ * "}" * }
456 if$
457 }
458 if$
459 }
460 FUNCTION {format.note}
461 {
462 note empty$
463 { "" }
464 { "\savetreesbibnote{"
465 note #1 #1 substring$
466 duplicate$ "{" =
467 'skip$
468 { output.state mid.sentence =
469 { "l" }
470 { "u" }
471 if$
472 change.case$
473 }
474 if$
475 note #2 global.max$ substring$ *
476 "}" * *
477 }
478 if$
479 }
480
481 FUNCTION {format.title}
482 { title empty$
483 { "" }
484 { title "t" change.case$
485 select.language
486 }
487 if$
488 }
489
490 FUNCTION {output.bibitem}
491 { newline$
492 "\bibitem{" write$
493 cite$ write$
494 "}" write$
495 newline$
496 ""
497 before.all 'output.state :=
498 }
499
500 FUNCTION {n.dashify}
501 {
502 't :=
503 ""
504 { t empty$ not }
505 { t #1 #1 substring$ "-" =
506 { t #1 #2 substring$ "--" = not
507 { "--" *
508 t #2 global.max$ substring$ 't :=
509 }
510 { { t #1 #1 substring$ "-" = }
511 { "-" *
512 t #2 global.max$ substring$ 't :=
513 }
514 while$
515 }
516 if$
517 }
518 { t #1 #1 substring$ *
519 t #2 global.max$ substring$ 't :=
520 }
521 if$
522 }
523 while$
524 }
525
526 FUNCTION {word.in}
527 { bbl.in capitalize
528 " " * }
529
530 FUNCTION {format.date}
531 { year empty$
532 { month empty$
533 { "" }
534 { "there's a month but no year in " cite$ * warning$
535 month
536 }
537 if$
538 }
539 { month empty$
540 'year
541 { month " " * year * }
542 if$
543 }
544 if$
545 }
546
547 FUNCTION {format.btitle}
548 { title emphasize
549 select.language
550 }
551
552 FUNCTION {tie.or.space.connect}
553 { duplicate$ text.length$ #3 <
554 { "~" }
555 { " " }
556 if$
557 swap$ * *
558 }
559
560 FUNCTION {either.or.check}
561 { empty$
562 'pop$
563 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
564 if$
565 }
566
567 FUNCTION {format.bvolume}
568 { volume empty$
569 { "" }
570 { bbl.volume volume tie.or.space.connect
571 series empty$
572 'skip$
573 { bbl.of space.word * series emphasize * }
574 if$
575 "volume and number" number either.or.check
576 }
577 if$
578 }
579
580 FUNCTION {format.number.series}
581 { volume empty$
582 { number empty$
583 { series field.or.null }
584 { output.state mid.sentence =
585 { bbl.number }
586 { bbl.number capitalize }
587 if$
588 number tie.or.space.connect
589 series empty$
590 { "there's a number but no series in " cite$ * warning$ }
591 { bbl.in space.word * series * }
592 if$
593 }
594 if$
595 }
596 { "" }
597 if$
598 }
599
600 FUNCTION {format.edition}
601 { edition empty$
602 { "" }
603 { output.state mid.sentence =
604 { edition "l" change.case$ " " * bbl.edition * }
605 { edition "t" change.case$ " " * bbl.edition * }
606 if$
607 }
608 if$
609 }
610
611 INTEGERS { multiresult }
612
613 FUNCTION {multi.page.check}
614 { 't :=
615 #0 'multiresult :=
616 { multiresult not
617 t empty$ not
618 and
619 }
620 { t #1 #1 substring$
621 duplicate$ "-" =
622 swap$ duplicate$ "," =
623 swap$ "+" =
624 or or
625 { #1 'multiresult := }
626 { t #2 global.max$ substring$ 't := }
627 if$
628 }
629 while$
630 multiresult
631 }
632
633 FUNCTION {format.pages}
634 { pages empty$
635 { "" }
636 { pages multi.page.check
637 { bbl.pages pages n.dashify tie.or.space.connect }
638 { bbl.page pages tie.or.space.connect }
639 if$
640 }
641 if$
642 }
643
644 FUNCTION {format.journal.pages}
645 { pages empty$
646 'skip$
647 { duplicate$ empty$
648 { pop$ format.pages }
649 {
650 ":" *
651 pages n.dashify *
652 }
653 if$
654 }
655 if$
656 }
657
658 FUNCTION {format.vol.num.pages}
659 { volume field.or.null
660 number empty$
661 'skip$
662 {
663 "(" number * ")" * *
664 volume empty$
665 { "there's a number but no volume in " cite$ * warning$ }
666 'skip$
667 if$
668 }
669 if$
670 format.journal.pages
671 }
672
673 FUNCTION {format.chapter.pages}
674 { chapter empty$
675 'format.pages
676 { type empty$
677 { bbl.chapter }
678 { type "l" change.case$ }
679 if$
680 chapter tie.or.space.connect
681 pages empty$
682 'skip$
683 { ", " * format.pages * }
684 if$
685 }
686 if$
687 }
688
689 FUNCTION {format.in.ed.booktitle}
690 { booktitle empty$
691 { "" }
692 { editor empty$
693 { word.in booktitle emphasize * }
694 { word.in format.in.editors * ", " *
695 booktitle emphasize * }
696 if$
697 }
698 if$
699 }
700
701 FUNCTION {empty.misc.check}
702 { author empty$ title empty$ howpublished empty$
703 month empty$ year empty$ note empty$
704 and and and and and
705 key empty$ not and
706 { "all relevant fields are empty in " cite$ * warning$ }
707 'skip$
708 if$
709 }
710
711 FUNCTION {format.thesis.type}
712 { type empty$
713 'skip$
714 { pop$
715 type "t" change.case$
716 }
717 if$
718 }
719
720 FUNCTION {format.tr.number}
721 { type empty$
722 { bbl.techrep }
723 'type
724 if$
725 number empty$
726 { "t" change.case$ }
727 { number tie.or.space.connect }
728 if$
729 }
730
731 FUNCTION {format.article.crossref}
732 {
733 key empty$
734 { journal empty$
735 { "need key or journal for " cite$ * " to crossref " * crossref *
736 warning$
737 ""
738 }
739 { word.in journal emphasize * }
740 if$
741 }
742 { word.in key * " " *}
743 if$
744 " \cite{" * crossref * "}" *
745 }
746
747 FUNCTION {format.crossref.editor}
748 { editor #1 "{vv~}{ll}" format.name$
749 editor num.names$ duplicate$
750 #2 >
751 { pop$
752 " " * bbl.etal *
753 }
754 { #2 <
755 'skip$
756 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
757 {
758 " " * bbl.etal *
759 }
760 { bbl.and space.word * editor #2 "{vv~}{ll}" format.name$
761 * }
762 if$
763 }
764 if$
765 }
766 if$
767 }
768
769 FUNCTION {format.book.crossref}
770 { volume empty$
771 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
772 word.in
773 }
774 { bbl.volume capitalize
775 volume tie.or.space.connect
776 bbl.of space.word *
777 }
778 if$
779 editor empty$
780 editor field.or.null author field.or.null =
781 or
782 { key empty$
783 { series empty$
784 { "need editor, key, or series for " cite$ * " to crossref " *
785 crossref * warning$
786 "" *
787 }
788 { series emphasize * }
789 if$
790 }
791 { key * }
792 if$
793 }
794 { format.crossref.editor * }
795 if$
796 " \cite{" * crossref * "}" *
797 }
798
799 FUNCTION {format.incoll.inproc.crossref}
800 {
801 editor empty$
802 editor field.or.null author field.or.null =
803 or
804 { key empty$
805 { booktitle empty$
806 { "need editor, key, or booktitle for " cite$ * " to crossref " *
807 crossref * warning$
808 ""
809 }
810 { word.in booktitle emphasize * }
811 if$
812 }
813 { word.in key * " " *}
814 if$
815 }
816 { word.in format.crossref.editor * " " *}
817 if$
818 " \cite{" * crossref * "}" *
819 }
820
821 FUNCTION {format.org.or.pub}
822 { 't :=
823 ""
824 address empty$ t empty$ and
825 'skip$
826 {
827 t empty$
828 { address empty$
829 'skip$
830 { address * }
831 if$
832 }
833 { t *
834 address empty$
835 'skip$
836 { ", " * address * }
837 if$
838 }
839 if$
840 }
841 if$
842 }
843
844 FUNCTION {format.publisher.address}
845 { publisher empty$
846 { "empty publisher in " cite$ * warning$
847 ""
848 }
849 { publisher }
850 if$
851 format.org.or.pub
852 }
853
854 FUNCTION {format.organization.address}
855 { organization empty$
856 { "" }
857 { organization }
858 if$
859 format.org.or.pub
860 }
861
862 STRINGS {oldname}
863
864 FUNCTION {name.or.dash}
865 { 's :=
866 oldname empty$
867 { s 'oldname := s }
868 { s oldname =
869 { "---" }
870 { s 'oldname := s }
871 if$
872 }
873 if$
874 }
875
876 FUNCTION {article}
877 { output.bibitem
878 format.authors "author" output.check
879 name.or.dash
880 new.block
881 format.title "title" output.check
882 new.block
883 crossref missing$
884 { journal
885 emphasize
886 "journal" output.check
887 format.vol.num.pages output
888 format.date "year" output.check
889 }
890 { format.article.crossref output.nonnull
891 format.pages output
892 }
893 if$
894 format.issn output
895 new.block
896 format.note output
897 fin.entry
898 }
899
900 FUNCTION {book}
901 { output.bibitem
902 author empty$
903 { format.editors "author and editor" output.check
904 name.or.dash
905 }
906 { format.authors output.nonnull
907 name.or.dash
908 crossref missing$
909 { "author and editor" editor either.or.check }
910 'skip$
911 if$
912 }
913 if$
914 new.block
915 format.btitle "title" output.check
916 crossref missing$
917 { format.bvolume output
918 new.block
919 format.number.series output
920 new.sentence
921 format.publisher.address output
922 }
923 {
924 new.block
925 format.book.crossref output.nonnull
926 }
927 if$
928 format.edition output
929 format.date "year" output.check
930 format.isbn output
931 new.block
932 format.note output
933 fin.entry
934 }
935
936 FUNCTION {booklet}
937 { output.bibitem
938 format.authors output
939 name.or.dash
940 new.block
941 format.title "title" output.check
942 new.block
943 howpublished output
944 address output
945 format.date output
946 format.isbn output
947 new.block
948 format.note output
949 fin.entry
950 }
951
952 FUNCTION {inbook}
953 { output.bibitem
954 author empty$
955 { format.editors "author and editor" output.check
956 name.or.dash
957 }
958 { format.authors output.nonnull
959 name.or.dash
960 crossref missing$
961 { "author and editor" editor either.or.check }
962 'skip$
963 if$
964 }
965 if$
966 new.block
967 format.btitle "title" output.check
968 crossref missing$
969 {
970 format.bvolume output
971 format.chapter.pages "chapter and pages" output.check
972 new.block
973 format.number.series output
974 new.sentence
975 format.publisher.address output
976 }
977 {
978 format.chapter.pages "chapter and pages" output.check
979 new.block
980 format.book.crossref output.nonnull
981 }
982 if$
983 format.edition output
984 format.date "year" output.check
985 crossref missing$
986 { format.isbn output }
987 'skip$
988 if$
989 new.block
990 format.note output
991 fin.entry
992 }
993
994 FUNCTION {incollection}
995 { output.bibitem
996 format.authors "author" output.check
997 name.or.dash
998 new.block
999 format.title "title" output.check
1000 new.block
1001 crossref missing$
1002 { format.in.ed.booktitle "booktitle" output.check
1003 format.bvolume output
1004 format.number.series output
1005 format.chapter.pages output
1006 new.sentence
1007 format.publisher.address output
1008 format.edition output
1009 format.date "year" output.check
1010 format.isbn output
1011 }
1012 { format.incoll.inproc.crossref output.nonnull
1013 format.chapter.pages output
1014 }
1015 if$
1016 new.block
1017 format.note output
1018 fin.entry
1019 }
1020
1021 FUNCTION {inproceedings}
1022 { output.bibitem
1023 format.authors "author" output.check
1024 name.or.dash
1025 new.block
1026 format.title "title" output.check
1027 new.block
1028 crossref missing$
1029 { format.in.ed.booktitle "booktitle" output.check
1030 format.bvolume output
1031 format.number.series output
1032 format.pages output
1033 new.sentence
1034 publisher empty$
1035 { format.organization.address output }
1036 { organization output
1037 format.publisher.address output
1038 }
1039 if$
1040 format.date "year" output.check
1041 format.isbn output
1042 format.issn output
1043 }
1044 { format.incoll.inproc.crossref output.nonnull
1045 format.pages output
1046 }
1047 if$
1048 new.block
1049 format.note output
1050 fin.entry
1051 }
1052
1053 FUNCTION {conference} { inproceedings }
1054
1055 FUNCTION {manual}
1056 { output.bibitem
1057 author empty$
1058 { organization empty$
1059 'skip$
1060 { organization output.nonnull
1061 address output
1062 }
1063 if$
1064 }
1065 { format.authors output.nonnull }
1066 if$
1067 name.or.dash
1068 new.block
1069 format.btitle "title" output.check
1070 author empty$
1071 { organization empty$
1072 {
1073 address new.block.checka
1074 address output
1075 }
1076 'skip$
1077 if$
1078 }
1079 {
1080 organization address new.block.checkb
1081 organization output
1082 address output
1083 }
1084 if$
1085 format.edition output
1086 format.date output
1087 new.block
1088 format.note output
1089 fin.entry
1090 }
1091
1092 FUNCTION {mastersthesis}
1093 { output.bibitem
1094 format.authors "author" output.check
1095 name.or.dash
1096 new.block
1097 format.btitle "title" output.check
1098 new.block
1099 bbl.mthesis format.thesis.type output.nonnull
1100 school "school" output.check
1101 address output
1102 format.date "year" output.check
1103 new.block
1104 format.note output
1105 fin.entry
1106 }
1107
1108 FUNCTION {misc}
1109 { output.bibitem
1110 format.authors output
1111 name.or.dash
1112 title howpublished new.block.checkb
1113 format.title output
1114 howpublished new.block.checka
1115 howpublished output
1116 format.date output
1117 new.block
1118 format.note output
1119 fin.entry
1120 empty.misc.check
1121 }
1122
1123 FUNCTION {phdthesis}
1124 { output.bibitem
1125 format.authors "author" output.check
1126 name.or.dash
1127 new.block
1128 format.btitle "title" output.check
1129 new.block
1130 bbl.phdthesis format.thesis.type output.nonnull
1131 school "school" output.check
1132 address output
1133 format.date "year" output.check
1134 new.block
1135 format.note output
1136 fin.entry
1137 }
1138
1139 FUNCTION {proceedings}
1140 { output.bibitem
1141 editor empty$
1142 { organization output }
1143 { format.editors output.nonnull }
1144 if$
1145 name.or.dash
1146 new.block
1147 format.btitle "title" output.check
1148 format.bvolume output
1149 format.number.series output
1150 editor empty$
1151 { publisher empty$
1152 'skip$
1153 {
1154 new.sentence
1155 format.publisher.address output
1156 }
1157 if$
1158 }
1159 { publisher empty$
1160 {
1161 new.sentence
1162 format.organization.address output }
1163 {
1164 new.sentence
1165 organization output
1166 format.publisher.address output
1167 }
1168 if$
1169 }
1170 if$
1171 format.date "year" output.check
1172 format.isbn output
1173 format.issn output
1174 new.block
1175 format.note output
1176 fin.entry
1177 }
1178
1179 FUNCTION {techreport}
1180 { output.bibitem
1181 format.authors "author" output.check
1182 name.or.dash
1183 new.block
1184 format.title "title" output.check
1185 new.block
1186 format.tr.number output.nonnull
1187 institution "institution" output.check
1188 address output
1189 format.date "year" output.check
1190 new.block
1191 format.note output
1192 fin.entry
1193 }
1194
1195 FUNCTION {unpublished}
1196 { output.bibitem
1197 format.authors "author" output.check
1198 name.or.dash
1199 new.block
1200 format.title "title" output.check
1201 format.date output
1202 new.block
1203 format.note "note" output.check
1204 fin.entry
1205 }
1206
1207 FUNCTION {default.type} { misc }
1208
1209 READ
1210
1211 FUNCTION {sortify}
1212 { purify$
1213 "l" change.case$
1214 }
1215
1216 INTEGERS { len }
1217
1218 FUNCTION {chop.word}
1219 { 's :=
1220 'len :=
1221 s #1 len substring$ =
1222 { s len #1 + global.max$ substring$ }
1223 's
1224 if$
1225 }
1226
1227 FUNCTION {sort.format.names}
1228 { 's :=
1229 #1 'nameptr :=
1230 ""
1231 s num.names$ 'numnames :=
1232 numnames 'namesleft :=
1233 { namesleft #0 > }
1234 { s nameptr
1235 "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}"
1236 format.name$ 't :=
1237 nameptr #1 >
1238 {
1239 nameptr #2
1240 #1 + =
1241 numnames #2
1242 > and
1243 { "others" 't :=
1244 #1 'namesleft := }
1245 'skip$
1246 if$
1247 " " *
1248 namesleft #1 = t "others" = and
1249 { "zzzzz" * }
1250 { t sortify * }
1251 if$
1252 }
1253 { t sortify * }
1254 if$
1255 nameptr #1 + 'nameptr :=
1256 namesleft #1 - 'namesleft :=
1257 }
1258 while$
1259 }
1260
1261 FUNCTION {sort.format.title}
1262 { 't :=
1263 "A " #2
1264 "An " #3
1265 "The " #4 t chop.word
1266 chop.word
1267 chop.word
1268 sortify
1269 #1 global.max$ substring$
1270 }
1271
1272 FUNCTION {author.sort}
1273 { author empty$
1274 { key empty$
1275 { "to sort, need author or key in " cite$ * warning$
1276 ""
1277 }
1278 { key sortify }
1279 if$
1280 }
1281 { author sort.format.names }
1282 if$
1283 }
1284
1285 FUNCTION {author.editor.sort}
1286 { author empty$
1287 { editor empty$
1288 { key empty$
1289 { "to sort, need author, editor, or key in " cite$ * warning$
1290 ""
1291 }
1292 { key sortify }
1293 if$
1294 }
1295 { editor sort.format.names }
1296 if$
1297 }
1298 { author sort.format.names }
1299 if$
1300 }
1301
1302 FUNCTION {author.organization.sort}
1303 { author empty$
1304 { organization empty$
1305 { key empty$
1306 { "to sort, need author, organization, or key in " cite$ * warning$
1307 ""
1308 }
1309 { key sortify }
1310 if$
1311 }
1312 { "The " #4 organization chop.word sortify }
1313 if$
1314 }
1315 { author sort.format.names }
1316 if$
1317 }
1318
1319 FUNCTION {editor.organization.sort}
1320 { editor empty$
1321 { organization empty$
1322 { key empty$
1323 { "to sort, need editor, organization, or key in " cite$ * warning$
1324 ""
1325 }
1326 { key sortify }
1327 if$
1328 }
1329 { "The " #4 organization chop.word sortify }
1330 if$
1331 }
1332 { editor sort.format.names }
1333 if$
1334 }
1335
1336 FUNCTION {presort}
1337 { type$ "book" =
1338 type$ "inbook" =
1339 or
1340 'author.editor.sort
1341 { type$ "proceedings" =
1342 'editor.organization.sort
1343 { type$ "manual" =
1344 'author.organization.sort
1345 'author.sort
1346 if$
1347 }
1348 if$
1349 }
1350 if$
1351 " "
1352 *
1353 year field.or.null sortify
1354 *
1355 " "
1356 *
1357 title field.or.null
1358 sort.format.title
1359 *
1360 #1 entry.max$ substring$
1361 'sort.key$ :=
1362 }
1363
1364 ITERATE {presort}
1365
1366 SORT
1367
1368 STRINGS { longest.label }
1369
1370 INTEGERS { number.label longest.label.width }
1371
1372 FUNCTION {initialize.longest.label}
1373 { "" 'longest.label :=
1374 #1 'number.label :=
1375 #0 'longest.label.width :=
1376 }
1377
1378 FUNCTION {longest.label.pass}
1379 { number.label int.to.str$ 'label :=
1380 number.label #1 + 'number.label :=
1381 label width$ longest.label.width >
1382 { label 'longest.label :=
1383 label width$ 'longest.label.width :=
1384 }
1385 'skip$
1386 if$
1387 }
1388
1389 EXECUTE {initialize.longest.label}
1390
1391 ITERATE {longest.label.pass}
1392
1393 FUNCTION {begin.bib}
1394 { preamble$ empty$
1395 'skip$
1396 { preamble$ write$ newline$ }
1397 if$
1398 "\begin{thebibliography}{" longest.label * "}" *
1399 write$ newline$
1400 "\providecommand*{\selectlanguage}[1]{\relax}%"
1401 write$ newline$
1402 "\providecommand*{\savetreesbibnote}[1]{#1}%"
1403 write$ newline$
1404 }
1405
1406 EXECUTE {begin.bib}
1407
1408 EXECUTE {init.state.consts}
1409
1410 ITERATE {call.type$}
1411
1412 FUNCTION {end.bib}
1413 { newline$
1414 "\end{thebibliography}" write$ newline$
1415 }
1416
1417 EXECUTE {end.bib}
1418 %% End of customized bst file
1419 %%
1420 %% End of file `savetrees.bst'.