Debian Codegraph @

texmf-dist/bibtex/bst/babelbib/bababbr3-lf.bst

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