% ^^A !Mode:: "TeX:UTF-8:DTX" % \iffalse meta-comment % % Copyright 2012-2013 Shi Fujun % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Shi Fujun . % % This work consists of the files uestcthesis.dtx, uestcthesis.ins and % GBT7714-2005NLang-UESTC.bst. % and the derived file uestcthesis.cls. % Other files in this work's package are belongs to the respective owners. % % \fi % % \iffalse %<*driver> \ProvidesFile{uestcthesis.dtx} % %\NeedsTeXFormat{LaTeX2e}[2011/06/27] %\ProvidesClass{uestcthesis} %<*class> [2013/01/22 v0.21 UESTC thesis class] % %<*driver> \documentclass{ltxdoc} \usepackage[UTF8]{ctex} \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} \DocInput{uestcthesis.dtx} \end{document} % % \fi % % \CheckSum{0} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % % \changes{v0.21}{2013/01/22}{将模板重构为DocStrip格式} % % \GetFileInfo{uestcthesis.dtx} % % \DoNotIndex{\newcommand,\newenvironment} % % % \title{The \textsf{uestcthesis} class\thanks{This document % corresponds to \textsf{uestcthesis}~\fileversion, dated \filedate.}} % \author{时富军 \\ \texttt{shifujun@foxmail.com}} % % \maketitle % % \section{源代码} % \subsection{中文支持} %继承ctexbook文类,并调用了如下功能的选项:\par %cs4size:使用小四字号为缺省字体大小。\par %UTF8:使用UTF-8 编码。\par %fancyhdr:保持和fancyhdr 宏包的兼容性。该选项将使得fancyhdr 宏包被自动调用。 %fancyhdr是版式设置宏包,即页眉页脚设置。\par %hyperref:自动判断hyperref 宏包的正确参数以避免产生乱码。 %如果在导言区用户没有自己调用hyperref,则该选项将使得hyperref 宏包在导言区末尾被 %自动调用;如果需要对hyperref 宏包做进一步的设置,则用户可以自己在ctex 宏包后调用 %hyperref,并使用适当的选项或设置。hyperref是超链接宏包,为pdf 文件中的交叉引用提供超链接。\par %fntef:为CJKfntef 宏包和CCTfntef 宏包提供统一接口。 %该选项将使得CJKfntef 宏包或者CCTfntef 宏包被自动调用。这两个宏包是下划线宏包。 % \begin{macrocode} \LoadClass[cs4size,UTF8,fancyhdr,hyperref,fntef,openany]{ctexbook} % \end{macrocode} % %调用etoolbox宏包,为了使用其提供的|\ifblank|命令。 % \begin{macrocode} \RequirePackage{etoolbox} % \end{macrocode} % %调用ifthen宏包,为了使用其提供的|\ifthenelse|命令。 % \begin{macrocode} \RequirePackage{ifthen} % \end{macrocode} % \subsection{学位选项} %设置有关学士学位论文的选项值。变量的命名方式采用:|%\@degree|,其中|| %是可变的变量名。此形式用于在其他排版设置中取代原有的常量值。 % \begin{macro}{\bachelor@uestcthesis} %本科学位论文相关设置: % \begin{macrocode} \newcommand{\bachelor@uestcthesis}{ \newcommand{\degree@uestcthesis}{bachelor} \newcommand{\bachelortitlepage@uestcthesis}{}%先声明宏,稍后定义。 \newcommand{\titlepage@degree}{\bachelortitlepage@uestcthesis} %定义封面的排版设置 \newcommand{\multibibflag@uestcthesis}{} %设置不使用multibib宏包 \newcommand{\thesisname@degree}{电子科技大学学士学位论文} %论文全名 } % \end{macrocode} % \end{macro} % \begin{macro}{\master@uestcthesis} %硕士学位论文相关设置: % \begin{macrocode} \newcommand{\master@uestcthesis}{ \newcommand{\degree@uestcthesis}{master} \newcommand{\mastertitlepage@uestcthesis}{}%先声明宏,稍后定义。 \newcommand{\titlepage@degree}{\mastertitlepage@uestcthesis} %定义封面的排版设置 \newcommand{\multibibflag@uestcthesis}{TRUE} %设置使用multibib宏包 \newcommand{\thesisname@degree}{电子科技大学硕士学位论文} %论文全名 \newcommand{\publicationsname@degree}{攻硕期间取得的研究成果} \newcommand{\@degree}{硕士} %定义申请学位级别 } % \end{macrocode} % \end{macro} % \begin{macro}{\doctor@uestcthesis} %博士学位论文相关设置: % \begin{macrocode} \newcommand{\doctor@uestcthesis}{ \newcommand{\degree@uestcthesis}{doctor} \newcommand{\doctortitlepage@uestcthesis}{}%先声明宏,稍后定义。 \newcommand{\titlepage@degree}{\doctortitlepage@uestcthesis} %定义封面的排版设置 \newcommand{\multibibflag@uestcthesis}{TRUE} %设置使用multibib宏包 \newcommand{\thesisname@degree}{电子科技大学博士学位论文} %论文全名 \newcommand{\publicationsname@degree}{攻博期间取得的研究成果} \newcommand{\@degree}{博士} %定义申请学位级别 } % \end{macrocode} % \end{macro} % 声明三个选项分别代表三种学位论文。由于其中的定义包含中文,所以声明必须放在ctexbook文类后面。 % \begin{macrocode} \DeclareOption{bachelor}{\bachelor@uestcthesis} \DeclareOption{master}{\master@uestcthesis} \DeclareOption{doctor}{\doctor@uestcthesis} \ProcessOptions\relax % \end{macrocode} % \subsection{版面设置} %调用版面设置宏包geometry。这些选项的值是参照MS WORD打印出来的PDF文件对比得到的。 %选项说明:\\ %a4paper:设置版面纸张为A4纸。\\ %headheight:设置页眉高度。\\ %headsep:页眉与版心的距离。\\ %includeheadfoot:将页眉页脚高度算进版心中。\\ %centering:设置版心居中。\\ %top:页面顶边与版心之间的距离。\\ %left:双页排版的内侧边距。 % % \begin{macrocode} \RequirePackage[a4paper,headheight=12.65pt,headsep=4mm,includeheadfoot,centering, top=2.75cm,left=3cm]{geometry} % \end{macrocode} % %按照学校要求需要设置默认行距为20磅。参数是倍数值,没有单位。这个值是通过 %|\showthe\baselineskip|命令查看当前的行距,然后计算得到的。 % \begin{macrocode} \linespread{1.391} % \end{macrocode} % \subsection{图表设置} %调用宏包: %graphicx插图宏包\\ %calc计算宏包,用于在插图等尺寸指定时可以指定用四则运算表示尺寸。 %例如|0.6\textwidth|表示0.6倍的行宽。\\ %float宏包,为浮动环境增加一个H选项,命令系统就地放置浮动体。但这个选项必须单独 %使用,例如|\begin{figure}[H]|。 如果中括号内有其他选项,则H会失去强制作用。\\ %texnames宏包提供了|\LaTeX|等\TeX 专有Logo打印命令。这个宏包可能只在编写说明文档 %时有用,在编写毕业设计论文时应该不会用到。 % % \begin{macrocode} \RequirePackage{graphicx,calc,float,texnames} % \end{macrocode} % %调用图表标题宏包caption。选项说明:\\ %format=hang:将标题从第二行起悬挂缩进排版,缩进宽度等于标题标志加分隔符的宽度。\\ %labelsep=space:分隔符样式为一个空格。 % % \begin{macrocode} \RequirePackage[format=hang,labelsep=space]{caption} % \end{macrocode} % %设置浮动体在文本中间的前后间距为6磅。同时在caption宏包的belowskip选项中设置的-7mm+6bp。 % % \begin{macrocode} \intextsep=6bp % \end{macrocode} % %分别设置表和图的标题与正文的距离。\\ %aboveskip:标题与图表之间的距离。设置为0是为了将前文间距交给|\intextsep|设置。\\ %belowskip:标题与下文之间的距离。其中-7mm是将后文间距先调为0,再加上需要的6磅。 %这样设置是因为|\intextsep|命令设置出的效果中后文间距比6bp多出约7mm距离。 % % \begin{macrocode} \captionsetup[figure]{aboveskip=0bp,belowskip=-7mm+6bp} \captionsetup[table]{aboveskip=0bp,belowskip=0bp} % \end{macrocode} % %调用宏包:\\ %booktabs表格线宏包。用于绘制三线表。\\ %tabularx可调列宽表格宏包。可自动换行。\\ %threeparttable可加脚注的表格宏包。\\ %longtable跨页表格宏包。 % \begin{macrocode} \RequirePackage{booktabs,tabularx,threeparttable,longtable} % \end{macrocode} % %先声明一个图表标题字体。 % \begin{macrocode} \DeclareCaptionFont{capfont}{\zihao{5}} % \end{macrocode} % %再设置图表标题字体为上一行声明的。 % \begin{macrocode} \captionsetup{font=capfont} % \end{macrocode} % %使图编号数字间加一个短横线。即设置成图1-1的样式。 % \begin{macrocode} \renewcommand{\thefigure}{\arabic{chapter}\textendash\arabic{figure}} % \end{macrocode} % %使表编号数字间加一个短横线。即设置成表1-1的样式。 % \begin{macrocode} \renewcommand{\thetable}{\arabic{chapter}\textendash\arabic{table}} % \end{macrocode} % %设置图片的根目录。 % \begin{macrocode} \graphicspath{{pics/}} % \end{macrocode} % %调用宏包placeins。允许上一个section的浮动图形出现在下一个section的开始部分,还提供|\FloatBarrier|命令,使所有未处理的浮动图形立即被处理。 % \begin{macrocode} \RequirePackage[below]{placeins} % \end{macrocode} % %调用宏包flafter。使得所有浮动体不能被放置在其浮动环境之前,以免浮动体在引述它的文本之前出现. % \begin{macrocode} \RequirePackage{flafter} % \end{macrocode} % \begin{macro}{\newcmds@uestcthesis} %定义一些插入图表的包装命令 % \begin{macrocode} \newcommand{\newcmds@uestcthesis}{ % \end{macrocode} % \begin{macro}{\pic} %|\pic|命令生成一个独占一行、居中的图片。标题前后间距符合科大毕设标准 % \begin{macrocode} \newcommand{\pic}[4][htbp]{ \begin{figure}[##1] \centering \includegraphics[##3]{##4} \caption{##2} \label{##4} \end{figure} } % \end{macrocode} % \end{macro} % \begin{environment}{pics} %定义子图环境和插入子图命令 % \begin{macrocode} \newcommand{\subpiclabel}{}%定义一个空的多图环境整体的标签变量 \newcommand{\subpiccaption}{}%定义一个空的多图环境整体的标题变量 \newenvironment{pics}[3][htbp]{%定义多图环境 \renewcommand{\subpiclabel}{##3}%设置多图环境整体的标签 \renewcommand{\subpiccaption}{##2}%设置多图环境整体的标题。这里先定义两个空变量,又设置值,是因为在定义一个环境时,环境结尾中不能调用##2,##3等传入的值。所以要在环境结尾中插入标题和标签就只能这么做了。 \begin{figure}[##1] \centering} {\caption{\subpiccaption} \label{\subpiclabel} \end{figure} } % \end{macrocode} % \end{environment} % \begin{macro}{\addsubpic} %定义插入子图命令 % \begin{macrocode} \newcommand{\addsubpic}[3]{ \subfigure[##1]{\label{##3}\includegraphics[##2]{##3}} } % \end{macrocode} % \end{macro} % \begin{macro}{\threelinetable} %|\threelinetable|命令生成一个独占一行、居中的三线表格。标题前后间距符合科大毕设标准。 % \begin{macrocode} \newcommand{\threelinetable}[8][htbp]{ \begin{table}[##1] \centering \begin{threeparttable} \caption{##5} \label{##2} \begin{tabularx}{##3}{##4} \toprule[0.1em] ##6 \midrule[0.05em] ##7 \bottomrule[0.1em] \end{tabularx} \ifblank{##8}{}{ \begin{tablenotes} ##8 \end{tablenotes} } \end{threeparttable} \end{table} } % \end{macrocode} % \end{macro} % \begin{macro}{\threelinetable} %|\longthreelinetable|命令生成一个居中的、可自动换页的三线表格。标题前后间距符合科大毕设标准。 % \begin{macrocode} \newcommand{\longthreelinetable}[6]{ { \centering \begin{longtable}{##4} \caption{##2}\label{##1}\\ \toprule[0.1em] ##5 \midrule[0.05em] \endfirsthead \multicolumn{##3}{r}{\footnotesize 接上页}\\ \toprule[0.1em] ##5 \midrule[0.05em] \endhead \bottomrule[0.1em] \multicolumn{##3}{r}{\footnotesize 接下页}\\ \endfoot \bottomrule[0.1em] \endlastfoot ##6 \end{longtable} } } % \end{macrocode} % \end{macro} % \begin{macro}{\pictable} %插入图片形式的表格 % \begin{macrocode} \newcommand{\pictable}[4][htbp]{ \begin{table}[##1] \centering \caption{##2} \label{##4} \includegraphics[##3]{##4} \end{table} } % \end{macrocode} % \end{macro} % \begin{macrocode} }%\newcmds@uestcthesis定义完毕 % \end{macrocode} % \end{macro} % \subsection{页眉页脚设置} % \begin{macro}{\mainmatterfancy} %定义正文版式设置 % \begin{macrocode} \newcommand{\mainmatterfancy}{ \fancyhf{} \fancyhead[OC]{\zihao{5}\leftmark}%奇数页居中打印章标题 \fancyhead[EC]{\zihao{5}\thesisname@degree}%偶数页居中打印论文全名 \fancyfoot[C]{\thepage}%页码位于页面底端,居中打印。 } % \end{macrocode} % \end{macro} % % \begin{macro}{\Cabstractfancy} %定义中文摘要版式设置 % \begin{macrocode} \newcommand{\Cabstractfancy}{% \fancyhf{}% \fancyhead[C]{\zihao{5}摘要}%页眉居中打印“摘要” \fancyfoot[C]{\thepage}%页码位于页面底端,居中打印。 } % \end{macrocode} % \end{macro} % % \begin{macro}{\Eabstractfancy} %定义英文摘要版式设置 % \begin{macrocode} \newcommand{\Eabstractfancy}{ \fancyhf{}% \fancyhead[C]{\zihao{5}ABSTRACT}%页眉居中打印“ABSTRACT” \fancyfoot[C]{\thepage}%页码位于页面底端,居中打印。 } % \end{macrocode} % \end{macro} % % \begin{macro}{\tocmatterfancy} %定义目录区版式设置 % \begin{macrocode} \newcommand{\tocmatterfancy}{ \fancyhf{} \fancyhead[C]{\zihao{5}目\enspace 录}%页眉居中打印“目 录” \fancyfoot[C]{\thepage}%页码位于页面底端,居中打印。 } % \end{macrocode} % \end{macro} % % \begin{macro}{\glossarymatterfancy} %定义主要符号表版式设置 % \begin{macrocode} \newcommand{\glossarymatterfancy}{%定义主要符号表版式设置 \fancypagestyle{plain}{ \fancyhf{} \fancyhead[C]{\zihao{5}主要符号表}% \fancyfoot[C]{\thepage}% } % \end{macrocode} %由于主要符号表在目录后面,而且是自动生成的。导致主要符号表的第一页页面还显示目录。 %所以这里有一个BUG需要修正。glossary宏包提供的|\glossarypreamble|原本是空的宏, %会自动插入在主要符号表的前面。 % \begin{macrocode} \renewcommand{\glossarypreamble}{% \fancyhead[C]{\zihao{5}主要符号表}%页眉居中打印“主要符号表” } } % \end{macrocode} % \end{macro} % \begin{macro}{\Cabstractmatter} %设置中文摘要版式 % \begin{macrocode} \newcommand{\Cabstractmatter}{ \setcounter{page}{1}%页码重置为1 \pagenumbering{Roman}%页码使用大写罗马数字 \pagestyle{fancy} \Cabstractfancy \fancypagestyle{plain}{\Cabstractfancy} %中文摘要页也是章标题页面,也使用plain版式。所以单独重新定义。这个定义会在英文摘要版式设置中被覆盖掉。 } % \end{macrocode} % \end{macro} % \begin{macro}{\Eabstractmatter} %设置英文摘要版式。英文摘要页也是章标题页面,也使用plain版式。所以单独重新定义。这个定义会在目录版式设置中被覆盖掉。 % \begin{macrocode} \newcommand{\Eabstractmatter}{ \pagestyle{fancy} \Eabstractfancy \fancypagestyle{plain}{\Eabstractfancy} } % \end{macrocode} % \end{macro} % \begin{macro}{\tocmatter} %定义目录版式 % \begin{macrocode} \newcommand{\tocmatter}{ \pagestyle{fancy} \tocmatterfancy %使章标题页页眉页脚与其他页一致 \fancypagestyle{plain}{\tocmatterfancy} %目录页也是章标题页面,也使用plain版式。但目录的右页和摘要或正文的其他章标题页不一样,所以单独重新定义。这个定义会在正文区命令中被覆盖掉。 } % \end{macrocode} % \end{macro} % \begin{macro}{\mainmatter} %重定义正文区版式 % \begin{macrocode} \renewcommand{\mainmatter}{ \newpage \setcounter{page}{1} \pagenumbering{arabic} \pagestyle{fancy} \renewcommand{\chaptermark}[1]{\markboth{第\chinese{chapter}章~##1 }{}}%修正页眉章号显示不正确 \mainmatterfancy%设置正文的版式 \fancypagestyle{plain}{\mainmatterfancy} %使章标题页使用plain版式,需要单独定义它。使它的页眉页脚与其他页一致。 } % \end{macrocode} % \end{macro} % \subsection{封面设置} %根据不同的学位,定义不同的封面设置。学校规定封面必须用文印中心提供的封面, %所以这个封面设置不用太过纠结。这个封面只能作为非正式提交前的论文的临时封面。 %让论文看起来完整一点,毕竟没有封面太难看了。\par % \subsubsection{封面填写命令} % \begin{macro}{\stuid} %设置学号命令 % \begin{macrocode} \newcommand{\stuid}[1]{ \newcommand{\@stuid}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\major} %设置专业命令 % \begin{macrocode} \newcommand{\major}[1]{ \newcommand{\@major}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\school} %设置学院命令 % \begin{macrocode} \newcommand{\school}[1]{ \newcommand{\@school}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\adviser} %设置第一指导教师信息命令 % \begin{macrocode} \newcommand{\adviser}[3]{ \newcommand{\@advisername}{#1}%姓名 \newcommand{\@advisertitle}{#2}%职称 \newcommand{\@adviserinstitution}{#3}%工作单位 } % \end{macrocode} % \end{macro} % \begin{macro}{\adviserB} %设置第二指导教师信息命令 % \begin{macrocode} \newcommand{\adviserB}[3]{ \newcommand{\@adviserBname}{#1}%姓名 \newcommand{\@adviserBtitle}{#2}%职称 \newcommand{\@adviserBinstitution}{#3}%工作单位 } % \end{macrocode} % \end{macro} % \begin{macro}{\adviserC} %设置第三指导教师信息命令 % \begin{macrocode} \newcommand{\adviserC}[3]{ \newcommand{\@adviserCname}{#1}%姓名 \newcommand{\@adviserCtitle}{#2}%职称 \newcommand{\@adviserCinstitution}{#3}%工作单位 } % \end{macrocode} % \end{macro} % \begin{macro}{\adviserD} %设置第四指导教师信息命令 % \begin{macrocode} \newcommand{\adviserD}[3]{ \newcommand{\@adviserDname}{#1}%姓名 \newcommand{\@adviserDtitle}{#2}%职称 \newcommand{\@adviserDinstitution}{#3}%工作单位 } % \end{macrocode} % \end{macro} % \begin{macro}{\university} %设置指导单位命令 % \begin{macrocode} \newcommand{\university}[1]{ \newcommand{\@university}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\date} %设置论文提交日期命令 % \begin{macrocode} \renewcommand{\date}[3]{ \renewcommand{\@date}{#1年#2月#3日} } % \end{macrocode} % \end{macro} % \begin{macro}{\oraldefensedate} %设置论文答辩日期命令 % \begin{macrocode} \newcommand{\oraldefensedate}[3]{ \newcommand{\@oraldefensedate}{#1年#2月#3日} } % \end{macrocode} % \end{macro} % \begin{macro}{\awarddate} %设置学位授予日期命令 % \begin{macrocode} \newcommand{\awarddate}[3]{ \newcommand{\@awarddate}{#1年#2月#3日} } % \end{macrocode} % \end{macro} % \begin{macro}{\classnumber} %设置分类号命令 % \begin{macrocode} \newcommand{\classnumber}[1]{ \newcommand{\@classnumber}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\securityclassification} %设置密级命令 % \begin{macrocode} \newcommand{\securityclassification}[1]{ \newcommand{\@securityclassification}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\UDC} %设置UDC命令 % \begin{macrocode} \newcommand{\UDC}[1]{ \newcommand{\@UDC}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\chairman} %设置答辩委员会主席命令 % \begin{macrocode} \newcommand{\chairman}[1]{ \newcommand{\@chairman}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\appraiser} %设置评阅人命令 % \begin{macrocode} \newcommand{\appraiser}[1]{ \newcommand{\@appraiser}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\englishtitle} %设置论文英文名命令 % \begin{macrocode} \newcommand{\englishtitle}[1]{ \newcommand{\@englishtitle}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\englishmajor} %设置专业英文名命令 % \begin{macrocode} \newcommand{\englishmajor}[1]{ \newcommand{\@englishmajor}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\englishauthor} %设置作者英文名命令 % \begin{macrocode} \newcommand{\englishauthor}[1]{ \newcommand{\@englishauthor}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\englishadvisor} %设置指导教师英文名命令 % \begin{macrocode} \newcommand{\englishadvisor}[1]{ \newcommand{\@englishadvisor}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\englishshcool} %设置学院英文名命令 % \begin{macrocode} \newcommand{\englishshcool}[1]{ \newcommand{\@englishshcool}{#1} } % \end{macrocode} % \end{macro} % \begin{macro}{\uestclogo} %插入学校LOGO的命令 % \begin{macrocode} \newcommand{\uestclogo}{ \includegraphics{UESTC_LOGO.png} } % \end{macrocode} % \end{macro} % \subsubsection{学士学位封面} % \begin{macro}{\bachelortitlepage@uestcthesis} %定义学士学位封面的格式 % \begin{macrocode} \ifdefstring{\degree@uestcthesis}{bachelor}{ \renewcommand{\bachelortitlepage@uestcthesis}{ \renewcommand{\maketitle}{ \begin{titlepage} \begin{center} \zihao{3} \includegraphics[width=13cm]{UESTC.png}\\ \vspace{1cm} \resizebox{!}{1cm}{\zihao{0} 学\hspace{0.75em}士\hspace{0.75em}学\hspace{0.75em}位\hspace{0.75em}论\hspace{0.75em}文}\\[3mm] {\bf BACHELOR DISSERTATION}\\[1cm] \renewcommand{\ULthickness}{0.8pt} \renewcommand{\CJKunderlinecolor}{\color{black}} \linespread{1.25} \noindent \parbox[t][14ex][t]{\linewidth}{\centering {\heiti\zihao{3} 论文题目}\zihao{3}{\uline{\@title}} }\\[3mm] \linespread{1.391} \renewcommand{\ULthickness}{0.4pt} {\zihao{3}学生姓名~}\makebox[20em][c]{\uline{\hfill\@author\hfill}}\\[5mm] {\zihao{3}学\qquad 号~}\makebox[20em][c]{\uline{\hfill\@stuid\hfill}}\\[5mm] {\zihao{3}专\qquad 业~}\makebox[20em][c]{\uline{\hfill\@major\hfill}}\\[5mm] {\zihao{3}学\qquad 院~}\makebox[20em][c]{\uline{\hfill\@school\hfill}}\\[5mm] {\zihao{3}指导教师~}\makebox[20em][c]{\uline{\hfill\@advisername\hfill}}\\[5mm] {\zihao{3}指导单位~}\makebox[20em][c]{\uline{\hfill\@university\hfill}}\\[5mm] {\zihao{3}\@date} \end{center} \end{titlepage}}}}{} % \end{macrocode} % \end{macro} % \subsubsection{硕士学位封面} % \begin{macro}{\mastertitlepage@uestcthesis} %定义硕士学位封面的格式 % \begin{macrocode} \ifdefstring{\degree@uestcthesis}{master}{ \renewcommand{\mastertitlepage@uestcthesis}{ \renewcommand{\maketitle}{%定义封面的格式 \begin{titlepage} \begin{center} {\zihao{2}电\enspace{}子\enspace{}科\enspace{}技\enspace{}大\enspace{}学}\\ {\zihao{-4}UNIVERSITY OF ELECTRONIC SCIENCE AND TECHNOLOGY OF CHINA}\\ ~\\ ~\\ {\zihao{0}硕士学位论文}\\[12bp] {\bf\zihao{3}MASTER THESIS}\\[2cm] \uestclogo\\[2cm] \renewcommand{\ULthickness}{0.8pt} \renewcommand{\CJKunderlinecolor}{\color{black}} \linespread{1.25} \noindent \parbox[t][14ex][t]{\linewidth}{\centering {\zihao{-2} 论文题目~~}{\zihao{3}\uline{\@title}} }\\[3mm] \linespread{1.391} \renewcommand{\ULthickness}{0.4pt} {\zihao{3}~}\\ {\zihao{3}学科专业~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@major\hfill}}\\[5mm] {\zihao{3}学\qquad 号~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@stuid\hfill}}\\[5mm] {\zihao{3}作者姓名~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@author\hfill}}\\[5mm] {\zihao{3}指导教师~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@advisername\hfill}}\\[5mm] \end{center} \newpage \thispagestyle{empty} \noindent {\zihao{-4}分类号}\makebox[15em][l]{\zihao{-4}\uline{~~~\@classnumber\hfill}} {\zihao{-4}密级}\makebox[15em][l]{\zihao{-4}\uline{~~~\@securityclassification\hfill}}\\ {\zihao{-4}UDC\textsuperscript{注1}\!}\makebox[15em][l]{\zihao{-4}\uline{~~~\@UDC\hfill}}\\ \begin{center} {\zihao{-0}学\quad{}位\quad{}论\quad{}文}\\ {\zihao{3}~}\\ \makebox[\linewidth][c]{\zihao{3}\uline{\hfill\@title\hfill}}\\ {\zihao{-4}(题名和副题名)}\\ {\zihao{5}~}\\ {\zihao{5}~}\\ \makebox[10em][c]{\zihao{3}\uline{\hfill\@author\hfill}}\\ {\zihao{-4}(作者姓名)}\\ {\zihao{-4}~}\\ {\zihao{5}~}\\ {\zihao{-4}指导教师}\makebox[29em][c]{\zihao{-4}\uline{\hfill\@advisername 、\@advisertitle 、\@adviserinstitution \hfill}}\\[5bp] {\zihao{-4}\qquad\qquad}\makebox[29em][c]{\zihao{-4}\uline{\hfill\ifthenelse{\isundefined{\@adviserBname}}{}{\@adviserBname 、\@adviserBtitle 、\@adviserBinstitution }\hfill}}\\[5bp] {\zihao{-4}\qquad\qquad}\makebox[29em][c]{\zihao{-4}\uline{\hfill\ifthenelse{\isundefined{\@adviserCname}}{}{\@adviserBname 、\@adviserCtitle 、\@adviserCinstitution }\hfill}}\\[5bp] {\zihao{-4}\qquad\qquad}\makebox[29em][c]{\zihao{-4}\uline{\hfill\ifthenelse{\isundefined{\@adviserDname}}{}{\@adviserBname 、\@adviserDtitle 、\@adviserDinstitution }\hfill}}\\[5bp] {\zihao{-4}(姓名、职称、单位名称)}\\[8bp] \end{center} {\zihao{-4}申请学位级别}\makebox[10em][l]{\zihao{-4}\uline{\hfill\@degree\hfill}} {\zihao{-4}学科专业}\makebox[15em][l]{\zihao{-4}\uline{\hfill\@major\hfill}}\\[13bp] {\zihao{-4}提交论文日期}\makebox[10em][l]{\zihao{-4}\uline{\hfill\@date\hfill}} {\zihao{-4}论文答辩日期}\makebox[13em][l]{\zihao{-4}\uline{\hfill\@oraldefensedate\hfill}}\\[13bp] {\zihao{-4}学位授予单位和日期}\makebox[26em][l]{\zihao{3}\uline{\hfill 电子科技大学\hfill\@awarddate}}\\[13bp] {\zihao{-4}答辩委员会主席}\makebox[16em][l]{\zihao{-4}\uline{\hfill\@chairman\hfill}}\\[13bp] {\zihao{-4}评阅人}\makebox[32em][l]{\zihao{-4}\uline{\hfill\@appraiser\hfill}}\\ \vfill {\zihao{5}注1:注明《国际十进分类法UDC》的类号。} \newpage \thispagestyle{empty} \begin{center} {\zihao{-4}~}\\ {\zihao{-4}~}\\ {\zihao{-4}~}\\ {\bf\zihao{-2}\@englishtitle}\\ \vfill {\zihao{-3}A Thesis Submitted to}\\[1ex] {\zihao{-3}University of Electronic Science and Technology of China}\\ \vspace{3cm} \makebox[6em][r]{\zihao{4}Major:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishmajor\hfill}}\\[1ex] \makebox[6em][r]{\zihao{4}Author:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishauthor\hfill}}\\[1ex] \makebox[6em][r]{\zihao{4}Advisor:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishadvisor\hfill}}\\[1ex] \makebox[6em][r]{\zihao{4}School:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishshcool\hfill}}\\[1ex] \end{center} \newpage \thispagestyle{empty} \linespread{1.5} \begin{center} {\bf\zihao{-2}独创性声明}\par \end{center} {\zihao{4}\qquad 本人声明所呈交的学位论文是本人在导师指导下进行的研究工作及取得的研究成果。据我所知,除了文中特别加以标注和致谢的地方外,论文中不包含其他人已经发表或撰写过的研究成果,也不包含为获得电子科技大学或其它教育机构的学位或证书而使用过的材料。与我一同工作的同志对本研究所做的任何贡献均已在论文中作了明确的说明并表示谢意。\par ~\par 作者签名:\makebox[5em][l]{\uline{\hfill}}\hfill 日期:\qquad{}年\qquad{}月\qquad{}日 \par ~\par \begin{center} {\bf\zihao{-2}论文使用授权}\par \end{center} {\zihao{4}\qquad 本学位论文作者完全了解电子科技大学有关保留、使用学位论文的规定,有权保留并向国家有关部门或机构送交论文的复印件和磁盘,允许论文被查阅和借阅。本人授权电子科技大学可以将学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存、汇编学位论文。\par (保密的学位论文在解密后应遵守此规定) \par ~\par } \qquad 作者签名:\makebox[5em][l]{\uline{\hfill}}\hfill 导师签名:\makebox[7em][l]{\uline{\hfill}}\par \hfill 日期:\qquad{}年\qquad{}月\qquad{}日 \par } \linespread{1.391} \end{titlepage}}}}{} % \end{macrocode} % \end{macro} % \subsubsection{博士学位封面} % \begin{macro}{\doctortitlepage@uestcthesis} %定义博士学位封面的格式 % \begin{macrocode} \ifdefstring{\degree@uestcthesis}{doctor}{ \renewcommand{\doctortitlepage@uestcthesis}{ \renewcommand{\maketitle}{%定义封面的格式 \begin{titlepage} \begin{center} {\zihao{2}电\enspace{}子\enspace{}科\enspace{}技\enspace{}大\enspace{}学}\\ {\zihao{-4}UNIVERSITY OF ELECTRONIC SCIENCE AND TECHNOLOGY OF CHINA}\\ ~\\ ~\\ {\zihao{0}博士学位论文}\\[12bp] {\bf\zihao{3}DOCTORAL DISSERTATION}\\[2cm] \uestclogo\\[2cm] \renewcommand{\ULthickness}{0.8pt} \renewcommand{\CJKunderlinecolor}{\color{black}} \linespread{1.25} \noindent \parbox[t][14ex][t]{\linewidth}{\centering {\zihao{-2} 论文题目~~}{\zihao{3}\uline{\@title}} }\\[3mm] \linespread{1.391} \renewcommand{\ULthickness}{0.4pt} {\zihao{3}~}\\ {\zihao{3}学科专业~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@major\hfill}}\\[5mm] {\zihao{3}学\qquad 号~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@stuid\hfill}}\\[5mm] {\zihao{3}作者姓名~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@author\hfill}}\\[5mm] {\zihao{3}指导教师~}\makebox[20em][c]{\zihao{3}\uline{\hfill\@advisername\hfill}}\\[5mm] \end{center} \newpage \thispagestyle{empty} \noindent {\zihao{-4}分类号}\makebox[15em][l]{\zihao{-4}\uline{~~~\@classnumber\hfill}} {\zihao{-4}密级}\makebox[15em][l]{\zihao{-4}\uline{~~~\@securityclassification\hfill}}\\ {\zihao{-4}UDC\textsuperscript{注1}\!}\makebox[15em][l]{\zihao{-4}\uline{~~~\@UDC\hfill}}\\ \begin{center} {\zihao{-0}学\quad{}位\quad{}论\quad{}文}\\ {\zihao{3}~}\\ \makebox[\linewidth][c]{\zihao{3}\uline{\hfill\@title\hfill}}\\ {\zihao{-4}(题名和副题名)}\\ {\zihao{5}~}\\ {\zihao{5}~}\\ \makebox[10em][c]{\zihao{3}\uline{\hfill\@author\hfill}}\\ {\zihao{-4}(作者姓名)}\\ {\zihao{-4}~}\\ {\zihao{5}~}\\ {\zihao{-4}指导教师}\makebox[29em][c]{\zihao{-4}\uline{\hfill\@advisername 、\@advisertitle 、\@adviserinstitution \hfill}}\\[5bp] {\zihao{-4}\qquad\qquad}\makebox[29em][c]{\zihao{-4}\uline{\hfill\ifthenelse{\isundefined{\@adviserBname}}{}{\@adviserBname 、\@adviserBtitle 、\@adviserBinstitution }\hfill}}\\[5bp] {\zihao{-4}\qquad\qquad}\makebox[29em][c]{\zihao{-4}\uline{\hfill\ifthenelse{\isundefined{\@adviserCname}}{}{\@adviserBname 、\@adviserCtitle 、\@adviserCinstitution }\hfill}}\\[5bp] {\zihao{-4}\qquad\qquad}\makebox[29em][c]{\zihao{-4}\uline{\hfill\ifthenelse{\isundefined{\@adviserDname}}{}{\@adviserBname 、\@adviserDtitle 、\@adviserDinstitution }\hfill}}\\[5bp] {\zihao{-4}(姓名、职称、单位名称)}\\[8bp] \end{center} {\zihao{-4}申请学位级别}\makebox[10em][l]{\zihao{-4}\uline{\hfill\@degree\hfill}} {\zihao{-4}学科专业}\makebox[15em][l]{\zihao{-4}\uline{\hfill\@major\hfill}}\\[13bp] {\zihao{-4}提交论文日期}\makebox[10em][l]{\zihao{-4}\uline{\hfill\@date\hfill}} {\zihao{-4}论文答辩日期}\makebox[13em][l]{\zihao{-4}\uline{\hfill\@oraldefensedate\hfill}}\\[13bp] {\zihao{-4}学位授予单位和日期}\makebox[26em][l]{\zihao{3}\uline{\hfill 电子科技大学\hfill\@awarddate}}\\[13bp] {\zihao{-4}答辩委员会主席}\makebox[16em][l]{\zihao{-4}\uline{\hfill\@chairman\hfill}}\\[13bp] {\zihao{-4}评阅人}\makebox[32em][l]{\zihao{-4}\uline{\hfill\@appraiser\hfill}}\\ \vfill {\zihao{5}注1:注明《国际十进分类法UDC》的类号。} \newpage \thispagestyle{empty} \begin{center} {\zihao{-4}~}\\ {\zihao{-4}~}\\ {\zihao{-4}~}\\ {\bf\zihao{-2}\@englishtitle}\\ \vfill {\zihao{-3}A Doctor Dissertation Submitted to}\\[1ex] {\zihao{-3}University of Electronic Science and Technology of China}\\ \vspace{3cm} \makebox[6em][r]{\zihao{4}Major:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishmajor\hfill}}\\[1ex] \makebox[6em][r]{\zihao{4}Author:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishauthor\hfill}}\\[1ex] \makebox[6em][r]{\zihao{4}Advisor:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishadvisor\hfill}}\\[1ex] \makebox[6em][r]{\zihao{4}School:}\makebox[25em][l]{\zihao{4}\uline{\hfill\@englishshcool\hfill}}\\[1ex] \end{center} \newpage \thispagestyle{empty} \linespread{1.5} \begin{center} {\bf\zihao{-2}独创性声明}\par \end{center} {\zihao{4}\qquad 本人声明所呈交的学位论文是本人在导师指导下进行的研究工作及取得的研究成果。据我所知,除了文中特别加以标注和致谢的地方外,论文中不包含其他人已经发表或撰写过的研究成果,也不包含为获得电子科技大学或其它教育机构的学位或证书而使用过的材料。与我一同工作的同志对本研究所做的任何贡献均已在论文中作了明确的说明并表示谢意。\par ~\par 作者签名:\makebox[5em][l]{\uline{\hfill}}\hfill 日期:\qquad{}年\qquad{}月\qquad{}日 \par ~\par \begin{center} {\bf\zihao{-2}论文使用授权}\par \end{center} {\zihao{4}\qquad 本学位论文作者完全了解电子科技大学有关保留、使用学位论文的规定,有权保留并向国家有关部门或机构送交论文的复印件和磁盘,允许论文被查阅和借阅。本人授权电子科技大学可以将学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存、汇编学位论文。\par (保密的学位论文在解密后应遵守此规定) \par ~\par } \qquad 作者签名:\makebox[5em][l]{\uline{\hfill}}\hfill 导师签名:\makebox[7em][l]{\uline{\hfill}}\par \hfill 日期:\qquad{}年\qquad{}月\qquad{}日 \par } \linespread{1.391} \end{titlepage}}}}{} % \end{macrocode} % \end{macro} % \subsubsection{载入封面设置} %根据不同的学位,加载不同的封面设置。 % \begin{macrocode} \titlepage@degree % \end{macrocode} % \subsection{各级标题设置} %设置标题排序深度到3级节标题subsubsection,例如1.1.1.1 % \begin{macrocode} \setcounter{secnumdepth}{3} % \end{macrocode} % %设置章标题格式。弹性长度的距离为行距的20\%。排版规则中说明可以适当调整各级标题段后间距。 % \begin{macrocode} \CTEXsetup[ name={第,章}, number={\chinese{chapter}}, nameformat={}, numberformat={}, titleformat={}, aftername={~}, beforeskip={2mm},%章标题段前30磅,这里2mm是由于实际效果与MS WORD有差异而微调出的。具体测量的是页眉线到章标题文字上边的距离。 afterskip={30bp plus 6bp minus 6bp},%章标题段后30磅。 format={\heiti\zihao{-3}\centering}, ]{chapter} % \end{macrocode} % %设置1级节标题格式 % \begin{macrocode} \CTEXsetup[ aftername={~}, beforeskip={18bp}, afterskip={18bp plus 3.6bp minus 3.6bp}, format={\heiti\zihao{4}\flushleft}]{section} % \end{macrocode} % %设置2级节标题格式 % \begin{macrocode} \CTEXsetup[ aftername={~}, beforeskip={12bp}, afterskip={12bp plus 2.4bp minus 2.4bp}, format={\heiti\zihao{4}\flushleft}]{subsection} % \end{macrocode} % %设置3级节标题格式 % \begin{macrocode} \CTEXsetup[ aftername={~}, beforeskip={6bp}, afterskip={6bp plus 1.2bp minus 1.2bp}, format={\heiti\zihao{-4}\flushleft}]{subsubsection} % \end{macrocode} % \subsection{摘要设置} %调用ifthen宏包,可提供|\ifthenelse|判断命令。 % \begin{environment}{Cabstract} %定义中文摘要环境 % \begin{macrocode} \newenvironment{Cabstract}[5]{ % \end{macrocode} % \begin{macro}{\@ckeywords} %定义生成中文关键词的命令。如果关键词少于3个则用“必选关键词”五个字补上,以提示作者关键词不够。同时自动加入正确的中文逗号。 % \begin{macrocode} \newcommand{\@ckeywords}{ \ifthenelse{\equal{#1}{}}{必选关键词}{#1} \ifthenelse{\equal{#2}{}}{必选关键词}{,#2} \ifthenelse{\equal{#3}{}}{必选关键词}{,#3} \ifthenelse{\equal{#4}{}}{}{,#4} \ifthenelse{\equal{#5}{}}{}{,#5} } % \end{macrocode} % \end{macro} % \begin{macrocode} \chapter*{摘要}%插入不带章号的摘要 } {\\[3mm]%摘要后换行空出3mm {\heiti 关键词:}\@ckeywords%插入关键词 } % \end{macrocode} % \end{environment} % \begin{environment}{Eabstract} %定义英文摘要环境 % \begin{macrocode} \newenvironment{Eabstract}[5]{ % \end{macrocode} % \begin{macro}{\@ckeywords} %定义生成英文关键词的命令。如果关键词少于3个则用“必选关键词”五个字补上,以提示作者关键词不够。同时自动加入正确的英文逗号。 % \begin{macrocode} \newcommand{\@ekeywords}{ \ifthenelse{\equal{#1}{}}{必选关键词}{#1} \ifthenelse{\equal{#2}{}}{必选关键词}{,#2} \ifthenelse{\equal{#3}{}}{必选关键词}{,#3} \ifthenelse{\equal{#4}{}}{}{,#4} \ifthenelse{\equal{#5}{}}{}{,#5} } % \end{macrocode} % \end{macro} % \begin{macrocode} \Eabstractmatter%设置英文摘要版式 \chapter*{ABSTRACT}%插入不带章号的ABSTRACT } {\\[3mm]%摘要后换行空出3mm {\heiti Keywords:}\@ekeywords%插入关键词 } % \end{macrocode} % \end{environment} % \subsection{目录设置} %设置目录标题 % \begin{macrocode} \CTEXoptions[contentsname={\protect\songti\protect\zihao{-2}目\enspace 录}] % \end{macrocode} % %设置目录的显示深度到3级节标题。 % \begin{macrocode} \setcounter{tocdepth}{3} % \end{macrocode} % %目录中连接页码的点的密度 % \begin{macrocode} \def\@dotsep{2} % \end{macrocode} % %目录中的章标题改为黑体 % \begin{macrocode} \def\l@chapter#1#2{\ifnum 0>\c@tocdepth \else \vskip \z@ \@plus .2\p@ {\leftskip 0em\relax \rightskip \@tocrmarg \parfillskip -\rightskip \parindent 0em\relax \@afterindenttrue \interlinepenalty \@M \leavevmode \@tempdima 1em\relax \advance \leftskip \@tempdima \null \nobreak \hskip -\leftskip {\heiti #1}\nobreak \leaders \hbox {$\m@th \mkern \@dotsep mu\hbox {.}\mkern \@dotsep mu$}\hfill \nobreak \hb@xt@ \@pnumwidth {\hfil \normalfont \normalcolor #2}\par }\fi} % \end{macrocode} % %设置四级标题在目录中的左缩进分别为0、2、4、6个英文字符宽。序号到题目间隔1个英文字符宽。 % \begin{macrocode} \renewcommand*\l@section{\@dottedtocline{1}{2em}{1em}} \renewcommand*\l@subsection{\@dottedtocline{2}{4em}{1em}} \renewcommand*\l@subsubsection{\@dottedtocline{3}{6em}{1em}} % \end{macrocode} % \subsection{数学式设置} %amsmath和kmath宏包提供更美观的数学字体。 % \begin{macrocode} \RequirePackage{amsmath,kmath} % \end{macrocode} % %使公式编号数字间加一个短横线。例如(1-1)。 % \begin{macrocode} \renewcommand{\theequation}{\arabic{chapter}\textendash\arabic{equation}} % \end{macrocode} % %调用定理设置宏包 % \begin{macrocode} \RequirePackage{ntheorem} \theorembodyfont{\normalfont}%字体 \theoremseparator{\quad}%分隔符是一个空格 % \end{macrocode} % %定义四种带标号的定理环境 % \begin{macrocode} \newtheorem{dingyi}{定义}[section] \newtheorem{gongli}{公理}[section] \newtheorem{dingli}{定理}[section] \newtheorem{yinli}{引理}[section] % \end{macrocode} % %定义一种不带标号的证明环境。 % \begin{macrocode} \theoremstyle{nonumberplain} \newtheorem{zhengming}{证明} % \end{macrocode} % \subsection{参考文献设置} % 根据是否为研究生学位,选择是否载入multibib宏包。 % \begin{macrocode} \RequirePackage[numbers,sort&compress]{natbib} \RequirePackage{hypernat} %参考文献宏包。调用natbib和hypernat这两个宏包和选择的选项是GBT7714-2005NLang.bst的说明中指定的。 \newcommand{\citeup}[1]{\textsuperscript{\cite{#1}}} %自定义命令:插入右上角角标形式的参考文献引用。 % \end{macrocode} %为了在硕士和博士论文加入攻读期间发表的论文一章,必须使用multibib宏包。 % \begin{macrocode} \ifblank{\multibibflag@uestcthesis}{}{ \RequirePackage[resetlabels]{multibib} \newcites{publications}{NULL} \bibliographystylepublications{GBT7714-2005NLang-UESTC} \nocitepublications{*} % \end{macrocode} %重定义|\bibliographypublications|,去掉|\bibliographypublications|命令中原有的 %修改章名的设置,因为|\newcites|命令设置章名时不支持中文。这个设置改由 %|\CTEXoptions[ bibname={\publicationsname@degree}]|代替。 % \begin{macrocode} \def\bibliographypublications#1{\let \temp@auxout \@auxout \let \addtocontents \mb@addtocontents \let \@auxout \@auxoutpublications \let \jobname \@auxoutpublicationsname \bibliography {#1}} } % \end{macrocode} % \subsection{PDF文件相关设置} % 设置pdf文件中的超链接和书签 % \begin{macrocode} \RequirePackage{cmap}%pdflatex编译时,可以生成可复制、粘贴的中文PDF文档 \RequirePackage[pdftex,unicode, bookmarksnumbered=true, bookmarksopen=true, colorlinks=false, pdfborder={0 0 1}, citecolor=blue, linkcolor=red, anchorcolor=green, urlcolor=blue, breaklinks=true ]{hyperref} % \end{macrocode} % \subsection{其他设置} % 根据hyperref的文档:应该先调用hyperref,后调用subfigure,以解决兼容性问题。 % \begin{macrocode} \RequirePackage[small]{subfigure} % \end{macrocode} % %枚举环境宏包 % \begin{macrocode} \RequirePackage{enumerate} % \end{macrocode} % % \subsection{主要符号表设置} %设置术语表宏包供主要符号表使用 % \begin{macrocode} \RequirePackage[header,cols=3,hyper=true]{glossary} \makeglossary \renewcommand{\glossaryname}{主要符号表} \renewcommand{\entryname}{符号或术语} \renewcommand{\descriptionname}{说明} \renewcommand{\glspageheader}{页码} % \end{macrocode} % \begin{macro}{\ifusingglossary} %设置一个变量用以判断是否使用主要符号表 % \begin{macrocode} \newcommand{\ifusingglossary}{} % \end{macrocode} % \end{macro} % \begin{macro}{\fuhao} %包装向主要符号表中插入条目的命令 % \begin{macrocode} \newcommand{\fuhao}[3]{ \glossary{name={#1},description={#2},sort=#3} \renewcommand{\ifusingglossary}{true}%设置使用主要符号表 } % \end{macrocode} % \end{macro} % \subsection{自动添加论文的必选结构} % \begin{macrocode} % !Mode:: "TeX:UTF-8" \AtBeginDocument{%插入到论文内容的最前面。 \begin{CJK}{UTF8}{rm}%中文支持环境,此处内容不受ctexbook文类影响,所以必须手动加这个环境。 \input{contents/titlepage.tex}%导入封面信息 \maketitle%生成并插入封面 \Cabstractmatter%设置中文摘要版式 \include{contents/Cabstract}%插入中文摘要 \Eabstractmatter%设置英文摘要版式 \include{contents/Eabstract}%插入英文摘要 \tocmatter%目录版式 \tableofcontents%插入目录 \ifblank{\ifusingglossary}{}{%如果没有使用过\fuhao命令,则不插入主要符号表 %此处遇到问题:目录之后到正文之前如果加入章节,这些章节的版式不受传统版式设置控制。估计是BUG。此处耗时6小时20分钟,终于找到了修正方案。 \glossarymatterfancy%设置主要符号表版式。 \printglossary%插入主要符号表 \mainmatter%修正主要符号表版式,这里是受目录版式的影响,必须在此加入\mainmatter。 }% \end{CJK} \mainmatter%正文区版式 \makeatletter \newcmds@uestcthesis%自定义图表命令,这些命令必须在document环境里声明才能在正文中使用,所以只能放在这里了。 \makeatother } \AtEndDocument{%插入到论文内容最后面。 \begin{CJK}{UTF8}{rm} \chapter*{致\enspace 谢}%用带星号的章命令插入不带章号的致谢。 \markboth{致\enspace 谢}{}%页眉设置 \phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。 \addcontentsline{toc}{chapter}{致\enspace 谢}%将致谢编入目录 \input{contents/acknowledgements.tex}%插入致谢内容 \newpage \bibliographystyle{GBT7714-2005NLang-UESTC} %载入参考文献样式文件GBT7714-2005NLang-UESTC.bst。此参考文献样式只在GBT7714-2005NLang.bst的基础上改变了参考文献条目的行距,以符合电子科技大学的要求。修改处位于GBT7714-2005NLang-UESTC.bst文件的3542行。另外将英文作者名由全大写改为首字母大写。 \phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。 \addcontentsline{toc}{chapter}{参考文献}%将参考文献编入目录 \nocite{*}%若将此命令屏蔽掉,则未引用的文献不会出现在文后的参考文献列表中。 {\zihao{5} \bibliography{contents/reference}%插入参考文献 } \appendix%附录版式 \renewcommand{\chaptermark}[1]{\markboth{附录~\Alph{chapter}~\quad #1 }{}}%附录页眉设置 \input{contents/appendix.tex}%插入附录内容 \clearpage \ifdefstring{\degree@uestcthesis}{bachelor}{ \renewcommand{\chaptermark}[1]{\markboth{外文资料原文}{}} \def\leftmark{外文资料原文} \include{contents/original} \renewcommand{\chaptermark}[1]{\markboth{外文资料译文}{}} \def\leftmark{外文资料译文} \include{contents/translation} }{ \IfFileExists{contents/publications.bib}{%如果删除了publications.bib,则不显示这一章 \CTEXoptions[ bibname={\publicationsname@degree}]%设置攻博/硕期间发表的论文章题目 \phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。 \addcontentsline{toc}{chapter}{\publicationsname@degree}%将攻博/硕期间发表的论文编入目录 {\zihao{5} \bibliographypublications{contents/publications}%插入攻博/硕期间发表的论文 }}{}} \clearpage\end{CJK}} % \end{macrocode} % \StopEventually{\PrintChanges\PrintIndex} \endinput