Skip to content

Commit 795a274

Browse files
committed
New Release
Former-commit-id: dc90743
1 parent 98f656c commit 795a274

File tree

5 files changed

+133
-88
lines changed

5 files changed

+133
-88
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@ Clone or download -> Download Zip
2121

2222
## 重要通知
2323

24-
* `2018-01-26` 模板样式进行了修改,请查看下面的修改描述,以决定是否需要更新。
24+
* `2018-01-28` 模板样式进行了修改,请查看下面的修改描述,以决定是否需要更新。
2525

2626
## 更新记录
2727

28-
* `2018-01-26` 基于国科大模板要素的变动进行了重大修改:
28+
* `2018-01-28` 基于国科大模板要素的变动进行了重大修改:
2929
* 修改封面为国科大最新封面样式
3030
* 封面使用国科大新版形象标识(<http://www.ucas.ac.cn/site/11?zu=64925>
3131
* 英文封面添加导师信息
3232
* 针对国科大对*密级*条目的最新规定,提供 *showmj* 选项以决定*密级*条目的显示与否
3333
* 采用最新的标题格式、论文声明、页眉页脚样式
3434
* 展示标题中使用数学公式的解决方案
3535
* 使用 zepinglee 开发的适用 Bibtex 的参考文献国标样式(<https://github.com/zepinglee/gbt7714-bibtex-style>
36-
* 提高所有模板文件和代码的可读性,如命名、注释、排版等。
36+
* 提高所有模板文件和代码的可读性,如命名、注释、排版等
37+
* 回答了关于字体调用和字体加粗异常的问题
3738
* 因模板改动显著,建议的更新方式为`移植你的旧有文件到新模板中`:
3839
1. 下载解压新模板
3940
2. 替换 Tex 文件夹中的除 Frontpage.tex 以外的文件

Style/ucasthesis.cls

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@
282282

283283
\vspace*{3ex}
284284

285-
\hfill{} {\UCAS@value@declare@s \hspace*{14em}}
285+
{\hfill{} {\UCAS@value@declare@s \hspace*{14em}}}
286286

287-
\hfill{} {\UCAS@value@declare@d \hspace*{14em}}
287+
{\hfill{} {\UCAS@value@declare@d \hspace*{14em}}}
288288

289289
\vspace*{6ex}
290290

@@ -320,62 +320,68 @@
320320
\newcommand\englishkeywords[1]{%
321321
\noindent {\bfseries\zihao{-4} \UCAS@label@englishkeywords} #1}
322322
%---------------------------------------------------------------------------%
323-
%->> Dotted line in toc
323+
%->> Configure table of contents
324324
%---------------------------------------------------------------------------%
325325
%- define spacing and length
326326
\def\@dotsep{1.5mu}% spacing for dots
327327
\def\@pnumwidth{2em}% spacing between titles and page numbers
328328
\def\@tocrmarg{2em}% right margin indentation
329-
\def\@chaptervspace{8bp}% spacing between chapter titles
330-
\def\@dottedtocline#1#2#3#4#5{%
329+
\def\@chaptervspace{1ex}% spacing between chapter titles
330+
%- redefine dottedtocline from classes.dtx and latex.ltx
331+
\def\@dottedtocline#1#2#3#4#5{% [<level>,<indent>,<numwidth>,<title>,<page>]
331332
\ifnum #1>\c@tocdepth \else
332-
\vskip \z@ \@plus.2\p@
333-
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
334-
\parindent #2\relax\@afterindenttrue
335-
\interlinepenalty\@M
336-
\leavevmode
337-
\@tempdima #3\relax
338-
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
339-
{#4}\nobreak
340-
\leaders\hbox{$\m@th\mkern \@dotsep \cdot\mkern \@dotsep$}\hfill
341-
\nobreak
342-
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
343-
\par\penalty\@highpenalty}%
344-
\fi}
345-
\renewcommand*\l@part[2]{%
346-
\ifnum \c@tocdepth >-2\relax
347-
\addpenalty{-\@highpenalty}%
348-
\addvspace{2.25em \@plus\p@}%
349-
\setlength\@tempdima{3em}%
350-
\begingroup
351-
\parindent \z@ \rightskip \@pnumwidth
352-
\parfillskip -\@pnumwidth
353-
{\leavevmode
354-
\large \bfseries #1
355-
\leaders\hbox{$\m@th\mkern \@dotsep \cdot\mkern \@dotsep$}
356-
\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
333+
\vskip \z@ \@plus.2\p@
334+
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
335+
\parindent #2\relax\@afterindenttrue
336+
\interlinepenalty\@M
337+
\leavevmode \zihao{-4}\heiti
338+
\@tempdima #3\relax
339+
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
340+
{#4}\nobreak
341+
\leaders\hbox{$\m@th\mkern \@dotsep \cdot\mkern \@dotsep$}\hfill
357342
\nobreak
358-
\global\@nobreaktrue
359-
\everypar{\global\@nobreakfalse\everypar{}}%
360-
\endgroup
361-
\fi}
362-
\renewcommand*\l@chapter[2]{%
343+
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
344+
\par\penalty\@highpenalty}%
345+
\fi
346+
}
347+
%- redefine l@part from book.cls to add dotted toc line
348+
\renewcommand*\l@part[2]{% [<title>,<page>]
349+
\ifnum \c@tocdepth >-2\relax
350+
\addpenalty{-\@highpenalty}%
351+
\addvspace{2.25em \@plus\p@}%
352+
\setlength\@tempdima{3em}%
353+
\begingroup
354+
\parindent \z@ \rightskip \@pnumwidth
355+
\parfillskip -\@pnumwidth
356+
{\leavevmode
357+
\large \bfseries #1
358+
\leaders\hbox{$\m@th\mkern \@dotsep \cdot\mkern \@dotsep$}% add dotted toc line
359+
\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
360+
\nobreak
361+
\global\@nobreaktrue
362+
\everypar{\global\@nobreakfalse\everypar{}}%
363+
\endgroup
364+
\fi
365+
}
366+
%- redefine l@chapter from book.cls to add dotted toc line
367+
\renewcommand*\l@chapter[2]{% [<title>,<page>]
363368
\ifnum \c@tocdepth >\m@ne
364-
\addpenalty{-\@highpenalty}%
365-
\vskip \@chaptervspace \@plus\p@
366-
\setlength\@tempdima{1.5em}%
367-
\begingroup
368-
\parindent \z@ \rightskip \@pnumwidth
369-
\parfillskip -\@pnumwidth
370-
\leavevmode \bfseries
371-
\advance\leftskip\@tempdima
372-
\hskip -\leftskip
373-
#1\nobreak
374-
\leaders\hbox{$\m@th\mkern \@dotsep \cdot\mkern \@dotsep$}
375-
\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
376-
\penalty\@highpenalty
377-
\endgroup
378-
\fi}
369+
\addpenalty{-\@highpenalty}%
370+
\vskip \@chaptervspace \@plus\p@
371+
\setlength\@tempdima{1.5em}%
372+
\begingroup
373+
\parindent \z@ \rightskip \@pnumwidth
374+
\parfillskip -\@pnumwidth
375+
\leavevmode \zihao{4}\heiti
376+
\advance\leftskip\@tempdima
377+
\hskip -\leftskip
378+
#1\nobreak
379+
\leaders\hbox{$\m@th\mkern \@dotsep \cdot\mkern \@dotsep$}% add dotted toc line
380+
\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
381+
\penalty\@highpenalty
382+
\endgroup
383+
\fi
384+
}
379385
%---------------------------------------------------------------------------%
380386
\endinput
381387

Tex/Chap_Guide.tex

Lines changed: 67 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ \subsection{数学公式}
8989
\end{cases}
9090
\end{equation}
9191

92-
常用数学公式的命令代码模板,请见WiKibook:\url{https://en.wikibooks.org/wiki/LaTeX/Mathematics}。
92+
常用数学公式的命令代码模板,请见WiKibook:
93+
94+
\url{https://en.wikibooks.org/wiki/LaTeX/Mathematics}
9395

9496
\subsection{表格}
9597

@@ -102,7 +104,8 @@ \subsection{表格}
102104
\begin{tabular}{lcccccccc}
103105
\hline\hline
104106
Row number & \multicolumn{8}{c}{This is a multicolumn} \\
105-
\cline{2-9}% partial hline from column i to column j
107+
%\cline{2-9}% partial hline from column i to column j
108+
\hline
106109
Row 1 & $1$ & $2$ & $4$ & $5$ & $6$ & $7$ & $8$\\
107110
\hline
108111
Row 2 & $1$ & $2$ & $4$ & $5$ & $6$ & $7$ & $8$\\
@@ -235,24 +238,29 @@ \subsection{参考文献引用}
235238

236239
不同文献样式和引用样式可在Thesis.tex中对artratex.sty调用实现,如:
237240
\begin{itemize}
238-
\item \verb+\usepackage[numbers]{artratex}+ $\%$ textual: Jones [1]; parenthetical: [1]
239-
\item \verb+\usepackage[super]{artratex}+ $\%$ textual: Jones 上标[1]; parenthetical: 上标[1]
240-
\item \verb+\usepackage[authoryear]{artratex}+ $\%$ textual: Jones (1995); parenthetical: (Jones, 1995)
241-
\item \verb+\usepackage[alpha]{artratex}+ $\%$ textual: not available; parenthetical: [Jon95]
241+
\footnotesize
242+
\item \verb+\usepackage[numbers]{artratex}+ $\%$ 文本: Jones [1]; 括号: [1]
243+
\item \verb+\usepackage[super]{artratex}+ $\%$ 文本: Jones 上标[1]; 括号: 上标[1]
244+
\item \verb+\usepackage[authoryear]{artratex}+ $\%$ 文本: Jones (1995); 括号: (Jones, 1995)
245+
\item \verb+\usepackage[alpha]{artratex}+ $\%$ 文本: 不可用; 括号: [Jon95]
242246
\end{itemize}
243247

244248
若在上标(super)模式下,希望在特定位置将上标改为嵌入式标,可使用
245249

246-
文本类型:\verb|\citetns{lamport1986document,chen2005zhulu}|。正如此处所示\citetns{lamport1986document,chen2005zhulu}
250+
文本类型:\verb|\citetns{lamport1986document,chen2005zhulu}|。
251+
252+
正如此处所示\citetns{lamport1986document,chen2005zhulu}
253+
254+
括号类型:\verb|\citepns{lamport1986document,chen2005zhulu}|。
247255

248-
括号类型:\verb|\citepns{lamport1986document,chen2005zhulu}|。正如此处所示\citepns{lamport1986document,chen2005zhulu}
256+
正如此处所示\citepns{lamport1986document,chen2005zhulu}
249257

250258
参考文献索引更为详细的信息,请见Wikibook\citep{wikibook2014latex} \nocite{*}。
251259

252260
\section{常见使用问题}\label{sec:qa}
253261

254262
\begin{enumerate}
255-
\item 下载模板后,用脚本编译出现错误,则i)请下载并更新模板。请更新\LaTeX{}编译器和包裹库,以确保模板与编译器的匹配。ii) 编译中若出现缺乏包裹或字体并提示是否自动下载,请选择自动下载,即可解决大部分初始编译时所遇到的问题。本模板在每次修改的发布前,都已在Windows,Linux,Mac OS系统的最近两个发行版的Texlive上测试通过
263+
\item 下载模板后,用脚本编译出现错误,则i)请下载并更新模板。请更新\LaTeX{}编译器和包裹库,以确保模板与编译器的匹配。ii) 编译中若出现缺乏包裹或字体并提示是否自动下载,请选择自动下载,即可解决大部分初始编译时所遇到的问题。本模板在每次修改的发布前,都已在Windows,Linux,MacOS系统的最近两个发行版的Texlive上测试通过
256264

257265
\item 模板文档的编码为UTF-8编码。所有文件都必须采用UTF-8编码,否则编译后生成的文档将出现乱码文本。若出现文本编辑器无法打开文档或打开文档乱码的问题,请检查您使用的编辑器对UTF-8编码的支持。如果使用WinEdt作为文本编辑器(不推荐使用),应在其Options -> Preferences -> wrapping选项卡下将两种Wrapping Modes中的内容:TeX;HTML;ANSI;ASCII|DTX...修改为:TeX;\textbf{UTF-8|ACP;}HTML;ANSI;ASCII|DTX...同时,取消Options -> Preferences -> Unicode中的Enable ANSI Format...选项。
258266

@@ -283,30 +291,59 @@ \section{常见使用问题}\label{sec:qa}
283291
\url{http://ctan.mirror.rafal.ca/language/chinese/ctex/ctex.pdf}
284292

285293
\item 设置图2.3为图2-3: 设置
294+
{
295+
\footnotesize
286296
\begin{verbatim}
287-
\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}}
288-
\renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}}
289-
\renewcommand{\thetable}{\arabic{chapter}-\arabic{table}}
297+
\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}}
298+
\renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}}
299+
\renewcommand{\thetable}{\arabic{chapter}-\arabic{table}}
290300
\end{verbatim}
291-
\item 字体控制。如果对字体控制有较高需求,请选择xelatex编译引擎,并设置需要的字体,如启用Times New Roman 作为英文字体,设置:
292-
293-
\verb+\setmainfont{Times New Roman}+
294-
\end{enumerate}
295-
296-
\item 在某些情况下拷贝pdf文档内容到word时存在乱码。解决方式是选择安装adobe相应的字体库,请在公共网站(如百度云盘:\url{http://pan.baidu.com/share/home?uk=3188136325&view=share#category/type=0})搜索并下载如下四种中文字体文件:
297-
\begin{enumerate}
298-
\item AdobeFangsongStd-Regular.otf (adobe 仿宋)
299-
\item AdobeHeitiStd-Regular.otf(adobe 黑体)
300-
\item AdobeKaitiStd-Regular.otf(adobe 楷体)
301-
\item AdobeSongStd-Light.otf(adobe 宋体)
301+
}
302+
\item 字体控制。如果对字体控制有较高需求,请选择xelatex编译引擎,并设置需要的字体。
303+
304+
如启用Times New Roman 作为英文字体,设置:
305+
306+
\verb|\setmainfont{Times New Roman}|
307+
308+
若拷贝PDF内容到Word时存在乱码,解决方式是安装adobe字体库,在百度云盘:
309+
310+
{
311+
\scriptsize
312+
\url{http://pan.baidu.com/share/home?uk=3188136325&view=share#category/type=0}
313+
}
314+
315+
下载如下四种中文字体文件:
316+
\begin{enumerate}
317+
\footnotesize
318+
\item AdobeFangsongStd-Regular.otf (adobe 仿宋)
319+
\item AdobeHeitiStd-Regular.otf(adobe 黑体)
320+
\item AdobeKaitiStd-Regular.otf(adobe 楷体)
321+
\item AdobeSongStd-Light.otf(adobe 宋体)
322+
\end{enumerate}
323+
下载后,双击安装字体。然后在Thesis.tex中设置启用adobe的字体:
324+
325+
\verb+\documentclass[doublesided,fontset=adobe]{Style/ucasthesis}%+
326+
327+
若模版出现宋体无法加粗的情形,这是由于你的系统缺乏完备的中文字体或是ctex宏包没有调用到你的系统字体。Windows和Linux用户通过采用上述的adobe字体方案一般可解决问题。MacOS的用户则必须设置调用系统自带的中文字体,方法是在
328+
329+
\verb|\RequirePackage{fontspec}|
330+
331+
行下添加如下中文字体调用命令:
332+
{
333+
\footnotesize
334+
\begin{verbatim}
335+
\setCJKmainfont[BoldFont=Heiti SC,ItalicFont=Kaiti SC]{Songti SC Light}%
336+
\setCJKsansfont{Heiti SC}%
337+
\setCJKfamilyfont{zhsong}{Songti SC Light}%
338+
\setCJKfamilyfont{zhhei}{Heiti SC}%
339+
\setCJKfamilyfont{zhkai}{Kaiti SC}%
340+
\end{verbatim}
341+
}
342+
343+
因为模版的设定考虑兼顾不同操作系统(Windows, Linux, Mac OS)并兼顾pdflatex和xelatex,为了模版的健壮性,上述字体设置和调用方案并未作为原始设定。
302344
\end{enumerate}
303-
下载后,双击安装相应字体。然后在Thesis.tex中设置启用adobe的字体:
304-
305-
\verb+\documentclass[doublesided,fontset=adobe]{Style/ucasthesis}%+
306345

307-
最后选择xelatex编译引擎编译。因为模版的设定考虑兼顾不同操作系统(Windows, Linux, Mac OS)并兼顾pdflatex和xelatex,为了模版的健壮性,上述方案并未作为原始设定。
308-
309-
\item 一般规范下,章应开始于奇数页。从而若前一章结束于奇数页,则一空白页将被插入以保证上述规则。如想修改以取消空白页,有如下方案:
346+
\item 一般规范下,章应开始于奇数页。从而若前一章结束于奇数页,则一空白页将被插入以保证上述规则。如想修改以取消空白页,有如下方案:
310347
\begin{itemize}
311348
\item 在thesis.tex的documentclass中用singlesided替代doublesided。这使文档不区分奇偶页,因此章可以开始于任意页。此方案将移除所有空白页,包括封面处的。同时,页眉页脚的设定不再区分奇偶页。
312349
\item 可以在ucasthesis.cls文件中,将cleardoublepage命令的定义修改为:
@@ -317,6 +354,7 @@ \section{常见使用问题}\label{sec:qa}
317354
\item 在thesis.tex的documentclass中添加openany选项(openany与doublesided和printcopy都可搭配)。这一命令使章可以开始于任意页。同时,将artratex.sty中和thesis.tex中的cleardoublepage改为clearpage。此方案将移除所有的用于调整章的起始位置的空白页,而不包括封面处的。同时,页面页脚的设定可以区分奇偶页。
318355
\end{itemize}
319356
无论哪种方案都要注意对页眉页脚的影响并做出合适的调整。推荐是采用默认设置,尽量避免将精力花在这些无关紧要的细节上。\LaTeX{}的特点是标准化,而其导致的问题则是任何脱离标准的修改都将花费相当精力。对于电子档的论文,在thesis.tex的documentclass中,若不想使用doublesided,则可使用singlesided来减少空白页。而对于打印版,启用printcopy选项以替换doublesided/singlesided选项,这样可使奇偶页的排版在打印装订后更美观。
357+
320358
\item 部分所也许对论文格式有不同的设定,\LaTeX{}用户亦无需担心,仍可放心地使用当前模板进行论文撰写,因为\LaTeX{}的特征就在于内容与格式的分离。在使用此模板完成论文的撰写后,任何形式的格式调整都可独立于内容进行,并可只需通过修改模板样式文件中的少数命令轻松快速完成,并无风险。
321359
\end{enumerate}
322360

Thesis.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
%-
5555
\frontmatter% initialize the environment
5656
\input{Tex/Frontpages}% title page, abstract, dedication
57-
\intotoc{\contentsname}% add link to contents table and bookmark
57+
%\intotoc{\contentsname}% add link to contents table and bookmark
5858
\tableofcontents% contents catalog
59-
\intotoc{\listfigurename}% add link to contents table and bookmark
60-
\listoffigures% figures catalog
61-
\intotoc{\listtablename}% add link to contents table and bookmark
62-
\listoftables% tables catalog
59+
%\intotoc{\listfigurename}% add link to contents table and bookmark
60+
%\listoffigures% figures catalog
61+
%\intotoc{\listtablename}% add link to contents table and bookmark
62+
%\listoftables% tables catalog
6363
\input{Tex/Prematter}% list of symbols, preface content
6464
%-
6565
%-> Mainmatter

模板使用说明.pdf.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d0c7b03afcb3ed87da9f65db94ceb01f3043a401
1+
5c0acdbf98bfbe0e9aa35a5e7c015237c84d70d8

0 commit comments

Comments
 (0)