Debian Codegraph @

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

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