-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsz.cls
1662 lines (1522 loc) · 55 KB
/
sz.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% File: ShigakuZasshi type pLaTeX class
% First released: 2004/03/12 v0.2 小川 弘和
% website: http://www2.kumagaku.ac.jp/teacher/herogw/
% Modified by: Steve Cheung 子 康
% Modified date: 2019/01/25 -- today 2019/09/28
%
\NeedsTeXFormat{pLaTeX2e}
\ProvidesClass{sz}[2024/04/01 v1.8c ShigakuZasshi type pLaTeX class]
% 定義的紙張
\newcounter{@paper}
\DeclareOption{a4paper}{\setcounter{@paper}{1}%
\setlength\paperheight {297mm}%
\setlength\paperwidth {210mm}}
\DeclareOption{a5paper}{\setcounter{@paper}{2}%
\setlength\paperheight {210mm}
\setlength\paperwidth {148mm}}
\DeclareOption{b4paper}{\setcounter{@paper}{3}%
\setlength\paperheight {354mm}
\setlength\paperwidth {250mm}}
\DeclareOption{b5paper}{\setcounter{@paper}{4}% JIS B5
\setlength\paperheight {257mm}
\setlength\paperwidth {182mm}}
\DeclareOption{A4}{\setcounter{@paper}{1}%
\setlength\paperheight {297mm}%
\setlength\paperwidth {210mm}}
\DeclareOption{A5}{\setcounter{@paper}{2}%
\setlength\paperheight {210mm}
\setlength\paperwidth {148mm}}
\DeclareOption{B4}{\setcounter{@paper}{3}%
\setlength\paperheight {354mm}
\setlength\paperwidth {250mm}}
\DeclareOption{B5}{\setcounter{@paper}{4}% JIS B5
\setlength\paperheight {257mm}
\setlength\paperwidth {182mm}}
\newif\if@test \@testfalse
\DeclareOption{test}{\@testtrue\setcounter{@paper}{5}%
\setlength\paperheight {257mm}
\setlength\paperwidth {5200mm}}
\if@test
\setlength{\textheight}{4200 mm}
\fi
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{oneside}{\@twosidefalse}
\DeclareOption{twoside}{\@twosidetrue}
%定義的佈局:landscape
\newif\if@landscape \@landscapefalse
\DeclareOption{landscape}{\@landscapetrue
\setlength\@tempdima{\paperheight}%
\setlength\paperheight{\paperwidth}%
\setlength\paperwidth{\@tempdima}}
%定義的標題、副標題、作者及作者名字縮寫
\def\maintitle#1{\gdef\@maintitle{#1}}
\def\@maintitle{\@latex@warning@no@line{No \noexpand\maintitle given}}
\def\subtitle#1{\gdef\@subtitle{#1}}
\def\@subtitle{\relax}
\def\authorfn#1{\gdef\@authorfn{#1}}
\def\@authorfn{\@latex@warning@no@line{No \noexpand\authorfn given}}
\newif\if@pdfm \@pdfmfalse
\newif\if@restonecol
\newif\if@openright
\newif\if@openleft
\newif\if@mainmatter \@mainmattertrue
\hour\time \divide\hour by 60\relax
\@tempcnta\hour \multiply\@tempcnta 60\relax
\minute\time \advance\minute-\@tempcnta
\newif\if@enablejfam \@enablejfamtrue
\DeclareOption{tombow}{%
\tombowtrue \tombowdatetrue
\setlength{\@tombowwidth}{.1\p@}%
\@bannertoken{%
\jobname\space:\space\number\year/\number\month/\number\day
(\number\hour:\number\minute)}
\maketombowbox}
\DeclareOption{tate}{%
\AtBeginDocument{\tate\message{《縦組モード》}%
\adjustbaseline}%
}
\newif\if@watermarked \@watermarkedfalse
\DeclareOption{水印}{\@watermarkedtrue}
\newif\if@backgrounged \@backgroungedfalse
\DeclareOption{背景}{\@backgroungedtrue}
\newif\if@kasened \@kasenedfalse
\DeclareOption{网格}{\@kasenedtrue}
\DeclareOption{watermark}{\@watermarkedtrue}
\DeclareOption{pdfm}{\@pdfmtrue \input{colordef.tex}} % 打開糸欄開關,竝引入顔色定義。
\DeclareOption{openright}{\@openrighttrue\@openleftfalse}
\DeclareOption{openleft}{\@openlefttrue\@openrightfalse}
\DeclareOption{openany}{\@openrightfalse\@openleftfalse}
\DeclareOption{disablejfam}{\@enablejfamfalse}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
%%%%%%%%%%%%%%% 顔色定義 %%%%%%%%%%%%%%%
\DeclareOption{墨}{\def\@masuiro{Black}\def\@fishcolor{Black}}%
\DeclareOption{淺朱}{\def\@masuiro{kakiiro!80}\def\@fishcolor{shuiro!80}}%
\DeclareOption{朱}{\def\@masuiro{kakiiro!90}\def\@fishcolor{shuiro!90}}%
\DeclareOption{紅}{\def\@masuiro{Red!80}\def\@fishcolor{shuiro!85}}%
\DeclareOption{Black}{\def\@columncolor{Black}\def\@riboncolor{Black}}%
\DeclareOption{LightRed}{\def\@columncolor{kakiiro!80}\def\@riboncolor{shuiro!80}}%
\DeclareOption{kakiiro}{\def\@columncolor{kakiiro!90}\def\@riboncolor{shuiro!90}}%
\DeclareOption{Red}{\def\@columncolor{Red!80}\def\@riboncolor{red!75}}%
%%%%%%%%%%%%%%% 顔色定義 %%%%%%%%%%%%%%%
\ExecuteOptions{b5paper,final,openleft,tate,twoside,onecolumn,淺朱,LightRed}
\ProcessOptions\relax
% 版面縮放至0.913倍
% \mag 913 % formerly 900
% \setlength\paperwidth{1.09529\paperwidth}%
% \setlength\paperheight{1.09529\paperheight}%
\def\n@baseline{28}%
\def\Cjascale{0.924690}
%
%定義的編碼方式:JT2表示縱書字體
\def\kanjiencodingdefault{JT2}%
\kanjiencoding{\kanjiencodingdefault}%
%% 定義正文字號
\renewcommand{\normalsize}{% \normalsize=10pt@18pt
\@setfontsize\normalsize\@xpt{15}%
\abovedisplayskip 6\p@ \@plus3\p@ \@minus3\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
\normalsize
\setbox0\hbox{\char\euc"A1A1}%
\setlength\Cht{\ht0}
\setlength\Cdp{\dp0}
\setlength\Cwd{\wd0}
\setlength\Cvs{\baselineskip}
\setlength\Chs{\wd0}
% 字號設定
\newcommand{\small}{%
\@setfontsize\small{8}{10}%
\abovedisplayskip 8\p@ \@plus3\p@ \@minus2\p@
\abovedisplayshortskip \z@ \@plus2\p@
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 4\p@ \@plus2\p@ \@minus2\p@
\parsep 2\p@ \@plus\p@ \@minus\p@
\itemsep \parsep}%
\belowdisplayskip \abovedisplayskip}
\newcommand{\footnotesize}{%
\@setfontsize\footnotesize\@viiipt{9.5}%
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
\abovedisplayshortskip \z@ \@plus\p@
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
\def\@listi{\leftmargin\leftmargini
\topsep 0\p@
\parsep 0\p@
\itemsep \parsep}%
\belowdisplayskip \abovedisplayskip}
% 字號設定
\newcommand{\tiny}{\@setfontsize\tiny{3pt}{3pt}} %\tiny= 7pt@9pt
\newcommand{\scriptsize}{\@setfontsize\scriptsize{10pt}{12}} %\scriptsize=10pt@12pt
\newcommand{\large}{\@setfontsize\large\@xiipt{15.05}} %\large= 12pt@18pt
\newcommand{\Large}{\@setfontsize\Large{12}{28}} %\Large= 14pt@22pt
\newcommand{\LARGE}{\@setfontsize\LARGE{15.14}{28}} %\LARGE= 16pt@26pt
% 因正文夾注排版需要,特將此設定爲2倍行距为宜
\newcommand{\huge}{\@setfontsize\huge{20pt}{28}} %\huge= 20pt@28pt
\newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{42}} %\Huge= 25pt@36pt
\newcommand{\liuhao}{\@setfontsize\liuhao{7.52812pt}{10}} % 六號
\newcommand{\xiaowu}{\@setfontsize\xiaowu{9.03374pt}{12}} % 小五
\newcommand{\wuhao}{\@setfontsize\wuhao{10.53937pt}{18}} % 五號
\newcommand{\xiaosi}{\@setfontsize\xiaosi{12.045pt}{22.5}} % 小四
\newcommand{\sihao}{\@setfontsize\sihao{14.05249pt}{22.5}} % 四號
\newcommand{\xiaosan}{\@setfontsize\xiaosan{15.05624pt}{22.5}} % 小三
\newcommand{\sanhao}{\@setfontsize\sanhao{16.06pt}{22.5}} % 三號
\newcommand{\xiaoer}{\@setfontsize\xiaoer{18.06749pt}{25}} % 小二
\newcommand{\erhao}{\@setfontsize\erhao{22.08249}{36}} %(二號)
\newcommand{\xiaoyi}{\@setfontsize\xiaoyi{24.09}{36}} %(小一)
\newcommand{\yihao}{\@setfontsize\yihao{26.09749}{36}} %(一號)
\newcommand{\xiaochu}{\@setfontsize\xiaochu{39.578}{48}} %(小初)
\newcommand{\chuhao}{\@setfontsize\chuhao{42.15749}{48}} %(初號)
%自定義的字號
\newcommand{\bthuge}{\@setfontsize\bthuge{60}{72}}
\newcommand{\btlarge}{\@setfontsize\btlarge{48}{60}}
\newcommand{\tlarge}{\@setfontsize\tlarge{36}{48}}
\newcommand{\ularge}{\@setfontsize\ularge{28}{48}}
\newcommand{\verthuge}{\@setfontsize\verthuge{25}{25}}
\newcommand{\szix}{\@setfontsize\szix{9}{12}}
\newcommand{\szx}{\@setfontsize\szx{10}{12}}
\newcommand{\szxi}{\@setfontsize\szxi{11}{12}}
\newcommand{\szxii}{\@setfontsize\szxii{12}{12}}
\newcommand{\zhy}{\@setfontsize\zhy{15.14}{28}} % 葬花吟
\newcommand{\szhuge}{\@setfontsize\szhuge{15.14}{28}} % 好了歌
%%%古典字體設置
\DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
\DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
\DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
\DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
\RequirePackage{multicol} %多欄
\RequirePackage{type1cm} %字體
\RequirePackage[expert,uplatex,deluxe,jis2004]{otf} %字體包
\RequirePackage[usenames]{color}
\RequirePackage[usenames,dvipsnames]{xcolor}
\RequirePackage{jcolor}
\RequirePackage{plext} % 縱組顓用增强包
\RequirePackage{plautopatch} % 為 pLaTeX 打補丁
\plautopatchdisable{eso-pic}
\RequirePackage{zhnumber}
\zhnumsetup{style=Ancient}
\setlength\voffset{0mm}
\setlength\hoffset{0mm}
\setlength\headheight{0mm}
\setlength\headsep{0mm}
%\setlength\topskip{1\Cht} % 千萬不要動這里,眞的會炸的。
\setlength\topskip{12 pt}
\setlength\footskip{12 pt}
\setlength\maxdepth{0 pt}
\if@twocolumn
\setlength\textwidth{.8\paperheight}
\else
\setlength\textwidth{.8\paperheight}
\fi
\@settopoint\textwidth
\setlength\textheight{.7\paperwidth}
\addtolength\textheight{\topskip}
\@settopoint\textheight
\setlength\topmargin{-5mm}
\@settopoint\topmargin
\if@twocolumn
\setlength\marginparsep{0mm}
\else
\setlength\marginparsep{0mm}
\fi
\setlength\marginparpush{10\p@} %%%%兩個旁注相鄰間隔
\setlength\@tempdima{\paperwidth}
\addtolength\@tempdima{-\textheight}
\setlength\oddsidemargin{.6\@tempdima}
\addtolength\oddsidemargin{-1in}
\setlength\evensidemargin{\paperwidth}
\addtolength\evensidemargin{-2in}
\addtolength\evensidemargin{-\textheight}
\addtolength\evensidemargin{-\oddsidemargin}
\@settopoint\oddsidemargin % 1999.1.6
\@settopoint\evensidemargin
\setlength\@tempdima{\paperheight}
\addtolength\@tempdima{-\textwidth}
\addtolength\@tempdima{-\topmargin}
\addtolength\@tempdima{-\headheight}
\addtolength\@tempdima{-\headsep}
\addtolength\@tempdima{-\footskip}
\setlength\marginparwidth{0mm}
\@settopoint\marginparwidth
\setlength\footnotesep{10\p@ }
\setlength{\skip\footins}{10\p@ }
\setlength\floatsep {6\p@ }
\setlength\textfloatsep{6\p@ }
\setlength\intextsep {6\p@ }
\setlength\dblfloatsep {6\p@ }
\setlength\dbltextfloatsep{6\p@ }
\setlength\@fptop{0\p@}
\setlength\@fpsep{0\p@}
\setlength\@fpbot{0\p@}
\setlength\@dblfptop{0\p@}
\setlength\@dblfpsep{0\p@}
\setlength\@dblfpbot{0\p@}
\setlength\partopsep{0\p@}
\def\@listi{\leftmargin 30pt
\parsep 0 pt
\topsep 0 pt
\itemsep 0 pt
}
\let\@listI\@listi
\@listi
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii \advance\labelwidth-\labelsep
\topsep 4\p@ \@plus2\p@ \@minus\p@
\parsep 2\p@ \@plus\p@ \@minus\p@
\itemsep\parsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii \advance\labelwidth-\labelsep
\topsep 2\p@ \@plus\p@\@minus\p@
\parsep\z@
\partopsep \p@ \@plus\z@ \@minus\p@
\itemsep\topsep}
\def\@listiv {\leftmargin\leftmarginiv
\labelwidth\leftmarginiv
\advance\labelwidth-\labelsep}
\def\@listv {\leftmargin\leftmarginv
\labelwidth\leftmarginv
\advance\labelwidth-\labelsep}
\def\@listvi {\leftmargin\leftmarginvi
\labelwidth\leftmarginvi
\advance\labelwidth-\labelsep}
\def\pltx@cleartorightpage{\clearpage\if@twoside
\ifodd\c@page
\iftdir
\hbox{}\thispagestyle{empty}\watermarkoff\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi
\else
\ifydir
\hbox{}\thispagestyle{empty}\watermarkoff\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi
\fi\fi}
\def\pltx@cleartoleftpage{\clearpage\if@twoside
\ifodd\c@page
\ifydir
\hbox{}\thispagestyle{empty}\watermarkoff\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi
\else
\iftdir
\hbox{}\thispagestyle{empty}\watermarkoff\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi
\fi\fi}
\def\pltx@cleartooddpage{\clearpage\if@twoside
\ifodd\c@page\else
\hbox{}\thispagestyle{empty}\watermarkoff\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi\fi}
\def\pltx@cleartoevenpage{\clearpage\if@twoside
\ifodd\c@page
\hbox{}\thispagestyle{empty}\watermarkoff\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi\fi}
\if@openleft
\let\cleardoublepage\pltx@cleartooddpage
\else\if@openright
\let\cleardoublepage\pltx@cleartorightpage
\fi\fi
% 正文翻页,空白页采用糸栏
\def\pltx@mycleartoleftpage{\clearpage
\ifodd\c@page \else
\hbox{}\thispagestyle{plain}\watermarkoff\watermarkeven\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi}
\def\mycleardbpage{\pltx@mycleartoleftpage}
% 前言翻页和附录翻页。使用 kochu 模式
\def\pltx@kochucleartoleftpage{\clearpage
\ifodd\c@page \else
\hbox{}\thispagestyle{empty}\watermarkoff\watermkkochueven\newpage
\if@twocolumn\hbox{}\newpage\fi
\fi}
\def\cleardbpage{\pltx@kochucleartoleftpage}
\setlength{\columnsep}{2\Cwd} % 中文縱書:欄間距 2 個全角字
\setlength{\columnseprule}{0\p@} % 雙欄 欄綫設定(無欄綫)
\setlength{\lineskip}{0\p@} % 行間距 1 pt
\setlength{\normallineskip}{0\p@} % 正文行間距 1 pt
\renewcommand{\baselinestretch}{} % 置空基綫距離縮放因子
%\setlength{\parskip}{0\p@ \@plus \p@} % 段間距 0 pt
\setlength{\parskip}{0mm}
\setlength{\parindent}{1\Cwd} % 退格 1 個全角字(此處設定不會對全局縮進產生任何影響)
\setlength{\marginparsep}{2\Cwd} % 中文縱書:頭注與正文之間應空格 2 個全角字
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{1}
\setcounter{totalnumber}{3}
\setcounter{dbltopnumber}{2}
\renewcommand{\topfraction}{.7}
\renewcommand{\bottomfraction}{.3}
\renewcommand{\textfraction}{.2}
\renewcommand{\floatpagefraction}{.5}
\renewcommand{\dbltopfraction}{.7}
\renewcommand{\dblfloatpagefraction}{.5}
% 引入計數器
\newcounter{chapter}
\newcounter{ppage}[chapter]
\setcounter{ppage}{1}
\newcounter{szpage} % 前言页码
\setcounter{szpage}{1}
%%%%%% 自定義的水印命令 %頁眉、頁碼設置
\RequirePackage[dvipdfmx]{graphicx}%
\RequirePackage{tikz}
\RequirePackage{eso-pic}
\RequirePackage{ifthen}
\font\@fish gerib10 at 22pt
\def\fontsymbol#1{\@fish\symbol{#1}}
\def\@tfish{\hbox{\yoko\color{\@fishcolor}\@fish\symbol{65}}}
\def\@bfish{\hbox{\yoko\color{\@fishcolor}\@fish\symbol{66}}}
\def\tfish{\hbox{\yoko\color{\@fishcolor}\@fish\symbol{65}}}
\def\bfish{\hbox{\yoko\color{\@fishcolor}\@fish\symbol{66}}}
% 定義奇數頁糸欄
\def\@ribonodd{%
\foreach \i in {420,390,...,60}{%
% 起始點 420 + 30pt 每欄 从右往左
\draw [ color=\@riboncolor ] (\i pt, 2.2)--(\i pt, 19.8);}}% 奇數頁絲欄
% 定義偶數頁糸欄
\def\@riboneven{%
\foreach \i in {458,428,...,90}{%
% 起始點 458 + 30pt 每欄 从右往左
\draw [ color=\@riboncolor ] (\i pt, 2.2)--(\i pt, 19.8);}}% 偶數頁絲欄
% 定義奇數頁内外邉框
\def\@kasenodd{%
\draw [line width=3pt, color=\@columncolor ] (0.8,2.0) rectangle (16.0,20.0);% 外框
\draw [line width=1pt, color=\@riboncolor ] (1.0,2.2) rectangle (15.8,19.8);% 內框
\draw [line width=3pt, color=\@columncolor ] (0,2.0) -- (0.8,2.0); % 下欄綫
\draw [line width=3pt, color=\@columncolor ] (0,20.0) -- (0.8,20.0); % 上欄綫
}
% 定義偶數頁内外邉框
\def\@kaseneven{%
\draw [line width=3pt, color=\@columncolor ] (2.2,2.0) rectangle (17.4,20.0);% 外框
\draw [line width=1pt, color=\@riboncolor ] (2.4,2.2) rectangle (17.2,19.8);% 內框
\draw [line width=3pt, color=\@columncolor ] (17.2,2.0) -- (20,2.0); % 下欄綫
\draw [line width=3pt, color=\@columncolor ] (17.2,20.0) -- (20,20.0); % 上欄綫
}
% 定義奇數頁魚尾、奇偶公用頁碼
\def\@fishodd{%
% \draw [line width=20pt, color=\@columncolor ] (0,19.8) -- (0,19); % 上封綫
% \draw [line width=20pt, color=\@columncolor ] (0,2.0) -- (0,4); % 下封綫
\node [below,] at%
(0,19) {\hbox{\tate\@tfish}};
% \node [below,] at%
% (0,9) {\hbox{\tate\@tfish}};
\node [below,] at%\makebox[3zw]
(0,6) {\hbox{\tate{\verthuge\gtfamily\ebseries%
\color{\@columncolor}\zhnumber{\@arabic\c@ppage}}}};
\node [below,] at%
(0,4) {\hbox{\tate\@bfish}};
}
% 定義偶數頁魚尾、奇偶公用頁碼
\def\@fisheven{%
% \draw [line width=20pt, color=\@columncolor ] (18.2,19.8) -- (18.2,19); % 上封綫
% \draw [line width=20pt, color=\@columncolor ] (18.2,2.0) -- (18.2,4); % 下封綫
\node [below,] at%
(18.2,19) {\hbox{\tate\@tfish}};
% \node [below,] at%
% (18.2,9) {\hbox{\tate\@tfish}};
\node [below,] at%\makebox[3zw]
(18.2,6) {\hbox{\tate{\verthuge\gtfamily\ebseries%
\color{kakiiro!85}\zhnumber{\@arabic\c@ppage}}}};
\node [below,] at%
(18.2,4) {\hbox{\tate\@bfish}\stepcounter{ppage}};
}
% 定義奇數頁和偶數頁的水平頁碼,pdfm 啓用
\def\@pdfmpageodd{%
\ifthenelse{\value{page} < 1}{%
\node [right,] at%
(0.6,1.7) {\hbox{\yoko\mgfamily\mdseries\scriptsize~第~\@arabic\c@szpage~頁}%
\stepcounter{szpage}};}
{\node [right,] at%
(0.6,1.7) {\hbox{\yoko\mgfamily\mdseries\scriptsize~第~\@arabic\c@page~頁}};}
}
\def\@pdfmpageven{%
\ifthenelse{\value{page} < 1}{%
\node [left,] at%
(17.5,1.7) {\hbox{\yoko\mgfamily\mdseries\scriptsize~第~\@arabic\c@szpage~頁}%
\stepcounter{szpage}};}
{\node [left,] at%
(17.5,1.7) {\hbox{\yoko\mgfamily\mdseries\scriptsize~第~\@arabic\c@page~頁}};}
}
% 定義奇數頁和偶數頁的垂直頁碼,pdfm 不啓用
\def\@ppageodd{%
\node [below,] at%
(1.6,18) {\hbox{\tate\mgfamily\mdseries\scriptsize\leftmark}}; % 章標題
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(1.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize%
({第}~\zhnumber{\@arabic\c@szpage}~{頁})}\stepcounter{szpage}};}
{\node [above,] at%
(1.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};}
}
\def\@ppageven{%
\node [below,] at%
(16.6,18) {\hbox{\tate\mgfamily\mdseries\scriptsize\@maintitle}}; % 書名
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(16.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize%
({第}~\zhnumber{\@arabic\c@szpage}~{頁})}\stepcounter{szpage}};}
{\node [above,] at%
(16.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};}
}
\def\@pdfimg{%
\if@watermarked
% \node at (259 pt, 365.5 pt) {\includegraphics[width=140.7 mm,height=25 mm,angle=18]{figures/sig.pdf}};
\node at (259 pt, 365.5 pt) {\includegraphics[width=125.575 mm,height=14.99 mm,angle=18]{figures/sig.pdf}};
\node at (9.1+rand*8.1,12.85+rand*10.85) {\includegraphics[width=38 mm,height=38 mm,angle=36]{figures/EURion.pdf}};
\fi
\if@backgrounged
\node at (259 pt, 365.5 pt) {\includegraphics[width=518 pt,height=731 pt]{figures/main.jpg}};
\fi
}
% \ifodd\c@page
% \else
% \fi%
%%%% 正兒八經的水印命令(開始)
% 正文奇數頁、糸欄
\newcommand{\watermarkodd}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有糸欄、有邉框
\@pdfimg
\@ribonodd\@kasenodd\@fishodd
\@pdfmpageodd % 水平頁碼
\node [below,] at%
(0,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{\@columncolor}\@maintitle\quad{卷}\thechapter}}; % 書名+ 卷號
\node [below,rectangle,] at%
(16.4,18) {\hbox{\tate\mgfamily\mdseries\scriptsize\hbox{\kanjiskip=1pt版權所有}%
\qquad\hbox{\kanjiskip=1pt翻印必究}}};
\else % 無糸欄、無邉框
\@pdfimg
\node [right,] at%
(1.8,1.7) {\hbox{\yoko\mgfamily\mdseries\scriptsize\hbox{\kanjiskip=1pt版權所有}%
\qquad\hbox{\kanjiskip=1pt翻印必究}}};
\@ppageodd
\if@kasened
\foreach \i in {60,74,...,550}{\draw [line width=0.1pt, color=cyan ] (55 pt,\i pt) -- (447 pt,\i pt);}
\foreach \j in {55,83,...,447}{\draw [line width=0.1pt, color=cyan ] (\j pt, 60 pt) -- (\j pt, 550 pt);}
\node [right,] at (450 pt,550 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 35}}};
\node [right,] at (450 pt,480 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 30}}};
\node [right,] at (450 pt,410 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 25}}};
\node [right,] at (450 pt,340 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 20}}};
\node [right,] at (450 pt,270 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 15}}};
\node [right,] at (450 pt,200 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 10}}};
\node [right,] at (450 pt,130 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 5}}};
\fi
\fi
% \node at (146mm,17mm) {\includegraphics[width=28.14 mm,height=5 mm]{figures/sig.pdf}};
% \node at (146mm,17mm) {\includegraphics[width=50.23 mm,height=5.996 mm]{figures/sig.pdf}};
\end{tikzpicture}%
}}
% 正文偶數頁、糸欄
\newcommand{\watermarkeven}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有糸欄、有邉框
\@pdfimg
\@riboneven\@kaseneven\@fisheven
\@pdfmpageven % 水平頁碼
\node [below,] at%
(18.2,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{\@columncolor}\@maintitle\quad{卷}\thechapter}}; % 書名+ 卷號
\node [below,rectangle,] at%
(1.8,18) {\hbox{\tate\mgfamily\mdseries\scriptsize\hbox{\kanjiskip=1pt版權所有}%
\qquad\hbox{\kanjiskip=1pt翻印必究}}};
\else % 無糸欄、無邉框
\@pdfimg
\node [left,] at%
(16.4,1.7) {\hbox{\yoko\mgfamily\mdseries\scriptsize\hbox{\kanjiskip=1pt版權所有}%
\qquad\hbox{\kanjiskip=1pt翻印必究}}};
\@ppageven
\if@kasened
\foreach \i in {60,74,...,550}{\draw [line width=0.1pt, color=cyan ] (70.840 pt,\i pt) -- (462.840 pt,\i pt);}
\foreach \j in {70.840,98.840,...,462.840}{\draw [line width=0.1pt, color=cyan ] (\j pt, 60 pt) -- (\j pt, 550 pt);}
\node [left,] at (68 pt,550 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 35}}};
\node [left,] at (68 pt,480 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 30}}};
\node [left,] at (68 pt,410 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 25}}};
\node [left,] at (68 pt,340 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 20}}};
\node [left,] at (68 pt,270 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 15}}};
\node [left,] at (68 pt,200 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 10}}};
\node [left,] at (68 pt,130 pt) {\hbox{\yoko\mgfamily\mdseries\small\hbox{\kanjiskip=1pt 5}}};
\fi
\fi
% \node at (36mm, 17mm) {\includegraphics[width=50.23 mm,height=5.996 mm]{figures/sig.pdf}};
\end{tikzpicture}%
}}
% 正文奇數頁、無糸欄
%\newcommand{\watermkkochuodd}{\AddToShipoutPictureBG{%
%}}
% 正文偶數頁、無糸欄
\newcommand{\watermkkochueven}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kaseneven\@fisheven
\node [below,] at%
(18.2,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{kakiiro!85}\@maintitle}}; % 書名
\else % 無邉框
% \@ppageven
\@pdfimg
\fi
\end{tikzpicture}%
}}
% pagestyle my 前言奇數頁、無糸欄、垂直頁碼、無標題
\newcommand{\mywatermkodd}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kasenodd%\@fishodd
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(0.5,5) {\hbox{\tate\mgfamily\mdseries\scriptsize%
({第}~\kansuji\c@szpage~{頁})\stepcounter{szpage}}};}
{\node [above,] at%
(0.5,5) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\kansuji\c@ppage~{頁})}};}
\else % 無邉框
\@pdfimg
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(1.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize%
({第}~\kansuji\c@szpage~{頁})\stepcounter{szpage}}};}
{\node [above,] at%
(1.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\kansuji\c@ppage~{頁})}\stepcounter{ppage}};}
\fi
\end{tikzpicture}%
}}
% pagestyle my 偶數頁、無糸欄、垂直頁碼、無標題
\newcommand{\mywatermkeven}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kaseneven%\@fisheven
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(17.7,5) {\hbox{\tate\mgfamily\mdseries\scriptsize%
({第}~\kansuji\c@szpage~{頁})\stepcounter{szpage}}};}
{\node [above,] at%
(17.7,5) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\kansuji\c@ppage~{頁})}\stepcounter{ppage}};}
\else % 無邉框
\@pdfimg
\ifthenelse{\value{page} < 1}{%
\node [above,] at%
(16.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize%
({第}~\kansuji\c@szpage~{頁})\stepcounter{szpage}}};}
{\node [above,] at%
(16.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\kansuji\c@ppage~{頁})}\stepcounter{ppage}};}
\fi
\end{tikzpicture}%
}}
% 目錄奇數頁、糸欄
\newcommand{\watermkmenuodd}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kasenodd\@fishodd\@pdfmpageodd
\ifthenelse{\value{ppage} > 1}{%
\foreach \i in {420,390,...,60}{%
% 起始點 420 + 30pt 每欄 从右往左
\draw [ color=\@riboncolor ] (\i pt, 2.2)--(\i pt, 19.8);}}% 奇數頁絲欄
{\foreach \i in {390,360,...,60}{%
% 起始點 420 + 30pt 每欄 从右往左
\draw [ color=\@riboncolor ] (\i pt, 2.2)--(\i pt, 19.8);}}% 奇數頁絲欄
\node [below,] at%
(0,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{\@columncolor}\@maintitle\qquad{目}\quad{次}}};
\else % 無邉框
\@pdfimg
\@ppageodd
\fi
\end{tikzpicture}%
}}
% 目錄偶數頁、糸欄
\newcommand{\watermkmenueven}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kaseneven\@fisheven\@riboneven\@pdfmpageven
\node [below,] at%
(18.2,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{kakiiro!85}\@maintitle\qquad{目}\quad{次}}};
\else % 無邉框
\@pdfimg
\@ppageven
\fi
\end{tikzpicture}%
}}
% 凡例奇數頁、糸欄
\newcommand{\myabstractodd}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kasenodd\@ribonodd\@fishodd
\@pdfmpageodd
\node [below,] at%
(0,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{\@columncolor}\@maintitle\qquad{凡}\quad{例}}};
\else % 無邉框
\@pdfimg
\@ppageodd
\fi
\end{tikzpicture}%
}}
% 凡例偶數頁、糸欄
\newcommand{\myabstracteven}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kaseneven\@riboneven\@fisheven
\@pdfmpageven
\node [below,] at%
(18.2,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{kakiiro!85}\@maintitle\qquad{凡}\quad{例}}};
\else % 無邉框
\@pdfimg
\@ppageven
\fi
\end{tikzpicture}%
}}
% 附錄奇數頁、糸欄
\newcommand{\myappendixodd}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kasenodd\@ribonodd\@fishodd
\@pdfmpageodd
\node [below,] at%
(0,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{\@columncolor}\@maintitle\qquad{附}\quad{錄}}};
\else % 無邉框
\@pdfimg
\node [below,] at%
(1.6,18) {\hbox{\tate\mgfamily\mdseries\scriptsize{附}\qquad{錄}}}; % 章標題
\node [above,] at%
(1.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};
\fi
\end{tikzpicture}%
}}
% 附錄偶數頁、糸欄
\newcommand{\myappendixeven}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\if@pdfm % 有邉框
\@pdfimg
\@kaseneven\@riboneven\@fisheven
\@pdfmpageven
\node [below,] at%
(18.2,18) {\hbox{\tate\verthuge\gtfamily\ebseries%
\color{kakiiro!85}\@maintitle\qquad{附}\quad{錄}}};
\else % 無邉框
\@pdfimg
\node [below,] at%
(16.6,18) {\hbox{\tate\mgfamily\mdseries\scriptsize\@maintitle}}; % 書名
\node [above,] at%
(16.6,4) {\hbox{\tate\mgfamily\mdseries\scriptsize~\kansuji\c@page~%
({第}~\zhnumber{\@arabic\c@ppage}~{頁})}\stepcounter{ppage}};
\fi
\end{tikzpicture}%
}}
% 分冊目錄頁
\newcommand{\watermarkpartodd}{\AddToShipoutPictureBG{%
\begin{tikzpicture}[overlay]
\@pdfimg
\end{tikzpicture}%
}}
%%%% 正兒八經的水印命令(結束)
\newcommand{\watermarkoff}{\ClearShipoutPictureBG}
%PageStyle for dvipdfmx
%PageStyle 定義(開始)
\def\ps@plain{% 带糸欄的正文
\let\@mkboth\markboth
% 章標題
\def\@oddfoot{%
\watermarkoff\mgfamily\mdseries\scriptsize\watermarkodd}%
\def\@evenfoot{%
\watermarkoff\mgfamily\mdseries\scriptsize\watermarkeven}%
\let\@oddhead\@empty
\let\@evenhead\@empty }
\def\ps@my{ % 定義前言使用的頁碼
\let\@mkboth\markboth
\def\@oddfoot{%
\watermarkoff\mywatermkodd}%
\def\@evenfoot{%
\watermarkoff\mywatermkeven}%
\let\@oddhead\@empty
\let\@evenhead\@empty }
\def\ps@mymenu{% % 用于目录
\let\@mkboth\markboth
\def\@oddfoot{%
\watermarkoff\watermkmenuodd}%
\def\@evenfoot{%
\watermarkoff\watermkmenueven}%
\let\@oddhead\@empty
\let\@evenhead\@empty }
\def\ps@myabstract{% % 用于凡例
\let\@mkboth\markboth
\def\@oddfoot{%
\watermarkoff\myabstractodd }%
\def\@evenfoot{%
\watermarkoff\myabstracteven}%
\let\@oddhead\@empty
\let\@evenhead\@empty }
\def\ps@myappendix{% % 用于附錄
\let\@mkboth\markboth
\def\@oddfoot{%
\watermarkoff\myappendixodd }%
\def\@evenfoot{%
\watermarkoff\myappendixeven}%
\let\@oddhead\@empty
\let\@evenhead\@empty }
%PageStyle for dvips
\def\ps@mypart{% 分冊目錄頁
\let\@mkboth\markboth
% 章標題
\def\@oddfoot{%
\watermarkoff\watermarkpartodd}%
\def\@evenfoot{%
\watermarkoff\watermarkpartodd}%
\let\@oddhead\@empty
\let\@evenhead\@empty }
\let\ps@jpl@in\ps@plain
\def\p@thanks#1{\footnotemark
\protected@xdef\@thanks{\@thanks
\protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}}
%PageStyle 定義(結束)
%頁眉、頁碼設置(結束)
%封面設置
%. タイトル周り
\newenvironment{titlepage}{%
\thispagestyle{empty}%
\setcounter{page}{1}%
}{%
\if@twoside\else
\setcounter{page}{1}%
\fi
}
\newcommand{\maketitle}{%
% jarticleとかからあまり変更していない
\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\let\footnote\thanks
\newpage\null\vspace*{45mm}
\begin{flushleft}%
{\tlarge\mcfamily\bfseries \hspace{20pt}\color{yellow}\@maintitle \par}%
\vskip 20pt%
{\Large%
\verthuge\color{yellow}\hbox{}\hfill\@author\UTF{3000}\UTF{3000}\UTF{3000}%
\par}%
% \vskip\baselineskip%
% {\large\@date\par}%
\vfil \hbox{}%
\end{flushleft}%
\end{titlepage}%
\jlreq@endofmaketitle%
}
% いろいろクリアする.
\def\jlreq@endofmaketitle{%
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\p@thanks\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
\setcounter{ppage}{1}%
\setcounter{szpage}{1}%
\clearpage%
}%
%封面設置結束
%文檔結構設定
\newcommand*{\chaptermark}[1]{}
\setcounter{secnumdepth}{2}
\newcounter{part}
%\newcounter{chapter}
\newcounter{section}[chapter]
\newcounter{subsection}[section]
\newcounter{subsubsection}[subsection]
\newcounter{paragraph}[subsubsection]
\newcounter{subparagraph}[paragraph]
\renewcommand{\thepart}{\kansuji\number\@arabic\c@part}
%\renewcommand{\thechapter}{\kansuji\number\@arabic\c@chapter}
%\renewcommand{\thesection}{\kansuji\number\@arabic\c@section}
%\renewcommand{\thesubsection}{\kansuji\number\@arabic\c@subsection}
\renewcommand{\thechapter}{\zhnumber{\@arabic\c@chapter}}
\renewcommand{\thesection}{\zhnumber{\@arabic\c@section}}
\renewcommand{\thesubsection}{\zhnumber{\@arabic\c@subsection}}
\renewcommand{\thesubsubsection}{\rensuji\@arabic\c@subsubsection}
\renewcommand{\theparagraph}{\rensuji\@arabic\c@paragraph}
\renewcommand{\thesubparagraph}{\rensuji\@arabic\c@subparagraph}
%定義的冊卷章節
%定義的冊
\newcommand{\part}{%
\if@openleft \cleardoublepage \else
\if@openright \cleardoublepage \else \clearpage \fi \fi
\thispagestyle{empty}%
\watermarkoff
\if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
\null\vfil
\secdef\@part\@spart}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{%
\mcfamily\Large \prepartname\thepart\postpartname\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}%
{ \Huge\bfseries
\interlinepenalty\@M\normalfont
\ifnum \c@secnumdepth >-2\relax
\rule{0pt}{30pt}
\rule{30pt}{0pt}\prepartname\thepart\postpartname
\par\vskip20\p@
\fi
\rule{48pt}{0pt}\Huge\bfseries#2\par}%
\@endpart}
\def\@spart#1{{%
\centering
\interlinepenalty\@M\normalfont
\Huge\bfseries#1\par}%
\@endpart}
\def\@endpart{\watermarkoff\vfil\newpage
\if@twoside
\if@openleft
\null\thispagestyle{empty}\watermarkoff\newpage
\else\if@openright
\null\thispagestyle{empty}\watermarkoff\newpage
\fi\fi
\fi
\if@tempswa\twocolumn\fi}
%%% 定義的 章、回
\newcommand{\@chapapp}{\prechaptername}