Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
根据一位同学的格式审查返回意见改进模板。
  • Loading branch information
shifujun committed Apr 9, 2015
1 parent 42aab43 commit 7311680
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 153 deletions.
113 changes: 63 additions & 50 deletions 2013年7月修订的研究生院规范撰写范例/uestcthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@

\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\ProvidesClass{uestcthesis}
[2015/04/08 v1.2.0 UESTC thesis class]
[2015/04/10 v1.2.1 UESTC thesis class]
\LoadClass[cs4size,UTF8,fancyhdr,hyperref,fntef,openany]{ctexbook}[2011/03/11]
\renewcommand\normalsize{%
\@setfontsize\normalsize{\CTEX@fs@sfour}{\CTEX@fs@sfourskip}%
\let\@listi\@listI}%
\RequirePackage{mathptmx}
\DeclareSymbolFont{symbols} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}
Expand Down Expand Up @@ -95,6 +98,7 @@
\renewcommand{\chaptermark}[1]{\markboth{第\chapternumberformat@uestcthesis章~##1 }{}}
}
\newcommand{\acknowledgementsname@uestcthesis}{致\enspace 谢}
\newcommand{\acknowledgementsmarkname@uestcthesis}{致谢}
\newcommand{\glossaryname@uestcthesis}{主要符号表}
\newcommand{\acronymname@uestcthesis}{缩略词表}
\newcommand{\entryname@uestcthesis}{符号}
Expand All @@ -117,6 +121,7 @@
\renewcommand{\chaptermark}[1]{\markboth{Chapter\space\arabic{chapter}~##1 }{}}

\renewcommand{\acknowledgementsname@uestcthesis}{Acknowledgements}
\renewcommand{\acknowledgementsmarkname@uestcthesis}{Acknowledgements}
\renewcommand{\CTEX@bibname}{References}
\renewcommand{\publicationsname@degree}{\publicationsname@english}
\renewcommand{\thesisname@degree}{\thesisname@english}
Expand Down Expand Up @@ -175,11 +180,11 @@
}}
\ProcessOptions\relax
\ifdefstring{\degree@uestcthesis}{bachelor}{
\RequirePackage[a4paper,headheight=12.65pt,headsep=4mm,includeheadfoot,centering,
top=2.75cm,left=3cm]{geometry}
\RequirePackage[a4paper,headheight=12.65pt,headsep=5.65mm,centering,
top=3.64cm,left=3cm]{geometry}
}{
\RequirePackage[a4paper,headheight=12.65pt,headsep=4mm,includeheadfoot,centering,
top=2.08cm,left=3cm]{geometry}
\RequirePackage[a4paper,headheight=12.65pt,headsep=6.4mm,centering,
top=3.14cm,left=3cm]{geometry}
}
\linespread{1.391}
\parskip=0bp plus 10bp minus 1bp
Expand All @@ -192,10 +197,10 @@
\captionsetup[figure]{aboveskip=0bp,belowskip=0bp}
\captionsetup[table]{aboveskip=2mm,belowskip=0bp}
\RequirePackage{booktabs,tabularx,threeparttable,longtable}
\DeclareCaptionFont{capfont}{\zihao{5}}
\DeclareCaptionFont{capfont}{\zihao{5}\baselineskip=20bp{}}
\captionsetup{font=capfont}
\renewcommand{\thefigure}{\arabic{chapter}\textendash\arabic{figure}}
\renewcommand{\thetable}{\arabic{chapter}\textendash\arabic{table}}
\renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}}
\renewcommand{\thetable}{\arabic{chapter}-\arabic{table}}
\graphicspath{{pics/}}
\RequirePackage[below]{placeins}
\RequirePackage{flafter}
Expand Down Expand Up @@ -286,18 +291,18 @@
\ifthenelse{\lengthtest{\ht\tempsubpiccaptionbox > 16pt}}{%THEN
\noindent\caption{\subpiccaption}\label{\subpiclabel}\par%
\noindent\hspace*{\tempsubpiccaptionheadindent}%
\parbox{\textwidth-\tempsubpiccaptionheadindent}{\zihao{5}\allsubpiccaptions}%
\parbox{\textwidth-\tempsubpiccaptionheadindent}{\zihao{5}\baselineskip=20bp{}\allsubpiccaptions}%
}{%ELSE
{\centering\caption{\subpiccaption}\label{\subpiclabel}}\par
\sbox{\tempsubpiccaptionbox}{\zihao{5}\CTEX@figurename~\thefigure~\subpiccaption}%
\sbox{\tempsubpiccaptionbox}{\zihao{5}\baselineskip=20bp{}\CTEX@figurename~\thefigure~\subpiccaption}%
\setlength{\tempsubpiccaptionindent}{\textwidth}%
\addtolength{\tempsubpiccaptionindent}{-\wd\tempsubpiccaptionbox}%
\setlength{\tempsubpiccaptionindent}{.5\tempsubpiccaptionindent}%
\setlength{\tempsubpiccaptionwidth}{\textwidth}%
\addtolength{\tempsubpiccaptionwidth}{-\tempsubpiccaptionindent}%
\addtolength{\tempsubpiccaptionwidth}{-\tempsubpiccaptionheadindent}%
\hspace*{\tempsubpiccaptionindent}\hspace*{\tempsubpiccaptionheadindent}%
\parbox{\tempsubpiccaptionwidth}{\zihao{5}\allsubpiccaptions}%
\parbox[t]{\tempsubpiccaptionwidth}{\zihao{5}\baselineskip=20bp{}\allsubpiccaptions}%
}%
\vspace{12bp}%
\end{figure}%
Expand All @@ -322,18 +327,18 @@
\ifthenelse{\lengthtest{\ht\tempsubpiccaptionbox > 16pt}}{%THEN
\noindent\caption[\subpiclofcaption]{\subpiccaption}\label{\subpiclabel}\par%
\noindent\hspace*{\tempsubpiccaptionheadindent}%
\parbox{\textwidth-\tempsubpiccaptionheadindent}{\zihao{5}\allsubpiccaptions}%
\parbox{\textwidth-\tempsubpiccaptionheadindent}{\zihao{5}\baselineskip=20bp{}\allsubpiccaptions}%
}{%ELSE
{\centering\caption[\subpiclofcaption]{\subpiccaption}\label{\subpiclabel}}\par
\sbox{\tempsubpiccaptionbox}{\zihao{5}\CTEX@figurename~\thefigure~\subpiccaption}%
\sbox{\tempsubpiccaptionbox}{\zihao{5}\baselineskip=20bp{}\CTEX@figurename~\thefigure~\subpiccaption}%
\setlength{\tempsubpiccaptionindent}{\textwidth}%
\addtolength{\tempsubpiccaptionindent}{-\wd\tempsubpiccaptionbox}%
\setlength{\tempsubpiccaptionindent}{.5\tempsubpiccaptionindent}%
\setlength{\tempsubpiccaptionwidth}{\textwidth}%
\addtolength{\tempsubpiccaptionwidth}{-\tempsubpiccaptionindent}%
\addtolength{\tempsubpiccaptionwidth}{-\tempsubpiccaptionheadindent}%
\hspace*{\tempsubpiccaptionindent}\hspace*{\tempsubpiccaptionheadindent}%
\parbox{\tempsubpiccaptionwidth}{\zihao{5}\allsubpiccaptions}%
\parbox[t]{\tempsubpiccaptionwidth}{\zihao{5}\baselineskip=20bp{}\allsubpiccaptions}%
}%
\vspace{12bp}%
\end{figure}%
Expand All @@ -352,7 +357,7 @@
}%
\newcommand{\threelinetable}[8][htbp]{
\begin{table}[##1]
\zihao{5}%管理规范中要求表格中文字为五号字。
\zihao{5}\baselineskip=20bp{}%管理规范中要求表格中文字为五号字。
\centering
\vspace{6.5mm}%
\begin{threeparttable}
Expand All @@ -376,7 +381,7 @@
}
\newcommand{\threelinetableB}[9][htbp]{
\begin{table}[##1]
\zihao{5}%管理规范中要求表格中文字为五号字。
\zihao{5}\baselineskip=20bp{}%管理规范中要求表格中文字为五号字。
\centering
\vspace{6.5mm}%
\begin{threeparttable}
Expand All @@ -400,7 +405,7 @@
}
\newcommand{\longthreelinetable}[6]{
{
\zihao{5}%管理规范中要求表格中文字为五号字。
\zihao{5}\baselineskip=20bp{}%管理规范中要求表格中文字为五号字。
\centering
\vspace{3mm}%
\begin{longtable}{##4}
Expand Down Expand Up @@ -563,57 +568,65 @@
}
\setcounter{secnumdepth}{3}
\chaptername@uestcthesis
\def\@makechapterhead #1{\rule{0pt}{\CTEX@chapter@beforeskip}\par{\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne \if@mainmatter \CTEX@chaptername \fi \fi \interlinepenalty \@M \CTEX@chapter@titleformat #1\par \nobreak \vskip \CTEX@chapter@afterskip }}
\def\@makeschapterhead #1{\rule{0pt}{\CTEX@chapter@beforeskip}\par{\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format \interlinepenalty \@M \CTEX@chapter@titleformat #1\par \nobreak \vskip \CTEX@chapter@afterskip }}
\ifdefstring{\degree@uestcthesis}{bachelor}{
\CTEXsetup[ nameformat={},
numberformat={},
titleformat={},
aftername={~},
beforeskip={2mm},%章标题段前30磅,这里2mm是由于实际效果与MS WORD有差异而微调出的。具体测量的是页眉线到章标题文字上边的距离。
afterskip={30bp plus 6bp minus 6bp},%章标题段后30磅。
format={\heiti\zihao{-3}\centering},
aftername={\enspace},
beforeskip={30bp},
afterskip={30bp plus 6bp minus 6bp},
format={\heiti\zihao{-3}\centering\baselineskip=20bp},
]{chapter}
}{
\CTEXsetup[ nameformat={},
numberformat={},
titleformat={},
aftername={~},
beforeskip={1.8mm},%章标题段前30磅,这里2mm是由于实际效果与MS WORD有差异而微调出的。具体测量的是页眉线到章标题文字上边的距离。
afterskip={18bp plus 3.6bp minus 3.6bp},%章标题段后30磅。
format={\heiti\zihao{-3}\centering},
aftername={\enspace},
beforeskip={16bp},
afterskip={18bp plus 3.6bp minus 3.6bp},
format={\heiti\zihao{-3}\centering\baselineskip=20bp},
]{chapter}
}
\ifdefstring{\degree@uestcthesis}{bachelor}{
\CTEXsetup[ aftername={~},
\CTEXsetup[ aftername={\enspace},
beforeskip={18bp},
afterskip={18bp plus 3.6bp minus 3.6bp},
format={\heiti\zihao{4}\flushleft}]{section}
numberformat={\bf},
format={\heiti\zihao{4}\flushleft\baselineskip=20bp}]{section}
}{
\CTEXsetup[ aftername={~},
beforeskip={0mm},
\CTEXsetup[ aftername={\enspace},
beforeskip={18bp},
afterskip={6bp plus 1.2bp minus 1.2bp},
format={\vspace{1.9mm}\heiti\zihao{4}\flushleft}]{section}
numberformat={\bf},
format={\heiti\zihao{4}\flushleft\baselineskip=20bp}]{section}
}
\ifdefstring{\degree@uestcthesis}{bachelor}{
\CTEXsetup[ aftername={~},
\CTEXsetup[ aftername={\enspace},
beforeskip={12bp},
afterskip={12bp plus 2.4bp minus 2.4bp},
format={\heiti\zihao{4}\flushleft}]{subsection}
numberformat={\bf},
format={\heiti\zihao{4}\flushleft\baselineskip=20bp}]{subsection}
}{
\CTEXsetup[ aftername={~},
beforeskip={0mm},
\CTEXsetup[ aftername={\enspace},
beforeskip={12bp},
afterskip={6bp plus 1.2bp minus 1.2bp},
format={\heiti\zihao{4}\flushleft}]{subsection}
numberformat={\bf},
format={\heiti\zihao{4}\flushleft\baselineskip=20bp}]{subsection}
}
\ifdefstring{\degree@uestcthesis}{bachelor}{
\CTEXsetup[ aftername={~},
\CTEXsetup[ aftername={\enspace},
beforeskip={6bp},
afterskip={6bp plus 1.2bp minus 1.2bp},
format={\heiti\zihao{-4}\flushleft}]{subsubsection}
numberformat={\bf},
format={\heiti\zihao{-4}\flushleft\baselineskip=20bp}]{subsubsection}
}{
\CTEXsetup[ aftername={~},
\CTEXsetup[ aftername={\enspace},
beforeskip={12bp},
afterskip={6bp plus 1.2bp minus 1.2bp},
format={\vspace*{-0.5mm}\heiti\zihao{-4}\flushleft}]{subsubsection}
numberformat={\bf},
format={\heiti\zihao{-4}\flushleft\baselineskip=20bp}]{subsubsection}
}
\newenvironment{Cabstract}[5]{
\newcommand{\@ckeywords}{
Expand Down Expand Up @@ -671,7 +684,11 @@ pdfkeywords={\@pdfckeywords}%在pdf元信息中加入关键字
\renewcommand*\l@subsubsection{\@dottedtocline{3}{6em}{1em}}
}
\RequirePackage{amsmath,amsfonts,amssymb,bm}
\renewcommand{\theequation}{\arabic{chapter}\textendash\arabic{equation}}
\abovedisplayskip=6bp
\abovedisplayshortskip=6bp
\belowdisplayskip=6bp
\belowdisplayshortskip=6bp
\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}}
\RequirePackage[amsmath,thmmarks]{ntheorem}
\theorembodyfont{\normalfont}%字体
\theoremheaderfont{\normalfont \bfseries \hspace*{2em}}%设置缩进
Expand Down Expand Up @@ -921,16 +938,12 @@ pdfdisplaydoctitle=true
\mainmatter%正文区版式
\makeatletter
\newcmds@uestcthesis%自定义图表命令,这些命令必须在document环境里声明才能在正文中使用,所以只能放在这里了。
\abovedisplayskip=6bp
\abovedisplayshortskip=6bp
\belowdisplayskip=6bp
\belowdisplayshortskip=6bp
\makeatother
}
\ifdef{\onlychapters@uestcthesis}{}{%onlychapters选项效果
\newcommand{\insertacknowledgement}{
\chapter*{\acknowledgementsname@uestcthesis}%用带星号的章命令插入不带章号的致谢。
\markboth{\acknowledgementsname@uestcthesis}{}%页眉设置
\markboth{\acknowledgementsmarkname@uestcthesis}{}%页眉设置
\phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。
\addcontentsline{toc}{chapter}{\acknowledgementsname@uestcthesis}%将致谢编入目录
\input{contents/acknowledgements.tex}%插入致谢内容
Expand All @@ -940,7 +953,7 @@ pdfdisplaydoctitle=true
\phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。
\addcontentsline{toc}{chapter}{\CTEX@bibname}%将参考文献编入目录
\nocite{*}%若将此命令屏蔽掉,则未引用的文献不会出现在文后的参考文献列表中。
{\zihao{5}
{\zihao{5}\baselineskip=20bp{}
\bibliography{contents/reference}%插入参考文献
}
}
Expand All @@ -956,9 +969,9 @@ pdfdisplaydoctitle=true
\insertreference
}
\appendix%附录版式
\renewcommand{\thefigure}{\Alph{chapter}\textendash\arabic{figure}}
\renewcommand{\thetable}{\Alph{chapter}\textendash\arabic{table}}
\renewcommand{\theequation}{\Alph{chapter}\textendash\arabic{equation}}
\renewcommand{\thefigure}{\Alph{chapter}-\arabic{figure}}
\renewcommand{\thetable}{\Alph{chapter}-\arabic{table}}
\renewcommand{\theequation}{\Alph{chapter}-\arabic{equation}}
\renewcommand{\chaptermark}[1]{\markboth{\CTEX@appendixname\Alph{chapter}~ #1 }{}}%附录页眉设置
\input{contents/appendix.tex}%插入附录内容
\clearpage
Expand Down Expand Up @@ -1019,7 +1032,7 @@ pdfdisplaydoctitle=true
\CTEXoptions[ bibname={\publicationsname@degree}]%设置攻博/硕期间发表的论文章题目
\phantomsection%手动添加目录项之前需要这个命令,用以更新目录超链接的跳转页码。
\addcontentsline{toc}{chapter}{\publicationsname@degree}%将攻博/硕期间发表的论文编入目录
{\zihao{5}%
{\zihao{5}\baselineskip=20bp{}%
\def\footnotehint{}%
\bibliographypublications{contents/publications}%插入攻博/硕期间发表的论文
}}{}
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 最新版本:v1.2.0 #
# 最新版本:v1.2.1 #
升级前请阅读下方的更新日志。

从v1.0.x升级请参考Wiki:[如何从v1.0.x升级到v1.1.0](https://github.com/shifujun/UESTCthesis/wiki/%E5%A6%82%E4%BD%95%E4%BB%8Ev1.0.x%E5%8D%87%E7%BA%A7%E5%88%B0v1.1.0)
Expand All @@ -22,6 +22,17 @@ UESTCthesis是电子科技大学毕业论文官方发布的LaTeX模板。同时
加群连接:[http://url.cn/S1QIdM](http://url.cn/S1QIdM)

# 更新日志 #
##2015年4月10日: v1.2.1 ##
- 修复公式前后段距未能生效的问题。
- 改正致谢页眉有空格的问题。
- 校正页眉、页眉线、版心与页眉间距。
- 设置所有五号字的行距为固定的20磅。
- 修正子图环境的子图标题超过一行时与主标题间距不对的问题。
- 修正章节标题的段前段后距离,以及3级节标题在页首时段前间距没有取消的问题。
- 修正节标题序号没有加粗的问题。
- 修正章节标题序号与题目之间的空格,改为固定的0.5em宽。
- 修正图表公式序号中间的连字符为普通的减号,以便和MS Word一致。

##2015年4月8日: v1.2.0 ##
- 大幅修改bst参考文献格式控制文件。更新后的模板可以生成和规范相同的参考文献格式。但不再支持GB/T7714-2005,也不兼容之前的bib文件。基本上之前定义的参考文献条目都需要进行类型的更改和字段的补全。详情请看Wiki:[录入参考文献和研究成果](https://github.com/shifujun/UESTCthesis/wiki/%E5%BD%95%E5%85%A5%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E5%92%8C%E7%A0%94%E7%A9%B6%E6%88%90%E6%9E%9C)

Expand Down
Loading

0 comments on commit 7311680

Please sign in to comment.