Debian Codegraph @

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

raw
1 %%
2 %% This is file `bababbrv-fl.bst',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% babelbib.dtx (with options: `bst,bststd,bstshort,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 }
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 {" 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
379 "{f{.\btxfnamespaceshort }.~}{vv~}" format.name$
380 s nameptr "{ll}" format.name$ lastnamefont *
381 s nameptr "{,~jj}" format.name$ *
382 't :=
383 namesleft #1 >
384 { ", " * t namefont * }
385 { numnames #2 >
386 { "\btxandcomma {}" * }
387 'skip$
388 if$
389 s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ "others" =
390 { " " "\btxetalshort {.}" etalfont * * }
391 { " \btxandshort {.}\ " * t namefont * }
392 if$
393 }
394 if$
395 }
396 {
397 s nameptr "{f{.\btxfnamespaceshort }.~}{vv~}" format.name$
398 s nameptr "{ll}" format.name$ lastnamefont *
399 s nameptr "{,~jj}" format.name$ * namefont
400 }
401 if$
402 nameptr #1 + 'nameptr :=
403 namesleft #1 - 'namesleft :=
404 }
405 while$
406 }
407
408 FUNCTION {format.authors}
409 { author empty$
410 { "" }
411 { author format.names }
412 if$
413 }
414
415 FUNCTION {format.editors}
416 { editor empty$
417 { "" }
418 { editor format.names
419 editor num.names$ #1 >
420 { "\ (\btxeditorsshort {.})" * }
421 { "\ (\btxeditorshort {.})" * }
422 if$
423 }
424 if$
425 }
426 FUNCTION {format.title}
427 { title empty$
428 { "" }
429 { title "t" language.change.case titlefont }
430 if$
431 }
432 FUNCTION {format.jtitle}
433 { title empty$
434 { "" }
435 { title "t" language.change.case jtitlefont }
436 if$
437 }
438 FUNCTION {n.dashify}
439 { 't :=
440 ""
441 { t empty$ not }
442 { t #1 #1 substring$ "-" =
443 { t #1 #2 substring$ "--" = not
444 { "--" *
445 t #2 global.max$ substring$ 't :=
446 }
447 { { t #1 #1 substring$ "-" = }
448 { "-" *
449 t #2 global.max$ substring$ 't :=
450 }
451 while$
452 }
453 if$
454 }
455 { t #1 #1 substring$ *
456 t #2 global.max$ substring$ 't :=
457 }
458 if$
459 }
460 while$
461 }
462
463 FUNCTION {format.date}
464 { year empty$
465 { month empty$
466 { "" }
467 { "there's a month but no year in " cite$ * warning$
468 month
469 }
470 if$
471 }
472 { month empty$
473 'year
474 { "\btxprintmonthyear{.}{"
475 month * "}{" * year * "}{short}" *
476 }
477 if$
478 }
479 if$
480 }
481
482 FUNCTION {format.btitle}
483 { title titlefont
484 }
485
486 FUNCTION {tie.or.space.connect}
487 { duplicate$ text.length$ #3 <
488 { "~" }
489 { "\ " }
490 if$
491 swap$ * *
492 }
493
494 FUNCTION {volume.tie.or.space.connect}
495 { duplicate$ text.length$ #3 <
496 { "~" }
497 { "\ " }
498 if$
499 swap$ volumefont * *
500 }
501
502 FUNCTION {either.or.check}
503 { empty$
504 'pop$
505 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
506 if$
507 }
508
509 FUNCTION {format.bvolume}
510 { volume empty$
511 { "" }
512 { output.state after.block =
513 { "\Btxvolumeshort {.}" }
514 { "\btxvolumeshort {.}" }
515 if$
516 volume volume.tie.or.space.connect
517 series empty$
518 'skip$
519 { " \btxofseriesshort {.}\ " * series titlefont * }
520 if$
521 "volume and number" number either.or.check
522 }
523 if$
524 }
525
526 FUNCTION {format.number.series}
527 { volume empty$
528 { number empty$
529 { series field.or.null }
530 { output.state mid.sentence =
531 { "\btxnumbershort {.}" }
532 { "\Btxnumbershort {.}" }
533 if$
534 number tie.or.space.connect
535 series empty$
536 { "there's a number but no series in " cite$ * warning$ }
537 { " \btxinseriesshort {.}\ " * series titlefont * }
538 if$
539 }
540 if$
541 }
542 { "" }
543 if$
544 }
545
546 FUNCTION {format.edition}
547 { edition empty$
548 { "" }
549 {
550 output.state mid.sentence =
551 { edition "l" change.case$ }
552 { edition "t" change.case$ }
553 if$
554 "\btxeditionnumshort {" swap$ *
555 "}{.}" *
556 }
557 if$
558 }
559
560 FUNCTION {format.isbn}
561 { isbn empty$
562 { "" }
563 { "\mbox{\btxISBN~\btxISBNfont {" isbn * "}}" * }
564 if$
565 }
566
567 FUNCTION {format.issn}
568 { issn empty$
569 { "" }
570 { "\mbox{\btxISSN~\btxISSNfont {" issn * "}}" * }
571 if$
572 }
573 FUNCTION {format.url}
574 { url empty$
575 { "" }
576 {
577 urldate empty$
578 { "{\latintext \btxurlfont{" url * "}}" * }
579 {
580 "{\latintext \btxurlfont{" url * "}}\empty " *
581 "\btxurldatecomment {\btxkeywordlanguage {\btxurldatefont{" *
582 urldate * "}}}" *
583 }
584 if$
585 }
586 if$
587 }
588 FUNCTION {write.annote}
589 { annote empty$
590 'skip$
591 {
592 annotelanguage empty$
593 { "\btxkeywordlanguage {" }
594 { "{\selectlanguage {" annotelanguage * "}" * }
595 if$
596 "\btxannotation {" * annote * "}}" *
597 write$ newline$
598 }
599 if$
600 }
601 INTEGERS { multiresult }
602
603 FUNCTION {multi.page.check}
604 { 't :=
605 #0 'multiresult :=
606 { multiresult not
607 t empty$ not
608 and
609 }
610 { t #1 #1 substring$
611 duplicate$ "-" =
612 swap$ duplicate$ "," =
613 swap$ "+" =
614 or or
615 { #1 'multiresult := }
616 { t #2 global.max$ substring$ 't := }
617 if$
618 }
619 while$
620 multiresult
621 }
622
623 FUNCTION {format.pages}
624 { pages empty$
625 { "" }
626 { pages multi.page.check
627 { "\btxpagesshort {.}" pages n.dashify tie.or.space.connect }
628 { "\btxpageshort {.}" pages tie.or.space.connect }
629 if$
630 }
631 if$
632 }
633
634 FUNCTION {format.vol.num.pages}
635 { volume field.or.null
636 number empty$
637 'skip$
638 { "(" number * ")" * *
639 volume empty$
640 { "there's a number but no volume in " cite$ * warning$ }
641 'skip$
642 if$
643 }
644 if$
645 pages empty$
646 'skip$
647 { duplicate$ empty$
648 { pop$ format.pages }
649 { ":" * pages n.dashify * }
650 if$
651 }
652 if$
653 }
654
655 FUNCTION {format.chapter.pages}
656 { chapter empty$
657 'format.pages
658 { type empty$
659 { "\btxchaptershort {.}" }
660 { type "l" language.change.case }
661 if$
662 chapter tie.or.space.connect
663 pages empty$
664 'skip$
665 { ", " * format.pages * }
666 if$
667 }
668 if$
669 }
670
671 FUNCTION {format.in.ed.booktitle}
672 { booktitle empty$
673 { "" }
674 { editor empty$
675 { "\Btxinshort {.}\ " booktitle titlefont * }
676 { "\Btxinshort {.}\ " format.editors * ": " * booktitle titlefont * }
677 if$
678 }
679 if$
680 }
681
682 FUNCTION {empty.misc.check}
683 { author empty$ title empty$ howpublished empty$
684 month empty$ year empty$ note empty$
685 and and and and and
686 key empty$ not and
687 { "all relevant fields are empty in " cite$ * warning$ }
688 'skip$
689 if$
690 }
691
692 FUNCTION {format.thesis.type}
693 { type empty$
694 'skip$
695 { pop$
696 type "t" language.change.case
697 }
698 if$
699 }
700
701 FUNCTION {format.tr.number}
702 {
703 number empty$
704 {
705 type empty$
706 { "\btxtechrepshort {.}" }
707 { type "t" language.change.case }
708 if$
709 }
710 {
711 type empty$
712 { "\Btxtechrepshort {.}" }
713 { type "t" language.change.case }
714 if$
715 number tie.or.space.connect
716 }
717 if$
718 }
719
720 FUNCTION {format.article.crossref}
721 { key empty$
722 { journal empty$
723 { "need key or journal for " cite$ * " to crossref " * crossref *
724 warning$
725 ""
726 }
727 { "\Btxinshort {.}\ " journal titlefont * }
728 if$
729 }
730 { "\Btxinshort {.}\ " key titlefont * }
731 if$
732 " \cite{" * crossref * "}" *
733 }
734
735 FUNCTION {format.crossref.editor}
736 {
737 editor #1 "{ll}{,~jj}{,~f.}{~vv}" format.name$ namefont
738 editor num.names$ duplicate$
739 #2 >
740 { pop$ " " "\btxetalshort {.}" etalfont * * }
741 { #2 <
742 'skip$
743 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
744 { " " "\btxetalshort {.}" etalfont * * }
745 { " \btxandshort {.}\ " * editor #2 "{vv~}{ll}"
746 format.name$ namefont * }
747 if$
748 }
749 if$
750 }
751 if$
752 }
753
754 FUNCTION {format.book.crossref}
755 { volume empty$
756 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
757 "\Btxinshort {.}\ "
758 }
759 { "\Btxvolumeshort {.}" volume volume.tie.or.space.connect
760 " \btxofseriesshort {.}\ " *
761 }
762 if$
763 editor empty$
764 editor field.or.null author field.or.null =
765 or
766 { key empty$
767 { series empty$
768 { "need editor, key, or series for " cite$ * " to crossref " *
769 crossref * warning$
770 "" *
771 }
772 { series titlefont * }
773 if$
774 }
775 { key titlefont * }
776 if$
777 }
778 { format.crossref.editor * }
779 if$
780 " \cite{" * crossref * "}" *
781 }
782
783 FUNCTION {format.incoll.inproc.crossref}
784 { editor empty$
785 editor field.or.null author field.or.null =
786 or
787 { key empty$
788 { booktitle empty$
789 { "need editor, key, or booktitle for " cite$ * " to crossref " *
790 crossref * warning$
791 ""
792 }
793 { "\Btxinshort {.}\ " booktitle titlefont * }
794 if$
795 }
796 { "\Btxinshort {.}\ " key titlefont * }
797 if$
798 }
799 { "\Btxinshort {.}\ " format.crossref.editor * }
800 if$
801 " \cite{" * crossref * "}" *
802 }
803
804 FUNCTION {article}
805 { output.bibitem
806 format.authors "author" output.check
807 after.authors
808 format.jtitle "title" output.check
809 new.block
810 crossref missing$
811 { journal
812 title missing$
813 { titlefont }
814 { journalfont }
815 if$
816 "journal" output.check
817 format.vol.num.pages output
818 format.date "year" output.check
819 }
820 { format.article.crossref output.nonnull
821 format.pages output
822 }
823 if$
824 format.issn "\ifbtxprintISSN" output.isbn
825 new.block
826 format.url output
827 note output
828 fin.entry
829 write.annote
830 }
831
832 FUNCTION {book}
833 { output.bibitem
834 author empty$
835 { format.editors "author and editor" output.check }
836 { format.authors output.nonnull
837 crossref missing$
838 { "author and editor" editor either.or.check }
839 'skip$
840 if$
841 }
842 if$
843 after.authors
844 format.btitle "title" output.check
845 crossref missing$
846 { format.bvolume output
847 new.block
848 format.number.series output
849 new.sentence
850 publisher "publisher" output.check publisherfont
851 address output
852 }
853 { new.block
854 format.book.crossref output.nonnull
855 }
856 if$
857 format.edition output
858 format.date "year" output.check
859 format.isbn "\ifbtxprintISBN" output.isbn
860 new.block
861 format.url output
862 note output
863 fin.entry
864 write.annote
865 }
866
867 FUNCTION {booklet}
868 { output.bibitem
869 format.authors output
870 after.authors
871 format.title "title" output.check
872 howpublished address new.block.checkb
873 howpublished output
874 address output
875 format.date output
876 new.block
877 format.url output
878 note output
879 fin.entry
880 write.annote
881 }
882
883 FUNCTION {inbook}
884 { output.bibitem
885 author empty$
886 { format.editors "author and editor" output.check }
887 { format.authors output.nonnull
888 crossref missing$
889 { "author and editor" editor either.or.check }
890 'skip$
891 if$
892 }
893 if$
894 after.authors
895 format.btitle "title" output.check
896 crossref missing$
897 { format.bvolume output
898 format.chapter.pages "chapter and pages" output.check
899 new.block
900 format.number.series output
901 new.sentence
902 publisher "publisher" output.check publisherfont
903 address output
904 }
905 { format.chapter.pages "chapter and pages" output.check
906 new.block
907 format.book.crossref output.nonnull
908 }
909 if$
910 format.edition output
911 format.date "year" output.check
912 format.isbn "\ifbtxprintISBN" output.isbn
913 new.block
914 format.url output
915 note output
916 fin.entry
917 write.annote
918 }
919
920 FUNCTION {incollection}
921 { output.bibitem
922 format.authors "author" output.check
923 after.authors
924 format.title "title" output.check
925 new.block
926 crossref missing$
927 { format.in.ed.booktitle "booktitle" output.check
928 format.bvolume output
929 format.number.series output
930 format.chapter.pages output
931 new.sentence
932 publisher "publisher" output.check publisherfont
933 address output
934 format.edition output
935 format.date "year" output.check
936 }
937 { format.incoll.inproc.crossref output.nonnull
938 format.chapter.pages output
939 }
940 if$
941 format.isbn "\ifbtxprintISBN" output.isbn
942 new.block
943 format.url output
944 note output
945 fin.entry
946 write.annote
947 }
948
949 FUNCTION {inproceedings}
950 { output.bibitem
951 format.authors "author" output.check
952 after.authors
953 format.title "title" output.check
954 new.block
955 crossref missing$
956 { format.in.ed.booktitle "booktitle" output.check
957 format.bvolume output
958 format.number.series output
959 format.pages output
960 address empty$
961 { organization publisher new.sentence.checkb
962 organization output
963 publisher publisherfont output
964 format.date "year" output.check
965 }
966 { address output.nonnull
967 format.date "year" output.check
968 new.sentence
969 organization output
970 publisher publisherfont output
971 }
972 if$
973 }
974 { format.incoll.inproc.crossref output.nonnull
975 format.pages output
976 }
977 if$
978 format.isbn "\ifbtxprintISBN" output.isbn
979 new.block
980 format.url output
981 note output
982 fin.entry
983 write.annote
984 }
985
986 FUNCTION {conference} { inproceedings }
987
988 FUNCTION {manual}
989 { output.bibitem
990 author empty$
991 { organization empty$
992 'skip$
993 { organization output.nonnull
994 address output
995 }
996 if$
997 }
998 { format.authors output.nonnull }
999 if$
1000 after.authors
1001 format.btitle "title" output.check
1002 author empty$
1003 { organization empty$
1004 { address new.block.checka
1005 address output
1006 }
1007 'skip$
1008 if$
1009 }
1010 { organization address new.block.checkb
1011 organization output
1012 address output
1013 }
1014 if$
1015 format.edition output
1016 format.date output
1017 format.isbn "\ifbtxprintISBN" output.isbn
1018 new.block
1019 format.url output
1020 note output
1021 fin.entry
1022 write.annote
1023 }
1024
1025 FUNCTION {mastersthesis}
1026 { output.bibitem
1027 format.authors "author" output.check
1028 after.authors
1029 format.title "title" output.check
1030 new.block
1031 "\btxmastthesis {}" format.thesis.type output.nonnull
1032 school "school" output.check
1033 address output
1034 format.date "year" output.check
1035 new.block
1036 format.url output
1037 note output
1038 fin.entry
1039 write.annote
1040 }
1041
1042 FUNCTION {misc}
1043 { output.bibitem
1044 format.authors output
1045 title howpublished new.block.checkc
1046 format.title output
1047 howpublished new.block.checka
1048 howpublished output
1049 format.date output
1050 format.isbn "\ifbtxprintISBN" output.isbn
1051 new.block
1052 format.issn "\ifbtxprintISSN" output.isbn
1053 new.block
1054 format.url output
1055 note output
1056 fin.entry
1057 write.annote
1058 empty.misc.check
1059 }
1060
1061 FUNCTION {phdthesis}
1062 { output.bibitem
1063 format.authors "author" output.check
1064 after.authors
1065 format.btitle "title" output.check
1066 new.block
1067 "\btxphdthesis {}" format.thesis.type output.nonnull
1068 school "school" output.check
1069 address output
1070 format.date "year" output.check
1071 format.isbn "\ifbtxprintISBN" output.isbn
1072 new.block
1073 format.url output
1074 note output
1075 fin.entry
1076 write.annote
1077 }
1078
1079 FUNCTION {proceedings}
1080 { output.bibitem
1081 editor empty$
1082 { organization output }
1083 { format.editors output.nonnull }
1084 if$
1085 after.authors
1086 format.btitle "title" output.check
1087 format.bvolume output
1088 format.number.series output
1089 address empty$
1090 { editor empty$
1091 { publisher new.sentence.checka }
1092 { organization publisher new.sentence.checkb
1093 organization output
1094 }
1095 if$
1096 publisher publisherfont output
1097 format.date "year" output.check
1098 }
1099 { address output.nonnull
1100 format.date "year" output.check
1101 new.sentence
1102 editor empty$
1103 'skip$
1104 { organization output }
1105 if$
1106 publisher publisherfont output
1107 }
1108 if$
1109 format.isbn "\ifbtxprintISBN" output.isbn
1110 new.block
1111 format.url output
1112 note output
1113 fin.entry
1114 write.annote
1115 }
1116
1117 FUNCTION {techreport}
1118 { output.bibitem
1119 format.authors "author" output.check
1120 after.authors
1121 format.title "title" output.check
1122 new.block
1123 format.tr.number output.nonnull
1124 institution "institution" output.check
1125 address output
1126 format.date "year" output.check
1127 format.isbn "\ifbtxprintISBN" output.isbn
1128 new.block
1129 format.url output
1130 note output
1131 fin.entry
1132 write.annote
1133 }
1134
1135 FUNCTION {unpublished}
1136 { output.bibitem
1137 format.authors "author" output.check
1138 after.authors
1139 format.title "title" output.check
1140 new.block
1141 format.url output
1142 note "note" output.check
1143 format.date output
1144 fin.entry
1145 write.annote
1146 }
1147
1148 FUNCTION {default.type} { misc }
1149
1150 MACRO {jan} {"1"}
1151 MACRO {feb} {"2"}
1152 MACRO {mar} {"3"}
1153 MACRO {apr} {"4"}
1154 MACRO {may} {"5"}
1155 MACRO {jun} {"6"}
1156 MACRO {jul} {"7"}
1157 MACRO {aug} {"8"}
1158 MACRO {sep} {"9"}
1159 MACRO {oct} {"10"}
1160 MACRO {nov} {"11"}
1161 MACRO {dec} {"12"}
1162 MACRO {acmcs} {"ACM Comput.\ Surv.{}"}
1163 MACRO {acta} {"Acta Inf.{}"}
1164 MACRO {cacm} {"Commun. ACM"}
1165 MACRO {ibmjrd} {"IBM J.~Res.\ Dev.{}"}
1166 MACRO {ibmsj} {"IBM Syst.~J.{}"}
1167 MACRO {ieeese} {"IEEE Trans.\ Softw.\ Eng.{}"}
1168 MACRO {ieeetc} {"IEEE Trans.\ Comput.{}"}
1169 MACRO {ieeetcad}
1170 {"IEEE Trans.\ Comput.-Aided Design Integrated Circuits"}
1171 MACRO {ipl} {"Inf.\ Process.\ Lett.{}"}
1172 MACRO {jacm} {"J.~ACM"}
1173 MACRO {jcss} {"J.~Comput.\ Syst.\ Sci.{}"}
1174 MACRO {scp} {"Sci.\ Comput.\ Programming"}
1175 MACRO {sicomp} {"SIAM J.~Comput.{}"}
1176 MACRO {tocs} {"ACM Trans.\ Comput.\ Syst.{}"}
1177 MACRO {tods} {"ACM Trans.\ Database Syst.{}"}
1178 MACRO {tog} {"ACM Trans.\ Gr.{}"}
1179 MACRO {toms} {"ACM Trans.\ Math.\ Softw.{}"}
1180 MACRO {toois} {"ACM Trans.\ Office Inf.\ Syst.{}"}
1181 MACRO {toplas} {"ACM Trans.\ Prog.\ Lang.\ Syst.{}"}
1182 MACRO {tcs} {"Theoretical Comput.\ Sci.{}"}
1183
1184 READ
1185
1186 FUNCTION {sortify}
1187 { purify$
1188 "l" change.case$
1189 }
1190
1191 INTEGERS { len }
1192
1193 FUNCTION {chop.word}
1194 { 's :=
1195 'len :=
1196 s #1 len substring$ =
1197 { s len #1 + global.max$ substring$ }
1198 's
1199 if$
1200 }
1201
1202 FUNCTION {sort.format.names}
1203 { 's :=
1204 #1 'nameptr :=
1205 ""
1206 s num.names$ 'numnames :=
1207 numnames 'namesleft :=
1208 { namesleft #0 > }
1209 { nameptr #1 >
1210 { " " * }
1211 'skip$
1212 if$
1213 s nameptr "{ll{ }}{ f{ }}{vv{ } }{ jj{ }}" format.name$ 't :=
1214 nameptr numnames = t "others" = and
1215 { "et al" * }
1216 { t sortify * }
1217 if$
1218 nameptr #1 + 'nameptr :=
1219 namesleft #1 - 'namesleft :=
1220 }
1221 while$
1222 }
1223
1224 FUNCTION {sort.format.title}
1225 { 't :=
1226 "A " #2
1227 "An " #3
1228 "The " #4 t chop.word
1229 chop.word
1230 chop.word
1231 sortify
1232 #1 global.max$ substring$
1233 }
1234
1235 FUNCTION {author.sort}
1236 { author empty$
1237 { key empty$
1238 { "to sort, need author or key in " cite$ * warning$
1239 ""
1240 }
1241 { key sortify }
1242 if$
1243 }
1244 { author sort.format.names }
1245 if$
1246 }
1247
1248 FUNCTION {author.editor.sort}
1249 { author empty$
1250 { editor empty$
1251 { key empty$
1252 { "to sort, need author, editor, or key in " cite$ * warning$
1253 ""
1254 }
1255 { key sortify }
1256 if$
1257 }
1258 { editor sort.format.names }
1259 if$
1260 }
1261 { author sort.format.names }
1262 if$
1263 }
1264
1265 FUNCTION {author.organization.sort}
1266 { author empty$
1267 { organization empty$
1268 { key empty$
1269 { "to sort, need author, organization, or key in " cite$ * warning$
1270 ""
1271 }
1272 { key sortify }
1273 if$
1274 }
1275 { "The " #4 organization chop.word sortify }
1276 if$
1277 }
1278 { author sort.format.names }
1279 if$
1280 }
1281
1282 FUNCTION {editor.organization.sort}
1283 { editor empty$
1284 { organization empty$
1285 { key empty$
1286 { "to sort, need editor, organization, or key in " cite$ * warning$
1287 ""
1288 }
1289 { key sortify }
1290 if$
1291 }
1292 { "The " #4 organization chop.word sortify }
1293 if$
1294 }
1295 { editor sort.format.names }
1296 if$
1297 }
1298
1299 FUNCTION {presort}
1300 {
1301 type$ "book" =
1302 type$ "inbook" =
1303 or
1304 'author.editor.sort
1305 { type$ "proceedings" =
1306 'editor.organization.sort
1307 { type$ "manual" =
1308 'author.organization.sort
1309 'author.sort
1310 if$
1311 }
1312 if$
1313 }
1314 if$
1315 " "
1316 *
1317 year field.or.null sortify
1318 *
1319 " "
1320 *
1321 title field.or.null
1322 sort.format.title
1323 *
1324 #1 entry.max$ substring$
1325 'sort.key$ :=
1326 }
1327
1328 ITERATE {presort}
1329
1330 SORT
1331
1332 STRINGS { longest.label }
1333
1334 INTEGERS { number.label longest.label.width }
1335
1336 FUNCTION {initialize.longest.label}
1337 { "" 'longest.label :=
1338 #1 'number.label :=
1339 #0 'longest.label.width :=
1340 }
1341
1342 FUNCTION {longest.label.pass}
1343 { number.label int.to.str$ 'label :=
1344 number.label #1 + 'number.label :=
1345 label width$ longest.label.width >
1346 { label 'longest.label :=
1347 label width$ 'longest.label.width :=
1348 }
1349 'skip$
1350 if$
1351 }
1352
1353 EXECUTE {initialize.longest.label}
1354
1355 ITERATE {longest.label.pass}
1356
1357 FUNCTION {begin.bib}
1358 {
1359 preamble$ empty$
1360 'skip$
1361 { preamble$ write$ newline$ }
1362 if$
1363 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1364 " \providebibliographyfont{name}{}%" write$ newline$
1365 " \providebibliographyfont{lastname}{}%" write$ newline$
1366 " \providebibliographyfont{title}{\emph}%" write$ newline$
1367 " \providebibliographyfont{jtitle}{\btxtitlefont}%" write$ newline$
1368 " \providebibliographyfont{etal}{\emph}%" write$ newline$
1369 " \providebibliographyfont{journal}{}%" write$ newline$
1370 " \providebibliographyfont{volume}{}%" write$ newline$
1371 " \providebibliographyfont{ISBN}{\MakeUppercase}%" write$ newline$
1372 " \providebibliographyfont{ISSN}{\MakeUppercase}%" write$ newline$
1373 " \providebibliographyfont{url}{\url}%" write$ newline$
1374 " \providebibliographyfont{numeral}{}%" write$ newline$
1375 " \expandafter\btxselectlanguage\expandafter {\btxfallbacklanguage}"
1376 write$ newline$
1377 }
1378
1379 EXECUTE {begin.bib}
1380
1381 EXECUTE {init.state.consts}
1382
1383 ITERATE {call.type$}
1384
1385 FUNCTION {end.bib}
1386 { newline$
1387 "\end{thebibliography}" write$ newline$
1388 }
1389
1390 EXECUTE {end.bib}
1391