summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/uestcthesis/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/uestcthesis/source')
-rw-r--r--Master/texmf-dist/doc/latex/uestcthesis/source/rvdtx.sty349
-rw-r--r--Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.dtx165
-rw-r--r--Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.ins144
3 files changed, 539 insertions, 119 deletions
diff --git a/Master/texmf-dist/doc/latex/uestcthesis/source/rvdtx.sty b/Master/texmf-dist/doc/latex/uestcthesis/source/rvdtx.sty
new file mode 100644
index 00000000000..3f6d0ac09a9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/uestcthesis/source/rvdtx.sty
@@ -0,0 +1,349 @@
+%
+%
+% File: rvdtx.sty
+%
+% Auxiliary package to format *.dtx documents.
+%
+% Copyright (c) 2008, CV Radhakrishnan <cvr@river-valley.org>,
+%
+% This file may be distributed and/or modified under the conditions
+% of the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX
+% version 1999/12/01 or later.
+%
+%
+\newcounter{colorscheme}
+
+\DeclareOption{green}{\setcounter{colorscheme}{1}}
+\DeclareOption{orange}{\setcounter{colorscheme}{0}}
+\ProcessOptions
+
+\RequirePackage[dvipsnames,svgnames]{xcolor}
+
+\ifcase\thecolorscheme
+%
+% Orange color spec (default)
+%
+ \colorlet{itemcolor}{brown}
+ \colorlet{verbcolor}{Sepia}
+ \colorlet{botrulecolor}{orange!25}
+ \colorlet{botbgcolor}{orange!15}
+ \colorlet{botcolor}{orange!80}
+ \colorlet{pgrulecolor}{orange}
+ \colorlet{pgbgcolor}{white}
+
+ \colorlet{quicklinkrulecolor}{orange!40}
+ \colorlet{quicklinkcolor}{brown}
+ \colorlet{topverticalrule}{brown}
+ \colorlet{titlecolor}{brown}
+ \colorlet{hlinkcolor}{brown}
+ \colorlet{hlinktricolor}{orange!70}
+ \colorlet{linkcolor}{brown}
+ \colorlet{urlcolor}{brown}
+
+ \colorlet{arrayrulecolor}{olive!30}
+ \colorlet{seccolor}{brown}
+
+ \colorlet{toprulecolor}{orange!30}
+ \colorlet{topbgcolor}{orange!10}
+ \colorlet{topcolor}{brown!80}
+%
+%
+\or% Green color specs
+%
+%
+ \colorlet{itemcolor}{OliveGreen}
+ \colorlet{verbcolor}{OliveGreen}
+ \colorlet{botrulecolor}{GreenYellow!25}
+ \colorlet{botbgcolor}{GreenYellow!30}
+ \colorlet{botcolor}{Green!80}
+ \colorlet{pgrulecolor}{GreenYellow}
+ \colorlet{pgbgcolor}{white}
+
+ \colorlet{quicklinkrulecolor}{Green!40}
+ \colorlet{quicklinkcolor}{Green}
+ \colorlet{topverticalrule}{Green}
+ \colorlet{titlecolor}{DarkOliveGreen}
+ \colorlet{hlinkcolor}{DarkOliveGreen}
+ \colorlet{hlinktricolor}{Green!70}
+ \colorlet{linkcolor}{OliveGreen}
+ \colorlet{urlcolor}{OliveGreen}
+
+ \colorlet{arrayrulecolor}{olive!30}
+ \colorlet{seccolor}{OliveGreen}
+
+ \colorlet{toprulecolor}{GreenYellow!50}
+ \colorlet{topbgcolor}{GreenYellow!20}
+ \colorlet{topcolor}{GreenYellow!80}
+\fi
+
+\def\floatpagefraction{.99}
+\usepackage{geometry}
+\geometry{top=2in,
+ bottom=1in,
+ left=2in,
+ right=1in,
+ a4paper}
+
+\RequirePackage{comment,xspace}
+\def\xml{\textsc{xml}\xspace}
+\def\pdf{\textsc{pdf}\xspace}
+\def\pdfa{\textsc{pdf/a-1}b\xspace}
+\def\pdfx{\textsc{pdf/x-1}a\xspace}
+\def\xmp{\textsc{xmp}\xspace}
+\def\pdftex{\textsc{pdf\TeX}\xspace}
+\def\defmacro#1{\texttt{\@bsl#1}}
+\def\thanh{H\`an Th\^e Th\`anh\xspace}
+
+\let\@DRAFTout@Hook\@empty
+\newcommand{\DRAFTout}{\g@addto@macro\@DRAFTout@Hook}
+\newcommand{\@DRAFTout@Out}{%
+ \afterassignment\@DRAFTout@Test
+ \global\setbox\@cclv= %
+ }
+\newcommand{\@DRAFTout@Test}{%
+ \ifvoid\@cclv\relax
+ \aftergroup\@DRAFTout@Output
+ \else
+ \@DRAFTout@Output
+ \fi%
+ }
+\newcommand{\@DRAFTout@Output}{%
+ \@DRAFTout@Hook%
+ \@DRAFTout@Org@Out\box\@cclv%
+ }
+\newcommand{\@DRAFTout@Org@Out}{}
+\newcommand*{\@DRAFTout@Init}{%
+ \let\@DRAFTout@Org@Out\shipout
+ \let\shipout\@DRAFTout@Out
+ }
+\newdimen\OHeight
+\setlength\OHeight{\textheight}
+\addtolength\OHeight{\headheight}
+\addtolength\OHeight{\headsep}
+\addtolength\OHeight{\footskip}
+
+\newif\ifoverlay\overlayfalse
+
+\AtBeginDocument{\@DRAFTout@Init}
+\newcommand{\@DraftOverlay@Hook}{}
+\newcommand{\AddToDraftOverlay}{\g@addto@macro\@DraftOverlay@Hook}
+\newcommand{\ClearDraftOverlay}{\let\@DraftOverlay@Hook\@empty}
+\newcommand{\@DraftOverlay}{%
+ \ifx\@DraftOverlay@Hook\@empty
+ \else
+ \bgroup
+ \@tempdima=1in
+ \@tempcnta=\@tempdima
+ \@tempcntb=-\@tempdima
+ \advance\@tempcntb\paperheight
+ \ifoverlay
+ \global\setbox\@cclv\vbox{%
+ \box\@cclv
+ \vbox{\let\protect\relax%
+ \unitlength=1pt%
+ \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)%
+ \@DraftOverlay@Hook%
+ \endpicture}}%
+ \else
+ \global\setbox\@cclv\vbox{%
+ \vbox{\let\protect\relax%
+ \unitlength=1sp%
+ \pictur@(0,0)(\@tempcnta,\@tempcntb)%
+ \@DraftOverlay@Hook%
+ \endpicture}%
+ \box\@cclv}%
+ \fi
+ \egroup
+ \fi
+}
+
+\definecolor{gray30}{gray}{.7}
+\definecolor{gray20}{gray}{.8}
+\definecolor{gray10}{gray}{.9}
+
+\DRAFTout{\@DraftOverlay}
+\long\def\puttext(#1)#2{\AddToDraftOverlay{%
+ \setlength{\unitlength}{1pt}\thinlines%
+ \put(#1){#2}}}
+
+\MakeShortVerb{\|}
+
+\IfFileExists{charter.sty}{\RequirePackage{charter}}{}
+\IfFileExists{lfr.sty}{\RequirePackage[scaled=.9]{lfr}}{}
+\IfFileExists{prima.sty}{\RequirePackage[scaled=.8]{prima}}{}
+
+\def\theCodelineNo{\reset@font\tiny\arabic{CodelineNo}}
+
+\def\@seccntformat#1{\llap{\csname the#1\endcsname.\hspace*{6pt}}}
+\def\section{\@startsection {section}{1}{\z@}%
+ {-3.5ex \@plus -1ex \@minus -.2ex}%
+ {2.3ex \@plus.2ex}%
+ {\normalfont\large\bfseries\color{seccolor}}}
+\def\subsection{\@startsection{subsection}{2}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\normalsize\bfseries\color{seccolor}}}
+\def\subsubsection{\@startsection{subsubsection}{3}{\z@}%
+ {-3.25ex\@plus -1ex \@minus -.2ex}%
+ {1.5ex \@plus .2ex}%
+ {\normalfont\normalsize\bfseries\color{seccolor}}}
+
+%\RequirePackage[draft]{pdfdraftcopy}
+% \draftstring{}
+ \puttext(0,36){\botstring}%
+ \puttext(0,840){\copy\topbox}
+
+\RequirePackage{colortbl}
+\arrayrulecolor{arrayrulecolor}
+\let\shline\hline
+\def\hline{\noalign{\vskip3pt}\shline\noalign{\vskip4pt}}
+
+\RequirePackage[pdftex,colorlinks]{hyperref}
+\def\Hlink#1#2{\hyperlink{#2}{\color{hlinktricolor}%
+ $\blacktriangleright$~\color{hlinkcolor}#1}}
+ \def\@linkcolor{linkcolor}
+ \def\@urlcolor{urlcolor}
+
+\pagestyle{empty}
+\def\version#1{\gdef\@version{#1}}
+\def\@version{\fileversion}
+\def\contact#1{\gdef\@contact{\texttt{#1}}}
+\def\author#1{\gdef\@author{#1}}
+\def\@author{River Valley Technologies}
+\def\@contact{\texttt{shifujun@foxmail.com}}
+\def\keywords#1{\gdef\@keywords{#1}}
+\def\@keywords{\LaTeX, \xml}
+
+\long\def\Hrule{\\[-4pt]\hspace*{-3em}%
+ {\color{quicklinkrulecolor}\rule{\linewidth}{.1pt}}\\}
+
+\long\def\dtxmark[#1][#2]#3#4#5{\def\next{#1}%
+ \ifcase\next\or\Hlink{#4}{#3}\Hrule \fi}
+
+\newbox\topbox
+\long\def\maketitle{\global\setbox\topbox=\vbox{\hsize=\paperwidth
+ \parindent=0pt
+ \fcolorbox{toprulecolor}{topbgcolor}%
+ {\parbox[t][1.5in][c]{\paperwidth}%
+ {\hspace*{15mm}%
+ \parbox[c]{.35\paperwidth}{\fontsize{18pt}{20pt}%
+ \raggedright\normalfont\sffamily \selectfont
+ \color{titlecolor} \@title\\[6pt]
+ {\normalsize\rmfamily\scshape\@author}}%
+% {\footnotesize\textsc{keywords:} \@keywords}}%
+ \hfill
+ \parbox[c][1.5in][c]{1mm}{\color{topverticalrule}%
+ \rule{.1pt}{1.5in}}%
+ \hfill
+ \parbox[c][1.5in][c]{.35\paperwidth}%
+ {\normalfont\footnotesize\sffamily\color{quicklinkcolor}%
+ \vspace*{6pt} QUICK LINKS\Hrule
+ \IfFileExists{tmp.out}{\input tmp.out}{}%
+ }\hspace*{5mm}%
+ }%
+ }%
+ }%
+}
+\gdef\botstring{\fcolorbox{botrulecolor}{botbgcolor}%
+ {\parbox[t][.5in][t]{\paperwidth}%
+ {\normalfont\sffamily\footnotesize%
+ \color{botcolor}%
+ \hspace*{5mm}\parbox[c][.5in][c]{.45\paperwidth}%
+ {\raggedright项目主页:
+ \href{https://github.com/shifujun/UESTCthesis}{%
+ \texttt{https://github.com/shifujun/UESTCthesis}}\\
+ 获得最新的模板、反馈问题均请访问项目主页!
+ }\hfill%
+ \parbox[c][.5in][c]{1cm}
+ {\centering\sffamily\mdseries
+ \fcolorbox{pgrulecolor}{pgbgcolor}{\thepage}%
+ }\hfill
+ \parbox[c][.5in][c]{.45\paperwidth}
+ {\raggedleft\begin{tabular}{rl}%
+ 版本:&\@version\\
+ 日期:&\@date\\
+ 联系方式:&\@contact
+ \end{tabular}\hspace*{5mm}%
+ }%
+ }%
+ }%
+ }
+
+\RequirePackage{enumitem,amsfonts,amssymb}
+
+\setitemize[1]{label={\small\color{itemcolor}$\blacktriangleright$},itemsep=0pt}
+\setitemize[2]{label={\small\color{itemcolor}$\triangleright$},itemsep=0pt}
+\setenumerate[1]{label={\small\color{itemcolor}\arabic*.},itemsep=0pt}
+
+\def\MacroFont{\fontencoding\encodingdefault
+ \fontfamily\ttdefault
+ \fontseries\mddefault
+ \fontshape\updefault
+ \color{verbcolor}\small}%
+
+\def\verbatim@font{\normalfont\color{verbcolor}\ttfamily}
+
+\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \verb@eol@error \let\do\@makeother \dospecials
+ \verbatim@font\@noligs
+ \@ifstar\@sverb\@verb}
+
+
+\def\@lbr{\expandafter\@gobble\string\{}
+\def\@rbr{\expandafter\@gobble\string\}}
+\def\@bsl{\expandafter\@gobble\string\\}
+\def\@Bsl#1{\texttt{\@bsl#1}\xspace}
+\def\trics#1{\protect\@Bsl{#1}}
+\def\onecs#1{\protect\@Bsl{#1}}
+%\let\trics\onecs
+
+\c@GlossaryColumns=1
+\c@IndexColumns=2
+
+\def\index@prologue{\section{Index}%
+ \markboth{Index}{Index}%
+ Numbers written in italic refer to the page
+ where the corresponding entry is described;
+ numbers underlined refer to the
+ \ifcodeline@index
+ code line of the
+ \fi
+ definition; numbers in roman refer to the
+ \ifcodeline@index
+ code lines
+ \else
+ pages
+ \fi
+ where the entry is used.
+ }
+\def\glossary@prologue{}
+\renewenvironment{theglossary}{%
+ \glossary@prologue%][\GlossaryMin]%
+ \GlossaryParms \let\item\@idxitem \ignorespaces}%
+ {}
+
+\newenvironment{decl}[1][]%
+ {\par\small\addvspace{1.5ex plus 1ex}%
+ \vskip -\parskip
+ \ifx\relax#1\relax
+ \def\@decl@date{}%
+ \else
+ \def\@decl@date{\NEWfeature{#1}}%
+ \fi
+ \noindent%\hspace{-\leftmargini}%
+ \begin{tabular}{l}\hline\ignorespaces}%
+ {\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak
+ \vspace{0.75ex}\vskip -\parskip\ignorespacesafterend\noindent}
+
+\endinput
+
+%%
+%% End of file 'rvdtx.sty'
+%%
diff --git a/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.dtx b/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.dtx
index 749d5f0578e..c0218ebadb0 100644
--- a/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.dtx
+++ b/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.dtx
@@ -30,26 +30,16 @@
%<class>\NeedsTeXFormat{LaTeX2e}[2011/06/27]
%<class>\ProvidesClass{uestcthesis}
%<*class>
- [2013/05/14 v0.4.2 UESTC thesis class]
+ [2013/05/23 v0.4.4 UESTC thesis class]
%</class>
%<*driver>
\documentclass{ltxdoc}
\usepackage[hyperref,UTF8]{ctex}
\usepackage{cmap}
-\usepackage[pdftex,unicode,
- bookmarksnumbered=true,
- bookmarksopen=true,
- colorlinks=false,
- pdfborder={0 0 1},
- citecolor=blue,
- linkcolor=red,
- anchorcolor=green,
- urlcolor=blue,
- breaklinks=true
- ]{hyperref}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
+\usepackage{rvdtx}
\begin{document}
\DocInput{uestcthesis.dtx}
\end{document}
@@ -90,7 +80,6 @@
% \fi
% \section{文类源代码}
% \changes{v0.21}{2013/01/22}{将模板重构为DocStrip格式}
-%
% \subsection{中文支持}
%继承ctexbook文类,并调用了如下功能的选项:\par
%cs4size:使用小四字号为缺省字体大小。\par
@@ -104,12 +93,12 @@
%fntef:为CJKfntef 宏包和CCTfntef 宏包提供统一接口。
%该选项将使得CJKfntef 宏包或者CCTfntef 宏包被自动调用。这两个宏包是下划线宏包。
% \begin{macrocode}
-\LoadClass[cs4size,UTF8,fancyhdr,hyperref,fntef,openany]{ctexbook}
+\LoadClass[cs4size,UTF8,fancyhdr,hyperref,fntef,openany]{ctexbook}[2011/03/11]
% \end{macrocode}
%
%调用etoolbox宏包,为了使用其提供的|\ifblank|命令。
% \begin{macrocode}
-\RequirePackage{etoolbox}
+\RequirePackage{etoolbox}[2011/01/03]
% \end{macrocode}
%
%调用ifthen宏包,为了使用其提供的|\ifthenelse|命令。
@@ -133,6 +122,9 @@
\newcommand{\thesisname@degree}{电子科技大学学士学位论文}
%论文全名
+
+\newcommand{\chapternumberformat@uestcthesis}{\arabic{chapter}}
+%为了根据学位不同而设置不同的章标题序号方式而定义的命令。此处设置为本科论文章标题用阿拉伯数字序号。
}
% \end{macrocode}
% \end{macro}
@@ -159,6 +151,8 @@
\newcommand{\publicationsname@english}{Research Results Obtained During the Study for Master Degree}
\newcommand{\thesisname@english}{Master Thesis of University of Electronic Science and Technology of China}
+\newcommand{\chapternumberformat@uestcthesis}{\chinese{chapter}}
+%为了根据学位不同而设置不同的章标题序号方式而定义的命令。此处设置为本科论文章标题用汉字数字序号。
}
% \end{macrocode}
% \end{macro}
@@ -185,20 +179,23 @@
\newcommand{\publicationsname@english}{Research Results Obtained During the Study for Doctor Degree}
\newcommand{\thesisname@english}{Doctor Thesis of University of Electronic Science and Technology of China}
+\newcommand{\chapternumberformat@uestcthesis}{\chinese{chapter}}
+%为了根据学位不同而设置不同的章标题序号方式而定义的命令。此处设置为本科论文章标题用汉字数字序号。
}
% \end{macrocode}
% \end{macro}
-%\changes{v0.4}{添加english选项以便将预定名修改为英文}
-%一些名称的定义统一在这里,以便在英文选项中替换成英文。
+%\changes{v0.4}{2013/04/04}{添加english选项以便将预定名修改为英文}
+%\changes{v0.4.4}{2013/05/25}{由于2013年本科管理规范中未将章标题改为和硕博一致的汉字序号,所以在此将本科论文中的章标题单独改为阿拉伯数字序号。}
+%一些名称的定义统一在这里,以便在英文选项中替换成英文。同时还有设置章标题序号的显示方式。
% \begin{macrocode}
\newcommand{\tocname@uestcthesis}{\zihao{5}目\enspace 录}
\newcommand{\chaptername@uestcthesis}{
\CTEXsetup[ name={第,章},
- number={\chinese{chapter}}
+ number={\chapternumberformat@uestcthesis}
]{chapter}
}
\newcommand{\chaptermarkfix@uestcthesis}{
-\renewcommand{\chaptermark}[1]{\markboth{第\chinese{chapter}章~##1 }{}}
+\renewcommand{\chaptermark}[1]{\markboth{第\chapternumberformat@uestcthesis章~##1 }{}}
}
\newcommand{\acknowledgementsname@uestcthesis}{致\enspace 谢}
\newcommand{\glossaryname@uestcthesis}{主要符号表}
@@ -259,9 +256,15 @@
%
%按照学校要求需要设置默认行距为20磅。参数是倍数值,没有单位。这个值是通过
%|\showthe\baselineskip|命令查看当前的行距,然后计算得到的。
+%\changes{v0.4.4}{2013/05/25}{修正可能会出现的超大段距问题,这是由于默认设置要求每页底部文字对齐,所以拉抻所有弹性间距。现取消这个设置,并加大一个不太明显的弹性段距。}
% \begin{macrocode}
\linespread{1.391}
% \end{macrocode}
+%设置不要求每页底部文字对齐,并设置一个管理规范中没有的弹性额外段距。这使得换页位置会更美观,而段距不明显。段距为最大10磅,仅为行距一半,最小可以压缩1磅。
+% \begin{macrocode}
+\parskip=0bp plus 10bp minus 1bp
+\raggedbottom
+% \end{macrocode}
% \subsection{图表设置}
%调用宏包:
%graphicx插图宏包\\
@@ -387,9 +390,11 @@
% \end{macro}
% \begin{macro}{\threelinetable}
%|\threelinetable|命令生成一个独占一行、居中的三线表格。标题前后间距符合科大毕设标准。
+%\changes{v0.4.4}{2013/05/24}{修正表格字号为五号字。}
% \begin{macrocode}
\newcommand{\threelinetable}[8][htbp]{
\begin{table}[##1]
+\zihao{5}%管理规范中要求表格中文字为五号字。
\centering
\begin{threeparttable}
\caption{##5}
@@ -416,6 +421,7 @@
% \begin{macrocode}
\newcommand{\longthreelinetable}[6]{
{
+\zihao{5}%管理规范中要求表格中文字为五号字。
\centering
\begin{longtable}{##4}
\caption{##2}\label{##1}\\
@@ -756,9 +762,12 @@
% \end{macro}
% \begin{macro}{\uestclogo}
%插入学校LOGO的命令
+%\changes{v0.4.1}{2013/05/04}{将学校的LOGO集成在cls文件里。}
% \begin{macrocode}
-%\changes{v0.4.1}{将学校的LOGO集成在cls文件里。}
\begin{filecontents*}{logo.tex}
+% \end{macrocode}
+% logo文件内容不显示在文档中。
+% \iffalse
\documentclass[pstricks=true]{standalone}
\usepackage{pstricks}
@@ -3110,11 +3119,13 @@
\end{pspicture}
\end{document}
-
+% \fi
+%\changes{v0.4.2}{2013/05/14}{针对默认编译器不能使用write18命令的情况,在不能正常显示logo时显示一段说明文字。}
+% \begin{macrocode}
\end{filecontents*}
+
\immediate\write18{latex logo}%
\immediate\write18{dvips logo}%
-%\changes{v0.4.2}{针对默认编译器不能使用write18命令的情况,在不能正常显示logo时显示一段说明文字。}
\IfFileExists{logo.dvi}{
\immediate\write18{ps2pdf logo.ps}%
}{}
@@ -3432,13 +3443,14 @@
% \end{macrocode}
% \begin{macro}{\@ckeywords}
%定义生成中文关键词的命令。如果关键词少于3个则用“必选关键词”五个字补上,以提示作者关键词不够。同时自动加入正确的中文逗号。
+%\changes{v0.4.4}{2013/05/23}{修正bug:\@ckeywords命令和\@ekeywords命令中的每行结束应加一个\%符号,否则直接换行相当于加入了一个不该有的空格。}
% \begin{macrocode}
\newcommand{\@ckeywords}{
-\ifthenelse{\equal{#1}{}}{必选关键词}{#1}
-\ifthenelse{\equal{#2}{}}{必选关键词}{,#2}
-\ifthenelse{\equal{#3}{}}{必选关键词}{,#3}
-\ifthenelse{\equal{#4}{}}{}{,#4}
-\ifthenelse{\equal{#5}{}}{}{,#5}
+\ifthenelse{\equal{#1}{}}{必选关键词}{#1}%
+\ifthenelse{\equal{#2}{}}{必选关键词}{,#2}%
+\ifthenelse{\equal{#3}{}}{必选关键词}{,#3}%
+\ifthenelse{\equal{#4}{}}{}{,#4}%
+\ifthenelse{\equal{#5}{}}{}{,#5}%
}
\ifthenelse{\equal{#5}{}}{
\ifthenelse{\equal{#4}{}}{
@@ -3469,11 +3481,11 @@ pdfkeywords={\@pdfckeywords}%在pdf元信息中加入关键字
%定义生成英文关键词的命令。如果关键词少于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}
+\ifthenelse{\equal{#1}{}}{必选关键词}{#1}%
+\ifthenelse{\equal{#2}{}}{必选关键词}{, #2}%
+\ifthenelse{\equal{#3}{}}{必选关键词}{, #3}%
+\ifthenelse{\equal{#4}{}}{}{, #4}%
+\ifthenelse{\equal{#5}{}}{}{, #5}%
}
% \end{macrocode}
% \end{macro}
@@ -3513,10 +3525,17 @@ pdfkeywords={\@pdfckeywords}%在pdf元信息中加入关键字
% \end{macrocode}
%
%设置四级标题在目录中的左缩进分别为0、2、4、6个英文字符宽。序号到题目间隔1个英文字符宽。
+%\changes{v0.4.3}{2013/05/20}{由于我的疏忽,本来应将本科规范改为和硕博一致分别缩进0,2,4,6个全角字符,但2013年的规范中写成了半角字符。这里只好先针对本科论文修改过来。}
% \begin{macrocode}
+\ifdefstring{\degree@uestcthesis}{bachelor}{
+\renewcommand*\l@section{\@dottedtocline{1}{1em}{1em}}
+\renewcommand*\l@subsection{\@dottedtocline{2}{2em}{1em}}
+\renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{1em}}
+}{
\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宏包提供更美观的数学字体。
@@ -3530,8 +3549,8 @@ pdfkeywords={\@pdfckeywords}%在pdf元信息中加入关键字
% \end{macrocode}
%
%调用定理设置宏包
-%\changes{v0.33}{设置定理环境的缩进}
-%\changes{v0.4}{添加设置各定理环境结束符的语句,但暂时还设置为空。}
+%\changes{v0.33}{2013/02/25}{设置定理环境的缩进}
+%\changes{v0.4}{2013/04/04}{添加设置各定理环境结束符的语句,但暂时还设置为空。}
% \begin{macrocode}
\RequirePackage[amsmath,thmmarks]{ntheorem}
\theorembodyfont{\normalfont}%字体
@@ -3626,8 +3645,17 @@ pdfpagelayout={TwoPageRight}
%
%枚举环境宏包,去除所有垂直附加距离。
% \changes{v0.31}{2013/02/21}{去除枚举环境的所有垂直附加距离。}
+% \changes{v0.4.3}{2013/05/20}{修复bug:枚举环境与前后文存在额外间距}
% \begin{macrocode}
\RequirePackage{enumerate}
+%为了修正枚举环境与前后文存在额外间距的问题:重构枚举环境中的\@enum@命令,将其中的\list命令重构,再将\list命令中的\@trivlist命令重构。一切重构都是为了将\@trivlist命令中的第一个\@topsepadd重置为0。
+\newskip\@topsepadd@uestcthesis
+\def\@trivlist@uestcthesis{\if@noskipsec \leavevmode \fi \@topsepadd@uestcthesis \topsep \ifvmode \advance \@topsepadd \partopsep \else \unskip \par \fi \if@inlabel \@noparitemtrue \@noparlisttrue \else \if@newlist \@noitemerr \fi \@noparlistfalse \@topsep \@topsepadd \fi \advance \@topsep \parskip \leftskip \z@skip \rightskip \@rightskip \parfillskip \@flushglue \par@deathcycles \z@ \@setpar {\if@newlist \advance \par@deathcycles \@ne \ifnum \par@deathcycles >\@m \@noitemerr {\@@par }\fi \else {\@@par }\fi }\global \@newlisttrue \@outerparskip \parskip }
+
+\def\list@uestcthesis#1#2{\ifnum \@listdepth >5\relax \@toodeep \else \global \advance \@listdepth \@ne \fi \rightmargin \z@ \listparindent \z@ \itemindent \z@ \csname @list\romannumeral \the \@listdepth \endcsname \def \@itemlabel {#1}\let \makelabel \@mklab \@nmbrlistfalse #2\relax \@trivlist@uestcthesis \parskip \parsep \parindent \listparindent \advance \linewidth -\rightmargin \advance \linewidth -\leftmargin \advance \@totalleftmargin \leftmargin \parshape \@ne \@totalleftmargin \linewidth \ignorespaces }
+
+\def\@enum@{\list@uestcthesis {\csname label\@enumctr \endcsname }{\usecounter {\@enumctr }\def \makelabel ##1{\hss \llap {##1}}}}
+
\def\enumerate{%
\ifnum \@enumdepth >3 \@toodeep\else
\advance\@enumdepth \@ne
@@ -3671,23 +3699,30 @@ pdfpagelayout={TwoPageRight}
% \end{macrocode}
% \end{macro}
% \subsection{自动添加论文的必选结构}
+%\changes{v0.4.3}{2013/05/20}{由于目前(2013年)本科和硕博关于参考文献与致谢顺序的规定不一样,所以在这里区分设置}
+%\changes{v0.4.2}{2013/05/14}{修复只有单页目录时页眉显示主要符号表的问题。}
+%\changes{v0.4.3}{2013/05/20}{修复bug:摘要应从右页开始。前置部分都需要章起右页。}
+%\changes{v0.4.4}{2013/05/23}{本科论文中将外文资料和翻译加入目录中。}
% \begin{macrocode}
% !Mode:: "TeX:UTF-8"
\AtBeginDocument{%插入到论文内容的最前面。
\begin{CJK}{UTF8}{rm}%中文支持环境,此处内容不受ctexbook文类影响,所以必须手动加这个环境。
\maketitle%生成并插入封面
+\clearpage{\pagestyle{empty}\cleardoublepage}
\Cabstractmatter%设置中文摘要版式
\include{contents/Cabstract}%插入中文摘要
+\clearpage{\pagestyle{empty}\cleardoublepage}
\Eabstractmatter%设置英文摘要版式
\include{contents/Eabstract}%插入英文摘要
+\clearpage{\pagestyle{empty}\cleardoublepage}
\tocmatter%目录版式
\tableofcontents%插入目录
-%\changes{v0.4.2}{修复只有单页目录时页眉显示主要符号表的问题。}
-\newpage%目录之后另起一页,这样无论目录后有没有主要符号表,主要符号表的页眉设置命令都会应用到下一页。
+\clearpage{\pagestyle{empty}\cleardoublepage}%目录之后另起一页,这样无论目录后有没有主要符号表,主要符号表的页眉设置命令都会应用到下一页。
%此处遇到问题:目录之后到正文之前如果加入章节,这些章节的版式不受传统版式设置控制。估计是BUG。此处耗时6小时20分钟,终于找到了修正方案。
\glossarymatterfancy%设置主要符号表版式。
\printglossary%插入主要符号表
+\clearpage{\pagestyle{empty}\cleardoublepage}
\mainmatter%修正主要符号表版式,这里是受目录版式的影响,必须在此加入\mainmatter。
\end{CJK}
\mainmatter%正文区版式
@@ -3695,15 +3730,14 @@ pdfpagelayout={TwoPageRight}
\newcmds@uestcthesis%自定义图表命令,这些命令必须在document环境里声明才能在正文中使用,所以只能放在这里了。
\makeatother
}
-
-\AtEndDocument{%插入到论文内容最后面。
-\begin{CJK}{UTF8}{rm}
+\newcommand{\insertacknowledgement}{
\chapter*{\acknowledgementsname@uestcthesis}%用带星号的章命令插入不带章号的致谢。
\markboth{\acknowledgementsname@uestcthesis}{}%页眉设置
\phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。
\addcontentsline{toc}{chapter}{\acknowledgementsname@uestcthesis}%将致谢编入目录
\input{contents/acknowledgements.tex}%插入致谢内容
-\newpage
+}
+\newcommand{\insertreference}{
\bibliographystyle{uestcthesis}
%载入参考文献样式文件uestcthesis.bst。此参考文献样式只在GBT7714-2005NLang.bst的基础上改变了参考文献条目的行距,以符合电子科技大学的要求。修改处位于uestcthesis.bst文件的3542行。另外将英文作者名由全大写改为首字母大写。
\phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。
@@ -3712,6 +3746,19 @@ pdfpagelayout={TwoPageRight}
{\zihao{5}
\bibliography{contents/reference}%插入参考文献
}
+}
+\AtEndDocument{%插入到论文内容最后面。
+\begin{CJK}{UTF8}{rm}
+\ifdefstring{\degree@uestcthesis}{bachelor}{%检测是否为本科论文,调换参考文献与致谢的顺序
+\insertreference
+\newpage
+\insertacknowledgement
+}{
+\insertacknowledgement
+\newpage
+\insertreference
+}
+
\appendix%附录版式
\renewcommand{\chaptermark}[1]{\markboth{\CTEX@appendixname\Alph{chapter}~ #1 }{}}%附录页眉设置
\input{contents/appendix.tex}%插入附录内容
@@ -3719,7 +3766,13 @@ pdfpagelayout={TwoPageRight}
\ifdefstring{\degree@uestcthesis}{bachelor}{
\renewcommand{\chaptermark}[1]{\markboth{外文资料原文}{}}
\def\leftmark{外文资料原文}
+\newpage
+\phantomsection
+\addcontentsline{toc}{chapter}{外文资料原文}
\include{contents/original}
+\newpage
+\phantomsection
+\addcontentsline{toc}{chapter}{外文资料译文}
\renewcommand{\chaptermark}[1]{\markboth{外文资料译文}{}}
\def\leftmark{外文资料译文}
\include{contents/translation}
@@ -3739,14 +3792,16 @@ pdfpagelayout={TwoPageRight}
% \iffalse
%<*bst>
% \fi
-% \section{参考文献样式源代码}
+% \section{参考文献样式}
% \changes{v0.3}{2013/2/12}{修复了参考文献模板bst文件中原有的问题,
% 不再需要其他工具替换bbl中的错误。即参考文献中的“|\\.|”修正为“|\\|”。}
-% \begin{macrocode}
- %本文件基于吴凯制作的GBT7714-2005NLang.bst(1 Beta 2 测试版2012年9月20日)修改而成。
- %根据GBT7714-2005NLang.bst中copyright的要求,将文件名修改成uestcthesis.bst。
- %对吴凯的杰出工作表示感谢!
-
+%\changes{v0.4.4}{2013/05/23}{增加一个参考文献类型,主要用于在攻读期间取得成果
+% 内录入获奖等不符合参考文献规范的内容。}
+%%本文件基于吴凯制作的GBT7714-2005NLang.bst(1 Beta 2 测试版2012年9月20日)修改而成。
+%%根据GBT7714-2005NLang.bst中copyright的要求,将文件名修改成uestcthesis.bst。
+%%对吴凯的杰出工作表示感谢!
+%bst文件内容不在文档中显示。
+% \iffalse
ENTRY
{ address
author
@@ -6583,6 +6638,21 @@ FUNCTION {unpublished}
}
if$
}
+FUNCTION {onlynote} %定义note类型,将note项目单独原文输出,满足自定义任何条目的需求
+{
+newline$
+ "\bibitem[" write$
+ label write$
+ "]{" write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+ new.block
+ note output
+ fin.entry
+}
FUNCTION {default.type} { book } %wk 因为主要是基于book类型,因此将缺省类型由misc改为book
@@ -6945,10 +7015,11 @@ FUNCTION {end.bib}
}
EXECUTE {end.bib}
-% \end{macrocode}
+% \fi
% \iffalse
%</bst>
% \fi
+% \section{更新日志}
% \StopEventually{\PrintChanges}
% \Finale
%
diff --git a/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.ins b/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.ins
index 83f26ad5406..1fbf7fefbeb 100644
--- a/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.ins
+++ b/Master/texmf-dist/doc/latex/uestcthesis/source/uestcthesis.ins
@@ -1,72 +1,72 @@
-% !Mode:: "TeX:UTF-8:INS"
-
-%%% uestcthesis.ins
-%%% Copyright 2012-2013 Shi Fujun <shifujun@foxmail.com>
-%%
-%% 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 <shifujun@foxmail.com>.
-%%
-%% 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.
-\input docstrip.tex
-\keepsilent
-\askforoverwritefalse
-
-\usedir{tex/latex/uestcthesis}
-
-\preamble
-
-This is a generated file.
-
- Copyright 2012-2013 Shi Fujun <shifujun@foxmail.com>
-
- 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 <shifujun@foxmail.com>.
-
- This work consists of the files uestcthesis.dtx, uestcthesis.ins
- and the derived file uestcthesis.cls and uestcthesis.bst.
- Other files in this work's package are belongs to the respective owners.
-
-\endpreamble
-
-\generate{\file{uestcthesis.cls}{\from{uestcthesis.dtx}{class}}}
-\generate{\file{uestcthesis.bst}{\from{uestcthesis.dtx}{bst}}}
-
-\obeyspaces
-\Msg{*************************************************************}
-\Msg{* *}
-\Msg{* To finish the installation you have to move the following *}
-\Msg{* file into a directory searched by TeX: *}
-\Msg{* *}
-\Msg{* uestcthesis.cls uestcthesis.bst UESTC.png UESTC_LOGO.png *}
-\Msg{* UESTC.png and UESTC_LOGO.png should be moved into the same*}
-\Msg{* directory as the uestcthesis.cls. *}
-\Msg{* *}
-\Msg{* To produce the documentation run the file uestcthesis.dtx *}
-\Msg{* through LaTeX. *}
-\Msg{* *}
-\Msg{* Happy TeXing! *}
-\Msg{* *}
-\Msg{*************************************************************}
-
-\endbatchfile
+% !Mode:: "TeX:UTF-8:INS"
+
+%%% uestcthesis.ins
+%%% Copyright 2012-2013 Shi Fujun <shifujun@foxmail.com>
+%%
+%% 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 <shifujun@foxmail.com>.
+%%
+%% 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.
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+
+\usedir{tex/latex/uestcthesis}
+
+\preamble
+
+This is a generated file.
+
+ Copyright 2012-2013 Shi Fujun <shifujun@foxmail.com>
+
+ 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 <shifujun@foxmail.com>.
+
+ This work consists of the files uestcthesis.dtx, uestcthesis.ins
+ and the derived file uestcthesis.cls and uestcthesis.bst.
+ Other files in this work's package are belongs to the respective owners.
+
+\endpreamble
+
+\generate{\file{uestcthesis.cls}{\from{uestcthesis.dtx}{class}}}
+\generate{\file{uestcthesis.bst}{\from{uestcthesis.dtx}{bst}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* uestcthesis.cls uestcthesis.bst UESTC.png UESTC_LOGO.png *}
+\Msg{* UESTC.png and UESTC_LOGO.png should be moved into the same*}
+\Msg{* directory as the uestcthesis.cls. *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file uestcthesis.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile