Debian Codegraph @

texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst

raw
1 %%
2 %% This is file `variants/thu/thuthesis-bachelor.bst',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% gbt7714.dtx (with options: `2015,numerical')
8 %% -------------------------------------------------------------------
9 %% GB/T 7714 BibTeX Style
10 %% https://github.com/zepinglee/gbt7714-bibtex-style
11 %% Version: 2024/03/08 v2.1.6
12 %% -------------------------------------------------------------------
13 %% Copyright (C) 2016--2024 by Zeping Lee <zepinglee AT gmail.com>
14 %% -------------------------------------------------------------------
15 %% This file may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.3c
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %% https://www.latex-project.org/lppl.txt
20 %% and version 1.3c or later is part of all distributions of LaTeX
21 %% version 2008 or later.
22 %% -------------------------------------------------------------------
23 INTEGERS {
24 citation.et.al.min
25 citation.et.al.use.first
26 bibliography.et.al.min
27 bibliography.et.al.use.first
28 uppercase.name
29 terms.in.macro
30 year.after.author
31 period.after.author
32 italic.book.title
33 sentence.case.title
34 link.title
35 title.in.journal
36 show.patent.country
37 show.mark
38 space.before.mark
39 show.medium.type
40 short.journal
41 italic.journal
42 link.journal
43 bold.journal.volume
44 show.missing.address.publisher
45 space.before.pages
46 only.start.page
47 wave.dash.in.pages
48 show.urldate
49 show.url
50 show.doi
51 show.preprint
52 show.note
53 show.english.translation
54 end.with.period
55 }
56
57 STRINGS {
58 component.part.label
59 }
60
61 FUNCTION {load.config}
62 {
63 #2 'citation.et.al.min :=
64 #1 'citation.et.al.use.first :=
65 #4 'bibliography.et.al.min :=
66 #3 'bibliography.et.al.use.first :=
67 #1 'uppercase.name :=
68 #0 'terms.in.macro :=
69 #0 'year.after.author :=
70 #1 'period.after.author :=
71 #0 'italic.book.title :=
72 #1 'sentence.case.title :=
73 #0 'link.title :=
74 #1 'title.in.journal :=
75 #0 'show.patent.country :=
76 #1 'show.mark :=
77 #0 'space.before.mark :=
78 #1 'show.medium.type :=
79 "slash" 'component.part.label :=
80 #0 'short.journal :=
81 #0 'italic.journal :=
82 #0 'link.journal :=
83 #0 'bold.journal.volume :=
84 #0 'show.missing.address.publisher :=
85 #1 'space.before.pages :=
86 #0 'only.start.page :=
87 #0 'wave.dash.in.pages :=
88 #1 'show.urldate :=
89 #1 'show.url :=
90 #1 'show.doi :=
91 #1 'show.preprint :=
92 #0 'show.note :=
93 #0 'show.english.translation :=
94 #1 'end.with.period :=
95 }
96
97 ENTRY
98 { address
99 archivePrefix
100 author
101 booktitle
102 date
103 doi
104 edition
105 editor
106 eprint
107 eprinttype
108 entrysubtype
109 howpublished
110 institution
111 journal
112 journaltitle
113 key
114 langid
115 language
116 location
117 mark
118 medium
119 note
120 number
121 organization
122 pages
123 publisher
124 school
125 series
126 shortjournal
127 title
128 translation
129 translator
130 url
131 urldate
132 volume
133 year
134 }
135 { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
136 { label extra.label sort.label short.label short.list entry.mark entry.url }
137
138 INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
139
140 INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other }
141
142 INTEGERS { charptr len }
143
144 FUNCTION {init.state.consts}
145 { #0 'before.all :=
146 #1 'mid.sentence :=
147 #2 'after.sentence :=
148 #3 'after.block :=
149 #4 'after.slash :=
150 #3 'lang.zh :=
151 #4 'lang.ja :=
152 #1 'lang.en :=
153 #2 'lang.ru :=
154 #0 'lang.other :=
155 }
156
157 FUNCTION {bbl.anonymous}
158 { entry.lang lang.zh =
159 { "佚名" }
160 { "Anon" }
161 if$
162 }
163
164 FUNCTION {bbl.space}
165 { entry.lang lang.zh =
166 { "\ " }
167 { " " }
168 if$
169 }
170
171 FUNCTION {bbl.and}
172 { "" }
173
174 FUNCTION {bbl.et.al}
175 { entry.lang lang.zh =
176 { "等" }
177 { entry.lang lang.ja =
178 { "他" }
179 { entry.lang lang.ru =
180 { "идр" }
181 { "et~al." }
182 if$
183 }
184 if$
185 }
186 if$
187 }
188
189 FUNCTION {citation.and}
190 { terms.in.macro
191 { "{\biband}" }
192 'bbl.and
193 if$
194 }
195
196 FUNCTION {citation.et.al}
197 { terms.in.macro
198 { "{\bibetal}" }
199 'bbl.et.al
200 if$
201 }
202
203 FUNCTION {bbl.colon} { ": " }
204
205 FUNCTION {bbl.pages.colon}
206 { space.before.pages
207 { ": " }
208 { ":\allowbreak " }
209 if$
210 }
211
212 FUNCTION {bbl.wide.space} { "\quad " }
213
214 FUNCTION {bbl.slash} { "//\allowbreak " }
215
216 FUNCTION {bbl.sine.loco}
217 { entry.lang lang.zh =
218 { "[出版地不详]" }
219 { "[S.l.]" }
220 if$
221 }
222
223 FUNCTION {bbl.sine.nomine}
224 { entry.lang lang.zh =
225 { "[出版者不详]" }
226 { "[s.n.]" }
227 if$
228 }
229
230 FUNCTION {bbl.sine.loco.sine.nomine}
231 { entry.lang lang.zh =
232 { "[出版地不详: 出版者不详]" }
233 { "[S.l.: s.n.]" }
234 if$
235 }
236
237 FUNCTION {not}
238 { { #0 }
239 { #1 }
240 if$
241 }
242
243 FUNCTION {and}
244 { 'skip$
245 { pop$ #0 }
246 if$
247 }
248
249 FUNCTION {or}
250 { { pop$ #1 }
251 'skip$
252 if$
253 }
254
255 STRINGS { x y }
256
257 FUNCTION {contains}
258 { 'y :=
259 'x :=
260 y text.length$ 'len :=
261 x text.length$ len - #1 + 'charptr :=
262 { charptr #0 >
263 x charptr len substring$ y = not
264 and
265 }
266 { charptr #1 - 'charptr := }
267 while$
268 charptr #0 >
269 }
270
271 STRINGS { s t }
272
273 FUNCTION {output.nonnull}
274 { 's :=
275 output.state mid.sentence =
276 { ", " * write$ }
277 { output.state after.block =
278 { add.period$ write$
279 newline$
280 "\newblock " write$
281 }
282 { output.state before.all =
283 'write$
284 { output.state after.slash =
285 { bbl.slash * write$
286 newline$
287 }
288 { add.period$ " " * write$ }
289 if$
290 }
291 if$
292 }
293 if$
294 mid.sentence 'output.state :=
295 }
296 if$
297 s
298 }
299
300 FUNCTION {output}
301 { duplicate$ empty$
302 'pop$
303 'output.nonnull
304 if$
305 }
306
307 FUNCTION {output.after}
308 { 't :=
309 duplicate$ empty$
310 'pop$
311 { 's :=
312 output.state mid.sentence =
313 { t * write$ }
314 { output.state after.block =
315 { add.period$ write$
316 newline$
317 "\newblock " write$
318 }
319 { output.state before.all =
320 'write$
321 { output.state after.slash =
322 { bbl.slash * write$ }
323 { add.period$ " " * write$ }
324 if$
325 }
326 if$
327 }
328 if$
329 mid.sentence 'output.state :=
330 }
331 if$
332 s
333 }
334 if$
335 }
336
337 FUNCTION {output.check}
338 { 't :=
339 duplicate$ empty$
340 { pop$ "empty " t * " in " * cite$ * warning$ }
341 'output.nonnull
342 if$
343 }
344
345 FUNCTION {fin.entry}
346 { end.with.period
347 'add.period$
348 'skip$
349 if$
350 write$
351 show.english.translation entry.lang lang.zh = and
352 { ")"
353 write$
354 }
355 'skip$
356 if$
357 newline$
358 }
359
360 FUNCTION {new.block}
361 { output.state before.all =
362 'skip$
363 { output.state after.slash =
364 'skip$
365 { after.block 'output.state := }
366 if$
367 }
368 if$
369 }
370
371 FUNCTION {new.sentence}
372 { output.state after.block =
373 'skip$
374 { output.state before.all =
375 'skip$
376 { output.state after.slash =
377 'skip$
378 { after.sentence 'output.state := }
379 if$
380 }
381 if$
382 }
383 if$
384 }
385
386 FUNCTION {new.slash}
387 { output.state before.all =
388 'skip$
389 { component.part.label "slash" =
390 { after.slash 'output.state := }
391 { new.block
392 component.part.label "in" =
393 { entry.lang lang.en =
394 { "In: " output
395 write$
396 ""
397 before.all 'output.state :=
398 }
399 'skip$
400 if$
401 }
402 'skip$
403 if$
404 }
405 if$
406 }
407 if$
408 }
409
410 FUNCTION {new.block.checka}
411 { empty$
412 'skip$
413 'new.block
414 if$
415 }
416
417 FUNCTION {new.block.checkb}
418 { empty$
419 swap$ empty$
420 and
421 'skip$
422 'new.block
423 if$
424 }
425
426 FUNCTION {new.sentence.checka}
427 { empty$
428 'skip$
429 'new.sentence
430 if$
431 }
432
433 FUNCTION {new.sentence.checkb}
434 { empty$
435 swap$ empty$
436 and
437 'skip$
438 'new.sentence
439 if$
440 }
441
442 FUNCTION {field.or.null}
443 { duplicate$ empty$
444 { pop$ "" }
445 'skip$
446 if$
447 }
448
449 FUNCTION {emphasize}
450 { duplicate$ empty$
451 { pop$ "" }
452 { "\emph{" swap$ * "}" * }
453 if$
454 }
455
456 FUNCTION {format.btitle}
457 { italic.book.title
458 entry.lang lang.en = and
459 'emphasize
460 'skip$
461 if$
462 }
463
464 INTEGERS { byte second.byte }
465
466 INTEGERS { char.lang tmp.lang }
467
468 STRINGS { tmp.str }
469
470 FUNCTION {get.str.lang}
471 { 'tmp.str :=
472 lang.other 'tmp.lang :=
473 #1 'charptr :=
474 tmp.str text.length$ #1 + 'len :=
475 { charptr len < }
476 { tmp.str charptr #1 substring$ chr.to.int$ 'byte :=
477 byte #128 <
478 { charptr #1 + 'charptr :=
479 byte #64 > byte #91 < and byte #96 > byte #123 < and or
480 { lang.en 'char.lang := }
481 { lang.other 'char.lang := }
482 if$
483 }
484 { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte :=
485 byte #224 <
486 { charptr #2 + 'charptr :=
487 byte #207 > byte #212 < and
488 byte #212 = second.byte #176 < and or
489 { lang.ru 'char.lang := }
490 { lang.other 'char.lang := }
491 if$
492 }
493 { byte #240 <
494 { charptr #3 + 'charptr :=
495 byte #227 > byte #234 < and
496 { lang.zh 'char.lang := }
497 { byte #227 =
498 { second.byte #143 >
499 { lang.zh 'char.lang := }
500 { second.byte #128 > second.byte #132 < and
501 { lang.ja 'char.lang := }
502 { lang.other 'char.lang := }
503 if$
504 }
505 if$
506 }
507 { byte #239 =
508 second.byte #163 > second.byte #172 < and and
509 { lang.zh 'char.lang := }
510 { lang.other 'char.lang := }
511 if$
512 }
513 if$
514 }
515 if$
516 }
517 { charptr #4 + 'charptr :=
518 byte #240 = second.byte #159 > and
519 { lang.zh 'char.lang := }
520 { lang.other 'char.lang := }
521 if$
522 }
523 if$
524 }
525 if$
526 }
527 if$
528 char.lang tmp.lang >
529 { char.lang 'tmp.lang := }
530 'skip$
531 if$
532 }
533 while$
534 tmp.lang
535 }
536
537 FUNCTION {check.entry.lang}
538 { author field.or.null
539 title field.or.null *
540 get.str.lang
541 }
542
543 STRINGS { entry.langid }
544
545 FUNCTION {set.entry.lang}
546 { "" 'entry.langid :=
547 language empty$ not
548 { language 'entry.langid := }
549 'skip$
550 if$
551 langid empty$ not
552 { langid 'entry.langid := }
553 'skip$
554 if$
555 entry.langid empty$
556 { check.entry.lang }
557 { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
558 { lang.en }
559 { entry.langid "chinese" =
560 { lang.zh }
561 { entry.langid "japanese" =
562 { lang.ja }
563 { entry.langid "russian" =
564 { lang.ru }
565 { check.entry.lang }
566 if$
567 }
568 if$
569 }
570 if$
571 }
572 if$
573 }
574 if$
575 'entry.lang :=
576 }
577
578 FUNCTION {set.entry.numbered}
579 { type$ "patent" =
580 type$ "standard" = or
581 type$ "techreport" = or
582 { #1 'entry.numbered := }
583 { #0 'entry.numbered := }
584 if$
585 }
586
587 INTEGERS { nameptr namesleft numnames name.lang }
588
589 FUNCTION {format.name}
590 { "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
591 t "others" =
592 { bbl.et.al }
593 { t get.str.lang 'name.lang :=
594 name.lang lang.en =
595 { t #1 "{vv~}{ll}{ f{~}}" format.name$
596 uppercase.name
597 { "u" change.case$ }
598 'skip$
599 if$
600 t #1 "{, jj}" format.name$ *
601 }
602 { t #1 "{ll}{ff}" format.name$ }
603 if$
604 }
605 if$
606 }
607
608 FUNCTION {format.names}
609 { 's :=
610 #1 'nameptr :=
611 s num.names$ 'numnames :=
612 ""
613 numnames 'namesleft :=
614 { namesleft #0 > }
615 { s nameptr format.name bbl.et.al =
616 numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
617 { ", " *
618 bbl.et.al *
619 #1 'namesleft :=
620 }
621 { nameptr #1 >
622 { namesleft #1 = bbl.and "" = not and
623 { bbl.and * }
624 { ", " * }
625 if$
626 }
627 'skip$
628 if$
629 s nameptr format.name *
630 }
631 if$
632 nameptr #1 + 'nameptr :=
633 namesleft #1 - 'namesleft :=
634 }
635 while$
636 }
637
638 FUNCTION {format.key}
639 { empty$
640 { key field.or.null }
641 { "" }
642 if$
643 }
644
645 FUNCTION {format.authors}
646 { author empty$ not
647 { author format.names }
648 { "empty author in " cite$ * warning$
649 ""
650 }
651 if$
652 }
653
654 FUNCTION {format.editors}
655 { editor empty$
656 { "" }
657 { editor format.names }
658 if$
659 }
660
661 FUNCTION {format.translators}
662 { translator empty$
663 { "" }
664 { translator format.names
665 entry.lang lang.zh =
666 { translator num.names$ #3 >
667 { "译" * }
668 { ", 译" * }
669 if$
670 }
671 'skip$
672 if$
673 }
674 if$
675 }
676
677 FUNCTION {format.full.names}
678 {'s :=
679 #1 'nameptr :=
680 s num.names$ 'numnames :=
681 numnames 'namesleft :=
682 { namesleft #0 > }
683 { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
684 t get.str.lang 'name.lang :=
685 name.lang lang.en =
686 { t #1 "{vv~}{ll}" format.name$ 't := }
687 { t #1 "{ll}{ff}" format.name$ 't := }
688 if$
689 nameptr #1 >
690 {
691 namesleft #1 >
692 { ", " * t * }
693 {
694 numnames #2 >
695 { "," * }
696 'skip$
697 if$
698 t "others" =
699 { " et~al." * }
700 { " and " * t * }
701 if$
702 }
703 if$
704 }
705 't
706 if$
707 nameptr #1 + 'nameptr :=
708 namesleft #1 - 'namesleft :=
709 }
710 while$
711 }
712
713 FUNCTION {author.editor.full}
714 { author empty$
715 { editor empty$
716 { "" }
717 { editor format.full.names }
718 if$
719 }
720 { author format.full.names }
721 if$
722 }
723
724 FUNCTION {author.full}
725 { author empty$
726 { "" }
727 { author format.full.names }
728 if$
729 }
730
731 FUNCTION {editor.full}
732 { editor empty$
733 { "" }
734 { editor format.full.names }
735 if$
736 }
737
738 FUNCTION {make.full.names}
739 { type$ "book" =
740 type$ "inbook" = booktitle empty$ not and
741 or
742 'author.editor.full
743 { type$ "collection" =
744 type$ "proceedings" =
745 or
746 'editor.full
747 'author.full
748 if$
749 }
750 if$
751 }
752
753 FUNCTION {output.bibitem}
754 { newline$
755 "\bibitem[" write$
756 label ")" *
757 make.full.names duplicate$ short.list =
758 { pop$ }
759 { duplicate$ "]" contains
760 { "{" swap$ * "}" * }
761 'skip$
762 if$
763 *
764 }
765 if$
766 "]{" * write$
767 cite$ write$
768 "}" write$
769 newline$
770 ""
771 before.all 'output.state :=
772 }
773
774 FUNCTION {change.sentence.case}
775 { entry.lang lang.en =
776 { "t" change.case$ }
777 'skip$
778 if$
779 }
780
781 FUNCTION {add.link}
782 { url empty$ not
783 { "\href{" url * "}{" * swap$ * "}" * }
784 { doi empty$ not
785 { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * }
786 'skip$
787 if$
788 }
789 if$
790 }
791
792 FUNCTION {format.title}
793 { title empty$
794 { "" }
795 { title
796 sentence.case.title
797 'change.sentence.case
798 'skip$
799 if$
800 entry.numbered number empty$ not and
801 { bbl.colon *
802 type$ "patent" = show.patent.country and
803 { address empty$ not
804 { address * ", " * }
805 { location empty$ not
806 { location * ", " * }
807 { entry.lang lang.zh =
808 { "中国" * ", " * }
809 'skip$
810 if$
811 }
812 if$
813 }
814 if$
815 }
816 'skip$
817 if$
818 number *
819 }
820 'skip$
821 if$
822 link.title
823 'add.link
824 'skip$
825 if$
826 }
827 if$
828 }
829
830 FUNCTION {tie.or.space.connect}
831 { duplicate$ text.length$ #3 <
832 { "~" }
833 { " " }
834 if$
835 swap$ * *
836 }
837
838 FUNCTION {either.or.check}
839 { empty$
840 'pop$
841 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
842 if$
843 }
844
845 FUNCTION {is.digit}
846 { duplicate$ empty$
847 { pop$ #0 }
848 { chr.to.int$
849 duplicate$ "0" chr.to.int$ <
850 { pop$ #0 }
851 { "9" chr.to.int$ >
852 { #0 }
853 { #1 }
854 if$
855 }
856 if$
857 }
858 if$
859 }
860
861 FUNCTION {is.number}
862 { 's :=
863 s empty$
864 { #0 }
865 { s text.length$ 'charptr :=
866 { charptr #0 >
867 s charptr #1 substring$ is.digit
868 and
869 }
870 { charptr #1 - 'charptr := }
871 while$
872 charptr not
873 }
874 if$
875 }
876
877 FUNCTION {format.volume}
878 { volume empty$ not
879 { volume is.number
880 { entry.lang lang.zh =
881 { "第 " volume * " 卷" * }
882 { "Vol." volume tie.or.space.connect }
883 if$
884 }
885 { volume }
886 if$
887 }
888 { "" }
889 if$
890 }
891
892 FUNCTION {format.number}
893 { number empty$ not
894 { number is.number
895 { entry.lang lang.zh =
896 { "第 " number * " 册" * }
897 { "No." number tie.or.space.connect }
898 if$
899 }
900 { number }
901 if$
902 }
903 { "" }
904 if$
905 }
906
907 FUNCTION {format.volume.number}
908 { volume empty$ not
909 { format.volume }
910 { format.number }
911 if$
912 }
913
914 FUNCTION {format.title.vol.num}
915 { title
916 sentence.case.title
917 'change.sentence.case
918 'skip$
919 if$
920 entry.numbered
921 { number empty$ not
922 { bbl.colon * number * }
923 'skip$
924 if$
925 }
926 { format.volume.number 's :=
927 s empty$ not
928 { bbl.colon * s * }
929 'skip$
930 if$
931 }
932 if$
933 }
934
935 FUNCTION {format.series.vol.num.title}
936 { format.volume.number 's :=
937 series empty$ not
938 { series
939 sentence.case.title
940 'change.sentence.case
941 'skip$
942 if$
943 entry.numbered
944 { bbl.wide.space * }
945 { bbl.colon *
946 s empty$ not
947 { s * bbl.wide.space * }
948 'skip$
949 if$
950 }
951 if$
952 title *
953 sentence.case.title
954 'change.sentence.case
955 'skip$
956 if$
957 entry.numbered number empty$ not and
958 { bbl.colon * number * }
959 'skip$
960 if$
961 }
962 { format.title.vol.num }
963 if$
964 format.btitle
965 link.title
966 'add.link
967 'skip$
968 if$
969 }
970
971 FUNCTION {format.booktitle.vol.num}
972 { booktitle
973 entry.numbered
974 'skip$
975 { format.volume.number 's :=
976 s empty$ not
977 { bbl.colon * s * }
978 'skip$
979 if$
980 }
981 if$
982 }
983
984 FUNCTION {format.series.vol.num.booktitle}
985 { format.volume.number 's :=
986 series empty$ not
987 { series bbl.colon *
988 entry.numbered not s empty$ not and
989 { s * bbl.wide.space * }
990 'skip$
991 if$
992 booktitle *
993 }
994 { format.booktitle.vol.num }
995 if$
996 format.btitle
997 }
998
999 FUNCTION {remove.period}
1000 { 't :=
1001 "" 's :=
1002 { t empty$ not }
1003 { t #1 #1 substring$ 'tmp.str :=
1004 tmp.str "." = not
1005 { s tmp.str * 's := }
1006 'skip$
1007 if$
1008 t #2 global.max$ substring$ 't :=
1009 }
1010 while$
1011 s
1012 }
1013
1014 FUNCTION {abbreviate}
1015 { remove.period
1016 't :=
1017 t "l" change.case$ 's :=
1018 ""
1019 s "physical review letters" =
1020 { "Phys Rev Lett" }
1021 'skip$
1022 if$
1023 's :=
1024 s empty$
1025 { t }
1026 { pop$ s }
1027 if$
1028 }
1029
1030 FUNCTION {get.journal.title}
1031 { short.journal
1032 { shortjournal empty$ not
1033 { shortjournal }
1034 { journal empty$ not
1035 { journal abbreviate }
1036 { journaltitle empty$ not
1037 { journaltitle abbreviate }
1038 { "" }
1039 if$
1040 }
1041 if$
1042 }
1043 if$
1044 }
1045 { journal empty$ not
1046 { journal }
1047 { journaltitle empty$ not
1048 { journaltitle }
1049 { shortjournal empty$ not
1050 { shortjournal }
1051 { "" }
1052 if$
1053 }
1054 if$
1055 }
1056 if$
1057 }
1058 if$
1059 }
1060
1061 FUNCTION {check.arxiv.preprint}
1062 { #1 #5 substring$ purify$ "l" change.case$ "arxiv" =
1063 { #1 }
1064 { #0 }
1065 if$
1066 }
1067
1068 FUNCTION {format.journal}
1069 { get.journal.title
1070 duplicate$ empty$ not
1071 { italic.journal entry.lang lang.en = and
1072 'emphasize
1073 'skip$
1074 if$
1075 link.journal
1076 'add.link
1077 'skip$
1078 if$
1079 }
1080 'skip$
1081 if$
1082 }
1083
1084 FUNCTION {set.entry.mark}
1085 { entry.mark empty$ not
1086 'pop$
1087 { mark empty$ not
1088 { pop$ mark 'entry.mark := }
1089 { 'entry.mark := }
1090 if$
1091 }
1092 if$
1093 }
1094
1095 FUNCTION {format.mark}
1096 { show.mark
1097 { entry.mark
1098 show.medium.type
1099 { medium empty$ not
1100 { "/" * medium * }
1101 { entry.is.electronic
1102 { "/OL" * }
1103 'skip$
1104 if$
1105 }
1106 if$
1107 }
1108 'skip$
1109 if$
1110 'entry.mark :=
1111 space.before.mark
1112 { " " }
1113 { "\allowbreak" }
1114 if$
1115 "[" * entry.mark * "]" *
1116 }
1117 { "" }
1118 if$
1119 }
1120
1121 FUNCTION {num.to.ordinal}
1122 { duplicate$ text.length$ 'charptr :=
1123 duplicate$ charptr #1 substring$ 's :=
1124 s "1" =
1125 { "st" * }
1126 { s "2" =
1127 { "nd" * }
1128 { s "3" =
1129 { "rd" * }
1130 { "th" * }
1131 if$
1132 }
1133 if$
1134 }
1135 if$
1136 }
1137
1138 FUNCTION {format.edition}
1139 { edition empty$
1140 { "" }
1141 { edition is.number
1142 { edition "1" = not
1143 { entry.lang lang.zh =
1144 { edition " 版" * }
1145 { edition num.to.ordinal " ed." * }
1146 if$
1147 }
1148 'skip$
1149 if$
1150 }
1151 { entry.lang lang.en =
1152 { edition change.sentence.case 's :=
1153 s "Revised" = s "Revised edition" = or
1154 { "Rev. ed." }
1155 { s " ed." * }
1156 if$
1157 }
1158 { edition }
1159 if$
1160 }
1161 if$
1162 }
1163 if$
1164 }
1165
1166 FUNCTION {format.publisher}
1167 { publisher empty$ not
1168 { publisher }
1169 { school empty$ not
1170 { school }
1171 { organization empty$ not
1172 { organization }
1173 { institution empty$ not
1174 { institution }
1175 { "" }
1176 if$
1177 }
1178 if$
1179 }
1180 if$
1181 }
1182 if$
1183 }
1184
1185 FUNCTION {format.address.publisher}
1186 { address empty$ not
1187 { address }
1188 { location empty$ not
1189 { location }
1190 { "" }
1191 if$
1192 }
1193 if$
1194 duplicate$ empty$ not
1195 { format.publisher empty$ not
1196 { bbl.colon * format.publisher * }
1197 { entry.is.electronic not show.missing.address.publisher and
1198 { bbl.colon * bbl.sine.nomine * }
1199 'skip$
1200 if$
1201 }
1202 if$
1203 }
1204 { pop$
1205 entry.is.electronic not show.missing.address.publisher and
1206 { format.publisher empty$ not
1207 { bbl.sine.loco bbl.colon * format.publisher * }
1208 { bbl.sine.loco.sine.nomine }
1209 if$
1210 }
1211 { format.publisher empty$ not
1212 { format.publisher }
1213 { "" }
1214 if$
1215 }
1216 if$
1217 }
1218 if$
1219 }
1220
1221 FUNCTION {extract.before.dash}
1222 { duplicate$ empty$
1223 { pop$ "" }
1224 { 's :=
1225 #1 'charptr :=
1226 s text.length$ #1 + 'len :=
1227 { charptr len <
1228 s charptr #1 substring$ "-" = not
1229 and
1230 }
1231 { charptr #1 + 'charptr := }
1232 while$
1233 s #1 charptr #1 - substring$
1234 }
1235 if$
1236 }
1237
1238 FUNCTION {extract.after.dash}
1239 { duplicate$ empty$
1240 { pop$ "" }
1241 { 's :=
1242 #1 'charptr :=
1243 s text.length$ #1 + 'len :=
1244 { charptr len <
1245 s charptr #1 substring$ "-" = not
1246 and
1247 }
1248 { charptr #1 + 'charptr := }
1249 while$
1250 { charptr len <
1251 s charptr #1 substring$ "-" =
1252 and
1253 }
1254 { charptr #1 + 'charptr := }
1255 while$
1256 s charptr global.max$ substring$
1257 }
1258 if$
1259 }
1260
1261 FUNCTION {extract.before.slash}
1262 { duplicate$ empty$
1263 { pop$ "" }
1264 { 's :=
1265 #1 'charptr :=
1266 s text.length$ #1 + 'len :=
1267 { charptr len <
1268 s charptr #1 substring$ "/" = not
1269 and
1270 }
1271 { charptr #1 + 'charptr := }
1272 while$
1273 s #1 charptr #1 - substring$
1274 }
1275 if$
1276 }
1277
1278 FUNCTION {extract.after.slash}
1279 { duplicate$ empty$
1280 { pop$ "" }
1281 { 's :=
1282 #1 'charptr :=
1283 s text.length$ #1 + 'len :=
1284 { charptr len <
1285 s charptr #1 substring$ "-" = not
1286 and
1287 s charptr #1 substring$ "/" = not
1288 and
1289 }
1290 { charptr #1 + 'charptr := }
1291 while$
1292 { charptr len <
1293 s charptr #1 substring$ "-" =
1294 s charptr #1 substring$ "/" =
1295 or
1296 and
1297 }
1298 { charptr #1 + 'charptr := }
1299 while$
1300 s charptr global.max$ substring$
1301 }
1302 if$
1303 }
1304
1305 FUNCTION {format.year}
1306 { year empty$ not
1307 { year extra.label * }
1308 { date empty$ not
1309 { date extract.before.dash extra.label * }
1310 { entry.is.electronic not
1311 { "empty year in " cite$ * warning$ }
1312 'skip$
1313 if$
1314 urldate empty$ not
1315 { "[" urldate extract.before.dash * extra.label * "]" * }
1316 { "" }
1317 if$
1318 }
1319 if$
1320 }
1321 if$
1322 }
1323
1324 FUNCTION {format.periodical.year}
1325 { year empty$ not
1326 { year extract.before.slash
1327 "--" *
1328 year extract.after.slash
1329 duplicate$ empty$
1330 'pop$
1331 { * }
1332 if$
1333 }
1334 { date empty$ not
1335 { date extract.before.dash }
1336 { "empty year in " cite$ * warning$
1337 urldate empty$ not
1338 { "[" urldate extract.before.dash * "]" * }
1339 { "" }
1340 if$
1341 }
1342 if$
1343 }
1344 if$
1345 }
1346
1347 FUNCTION {format.date}
1348 { date empty$ not
1349 { type$ "patent" = type$ "newspaper" = or
1350 { date }
1351 { entrysubtype empty$ not
1352 { type$ "article" = entrysubtype "newspaper" = and
1353 { date }
1354 { format.year }
1355 if$
1356 }
1357 { format.year }
1358 if$
1359 }
1360 if$
1361 }
1362 { year empty$ not
1363 { format.year }
1364 { "" }
1365 if$
1366 }
1367 if$
1368 }
1369
1370 FUNCTION {format.editdate}
1371 { date empty$ not
1372 { "\allowbreak(" date * ")" * }
1373 { "" }
1374 if$
1375 }
1376
1377 FUNCTION {format.urldate}
1378 { show.urldate show.url and entry.url empty$ not and
1379 is.pure.electronic or
1380 urldate empty$ not and
1381 { "\allowbreak[" urldate * "]" * }
1382 { "" }
1383 if$
1384 }
1385
1386 FUNCTION {hyphenate}
1387 { 't :=
1388 ""
1389 { t empty$ not }
1390 { t #1 #1 substring$ "-" =
1391 { wave.dash.in.pages
1392 { "~" * }
1393 { "-" * }
1394 if$
1395 { t #1 #1 substring$ "-" = }
1396 { t #2 global.max$ substring$ 't := }
1397 while$
1398 }
1399 { t #1 #1 substring$ *
1400 t #2 global.max$ substring$ 't :=
1401 }
1402 if$
1403 }
1404 while$
1405 }
1406
1407 FUNCTION {format.pages}
1408 { pages empty$
1409 { "" }
1410 { pages hyphenate }
1411 if$
1412 }
1413
1414 FUNCTION {format.extracted.pages}
1415 { pages empty$
1416 { "" }
1417 { pages
1418 only.start.page
1419 'extract.before.dash
1420 'hyphenate
1421 if$
1422 }
1423 if$
1424 }
1425
1426 FUNCTION {format.journal.volume}
1427 { volume empty$ not
1428 { bold.journal.volume
1429 { "\textbf{" volume * "}" * }
1430 { volume }
1431 if$
1432 }
1433 { "" }
1434 if$
1435 }
1436
1437 FUNCTION {format.journal.number}
1438 { number empty$ not
1439 { "\allowbreak (" number * ")" * }
1440 { "" }
1441 if$
1442 }
1443
1444 FUNCTION {format.journal.pages}
1445 { pages empty$
1446 { "" }
1447 { format.extracted.pages }
1448 if$
1449 }
1450
1451 FUNCTION {format.periodical.year.volume.number}
1452 { year empty$ not
1453 { year extract.before.slash }
1454 { "empty year in periodical " cite$ * warning$ }
1455 if$
1456 volume empty$ not
1457 { ", " * volume extract.before.dash * }
1458 'skip$
1459 if$
1460 number empty$ not
1461 { "\allowbreak (" * number extract.before.dash * ")" * }
1462 'skip$
1463 if$
1464 "--" *
1465 year extract.after.slash empty$
1466 volume extract.after.dash empty$ and
1467 number extract.after.dash empty$ and not
1468 { year extract.after.slash empty$ not
1469 { year extract.after.slash * }
1470 { year extract.before.slash * }
1471 if$
1472 volume empty$ not
1473 { ", " * volume extract.after.dash * }
1474 'skip$
1475 if$
1476 number empty$ not
1477 { "\allowbreak (" * number extract.after.dash * ")" * }
1478 'skip$
1479 if$
1480 }
1481 'skip$
1482 if$
1483 }
1484
1485 FUNCTION {check.url}
1486 { url empty$ not
1487 { url 'entry.url :=
1488 #1 'entry.is.electronic :=
1489 }
1490 { howpublished empty$ not
1491 { howpublished #1 #5 substring$ "\url{" =
1492 { howpublished 'entry.url :=
1493 #1 'entry.is.electronic :=
1494 }
1495 'skip$
1496 if$
1497 }
1498 { note empty$ not
1499 { note #1 #5 substring$ "\url{" =
1500 { note 'entry.url :=
1501 #1 'entry.is.electronic :=
1502 }
1503 'skip$
1504 if$
1505 }
1506 'skip$
1507 if$
1508 }
1509 if$
1510 }
1511 if$
1512 }
1513
1514 FUNCTION {output.url}
1515 { show.url is.pure.electronic or
1516 entry.url empty$ not and
1517 { new.block
1518 entry.url #1 #5 substring$ "\url{" =
1519 { entry.url }
1520 { "\url{" entry.url * "}" * }
1521 if$
1522 output
1523 }
1524 'skip$
1525 if$
1526 }
1527
1528 FUNCTION {check.doi}
1529 { doi empty$ not
1530 { #1 'entry.is.electronic := }
1531 'skip$
1532 if$
1533 }
1534
1535 FUNCTION {is.in.url}
1536 { 's :=
1537 s empty$
1538 { #1 }
1539 { entry.url empty$
1540 { #0 }
1541 { s text.length$ 'len :=
1542 entry.url "l" change.case$ text.length$ 'charptr :=
1543 { entry.url "l" change.case$ charptr len substring$ s "l" change.case$ = not
1544 charptr #0 >
1545 and
1546 }
1547 { charptr #1 - 'charptr := }
1548 while$
1549 charptr
1550 }
1551 if$
1552 }
1553 if$
1554 }
1555
1556 FUNCTION {format.doi}
1557 { ""
1558 doi empty$ not
1559 { "" 's :=
1560 doi 't :=
1561 #0 'numnames :=
1562 { t empty$ not}
1563 { t #1 #1 substring$ 'tmp.str :=
1564 tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
1565 { t #2 #1 substring$ empty$
1566 { s tmp.str * 's := }
1567 'skip$
1568 if$
1569 s empty$ s is.in.url or
1570 'skip$
1571 { numnames #1 + 'numnames :=
1572 numnames #1 >
1573 { ", " * }
1574 { "DOI: " * }
1575 if$
1576 "\doi{" s * "}" * *
1577 }
1578 if$
1579 "" 's :=
1580 }
1581 { s tmp.str * 's := }
1582 if$
1583 t #2 global.max$ substring$ 't :=
1584 }
1585 while$
1586 }
1587 'skip$
1588 if$
1589 }
1590
1591 FUNCTION {output.doi}
1592 { doi empty$ not show.doi and
1593 show.english.translation entry.lang lang.zh = and not and
1594 { new.block
1595 format.doi output
1596 }
1597 'skip$
1598 if$
1599 }
1600
1601 FUNCTION {check.electronic}
1602 { "" 'entry.url :=
1603 #0 'entry.is.electronic :=
1604 'check.doi
1605 'skip$
1606 if$
1607 'check.url
1608 'skip$
1609 if$
1610 medium empty$ not
1611 { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
1612 { #1 'entry.is.electronic := }
1613 'skip$
1614 if$
1615 }
1616 'skip$
1617 if$
1618 }
1619
1620 FUNCTION {format.eprint}
1621 { archivePrefix empty$ not
1622 { archivePrefix }
1623 { eprinttype empty$ not
1624 { archivePrefix }
1625 { "" }
1626 if$
1627 }
1628 if$
1629 's :=
1630 s empty$ not
1631 { s ": \eprint{" *
1632 url empty$ not
1633 { url }
1634 { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
1635 if$
1636 * "}{" *
1637 eprint * "}" *
1638 }
1639 { eprint }
1640 if$
1641 }
1642
1643 FUNCTION {output.eprint}
1644 { show.preprint eprint empty$ not and
1645 { new.block
1646 format.eprint output
1647 }
1648 'skip$
1649 if$
1650 }
1651
1652 FUNCTION {format.note}
1653 { note empty$ not show.note and
1654 { note }
1655 { "" }
1656 if$
1657 }
1658
1659 FUNCTION {output.translation}
1660 { show.english.translation entry.lang lang.zh = and
1661 { translation empty$ not
1662 { translation }
1663 { "[English translation missing!]" }
1664 if$
1665 " (in Chinese)" * output
1666 write$
1667 format.doi duplicate$ empty$ not
1668 { newline$
1669 write$
1670 }
1671 'pop$
1672 if$
1673 " \\" write$
1674 newline$
1675 "(" write$
1676 ""
1677 before.all 'output.state :=
1678 }
1679 'skip$
1680 if$
1681 }
1682
1683 FUNCTION {empty.misc.check}
1684 { author empty$ title empty$
1685 year empty$
1686 and and
1687 key empty$ not and
1688 { "all relevant fields are empty in " cite$ * warning$ }
1689 'skip$
1690 if$
1691 }
1692
1693 FUNCTION {monograph}
1694 { output.bibitem
1695 output.translation
1696 author empty$ not
1697 { format.authors }
1698 { editor empty$ not
1699 { format.editors }
1700 { "empty author and editor in " cite$ * warning$
1701 ""
1702 }
1703 if$
1704 }
1705 if$
1706 output
1707 year.after.author
1708 { period.after.author
1709 'new.sentence
1710 'skip$
1711 if$
1712 format.year "year" output.check
1713 }
1714 'skip$
1715 if$
1716 new.block
1717 format.series.vol.num.title "title" output.check
1718 "M" set.entry.mark
1719 format.mark "" output.after
1720 new.block
1721 format.translators output
1722 new.sentence
1723 format.edition output
1724 new.block
1725 format.address.publisher output
1726 year.after.author not
1727 { format.year "year" output.check }
1728 'skip$
1729 if$
1730 format.pages bbl.pages.colon output.after
1731 format.urldate "" output.after
1732 output.url
1733 output.doi
1734 new.block
1735 format.note output
1736 fin.entry
1737 }
1738
1739 FUNCTION {incollection}
1740 { output.bibitem
1741 output.translation
1742 format.authors output
1743 author format.key output
1744 year.after.author
1745 { period.after.author
1746 'new.sentence
1747 'skip$
1748 if$
1749 format.year "year" output.check
1750 }
1751 'skip$
1752 if$
1753 new.block
1754 format.title "title" output.check
1755 "M" set.entry.mark
1756 format.mark "" output.after
1757 new.block
1758 format.translators output
1759 new.slash
1760 format.editors output
1761 new.block
1762 format.series.vol.num.booktitle "booktitle" output.check
1763 new.block
1764 format.edition output
1765 new.block
1766 format.address.publisher output
1767 year.after.author not
1768 { format.year "year" output.check }
1769 'skip$
1770 if$
1771 format.extracted.pages bbl.pages.colon output.after
1772 format.urldate "" output.after
1773 output.url
1774 output.doi
1775 new.block
1776 format.note output
1777 fin.entry
1778 }
1779
1780 FUNCTION {periodical}
1781 { output.bibitem
1782 output.translation
1783 format.authors output
1784 author format.key output
1785 year.after.author
1786 { period.after.author
1787 'new.sentence
1788 'skip$
1789 if$
1790 format.year "year" output.check
1791 }
1792 'skip$
1793 if$
1794 new.block
1795 format.title "title" output.check
1796 "J" set.entry.mark
1797 format.mark "" output.after
1798 new.block
1799 format.periodical.year.volume.number output
1800 new.block
1801 format.address.publisher output
1802 year.after.author not
1803 { format.periodical.year "year" output.check }
1804 'skip$
1805 if$
1806 format.urldate "" output.after
1807 output.url
1808 output.doi
1809 new.block
1810 format.note output
1811 fin.entry
1812 }
1813
1814 FUNCTION {journal.article}
1815 { output.bibitem
1816 output.translation
1817 format.authors output
1818 author format.key output
1819 year.after.author
1820 { period.after.author
1821 'new.sentence
1822 'skip$
1823 if$
1824 format.year "year" output.check
1825 }
1826 'skip$
1827 if$
1828 new.block
1829 title.in.journal
1830 { format.title "title" output.check
1831 entrysubtype empty$ not
1832 {
1833 entrysubtype "newspaper" =
1834 { "N" set.entry.mark }
1835 { "J" set.entry.mark }
1836 if$
1837 }
1838 { "J" set.entry.mark }
1839 if$
1840 format.mark "" output.after
1841 new.block
1842 }
1843 'skip$
1844 if$
1845 format.journal "journal" output.check
1846 year.after.author not
1847 { format.date "year" output.check }
1848 'skip$
1849 if$
1850 format.journal.volume output
1851 format.journal.number "" output.after
1852 format.journal.pages bbl.pages.colon output.after
1853 format.urldate "" output.after
1854 output.url
1855 output.doi
1856 new.block
1857 format.note output
1858 fin.entry
1859 }
1860
1861 FUNCTION {patent}
1862 { output.bibitem
1863 output.translation
1864 format.authors output
1865 author format.key output
1866 year.after.author
1867 { period.after.author
1868 'new.sentence
1869 'skip$
1870 if$
1871 format.year "year" output.check
1872 }
1873 'skip$
1874 if$
1875 new.block
1876 format.title "title" output.check
1877 "P" set.entry.mark
1878 format.mark "" output.after
1879 new.block
1880 format.date "year" output.check
1881 format.urldate "" output.after
1882 output.url
1883 output.doi
1884 new.block
1885 format.note output
1886 fin.entry
1887 }
1888
1889 FUNCTION {electronic}
1890 { #1 #1 check.electronic
1891 #1 'entry.is.electronic :=
1892 #1 'is.pure.electronic :=
1893 output.bibitem
1894 output.translation
1895 format.authors output
1896 author format.key output
1897 year.after.author
1898 { period.after.author
1899 'new.sentence
1900 'skip$
1901 if$
1902 format.year "year" output.check
1903 }
1904 'skip$
1905 if$
1906 new.block
1907 format.series.vol.num.title "title" output.check
1908 "EB" set.entry.mark
1909 format.mark "" output.after
1910 new.block
1911 format.address.publisher output
1912 year.after.author not
1913 { date empty$
1914 { format.date output }
1915 'skip$
1916 if$
1917 }
1918 'skip$
1919 if$
1920 format.pages bbl.pages.colon output.after
1921 format.editdate "" output.after
1922 format.urldate "" output.after
1923 output.url
1924 output.doi
1925 new.block
1926 format.note output
1927 fin.entry
1928 }
1929
1930 FUNCTION {preprint}
1931 { output.bibitem
1932 output.translation
1933 author empty$ not
1934 { format.authors }
1935 { editor empty$ not
1936 { format.editors }
1937 { "empty author and editor in " cite$ * warning$
1938 ""
1939 }
1940 if$
1941 }
1942 if$
1943 output
1944 year.after.author
1945 { period.after.author
1946 'new.sentence
1947 'skip$
1948 if$
1949 format.year "year" output.check
1950 }
1951 'skip$
1952 if$
1953 new.block
1954 title.in.journal
1955 { format.series.vol.num.title "title" output.check
1956 "A" set.entry.mark
1957 format.mark "" output.after
1958 new.block
1959 }
1960 'skip$
1961 if$
1962 format.translators output
1963 new.sentence
1964 format.edition output
1965 new.block
1966 year.after.author not
1967 { date empty$
1968 { format.date output }
1969 'skip$
1970 if$
1971 }
1972 'skip$
1973 if$
1974 format.pages bbl.pages.colon output.after
1975 format.editdate "" output.after
1976 format.urldate "" output.after
1977 output.eprint
1978 output.url
1979 show.preprint not eprint empty$ or
1980 'output.doi
1981 'skip$
1982 if$
1983 new.block
1984 format.note output
1985 fin.entry
1986 }
1987
1988 FUNCTION {misc}
1989 { get.journal.title
1990 duplicate$ empty$ not
1991 { check.arxiv.preprint
1992 'preprint
1993 'journal.article
1994 if$
1995 }
1996 { pop$
1997 booktitle empty$ not
1998 'incollection
1999 { publisher empty$ not
2000 'monograph
2001 { eprint empty$ not archivePrefix empty$ not or
2002 'preprint
2003 { entry.is.electronic
2004 'electronic
2005 {
2006 "Z" set.entry.mark
2007 monograph
2008 }
2009 if$
2010 }
2011 if$
2012 }
2013 if$
2014 }
2015 if$
2016 }
2017 if$
2018 empty.misc.check
2019 }
2020
2021 FUNCTION {archive}
2022 { "A" set.entry.mark
2023 misc
2024 }
2025
2026 FUNCTION {article} { misc }
2027
2028 FUNCTION {book} { monograph }
2029
2030 FUNCTION {booklet} { book }
2031
2032 FUNCTION {collection}
2033 { "G" set.entry.mark
2034 monograph
2035 }
2036
2037 FUNCTION {database}
2038 { "DB" set.entry.mark
2039 electronic
2040 }
2041
2042 FUNCTION {dataset}
2043 { "DS" set.entry.mark
2044 electronic
2045 }
2046
2047 FUNCTION {inbook} {
2048 booktitle empty$
2049 'book
2050 'incollection
2051 if$
2052 }
2053
2054 FUNCTION {inproceedings}
2055 { "C" set.entry.mark
2056 incollection
2057 }
2058
2059 FUNCTION {conference} { inproceedings }
2060
2061 FUNCTION {legislation} { archive }
2062
2063 FUNCTION {map}
2064 { "CM" set.entry.mark
2065 misc
2066 }
2067
2068 FUNCTION {manual} { monograph }
2069
2070 FUNCTION {mastersthesis}
2071 { "D" set.entry.mark
2072 monograph
2073 }
2074
2075 FUNCTION {newspaper}
2076 { "N" set.entry.mark
2077 article
2078 }
2079
2080 FUNCTION {online}
2081 { "EB" set.entry.mark
2082 electronic
2083 }
2084
2085 FUNCTION {phdthesis} { mastersthesis }
2086
2087 FUNCTION {proceedings}
2088 { "C" set.entry.mark
2089 monograph
2090 }
2091
2092 FUNCTION {software}
2093 { "CP" set.entry.mark
2094 electronic
2095 }
2096
2097 FUNCTION {standard}
2098 { "S" set.entry.mark
2099 misc
2100 }
2101
2102 FUNCTION {techreport}
2103 { "R" set.entry.mark
2104 misc
2105 }
2106
2107 FUNCTION {unpublished} { misc }
2108
2109 FUNCTION {default.type} { misc }
2110
2111 MACRO {jan} {"January"}
2112
2113 MACRO {feb} {"February"}
2114
2115 MACRO {mar} {"March"}
2116
2117 MACRO {apr} {"April"}
2118
2119 MACRO {may} {"May"}
2120
2121 MACRO {jun} {"June"}
2122
2123 MACRO {jul} {"July"}
2124
2125 MACRO {aug} {"August"}
2126
2127 MACRO {sep} {"September"}
2128
2129 MACRO {oct} {"October"}
2130
2131 MACRO {nov} {"November"}
2132
2133 MACRO {dec} {"December"}
2134
2135 MACRO {acmcs} {"ACM Computing Surveys"}
2136
2137 MACRO {acta} {"Acta Informatica"}
2138
2139 MACRO {cacm} {"Communications of the ACM"}
2140
2141 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
2142
2143 MACRO {ibmsj} {"IBM Systems Journal"}
2144
2145 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
2146
2147 MACRO {ieeetc} {"IEEE Transactions on Computers"}
2148
2149 MACRO {ieeetcad}
2150 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
2151
2152 MACRO {ipl} {"Information Processing Letters"}
2153
2154 MACRO {jacm} {"Journal of the ACM"}
2155
2156 MACRO {jcss} {"Journal of Computer and System Sciences"}
2157
2158 MACRO {scp} {"Science of Computer Programming"}
2159
2160 MACRO {sicomp} {"SIAM Journal on Computing"}
2161
2162 MACRO {tocs} {"ACM Transactions on Computer Systems"}
2163
2164 MACRO {tods} {"ACM Transactions on Database Systems"}
2165
2166 MACRO {tog} {"ACM Transactions on Graphics"}
2167
2168 MACRO {toms} {"ACM Transactions on Mathematical Software"}
2169
2170 MACRO {toois} {"ACM Transactions on Office Information Systems"}
2171
2172 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
2173
2174 MACRO {tcs} {"Theoretical Computer Science"}
2175
2176 FUNCTION {sortify}
2177 { purify$
2178 "l" change.case$
2179 }
2180
2181 FUNCTION {chop.word}
2182 { 's :=
2183 'len :=
2184 s #1 len substring$ =
2185 { s len #1 + global.max$ substring$ }
2186 's
2187 if$
2188 }
2189
2190 FUNCTION {format.lab.name}
2191 { "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
2192 t "others" =
2193 { citation.et.al }
2194 { t get.str.lang 'name.lang :=
2195 name.lang lang.zh = name.lang lang.ja = or
2196 { t #1 "{ll}{ff}" format.name$ }
2197 { t #1 "{vv~}{ll}" format.name$ }
2198 if$
2199 }
2200 if$
2201 }
2202
2203 FUNCTION {format.lab.names}
2204 { 's :=
2205 s #1 format.lab.name 'short.label :=
2206 #1 'nameptr :=
2207 s num.names$ 'numnames :=
2208 ""
2209 numnames 'namesleft :=
2210 { namesleft #0 > }
2211 { s nameptr format.lab.name citation.et.al =
2212 numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
2213 { bbl.space *
2214 citation.et.al *
2215 #1 'namesleft :=
2216 }
2217 { nameptr #1 >
2218 { namesleft #1 = citation.and "" = not and
2219 { citation.and * }
2220 { ", " * }
2221 if$
2222 }
2223 'skip$
2224 if$
2225 s nameptr format.lab.name *
2226 }
2227 if$
2228 nameptr #1 + 'nameptr :=
2229 namesleft #1 - 'namesleft :=
2230 }
2231 while$
2232 }
2233
2234 FUNCTION {author.key.label}
2235 { author empty$
2236 { key empty$
2237 { cite$ #1 #3 substring$ }
2238 'key
2239 if$
2240 }
2241 { author format.lab.names }
2242 if$
2243 }
2244
2245 FUNCTION {author.editor.key.label}
2246 { author empty$
2247 { editor empty$
2248 { key empty$
2249 { cite$ #1 #3 substring$ }
2250 'key
2251 if$
2252 }
2253 { editor format.lab.names }
2254 if$
2255 }
2256 { author format.lab.names }
2257 if$
2258 }
2259
2260 FUNCTION {author.key.organization.label}
2261 { author empty$
2262 { key empty$
2263 { organization empty$
2264 { cite$ #1 #3 substring$ }
2265 { "The " #4 organization chop.word #3 text.prefix$ }
2266 if$
2267 }
2268 'key
2269 if$
2270 }
2271 { author format.lab.names }
2272 if$
2273 }
2274
2275 FUNCTION {editor.key.organization.label}
2276 { editor empty$
2277 { key empty$
2278 { organization empty$
2279 { cite$ #1 #3 substring$ }
2280 { "The " #4 organization chop.word #3 text.prefix$ }
2281 if$
2282 }
2283 'key
2284 if$
2285 }
2286 { editor format.lab.names }
2287 if$
2288 }
2289
2290 FUNCTION {calc.short.authors}
2291 { "" 'short.label :=
2292 type$ "book" =
2293 type$ "inbook" = booktitle empty$ not and
2294 or
2295 'author.editor.key.label
2296 { type$ "collection" =
2297 type$ "proceedings" =
2298 or
2299 { editor empty$ not
2300 'editor.key.organization.label
2301 'author.key.organization.label
2302 if$
2303 }
2304 'author.key.label
2305 if$
2306 }
2307 if$
2308 'short.list :=
2309 short.label empty$
2310 { short.list 'short.label := }
2311 'skip$
2312 if$
2313 }
2314
2315 FUNCTION {calc.label}
2316 { calc.short.authors
2317 short.list "]" contains
2318 { "{" short.list * "}" * }
2319 { short.list }
2320 if$
2321 "("
2322 *
2323 format.year duplicate$ empty$
2324 short.list key field.or.null = or
2325 { pop$ "" }
2326 'skip$
2327 if$
2328 duplicate$ "]" contains
2329 { "{" swap$ * "}" * }
2330 'skip$
2331 if$
2332 *
2333 'label :=
2334 short.label
2335 "("
2336 *
2337 format.year duplicate$ empty$
2338 short.list key field.or.null = or
2339 { pop$ "" }
2340 'skip$
2341 if$
2342 *
2343 'short.label :=
2344 }
2345
2346 INTEGERS { seq.num }
2347
2348 FUNCTION {init.seq}
2349 { #0 'seq.num :=}
2350
2351 FUNCTION {int.to.fix}
2352 { "000000000" swap$ int.to.str$ *
2353 #-1 #10 substring$
2354 }
2355
2356 FUNCTION {presort}
2357 { set.entry.lang
2358 set.entry.numbered
2359 show.url show.doi check.electronic
2360 #0 'is.pure.electronic :=
2361 calc.label
2362 label sortify
2363 " "
2364 *
2365 seq.num #1 + 'seq.num :=
2366 seq.num int.to.fix
2367 'sort.label :=
2368 sort.label *
2369 #1 entry.max$ substring$
2370 'sort.key$ :=
2371 }
2372
2373 STRINGS { longest.label last.label next.extra last.extra.label }
2374
2375 INTEGERS { longest.label.width number.label }
2376
2377 FUNCTION {initialize.longest.label}
2378 { "" 'longest.label :=
2379 #0 int.to.chr$ 'last.label :=
2380 "" 'next.extra :=
2381 #0 'longest.label.width :=
2382 #0 'number.label :=
2383 "" 'last.extra.label :=
2384 }
2385
2386 FUNCTION {forward.pass}
2387 {
2388 number.label #1 + 'number.label :=
2389 }
2390
2391 FUNCTION {reverse.pass}
2392 {
2393 label extra.label * 'label :=
2394 }
2395
2396 FUNCTION {bib.sort.order}
2397 { sort.label 'sort.key$ :=
2398 }
2399
2400 FUNCTION {begin.bib}
2401 { preamble$ empty$
2402 'skip$
2403 { preamble$ write$ newline$ }
2404 if$
2405 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
2406 write$ newline$
2407 terms.in.macro
2408 { "\providecommand{\biband}{和}"
2409 write$ newline$
2410 "\providecommand{\bibetal}{等}"
2411 write$ newline$
2412 }
2413 'skip$
2414 if$
2415 "\providecommand{\natexlab}[1]{#1}"
2416 write$ newline$
2417 "\providecommand{\url}[1]{#1}"
2418 write$ newline$
2419 "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
2420 write$ newline$
2421 " \urlstyle{same}\fi"
2422 write$ newline$
2423 "\expandafter\ifx\csname href\endcsname\relax"
2424 write$ newline$
2425 " \DeclareUrlCommand\doi{\urlstyle{rm}}"
2426 write$ newline$
2427 " \def\eprint#1#2{#2}"
2428 write$ newline$
2429 "\else"
2430 write$ newline$
2431 " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}"
2432 write$ newline$
2433 " \let\eprint\href"
2434 write$ newline$
2435 "\fi"
2436 write$ newline$
2437 }
2438
2439 FUNCTION {end.bib}
2440 { newline$
2441 "\end{thebibliography}" write$ newline$
2442 }
2443
2444 READ
2445
2446 EXECUTE {init.state.consts}
2447
2448 EXECUTE {load.config}
2449
2450 EXECUTE {init.seq}
2451
2452 ITERATE {presort}
2453
2454 SORT
2455
2456 EXECUTE {initialize.longest.label}
2457
2458 ITERATE {forward.pass}
2459
2460 REVERSE {reverse.pass}
2461
2462 ITERATE {bib.sort.order}
2463
2464 SORT
2465
2466 EXECUTE {begin.bib}
2467
2468 ITERATE {call.type$}
2469
2470 EXECUTE {end.bib}