Debian Codegraph @

texmf-dist/bibtex/bst/bath-bst/bathx.bst

raw
1 %%
2 %% This is file `bathx.bst',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% bath-bst.dtx (with options: `bst2')
8 %% ----------------------------------------------------------------
9 %% bath-bst --- Harvard referencing style as recommended by the University of Bath Library
10 %% Author: Alex Ball
11 %% E-mail: [email protected]
12 %% License: Released under the LaTeX Project Public License v1.3c or later
13 %% See: http://www.latex-project.org/lppl.txt
14 %% ----------------------------------------------------------------
15 %%
16 ENTRY
17 { address
18 archive
19 author
20 booktitle
21 casenumber
22 chapter
23 doi
24 edition
25 editor
26 eid
27 entrysubtype
28 eprint
29 eventyear
30 howpublished
31 institution
32 journal
33 key
34 keywords
35 language
36 library
37 month
38 nameaddon
39 note
40 number
41 options
42 organization
43 pages
44 publisher
45 pubstate
46 school
47 series
48 shortauthor
49 shorteditor
50 sortyear
51 title
52 titleaddon
53 translator
54 type
55 url
56 urldate
57 urlyear
58 userb
59 venue
60 version
61 volume
62 year
63 }
64 { cite.initials disamb.names }
65 { label label.source extra.label sort.label short.list }
66 INTEGERS {
67 output.state before.all mid.clause mid.sentence after.sentence after.block
68 online.shown
69 }
70 FUNCTION {init.state.consts}
71 { #0 'before.all :=
72 #1 'mid.clause :=
73 #2 'mid.sentence :=
74 #3 'after.sentence :=
75 #4 'after.block :=
76 }
77 STRINGS { s t field abbrev }
78 FUNCTION {output.nonnull}
79 { 's :=
80 output.state mid.sentence =
81 { ", " * write$ }
82 { output.state after.sentence =
83 { add.period$ " " * write$ }
84 { output.state before.all =
85 'write$
86 { output.state mid.clause =
87 { " " * write$ }
88 { add.period$ write$
89 newline$
90 "\newblock " write$
91 }
92 if$
93 }
94 if$
95 }
96 if$
97 mid.sentence 'output.state :=
98 }
99 if$
100 s
101 }
102 FUNCTION {end.clause}
103 { output.state mid.clause =
104 { mid.sentence 'output.state := }
105 'skip$
106 if$
107 }
108 FUNCTION {output}
109 { duplicate$ empty$
110 { pop$ end.clause }
111 'output.nonnull
112 if$
113 }
114 FUNCTION {output.check}
115 { 't :=
116 duplicate$ empty$
117 { pop$ "empty " t * " in " * cite$ * warning$
118 end.clause
119 }
120 'output.nonnull
121 if$
122 }
123 FUNCTION {new.block}
124 { output.state before.all =
125 'skip$
126 { after.block 'output.state := }
127 if$
128 }
129 FUNCTION {new.sentence}
130 { output.state after.block =
131 'skip$
132 { output.state before.all =
133 'skip$
134 { after.sentence 'output.state := }
135 if$
136 }
137 if$
138 }
139 FUNCTION {continue.clause}
140 { output.state after.sentence =
141 'skip$
142 { output.state after.block =
143 'skip$
144 { output.state before.all =
145 'skip$
146 { mid.clause 'output.state := }
147 if$
148 }
149 if$
150 }
151 if$
152 }
153 FUNCTION {date.block}
154 { new.block
155 }
156 FUNCTION {bibinfo.check}
157 { swap$
158 duplicate$ missing$
159 { pop$ pop$
160 ""
161 }
162 { duplicate$ empty$
163 { swap$ pop$
164 }
165 { swap$
166 "\bibinfo{" swap$ * "}{" * swap$ * "}" *
167 }
168 if$
169 }
170 if$
171 }
172 FUNCTION {bibinfo.warn}
173 { swap$
174 duplicate$ missing$
175 { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
176 ""
177 }
178 { duplicate$ empty$
179 { swap$ "empty " swap$ * " in " * cite$ * warning$
180 }
181 { swap$
182 "\bibinfo{" swap$ * "}{" * swap$ * "}" *
183 }
184 if$
185 }
186 if$
187 }
188 FUNCTION {fin.entry}
189 { add.period$
190 write$
191 newline$
192 }
193
194 FUNCTION {not}
195 { { #0 }
196 { #1 }
197 if$
198 }
199 FUNCTION {and}
200 { 'skip$
201 { pop$ #0 }
202 if$
203 }
204 FUNCTION {or}
205 { { pop$ #1 }
206 'skip$
207 if$
208 }
209 FUNCTION {new.block.checkb}
210 { empty$
211 swap$ empty$
212 and
213 'skip$
214 'new.block
215 if$
216 }
217 FUNCTION {field.or.null}
218 { duplicate$ empty$
219 { pop$ "" }
220 'skip$
221 if$
222 }
223 FUNCTION {emphasize}
224 { duplicate$ empty$
225 { pop$ "" }
226 { "\emph{" swap$ * "}" * }
227 if$
228 }
229 FUNCTION {tie.or.space.prefix}
230 { duplicate$ text.length$ #3 <
231 { "~" }
232 { " " }
233 if$
234 swap$
235 }
236 FUNCTION {capitalize}
237 { "u" change.case$ "t" change.case$ }
238 FUNCTION {space.word}
239 { " " swap$ * " " * }
240 FUNCTION {either.or.check}
241 { empty$
242 'pop$
243 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
244 if$
245 }
246 FUNCTION {is.online}
247 { online.shown
248 { #0 }
249 { url empty$
250 doi empty$ and
251 urldate empty$ and
252 urlyear empty$ and
253 { type$ "online" =
254 { #1 }
255 { #0 }
256 if$
257 }
258 { #1 }
259 if$
260 }
261 if$
262 }
263 FUNCTION {bbl.and}
264 { "and"}
265
266 FUNCTION {bbl.byeditor}
267 { "Ed. by" }
268
269 FUNCTION {bbl.etal}
270 { "et~al." }
271
272 FUNCTION {bbl.editors}
273 { "eds" }
274
275 FUNCTION {bbl.editor}
276 { "ed." }
277
278 FUNCTION {bbl.edby}
279 { "edited by" }
280
281 FUNCTION {bbl.translator}
282 { "Trans." }
283
284 FUNCTION {bbl.edition}
285 { "ed." }
286
287 FUNCTION {bbl.volume}
288 { "vol." }
289
290 FUNCTION {bbl.of}
291 { "of" }
292
293 FUNCTION {bbl.number}
294 { "no." }
295
296 FUNCTION {bbl.nr}
297 { "no." }
298
299 FUNCTION {bbl.in}
300 { "in" }
301
302 FUNCTION {bbl.pages}
303 { "pp." }
304
305 FUNCTION {bbl.page}
306 { "p." }
307
308 FUNCTION {bbl.chapter}
309 { "chap." }
310
311 FUNCTION {bbl.techrep}
312 { "Tech. Rep." }
313
314 FUNCTION {bbl.mthesis}
315 { "Master's thesis" }
316
317 FUNCTION {bbl.phdthesis}
318 { "Ph.D. thesis" }
319
320 FUNCTION {bbl.first}
321 { "1st" }
322
323 FUNCTION {bbl.second}
324 { "2nd" }
325
326 FUNCTION {bbl.third}
327 { "3rd" }
328
329 FUNCTION {bbl.fourth}
330 { "4th" }
331
332 FUNCTION {bbl.fifth}
333 { "5th" }
334
335 FUNCTION {bbl.st}
336 { "st" }
337
338 FUNCTION {bbl.nd}
339 { "nd" }
340
341 FUNCTION {bbl.rd}
342 { "rd" }
343
344 FUNCTION {bbl.th}
345 { "th" }
346
347 FUNCTION {bbl.commission}
348 { "Commission Decision" }
349
350 FUNCTION {bbl.online}
351 { "[Online]" }
352
353 FUNCTION {bbl.nodate}
354 { "n.d." }
355
356 FUNCTION {bbl.inpreparation}
357 { "preprint" }
358
359 FUNCTION {bbl.submitted}
360 { "preprint" }
361
362 FUNCTION {bbl.inpress}
363 { "in press" }
364
365 FUNCTION {bbl.unpublished}
366 { "Unpublished" }
367
368 MACRO {jan} {"January"}
369
370 MACRO {feb} {"February"}
371
372 MACRO {mar} {"March"}
373
374 MACRO {apr} {"April"}
375
376 MACRO {may} {"May"}
377
378 MACRO {jun} {"June"}
379
380 MACRO {jul} {"July"}
381
382 MACRO {aug} {"August"}
383
384 MACRO {sep} {"September"}
385
386 MACRO {oct} {"October"}
387
388 MACRO {nov} {"November"}
389
390 MACRO {dec} {"December"}
391
392 FUNCTION {eng.ord}
393 { duplicate$ "1" swap$ *
394 #-2 #1 substring$ "1" =
395 { bbl.th * }
396 { duplicate$ #-1 #1 substring$
397 duplicate$ "1" =
398 { pop$ bbl.st * }
399 { duplicate$ "2" =
400 { pop$ bbl.nd * }
401 { "3" =
402 { bbl.rd * }
403 { bbl.th * }
404 if$
405 }
406 if$
407 }
408 if$
409 }
410 if$
411 }
412 FUNCTION {word.in}
413 { bbl.in capitalize
414 ":" *
415 " " * }
416
417 INTEGERS { nameptr namesleft numnames }
418 FUNCTION {format.full.names}
419 { 's :=
420 "" 't :=
421 #1 'nameptr :=
422 s num.names$ 'numnames :=
423 numnames 'namesleft :=
424 { namesleft #0 > }
425 { s nameptr
426 duplicate$ #1 =
427 cite.initials
428 and
429 { "{ll}{, jj}{, f{.}.}{~vv}" }
430 { "{ll}" }
431 if$
432 format.name$
433 't :=
434 nameptr #1 >
435 { namesleft #1 >
436 { ", " * t * }
437 { s nameptr "{ll}" format.name$ duplicate$ "others" =
438 { 't := }
439 { pop$ }
440 if$
441 t "others" =
442 { " " * bbl.etal *
443 }
444 { bbl.and
445 space.word * t *
446 }
447 if$
448 }
449 if$
450 }
451 't
452 if$
453 nameptr #1 + 'nameptr :=
454 namesleft #1 - 'namesleft :=
455 }
456 while$
457 }
458 FUNCTION {author.editor.key.full}
459 { shortauthor empty$
460 { author empty$
461 { shorteditor empty$
462 { editor empty$
463 { key empty$
464 { cite$ #1 #3 substring$ }
465 'key
466 if$
467 }
468 { editor format.full.names }
469 if$
470 }
471 { shorteditor format.full.names }
472 if$
473 }
474 { author format.full.names }
475 if$
476 }
477 { shortauthor format.full.names }
478 if$
479 }
480 FUNCTION {editor.key.full}
481 { shorteditor empty$
482 { editor empty$
483 { key empty$
484 { cite$ #1 #3 substring$ }
485 'key
486 if$
487 }
488 { editor format.full.names }
489 if$
490 }
491 { shorteditor format.full.names }
492 if$
493 }
494 FUNCTION {author.key.full}
495 { shortauthor empty$
496 { author empty$
497 { key empty$
498 { cite$ #1 #3 substring$ }
499 'key
500 if$
501 }
502 { author format.full.names }
503 if$
504 }
505 { shortauthor format.full.names }
506 if$
507 }
508 FUNCTION {make.full.names}
509 { type$ "book" =
510 type$ "inbook" =
511 or
512 'author.editor.key.full
513 { type$ "proceedings" =
514 'editor.key.full
515 'author.key.full
516 if$
517 }
518 if$
519 }
520 FUNCTION {format.lab.names}
521 { 's :=
522 "" 't :=
523 #1 'nameptr :=
524 s num.names$ 'numnames :=
525 numnames 'namesleft :=
526 { namesleft #0 > }
527 { s nameptr
528 duplicate$ #1 =
529 cite.initials
530 and
531 { "{ll}{, jj}{, f{.}.}{~vv}" }
532 { "{ll}" }
533 if$
534 format.name$
535 't :=
536 nameptr #1 >
537 { nameptr #2 disamb.names + =
538 numnames #3 > and
539 { "others" 't :=
540 #1 'namesleft := }
541 'skip$
542 if$
543 namesleft #1 >
544 { ", " * t * }
545 { s nameptr "{ll}" format.name$ duplicate$ "others" =
546 { 't := }
547 { pop$ }
548 if$
549 t "others" =
550 { " " * bbl.etal *
551 }
552 { bbl.and
553 space.word * t *
554 }
555 if$
556 }
557 if$
558 }
559 't
560 if$
561 nameptr #1 + 'nameptr :=
562 namesleft #1 - 'namesleft :=
563 }
564 while$
565 }
566 FUNCTION {title.label}
567 { title
568 duplicate$ 'label.source :=
569 "t" change.case$
570 type$ duplicate$
571 "book" = swap$
572 "collection" =
573 or
574 'emphasize
575 {
576 type$ duplicate$
577 "techreport" = swap$
578 "report" =
579 or
580 'emphasize
581 {
582 type$ duplicate$ duplicate$ duplicate$
583 duplicate$ duplicate$ duplicate$ duplicate$
584 "manual" = swap$
585 "dataset" =
586 or swap$
587 "electronic" =
588 or swap$
589 "online" =
590 or swap$
591 "patent" =
592 or swap$
593 "software" =
594 or swap$
595 "standard" =
596 or swap$
597 "www" =
598 or
599 'emphasize
600 {
601 type$ duplicate$ duplicate$ duplicate$ duplicate$
602 "booklet" = swap$
603 "audio" =
604 or swap$
605 "movie" =
606 or swap$
607 "music" =
608 or swap$
609 "video" =
610 or
611 { type duplicate$ empty$
612 { pop$ emphasize }
613 { duplicate$ "TV" = swap$ "Radio" = or
614 'skip$
615 'emphasize
616 if$
617 }
618 if$
619 }
620 {
621 type$ "image" =
622 'emphasize
623 {
624 type$ "jurisdiction" =
625 'emphasize
626 {
627 type$ "legislation" =
628 { journal empty$
629 'emphasize
630 'skip$
631 if$
632 }
633 {
634 type$ "proceedings" =
635 'emphasize
636 {
637 type$ "unpublished" =
638 booktitle empty$
639 and
640 'emphasize
641 {}
642 if$
643 } if$
644 } if$
645 } if$
646 } if$
647 } if$
648 } if$
649 } if$
650 } if$
651 }
652 FUNCTION {author.editor.key.label}
653 { shortauthor empty$
654 { author empty$
655 { shorteditor empty$
656 { editor empty$
657 { key empty$
658 { title empty$
659 { cite$
660 duplicate$ 'label.source :=
661 #1 #3 substring$
662 }
663 'title.label
664 if$
665 }
666 { key
667 duplicate$ 'label.source :=
668 }
669 if$
670 }
671 { editor
672 duplicate$ 'label.source :=
673 format.lab.names
674 }
675 if$
676 }
677 { shorteditor
678 duplicate$ 'label.source :=
679 format.lab.names
680 }
681 if$
682 }
683 { author
684 duplicate$ 'label.source :=
685 format.lab.names
686 }
687 if$
688 }
689 { shortauthor
690 duplicate$ 'label.source :=
691 format.lab.names
692 }
693 if$
694 }
695 FUNCTION {editor.key.label}
696 { shorteditor empty$
697 { editor empty$
698 { key empty$
699 { title empty$
700 { cite$
701 duplicate$ 'label.source :=
702 #1 #3 substring$
703 }
704 'title.label
705 if$
706 }
707 { key
708 duplicate$ 'label.source :=
709 }
710 if$
711 }
712 { editor
713 duplicate$ 'label.source :=
714 format.lab.names
715 }
716 if$
717 }
718 { shorteditor
719 duplicate$ 'label.source :=
720 format.lab.names
721 }
722 if$
723 }
724 FUNCTION {author.key.label}
725 { shortauthor empty$
726 { author empty$
727 { key empty$
728 { type$ "inreference" =
729 booktitle empty$ not
730 and
731 { booktitle
732 duplicate$ 'label.source :=
733 }
734 { title empty$
735 { cite$
736 duplicate$ 'label.source :=
737 #1 #3 substring$
738 }
739 'title.label
740 if$
741 }
742 if$
743 }
744 { key
745 duplicate$ 'label.source :=
746 }
747 if$
748 }
749 { author
750 duplicate$ 'label.source :=
751 format.lab.names
752 }
753 if$
754 }
755 { shortauthor
756 duplicate$ 'label.source :=
757 format.lab.names
758 }
759 if$
760 }
761 FUNCTION {calc.short.authors}
762 { type$ "book" =
763 type$ "inbook" =
764 or
765 'author.editor.key.label
766 { type$ "proceedings" =
767 'editor.key.label
768 'author.key.label
769 if$
770 }
771 if$
772 'short.list :=
773 }
774 FUNCTION {format.names}
775 { 'field :=
776 duplicate$ empty$
777 'skip$
778 { 's :=
779 "" 't :=
780 #1 'nameptr :=
781 s num.names$ 'numnames :=
782 numnames 'namesleft :=
783 { namesleft #0 > }
784 { s nameptr
785 "{ll}{, jj}{, f{.}.}{~vv}"
786 format.name$
787 field bibinfo.check
788 't :=
789 nameptr #1 >
790 { namesleft #1 >
791 { ", " * t * }
792 { s nameptr "{ll}" format.name$ duplicate$ "others" =
793 { 't := }
794 { pop$ }
795 if$
796 t "others" =
797 { " " * bbl.etal *
798 }
799 { bbl.and
800 space.word * t *
801 }
802 if$
803 }
804 if$
805 }
806 't
807 if$
808 nameptr #1 + 'nameptr :=
809 namesleft #1 - 'namesleft :=
810 }
811 while$
812 }
813 if$
814 }
815 FUNCTION {format.names.short}
816 { 'field :=
817 duplicate$ empty$
818 { pop$ field format.names }
819 { 'abbrev :=
820 duplicate$ empty$
821 'skip$
822 { 's :=
823 "" 't :=
824 #1 'nameptr :=
825 s num.names$ duplicate$ 'numnames :=
826 abbrev num.names$ =
827 { numnames 'namesleft :=
828 { namesleft #0 > }
829 { abbrev nameptr "{ll}{, jj}{, f{.}.}{~vv}" format.name$
830 't :=
831 s nameptr "{ll}{, jj}{, f{.}.}{~vv}" format.name$
832 duplicate$ t =
833 { field bibinfo.check 't := }
834 { " (" swap$ * ")" *
835 t field bibinfo.check swap$ *
836 't :=
837 }
838 if$
839 nameptr #1 >
840 { namesleft #1 >
841 { ", " * t * }
842 { s nameptr "{ll}" format.name$ duplicate$ "others" =
843 { 't := }
844 { pop$ }
845 if$
846 t "others" =
847 { " " * bbl.etal *
848 }
849 { bbl.and
850 space.word * t *
851 }
852 if$
853 }
854 if$
855 }
856 't
857 if$
858 nameptr #1 + 'nameptr :=
859 namesleft #1 - 'namesleft :=
860 }
861 while$
862 }
863 { s field format.names }
864 if$
865 }
866 if$
867 }
868 if$
869 }
870 FUNCTION {format.names.ed}
871 { 'field :=
872 duplicate$ empty$
873 'skip$
874 { 's :=
875 "" 't :=
876 #1 'nameptr :=
877 s num.names$ 'numnames :=
878 numnames 'namesleft :=
879 { namesleft #0 > }
880 { s nameptr
881 "{f{.}.~}{vv~}{ll}{ jj}"
882 format.name$
883 field bibinfo.check
884 't :=
885 nameptr #1 >
886 { namesleft #1 >
887 { ", " * t * }
888 { s nameptr "{ll}" format.name$ duplicate$ "others" =
889 { 't := }
890 { pop$ }
891 if$
892 t "others" =
893 { " " * bbl.etal *
894 }
895 { bbl.and
896 space.word * t *
897 }
898 if$
899 }
900 if$
901 }
902 't
903 if$
904 nameptr #1 + 'nameptr :=
905 namesleft #1 - 'namesleft :=
906 }
907 while$
908 }
909 if$
910 }
911 FUNCTION {format.authors}
912 { author shortauthor "author" format.names.short
913 }
914 FUNCTION {format.byeditors}
915 { editor "editor" format.names.ed duplicate$ empty$ 'skip$
916 { bbl.byeditor
917 " " *
918 swap$ *
919 }
920 if$
921 }
922 FUNCTION {get.bbl.editor}
923 { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
924 FUNCTION {format.editors}
925 { editor shorteditor "editor" format.names.short duplicate$ empty$ 'skip$
926 { "," *
927 " " *
928 get.bbl.editor
929 *
930 }
931 if$
932 }
933 FUNCTION {format.translators}
934 { translator "translator" format.names.ed duplicate$ empty$ 'skip$
935 { "," *
936 " " *
937 bbl.translator *
938 "(" swap$ *
939 ")" *
940 }
941 if$
942 }
943 FUNCTION {format.key}
944 { empty$
945 { key field.or.null }
946 { "" }
947 if$
948 nameaddon duplicate$ empty$
949 'pop$
950 { swap$ duplicate$ empty$
951 'skip$
952 { " " * }
953 if$
954 swap$ "[" swap$ * * "]" *
955 continue.clause
956 }
957 if$
958 }
959 FUNCTION {select.language}
960 { duplicate$ empty$
961 'pop$
962 { language empty$
963 'skip$
964 { "{\selectlanguage{" language * "}" * swap$ * "}" * }
965 if$
966 }
967 if$
968 }
969 FUNCTION {format.title}
970 { title
971 duplicate$ empty$ 'skip$
972 { "t" change.case$ }
973 if$
974 "title" bibinfo.check
975 duplicate$ empty$
976 'skip$
977 { select.language }
978 if$
979 }
980 FUNCTION {format.btitle}
981 { title
982 duplicate$ empty$ 'skip$
983 { "t" change.case$ }
984 if$
985 "title" bibinfo.check
986 duplicate$ empty$
987 'skip$
988 { emphasize select.language }
989 if$
990 }
991 FUNCTION {format.avtitle}
992 { title
993 duplicate$ empty$ 'skip$
994 { "t" change.case$ }
995 if$
996 "title" bibinfo.check
997 duplicate$ empty$
998 'skip$
999 { type duplicate$ empty$
1000 { pop$ emphasize }
1001 { duplicate$ "TV" = swap$ "Radio" = or
1002 'skip$
1003 'emphasize
1004 if$
1005 }
1006 if$
1007 select.language
1008 }
1009 if$
1010 }
1011 FUNCTION {format.titleaddon}
1012 { titleaddon
1013 duplicate$ empty$ 'skip$
1014 { "[" swap$ "titleaddon" bibinfo.check * "]" * }
1015 if$
1016 }
1017 FUNCTION {format.version}
1018 { version
1019 duplicate$ empty$ 'skip$
1020 { "(v." swap$ *
1021 "version" bibinfo.check
1022 ")" *
1023 }
1024 if$
1025 }
1026 FUNCTION {print.labeltitle.addenda}
1027 { continue.clause
1028 format.titleaddon output
1029 continue.clause
1030 type$ duplicate$ "legislation" = not
1031 swap$ "jurisdiction" = not
1032 and
1033 { format.version output
1034 is.online
1035 { entrysubtype duplicate$ empty$
1036 { pop$
1037 journal empty$
1038 booktitle empty$
1039 type$ "inreference" =
1040 author empty$
1041 and
1042 or
1043 and
1044 library empty$
1045 type$ duplicate$ "image" =
1046 swap$ duplicate$ "audio" =
1047 swap$ duplicate$ "video" =
1048 swap$ duplicate$ "music" =
1049 swap$ "movie" =
1050 or
1051 or
1052 or
1053 or
1054 or
1055 and
1056 series empty$
1057 type field.or.null
1058 duplicate$ "TV" =
1059 swap$ "Radio" =
1060 or not
1061 or
1062 and
1063 { continue.clause
1064 bbl.online output
1065 #1 'online.shown :=
1066 }
1067 'skip$
1068 if$
1069 }
1070 { "entrysubtype" bibinfo.check
1071 "[" swap$ * "]" *
1072 continue.clause output
1073 }
1074 if$
1075 }
1076 'skip$
1077 if$
1078 }
1079 'skip$
1080 if$
1081 }
1082 FUNCTION {print.title.addenda}
1083 { continue.clause
1084 type$ duplicate$ "legislation" = not
1085 swap$ "jurisdiction" = not
1086 and
1087 { format.titleaddon output
1088 continue.clause
1089 }
1090 'skip$
1091 if$
1092 format.version output
1093 is.online
1094 { entrysubtype duplicate$ empty$
1095 type$ duplicate$ "legislation" =
1096 swap$ duplicate$ "jurisdiction" =
1097 swap$ "legal" =
1098 or
1099 or
1100 or
1101 { pop$
1102 journal empty$
1103 booktitle empty$
1104 type$ "inreference" =
1105 author empty$
1106 and
1107 or
1108 and
1109 library empty$
1110 type$ duplicate$ "image" =
1111 swap$ duplicate$ "audio" =
1112 swap$ duplicate$ "video" =
1113 swap$ duplicate$ "music" =
1114 swap$ "movie" =
1115 or
1116 or
1117 or
1118 or
1119 or
1120 and
1121 series empty$
1122 type field.or.null
1123 duplicate$ "TV" =
1124 swap$ "Radio" =
1125 or not
1126 or
1127 and
1128 { continue.clause
1129 bbl.online output
1130 #1 'online.shown :=
1131 }
1132 'skip$
1133 if$
1134 }
1135 { "entrysubtype" bibinfo.check
1136 "[" swap$ * "]" *
1137 continue.clause output
1138 }
1139 if$
1140 }
1141 'skip$
1142 if$
1143 continue.clause
1144 type$ "reference" =
1145 { format.byeditors output }
1146 'skip$
1147 if$
1148 format.translators output
1149 }
1150 FUNCTION {format.label.booktitle}
1151 { booktitle
1152 duplicate$ empty$ 'skip$
1153 { "t" change.case$ }
1154 if$
1155 "booktitle" bibinfo.check
1156 }
1157 FUNCTION {format.booktitle}
1158 { format.label.booktitle
1159 emphasize
1160 }
1161 FUNCTION {format.in.ed.booktitle}
1162 { format.booktitle
1163 duplicate$ empty$
1164 'skip$
1165 {
1166 is.online
1167 { " " *
1168 bbl.online *
1169 #1 'online.shown :=
1170 }
1171 'skip$
1172 if$
1173 editor "editor" format.names.ed duplicate$ empty$ 'pop$
1174 { "," *
1175 " " *
1176 get.bbl.editor add.period$
1177 " " *
1178 * swap$
1179 *
1180 word.in swap$ *
1181 }
1182 if$
1183 }
1184 if$
1185 }
1186 FUNCTION {legal.journal.shape}
1187 { duplicate$ "OJ" =
1188 'emphasize
1189 'skip$
1190 if$
1191 }
1192 FUNCTION {nodate.check}
1193 {
1194 duplicate$ empty$
1195 sortyear empty$
1196 and
1197 { options field.or.null "nonodate" =
1198 'skip$
1199 { pop$ bbl.nodate }
1200 if$
1201 }
1202 'skip$
1203 if$
1204 }
1205 FUNCTION {format.date}
1206 { year "year" bibinfo.check nodate.check
1207 extra.label *
1208 }
1209 FUNCTION {format.date.brackets}
1210 { format.date
1211 "[" swap$ * "]" *
1212 }
1213 FUNCTION {format.date.parens}
1214 { format.date
1215 "(" swap$ * ")" *
1216 }
1217 FUNCTION {format.jur.date.essential}
1218 { options field.or.null "scottish-style" =
1219 keywords field.or.null "sc" =
1220 or
1221 { end.clause format.date }
1222 'format.date.brackets
1223 if$
1224 }
1225 FUNCTION {format.jur.date}
1226 { institution empty$
1227 number empty$
1228 or
1229 { journal field.or.null 's :=
1230 s "OJ" =
1231 s "ECR" =
1232 or
1233 'format.date.brackets
1234 { options field.or.null "year-essential=false" =
1235 'format.date.parens
1236 { volume empty$
1237 'format.jur.date.essential
1238 { options field.or.null "year-essential=true" =
1239 'format.jur.date.essential
1240 'format.date.parens
1241 if$
1242 }
1243 if$
1244 }
1245 if$
1246 }
1247 if$
1248 }
1249 { end.clause format.date }
1250 if$
1251 }
1252 FUNCTION {format.eu.date}
1253 { journal field.or.null 's :=
1254 s "OJ" =
1255 s "ECR" =
1256 or
1257 'format.date.brackets
1258 'format.date
1259 if$
1260 }
1261 FUNCTION {format.series}
1262 { series
1263 duplicate$ empty$ 'skip$
1264 { "t" change.case$ }
1265 if$
1266 "series" bibinfo.check
1267 }
1268 FUNCTION {format.bvolume}
1269 { volume empty$
1270 { "" }
1271 { bbl.volume volume tie.or.space.prefix
1272 "volume" bibinfo.check * *
1273 format.series
1274 duplicate$ empty$ 'pop$
1275 { emphasize ", " * swap$ * }
1276 if$
1277 "volume and number" number either.or.check
1278 }
1279 if$
1280 }
1281 FUNCTION {format.number.series}
1282 { volume empty$
1283 { number empty$
1284 { series field.or.null }
1285 { series empty$
1286 { number "number" bibinfo.check }
1287 { format.series
1288 number tie.or.space.prefix "number" bibinfo.check * *
1289 }
1290 if$
1291 }
1292 if$
1293 }
1294 { "" }
1295 if$
1296 }
1297 FUNCTION {format.series.episode}
1298 { series
1299 duplicate$ empty$
1300 'skip$
1301 { "t" change.case$ }
1302 if$
1303 "series" bibinfo.check emphasize
1304 number "number" bibinfo.check emphasize
1305 duplicate$ empty$
1306 { * }
1307 { swap$
1308 duplicate$ empty$
1309 { * }
1310 { ", " * swap$ * }
1311 if$
1312 }
1313 if$
1314 }
1315 FUNCTION {is.num}
1316 { chr.to.int$
1317 duplicate$ "0" chr.to.int$ < not
1318 swap$ "9" chr.to.int$ > not and
1319 }
1320 FUNCTION {extract.num}
1321 { duplicate$ 't :=
1322 "" 's :=
1323 { t empty$ not }
1324 { t #1 #1 substring$
1325 t #2 global.max$ substring$ 't :=
1326 duplicate$ is.num
1327 { s swap$ * 's := }
1328 { pop$ "" 't := }
1329 if$
1330 }
1331 while$
1332 s empty$
1333 'skip$
1334 { pop$ s }
1335 if$
1336 }
1337 FUNCTION {convert.edition}
1338 { extract.num "l" change.case$ 's :=
1339 s "first" = s "1" = or
1340 { bbl.first 't := }
1341 { s "second" = s "2" = or
1342 { bbl.second 't := }
1343 { s "third" = s "3" = or
1344 { bbl.third 't := }
1345 { s "fourth" = s "4" = or
1346 { bbl.fourth 't := }
1347 { s "fifth" = s "5" = or
1348 { bbl.fifth 't := }
1349 { s #1 #1 substring$ is.num
1350 { s eng.ord 't := }
1351 { edition 't := }
1352 if$
1353 }
1354 if$
1355 }
1356 if$
1357 }
1358 if$
1359 }
1360 if$
1361 }
1362 if$
1363 t
1364 }
1365 FUNCTION {format.edition}
1366 { edition duplicate$ empty$ 'skip$
1367 { convert.edition
1368 output.state mid.sentence =
1369 { "l" }
1370 { "t" }
1371 if$ change.case$
1372 "edition" bibinfo.check
1373 " " * bbl.edition *
1374 }
1375 if$
1376 }
1377 FUNCTION {format.thesis.type}
1378 { type duplicate$ empty$
1379 'pop$
1380 { swap$ pop$
1381 "t" change.case$ "type" bibinfo.check
1382 }
1383 if$
1384 }
1385 FUNCTION {add.cmd.number}
1386 { ". " swap$ "number" bibinfo.check *
1387 }
1388 FUNCTION {format.legr.number}
1389 { series field.or.null 's :=
1390 s "C" =
1391 'add.cmd.number
1392 { s "Cd" =
1393 'add.cmd.number
1394 { s "Cmd" =
1395 'add.cmd.number
1396 { s "Cmnd" =
1397 'add.cmd.number
1398 { s "Cm" =
1399 'add.cmd.number
1400 { s purify$ #1 #3 substring$ 't :=
1401 t "HL " =
1402 { ", (" swap$
1403 "number" bibinfo.check *
1404 ")" *
1405 }
1406 { ", " swap$
1407 "number" bibinfo.check *
1408 }
1409 if$
1410 }
1411 if$
1412 }
1413 if$
1414 }
1415 if$
1416 }
1417 if$
1418 }
1419 if$
1420 }
1421 FUNCTION {format.tr.number}
1422 { series duplicate$ empty$
1423 { pop$
1424 type duplicate$ empty$
1425 { pop$
1426 number duplicate$ empty$
1427 { pop$ ""
1428 }
1429 { "(" swap$
1430 "number" bibinfo.check
1431 * ")" *
1432 }
1433 if$
1434 }
1435 { "(" swap$
1436 "t" change.case$ "type" bibinfo.check
1437 *
1438 number duplicate$ empty$
1439 'pop$
1440 { tie.or.space.prefix
1441 "number" bibinfo.check
1442 * *
1443 }
1444 if$
1445 ")" *
1446 }
1447 if$
1448 }
1449 { "t" change.case$ "(" swap$ *
1450 type duplicate$ empty$
1451 { pop$
1452 number duplicate$ empty$
1453 'pop$
1454 { format.legr.number * }
1455 if$
1456 }
1457 { "t" change.case$ "type" bibinfo.check
1458 *
1459 number duplicate$ empty$
1460 'pop$
1461 { tie.or.space.prefix
1462 "number" bibinfo.check
1463 * *
1464 }
1465 if$
1466 }
1467 if$
1468 ")" *
1469 continue.clause
1470 }
1471 if$
1472 }
1473 FUNCTION {format.manual.number}
1474 { series duplicate$ empty$
1475 { pop$
1476 type duplicate$ empty$
1477 { pop$
1478 number duplicate$ empty$
1479 { pop$ ""
1480 }
1481 { "number" bibinfo.check
1482 }
1483 if$
1484 }
1485 { "t" change.case$ "type" bibinfo.check
1486 number duplicate$ empty$
1487 'pop$
1488 { tie.or.space.prefix
1489 "number" bibinfo.check
1490 * *
1491 }
1492 if$
1493 }
1494 if$
1495 }
1496 { "t" change.case$
1497 number duplicate$ empty$
1498 'pop$
1499 { "number" bibinfo.check
1500 ", " swap$ * *
1501 }
1502 if$
1503 type duplicate$ empty$
1504 'pop$
1505 { ". " swap$ *
1506 "t" change.case$ "type" bibinfo.check
1507 *
1508 }
1509 if$
1510 }
1511 if$
1512 }
1513 FUNCTION {format.chapter}
1514 { chapter duplicate$ empty$
1515 { pop$ "" }
1516 { "chapter" bibinfo.check
1517 "c." swap$ *
1518 }
1519 if$
1520 }
1521 FUNCTION {format.series.number.chapter}
1522 { series duplicate$ empty$
1523 { pop$ "(" }
1524 { "series" bibinfo.check
1525 "(" swap$ *
1526 }
1527 if$
1528 type duplicate$ empty$
1529 { pop$
1530 number duplicate$ empty$
1531 'pop$
1532 { "number" bibinfo.check
1533 swap$ duplicate$ "(" =
1534 { swap$ * }
1535 { ", " * swap$ * }
1536 if$
1537 }
1538 if$
1539 chapter duplicate$ empty$
1540 'pop$
1541 { "chapter" bibinfo.check
1542 swap$ duplicate$ "(" =
1543 { swap$ * }
1544 { ", c." * swap$ * }
1545 if$
1546 }
1547 if$
1548 }
1549 { "type" bibinfo.check
1550 swap$ duplicate$ "(" =
1551 { swap$ * }
1552 { ", " * swap$ * }
1553 if$
1554 number duplicate$ empty$
1555 { pop$
1556 chapter duplicate$ empty$
1557 'pop$
1558 { "chapter" bibinfo.check
1559 " c." swap$ * *
1560 }
1561 if$
1562 }
1563 { "number" bibinfo.check
1564 " " swap$ * *
1565 chapter duplicate$ empty$
1566 'pop$
1567 { "chapter" bibinfo.check
1568 ", c." swap$ * *
1569 }
1570 if$
1571 }
1572 if$
1573 }
1574 if$
1575 ")" *
1576 duplicate$ "()" =
1577 { pop$ "" }
1578 'skip$
1579 if$
1580 }
1581 FUNCTION {format.case.number}
1582 { number field.or.null 's :=
1583 s empty$
1584 { casenumber field.or.null 's := }
1585 'skip$
1586 if$
1587 s empty$
1588 { "" }
1589 { institution field.or.null duplicate$ empty$
1590 { pop$
1591 s "number" bibinfo.check
1592 "(" swap$ * ")" *
1593 }
1594 { "Commission" =
1595 { userb field.or.null 's :=
1596 s empty$
1597 { casenumber field.or.null 's := }
1598 'skip$
1599 if$
1600 s duplicate$ empty$
1601 { "" }
1602 { "(" swap$ * ")" * " " }
1603 if$
1604 number duplicate$ empty$
1605 { pop$ pop$ }
1606 { bbl.commission " " *
1607 swap$ * * *
1608 }
1609 if$
1610 }
1611 { "" }
1612 if$
1613 }
1614 if$
1615 }
1616 if$
1617 }
1618 FUNCTION {case.check}
1619 { institution duplicate$ empty$
1620 { pop$ continue.clause }
1621 { "Commission" =
1622 'continue.clause
1623 'new.block
1624 if$
1625 }
1626 if$
1627 }
1628 FUNCTION {eu.case.check}
1629 { journal field.or.null "OJ" =
1630 number empty$ not
1631 or
1632 casenumber empty$ not
1633 or
1634 'continue.clause
1635 'new.block
1636 if$
1637 }
1638 FUNCTION {format.note}
1639 { note empty$
1640 { "" }
1641 { note #1 #1 substring$
1642 duplicate$ "{" =
1643 'skip$
1644 { output.state mid.sentence =
1645 output.state mid.clause =
1646 or
1647 { "l" }
1648 { "u" }
1649 if$
1650 change.case$
1651 }
1652 if$
1653 note #2 global.max$ substring$ * "note" bibinfo.check
1654 }
1655 if$
1656 }
1657 FUNCTION {prepend.address}
1658 { 't :=
1659 ""
1660 address empty$ t empty$ and
1661 'skip$
1662 { address "address" bibinfo.check *
1663 t empty$
1664 'skip$
1665 { address empty$
1666 'skip$
1667 { ": " * }
1668 if$
1669 t *
1670 }
1671 if$
1672 }
1673 if$
1674 }
1675 FUNCTION {format.publisher.address}
1676 { publisher "publisher" bibinfo.warn prepend.address
1677 }
1678 FUNCTION {format.organization.address}
1679 { publisher empty$
1680 { organization "organization" bibinfo.check prepend.address }
1681 { publisher "publisher" bibinfo.warn prepend.address
1682 organization duplicate$ empty$
1683 'pop$
1684 { "organization" bibinfo.check ". " * swap$ * }
1685 if$
1686 }
1687 if$
1688 }
1689 FUNCTION {format.institution.address}
1690 { publisher empty$
1691 { institution "institution" bibinfo.check prepend.address }
1692 { publisher "publisher" bibinfo.warn prepend.address
1693 institution duplicate$ empty$
1694 'pop$
1695 { "institution" bibinfo.check ". " * swap$ * }
1696 if$
1697 }
1698 if$
1699 }
1700 FUNCTION {format.library}
1701 { library "library" bibinfo.check
1702 emphasize
1703 duplicate$ empty$ not
1704 is.online
1705 and
1706 journal empty$
1707 and
1708 { " " * bbl.online *
1709 #1 'online.shown :=
1710 }
1711 'skip$
1712 if$
1713 }
1714 FUNCTION {format.img.library}
1715 { library "library" bibinfo.check
1716 }
1717 FUNCTION {format.img.library.address}
1718 { library duplicate$ empty$
1719 { pop$
1720 institution duplicate$ empty$
1721 'skip$
1722 { "institution" bibinfo.check }
1723 if$
1724 }
1725 { "library" bibinfo.check }
1726 if$
1727 duplicate$ empty$
1728 { address "address" bibinfo.check * }
1729 { address duplicate$ empty$
1730 'pop$
1731 { "address" bibinfo.check
1732 swap$ ", " * swap$ *
1733 }
1734 if$
1735 }
1736 if$
1737 }
1738 FUNCTION {format.pub.org.lib.address}
1739 { publisher duplicate$ empty$
1740 { pop$
1741 organization duplicate$ empty$
1742 { pop$
1743 format.img.library.address }
1744 { "organization" bibinfo.check
1745 library empty$
1746 { prepend.address }
1747 { ". " *
1748 format.img.library.address *
1749 }
1750 if$
1751 }
1752 if$
1753 }
1754 { "publisher" bibinfo.warn prepend.address
1755 library empty$
1756 'skip$
1757 { ". " *
1758 format.img.library *
1759 }
1760 if$
1761 }
1762 if$
1763 }
1764
1765 INTEGERS { multiresult }
1766 FUNCTION {multi.page.check}
1767 { 't :=
1768 #0 'multiresult :=
1769 { multiresult not
1770 t empty$ not
1771 and
1772 }
1773 { t #1 #1 substring$
1774 duplicate$ "-" =
1775 swap$ duplicate$ "," =
1776 swap$ "+" =
1777 or or
1778 { #1 'multiresult := }
1779 { t #2 global.max$ substring$ 't := }
1780 if$
1781 }
1782 while$
1783 multiresult
1784 }
1785 FUNCTION {n.dashify}
1786 { 't :=
1787 ""
1788 { t empty$ not }
1789 { t #1 #1 substring$ "-" =
1790 { t #1 #2 substring$ "--" = not
1791 { "--" *
1792 t #2 global.max$ substring$ 't :=
1793 }
1794 { { t #1 #1 substring$ "-" = }
1795 { "-" *
1796 t #2 global.max$ substring$ 't :=
1797 }
1798 while$
1799 }
1800 if$
1801 }
1802 { t #1 #1 substring$ *
1803 t #2 global.max$ substring$ 't :=
1804 }
1805 if$
1806 }
1807 while$
1808 }
1809 FUNCTION {format.pages}
1810 { pages duplicate$ empty$ 'skip$
1811 { duplicate$ multi.page.check
1812 { bbl.pages swap$
1813 n.dashify
1814 }
1815 { bbl.page swap$
1816 }
1817 if$
1818 "pages" bibinfo.check
1819 *
1820 }
1821 if$
1822 }
1823 FUNCTION {format.journal.pages}
1824 { pages duplicate$ empty$ 'pop$
1825 { swap$ duplicate$ empty$
1826 { pop$ pop$ format.pages }
1827 { ", " *
1828 swap$
1829 n.dashify
1830 pages multi.page.check
1831 'bbl.pages
1832 'bbl.page
1833 if$
1834 swap$
1835 "pages" bibinfo.check
1836 * *
1837 }
1838 if$
1839 }
1840 if$
1841 }
1842 FUNCTION {format.journal.eid}
1843 { eid "eid" bibinfo.check
1844 duplicate$ empty$ 'pop$
1845 { swap$ duplicate$ empty$ 'skip$
1846 { ", " *
1847 }
1848 if$
1849 swap$ *
1850 }
1851 if$
1852 }
1853 FUNCTION {format.vol.num}
1854 { volume field.or.null duplicate$ empty$
1855 'skip$
1856 { "volume" bibinfo.check
1857 }
1858 if$
1859 number "number" bibinfo.check duplicate$ empty$
1860 'skip$
1861 { swap$ duplicate$ empty$
1862 { "there's a number but no volume in " cite$ * warning$ }
1863 'skip$
1864 if$
1865 swap$
1866 "(" swap$ * ")" *
1867 }
1868 if$
1869 }
1870 FUNCTION {format.vol.num.pages}
1871 { pubstate field.or.null
1872 duplicate$ "inpress" =
1873 { pop$ bbl.inpress }
1874 { duplicate$ "submitted" =
1875 { pop$ bbl.submitted }
1876 { duplicate$ "inpreparation" =
1877 { pop$ bbl.inpreparation }
1878 { pop$ "" }
1879 if$
1880 }
1881 if$
1882 }
1883 if$
1884 duplicate$ empty$
1885 { pop$
1886 format.vol.num *
1887 eventyear field.or.null duplicate$ empty$
1888 { pop$
1889 month "month" bibinfo.check duplicate$ empty$
1890 'pop$
1891 { swap$ duplicate$ empty$
1892 'pop$
1893 { ", " * swap$ * }
1894 if$
1895 }
1896 if$
1897 }
1898 { swap$ duplicate$ empty$
1899 'pop$
1900 { ", " * swap$ * }
1901 if$
1902 }
1903 if$
1904 eid empty$
1905 { format.journal.pages }
1906 { format.journal.eid }
1907 if$
1908 }
1909 'skip$
1910 if$
1911 }
1912 FUNCTION {format.chapter.pages}
1913 { chapter empty$
1914 'format.pages
1915 { type empty$
1916 { bbl.chapter }
1917 { type "l" change.case$
1918 "type" bibinfo.check
1919 }
1920 if$
1921 chapter tie.or.space.prefix
1922 "chapter" bibinfo.check
1923 * *
1924 pages empty$
1925 'skip$
1926 { ", " * format.pages * }
1927 if$
1928 }
1929 if$
1930 }
1931
1932 FUNCTION {format.journal.series.vol.pages}
1933 { journal field.or.null
1934 duplicate$ "OJ" =
1935 { "journal" bibinfo.check
1936 emphasize
1937 series empty$
1938 volume empty$
1939 and
1940 pages empty$
1941 and
1942 'skip$
1943 { " " * }
1944 if$
1945 format.series
1946 volume "volume" bibinfo.check *
1947 duplicate$ empty$
1948 'skip$
1949 { pages field.or.null duplicate$ empty$
1950 'skip$
1951 { "/" swap$ *
1952 }
1953 if$ *
1954 }
1955 if$ *
1956 }
1957 { duplicate$ "ECR" =
1958 { "journal" bibinfo.check
1959 volume "volume" bibinfo.check
1960 duplicate$ empty$
1961 'skip$
1962 { " " swap$ * "--" * * }
1963 if$
1964 }
1965 { "journal" bibinfo.check
1966 is.online
1967 { " " * bbl.online *
1968 #1 'online.shown :=
1969 }
1970 'skip$
1971 if$
1972 volume "volume" bibinfo.check
1973 duplicate$ empty$
1974 'pop$
1975 { " " * swap$ * }
1976 if$
1977 pages empty$
1978 eid empty$
1979 and
1980 'skip$
1981 { " " * }
1982 if$
1983 }
1984 if$
1985 }
1986 if$
1987 eid empty$
1988 { pages "pages" bibinfo.check * }
1989 { eid "eid" bibinfo.check * }
1990 if$
1991 }
1992 FUNCTION {format.inst.journal.series.vol.pages}
1993 { institution duplicate$ empty$
1994 { pop$ format.journal.series.vol.pages }
1995 { duplicate$ "Commission" =
1996 { pop$ format.journal.series.vol.pages }
1997 { number duplicate$ empty$
1998 { pop$ casenumber duplicate$ empty$
1999 'skip$
2000 { "casenumber" bibinfo.check
2001 ", " swap$ * *
2002 }
2003 if$
2004 }
2005 { "number" bibinfo.check
2006 ", " swap$ * *
2007 }
2008 if$
2009 output new.sentence
2010 journal "t" change.case$
2011 "journal" bibinfo.check
2012 emphasize output
2013 is.online
2014 { continue.clause
2015 bbl.online output
2016 #1 'online.shown :=
2017 }
2018 'skip$
2019 if$
2020 volume field.or.null
2021 duplicate$ empty$ 'skip$
2022 { "volume" bibinfo.check
2023 }
2024 if$
2025 eventyear field.or.null duplicate$ empty$
2026 { pop$
2027 month "month" bibinfo.check duplicate$ empty$
2028 'pop$
2029 { swap$ duplicate$ empty$
2030 'pop$
2031 { ", " * swap$ * }
2032 if$
2033 }
2034 if$
2035 }
2036 { swap$ duplicate$ empty$
2037 'pop$
2038 { ", " * swap$ * }
2039 if$
2040 }
2041 if$
2042 eid empty$
2043 { format.journal.pages }
2044 { format.journal.eid }
2045 if$
2046 }
2047 if$
2048 }
2049 if$
2050 }
2051 FUNCTION {format.eprint}
2052 { eprint duplicate$ empty$
2053 'skip$
2054 { "\eprint"
2055 archive empty$
2056 'skip$
2057 { "[" * archive * "]" * }
2058 if$
2059 "{" * swap$ * "}" *
2060 }
2061 if$
2062 }
2063 FUNCTION {format.url}
2064 { doi empty$
2065 { url }
2066 { "https://doi.org/" doi * }
2067 if$
2068 duplicate$ empty$
2069 { pop$ "" }
2070 { "\urlprefix\url{" swap$ * "}" * }
2071 if$
2072 duplicate$ empty$
2073 urlyear empty$ not
2074 urldate empty$ not
2075 or
2076 and
2077 { library duplicate$ empty$
2078 'pop$
2079 { "\urlprefix{}" swap$ * * }
2080 if$
2081 }
2082 'skip$
2083 if$
2084 urlyear empty$
2085 { urldate empty$
2086 'skip$
2087 { " [\urldateprefix{}" * urldate * "]" * }
2088 if$
2089 }
2090 { " [\urldateprefix{}" * urlyear * "]" * }
2091 if$
2092 }
2093 FUNCTION {format.article.crossref}
2094 { word.in
2095 " \cite{" * crossref * "}" *
2096 }
2097 FUNCTION {format.incoll.inproc.crossref}
2098 { word.in
2099 " \cite{" * crossref * "}" *
2100 }
2101 FUNCTION {format.book.crossref}
2102 { volume duplicate$ empty$
2103 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
2104 pop$ word.in
2105 }
2106 { bbl.volume
2107 capitalize
2108 swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
2109 }
2110 if$
2111 " \cite{" * crossref * "}" *
2112 }
2113
2114 FUNCTION {calc.label}
2115 { calc.short.authors
2116 short.list
2117 "("
2118 *
2119 year nodate.check duplicate$ empty$
2120 { pop$ "" }
2121 'skip$
2122 if$
2123 *
2124 'label :=
2125 }
2126 FUNCTION {output.bibitem}
2127 { newline$
2128 "\bibitem[{" write$
2129 label write$
2130 ")" make.full.names duplicate$ short.list =
2131 { pop$ }
2132 { * }
2133 if$
2134 "}]{" * write$
2135 cite$ write$
2136 "}" write$
2137 newline$
2138 ""
2139 #0 'online.shown :=
2140 before.all 'output.state :=
2141 }
2142 FUNCTION {article}
2143 { output.bibitem
2144 format.authors "author" output.check
2145 author format.key output
2146 format.date "year" output.check
2147 date.block
2148 format.title "title" output.check
2149 print.title.addenda
2150 new.block
2151 crossref missing$
2152 { journal "t" change.case$
2153 "journal" bibinfo.check
2154 emphasize
2155 "journal" output.check
2156 is.online
2157 { continue.clause
2158 bbl.online output
2159 #1 'online.shown :=
2160 }
2161 'skip$
2162 if$
2163 format.vol.num.pages output
2164 }
2165 { format.article.crossref output.nonnull
2166 format.pages output
2167 }
2168 if$
2169 new.block
2170 format.note output
2171 new.block
2172 format.eprint output
2173 format.url output
2174 fin.entry
2175 }
2176 FUNCTION {book}
2177 { output.bibitem
2178 author empty$
2179 { editor empty$
2180 type$ "reference" =
2181 or
2182 { type$ "reference" =
2183 { format.title "title" output.check }
2184 { format.btitle "title" output.check }
2185 if$
2186 print.labeltitle.addenda
2187 format.date "year" output.check
2188 year empty$ 'skip$ { date.block } if$
2189 print.title.addenda
2190 }
2191 { format.editors "author and editor" output.check
2192 format.date "year" output.check
2193 date.block
2194 format.btitle "title" output.check
2195 print.title.addenda
2196 }
2197 if$
2198 }
2199 { format.authors output.nonnull
2200 crossref missing$
2201 { "author and editor" editor either.or.check }
2202 'skip$
2203 if$
2204 format.date "year" output.check
2205 date.block
2206 format.btitle "title" output.check
2207 print.title.addenda
2208 }
2209 if$
2210 new.block
2211 format.edition output
2212 edition empty$
2213 { mid.sentence 'output.state := }
2214 'new.block
2215 if$
2216 format.bvolume output
2217 format.number.series output
2218 new.block
2219 format.note output
2220 crossref missing$
2221 { keywords field.or.null "uksi" =
2222 { mid.sentence 'output.state := }
2223 { new.sentence }
2224 if$
2225 format.publisher.address output
2226 }
2227 { new.block
2228 format.book.crossref output.nonnull
2229 }
2230 if$
2231 new.block
2232 format.eprint output
2233 format.url output
2234 fin.entry
2235 }
2236 FUNCTION {booklet}
2237 { output.bibitem
2238 author empty$
2239 { format.avtitle "title" output.check
2240 print.labeltitle.addenda
2241 format.date "year" output.check
2242 year empty$ 'skip$ { date.block } if$
2243 print.title.addenda
2244 }
2245 { format.authors output
2246 author format.key output
2247 format.date "year" output.check
2248 date.block
2249 format.avtitle "title" output.check
2250 print.title.addenda
2251 }
2252 if$
2253 new.block
2254 format.series.episode output
2255 is.online
2256 { continue.clause
2257 bbl.online output
2258 #1 'online.shown :=
2259 }
2260 'skip$
2261 if$
2262 new.block
2263 type "type" bibinfo.check output
2264 new.block
2265 howpublished "howpublished" bibinfo.check output
2266 new.block
2267 format.note output
2268 publisher empty$ 'skip$
2269 { new.block}
2270 if$
2271 format.publisher.address output
2272 new.block
2273 format.eprint output
2274 format.url output
2275 fin.entry
2276 }
2277 FUNCTION {inbook}
2278 { output.bibitem
2279 author empty$
2280 { format.title "title" output.check
2281 print.labeltitle.addenda
2282 format.date "year" output.check
2283 year empty$ 'skip$ { date.block } if$
2284 print.title.addenda
2285 }
2286 { format.authors output.nonnull
2287 format.date "year" output.check
2288 date.block
2289 format.title "title" output.check
2290 print.title.addenda
2291 }
2292 if$
2293 new.block
2294 crossref missing$
2295 { format.in.ed.booktitle "booktitle" output.check
2296 new.block
2297 format.edition output
2298 edition empty$
2299 { mid.sentence 'output.state := }
2300 'new.block
2301 if$
2302 format.bvolume output
2303 format.number.series output
2304 new.block
2305 format.note output
2306 new.block
2307 format.publisher.address output
2308 format.chapter.pages output
2309 }
2310 { format.note output
2311 new.block
2312 format.incoll.inproc.crossref output.nonnull
2313 format.chapter.pages output
2314 }
2315 if$
2316 new.block
2317 format.eprint output
2318 format.url output
2319 fin.entry
2320 }
2321 FUNCTION {incollection}
2322 { output.bibitem
2323 author empty$
2324 { type$ "inreference" =
2325 { format.label.booktitle output}
2326 { format.title "title" output.check
2327 print.labeltitle.addenda
2328 }
2329 if$
2330 format.date "year" output.check
2331 year empty$ 'skip$ { date.block } if$
2332 type$ "inreference" =
2333 'skip$
2334 { print.title.addenda }
2335 if$
2336 }
2337 { format.authors output.nonnull
2338 format.date "year" output.check
2339 date.block
2340 format.title "title" output.check
2341 print.title.addenda
2342 }
2343 if$
2344 new.block
2345 crossref missing$
2346 { type$ "inreference" =
2347 author empty$
2348 and
2349 { format.byeditors output }
2350 { format.in.ed.booktitle "booktitle" output.check }
2351 if$
2352 new.block
2353 format.edition output
2354 type$ "inreference" =
2355 author empty$
2356 and
2357 { new.block
2358 format.btitle "title" output.check
2359 print.title.addenda
2360 new.block
2361 }
2362 { edition empty$
2363 { mid.sentence 'output.state := }
2364 'new.block
2365 if$
2366 }
2367 if$
2368 format.bvolume output
2369 format.number.series output
2370 new.block
2371 format.note output
2372 new.block
2373 format.publisher.address output
2374 format.chapter.pages output
2375 }
2376 { format.note output
2377 new.block
2378 format.incoll.inproc.crossref output.nonnull
2379 format.chapter.pages output
2380 }
2381 if$
2382 new.block
2383 format.eprint output
2384 format.url output
2385 fin.entry
2386 }
2387 FUNCTION {inproceedings}
2388 { output.bibitem
2389 format.authors "author" output.check
2390 author format.key output
2391 format.date "year" output.check
2392 date.block
2393 format.title "title" output.check
2394 print.title.addenda
2395 new.block
2396 crossref missing$
2397 { format.in.ed.booktitle "booktitle" output.check
2398 format.bvolume output
2399 format.number.series output
2400 eventyear output
2401 venue output
2402 format.note output
2403 new.sentence
2404 publisher empty$
2405 { format.organization.address output }
2406 { organization "organization" bibinfo.check output
2407 format.publisher.address output
2408 }
2409 if$
2410 format.pages output
2411 }
2412 { format.note output
2413 new.block
2414 format.incoll.inproc.crossref output.nonnull
2415 format.pages output
2416 }
2417 if$
2418 new.block
2419 format.eprint output
2420 format.url output
2421 fin.entry
2422 }
2423 FUNCTION {conference} { inproceedings }
2424 FUNCTION {jurisdiction}
2425 { output.bibitem
2426 author empty$
2427 { format.btitle "title" output.check
2428 continue.clause
2429 format.case.number output
2430 continue.clause
2431 print.labeltitle.addenda
2432 continue.clause
2433 format.jur.date "year" output.check
2434 year empty$ 'skip$ { case.check } if$
2435 print.title.addenda
2436 }
2437 { format.authors output
2438 author format.key output
2439 format.jur.date "year" output.check
2440 date.block
2441 continue.clause
2442 format.btitle "title" output.check
2443 print.labeltitle.addenda
2444 print.title.addenda
2445 }
2446 if$
2447 case.check
2448 format.note output
2449 note empty$
2450 'case.check
2451 'new.block
2452 if$
2453 crossref missing$
2454 { continue.clause
2455 format.inst.journal.series.vol.pages output
2456 }
2457 { format.article.crossref output.nonnull
2458 format.pages output
2459 }
2460 if$
2461 new.block
2462 format.eprint output
2463 format.url output
2464 fin.entry
2465 }
2466 FUNCTION {uklegislation}
2467 { output.bibitem
2468 author empty$
2469 { format.btitle "title" output.check
2470 print.labeltitle.addenda
2471 continue.clause
2472 format.date emphasize "year" output.check
2473 print.title.addenda
2474 }
2475 { format.authors output
2476 author format.key output
2477 format.date "year" output.check
2478 date.block
2479 continue.clause
2480 format.btitle "title" output.check
2481 print.labeltitle.addenda
2482 print.title.addenda
2483 }
2484 if$
2485 entrysubtype field.or.null "secondary" =
2486 { number "number" bibinfo.check output }
2487 { series empty$ type empty$ and
2488 { number empty$
2489 { format.chapter output }
2490 { continue.clause
2491 format.series.number.chapter output
2492 }
2493 if$
2494 }
2495 { chapter empty$
2496 { new.block }
2497 { continue.clause }
2498 if$
2499 format.series.number.chapter output
2500 }
2501 if$
2502 }
2503 if$
2504 note empty$
2505 'skip$
2506 { new.block
2507 format.note output
2508 new.block
2509 }
2510 if$
2511 publisher empty$ 'skip$
2512 { entrysubtype field.or.null "secondary" =
2513 'skip$
2514 { new.block }
2515 if$
2516 format.publisher.address output
2517 }
2518 if$
2519 new.block
2520 format.eprint output
2521 format.url output
2522 fin.entry
2523 }
2524 FUNCTION {eulegislation}
2525 { output.bibitem
2526 author empty$
2527 { format.title "title" output.check
2528 print.labeltitle.addenda
2529 continue.clause
2530 format.eu.date "year" output.check
2531 print.title.addenda
2532 }
2533 { format.authors output
2534 author format.key output
2535 format.eu.date "year" output.check
2536 date.block
2537 continue.clause
2538 format.title "title" output.check
2539 print.labeltitle.addenda
2540 print.title.addenda
2541 }
2542 if$
2543 eu.case.check
2544 format.note output
2545 note empty$
2546 'eu.case.check
2547 'new.block
2548 if$
2549 crossref missing$
2550 { continue.clause
2551 format.journal.series.vol.pages output
2552 }
2553 { format.article.crossref output.nonnull
2554 format.pages output
2555 }
2556 if$
2557 new.block
2558 format.eprint output
2559 format.url output
2560 fin.entry
2561 }
2562 FUNCTION {legislation}
2563 { journal empty$
2564 'uklegislation
2565 'eulegislation
2566 if$
2567 }
2568 FUNCTION {legal}
2569 { entrysubtype field.or.null
2570 "parliamentary" =
2571 'article
2572 'article
2573 if$
2574 }
2575 FUNCTION {manual}
2576 { output.bibitem
2577 author empty$
2578 { format.btitle "title" output.check
2579 print.labeltitle.addenda
2580 format.date "year" output.check
2581 year empty$ 'skip$ { date.block } if$
2582 print.title.addenda
2583 }
2584 { format.authors output
2585 author format.key output
2586 format.date "year" output.check
2587 date.block
2588 format.btitle "title" output.check
2589 print.title.addenda
2590 }
2591 if$
2592 month "month" bibinfo.check output
2593 format.edition output
2594 new.block
2595 format.manual.number output
2596 new.block
2597 format.note format.journal.pages output
2598 new.block
2599 format.library output
2600 organization address new.block.checkb
2601 format.organization.address output
2602 new.block
2603 format.eprint output
2604 format.url output
2605 fin.entry
2606 }
2607 FUNCTION {image}
2608 { output.bibitem
2609 author empty$
2610 { format.btitle "title" output.check
2611 print.labeltitle.addenda
2612 format.date "year" output.check
2613 year empty$ 'skip$ { date.block } if$
2614 print.title.addenda
2615 }
2616 { format.authors output
2617 author format.key output
2618 format.date "year" output.check
2619 date.block
2620 format.btitle "title" output.check
2621 print.title.addenda
2622 }
2623 if$
2624 format.edition output
2625 new.block
2626 format.note output
2627 new.block
2628 format.manual.number output
2629 new.block
2630 format.pub.org.lib.address output
2631 new.block
2632 format.eprint output
2633 format.url output
2634 fin.entry
2635 }
2636 FUNCTION {mastersthesis}
2637 { output.bibitem
2638 format.authors "author" output.check
2639 author format.key output
2640 format.date "year" output.check
2641 date.block
2642 format.btitle "title" output.check
2643 print.title.addenda
2644 new.block
2645 format.note output
2646 new.block
2647 bbl.mthesis format.thesis.type output.nonnull
2648 new.block
2649 school "school" bibinfo.warn output
2650 address "address" bibinfo.check output
2651 new.block
2652 format.eprint output
2653 format.url output
2654 fin.entry
2655 }
2656 FUNCTION {misc}
2657 { output.bibitem
2658 author empty$
2659 { format.title "title" output.check
2660 print.labeltitle.addenda
2661 format.date "year" output.check
2662 year empty$ 'skip$ { date.block } if$
2663 print.title.addenda
2664 }
2665 { format.authors output
2666 author format.key output
2667 format.date "year" output.check
2668 date.block
2669 format.title "title" output.check
2670 print.title.addenda
2671 }
2672 if$
2673 new.block
2674 howpublished "howpublished" bibinfo.check output
2675 new.block
2676 format.note output
2677 new.block
2678 format.eprint output
2679 format.url output
2680 fin.entry
2681 }
2682 FUNCTION {phdthesis}
2683 { output.bibitem
2684 format.authors "author" output.check
2685 author format.key output
2686 format.date "year" output.check
2687 date.block
2688 format.btitle "title" output.check
2689 print.title.addenda
2690 new.block
2691 format.note output
2692 new.block
2693 bbl.phdthesis format.thesis.type output.nonnull
2694 new.block
2695 school "school" bibinfo.warn output
2696 address "address" bibinfo.check output
2697 new.block
2698 format.eprint output
2699 format.url output
2700 fin.entry
2701 }
2702 FUNCTION {proceedings}
2703 { output.bibitem
2704 editor empty$
2705 { format.btitle "title" output.check
2706 print.labeltitle.addenda
2707 format.date "year" output.check
2708 year empty$ 'skip$ { date.block } if$
2709 print.title.addenda
2710 }
2711 { format.editors output
2712 editor format.key output
2713 format.date "year" output.check
2714 date.block
2715 format.btitle "title" output.check
2716 print.title.addenda
2717 }
2718 if$
2719 format.bvolume output
2720 format.number.series output
2721 eventyear output
2722 venue output
2723 format.note output
2724 new.sentence
2725 publisher empty$
2726 { format.organization.address output }
2727 { organization "organization" bibinfo.check output
2728 format.publisher.address output
2729 }
2730 if$
2731 new.block
2732 format.eprint output
2733 format.url output
2734 fin.entry
2735 }
2736 FUNCTION {techreport}
2737 { output.bibitem
2738 author empty$
2739 { format.btitle "title" output.check
2740 print.labeltitle.addenda
2741 format.date "year" output.check
2742 year empty$ 'skip$ { date.block } if$
2743 print.title.addenda
2744 }
2745 { format.authors output
2746 author format.key output
2747 format.date "year" output.check
2748 date.block
2749 format.btitle "title" output.check
2750 print.title.addenda
2751 }
2752 if$
2753 new.block
2754 format.tr.number output
2755 new.block
2756 format.note output
2757 new.block
2758 publisher empty$
2759 { format.institution.address output }
2760 { institution "institution" bibinfo.check output
2761 format.publisher.address output
2762 }
2763 if$
2764 new.block
2765 format.library output
2766 new.block
2767 format.eprint output
2768 format.url output
2769 fin.entry
2770 }
2771 FUNCTION {unpublished}
2772 { output.bibitem
2773 author empty$
2774 { booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
2775 print.labeltitle.addenda
2776 format.date "year" output.check
2777 year empty$ 'skip$ { date.block } if$
2778 print.title.addenda
2779 }
2780 { format.authors output
2781 author format.key output
2782 format.date "year" output.check
2783 date.block
2784 booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
2785 print.title.addenda
2786 }
2787 if$
2788 new.block
2789 format.in.ed.booktitle output
2790 new.block
2791 howpublished "howpublished" bibinfo.check output
2792 new.block
2793 format.note output
2794 new.block
2795 bbl.unpublished output
2796 new.block
2797 format.eprint output
2798 format.url output
2799 fin.entry
2800 }
2801
2802 FUNCTION {letter}
2803 { journal empty$
2804 'unpublished
2805 'article
2806 if$
2807 }
2808 FUNCTION {collection} { book }
2809 FUNCTION {reference} { book }
2810 FUNCTION {inreference} { incollection }
2811 FUNCTION {audio} { booklet }
2812 FUNCTION {movie} { booklet }
2813 FUNCTION {music} { booklet }
2814 FUNCTION {video} { booklet }
2815 FUNCTION {dataset} { manual }
2816 FUNCTION {electronic} { manual }
2817 FUNCTION {online} { manual }
2818 FUNCTION {patent} { manual }
2819 FUNCTION {software} { manual }
2820 FUNCTION {standard} { manual }
2821 FUNCTION {www} { manual }
2822 FUNCTION {thesis} { phdthesis }
2823 FUNCTION {report} { techreport }
2824 FUNCTION {default.type} { misc }
2825
2826 READ
2827 FUNCTION {sortify}
2828 { purify$
2829 "l" change.case$
2830 }
2831 INTEGERS { len }
2832 FUNCTION {chop.word}
2833 { 's :=
2834 'len :=
2835 s #1 len substring$ =
2836 { s len #1 + global.max$ substring$ }
2837 's
2838 if$
2839 }
2840 FUNCTION {sort.format.names}
2841 { 's :=
2842 #1 'nameptr :=
2843 ""
2844 s num.names$ 'numnames :=
2845 numnames 'namesleft :=
2846 { namesleft #0 > }
2847 { s nameptr
2848 "{ll{ }}{ f{ }}{ jj{ }}{ vv{}}"
2849 format.name$ 't :=
2850 nameptr #1 >
2851 { " " *
2852 namesleft #1 =
2853 t "others" =
2854 and
2855 { "zzzzz" 't := }
2856 'skip$
2857 if$
2858 t sortify *
2859 }
2860 { t sortify * }
2861 if$
2862 nameptr #1 + 'nameptr :=
2863 namesleft #1 - 'namesleft :=
2864 }
2865 while$
2866 }
2867 FUNCTION {sort.format.title}
2868 { 't :=
2869 "A " #2
2870 "An " #3
2871 "The " #4 t chop.word
2872 chop.word
2873 chop.word
2874 sortify
2875 #1 global.max$ substring$
2876 }
2877 FUNCTION {author.editor.sort}
2878 { shortauthor empty$
2879 { author empty$
2880 { shorteditor empty$
2881 { editor empty$
2882 { title empty$
2883 { key empty$
2884 { "to sort, need author, editor, title, or key in "
2885 cite$ * warning$
2886 ""
2887 }
2888 { key sortify }
2889 if$
2890 }
2891 { title sort.format.title }
2892 if$
2893 }
2894 { editor sort.format.names }
2895 if$
2896 }
2897 { shorteditor num.names$ editor num.names$ =
2898 { shorteditor sort.format.names }
2899 { editor sort.format.names }
2900 if$
2901 }
2902 if$
2903 }
2904 { author sort.format.names }
2905 if$
2906 }
2907 { shortauthor num.names$ author num.names$ =
2908 { shortauthor sort.format.names }
2909 { author sort.format.names }
2910 if$
2911 }
2912 if$
2913 }
2914 FUNCTION {editor.sort}
2915 { shorteditor empty$
2916 { editor empty$
2917 { title empty$
2918 { key empty$
2919 { "to sort, need editor, title, or key in " cite$ * warning$
2920 ""
2921 }
2922 { key sortify }
2923 if$
2924 }
2925 { title sort.format.title }
2926 if$
2927 }
2928 { editor sort.format.names }
2929 if$
2930 }
2931 { shorteditor num.names$ editor num.names$ =
2932 { shorteditor sort.format.names }
2933 { editor sort.format.names }
2934 if$
2935 }
2936 if$
2937 }
2938 FUNCTION {author.sort}
2939 { shortauthor empty$
2940 { author empty$
2941 { type$ "inreference" =
2942 booktitle empty$ not
2943 and
2944 { booktitle sort.format.title }
2945 { title empty$
2946 { key empty$
2947 { "to sort, need author, title, or key in " cite$ * warning$
2948 ""
2949 }
2950 { key sortify }
2951 if$
2952 }
2953 { title sort.format.title }
2954 if$
2955 }
2956 if$
2957 }
2958 { author sort.format.names }
2959 if$
2960 }
2961 { shortauthor num.names$ author num.names$ =
2962 { shortauthor sort.format.names }
2963 { author sort.format.names }
2964 if$
2965 }
2966 if$
2967 }
2968 FUNCTION {presort}
2969 { type$ "book" =
2970 type$ "inbook" =
2971 or
2972 'author.editor.sort
2973 { type$ "proceedings" =
2974 'editor.sort
2975 'author.sort
2976 if$
2977 }
2978 if$
2979 #1 entry.max$ substring$
2980 duplicate$ 'sort.label :=
2981 " "
2982 *
2983 calc.label
2984 label sortify
2985 *
2986 " "
2987 *
2988 title field.or.null
2989 sort.format.title
2990 *
2991 #1 entry.max$ substring$
2992 'sort.key$ :=
2993 }
2994
2995 ITERATE {presort}
2996 SORT
2997 INTEGERS { cite.initials.old disamb.names.old }
2998 STRINGS { name1f name1f.old name1g name1g.old name name.old }
2999 FUNCTION {is.label.source}
3000 { duplicate$ empty$
3001 { pop$ #0 }
3002 { label.source =
3003 { #1 }
3004 { #0 }
3005 if$
3006 }
3007 if$
3008 }
3009 FUNCTION {initialize.init.stuff}
3010 { "yyyy" 'name1f.old :=
3011 "yyyy" 'name1g.old :=
3012 "yyyy" 'name.old :=
3013 #0 'cite.initials.old :=
3014 #0 'disamb.names.old :=
3015 }
3016 FUNCTION {end.loop.init}
3017 { name1f 'name1f.old :=
3018 name1g 'name1g.old :=
3019 cite.initials 'cite.initials.old :=
3020 disamb.names 'disamb.names.old :=
3021 }
3022 FUNCTION {has.no.init}
3023 { duplicate$ duplicate$
3024 'name1f.old :=
3025 'name1g.old :=
3026 'name.old :=
3027 #0 'cite.initials.old :=
3028 #0 'disamb.names.old :=
3029 }
3030 FUNCTION {cmp.names}
3031 { 's :=
3032 #1 'nameptr :=
3033 disamb.names.old
3034 s num.names$ 'numnames :=
3035 name.old num.names$ duplicate$ numnames <
3036 { 'numnames := }
3037 'pop$
3038 if$
3039 numnames 'namesleft :=
3040 { namesleft #0 > }
3041 { s nameptr "{ll}" format.name$
3042 name.old nameptr "{ll}" format.name$
3043 =
3044 'skip$
3045 { nameptr #1 -
3046 duplicate$ disamb.names >
3047 { swap$ pop$ }
3048 'pop$
3049 if$
3050 #1 'namesleft :=
3051 }
3052 if$
3053 nameptr #1 + 'nameptr :=
3054 namesleft #1 - 'namesleft :=
3055 }
3056 while$
3057 }
3058 FUNCTION {check.cite.init}
3059 { 'name :=
3060 name #1 "{ll}" format.name$ 'name1f :=
3061 name #1 "{f.{.}}{ jj}{ vv}" format.name$ 'name1g :=
3062 name1f name1f.old =
3063 { name1g name1g.old =
3064 { cite.initials.old 'cite.initials :=
3065 name num.names$ #3 >
3066 { name cmp.names }
3067 { #0 }
3068 if$
3069 duplicate$
3070 'disamb.names :=
3071 'disamb.names.old :=
3072 presort
3073 }
3074 { #1 'cite.initials :=
3075 presort
3076 end.loop.init
3077 }
3078 if$
3079 }
3080 { end.loop.init }
3081 if$
3082 name 'name.old :=
3083 }
3084 FUNCTION {check.cite.head}
3085 { author duplicate$ is.label.source
3086 { check.cite.init }
3087 { pop$
3088 editor duplicate$ is.label.source
3089 { check.cite.init }
3090 { pop$
3091 shortauthor duplicate$ is.label.source
3092 { duplicate$ num.names$ author num.names$ =
3093 { check.cite.init }
3094 { pop$
3095 author check.cite.init
3096 }
3097 if$
3098 }
3099 { pop$
3100 shorteditor duplicate$ is.label.source
3101 { duplicate$ num.names$ editor num.names$ =
3102 { check.cite.init }
3103 { pop$
3104 editor check.cite.init
3105 }
3106 if$
3107 }
3108 { pop$
3109 label.source has.no.init
3110 }
3111 if$
3112 }
3113 if$
3114 }
3115 if$
3116 }
3117 if$
3118 }
3119 EXECUTE {initialize.init.stuff}
3120 ITERATE {check.cite.head}
3121 EXECUTE {initialize.init.stuff}
3122 REVERSE {check.cite.head}
3123 SORT
3124 INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
3125 STRINGS { last.label next.extra }
3126 FUNCTION {last.char}
3127 { #1 'len :=
3128 { duplicate$ duplicate$ #1 len substring$ = not }
3129 { len #1 + 'len := }
3130 while$
3131 len #1 substring$
3132 }
3133 FUNCTION {initialize.extra.label.stuff}
3134 { #0 int.to.chr$ 'last.label :=
3135 "" 'next.extra :=
3136 #0 'last.extra.num :=
3137 "a" chr.to.int$ #1 - 'last.extra.num.blank :=
3138 last.extra.num.blank 'last.extra.num.extended :=
3139 #0 'number.label :=
3140 }
3141 FUNCTION {forward.pass}
3142 { last.label label =
3143 { last.extra.num #1 + 'last.extra.num :=
3144 last.extra.num "z" chr.to.int$ >
3145 { "a" chr.to.int$ 'last.extra.num :=
3146 last.extra.num.extended #1 + 'last.extra.num.extended :=
3147 }
3148 'skip$
3149 if$
3150 last.extra.num.extended last.extra.num.blank >
3151 { last.extra.num.extended int.to.chr$
3152 last.extra.num int.to.chr$ *
3153 }
3154 { last.extra.num int.to.chr$ }
3155 if$
3156 label last.char chr.to.int$
3157 duplicate$ "/" chr.to.int$ >
3158 swap$ ":" chr.to.int$ < and
3159 'skip$
3160 { "~" swap$ * }
3161 if$
3162 'extra.label :=
3163 }
3164 { "a" chr.to.int$ 'last.extra.num :=
3165 "" 'extra.label :=
3166 label 'last.label :=
3167 }
3168 if$
3169 number.label #1 + 'number.label :=
3170 }
3171 FUNCTION {reverse.pass}
3172 { next.extra "b" =
3173 { "a" 'extra.label := }
3174 { next.extra "~b" =
3175 { "~a" 'extra.label := }
3176 'skip$
3177 if$
3178 }
3179 if$
3180 extra.label 'next.extra :=
3181 extra.label
3182 duplicate$ empty$
3183 'skip$
3184 { "{\natexlab{" swap$ * "}}" * }
3185 if$
3186 'extra.label :=
3187 label extra.label * 'label :=
3188 }
3189 EXECUTE {initialize.extra.label.stuff}
3190 ITERATE {forward.pass}
3191 REVERSE {reverse.pass}
3192 FUNCTION {bib.sort.order}
3193 { sort.label
3194 " "
3195 *
3196 year field.or.null sortify
3197 *
3198 " "
3199 *
3200 title field.or.null
3201 sort.format.title
3202 *
3203 #1 entry.max$ substring$
3204 'sort.key$ :=
3205 }
3206 ITERATE {bib.sort.order}
3207 SORT
3208 FUNCTION {begin.bib}
3209 { preamble$ empty$
3210 'skip$
3211 { preamble$ write$ newline$ }
3212 if$
3213 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
3214 write$ newline$
3215 "\providecommand{\natexlab}[1]{#1}"
3216 write$ newline$
3217 "\providecommand{\url}[1]{\texttt{#1}}"
3218 write$ newline$
3219 "\providecommand{\urlprefix}{Available from: }"
3220 write$ newline$
3221 "\providecommand{\urldateprefix}{Accessed }"
3222 write$ newline$
3223 "\providecommand{\selectlanguage}[1]{\relax}"
3224 write$ newline$
3225 "\providecommand{\bibinfo}[2]{#2}"
3226 write$ newline$
3227 "\providecommand{\eprint}[2][]{\url{#2}}"
3228 write$ newline$
3229 }
3230 EXECUTE {begin.bib}
3231 EXECUTE {init.state.consts}
3232 ITERATE {call.type$}
3233 FUNCTION {end.bib}
3234 { newline$
3235 "\end{thebibliography}" write$ newline$
3236 }
3237 EXECUTE {end.bib}
3238 %%
3239 %% Copyright (C) 2016-2026 by University of Bath
3240 %%
3241 %% End of file `bathx.bst'.