Debian Codegraph @

texmf-dist/bibtex/bst/babelbib/babalpha-fl.bst

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