Debian Codegraph @

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

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