-
Notifications
You must be signed in to change notification settings - Fork 10
/
ZJUthesis.cls
952 lines (863 loc) · 32.2 KB
/
ZJUthesis.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
%%
%% 这是浙江大学硕士博士毕业论文LaTeX模版
%%
%% 本模版是在88TeX版提供的数学系毕业论文模版2006年版基础上
%% 由王东举于2011年9-10月间修改出第一版,欢迎提出修改意见,欢迎在此基础上自行修改尝试
%% 邮箱:[email protected]
%%
%% 提供该模版的运行基础
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
% 版本说明
\ProvidesClass{ZJUthesis}[2013/01/25 v2.0 ZJUthesis document class]
% 基于ctexbook模版,增加专有内容
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
\ProcessOptions
% 2009/09/13的v0.94及之后版本提供了hyperref的支持,直接写入选项即可
\LoadClass[cs4size,a4paper,fancyhdr,hyperref]{ctexbook}[2009/09/13]
%% math packages 数学公式包,非数学系可无视之
\RequirePackage{amsmath,amsthm,amsfonts,amssymb,bm}
%% graphicx packages,psgrag用于修改eps图中的信息,但与dvipdfm不兼容
\RequirePackage{graphicx}
\RequirePackage{caption}
\RequirePackage{subcaption}
% 需要times包,让英文字体看起来更像windows下
%\RequirePackage{times}
\RequirePackage{fontspec}
% 需要array包,排姓名导师信息时用
\RequirePackage{array}
% 需要tocloft包,调整目录显示格式时使用,LaTeX2e默认的格式不符合模版要求
\RequirePackage[titles]{tocloft}
% tocloft包需要tocbibind包来配合,同时tocloft包需要titles参数来将其置为chapter title
\RequirePackage[chapter]{tocbibind}
% 需要索引功能,加入索引包
\RequirePackage{makeidx}
% 参考文献格式调整需要natbib包
% sort&compress参数用于按引用顺序排列参考文献
% longnamesfirst参数用于处理长人名顺序,将first name排前面,用于外国人名
% square参数,引用标号用方括号括起
% super参数,引用标号为上标格式
\RequirePackage[sort&compress,longnamesfirst,square,super]{natbib}
% 设置图片,表格头字体选项。间距10pt,字号为小字号,加粗字体,标题与题目间距1个字符
\RequirePackage[margin=10pt,font={small,bf},labelsep=quad]{caption}
% 粗线型表格需要的扩展包
\RequirePackage{booktabs-de}
\usepackage{longtable}
% 计算宽度使用的包
\RequirePackage{calc}
% 合并表格行用到的包
\RequirePackage{multirow}
% 算法排版要用到的包
% algorithms 宏包
%\RequirePackage{algorithmic}
%\RequirePackage{algorithm}
%\RequirePackage{eqparbox}
% algorithmicx宏包
\RequirePackage{algpseudocode}
\RequirePackage{algorithm}
% 颜色包
\RequirePackage{xcolor}
% PDF文档超链接及书签标记,具体选项意义参考hyperref说明文档
% hyperref包要2011年版的才行
\hypersetup{CJKbookmarks=true,%
bookmarksnumbered,%
linkcolor=blue,%
plainpages=false,%
pdfstartview=FitH,
hidelinks
}
% 文档开始导入默认配置
\AtBeginDocument{\makeatletter\input{ZJUthesis.cfg}\makeatother}
% 使用geometry包来修改页面尺寸
\RequirePackage[a4paper,%
top=51pt,bottom=51pt,left=68pt,right=57pt,%
headsep=14pt,footskip=26pt,%
includehead, includefoot]{geometry}
% 奇数页左边边距是1.5cm
%\oddsidemargin -0.14 true cm
% 偶数页的左边距设置则分双面模式与单面模式两种情况
%\if@twoside
% \evensidemargin -0.34 true cm
%\else
% \evensidemargin -0.14 true cm
%\fi
% 设置页头空白尺寸
%\topmargin -0.74 true cm
%\headheight 0.8 true cm
%\headsep 0.5 true cm
\topsep 0.7 true cm
%\textheight 23.9 true cm
%\textwidth 16.6 true cm
%\footskip 0.9 true cm
\parskip 0.5ex plus 0.25ex minus 0.25ex
% cleardoublepage这个命令的定义
\def\cleardoublepage{%
\clearpage
\if@twoside
\ifodd
\c@page
\else
\thispagestyle{empty}%
\hbox{}\newpage
\if@twocolumn
\hbox{}\newpage
\fi
\fi
\fi}
% 这个地方定义一页中浮动对象可占的最大比例
\renewcommand{\textfraction}{0.15}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.60}
% 设置英文字体为Times New Roman
\setmainfont{Times New Roman}
\newcommand\ZJUspace{\protect\CTEX@spaceChar\protect\CTEX@spaceChar}
\def\reserved@a#1 #2 #3\@nil{%
\def\ZJUfiledate{#1}%
\def\ZJUfileversion{#2}%
\def\ZJUfileinfo{#3}}%
\edef\reserved@b{\csname [email protected]\endcsname}
\expandafter\reserved@a\reserved@b\@nil\relax
% 新命令Nchapter的定义
% 这里的mainmatter对应于tex文档中的定义
\newcommand\Nchapter[1]{%
\if@mainmatter%
\@mainmatterfalse%
\chapter{#1}%
\@mainmattertrue%
\else
\chapter{#1}%
\fi}
% 下划线的一个定义
\def\ZJU@underline[#1]#2{%
\underline{\hbox to #1{\hfil#2\hfil}}}
\def\ZJUunderline{\@ifnextchar[\ZJU@underline\underline}
\newcommand\classification[1]{\def\ZJU@value@classification{#1}}
\newcommand\confidential[1]{\def\ZJU@value@confidential{#1}}
\newcommand\UDC[1]{\def\ZJU@value@UDC{#1}}
\newcommand\serialnumber[1]{\def\ZJU@value@serialnumber{#1}}
\newcommand\school[1]{\def\ZJU@value@school{#1}}
\newcommand\SecretLevel[1]{%
\def\ZJU@value@SecretLevel{#1}
\def\ZJU@value@IsSecret{1}}
\newcommand\PersonalID[1]{\def\ZJU@value@PersonalID{#1}}
\newcommand\degree[1]{\def\ZJU@value@degree{#1}}
\newcommand\Edegree[1]{\def\ZJU@value@Edegree{#1}}
\renewcommand\title[2][\ZJU@value@title]{%
\def\ZJU@value@title{#2}
\def\ZJU@value@titlemark{\MakeUppercase{#1}}}
\newcommand\titletl[1]{\def\ZJU@value@titletl{#1}}
\newcommand\Etitle[1]{\def\ZJU@value@Etitle{#1}}
\newcommand\Etitletl[1]{\def\ZJU@value@Etitletl{#1}}
\newcommand\Etitletll[1]{\def\ZJU@value@Etitletll{#1}}
\renewcommand\author[1]{\def\ZJU@value@author{#1}}
\newcommand\Eauthor[1]{\def\ZJU@value@Eauthor{#1}}
\newcommand\supervisor[1]{\def\ZJU@value@supervisor{#1}}
\newcommand\Esupervisor[1]{\def\ZJU@value@Esupervisor{#1}}
\newcommand\cpsupervisor[1]{\def\ZJU@value@cpsupervisor{#1}}
\newcommand\Ecpsupervisor[1]{\def\ZJU@value@Ecpsupervisor{#1}}
\newcommand\supervisorinstitute[1]{\def\ZJU@value@supervisorinstitute{#1}}
\newcommand\major[1]{\def\ZJU@value@major{#1}}
\newcommand\Emajor[1]{\def\ZJU@value@Emajor{#1}}
\newcommand\researchdm[1]{\def\ZJU@value@researchdm{#1}}
\newcommand\Eresearchdm[1]{\def\ZJU@value@Eresearchdm{#1}}
\newcommand\submitdate[1]{\def\ZJU@value@submitdate{#1}}
\newcommand\Esubmitdate[1]{\def\ZJU@value@Esubmitdate{#1}}
\newcommand\defenddate[1]{\def\ZJU@value@defenddate{#1}}
\newcommand\institute[1]{\def\ZJU@value@institute{#1}}
\newcommand\Einstitute[1]{\def\ZJU@value@Einstitute{#1}}
\newcommand\chairman[1]{\def\ZJU@value@chairman{#1}}
\newcommand\commissionerA[1]{\def\ZJU@value@commissionerA{#1}}
\newcommand\commissionerB[1]{\def\ZJU@value@commissionerB{#1}}
\newcommand\commissionerC[1]{\def\ZJU@value@commissionerC{#1}}
\newcommand\commissionerD[1]{\def\ZJU@value@commissionerD{#1}}
\newcommand\commissionerE[1]{\def\ZJU@value@commissionerE{#1}}
\newcommand\reviewersA[1]{\def\ZJU@value@reviewersA{#1}}
\newcommand\reviewersB[1]{\def\ZJU@value@reviewersB{#1}}
\newcommand\reviewersC[1]{\def\ZJU@value@reviewersC{#1}}
\newcommand\reviewersD[1]{\def\ZJU@value@reviewersD{#1}}
\newcommand\reviewersE[1]{\def\ZJU@value@reviewersE{#1}}
% 制作签名时间的标签
\newcommand\SignautreDateA[3]{%
\def\ZJU@value@signaturedateAy{#1}
\def\ZJU@value@signaturedateAm{#2}
\def\ZJU@value@signaturedateAd{#3}}
\newcommand\SignautreDateB[3]{%
\def\ZJU@value@signaturedateBy{#1}
\def\ZJU@value@signaturedateBm{#2}
\def\ZJU@value@signaturedateBd{#3}}
\newcommand\SignautreDateC[3]{%
\def\ZJU@value@signaturedateCy{#1}
\def\ZJU@value@signaturedateCm{#2}
\def\ZJU@value@signaturedateCd{#3}}
\newcommand\PutsigndateA{%
签字日期:{\hbox to 3em{\hfil\ZJU@value@signaturedateAy\hfil}}年
{\hbox to 2em{\hfil\ZJU@value@signaturedateAm\hfil}}月
{\hbox to 2em{\hfil\ZJU@value@signaturedateAd\hfil}}日
}
\newcommand\PutsigndateB{%
签字日期:{\hbox to 3em{\hfil\ZJU@value@signaturedateBy\hfil}}年
{\hbox to 2em{\hfil\ZJU@value@signaturedateBm\hfil}}月
{\hbox to 2em{\hfil\ZJU@value@signaturedateBd\hfil}}日
}
\newcommand\PutsigndateC{%
签字日期:{\hbox to 3em{\hfil\ZJU@value@signaturedateCy\hfil}}年
{\hbox to 2em{\hfil\ZJU@value@signaturedateCm\hfil}}月
{\hbox to 2em{\hfil\ZJU@value@signaturedateCd\hfil}}日
}
% 定理,假设,定义,证明
\newtheoremstyle{ZJUtheorem}
{9pt}{9pt}{\ttfamily}{0pt}{\lishu}{:}{0pt}{}
\theoremstyle{ZJUtheorem}
\newtheorem{hypo}{假设~}[chapter]
\newtheorem{defin}{定义~}[chapter]
\newtheorem{theo}{定理~}[chapter]
\newtheorem{pro}{证明~}[chapter]
% 插入 Matlab 代码设置
\usepackage{listings}
\lstset{ %
extendedchars=false, % Shutdown no-ASCII compatible
language=Matlab, % choose the language of the code
basicstyle=\footnotesize\tt, % the size of the fonts that are used for the code
tabsize=3, % sets default tabsize to 3 spaces
numbers=left, % where to put the line-numbers
numberstyle=\tiny, % the size of the fonts that are used for the line-numbers
stepnumber=1, % the step between two line-numbers. If it's 1 each line
% will be numbered
numbersep=5pt, % how far the line-numbers are from the code %
keywordstyle=\color[rgb]{0,0,1}, % keywords
commentstyle=\color[rgb]{0.133,0.545,0.133}, % comments
stringstyle=\color[rgb]{0.627,0.126,0.941}, % strings
backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=single, % adds a frame around the code
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false % sets if automatic breaks should only happen at whitespace
%title=\lstname, % show the filename of files included with \lstinputlisting;
% also try caption instead of title
%mathescape=true,escapechar=? % escape to latex with ?..?
%escapeinside={\%*}{*)}, % if you want to add a comment within your code
%columns=fixed, % nice spacing
%morestring=[m]', % strings
%morekeywords={%,...},% % if you want to add more keywords to the set
% break,case,catch,continue,elseif,else,end,for,function,global,%
% if,otherwise,persistent,return,switch,try,while,...},%
}
% 制作封面的命令
\newcommand\makeCoverPage{%
% 这个地方写的是封面上的分类号与学号,字体字号可以更改
\pagenumbering{alph}
%\cleardoublepage
\thispagestyle{empty}
{
\songti\zihao{-4}
\linespread{1.3}
\begin{center}
{\hspace{2em}
\ZJU@label@classification~
\ZJUunderline[60pt]{\ZJU@value@classification}
\hfill
\ZJU@label@serialnumber~
\ZJUunderline[60pt]{\ZJU@value@serialnumber} \\
% \vspace{3pt}
% \hspace{2em} \hfill \hspace{2em}
\ifx\ZJU@value@IsSecret\undefined \\
\else
\hspace{2em}
%\hfill
\ZJU@label@SecretLevel~
\ZJUunderline[60pt]{\ZJU@value@SecretLevel}
\fi
\hfill
\ZJU@label@PersonalID~
\ZJUunderline[60pt]{\ZJU@value@PersonalID}\\
}
% 这个尺寸可以更改
\vspace{10mm}
% 浙江大学四个字
\ifpdf
\includegraphics[width=90.3mm]{./CoverPagepic/ZJDX.pdf} \\
\else
\includegraphics[width=90.3mm]{./CoverPagepic/ZJDX.eps} \\
\fi
% 这个尺寸可以更改
\vspace{8mm}
%% \ZJU@value@school \\ \zihao{-1}
% 这个博士学位论文在def文件中已有,当然在tex文件中还可以更改
\centerline{\songti \zihao{-1}{\ZJU@label@thesisType} }
% 这个尺寸可以更改
\vspace{20mm}
% 这个地方调入浙大徽标
\ifpdf
\includegraphics[width=30.8mm]{./CoverPagepic/QSY.pdf} \\
\else
\includegraphics[width=30.8mm]{./CoverPagepic/QSY.eps} \\
\fi
\end{center}
\vspace{2mm}
\begin{center}
% 论文题目部分内容,可以修改
\begin{tabular}{rl}
{\songti\zihao{-2}\ZJU@label@title}
&
\songti\zihao{-2} \ZJUunderline[260pt]{\ZJU@value@title} \\[3mm]
&
% 这个地方是做第二行标题的判断,如果标题一行写不下,有第二行则显示,否则不显示
\ifx\ZJU@value@titletl\undefined
\hfil
\else
{\songti\zihao{-2}\ZJUunderline[260pt]{\ZJU@value@titletl}}
\fi \\[4mm]
%{\songti\zihao{3}\ZJU@label@Etitle:}
%&
%{\zihao{-2}\ZJUunderline[260pt]{\ZJU@value@Etitle}}\\[3mm]
%&
%同样是英文标题的多行判断,如果一行写不下,有第二行显示,否则不显示第二行
%\ifx\ZJU@value@Etitletl\undefined
% \hfil
%\else
% {\zihao{-2}\ZJUunderline[260pt]{\ZJU@value@Etitletl}}
%\fi\\
\end{tabular}
% 这个距离可以修改
\vspace{15mm}
% 左右两边字体不同,定义两个宏AB来简化代码,这个功能用到了array宏包
\newcolumntype{A}{>{\songti}l<{}}
\newcolumntype{B}{>{\fangsong}l<{}}
\zihao{4}
\begin{tabular}{A@{ }B}
\ZJU@label@author & \ZJUunderline[200pt]{\ZJU@value@author} \\[3mm]
\ZJU@label@supervisor & \ZJUunderline[200pt]{\ZJU@value@supervisor} \\[3mm]
% 判断有没有合作导师
\ifx\ZJU@value@cpsupervisor\undefined
%\else
% \ZJU@label@cpsupervisor
\fi
&
\ifx\ZJU@value@cpsupervisor\undefined
\hfil\\[-7.7mm]
\else
\ZJUunderline[200pt]{\ZJU@value@cpsupervisor} \\[3mm]
\fi
\ZJU@label@major & \ZJUunderline[200pt]{\ZJU@value@major} \\[3mm]
%\ZJU@label@researchdm & \ZJUunderline[200pt]{\ZJU@value@researchdm} \\[3mm]
\ZJU@label@institute & \ZJUunderline[200pt]{\ZJU@value@institute} \\[3mm]
\ZJU@label@submitdate & \ZJUunderline[200pt]{\ZJU@value@submitdate} \\
\end{tabular}
\end{center}
% 插入适当的空白
%\vfill
% 最后一项 论文提交日期
%\hfil{\bfseries\songti\zihao{-3}\hspace{4em}\ZJU@label@submitdate%
%\ZJUunderline[150pt]{\ZJU@value@submitdate}}\hfil
}
}
% 制作英文封面的命令
\newcommand\makeECoverPage{%
% 这个地方写的是封面上的分类号与学号,字体字号可以更改
\pagenumbering{alph}
\cleardoublepage
\thispagestyle{empty}
{
\songti\zihao{-4}
\linespread{1.3}
\begin{center}
% 这个尺寸可以更改
\vspace{10mm}
%% \ZJU@value@school \\ \zihao{-1}
% 这个博士学位论文在def文件中已有,当然在tex文件中还可以更改
\centerline{\songti \zihao{-1}{\ZJU@label@Ethesisu}}
\centerline{\songti \zihao{-1}{\ZJU@label@Ethesisd}}
\centerline{\songti \zihao{-1}{\ZJU@value@Edegree}}
% 这个尺寸可以更改
\vspace{20mm}
% 这个地方调入浙大徽标
\ifpdf
\includegraphics[width=30.8mm]{./CoverPagepic/QSY.pdf} \\
\else
\includegraphics[width=30.8mm]{./CoverPagepic/QSY.eps} \\
\fi
\vspace{20mm}
% 论文题目部分内容,可以修改
\begin{tabular}{rl}
{\fangsong\zihao{-2}\ZJU@label@Etitle:}
&
{\zihao{-2}\ZJUunderline[310pt]{\ZJU@value@Etitle}}\\[3mm]
&
%英文标题的多行判断,如果一行写不下,有第二行显示,否则不显示第二行
\ifx\ZJU@value@Etitletl\undefined
\hfil
\else
{\zihao{-2}\ZJUunderline[310pt]{\ZJU@value@Etitletl}}
\fi\\[3mm]
%英文标题的多行判断,如果两行写不下,有第三行显示,否则不显示第三行
&
\ifx\ZJU@value@Etitletll\undefined
\hfil
\else
{\zihao{-2}\ZJUunderline[310pt]{\ZJU@value@Etitletll}}
\fi\\[3mm]
\end{tabular}
% 这个距离可以修改
\vspace{30mm}
% 左右两边字体不同,定义两个宏AB来简化代码,这个功能用到了array宏包
\newcolumntype{A}{>{\songti}l<{}}
\newcolumntype{B}{>{\fangsong}l<{}}
\zihao{3}
\begin{tabular}{A@{}B}
\ZJU@label@Eauthor: & \ZJUunderline[200pt]{\ZJU@value@Eauthor} \\[3mm]
\ZJU@label@Esupervisor: & \ZJUunderline[200pt]{\ZJU@value@Esupervisor} \\[3mm]
% 判断有没有合作导师
\ifx\ZJU@value@Ecpsupervisor\undefined
%\else
% \ZJU@label@Ecpsupervisor
\fi
&
\ifx\ZJU@value@Ecpsupervisor\undefined
\hfil\\[-7.7mm]
\else
\ZJUunderline[200pt]{\ZJU@value@Ecpsupervisor} \\[3mm]
\fi
\ZJU@label@Emajor: & \ZJUunderline[200pt]{\ZJU@value@Emajor} \\[3mm]
%\ZJU@label@Eresearchdm & \ZJUunderline[200pt]{\ZJU@value@Eresearchdm} \\[3mm]
\ZJU@label@Einstitute: & \ZJUunderline[200pt]{\ZJU@value@Einstitute} \\[3mm]
\ZJU@label@Esubmitdate: & \ZJUunderline[200pt]{\ZJU@value@Esubmitdate}\\
\end{tabular}
\end{center}
% 插入适当的空白
%\vfill
% 最后一项 论文提交日期
%\hfil{\songti\zihao{-3}\hspace{4em}\ZJU@label@Esubmitdate%
%\ZJUunderline[150pt]{\ZJU@value@Esubmitdate}}\hfil
}
}
%插入中文题名页
\renewcommand\maketitle{%
% 新开一个页面
\cleardoublepage
% 无页眉页脚
\thispagestyle{empty}
{
\linespread{1.3}
\begin{center}
% 先插入中文论文题目
{\bfseries\songti\zihao{-2}\ZJUunderline[340pt]{\ZJU@value@title}\\
\ifx\ZJU@value@titletl\undefined
\hfil\\
\else
\ZJUunderline[300pt]{\ZJU@value@titletl}\\
\fi}
% 插入一段距离
\vspace{15mm}
% 插入浙大徽标
\ifpdf
\includegraphics[width=22.8mm]{./CoverPagepic/QSY.pdf} \\
\else
\includegraphics[width=22.8mm]{./CoverPagepic/QSY.eps} \\
\fi
% 插入空白
\vspace{12mm}
{\bfseries\songti\zihao{3}
论文作者签名:
\ifpdf
\ZJUunderline[120pt]{} %\includegraphics[width=80pt,height=36pt]{./Signature/sign_ch.pdf}}
\else
\ZJUunderline[120pt]{} %\includegraphics[width=80pt,height=36pt]{./Signature/sign_ch.eps}}
\fi
{\bfseries\songti\zihao{3}\textcolor{white}{。}}\\
%\hfil\\
指导教师签名:}
\ifpdf
\ZJUunderline[120pt]{} %\includegraphics[width=80pt,height=36pt]{./Signature/sign_ch_s.pdf}}
\else
\ZJUunderline[120pt]{} %\includegraphics[width=80pt,height=36pt]{./Signature/sign_ch_s.eps}}
\fi
{\bfseries\songti\zihao{3}\textcolor{white}{。}}\\
% 插入空白
\vspace{15mm}
% 评阅人信息
\newcolumntype{A}{>{\songti\zihao{4}}r}
\newcolumntype{B}{>{\songti\zihao{4}}c}
\begin{tabular}{A@{:}B}
论文评阅人1 & \ZJUunderline[260pt]{\ZJU@value@reviewersA}\\[2.2mm]
评阅人2 & \ZJUunderline[260pt]{\ZJU@value@reviewersB}\\[2.2mm]
评阅人3 & \ZJUunderline[260pt]{\ZJU@value@reviewersC}\\[2.2mm]
评阅人4 & \ZJUunderline[260pt]{\ZJU@value@reviewersD}\\[2.2mm]
评阅人5 & \ZJUunderline[260pt]{\ZJU@value@reviewersE}\\
\end{tabular}
% 加一段空白
\vspace{10mm}
% 答辩委员会名单
\begin{tabular}{A@{:}B}
答辩委员会主席 & \ZJUunderline[260pt]{\ZJU@value@chairman}\\[2.2mm]
委员1 & \ZJUunderline[260pt]{\ZJU@value@commissionerA}\\[2.2mm]
委员2 & \ZJUunderline[260pt]{\ZJU@value@commissionerB}\\[2.2mm]
委员3 & \ZJUunderline[260pt]{\ZJU@value@commissionerC}\\[2.2mm]
委员4 & \ZJUunderline[260pt]{\ZJU@value@commissionerD}\\[2.2mm]
委员5 & \ZJUunderline[260pt]{\ZJU@value@commissionerE}\\
\end{tabular}
\end{center}
% 加一段可变空白
\vfil
% 答辩时间
{\songti\zihao{4}\hfill\ZJU@label@defenddate%
\ZJUunderline[150pt]{\ZJU@value@defenddate}\hspace{3em}}
}
}
% 这个地方插入了英文标题页
\newcommand\englishtitle[1]{\def\ZJU@value@englishtitle{#1}}
\newcommand\englishtitletl[1]{\def\ZJU@value@englishtitletl{#1}}
\newcommand\englishtitletll[1]{\def\ZJU@value@englishtitletll{#1}}
\newcommand\EreviewersA[1]{\def\ZJU@value@EreviewersA{#1}}
\newcommand\EreviewersB[1]{\def\ZJU@value@EreviewersB{#1}}
\newcommand\EreviewersC[1]{\def\ZJU@value@EreviewersC{#1}}
\newcommand\EreviewersD[1]{\def\ZJU@value@EreviewersD{#1}}
\newcommand\EreviewersE[1]{\def\ZJU@value@EreviewersE{#1}}
\newcommand\Echairman[1]{\def\ZJU@value@Echairman{#1}}
\newcommand\EcommissionerA[1]{\def\ZJU@value@EcommissionerA{#1}}
\newcommand\EcommissionerB[1]{\def\ZJU@value@EcommissionerB{#1}}
\newcommand\EcommissionerC[1]{\def\ZJU@value@EcommissionerC{#1}}
\newcommand\EcommissionerD[1]{\def\ZJU@value@EcommissionerD{#1}}
\newcommand\EcommissionerE[1]{\def\ZJU@value@EcommissionerE{#1}}
\newcommand\makeenglishtitle{%
% 注意这个cleardoublepage的用法
\cleardoublepage
\thispagestyle{empty}
{
\linespread{1.3}
\begin{center}
% 英文论文题目
{\bf\zihao{-2}\ZJUunderline[360pt]{\ZJU@value@englishtitle}\\
\vspace{1ex}
% 判断英文标题有无第二行
\ifx\ZJU@value@englishtitletl\undefined
\hfil
\else
\ZJUunderline[320pt]{\ZJU@value@englishtitletl}
\fi}
% 插入一段空白距离
\vspace{7mm}
% 浙大校徽
\ifpdf
\includegraphics[width=22.8mm]{./CoverPagepic/QSY.pdf} \\
\else
\includegraphics[width=22.8mm]{./CoverPagepic/QSY.eps} \\
\fi
% 插入一段空白距离
\vspace{1mm}
% 作者英文签名
{\bf\zihao{3}\hspace{1.7em}Author's signature:
\ifpdf
\ZJUunderline[120pt]{} \\ %\includegraphics[width=80pt,height=36pt]{./Signature/sign_en.pdf}}\\
\else
\ZJUunderline[120pt]{} \\ %\includegraphics[width=80pt,height=36pt]{./Signature/sign_en.eps}}\\
\fi
%\hfil\\
% 导师英文签名
Supervisor's signature:
\ifpdf
\ZJUunderline[120pt]{} \\ %\includegraphics[width=80pt,height=36pt]{./Signature/sign_en_s.pdf}}\\
\else
\ZJUunderline[120pt]{} \\ %\includegraphics[width=80pt,height=36pt]{./Signature/sign_en_s.eps}}\\
\fi}
\end{center}
% 加入一段空白
\vspace{7mm}
\zihao{4}
% 论文评阅人列表(英文)
%\newcolumntype{A}{>{\zihao{4}}r}
%\newcolumntype{B}{>{\zihao{4}}c}
\begin{tabular}{rc}
External Reviewers: & \ZJUunderline[260pt]{\ZJU@value@EreviewersA}\\[1.2mm]
& \ZJUunderline[260pt]{\ZJU@value@EreviewersB}\\[1.2mm]
& \ZJUunderline[260pt]{\ZJU@value@EreviewersC}\\[1.2mm]
& \ZJUunderline[260pt]{\ZJU@value@EreviewersD}\\[1.2mm]
& \ZJUunderline[260pt]{\ZJU@value@EreviewersE}\\
\end{tabular}
% 加入一段空白
\vspace{6mm}
% 答辩委员会名单(英文)
~\\[1.2mm]
\hbox to 2.4em{}Examining Committee Chairperson:\\[1.2mm]
\hbox to 11.4em{}\ZJUunderline[260pt]{\ZJU@value@Echairman}\\[1.2mm]
\hbox to 2.4em{}Examining Committee Members:\\[1.2mm]
\hbox to 11.4em{}\ZJUunderline[260pt]{\ZJU@value@EcommissionerA}\\[1.2mm]
\hbox to 11.4em{}\ZJUunderline[260pt]{\ZJU@value@EcommissionerB}\\[1.2mm]
\hbox to 11.4em{}\ZJUunderline[260pt]{\ZJU@value@EcommissionerC}\\[1.2mm]
\hbox to 11.4em{}\ZJUunderline[260pt]{\ZJU@value@EcommissionerD}\\[1.2mm]
\hbox to 11.4em{}\ZJUunderline[260pt]{\ZJU@value@EcommissionerE}\\
% 加一段空白
\vfill
% 答辩日期
{\hfill Date of oral defence:\ZJUunderline[150pt]{\ZJU@value@defenddate}\hspace{3em}}
}
}
% 独创声明与版权协议转让页
\newcommand\makeOSandCPRTpage{%
\cleardoublepage
\thispagestyle{empty}
\input{./Chapters/Copyright.tex}
}
\newcommand\ZJUfrontmatter{%
\frontmatter
% 正文内容前的部分页码格式为小写罗马数字
\pagenumbering{roman}
}
\newcommand\ZJUfrontmatterTwo{%
\frontmatter
% 正文内容前的部分页码格式为大写罗马数字
\pagenumbering{Roman}
}
\newcommand\ZJUmainmatter{%
\mainmatter
}
\newcommand\ZJUbackmatter{%
\backmatter
}
% 空页眉页的格式定义
% 每一个chapter开始的第一页的页眉页脚样式为plain样式
\fancypagestyle{plain}{%
\fancyhf{}% 先清除当前页面的页眉页脚定义,是fancyhdr包中的定义
%\renewcommand{\headrulewidth}{0pt}%
%\renewcommand{\footrulewidth}{0pt}%
\if@twoside
%\fancyfoot[RO]{\zihao{-5} ~\thepage~}
%\fancyfoot[LE]{\zihao{-5} ~\thepage~}
\fancyhead[L]{\songti\zihao{-5}\ZJU@value@school\ZJU@value@degree\ZJU@label@thesis}
\fancyhead[R]{\songti\zihao{-5}\leftmark}
\fancyfoot[C]{\zihao{-5} ~\thepage~}
\fancyfoot[C]{\zihao{-5} ~\thepage~}
\else
\fancyhead[L]{\songti\zihao{-5}\ZJU@value@school\ZJU@value@degree\ZJU@label@thesis}
\fancyhead[R]{\songti\zihao{-5}\leftmark}
\fancyfoot[C]{\zihao{-5} ~\thepage~}
\fi
}
% L靠左 R靠右 O奇数页 E偶数页
% 一般页的页眉页脚样式
\pagestyle{fancy}
\fancyhf{} %fancyhf实际是fancyhead与fancyfoot的合体,它的参数用H和F指定
% 分单双面判断页眉的设置
\if@twoside
%\fancyhead[CE]{\songti\zihao{-5}\ZJU@value@school\ZJU@value@degree\ZJU@label@thesis}
%\fancyhead[CO]{\songti\zihao{-5}\leftmark}
%\fancyfoot[RO]{\zihao{-5} ~\thepage~}
%\fancyfoot[LE]{\zihao{-5} ~\thepage~}
\fancyhead[L]{\songti\zihao{-5}\ZJU@value@school\ZJU@value@degree\ZJU@label@thesis}
\fancyhead[R]{\songti\zihao{-5}\leftmark}
\fancyfoot[C]{\zihao{-5} ~\thepage~}
\fancyfoot[C]{\zihao{-5} ~\thepage~}
\else
\fancyhead[L]{\songti\zihao{-5}\ZJU@value@school\ZJU@value@degree\ZJU@label@thesis}
\fancyhead[R]{\songti\zihao{-5}\leftmark}
\fancyfoot[C]{\zihao{-5} ~\thepage~}
\fi
% 设置章节标题格式
\CTEXsetup[name={第\hspace{0.2em},\hspace{0.2em}章},beforeskip={1em plus .2em minus .2em},afterskip={1em plus .2em minus .2em}]{chapter}
\CTEXsetup[number={\arabic{chapter}}]{chapter}
\CTEXsetup[format={\centering}]{chapter}
\CTEXsetup[nameformat={\bfseries\heiti\zihao{3}}]{chapter}
\CTEXsetup[titleformat={\bfseries\heiti\zihao{3}}]{chapter}
\CTEXsetup[format={\noindent}]{section}
\CTEXsetup[nameformat={\bfseries\zihao{4}}]{section}
\CTEXsetup[titleformat={\bfseries\songti\zihao{4}}]{section}
\CTEXsetup[format={\noindent}]{subsection}
\CTEXsetup[nameformat={\zihao{-4}}]{subsection}
\CTEXsetup[titleformat={\bfseries\songti\zihao{-4}}]{subsection}
\CTEXsetup[format={\noindent}]{subsubsection}
\CTEXsetup[nameformat={\zihao{-4}}]{subsubsection}
\CTEXsetup[titleformat={\bfseries\songti\zihao{-4}}]{subsubsection}
% 此处章节标题前后空白距离采用了默认设置,如需修改请参考ctex参考文档ctex.pdf
% 正文部分文字的行距设置
\linespread{1.5}
% 去掉目录中的空格字符
\addtocontents{toc}{\let\string\CTEX@spaceChar\relax}
% 勘误表
\newenvironment{corrigenda}
{\Nchapter{\ZJU@label@corrigenda}}
{}
% 致谢
\renewenvironment{thanks}
{\Nchapter{\ZJU@label@thanks}}
{}
% 序言
\newenvironment{preface}
{\Nchapter{\ZJU@label@preface}}
{}
% 摘要
\newenvironment{abstract}
{\Nchapter{\ZJU@label@abstract}}
{}
%关键字
\newcommand\keywords[1]{%
\vspace{2ex}\noindent{\heiti \ZJU@label@keywords} #1}
%英文摘要
\newenvironment{englishabstract}
{\Nchapter{\ZJU@label@englishabstract}}
{}
%英文关键字
\newcommand\englishkeywords[1]{%
\vspace{2ex}\noindent{\bf \ZJU@label@englishkeywords} #1}
%这几行防止目录、图目录以及表目录 出现在目录中
\renewcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname}%
\@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi
}
\renewcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listfigurename}%
\@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}%
\@starttoc{lof}%
\if@restonecol\twocolumn\fi
}
\renewcommand\listoftables{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listtablename}%
\@mkboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}%
\@starttoc{lot}%
\if@restonecol\twocolumn\fi
}
% 生成目录(论文中称目次)
\newcommand\ZJUcontents{%
% 修改目录的格式
\renewcommand{\cftchapfont}{\heiti\zihao{-4}}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdot}}
\renewcommand{\cftchapdotsep}{\cftdotsep}
\renewcommand{\cftchappagefont}{\rm\zihao{-4}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdot}}
\renewcommand{\cftsecdotsep}{\cftdotsep}
\renewcommand{\cftsecfont}{\songti\zihao{-4}}
\renewcommand{\cftsecpagefont}{\rm\zihao{-4}}
\renewcommand{\cftsubsecleader}{\cftdotfill{\cftdot}}
\renewcommand{\cftsubsecdotsep}{\cftdotsep}
\renewcommand{\cftsubsecfont}{\songti\zihao{-4}}
\renewcommand{\cftsubsecpagefont}{\rm\zihao{-4}}
\setlength{\cftbeforechapskip}{-2pt}
\setlength{\cftbeforesecskip}{-2pt}
\setlength{\cftbeforesubsecskip}{-2pt}
\setlength{\cftsecindent}{1eM}
\setlength{\cftsubsecindent}{2eM}
\setcounter{tocdepth}{2}
\addtocontents{toc}{\cftpagenumbersoff{chapter}}
\tableofcontents
\addtocontents{toc}{\cftpagenumberson{chapter}}
}
% 公式编号前添加“公式”两字
\usepackage{mathtools}
\newtagform{eqtag}{公式~(}{)}
\usetagform{eqtag}
% 图目录
\usepackage{tocloft}
\newlength{\mylen}
\renewcommand{\cftfigpresnum}{\figurename\enspace}
\renewcommand{\cftfigaftersnum}{}
\settowidth{\mylen}{\cftfigpresnum\cftfigaftersnum}
\addtolength{\cftfignumwidth}{\mylen}
\newcommand\ZJUListofFigures{%
\renewcommand{\cftfigfont}{\songti\zihao{-4}}
\renewcommand{\cftfigleader}{\cftdotfill{\cftdot}}
\renewcommand{\cftfigdotsep}{\cftdotsep}
\renewcommand{\cftfigpagefont}{\rm\zihao{-4}}
\setlength{\cftbeforefigskip}{-2pt}
\listoffigures
}
\captionsetup[subfigure]{labelfont=normalfont,textfont=normalfont}
% 表目录
\renewcommand{\cfttabpresnum}{\tablename\enspace}
\renewcommand{\cfttabaftersnum}{}
\settowidth{\mylen}{\cfttabpresnum\cfttabaftersnum}
\addtolength{\cfttabnumwidth}{\mylen}
\newcommand\ZJUListofTables{%
\renewcommand{\cfttabfont}{\songti\zihao{-4}}
\renewcommand{\cfttableader}{\cftdotfill{\cftdot}}
\renewcommand{\cfttabdotsep}{\cftdotsep}
\renewcommand{\cfttabpagefont}{\rm\zihao{-4}}
\setlength{\cftbeforetabskip}{-2pt}
\listoftables
}
% 缩写、符号清单、术语表
\newenvironment{ListofSymbol}
{\Nchapter{\ZJU@label@symbol}}
{}
% 参考文献部分
\DeclareRobustCommand\citenum{
\begingroup
\NAT@swatrue\let\NAT@ctype\z@\NAT@parfalse\let\textsuperscript\relax
\NAT@citexnum[][]
}
\newcommand\ZJUthesisbib[1]{%
\setcitestyle{numbers, round, comma, aysep={,}, yysep={,}, notesep={:}}
\setlength{\bibsep}{0.5ex}
\setlength{\bibhang}{2em}
\renewcommand{\bibfont}{\songti\zihao{5}}
%\bibliographystyle{plain}
\bibliographystyle{ZJUthesis2}
\bibliography{#1}
}
\makeindex
% 索引
\newcommand\ZJUindex{%
\cleardoublepage
% 不用这一句会造成索引的书签位置错误
\phantomsection
\printindex
}
% 作者简历
\newenvironment{resume}
{\Nchapter{\ZJU@label@resume}}
{}
% 发表文章目录
\newenvironment{publications}
{\Nchapter{\ZJU@label@publications}}
{}
% 2006年版模版内未使用到的内容
\newenvironment{resumesection}[1]
{{\noindent\normalfont\bfseries #1}
\list{}{\labelwidth\z@
\leftmargin 2\ccwd}
\item\relax}
{\endlist}
\newenvironment{resumelist}[1]
{{\noindent\normalfont\bfseries #1}
\list{}{\labelwidth\z@
\leftmargin 4\ccwd
\itemindent -2\ccwd
\listparindent\itemindent}
\item\relax}
{\endlist}
\def\reflect#1{{\setbox0=\hbox{#1}\rlap{\kern0.5\wd0
\special{x:gsave}\special{x:scale -1 1}}\box0 \special{x:grestore}}}
\def\XeTeX{\leavevmode
\setbox0=\hbox{X\lower.5ex\hbox{\kern-.15em\reflect{E}}\kern-.1667em \TeX}%
\dp0=0pt\ht0=0pt\box0 }
% 设置显示到4级标题 chapter section subsection subsubsection,可适当减小
\setcounter{secnumdepth}{4}
\newtheoremstyle{break}% name
{}% Space above, empty = `usual value'
{}% Space below
{\itshape}% Body font
{}% Indent amount (empty = no indent, \parindent = para indent)
{\bfseries}% Thm head font
{.}% Punctuation after thm head
{\newline}% Space after thm head: \newline = linebreak
{}% Thm head spec
\endinput
%%
%% End of file `ZJUthesis.cls'.