Debian Codegraph @

texmf-dist/doc/latex/seuthesis/zharticle/zharticle.bst

raw
1 % Copyright (C) 2008 by Nobel Huang <[email protected]>
2 % $Id$
3 %
4 % This file is part of the zharticle package project.
5 % ---------------------------------------------------
6 % This file may be distributed and/or modified under the
7 % conditions of the GNU General Public License v3
8 % of this license or (at your option) any later version.
9 % The latest version of this license is in:
10 %
11 % http://www.gnu.org/licenses/gpl.html
12 %
13 % modified from seuthesis.bst by Xu Yuan
14
15 ENTRY
16 { address
17 author
18 booktitle
19 chapter
20 edition
21 editor
22 howpublished
23 institution
24 journal
25 key
26 month
27 note
28 number
29 organization
30 pages
31 publisher
32 school
33 series
34 title
35 type
36 volume
37 year
38 url
39 TypeofLit %新加入:文献类型和标志代码
40 normalauthor %不改变大小写的作者
41 normaleditor %不改变大小写的编者
42 translator %新加入:翻译者
43 date %日期,公告日期,公开日期
44 modifydate %修改日期
45 citedate %引用日期
46 patentid %专利号
47 country %国家(主要用于专利中)
48 miscyear %其它类中用于输出年份
49 startyear %起始年
50 startvolume %起始卷
51 startnumber %起始期
52 endyear %终止年
53 endvolume %终止卷
54 endnumber %终止期
55 language %默认是英文文献,非空则表明是中文文献
56 }
57 {}
58 { label extra.label sort.label short.list }
59
60 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
61
62 FUNCTION {new.block}
63 { output.state before.all =
64 'skip$
65 { after.block 'output.state := }
66 if$
67 }
68
69 FUNCTION {remove.dots}
70 {
71 }
72
73 FUNCTION {tie.or.space.connect}
74 { duplicate$ text.length$ #3 <
75 { "~" }
76 { " " }
77 if$
78 swap$ * *
79 }
80
81 FUNCTION {format.url}
82 { url empty$
83 { "" }
84 { new.block
85 "\url{" url * "}" * }
86 if$
87 }
88 FUNCTION {init.state.consts}
89 { #0 'before.all :=
90 #1 'mid.sentence :=
91 #2 'after.sentence :=
92 #3 'after.block :=
93 }
94
95 STRINGS { s t }
96
97
98
99 FUNCTION {output.nonnull}
100 { 's :=
101 output.state mid.sentence =
102 { ", " * write$ }
103 { output.state after.block =
104 { add.period$ write$
105 newline$
106 "\newblock " write$
107 }
108 { output.state before.all =
109 'write$
110 { add.period$ " " * write$ }
111 if$
112 }
113 if$
114 mid.sentence 'output.state :=
115 }
116 if$
117 s
118 }
119
120 FUNCTION {output}
121 { duplicate$ empty$
122 'pop$
123 'output.nonnull
124 if$
125 }
126
127 FUNCTION {coutput.nonnull} %wk
128 { 's :=
129 output.state mid.sentence =
130 { "," * write$ } %
131 { output.state after.block =
132 { add.period$ write$
133 newline$
134 "\newblock " write$
135 }
136 { output.state before.all =
137 'write$
138 { add.period$ " " * write$ }
139 if$
140 }
141 if$
142 mid.sentence 'output.state :=
143 }
144 if$
145 s
146 }
147
148 FUNCTION {coutput} %wk
149 { duplicate$ empty$
150 'pop$
151 'coutput.nonnull
152 if$
153 }
154
155 FUNCTION {output.check}
156 { 't :=
157 duplicate$ empty$
158 { pop$ "empty " t * " in " * cite$ * warning$ }
159 'output.nonnull
160 if$
161 }
162
163 FUNCTION {coutput.check} %wk
164 { 't :=
165 duplicate$ empty$
166 { pop$ "empty " t * " in " * cite$ * warning$ }
167 'coutput.nonnull
168 if$
169 }
170
171 FUNCTION {output.year.month.check}
172 { year empty$
173 { "empty year in " cite$ * warning$ }
174 { add.period$ write$
175 month empty$
176 { " " year * extra.label * "." *
177 after.sentence 'output.state :=
178 }
179 { " " year * extra.label * " (" * month * ")." *
180 after.sentence 'output.state :=
181 }
182 if$
183 }
184 if$
185 }
186
187 FUNCTION {output.cyear.month.check} %wk
188 { year empty$
189 { "empty year in " cite$ * warning$ }
190 {write$
191 month empty$
192 {year %wk
193 after.sentence 'output.state :=
194 }
195 { "" year * extra.label * "(" * month * ")" * %wk
196 after.sentence 'output.state :=
197 }
198 if$
199 }
200 if$
201 }
202
203
204 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
205 FUNCTION {output.modifydate.check}
206 {modifydate
207 }
208
209 FUNCTION {output.citedate.check}
210 { year empty$
211 { "" }
212 { write$
213 "[" citedate * extra.label * "]" *
214 after.sentence 'output.state :=
215 }
216 if$
217 }
218
219
220 FUNCTION {output.year.check}
221 { year empty$
222 { "empty year in " cite$ * warning$ }
223 {year}
224 if$
225 }
226
227 FUNCTION {output.cyear.check} %wk
228 { year empty$
229 { "empty year in " cite$ * warning$ }
230 {miscyear empty$
231 {year}
232 {miscyear}
233 if$ %wk
234 }
235 if$
236 extra.label *
237 }
238 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239
240 FUNCTION {output.continue.year.check} %wk
241 {
242 endyear empty$
243 {startyear empty$
244 {year empty$
245 { "empty year in " cite$ * warning$ }
246 {"" year * "" * }
247 if$
248 }
249 {"" startyear * "-" * }
250 if$
251 }
252 {startyear empty$
253 {year empty$
254 { "empty year in " cite$ * warning$ }
255 {"" year * "" * }
256 if$
257 }
258 {"" startyear * "-" *
259 "" endyear * "" * *
260 }
261 if$
262 }
263 if$
264 }
265
266
267 FUNCTION {output.continue.cyear.check} %wk
268 {
269 endyear empty$
270 {startyear empty$
271 {year empty$
272 { "empty year in " cite$ * warning$ }
273 {"" year * "" * }
274 if$
275 }
276 {"" startyear * "-" * }
277 if$
278 }
279 {startyear empty$
280 {year empty$
281 { "empty year in " cite$ * warning$ }
282 {"" year * "" * }
283 if$
284 }
285 {"" startyear * "-" *
286 "" endyear * "" * *
287 }
288 if$
289 }
290 if$
291 }
292
293 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294 FUNCTION {output.article.year.check}
295 {month empty$
296 {
297 year empty$
298 { "empty year in " cite$ * warning$ }
299 {year %wk
300 }
301 if$
302 }
303 {
304 TypeofLit empty$
305 {year empty$
306 { "empty year in " cite$ * warning$ }
307 {year %wk
308 }
309 if$}
310
311 {year empty$
312 { "empty year in " cite$ * warning$ }
313 {year %wk
314 "-" month * "" * *
315 }
316 if$
317 }
318 if$
319 }
320 if$
321 }
322
323 FUNCTION {output.carticle.year.check} %wk
324 {month empty$
325 {
326 year empty$
327 { "empty year in " cite$ * warning$ }
328 {year %wk
329 }
330 if$
331 }
332 {
333 TypeofLit empty$
334 {year empty$
335 { "empty year in " cite$ * warning$ }
336 {year %wk
337 }
338 if$}
339
340 {year empty$
341 { "empty year in " cite$ * warning$ }
342 {year %wk
343 "-" month * "" * *
344 }
345 if$
346 }
347 if$
348 }
349 if$
350 }
351 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352
353 FUNCTION {output.bibitem}
354 { newline$
355 "\bibitem[" write$
356 label write$
357 "]{" write$
358 cite$ write$
359 "}" write$
360 newline$
361 ""
362 before.all 'output.state :=
363 }
364
365 FUNCTION {fin.entry}
366 { add.period$
367 write$
368 newline$
369 }
370
371 FUNCTION {new.sentence}
372 { output.state after.block =
373 'skip$
374 { output.state before.all =
375 'skip$
376 { after.sentence 'output.state := }
377 if$
378 }
379 if$
380 }
381
382 FUNCTION {not}
383 { { #0 }
384 { #1 }
385 if$
386 }
387
388 FUNCTION {and}
389 { 'skip$
390 { pop$ #0 }
391 if$
392 }
393
394 FUNCTION {or}
395 { { pop$ #1 }
396 'skip$
397 if$
398 }
399
400 FUNCTION {new.block.checkb}
401 { empty$
402 swap$ empty$
403 and
404 'skip$
405 'new.block
406 if$
407 }
408
409 FUNCTION {field.or.null}
410 { duplicate$ empty$
411 { pop$ "" }
412 'skip$
413 if$
414 }
415
416 FUNCTION {boldface}
417 { duplicate$ empty$
418 { pop$ "" }
419 { "{\bf " swap$ * "}" * }
420 if$
421 }
422
423 %FUNCTION {emphasize}
424 %{ duplicate$ empty$
425 % { pop$ "" }
426 % { "{\em " swap$ * "}" * }
427 % if$
428 %}
429
430
431 %%%%%%%%%%%%%%%%%%%
432 Function{upcase}
433 { duplicate$ empty$
434 { pop$ "" }
435 { "\textsc{" swap$ * "}" * }
436 if$
437 }
438 FUNCTION {bib.name.font}
439 { }
440 FUNCTION {bib.fname.font}
441 { bib.name.font }
442 %%%%%%%%%%%%%%%%%%%%
443
444 %%%%%%%%%%%%%%%%%%%%%%%
445
446 INTEGERS { nameptr namesleft numnames }
447
448 FUNCTION {capitalize}
449 { "u" change.case$ "t" change.case$ }
450
451 FUNCTION {format.names}
452 { 's :=
453 #1 'nameptr :=
454 s num.names$ 'numnames :=
455 numnames 'namesleft :=
456 { namesleft #0 > }
457 { s nameptr "{vv~}{ll}{ f{~}}{, jj}"
458 format.name$
459 remove.dots
460 't :=
461 nameptr #1 >
462 {
463 nameptr #3
464 #1 + =
465 numnames #3
466 > and
467 { "others" 't :=
468 #1 'namesleft := }
469 'skip$
470 if$
471 namesleft #1 >
472 { ", " * t * }
473 { numnames #2 >
474 { "" * }
475 'skip$
476 if$
477 s nameptr "{ll}" format.name$ duplicate$ "others" =
478 { 't := }
479 { pop$ }
480 if$
481 t "others" =
482 {bib.name.font %改为大写
483 ", et al" *
484 }
485 {", " * t * }
486 if$
487 }
488 if$
489 }
490 't
491 if$
492 nameptr #1 + 'nameptr :=
493 namesleft #1 - 'namesleft :=
494 }
495 while$
496 %%%%%%%%%%%
497 t "others" = %改为大写
498 'skip$ %改为大写
499 { bib.name.font } %改为大写
500 if$ %改为大写
501 %%%%%%%%%%%
502 }
503
504
505 FUNCTION {format.cnames} %wk
506 { 's :=
507 #1 'nameptr :=
508 s num.names$ 'numnames :=
509 numnames 'namesleft :=
510 { namesleft #0 > }
511 { s nameptr "{vv~}{ll}{ f{~}}{ jj}" format.name$
512 remove.dots
513 't :=
514 nameptr #1 >
515 {
516 nameptr #3
517 #1 + =
518 numnames #3
519 > and
520 { "others" 't :=
521 #1 'namesleft := }
522 'skip$
523 if$
524 namesleft #1 >
525 { ", " * t * }
526 { numnames #2 >
527 { "" * }
528 'skip$
529 if$
530 s nameptr "{ll}" format.name$ duplicate$ "others" =
531 { 't := }
532 { pop$ }
533 if$
534 t "others" =
535 { ",等" *
536 bib.name.font %改为大写
537 }
538 {", " * t * }
539 if$
540 }
541 if$
542 }
543 't
544 if$
545 nameptr #1 + 'nameptr :=
546 namesleft #1 - 'namesleft :=
547 }
548 while$
549 %%%%%%%%%%%
550 t "others" = %改为大写
551 'skip$ %改为大写
552 { bib.name.font } %改为大写
553 if$ %改为大写
554 %%%%%%%%%%%
555 }
556
557 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
558 %不加大写的名字
559 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
560
561 FUNCTION {format.normal.names}
562 { 's :=
563 #1 'nameptr :=
564 s num.names$ 'numnames :=
565 numnames 'namesleft :=
566 { namesleft #0 > }
567 { s nameptr "{vv~}{ll}{ f{~}}{, jj}"
568 format.name$
569 remove.dots
570 't :=
571 nameptr #1 >
572 {
573 nameptr #3
574 #1 + =
575 numnames #3
576 > and
577 { "others" 't :=
578 #1 'namesleft := }
579 'skip$
580 if$
581 namesleft #1 >
582 { ", " * t * }
583 { numnames #2 >
584 { "" * }
585 'skip$
586 if$
587 s nameptr "{ll}" format.name$ duplicate$ "others" =
588 { 't := }
589 { pop$ }
590 if$
591 t "others" =
592 { ", et al" * }
593 {", " * t * }
594 if$
595 }
596 if$
597 }
598 't
599 if$
600 nameptr #1 + 'nameptr :=
601 namesleft #1 - 'namesleft :=
602 }
603 while$
604 }
605
606
607 FUNCTION {format.normal.cnames} %wk
608 { 's :=
609 #1 'nameptr :=
610 s num.names$ 'numnames :=
611 numnames 'namesleft :=
612 { namesleft #0 > }
613 { s nameptr "{vv~}{ll}{ f{~}}{ jj}" format.name$
614 remove.dots
615 't :=
616 nameptr #1 >
617 {
618 nameptr #3
619 #1 + =
620 numnames #3
621 > and
622 { "others" 't :=
623 #1 'namesleft := }
624 'skip$
625 if$
626 namesleft #1 >
627 { ", " * t * }
628 { numnames #2 >
629 { "" * }
630 'skip$
631 if$
632 s nameptr "{ll}" format.name$ duplicate$ "others" =
633 { 't := }
634 { pop$ }
635 if$
636 t "others" =
637 { ",等" * }
638 {", " * t * }
639 if$
640 }
641 if$
642 }
643 't
644 if$
645 nameptr #1 + 'nameptr :=
646 namesleft #1 - 'namesleft :=
647 }
648 while$
649 }
650 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
651
652 FUNCTION {format.authors}
653 { author empty$
654 { "" }
655 {normalauthor empty$
656 {author format.names }
657 {normalauthor format.normal.names}
658 if$
659 }
660 if$
661 }
662
663 FUNCTION {format.cauthors} %wk
664 { author empty$
665 { "" }
666 {normalauthor empty$
667 {author format.cnames }
668 {normalauthor format.normal.cnames}
669 if$
670 }
671 if$
672 }
673
674 FUNCTION {format.key}
675 { empty$
676 { key field.or.null }
677 { "" }
678 if$
679 }
680
681 FUNCTION {format.editors}
682 { editor empty$
683 { "" }
684 {normaleditor empty$
685 {editor format.names}
686 {normaleditor format.normal.names}
687 if$
688 editor num.names$ #1 > % Use ODWE abbrevs.
689 { "" * } % to avoid
690 { "" * } % ambiguity between
691 if$ % "editor" and
692 } % "edition".
693 if$
694 }
695
696 FUNCTION {format.ceditors} %wk 本函数
697 { editor empty$
698 { "" }
699 {
700 normaleditor empty$
701 {editor * "" * format.cnames }
702 {normaleditor * "" * format.normal.cnames}
703 if$
704 }
705 if$
706 }
707 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
708 FUNCTION {format.title} % Nothing needs
709 { title empty$ % doing here in
710 { "" } % authordate1.bst
711 { title } % or
712 if$ % authordate3.bst.
713 }
714
715 FUNCTION {format.ctitle} %wk % Nothing needs
716 { title empty$ % doing here in
717 { "" } % authordate1.bst
718 {title} % or
719 if$ % authordate3.bst.
720 }
721 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
722
723
724 FUNCTION {format.article.title} % Nothing needs
725 {title empty$ % doing here in
726 { "" } % authordate1.bst
727 {
728 typeoflit empty$
729 {format.title "[J]" * title output.check}
730 {format.title title output.check}
731 if$
732 }
733 if$
734 TypeofLit empty$
735 {""}
736 { "[" TypeofLit * "]" * * }
737 if$
738 % authordate3.bst.
739 }
740
741
742 FUNCTION {format.carticle.title} % Nothing needs
743 {title empty$ % doing here in
744 { "" } % authordate1.bst
745 {
746 typeoflit empty$
747 {format.title "[J]" * title output.check}
748 {format.title title output.check}
749 if$
750 }
751 if$
752
753 TypeofLit empty$
754 {""}
755 { "[" TypeofLit * "]" * * }
756 if$
757 % authordate3.bst.
758 }
759 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
760 FUNCTION {format.book.title} % Nothing needs
761 {title empty$ % doing here in
762 { "" } % authordate1.bst
763 {
764 typeoflit empty$
765 {format.title "[M]" * title output.check}
766 {format.title title output.check}
767 if$
768 }
769 if$
770 TypeofLit empty$
771 {""}
772 { "[" TypeofLit * "]" * * }
773 if$
774 % authordate3.bst.
775 }
776
777
778 FUNCTION {format.cbook.title} %wk % Nothing needs
779 {title empty$ % doing here in
780 { "" } % authordate1.bst
781 {
782 typeoflit empty$
783 {format.title "[M]" * title output.check}
784 {format.title title output.check}
785 if$
786 }
787 if$
788 TypeofLit empty$
789 {""}
790 { "[" TypeofLit * "]" * * }
791 if$
792 % authordate3.bst.
793 }
794 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
795 FUNCTION {format.misc.title} %wk % Nothing needs
796 {
797 patentid empty$
798 {%没有专利号应该是其它类型文献,直接标准输出
799 title empty$ % doing here in
800 { "" } % authordate1.bst
801 {
802 typeoflit empty$
803 {format.title "[缺文献类型标志代码]." * title output.check}
804 {format.title "[" * TypeofLit * "]" * title output.check}
805 if$
806 }
807 if$
808 ""
809 }
810 {%有专利号
811 country empty$
812 {
813 title empty$ % doing here in
814 { "" } % authordate1.bst
815 {
816 typeoflit empty$
817 {format.title "[缺文献类型标志代码]." * title output.check}
818 {format.title title output.check}
819 if$
820 }
821 if$
822 TypeofLit empty$
823 {""}
824 { "[" TypeofLit * "]." * * }
825 if$
826 "" patentid * "" * *
827 }
828 {%有专利号,有国家
829 title empty$ % doing here in
830 { "" } % authordate1.bst
831 {
832 typeoflit empty$
833 {format.title "[缺文献类型标志代码]." * title output.check}
834 {format.title title output.check}
835 if$
836 }
837 if$
838
839 ":" country * "," * *
840 "" patentid * "" * *
841 TypeofLit empty$
842 {""}
843 { "[" TypeofLit * "]." * * }
844 if$
845
846 }
847 if$
848 }
849 if$
850
851 }
852
853 FUNCTION {format.cmisc.title}
854 {
855 title empty$
856 { "No Title" }
857 {
858 typeoflit empty$
859 {format.title "[缺文献类型标志代码]" * title output.check}
860 {format.title "[" * TypeofLit * "]" * title output.check}
861 if$
862 }
863 if$
864 ""
865 }
866
867 FUNCTION {format.cmisc.title.xx}
868 {
869 patentid empty$
870 {%没有专利号应该是其它类型文献,直接标准输出
871 title empty$
872 { "" }
873 {
874 typeoflit empty$
875 {format.title "[缺文献类型标志代码]." * title output.check}
876 {format.title title output.check}
877 if$
878 }
879 if$
880 }
881 {%有专利号
882 country empty$
883 {
884 title empty$
885 { "" }
886 {
887 typeoflit empty$
888 {format.title "[缺文献类型标志代码]." * title output.check}
889 {format.title title output.check}
890 if$
891 }
892 if$
893 "" patentid * "" * *
894 }
895 {%有专利号,有国家
896 title empty$
897 { "" }
898 {
899 typeoflit empty$
900 {format.title "[缺文献类型标志代码]." * title output.check}
901 {format.title title output.check}
902 if$
903 }
904 if$
905
906 ":" country * "," * *
907 "" patentid * "" * *
908 }
909 if$
910 }
911 if$
912
913 }
914 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
915
916 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
917
918 FUNCTION {format.proceedings.title} % Nothing needs
919 {title empty$ % doing here in
920 { "" } % authordate1.bst
921 {
922 typeoflit empty$
923 {format.title "[C]" * title output.check}
924 {format.title title output.check}
925 if$
926 }
927 if$
928
929 TypeofLit empty$
930 {""}
931 { "[" TypeofLit * "]" * * }
932 if$
933 % authordate3.bst.
934 }
935
936
937 FUNCTION {format.cproceedings.title} % Nothing needs
938 {title empty$ % doing here in
939 { "" } % authordate1.bst
940 {
941 typeoflit empty$
942 {format.title "[C]" * title output.check}
943 {format.title title output.check}
944 if$
945 }
946 if$
947
948 TypeofLit empty$
949 {""}
950 { "[" TypeofLit * "]" * * }
951 if$
952 % authordate3.bst.
953 }
954 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
955 FUNCTION {format.incollection.title} % Nothing needs
956 {title empty$ % doing here in
957 { "" } % authordate1.bst
958 {
959 typeoflit empty$
960 {format.title "[M]//" * title output.check}
961 {format.title "" * title output.check}
962 if$
963 }
964 if$
965
966 TypeofLit empty$
967 {""}
968 { "[" TypeofLit * "]//" * * }
969 if$
970 % authordate3.bst.
971 }
972
973
974 FUNCTION {format.cincollection.title} % Nothing needs
975 {title empty$ % doing here in
976 { "" } % authordate1.bst
977 {
978 typeoflit empty$
979 {format.title "[M]//" * title output.check}
980 {format.title "" * title output.check}
981 if$
982 }
983 if$
984
985 TypeofLit empty$
986 {""}
987 { "[" TypeofLit * "]//" * * }
988 if$
989 % authordate3.bst.
990 }
991 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
992 FUNCTION {format.inproceedings.title}
993 {
994 title empty$
995 { "No Title" }
996 {
997 typeoflit empty$
998 {format.title "[C]" * title output.check}
999 {format.title "[" * TypeofLit * "]" * title output.check}
1000 if$
1001 }
1002 if$
1003 ""
1004 }
1005
1006
1007 FUNCTION {format.cinproceedings.title} % Nothing needs
1008 {title empty$ % doing here in
1009 { "" } % authordate1.bst
1010 {
1011 typeoflit empty$
1012 {format.title "[C]" * title output.check}
1013 {format.title "" * title output.check}
1014 if$
1015 }
1016 if$
1017
1018 TypeofLit empty$
1019 {""}
1020 { "[" TypeofLit * "]" * * }
1021 if$
1022 }
1023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1024
1025 FUNCTION {n.dashify}
1026 { 't :=
1027 ""
1028 { t empty$ not }
1029 { t #1 #1 substring$ "-" =
1030 { t #1 #2 substring$ "--" = not
1031 { "--" *
1032 t #2 global.max$ substring$ 't :=
1033 }
1034 { { t #1 #1 substring$ "-" = }
1035 { "-" *
1036 t #2 global.max$ substring$ 't :=
1037 }
1038 while$
1039 }
1040 if$
1041 }
1042 { t #1 #1 substring$ *
1043 t #2 global.max$ substring$ 't :=
1044 }
1045 if$
1046 }
1047 while$
1048 }
1049
1050 FUNCTION {format.btitle}
1051 { title empty$
1052 { "" } % Don't change case
1053 {booktitle} % in
1054 if$ % authordate1.bst
1055 } % or
1056
1057 FUNCTION {format.cbtitle} %wk % Nothing needs
1058 { title empty$ % doing here in
1059 { "" } % authordate1.bst
1060 {booktitle} % or
1061 if$ % authordate3.bst.
1062 }
1063 % authordate3.bst.
1064
1065 FUNCTION {either.or.check}
1066 { empty$
1067 'pop$
1068 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
1069 if$
1070 }
1071
1072 INTEGERS { multiresult }
1073
1074 FUNCTION {multi.page.check}
1075 { 't :=
1076 #0 'multiresult :=
1077 { multiresult not
1078 t empty$ not
1079 and
1080 }
1081 { t #1 #1 substring$
1082 duplicate$ "-" =
1083 swap$ duplicate$ "," =
1084 swap$ "+" =
1085 or or
1086 { #1 'multiresult := }
1087 { t #2 global.max$ substring$ 't := }
1088 if$
1089 }
1090 while$
1091 multiresult
1092 }
1093
1094 FUNCTION {format.pages}
1095 { pages empty$
1096 { "" }
1097 { pages multi.page.check
1098 { ":" pages n.dashify tie.or.space.connect * }
1099 { ":" pages tie.or.space.connect * }
1100 if$
1101 }
1102 if$
1103 }
1104
1105 FUNCTION {format.numberinseries}
1106 { number empty$
1107 { "" }
1108 { number multi.page.check
1109 { ", nos. " number n.dashify tie.or.space.connect }
1110 { ", no. " number tie.or.space.connect }
1111 if$
1112 }
1113 if$
1114 }
1115
1116 FUNCTION {format.cnumberinseries} %wk
1117 { number empty$
1118 { "" }
1119 { number multi.page.check
1120 { ", 第" number n.dashify tie.or.space.connect * "期"} %wk
1121 { ", 第" number tie.or.space.connect * "期"} %wk
1122 if$
1123 }
1124 if$
1125 }
1126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1127 FUNCTION {booklike.series.volume.number} % Chicago, pages
1128 { series empty$ % 450-451.
1129 { volume empty$
1130 { " " }
1131 { " Vol. " volume * }
1132 if$
1133 }
1134 {
1135 volume empty$
1136 { number empty$
1137 { series }
1138 { series format.numberinseries * }
1139 if$
1140 }
1141 { number empty$
1142 { series ", vol. " volume * * }
1143 { series ", vol. " * volume * format.numberinseries * }
1144 if$
1145 }
1146 if$
1147 }
1148 if$
1149 }
1150
1151 FUNCTION {cbooklike.series.volume.number.pages} %wk加入页码 ??? % Chicago, pages %wk
1152 { series empty$ % 450-451.
1153 { volume empty$
1154 { pages empty$
1155 'skip$
1156 { duplicate$ empty$
1157 { pop$ format.pages }
1158 { ":" * pages n.dashify * "" *} %wk 改为第页
1159 if$
1160 }
1161 if$}
1162 { "卷" volume * }
1163 if$
1164 }
1165 {
1166 volume empty$
1167 { number empty$
1168 { series }
1169 { series format.numberinseries * }
1170 if$
1171 }
1172 { number empty$
1173 { series ",第" volume * "卷" * * }
1174 { series "卷" * volume * format.cnumberinseries * }
1175 if$
1176 }
1177 if$
1178 }
1179 if$
1180 }
1181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1182 FUNCTION {incollectionlike.series.volume.number.pages}
1183 {
1184 series empty$
1185 { volume empty$
1186 { pages empty$
1187 { "" }
1188 { duplicate$ empty$
1189 { pop$ format.pages }
1190 { ". " * pages n.dashify * ""}
1191 if$
1192 }
1193 if$}
1194 { ". " volume * "" * *
1195 pages empty$
1196 { "" }
1197 { duplicate$ empty$
1198 { pop$ format.pages }
1199 { ":" * pages n.dashify * ""}
1200 if$
1201 }
1202 if$}
1203 if$
1204 }
1205 {
1206 new.block
1207 volume empty$
1208 { number empty$
1209 { ". " * series * }
1210 { series format.numberinseries * }
1211 if$
1212 ""
1213 }
1214 { number empty$
1215 { ". " * series ", " * volume * * }
1216 { ". " * series ", " * volume * format.numberinseries * }
1217 if$
1218 pages empty$
1219 { "" }
1220 { duplicate$ empty$
1221 { pop$ format.pages }
1222 { ": " * pages n.dashify * "" }
1223 if$
1224 }
1225 if$
1226 }
1227 if$
1228 }
1229 if$
1230 }
1231
1232 FUNCTION {cincollectionlike.series.volume.number.pages} %wk
1233 { series empty$
1234 { volume empty$
1235 { pages empty$
1236 'skip$
1237 { duplicate$ empty$
1238 { pop$ format.pages }
1239 { ":" * pages n.dashify * "" } %wk 改为第页
1240 if$
1241 }
1242 if$}
1243 { ",第" volume * "卷" * *
1244 pages empty$
1245 'skip$
1246 { duplicate$ empty$
1247 { pop$ format.pages }
1248 { ":" * pages n.dashify * "" } %wk 改为第页
1249 if$
1250 }
1251 if$}
1252 if$
1253 }
1254 { new.block
1255 volume empty$
1256 { number empty$
1257 { series }
1258 { series format.numberinseries * }
1259 if$
1260 }
1261 { number empty$
1262 { series ", vol. " volume * * }
1263 { series ", vol. " * volume * format.numberinseries * }
1264 if$
1265 }
1266 if$
1267 }
1268 if$
1269 }
1270
1271
1272 FUNCTION {format.TypeofLit} %wk 完全改写
1273 { TypeofLit empty$
1274 { "" }
1275 {"[" TypeofLit * "]" *}
1276 if$
1277 }
1278
1279
1280 FUNCTION {format.edition}
1281 { edition empty$
1282 {
1283 translator empty$
1284 { "" }
1285 {"" translator * ",translation" * }
1286 if$
1287 }
1288 {
1289 translator empty$
1290 {edition}
1291 {translator output
1292 ",translation." edition * "" * *}
1293 if$
1294 }
1295 if$
1296 }
1297
1298
1299 FUNCTION {format.cedition} %wk 完全改写
1300 { edition empty$
1301 {
1302 translator empty$
1303 { "" }
1304 {"" translator format.cnames * "译" *}
1305 if$
1306 }
1307 {
1308 translator empty$
1309 {edition}
1310 {translator format.cnames output
1311 "译." edition * "" * }
1312 if$
1313 }
1314 if$
1315 }
1316
1317 FUNCTION {format.ctranslator} %wk 完全改写
1318 { translator empty$
1319 { "" }
1320 {format.cnames "译" * "translator" output.check}
1321 if$
1322 }
1323
1324 FUNCTION {format.pagesinbook} % By the time the
1325 { pages empty$ % reader has read
1326 { "" } % address, pub'r,
1327 { pages multi.page.check % note (where the
1328 { ":" pages n.dashify tie.or.space.connect } % note may end with
1329 { ":" pages tie.or.space.connect } % numbers), s/he
1330 if$ % may not recognise
1331 } % a number-range as
1332 if$ % meaning pages.
1333 } % Avoid ambiguity
1334 % (Butcher, p.181).
1335
1336 FUNCTION {format.cpagesinbook} % By the time the %wk
1337 { pages empty$ % reader has read
1338 { "" } % address, pub'r,
1339 { pages multi.page.check % note (where the
1340 { ":" * pages n.dashify tie.or.space.connect * "" } % note may end with
1341 { ":" * "Page " pages tie.or.space.connect * ""} % numbers), s/he
1342 if$ % may not recognise
1343 } % a number-range as
1344 if$ % meaning pages.
1345 } % Avoid ambiguity
1346
1347 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1348 FUNCTION {format.vol.num.date.pages} %wk
1349 {volume empty$ %wk 被重新改过
1350 'skip$ %wk 被重新改过
1351 {volume %wk 被重新改过
1352 } %wk 被重新改过
1353 if$ %wk 被重新改过
1354 number empty$ %wk 被重新改过
1355 'skip$ %wk 被重新改过
1356 { "(" number * ")" * * %wk 被重新改过
1357 volume empty$ %wk 被重新改过
1358 { "there's a number but no volume in " cite$ * warning$ } %wk 被重新改过
1359 'skip$ %wk 被重新改过
1360 if$ %wk 被重新改过
1361 } %wk 被重新改过
1362 if$ %wk 被重新改过
1363 pages empty$
1364 'skip$
1365 { duplicate$ empty$
1366 { pop$ format.pages }
1367 { ":" * pages n.dashify * "" } %wk 改为第页
1368 if$
1369 }
1370 if$
1371 }
1372
1373
1374 FUNCTION {format.cvol.num.date.pages} %wk
1375 {volume empty$ %wk 被重新改过
1376 'skip$ %wk 被重新改过
1377 {volume %wk 被重新改过
1378 } %wk 被重新改过
1379 if$ %wk 被重新改过
1380 number empty$ %wk 被重新改过
1381 'skip$ %wk 被重新改过
1382 { "(" number * ")" * * %wk 被重新改过
1383 volume empty$ %wk 被重新改过
1384 { "there's a number but no volume in " cite$ * warning$ } %wk 被重新改过
1385 'skip$ %wk 被重新改过
1386 if$ %wk 被重新改过
1387 } %wk 被重新改过
1388 if$ %wk 被重新改过
1389 pages empty$
1390 'skip$
1391 { duplicate$ empty$
1392 { pop$ format.pages }
1393 { ":" * pages n.dashify * "" } %wk 改为第页
1394 if$
1395 }
1396 if$
1397 }
1398
1399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1400 FUNCTION {format.article.vol.num.date.pages} %wk
1401 {
1402 volume empty$ %wk 被重新改过
1403 'skip$ %wk 被重新改过
1404 {volume %wk 被重新改过
1405 } %wk 被重新改过
1406 if$ %wk 被重新改过
1407 number empty$ %wk 被重新改过
1408 'skip$ %wk 被重新改过
1409 { "(" number * ")" * * %wk 被重新改过
1410 volume empty$ %wk 被重新改过
1411 { "there's a number but no volume in " cite$ * warning$ } %wk 被重新改过
1412 'skip$ %wk 被重新改过
1413 if$ %wk 被重新改过
1414 } %wk 被重新改过
1415 if$ %wk 被重新改过
1416 pages empty$
1417 'skip$
1418 { duplicate$ empty$
1419 { pop$ format.pages }
1420 { ":" * pages n.dashify * "" } %wk 改为第页
1421 if$
1422 }
1423 if$
1424 }
1425
1426
1427
1428 FUNCTION {format.carticle.vol.num.date.pages} %wk
1429 {
1430 volume empty$ %wk 被重新改过
1431 'skip$ %wk 被重新改过
1432 {volume %wk 被重新改过
1433 } %wk 被重新改过
1434 if$ %wk 被重新改过
1435 number empty$ %wk 被重新改过
1436 'skip$ %wk 被重新改过
1437 { "(" number * ")" * * %wk 被重新改过
1438 volume empty$ %wk 被重新改过
1439 { "there's a number but no volume in " cite$ * warning$ } %wk 被重新改过
1440 'skip$ %wk 被重新改过
1441 if$ %wk 被重新改过
1442 } %wk 被重新改过
1443 if$ %wk 被重新改过
1444 pages empty$
1445 'skip$
1446 { duplicate$ empty$
1447 { pop$ format.pages }
1448 { ":" * pages n.dashify * "" } %wk 改为第页
1449 if$
1450 }
1451 if$
1452 }
1453
1454
1455 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1456 FUNCTION {format.book.continue.vol.num} %wk
1457 {
1458 startyear empty$
1459 'skip$
1460 {"." startyear * "" * *
1461 startvolume empty$ %wk 被重新改过
1462 'skip$ %wk 被重新改过
1463 {"," startvolume * "" * *} %wk 被重新改过
1464 if$
1465 %wk 被重新改过
1466 startnumber empty$ %wk 被重新改过
1467 'skip$ %wk 被重新改过
1468 { "(" startnumber * ")-" * * } %wk 被重新改过
1469 if$ %wk 被重新改过
1470 } %wk 被重新改过
1471 if$
1472 %wk 被重新改过
1473 endyear empty$
1474 'skip$
1475 {"" endyear * "" * *
1476 endvolume empty$ %wk 被重新改过
1477 'skip$ %wk 被重新改过
1478 {"," endvolume * "" * *} %wk 被重新改过
1479 if$
1480 %wk 被重新改过
1481 endnumber empty$ %wk 被重新改过
1482 'skip$ %wk 被重新改过
1483 { "(" endnumber * ")" * * } %wk 被重新改过
1484 if$ %wk 被重新改过
1485 } %wk 被重新改过
1486 if$
1487 }
1488
1489
1490
1491
1492 FUNCTION {format.cbook.continue.vol.num} %wk
1493 {
1494 startyear empty$
1495 'skip$
1496 {"." startyear * "" * *
1497 startvolume empty$ %wk 被重新改过
1498 'skip$ %wk 被重新改过
1499 {"," startvolume * "" * *} %wk 被重新改过
1500 if$
1501 %wk 被重新改过
1502 startnumber empty$ %wk 被重新改过
1503 'skip$ %wk 被重新改过
1504 { "(" startnumber * ")-" * * } %wk 被重新改过
1505 if$ %wk 被重新改过
1506 } %wk 被重新改过
1507 if$
1508 %wk 被重新改过
1509 endyear empty$
1510 'skip$
1511 {"" endyear * "" * *
1512 endvolume empty$ %wk 被重新改过
1513 'skip$ %wk 被重新改过
1514 {"," endvolume * "" * *} %wk 被重新改过
1515 if$
1516 %wk 被重新改过
1517 endnumber empty$ %wk 被重新改过
1518 'skip$ %wk 被重新改过
1519 { "(" endnumber * ")" * * } %wk 被重新改过
1520 if$ %wk 被重新改过
1521 } %wk 被重新改过
1522 if$
1523 }
1524
1525
1526
1527 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1528 FUNCTION {format.date.modifydate.citedate} %wk
1529 {
1530 date empty$ %wk 被重新改过
1531 'skip$ %wk 被重新改过
1532 {date %wk 被重新改过
1533 } %wk 被重新改过
1534 if$ %wk 被重新改过
1535
1536 modifydate empty$ %wk 被重新改过
1537 'skip$ %wk 被重新改过
1538 { "(" modifydate * ")" * * %wk 被重新改过
1539 date empty$ %wk 被重新改过
1540 { "" cite$ * warning$ } %wk 被重新改过
1541 'skip$ %wk 被重新改过
1542 if$ %wk 被重新改过
1543 } %wk 被重新改过
1544 if$
1545
1546 citedate empty$ %wk 被重新改过
1547 'skip$ %wk 被重新改过
1548 { "[" citedate * "]" * * %wk 被重新改过
1549 date empty$ %wk 被重新改过
1550 { "" cite$ * warning$ } %wk 被重新改过
1551 'skip$ %wk 被重新改过
1552 if$ %wk 被重新改过
1553 } %wk 被重新改过
1554 if$
1555 }
1556
1557
1558 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1559 FUNCTION {format.chapter.pages.inbook}
1560 { chapter empty$
1561 'format.pagesinbook
1562 { type empty$
1563 { "Chap." }
1564 { type }
1565 if$
1566 chapter tie.or.space.connect
1567 pages empty$
1568 'skip$
1569 { ", " * format.pagesinbook "l" change.case$ * }
1570 if$
1571 }
1572 if$
1573 }
1574
1575 FUNCTION {format.cchapter.pages.inbook}
1576 {chapter empty$ %wk 被重新改过
1577 'skip$ %wk 被重新改过
1578 { ",第" chapter * "章" * * %wk 被重新改过
1579 } %wk 被重新改过
1580 if$ %wk 被重新改过
1581 pages empty$
1582 'skip$
1583 { duplicate$ empty$
1584 { pop$ format.pages }
1585 { ":" * pages n.dashify * "" } %wk 改为第页
1586 if$
1587 }
1588 if$
1589 }
1590
1591
1592
1593 FUNCTION {format.chapter.pages.incoll}
1594 { chapter empty$
1595 { pages empty$
1596 { "In " }
1597 { "{\em " format.pagesinbook " of:} " * * }
1598 if$
1599 }
1600 { type empty$
1601 { "{\em Chap. " chapter * }
1602 { "{\em " type * " " * chapter * }
1603 if$
1604 pages empty$
1605 { " of:} " * }
1606 { ", " * format.pagesinbook "l" change.case$ " of:} " * * }
1607 if$
1608 }
1609 if$
1610 }
1611
1612 FUNCTION {format.cchapter.pages.incoll} %wk
1613 { chapter empty$
1614 { pages empty$
1615 { "" }
1616 { "第" format.pagesinbook "章" * * }
1617 if$
1618 }
1619 { type empty$
1620 { "第" chapter * "章" * * }
1621 { "" type * "" * chapter * }
1622 if$
1623 pages empty$
1624 { "" * }
1625 { ":" * format.pagesinbook "l" change.case$ "" * * }
1626 if$
1627 }
1628 if$
1629 }
1630
1631 FUNCTION {format.in.ed.booktitle}
1632 { booktitle empty$
1633 { "[No booktitle]" }
1634 { editor empty$
1635 new.block
1636 { "In: " format.editors * booktitle * }
1637 { "In: " format.editors * ", eds. " * booktitle * }
1638 if$
1639 }
1640 if$
1641 }
1642
1643 FUNCTION {format.in.ced.booktitle}
1644 { booktitle empty$
1645 { "" }
1646 { editor empty$
1647 new.block
1648 { "见: " format.ceditors * booktitle * }
1649 { "见: " format.ceditors * ", 主编. " * booktitle * }
1650 if$
1651 }
1652 if$
1653 }
1654
1655 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
1656 FUNCTION {format.in.proceedings.booktitle}
1657 { booktitle empty$
1658 { "" }
1659 {format.btitle "booktitle" output.check }
1660 if$
1661 }
1662
1663
1664 FUNCTION {format.in.cproceedings.booktitle} % Achieves effect %wk
1665 { booktitle empty$ % shown in 16.51
1666 { "" } % of Chicago, at
1667 { format.cbtitle "booktitle" output.check }
1668 if$ % 4.4 of BS 1629.
1669 % Don't change
1670 }
1671
1672
1673 FUNCTION {format.thesis.type}
1674 { type empty$
1675 'skip$
1676 { pop$
1677 type % Don't change
1678 } % case.
1679 if$
1680 }
1681
1682 FUNCTION {format.tr.number}
1683 { type empty$
1684 { "Tech. rept." } % ODWE abbrevs.
1685 'type
1686 if$
1687 number empty$
1688 { } % Whatever was
1689 { number tie.or.space.connect } % having its case
1690 if$ % changed, leave
1691 } % it alone.
1692
1693 FUNCTION {format.addr.pub}
1694 { publisher empty$
1695 {address empty$
1696 { ".[S.l.]: [s.n.] " *}
1697 { address ": [s.n.] " * }
1698 if$
1699 }
1700 { address empty$
1701 { ".[S.l.]: " * }
1702 { address ": " * }
1703 if$
1704 publisher *
1705 }
1706
1707 if$
1708 }
1709
1710 FUNCTION {format.caddr.pub}
1711 {publisher empty$
1712 {address empty$
1713 { ".[出版地不详]:[出版者不详]" *}
1714 { address ":[出版者不详]" * }
1715 if$
1716 }
1717 { address empty$
1718 { ".[出版地不详]:" * }
1719 { address ": " * }
1720 if$
1721 publisher *
1722 }
1723
1724 if$
1725 }
1726 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1727 FUNCTION {format.addr.institution}
1728 { institution empty$
1729 {address empty$
1730 { ".[S.l.]: [s.n.] " *}
1731 { address ": [s.n.] " * }
1732 if$
1733 }
1734 { address empty$
1735 { ".[S.l.]: " * }
1736 { address ": " * }
1737 if$
1738 institution *
1739 }
1740
1741 if$
1742 }
1743
1744 FUNCTION {format.caddr.institution}
1745 {institution empty$
1746 {address empty$
1747 { ".[地址不详]:[机构不详]" *}
1748 { address ":[机构不详]" * }
1749 if$
1750 }
1751 { address empty$
1752 { ".[地址不详]:" * }
1753 { address ": " * }
1754 if$
1755 institution *
1756 }
1757
1758 if$
1759 }
1760 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1761 FUNCTION {format.school.pub}
1762 { school empty$
1763 {address empty$
1764 { "[S.l.]: [s.n.] " }
1765 { address ": [s.n.] " * }
1766 if$
1767 }
1768 { address empty$
1769 { ".[S.l.]: " * }
1770 { address ": " * }
1771 if$
1772 school *
1773 }
1774
1775 if$
1776 }
1777
1778 FUNCTION {format.cschool.pub}
1779 {school empty$
1780 {address empty$
1781 { "[地址不详]:[学校不详]" }
1782 { address ":[学校不详]" * }
1783 if$
1784 }
1785 { address empty$
1786 { ".[学校不详]:" * }
1787 { address ": " * }
1788 if$
1789 school *
1790 }
1791
1792 if$
1793 }
1794
1795 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1796 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1797 FUNCTION {format.inproceedings.addr.pub}
1798 {
1799 TypeofLit empty$
1800 {publisher empty$
1801 {address empty$
1802 { ".[S.l.]: [s.n.] " }
1803 { address ": [s.n.] " * }
1804 if$
1805 }
1806 { address empty$
1807 { ".[S.l.]: " * }
1808 { address ": " * }
1809 if$
1810 publisher *
1811 }
1812
1813 if$}
1814 { "" }
1815 if$
1816 }
1817
1818 FUNCTION {format.cinproceedings.addr.pub}
1819 {
1820 TypeofLit empty$
1821 {publisher empty$
1822 {address empty$
1823 { ".[出版地不详]:[出版者不详]" }
1824 { address ":[出版者不详]" * }
1825 if$
1826 }
1827 { address empty$
1828 { ".[出版地不详]:" * }
1829 { address ": " * }
1830 if$
1831 publisher *
1832 }
1833
1834 if$}
1835 { ""}
1836 if$
1837
1838 }
1839 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1840 FUNCTION {format.misc.addr.pub}
1841 { publisher empty$
1842 {address empty$
1843 { "" }
1844 { address ": [s.n.] " * }
1845 if$
1846 }
1847 { address empty$
1848 { "[S.l.]: " * }
1849 { address ": " * }
1850 if$
1851 publisher *
1852 }
1853
1854 if$
1855 }
1856
1857 FUNCTION {format.cmisc.addr.pub}
1858 {publisher empty$
1859 {address empty$
1860 { "" }
1861 { address ":[出版者不详]" * }
1862 if$
1863 }
1864 { address empty$
1865 { "[出版地不详]:" * }
1866 { address ": " * }
1867 if$
1868 publisher *
1869 }
1870
1871 if$
1872 }
1873
1874
1875 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1876
1877
1878 FUNCTION {format.addr.pub.org} % If there's an
1879 { address empty$ % an organization
1880 { "[S.l.]:" * publisher * ", for " * organization * } % and a publisher
1881 { address ": " * publisher * ", for " * organization * } % too.
1882 if$
1883 }
1884
1885 FUNCTION {format.addr.inst}
1886 { address empty$
1887 { institution empty$
1888 { "[S.l.]" }
1889 { "[S.l.]" * institution }
1890 if$
1891 }
1892 { institution empty$
1893 { "" }
1894 { institution ", " * }
1895 if$
1896 address *
1897 }
1898 if$
1899 }
1900
1901 FUNCTION {format.addr.org}
1902 { address empty$
1903 { organization empty$
1904 { "" }
1905 { organization }
1906 if$
1907 }
1908 { organization empty$
1909 { "" }
1910 { organization ", " * }
1911 if$
1912 address *
1913 }
1914 if$
1915 }
1916
1917 FUNCTION {format.article.crossref}
1918 { "In "
1919 " \cite{" * crossref * "}" *
1920 }
1921
1922 FUNCTION {format.book.crossref}
1923 { volume empty$
1924 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
1925 "In "
1926 }
1927 { " Vol." volume tie.or.space.connect
1928 " of " *
1929 }
1930 if$
1931 "\cite{" * crossref * "}" *
1932 }
1933
1934 FUNCTION {format.incoll.inproc.crossref}
1935 { "In "
1936 " \cite{" * crossref * "}" *
1937 }
1938
1939
1940 FUNCTION {article}
1941 {language empty$
1942 { output.bibitem
1943 format.authors "author" output.check
1944 author format.key output
1945 new.block
1946 format.article.title output
1947 new.block
1948 crossref missing$
1949 { journal % Don't change
1950 "journal" output.check % case.
1951 output.article.year.check output
1952 format.article.vol.num.date.pages output
1953 format.date.modifydate.citedate output
1954 }
1955 { format.article.crossref output.nonnull
1956 format.pages output
1957 }
1958 if$
1959 new.block
1960 format.url output
1961 new.block
1962 note output
1963
1964 fin.entry
1965 }
1966
1967 %FUNCTION {carticle} %wk 本函数
1968 { output.bibitem
1969 format.cauthors "author" output.check
1970 author format.key output
1971 new.block
1972 format.carticle.title output
1973 new.block
1974 crossref missing$
1975 {journal % Don't change %wk
1976 "journal" output.check % case.
1977 output.carticle.year.check output %wk
1978 format.carticle.vol.num.date.pages output %wk
1979 format.date.modifydate.citedate output
1980 new.block
1981 }
1982 { format.article.crossref output.nonnull
1983 format.pages output
1984 }
1985 if$
1986 new.block
1987 format.url output
1988 new.block
1989 note output
1990 fin.entry
1991 }
1992 if$
1993 }
1994
1995 FUNCTION {book}
1996 {language empty$
1997 {
1998 output.bibitem
1999 author empty$
2000 {
2001 format.editors "author and editor" output.check
2002 editor format.key output
2003 }
2004 {
2005 format.authors output.nonnull
2006 crossref missing$
2007 { "author and editor" editor either.or.check }
2008 'skip$
2009 if$
2010 }
2011 if$
2012 new.block
2013 format.book.title output
2014 new.block
2015 crossref missing$
2016 {
2017 format.edition output
2018 new.block
2019 format.book.continue.vol.num %ouput
2020 booklike.series.volume.number output
2021 new.block
2022 format.addr.pub "publisher" output.check
2023 output.continue.year.check %ouput
2024 format.date.modifydate.citedate output
2025 format.pages output
2026 }
2027 { format.book.crossref output.nonnull
2028 }
2029 if$
2030 new.block
2031 format.url output
2032 new.block
2033 note output
2034 fin.entry
2035 }
2036
2037 %FUNCTION {cbook} %wk
2038 { output.bibitem
2039 author empty$
2040 {
2041 format.ceditors "author and editor" output.check
2042 editor format.key output
2043 }
2044 { format.cauthors output.nonnull
2045 crossref missing$
2046 {"author and editor" editor either.or.check }
2047 'skip$
2048 if$
2049 }
2050 if$
2051 new.block
2052 format.cbook.title output %wk
2053 new.block
2054 crossref missing$
2055 {
2056 format.cedition output
2057 new.block
2058 format.cbook.continue.vol.num
2059 new.block
2060 format.caddr.pub "publisher" output.check
2061 output.continue.cyear.check
2062 cbooklike.series.volume.number.pages output
2063 format.date.modifydate.citedate %output
2064 }
2065 {
2066 format.book.crossref output.nonnull
2067 }
2068 if$
2069 new.block
2070 format.url output
2071 new.block
2072 note output
2073 fin.entry
2074 }
2075 if$
2076 }
2077 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2078 %未处理
2079 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2080 FUNCTION {booklet}
2081 {language empty$
2082 { output.bibitem
2083 format.authors output
2084 author format.key output
2085 output.year.month.check
2086 new.block
2087 format.btitle "title" output.check
2088 new.block
2089 howpublished output
2090 address output
2091 output.year.check
2092 new.block
2093 format.url output
2094 new.block
2095 note output
2096 fin.entry
2097 }
2098
2099 %FUNCTION {cbooklet} %wk
2100 { output.bibitem
2101 format.cauthors output %wk
2102 author format.key output
2103 format.btitle "title" output.check %wk
2104 new.block
2105 howpublished output
2106 address output
2107 output.cyear.month.check %wk
2108 new.block
2109 format.url output
2110 new.block
2111 note output
2112 fin.entry
2113 }
2114 if$
2115 }
2116
2117 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2118 FUNCTION {inbook}
2119 {language empty$
2120 { output.bibitem
2121 author empty$
2122 { format.editors "author and editor" output.check
2123 editor format.key output
2124 }
2125 { format.authors output.nonnull
2126 crossref missing$
2127 { "author and editor" editor either.or.check }
2128 'skip$
2129 if$
2130 }
2131 if$
2132 new.block
2133 format.book.title output
2134 new.block
2135 crossref missing$
2136 { format.edition output
2137 booklike.series.volume.number output
2138 new.block
2139 format.addr.pub "publisher" output.check
2140 output.year.check output
2141 format.date.modifydate.citedate output
2142 format.pages output
2143 }
2144 { format.book.crossref output.nonnull
2145 }
2146 if$
2147 new.block
2148 format.url output
2149 new.block
2150 note output
2151 fin.entry
2152 }
2153
2154 %FUNCTION {cinbook} %wk
2155 { output.bibitem
2156 author empty$
2157 { format.ceditors "author and editor" output.check %wk format.editors->format.ceditors
2158 editor format.key output
2159 }
2160 { format.cauthors output.nonnull
2161 crossref missing$
2162 {"author and editor" editor either.or.check }
2163 'skip$
2164 if$
2165 }
2166 if$
2167 new.block
2168 format.cbook.title output %wk
2169 new.block
2170 crossref missing$
2171 {
2172 format.cedition output %wk edition->cedition
2173 new.block
2174 format.caddr.pub "publisher" output.check
2175 output.cyear.check %wk
2176 cbooklike.series.volume.number.pages output
2177 format.date.modifydate.citedate output
2178 }
2179 { format.book.crossref output.nonnull
2180 }
2181 if$
2182 new.block
2183 format.url output
2184 new.block
2185 note output
2186 fin.entry
2187 }
2188 if$
2189 }
2190
2191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2192 FUNCTION {incollection} %wk
2193 {language empty$
2194 { output.bibitem
2195 author empty$
2196 { format.editors "editor" output.check %wk format.editors->format.ceditors
2197 editor format.key output }
2198 { format.authors "author" output.check %wk
2199 author format.key output }
2200 if$
2201 new.block
2202 format.incollection.title output
2203 crossref missing$ % Chapter and/or
2204 {
2205 format.in.ed.booktitle output % page numbers can
2206 format.edition output % come out via this %wk edition->cedition
2207 new.block
2208 format.addr.pub "publisher" output.check
2209 output.year.check
2210 incollectionlike.series.volume.number.pages output % route, too.
2211 format.date.modifydate.citedate output
2212 }
2213 { format.incoll.inproc.crossref output.nonnull
2214 new.block
2215 }
2216 if$
2217
2218 format.url output
2219 new.block
2220 note output
2221 fin.entry
2222 }
2223
2224 %FUNCTION {cincollection} %wk
2225 { output.bibitem
2226 author empty$
2227 { format.ceditors "editor" output.check %wk format.editors->format.ceditors
2228 editor format.key output }
2229 { format.cauthors "author" output.check %wk
2230 author format.key output }
2231 if$
2232 new.block
2233 format.cincollection.title output
2234 crossref missing$ % Chapter and/or
2235 { format.in.ced.booktitle output % page numbers can
2236 format.cedition output % come out via this %wk edition->cedition
2237 new.block
2238 format.caddr.pub "publisher" output.check
2239 output.cyear.check output
2240 cincollectionlike.series.volume.number.pages output % route, too.
2241 format.date.modifydate.citedate output
2242 }
2243 { format.incoll.inproc.crossref output.nonnull
2244 new.block
2245 }
2246 if$
2247 new.block
2248 format.url output
2249 new.block
2250 note output
2251 fin.entry
2252 }
2253 if$
2254 }
2255
2256 FUNCTION {seu.publisher}
2257 {
2258 publisher empty$
2259 {
2260 school empty$
2261 'skip$
2262 { format.school.pub "publisher" output.check }
2263 if$
2264 }
2265 { format.misc.addr.pub "publisher" output.check }
2266 if$
2267
2268
2269 ""
2270 }
2271
2272 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2274 %图书book和
2275 %会议录inproceedings(会议conference与inproceedings一样),
2276 %文献类型代码[C]
2277 %硕士学位论文mastersthesis,
2278 %文献类型代码[D]
2279 %博士学位论文phdthesis,
2280 %文献类型代码[D]
2281 %技术报告techreport的类型是一样的,
2282 %文献类型代码[R]
2283 %
2284 %因此我们直接拷贝book的相关内容即可。
2285 %原始部分可以参考authordate1.bst。
2286 %
2287 %利用misc作为电子文献[EB/OL]所使用的类型
2288 %存在的问题:无法正常调用url,只能利用note来生成。
2289 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2291 FUNCTION {inproceedings} %wk 改自incollection类型
2292 {language empty$
2293 { output.bibitem
2294 author empty$
2295 { format.editors "editor" output.check
2296 editor format.key output }
2297 { format.authors "author" output.check %wk
2298 author format.key output }
2299 if$
2300 new.block
2301 format.inproceedings.title output
2302 crossref missing$
2303 {
2304 format.in.ed.booktitle output
2305 format.edition output
2306 new.block
2307 %seu.publisher
2308 output.year.check
2309 incollectionlike.series.volume.number.pages output
2310 format.date.modifydate.citedate output
2311 }
2312 {
2313 format.incoll.inproc.crossref output.nonnull
2314 new.block
2315 }
2316 if$
2317 format.url output
2318 new.block
2319 note output
2320 fin.entry
2321 }
2322
2323 %FUNCTION {cinproceedings} %wk 改自incollection类型
2324 { output.bibitem
2325 author empty$
2326 { format.ceditors "editor" output.check %wk format.editors->format.ceditors
2327 editor format.key output }
2328 { format.cauthors "author" output.check %wk
2329 author format.key output }
2330 if$
2331 new.block
2332 format.cinproceedings.title output
2333 crossref missing$ % Chapter and/or
2334 { format.in.ced.booktitle output % page numbers can
2335 format.cedition output % come out via this %wk edition->cedition
2336 new.block
2337 format.cinproceedings.addr.pub "publisher" output.check
2338 output.cyear.check
2339 cincollectionlike.series.volume.number.pages output % route, too.
2340 format.date.modifydate.citedate output
2341 }
2342 { format.incoll.inproc.crossref output.nonnull
2343 new.block
2344 }
2345 if$
2346 new.block
2347 format.url output
2348 new.block
2349 note output
2350 fin.entry
2351 }
2352 if$
2353 }
2354
2355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2356 FUNCTION {conference} { inproceedings }
2357 %FUNCTION {cconference} { cinproceedings }
2358 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2359 FUNCTION {TECHREPORT} %wk 改自book类型
2360 {language empty$
2361 { output.bibitem
2362 author empty$
2363 { format.editors "author and editor" output.check
2364 editor format.key output
2365 }
2366 { format.authors output.nonnull
2367 crossref missing$
2368 { "author and editor" editor either.or.check }
2369 'skip$
2370 if$
2371 }
2372 if$
2373 new.block
2374 format.title "[R]" * "title" output.check
2375 new.block
2376 crossref missing$
2377 { format.edition output
2378 booklike.series.volume.number output
2379 new.block
2380 format.addr.institution "publisher" output.check
2381 output.year.check output
2382 format.pages output
2383 }
2384 { format.book.crossref output.nonnull
2385 }
2386 if$
2387 new.block
2388 format.url output
2389 new.block
2390 note output
2391 fin.entry
2392 }
2393
2394 %FUNCTION {cTECHREPORT} %wk 改自book类型
2395 { output.bibitem
2396 author empty$
2397 { format.ceditors "author and editor" output.check %wk format.editors->format.ceditors
2398 editor format.key output
2399 }
2400 { format.cauthors output.nonnull
2401 crossref missing$
2402 {"author and editor" editor either.or.check }
2403 'skip$
2404 if$
2405 }
2406 if$
2407 new.block
2408 format.ctitle "[R]" * "title" output.check %wk
2409 new.block
2410 crossref missing$
2411 {
2412 format.cedition output %wk edition->cedition
2413 new.block
2414 format.caddr.institution "publisher" output.check
2415 output.cyear.check %wk
2416 cbooklike.series.volume.number.pages output
2417 }
2418 { format.book.crossref output.nonnull
2419 }
2420 if$
2421 new.block
2422 format.url output
2423 new.block
2424 note output
2425 fin.entry
2426 }
2427 if$
2428 }
2429
2430
2431 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2432 FUNCTION {mastersthesis} %wk 改自book类型
2433 {language empty$
2434 { output.bibitem
2435 author empty$
2436 { format.editors "author and editor" output.check
2437 editor format.key output
2438 }
2439 { format.authors output.nonnull
2440 crossref missing$
2441 { "author and editor" editor either.or.check }
2442 'skip$
2443 if$
2444 }
2445 if$
2446 new.block
2447 format.title "[D]:[Master's Thesis]" * "title" output.check
2448 new.block
2449 crossref missing$
2450 { format.edition output
2451 booklike.series.volume.number output
2452 new.block
2453 % format.addr.pub "publisher" output.check
2454 format.school.pub "publisher" output.check
2455 output.year.check output
2456 format.pages output
2457 }
2458 { format.book.crossref output.nonnull
2459 }
2460 if$
2461 new.block
2462 format.url output
2463 new.block
2464 note output
2465 fin.entry
2466 }
2467
2468 %FUNCTION {cmastersthesis} %wk 改自book类型
2469 { output.bibitem
2470 author empty$
2471 { format.ceditors "author and editor" output.check %wk format.editors->format.ceditors
2472 editor format.key output
2473 }
2474 { format.cauthors output.nonnull
2475 crossref missing$
2476 {"author and editor" editor either.or.check }
2477 'skip$
2478 if$
2479 }
2480 if$
2481 new.block
2482 format.ctitle "[D]:[硕士学位论文]" * "title" output.check %wk
2483 new.block
2484 crossref missing$
2485 {
2486 format.cedition output %wk edition->cedition
2487 new.block
2488 % format.caddr.pub "publisher" output.check
2489 format.cschool.pub "publisher" output.check
2490 output.cyear.check %wk
2491 cbooklike.series.volume.number.pages output
2492 }
2493 { format.book.crossref output.nonnull
2494 }
2495 if$
2496 new.block
2497 format.url output
2498 new.block
2499 note output
2500 fin.entry
2501 }
2502 if$
2503 }
2504 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2505 FUNCTION {phdthesis} %wk 改自book类型
2506 {language empty$
2507 { output.bibitem
2508 author empty$
2509 { format.editors "author and editor" output.check
2510 editor format.key output
2511 }
2512 { format.authors output.nonnull
2513 crossref missing$
2514 { "author and editor" editor either.or.check }
2515 'skip$
2516 if$
2517 }
2518 if$
2519 new.block
2520 format.title "[D]:[PhD Thesis]" * "title" output.check
2521 new.block
2522 crossref missing$
2523 { format.edition output
2524 booklike.series.volume.number output
2525 new.block
2526 % format.addr.pub "publisher" output.check
2527 format.school.pub "publisher" output.check
2528 output.year.check output
2529 format.pages output
2530 }
2531 { format.book.crossref output.nonnull
2532 }
2533 if$
2534 new.block
2535 format.url output
2536 new.block
2537 note output
2538 fin.entry
2539 }
2540
2541 %FUNCTION {cphdthesis} %wk 改自book类型
2542 { output.bibitem
2543 author empty$
2544 { format.ceditors "author and editor" output.check %wk format.editors->format.ceditors
2545 editor format.key output
2546 }
2547 { format.cauthors output.nonnull
2548 crossref missing$
2549 {"author and editor" editor either.or.check }
2550 'skip$
2551 if$
2552 }
2553 if$
2554 new.block
2555 format.ctitle "[D]:[博士学位论文]" * "title" output.check %wk
2556 new.block
2557 crossref missing$
2558 {
2559 format.cedition output %wk edition->cedition
2560 new.block
2561 % format.caddr.pub "publisher" output.check
2562 format.cschool.pub "publisher" output.check
2563 output.cyear.check %wk
2564 cbooklike.series.volume.number.pages output
2565 }
2566 { format.book.crossref output.nonnull
2567 }
2568 if$
2569 new.block
2570 format.url output
2571 new.block
2572 note output
2573 fin.entry
2574 }
2575 if$
2576 }
2577
2578
2579
2580 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2581 FUNCTION {format.conference.title}
2582 {
2583 }
2584
2585 FUNCTION {proceedings} %改自book类型
2586 {language empty$
2587 { output.bibitem
2588 author empty$
2589 { format.editors "author and editor" output.check
2590 editor format.key output
2591 }
2592 { format.authors output.nonnull
2593 crossref missing$
2594 { "author and editor" editor either.or.check }
2595 'skip$
2596 if$
2597 }
2598 if$
2599 new.block
2600 format.conference.title output
2601 new.block
2602 crossref missing$
2603 { format.edition output
2604 booklike.series.volume.number output
2605 new.block
2606 format.addr.pub "publisher" output.check
2607 output.year.check output
2608 format.date.modifydate.citedate output
2609 format.pages output
2610 }
2611 { format.book.crossref output.nonnull
2612 }
2613 if$
2614 new.block
2615 format.url output
2616 new.block
2617 note output
2618 fin.entry
2619 }
2620
2621 %FUNCTION {cproceedings} %改自book类型
2622 { output.bibitem
2623 author empty$
2624 { format.ceditors "author and editor" output.check %wk format.editors->format.ceditors
2625 editor format.key output
2626 }
2627 { format.cauthors output.nonnull
2628 crossref missing$
2629 {"author and editor" editor either.or.check }
2630 'skip$
2631 if$
2632 }
2633 if$
2634 new.block
2635 %format.cconference.title output %wk
2636 output
2637 new.block
2638 crossref missing$
2639 {
2640 format.cedition output %wk edition->cedition
2641 new.block
2642 format.caddr.pub "publisher" output.check
2643 output.cyear.check %wk
2644 cbooklike.series.volume.number.pages output
2645 format.date.modifydate.citedate output
2646 }
2647 { format.book.crossref output.nonnull
2648 }
2649 if$
2650 new.block
2651 format.url output
2652 new.block
2653 note output
2654 fin.entry
2655 }
2656 if$
2657 }
2658 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2659
2660 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2661 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2662 FUNCTION {manual} %改自book类型
2663 {language empty$
2664 { output.bibitem
2665 author empty$
2666 { format.editors "author and editor" output.check
2667 editor format.key output
2668 }
2669 { format.authors output.nonnull
2670 crossref missing$
2671 { "author and editor" editor either.or.check }
2672 'skip$
2673 if$
2674 }
2675 if$
2676 new.block
2677 format.title "[G]" * "title" output.check % 资料汇编
2678 new.block
2679 crossref missing$
2680 { format.edition output
2681 booklike.series.volume.number output
2682 new.block
2683 seu.publisher output
2684 format.url output
2685 output.year.check output
2686 format.pages output
2687 }
2688 { format.book.crossref output.nonnull
2689 }
2690 if$
2691 new.block
2692 note output
2693 fin.entry
2694 }
2695
2696 %FUNCTION {cmanual} %wk
2697 { output.bibitem
2698 author empty$
2699 { format.ceditors "author and editor" output.check %wk format.editors->format.ceditors
2700 editor format.key output
2701 }
2702 { format.cauthors output.nonnull
2703 crossref missing$
2704 {"author and editor" editor either.or.check }
2705 'skip$
2706 if$
2707 }
2708 if$
2709 new.block
2710 format.ctitle "[G]" * "title" output.check %wk
2711 new.block
2712 crossref missing$
2713 { format.cedition output %wk edition->cedition
2714 new.block
2715 format.caddr.pub "publisher" output.check
2716 output.cyear.check %wk
2717 cbooklike.series.volume.number.pages output
2718 }
2719 { format.book.crossref output.nonnull
2720 }
2721 if$
2722 new.block
2723 note output
2724 fin.entry
2725 }
2726 if$
2727 }
2728
2729
2730
2731 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2732 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2733 FUNCTION {misc} %作为非常规文献的格式,可靠性低,应该仔细检查,改自book类型
2734 {language empty$
2735 { output.bibitem
2736 author empty$
2737 { format.editors "author and editor" output.check
2738 editor format.key output
2739 }
2740 {
2741 format.authors output.nonnull
2742 crossref missing$
2743 { "author and editor" editor either.or.check }
2744 'skip$
2745 if$
2746 }
2747 if$
2748 new.block
2749 format.misc.title output
2750 new.block
2751 crossref missing$
2752 {
2753 format.edition output
2754 booklike.series.volume.number output
2755 new.block
2756 seu.publisher output
2757 format.url output
2758 output.year.check output
2759 %format.date.modifydate.citedate output
2760 % format.pages output
2761 }
2762 { format.book.crossref output.nonnull
2763 }
2764 if$
2765 new.block
2766 note output
2767 fin.entry
2768 }
2769
2770 %FUNCTION {cmisc} %作为非常规文献的格式,可靠性低,应该仔细检查,改自book类型
2771 { output.bibitem
2772 author empty$
2773 { format.ceditors "author and editor" output.check %wk format.editors->format.ceditors
2774 editor format.key output
2775 }
2776 { format.cauthors output.nonnull
2777 crossref missing$
2778 {"author and editor" editor either.or.check }
2779 'skip$
2780 if$
2781 }
2782 if$
2783 new.block
2784 format.cmisc.title output
2785
2786 new.block
2787 crossref missing$
2788 {
2789 format.cedition output
2790 new.block
2791 seu.publisher output
2792 output.cyear.check
2793 %cbooklike.series.volume.number.pages output
2794 format.date.modifydate.citedate output
2795 }
2796 { format.book.crossref output.nonnull
2797 }
2798 if$
2799 new.block
2800 format.url output
2801 new.block
2802 note output
2803 fin.entry
2804 }
2805 if$
2806 }
2807
2808 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2809 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2810
2811 FUNCTION {unpublished}
2812 {language empty$
2813 { output.bibitem
2814 format.authors "author" output.check
2815 author format.key output
2816 output.year.month.check
2817 new.block
2818 format.btitle "title" output.check
2819 new.block
2820 note "note" output.check
2821 fin.entry
2822 }
2823
2824 %FUNCTION {cunpublished} %wk
2825 { output.bibitem
2826 format.cauthors "author" output.check %wk
2827 author format.key output
2828 output.cyear.month.check %wk
2829 new.block
2830 format.ctitle "title" output.check %wk
2831 new.block
2832 note "note" output.check
2833 fin.entry
2834 }
2835 if$
2836 }
2837
2838 FUNCTION {default.type} { book } %wk 因为主要是基于book类型,因此将缺省类型由misc改为book
2839
2840 MACRO {jan} {"Jan."} % ODWE, "months", &
2841 % Chicago, p. 383.
2842 MACRO {feb} {"Feb."}
2843
2844 MACRO {mar} {"Mar."}
2845
2846 MACRO {apr} {"Apr."}
2847
2848 MACRO {may} {"May"}
2849
2850 MACRO {jun} {"June"}
2851
2852 MACRO {jul} {"July"}
2853
2854 MACRO {aug} {"Aug."}
2855
2856 MACRO {sep} {"Sept."}
2857
2858 MACRO {oct} {"Oct."}
2859
2860 MACRO {nov} {"Nov."}
2861
2862 MACRO {dec} {"Dec."}
2863
2864 MACRO {acmcs} {"ACM Computing Surveys"}
2865
2866 MACRO {acta} {"Acta Informatica"}
2867
2868 MACRO {cacm} {"Communications of the ACM"}
2869
2870 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
2871
2872 MACRO {ibmsj} {"IBM Systems Journal"}
2873
2874 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
2875
2876 MACRO {ieeetc} {"IEEE Transactions on Computers"}
2877
2878 MACRO {ieeetcad}
2879 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
2880
2881 MACRO {ipl} {"Information Processing Letters"}
2882
2883 MACRO {jacm} {"Journal of the ACM"}
2884
2885 MACRO {jcss} {"Journal of Computer and System Sciences"}
2886
2887 MACRO {scp} {"Science of Computer Programming"}
2888
2889 MACRO {sicomp} {"SIAM Journal on Computing"}
2890
2891 MACRO {tocs} {"ACM Transactions on Computer Systems"}
2892
2893 MACRO {tods} {"ACM Transactions on Database Systems"}
2894
2895 MACRO {tog} {"ACM Transactions on Graphics"}
2896
2897 MACRO {toms} {"ACM Transactions on Mathematical Software"}
2898
2899 MACRO {toois} {"ACM Transactions on Office Information Systems"}
2900
2901 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
2902
2903 MACRO {tcs} {"Theoretical Computer Science"}
2904
2905 READ
2906
2907 %FUNCTION {sortify}
2908 %{ purify$
2909 % "l" change.case$
2910 %}
2911 %
2912 %INTEGERS { len }
2913 %
2914 %FUNCTION {chop.word}
2915 %{ 's :=
2916 % 'len :=
2917 % s #1 len substring$ =
2918 % { s len #1 + global.max$ substring$ }
2919 % 's
2920 % if$
2921 %}
2922 %
2923 %FUNCTION {format.lab.names} %wk
2924 %{ 's :=
2925 % s #1 "{vv~}{ll}" format.name$
2926 % s num.names$ duplicate$
2927 % #2 >
2928 % { pop$ " {\em et~al.}" * }
2929 % { #2 <
2930 % 'skip$
2931 % { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
2932 % { " {\em et~al.}" * }
2933 % { " and " * s #2 "{vv~}{ll}" format.name$ * } %wk
2934 % if$
2935 % }
2936 % if$
2937 % }
2938 % if$
2939 %}
2940 %
2941 %FUNCTION {author.key.label}
2942 %{ author empty$
2943 % { key empty$
2944 % { cite$ #1 #3 substring$ }
2945 % 'key
2946 % if$
2947 % }
2948 % { author format.lab.names }
2949 % if$
2950 %}
2951 %
2952 %FUNCTION {author.editor.key.label}
2953 %{ author empty$
2954 % { editor empty$
2955 % { key empty$
2956 % { cite$ #1 #3 substring$ }
2957 % 'key
2958 % if$
2959 % }
2960 % { editor format.lab.names }
2961 % if$
2962 % }
2963 % { author format.lab.names }
2964 % if$
2965 %}
2966 %
2967 %FUNCTION {editor.key.label}
2968 %{ editor empty$
2969 % { key empty$
2970 % { cite$ #1 #3 substring$ }
2971 % 'key
2972 % if$
2973 % }
2974 % { editor format.lab.names }
2975 % if$
2976 %}
2977 %
2978 %FUNCTION {calc.label} %wk修改
2979 % { type$ "book" =
2980 % type$ "cbook" =
2981 % type$ "inbook" =
2982 % type$ "cinbook" =
2983 % type$ "incollection" = % For sensible
2984 % type$ "cincollection" =
2985 % or or or or or % treatment of
2986 % 'author.editor.key.label % Singer in
2987 % { type$ "proceedings" = % BS 1629.
2988 % 'editor.key.label
2989 % 'author.key.label
2990 % if$
2991 % type$ "cproceedings" = % BS 1629.
2992 % 'editor.key.label
2993 % 'author.key.label
2994 % if$
2995 %
2996 % }
2997 % if$
2998 % duplicate$
2999 % year empty$
3000 % {
3001 % "\protect\citename{" swap$ * ", }" *
3002 % "n.d." * 'label := % Chicago,
3003 % } % page 457.
3004 % {
3005 % "\protect\citename{" swap$ * ", }" *
3006 % year
3007 % *
3008 % 'label :=
3009 % }
3010 % if$
3011 % year field.or.null purify$ *
3012 % sortify 'sort.label :=
3013 %}
3014 %
3015 %
3016 %FUNCTION {sort.format.names} % To produce the
3017 %{ 's := % order of entries
3018 % #1 'nameptr := % specified in item
3019 % "" % (3) on page 187
3020 % s num.names$ 'numnames := % of Butcher.
3021 % numnames 'namesleft :=
3022 % { namesleft #0 > nameptr #3 < and } % Only 1st 2 names
3023 % { nameptr #1 > % matter for
3024 % {
3025 % " " * } % sorting.
3026 % 'skip$
3027 % if$ % Anything that's
3028 % nameptr #2 = numnames #2 > and % "et al" goes
3029 % { "zzzzz" * } % after works by 2
3030 % { % authors.
3031 % s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
3032 % nameptr numnames = t "others" = and
3033 % { "zzzzz" * }
3034 % { t sortify * }
3035 % if$
3036 % }
3037 % if$
3038 % nameptr #1 + 'nameptr :=
3039 % namesleft #1 - 'namesleft :=
3040 % }
3041 % while$
3042 %}
3043 %
3044 %FUNCTION {sort.format.title}
3045 %{ 't :=
3046 % "A " #2
3047 % "An " #3
3048 % "The " #4 t chop.word
3049 % chop.word
3050 % chop.word
3051 % sortify
3052 % #1 global.max$ substring$
3053 %}
3054 %
3055 %FUNCTION {author.sort}
3056 %{ author empty$
3057 % { key empty$
3058 % { "to sort, need author or key in " cite$ * warning$
3059 % ""
3060 % }
3061 % { key sortify }
3062 % if$
3063 % }
3064 % { author sort.format.names }
3065 % if$
3066 %}
3067 %
3068 %FUNCTION {author.editor.sort}
3069 %{ author empty$
3070 % { editor empty$
3071 % { key empty$
3072 % { "to sort, need author, editor, or key in " cite$ * warning$
3073 % ""
3074 % }
3075 % { key sortify }
3076 % if$
3077 % }
3078 % { editor sort.format.names }
3079 % if$
3080 % }
3081 % { author sort.format.names }
3082 % if$
3083 %}
3084 %
3085 %FUNCTION {editor.sort}
3086 %{ editor empty$
3087 % { key empty$
3088 % { "to sort, need editor or key in " cite$ * warning$
3089 % ""
3090 % }
3091 % { key sortify }
3092 % if$
3093 % }
3094 % { editor sort.format.names }
3095 % if$
3096 %}
3097 %
3098 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%->
3099 %INTEGERS { seq.num }
3100 %
3101 %FUNCTION {init.seq}
3102 %{ #0 'seq.num :=}
3103 %
3104 %EXECUTE {init.seq}
3105 %
3106 %FUNCTION {int.to.fix}
3107 %{ "000000000" swap$ int.to.str$ *
3108 % #-1 #10 substring$
3109 %}
3110 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<-
3111 %
3112 %FUNCTION {presort}
3113 %{ calc.label
3114 % label sortify
3115 % " "
3116 % *
3117 % seq.num #1 + 'seq.num :=
3118 % seq.num int.to.fix
3119 % 'sort.label :=
3120 % sort.label *
3121 % #1 entry.max$ substring$
3122 % 'sort.key$ :=
3123 %}
3124 %
3125 %
3126 %%FUNCTION {presort} % Two sorting
3127 %%{ calc.label % passes, from
3128 %% label sortify % apalike.bst.
3129 %% " "
3130 %% *
3131 %% type$ "book" =
3132 %% type$ "inbook" =
3133 %% type$ "incollection" = % For Singer
3134 %% or or % in BS 1629.
3135 %% 'author.editor.sort
3136 %% { type$ "proceedings" =
3137 %% 'editor.sort
3138 %% 'author.sort
3139 %% if$
3140 %% }
3141 %% if$
3142 %% #1 entry.max$ substring$
3143 %% 'sort.label :=
3144 %% sort.label
3145 %% *
3146 %% " "
3147 %% *
3148 %% title field.or.null
3149 %% sort.format.title
3150 %% *
3151 %% #1 entry.max$ substring$
3152 %% 'sort.key$ :=
3153 %%}
3154 %
3155 %ITERATE {presort}
3156 %
3157 %SORT
3158 %
3159 %STRINGS { last.label next.extra }
3160 %
3161 %INTEGERS { last.extra.num }
3162 %
3163 %FUNCTION {initialize.extra.label.stuff}
3164 %{ #0 int.to.chr$ 'last.label :=
3165 % "" 'next.extra :=
3166 % #0 'last.extra.num :=
3167 %}
3168 %
3169 %FUNCTION {forward.pass}
3170 %{ last.label label =
3171 % { last.extra.num #1 + 'last.extra.num :=
3172 % last.extra.num int.to.chr$ 'extra.label :=
3173 % }
3174 % { "a" chr.to.int$ 'last.extra.num :=
3175 % "" 'extra.label :=
3176 % label 'last.label :=
3177 % }
3178 % if$
3179 %}
3180 %
3181 %FUNCTION {reverse.pass}
3182 %{ next.extra "b" =
3183 % { "a" 'extra.label := }
3184 % 'skip$
3185 % if$ % Code needed here
3186 % % if \citeauthor
3187 % % and \citeyear
3188 % label extra.label * 'label := % were supported.
3189 % extra.label 'next.extra :=
3190 %}
3191 %
3192 %EXECUTE {initialize.extra.label.stuff}
3193 %
3194 %ITERATE {forward.pass}
3195 %
3196 %REVERSE {reverse.pass}
3197 %
3198 %FUNCTION {bib.sort.order}
3199 %{ sort.label
3200 % " "
3201 % *
3202 % year field.or.null sortify
3203 % *
3204 % " "
3205 % *
3206 % title field.or.null
3207 % sort.format.title
3208 % *
3209 % #1 entry.max$ substring$
3210 % 'sort.key$ :=
3211 %}
3212 %
3213 %ITERATE {bib.sort.order}
3214 %
3215 %SORT
3216 %
3217 %FUNCTION {begin.bib}
3218 %{ preamble$ empty$
3219 % 'skip$
3220 % { preamble$ write$ newline$ }
3221 % if$
3222 % "\begin{thebibliography}{}" write$ newline$
3223 %
3224 %%开始
3225 % "\providecommand{\url}[1]{\texttt{#1}}"
3226 % write$ newline$
3227 % "\expandafter\ifx\csname urlstyle\endcsname\relax"
3228 % write$ newline$
3229 % " \providecommand{\doi}[1]{doi: #1}\else"
3230 % write$ newline$
3231 % " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
3232 % write$ newline$
3233 %%结束
3234 %
3235 %}
3236 %
3237 %EXECUTE {begin.bib}
3238 %
3239 %EXECUTE {init.state.consts}
3240 %
3241 %ITERATE {call.type$}
3242 %
3243 %FUNCTION {end.bib}
3244 %{ newline$
3245 % "\end{thebibliography}" write$ newline$
3246 %}
3247 %
3248 %EXECUTE {end.bib}
3249
3250
3251
3252
3253
3254
3255
3256
3257 FUNCTION {sortify}
3258 { purify$
3259 "l" change.case$
3260 }
3261
3262 INTEGERS { len }
3263
3264 FUNCTION {chop.word}
3265 { 's :=
3266 'len :=
3267 s #1 len substring$ =
3268 { s len #1 + global.max$ substring$ }
3269 's
3270 if$
3271 }
3272
3273
3274
3275
3276 FUNCTION {format.lab.names} %wk
3277 { 's :=
3278 s #1 "{vv~}{ll}" format.name$
3279 s num.names$ duplicate$
3280 #2 >
3281 { pop$ " et al." * }
3282 { #2 <
3283 'skip$
3284 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
3285 { " {\em et~al.}" * }
3286 { " and " * s #2 "{vv~}{ll}" format.name$ * } %wk
3287 if$
3288 }
3289 if$
3290 }
3291 if$
3292 }
3293
3294 FUNCTION {format.lab.cnames} %wk
3295 { 's :=
3296 s #1 "{vv~}{ll}" format.name$
3297 s num.names$ duplicate$
3298 #2 >
3299 { pop$ "~等" * }
3300 { #2 <
3301 'skip$
3302 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
3303 { " {\em et~al.}" * }
3304 { "和" * s #2 "{vv~}{ll}" format.name$ * } %wk
3305 if$
3306 }
3307 if$
3308 }
3309 if$
3310 }
3311
3312 FUNCTION {author.key.label}
3313 { author empty$
3314 { key empty$
3315 { cite$ #1 #3 substring$ }
3316 'key
3317 if$
3318 }
3319 % {author format.lab.names }
3320 {language empty$
3321 {author format.lab.names}
3322 {author format.lab.cnames}
3323 if$}
3324
3325 if$
3326 }
3327
3328 FUNCTION {author.editor.key.label}
3329 { author empty$
3330 { editor empty$
3331 { key empty$
3332 { cite$ #1 #3 substring$ }
3333 'key
3334 if$
3335 }
3336 % { editor format.lab.names }
3337 {language empty$
3338 {editor format.lab.names}
3339 {editor format.lab.cnames}
3340 if$}
3341
3342 if$
3343 }
3344 % { author format.lab.names }
3345 {language empty$
3346 {author format.lab.names}
3347 {author format.lab.cnames}
3348 if$}
3349
3350 if$
3351 }
3352
3353 FUNCTION {editor.key.label}
3354 { editor empty$
3355 { key empty$
3356 { cite$ #1 #3 substring$ }
3357 'key
3358 if$
3359 }
3360 % { editor format.lab.names }
3361 {language empty$
3362 {editor format.lab.names}
3363 {editor format.lab.cnames}
3364 if$}
3365
3366 if$
3367 }
3368
3369 FUNCTION {author.key.organization.label}
3370 { author empty$
3371 { key empty$
3372 { organization empty$
3373 { cite$ #1 #3 substring$ }
3374 { "The " #4 organization chop.word #3 text.prefix$ }
3375 if$
3376 }
3377 'key
3378 if$
3379 }
3380 { author format.lab.names }
3381 if$
3382 }
3383
3384 FUNCTION {editor.key.organization.label}
3385 { editor empty$
3386 { key empty$
3387 { organization empty$
3388 { cite$ #1 #3 substring$ }
3389 { "The " #4 organization chop.word #3 text.prefix$ }
3390 if$
3391 }
3392 'key
3393 if$
3394 }
3395 { editor format.lab.names }
3396 if$
3397 }
3398
3399 FUNCTION {calc.short.authors}
3400 { type$ "book" =
3401 type$ "inbook" =
3402 or
3403 'author.editor.key.label
3404 { type$ "proceedings" =
3405 'editor.key.organization.label
3406 { type$ "manual" =
3407 'author.key.organization.label
3408 'author.key.label
3409 if$
3410 }
3411 if$
3412 }
3413 if$
3414 'short.list :=
3415 }
3416
3417 FUNCTION {calc.label}
3418 { calc.short.authors
3419 short.list
3420 "("
3421 *
3422 year duplicate$ empty$
3423 short.list key field.or.null = or
3424 { pop$ ""}
3425 'skip$
3426 if$
3427 * ")" *
3428 'label :=
3429 }
3430
3431 INTEGERS { seq.num }
3432
3433 FUNCTION {init.seq}
3434 { #0 'seq.num :=}
3435
3436 EXECUTE {init.seq}
3437
3438 FUNCTION {int.to.fix}
3439 { "000000000" swap$ int.to.str$ *
3440 #-1 #10 substring$
3441 }
3442
3443
3444 FUNCTION {presort}
3445 { calc.label
3446 label sortify
3447 " "
3448 *
3449 seq.num #1 + 'seq.num :=
3450 seq.num int.to.fix
3451 'sort.label :=
3452 sort.label *
3453 #1 entry.max$ substring$
3454 'sort.key$ :=
3455 }
3456
3457 ITERATE {presort}
3458
3459 SORT
3460
3461 STRINGS { longest.label last.label next.extra }
3462
3463 INTEGERS { longest.label.width last.extra.num number.label }
3464
3465 FUNCTION {initialize.longest.label}
3466 { "" 'longest.label :=
3467 #0 int.to.chr$ 'last.label :=
3468 "" 'next.extra :=
3469 #0 'longest.label.width :=
3470 #0 'last.extra.num :=
3471 #0 'number.label :=
3472 }
3473
3474 FUNCTION {forward.pass}
3475 { last.label label =
3476 { last.extra.num #1 + 'last.extra.num :=
3477 last.extra.num int.to.chr$ 'extra.label :=
3478 }
3479 { "a" chr.to.int$ 'last.extra.num :=
3480 "" 'extra.label :=
3481 label 'last.label :=
3482 }
3483 if$
3484 number.label #1 + 'number.label :=
3485 }
3486
3487 FUNCTION {reverse.pass}
3488 { next.extra "b" =
3489 { "a" 'extra.label := }
3490 'skip$
3491 if$
3492 extra.label 'next.extra :=
3493 extra.label
3494 duplicate$ empty$
3495 'skip$
3496 { "{\natexlab{" swap$ * "}}" * }
3497 if$
3498 'extra.label :=
3499 label extra.label * 'label :=
3500 }
3501
3502 EXECUTE {initialize.longest.label}
3503
3504 ITERATE {forward.pass}
3505
3506 REVERSE {reverse.pass}
3507
3508 FUNCTION {bib.sort.order}
3509 { sort.label 'sort.key$ :=
3510 }
3511
3512 ITERATE {bib.sort.order}
3513
3514 SORT
3515
3516 FUNCTION {begin.bib}
3517 { preamble$ empty$
3518 'skip$
3519 { preamble$ write$ newline$ }
3520 if$
3521 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
3522 write$ newline$
3523 "\providecommand{\natexlab}[1]{#1}"
3524 write$ newline$
3525 "\providecommand{\url}[1]{\texttt{#1}}"
3526 write$ newline$
3527 "\expandafter\ifx\csname urlstyle\endcsname\relax"
3528 write$ newline$
3529 " \providecommand{\doi}[1]{doi: #1}\else"
3530 write$ newline$
3531 " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
3532 write$ newline$
3533 }
3534
3535 EXECUTE {begin.bib}
3536
3537 EXECUTE {init.state.consts}
3538
3539 ITERATE {call.type$}
3540
3541 FUNCTION {end.bib}
3542 { newline$
3543 "\end{thebibliography}" write$ newline$
3544 }
3545
3546 EXECUTE {end.bib}
3547
3548
3549
3550
3551