Debian Codegraph @

texmf-dist/bibtex/bst/nxuthesis/nxuthesis-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 extract.before.slash 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{" 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 output
1519 }
1520 'skip$
1521 if$
1522 }
1523
1524 FUNCTION {check.doi}
1525 { doi empty$ not
1526 { #1 'entry.is.electronic := }
1527 'skip$
1528 if$
1529 }
1530
1531 FUNCTION {is.in.url}
1532 { 's :=
1533 s empty$
1534 { #1 }
1535 { entry.url empty$
1536 { #0 }
1537 { s text.length$ 'len :=
1538 entry.url text.length$ 'charptr :=
1539 { entry.url charptr len substring$ s = not
1540 charptr #0 >
1541 and
1542 }
1543 { charptr #1 - 'charptr := }
1544 while$
1545 charptr
1546 }
1547 if$
1548 }
1549 if$
1550 }
1551
1552 FUNCTION {format.doi}
1553 { ""
1554 doi empty$ not
1555 { "" 's :=
1556 doi 't :=
1557 #0 'numnames :=
1558 { t empty$ not}
1559 { t #1 #1 substring$ 'tmp.str :=
1560 tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
1561 { t #2 #1 substring$ empty$
1562 { s tmp.str * 's := }
1563 'skip$
1564 if$
1565 s empty$ s is.in.url or
1566 'skip$
1567 { numnames #1 + 'numnames :=
1568 numnames #1 >
1569 { ", " * }
1570 { "DOI: " * }
1571 if$
1572 "\doi{" s * "}" * *
1573 }
1574 if$
1575 "" 's :=
1576 }
1577 { s tmp.str * 's := }
1578 if$
1579 t #2 global.max$ substring$ 't :=
1580 }
1581 while$
1582 }
1583 'skip$
1584 if$
1585 }
1586
1587 FUNCTION {output.doi}
1588 { doi empty$ not show.doi and
1589 show.english.translation entry.lang lang.zh = and not and
1590 { new.block
1591 format.doi output
1592 }
1593 'skip$
1594 if$
1595 }
1596
1597 FUNCTION {check.electronic}
1598 { "" 'entry.url :=
1599 #0 'entry.is.electronic :=
1600 'check.doi
1601 'skip$
1602 if$
1603 'check.url
1604 'skip$
1605 if$
1606 medium empty$ not
1607 { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
1608 { #1 'entry.is.electronic := }
1609 'skip$
1610 if$
1611 }
1612 'skip$
1613 if$
1614 }
1615
1616 FUNCTION {format.eprint}
1617 { archivePrefix empty$ not
1618 { archivePrefix }
1619 { eprinttype empty$ not
1620 { archivePrefix }
1621 { "" }
1622 if$
1623 }
1624 if$
1625 's :=
1626 s empty$ not
1627 { s ": \eprint{" *
1628 url empty$ not
1629 { url }
1630 { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
1631 if$
1632 * "}{" *
1633 eprint * "}" *
1634 }
1635 { eprint }
1636 if$
1637 }
1638
1639 FUNCTION {output.eprint}
1640 { show.preprint eprint empty$ not and
1641 { new.block
1642 format.eprint output
1643 }
1644 'skip$
1645 if$
1646 }
1647
1648 FUNCTION {format.note}
1649 { note empty$ not show.note and
1650 { note }
1651 { "" }
1652 if$
1653 }
1654
1655 FUNCTION {output.translation}
1656 { show.english.translation entry.lang lang.zh = and
1657 { translation empty$ not
1658 { translation }
1659 { "[English translation missing!]" }
1660 if$
1661 " (in Chinese)" * output
1662 write$
1663 format.doi duplicate$ empty$ not
1664 { newline$
1665 write$
1666 }
1667 'pop$
1668 if$
1669 " \\" write$
1670 newline$
1671 "(" write$
1672 ""
1673 before.all 'output.state :=
1674 }
1675 'skip$
1676 if$
1677 }
1678
1679 FUNCTION {empty.misc.check}
1680 { author empty$ title empty$
1681 year empty$
1682 and and
1683 key empty$ not and
1684 { "all relevant fields are empty in " cite$ * warning$ }
1685 'skip$
1686 if$
1687 }
1688
1689 FUNCTION {monograph}
1690 { output.bibitem
1691 output.translation
1692 author empty$ not
1693 { format.authors }
1694 { editor empty$ not
1695 { format.editors }
1696 { "empty author and editor in " cite$ * warning$
1697 ""
1698 }
1699 if$
1700 }
1701 if$
1702 output
1703 year.after.author
1704 { period.after.author
1705 'new.sentence
1706 'skip$
1707 if$
1708 format.year "year" output.check
1709 }
1710 'skip$
1711 if$
1712 new.block
1713 format.series.vol.num.title "title" output.check
1714 "M" set.entry.mark
1715 format.mark "" output.after
1716 new.block
1717 format.translators output
1718 new.sentence
1719 format.edition output
1720 new.block
1721 format.address.publisher output
1722 year.after.author not
1723 { format.year "year" output.check }
1724 'skip$
1725 if$
1726 format.pages bbl.pages.colon output.after
1727 format.urldate "" output.after
1728 output.url
1729 output.doi
1730 new.block
1731 format.note output
1732 fin.entry
1733 }
1734
1735 FUNCTION {incollection}
1736 { output.bibitem
1737 output.translation
1738 format.authors output
1739 author format.key output
1740 year.after.author
1741 { period.after.author
1742 'new.sentence
1743 'skip$
1744 if$
1745 format.year "year" output.check
1746 }
1747 'skip$
1748 if$
1749 new.block
1750 format.title "title" output.check
1751 "M" set.entry.mark
1752 format.mark "" output.after
1753 new.block
1754 format.translators output
1755 new.slash
1756 format.editors output
1757 new.block
1758 format.series.vol.num.booktitle "booktitle" output.check
1759 new.block
1760 format.edition output
1761 new.block
1762 format.address.publisher output
1763 year.after.author not
1764 { format.year "year" output.check }
1765 'skip$
1766 if$
1767 format.extracted.pages bbl.pages.colon output.after
1768 format.urldate "" output.after
1769 output.url
1770 output.doi
1771 new.block
1772 format.note output
1773 fin.entry
1774 }
1775
1776 FUNCTION {periodical}
1777 { output.bibitem
1778 output.translation
1779 format.authors output
1780 author format.key output
1781 year.after.author
1782 { period.after.author
1783 'new.sentence
1784 'skip$
1785 if$
1786 format.year "year" output.check
1787 }
1788 'skip$
1789 if$
1790 new.block
1791 format.title "title" output.check
1792 "J" set.entry.mark
1793 format.mark "" output.after
1794 new.block
1795 format.periodical.year.volume.number output
1796 new.block
1797 format.address.publisher output
1798 year.after.author not
1799 { format.periodical.year "year" output.check }
1800 'skip$
1801 if$
1802 format.urldate "" output.after
1803 output.url
1804 output.doi
1805 new.block
1806 format.note output
1807 fin.entry
1808 }
1809
1810 FUNCTION {journal.article}
1811 { output.bibitem
1812 output.translation
1813 format.authors output
1814 author format.key output
1815 year.after.author
1816 { period.after.author
1817 'new.sentence
1818 'skip$
1819 if$
1820 format.year "year" output.check
1821 }
1822 'skip$
1823 if$
1824 new.block
1825 title.in.journal
1826 { format.title "title" output.check
1827 entrysubtype empty$ not
1828 {
1829 entrysubtype "newspaper" =
1830 { "N" set.entry.mark }
1831 { "J" set.entry.mark }
1832 if$
1833 }
1834 { "J" set.entry.mark }
1835 if$
1836 format.mark "" output.after
1837 new.block
1838 }
1839 'skip$
1840 if$
1841 format.journal "journal" output.check
1842 year.after.author not
1843 { format.date "year" output.check }
1844 'skip$
1845 if$
1846 format.journal.volume output
1847 format.journal.number "" output.after
1848 format.journal.pages bbl.pages.colon output.after
1849 format.urldate "" output.after
1850 output.url
1851 output.doi
1852 new.block
1853 format.note output
1854 fin.entry
1855 }
1856
1857 FUNCTION {patent}
1858 { output.bibitem
1859 output.translation
1860 format.authors output
1861 author format.key output
1862 year.after.author
1863 { period.after.author
1864 'new.sentence
1865 'skip$
1866 if$
1867 format.year "year" output.check
1868 }
1869 'skip$
1870 if$
1871 new.block
1872 format.title "title" output.check
1873 "P" set.entry.mark
1874 format.mark "" output.after
1875 new.block
1876 format.date "year" output.check
1877 format.urldate "" output.after
1878 output.url
1879 output.doi
1880 new.block
1881 format.note output
1882 fin.entry
1883 }
1884
1885 FUNCTION {electronic}
1886 { #1 #1 check.electronic
1887 #1 'entry.is.electronic :=
1888 #1 'is.pure.electronic :=
1889 output.bibitem
1890 output.translation
1891 format.authors output
1892 author format.key output
1893 year.after.author
1894 { period.after.author
1895 'new.sentence
1896 'skip$
1897 if$
1898 format.year "year" output.check
1899 }
1900 'skip$
1901 if$
1902 new.block
1903 format.series.vol.num.title "title" output.check
1904 "EB" set.entry.mark
1905 format.mark "" output.after
1906 new.block
1907 format.address.publisher output
1908 year.after.author not
1909 { date empty$
1910 { format.date output }
1911 'skip$
1912 if$
1913 }
1914 'skip$
1915 if$
1916 format.pages bbl.pages.colon output.after
1917 format.editdate "" output.after
1918 format.urldate "" output.after
1919 output.url
1920 output.doi
1921 new.block
1922 format.note output
1923 fin.entry
1924 }
1925
1926 FUNCTION {preprint}
1927 { output.bibitem
1928 output.translation
1929 author empty$ not
1930 { format.authors }
1931 { editor empty$ not
1932 { format.editors }
1933 { "empty author and editor in " cite$ * warning$
1934 ""
1935 }
1936 if$
1937 }
1938 if$
1939 output
1940 year.after.author
1941 { period.after.author
1942 'new.sentence
1943 'skip$
1944 if$
1945 format.year "year" output.check
1946 }
1947 'skip$
1948 if$
1949 new.block
1950 title.in.journal
1951 { format.series.vol.num.title "title" output.check
1952 "A" set.entry.mark
1953 format.mark "" output.after
1954 new.block
1955 }
1956 'skip$
1957 if$
1958 format.translators output
1959 new.sentence
1960 format.edition output
1961 new.block
1962 year.after.author not
1963 { date empty$
1964 { format.date output }
1965 'skip$
1966 if$
1967 }
1968 'skip$
1969 if$
1970 format.pages bbl.pages.colon output.after
1971 format.editdate "" output.after
1972 format.urldate "" output.after
1973 output.eprint
1974 output.url
1975 show.preprint not eprint empty$ or
1976 'output.doi
1977 'skip$
1978 if$
1979 new.block
1980 format.note output
1981 fin.entry
1982 }
1983
1984 FUNCTION {misc}
1985 { get.journal.title
1986 duplicate$ empty$ not
1987 { check.arxiv.preprint
1988 'preprint
1989 'journal.article
1990 if$
1991 }
1992 { pop$
1993 booktitle empty$ not
1994 'incollection
1995 { publisher empty$ not
1996 'monograph
1997 { eprint empty$ not archivePrefix empty$ not or
1998 'preprint
1999 { entry.is.electronic
2000 'electronic
2001 {
2002 "Z" set.entry.mark
2003 monograph
2004 }
2005 if$
2006 }
2007 if$
2008 }
2009 if$
2010 }
2011 if$
2012 }
2013 if$
2014 empty.misc.check
2015 }
2016
2017 FUNCTION {archive}
2018 { "A" set.entry.mark
2019 misc
2020 }
2021
2022 FUNCTION {article} { misc }
2023
2024 FUNCTION {book} { monograph }
2025
2026 FUNCTION {booklet} { book }
2027
2028 FUNCTION {collection}
2029 { "G" set.entry.mark
2030 monograph
2031 }
2032
2033 FUNCTION {database}
2034 { "DB" set.entry.mark
2035 electronic
2036 }
2037
2038 FUNCTION {dataset}
2039 { "DS" set.entry.mark
2040 electronic
2041 }
2042
2043 FUNCTION {inbook} {
2044 booktitle empty$
2045 'book
2046 'incollection
2047 if$
2048 }
2049
2050 FUNCTION {inproceedings}
2051 { "C" set.entry.mark
2052 incollection
2053 }
2054
2055 FUNCTION {conference} { inproceedings }
2056
2057 FUNCTION {legislation} { archive }
2058
2059 FUNCTION {map}
2060 { "CM" set.entry.mark
2061 misc
2062 }
2063
2064 FUNCTION {manual} { monograph }
2065
2066 FUNCTION {thesis}
2067 { "D" set.entry.mark
2068 monograph
2069 }
2070
2071 FUNCTION {newspaper}
2072 { "N" set.entry.mark
2073 article
2074 }
2075
2076 FUNCTION {online}
2077 { "EB" set.entry.mark
2078 electronic
2079 }
2080
2081 FUNCTION {mastersthesis} { thesis }
2082
2083 FUNCTION {phdthesis} { thesis }
2084
2085 FUNCTION {proceedings}
2086 { "C" set.entry.mark
2087 monograph
2088 }
2089
2090 FUNCTION {software}
2091 { "CP" set.entry.mark
2092 electronic
2093 }
2094
2095 FUNCTION {standard}
2096 { "S" set.entry.mark
2097 misc
2098 }
2099
2100 FUNCTION {report}
2101 { "R" set.entry.mark
2102 misc
2103 }
2104
2105 FUNCTION {techreport} { report }
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}