Debian Codegraph @

texmf-dist/bibtex/bst/sort-by-letters/plainnat-letters.bst

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