From 6e5d281ad89362372093fdbe4a6cba96f5cf9f1b Mon Sep 17 00:00:00 2001 From: Wang Wen Date: Fri, 29 May 2020 09:31:26 +0800 Subject: [PATCH] Add configurations of important dates Enable settings for important dates. --- README.md | 13 +++++++++++-- thesis-uestc.cls | 22 +++++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c0455f..93ae5ec 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,15 @@ xelatex main.tex |\major{#1}{#2}| 专业中文名| 专业英文名 | |\studentnumber{#1}| 学号 | 无 | -如果想使用自己定义的封面,可以用`\bindpdfcover`命令添加已经做好的PDF格式的封面,如`\bindpdfcover{cover.pdf}`。 +此外可以用`\setdate`命令设置扉页所显示的日期。这个命令的三个选项`oral`, `submiit`和`confer`分别对应答辩,提交和学位授予的日期。 +| 选项 | 例子 | 定义 | +|---|---|---| +| oral | \setdate[oral]{2019.4.15} | 答辩日期 | +| submit | \setdate[submit]{2019.3.15} | 论文提交日期 | +| confer | \setdate[confer]{2019年6月} | 学位授予日期 | +如果想使用自己定义的封面,可以用`\bindpdfcover`命令添加已经做好的PDF格式的封面,如`\bindpdfcover{cover.pdf}`。 ### 中英文摘要 @@ -88,7 +94,7 @@ xelatex main.tex ### 数学环境 -数学环境的字体加粗可以使用`\mathbf`或者`\bm`命令,使用斜体粗体的符号。使用正体加粗可以使用`\mathbd`命令。由于 Times New Roman 字体的拉丁字母字形修长,偶尔会出现字符粘连的情况。这种情况下可以使用占位符波浪号调整距离,如`$f^{~l}$`和`$\hat{f~}$`。 +数学环境的字体加粗可以使用`\mathbf`或者`\bm`命令,使用斜体粗体的符号。正体加粗可以使用`\mathbd`命令。由于 Times New Roman 字体的拉丁字母字形修长,偶尔会出现字符粘连的情况。这种情况下可以使用占位符波浪号调整距离,如`$f^{~l}$`和`$\hat{f~}$`。 ### 致谢 @@ -220,6 +226,9 @@ xelatex main.tex ### 如何录入专利或学位论文等文献条目? 模版提供的`reference.bib`包含所有可用条目类型的样例,包括期刊论文,会议论文,专利、学位论文和电子出版物等,可以参考这些条目录入文献信息。 +### 为什么从生成的PDF复制文本都是乱码,且查重无法正确识别文本内容? +这种现象出现在2018版的TeXLive上。将TeXLive的版本更新到2019或2020即可消除这个问题。 + ## 技术交流 欢迎各位同学交流技术经验,如果希望使用QQ即时交流可加成电LaTeX模板交流群(926297104)。验证信息请回答问题,不要空置。如有问题还可以在项目 [Issue](https://github.com/x-magus/ThesisUESTC/issues) 模块提出,或者邮件联系作者(wwzvd@mst.edu)。类模板完全由作者手动编写,并非由代码工具生成,相对容易修改和阅读。在此欢迎高阶的使用者分享更好的写法,提出改进的建议。 diff --git a/thesis-uestc.cls b/thesis-uestc.cls index b4878a0..ff86116 100644 --- a/thesis-uestc.cls +++ b/thesis-uestc.cls @@ -388,6 +388,22 @@ \renewcommand{\thestudentnumber}{#1} } +\newcommand{\thedateoral}{} +\newcommand{\thedatesubmit}{} +\newcommand{\thedateconfer}{年\chinesespace 月} + +\newcommand{\setdate}[2][]{ +\ifthenelse{\equal{#1}{oral}}{ + \renewcommand{\thedateoral}{#2} +}{} +\ifthenelse{\equal{#1}{submit}}{ + \renewcommand{\thedatesubmit}{#2} +}{} +\ifthenelse{\equal{#1}{confer}}{ + \renewcommand{\thedateconfer}{#2} +}{} +} + \renewcommand{\strong}{\heiti} \DeclareOption{english} { \newcommand{\englishbook}{} @@ -671,15 +687,15 @@ UDC\textsuperscript{ 注1} \uline{\hspace{2.5in}} \\[12bp] >{\fontsize{12pt}{12pt}\selectfont}l >{\centering\arraybackslash\fontsize{16pt}{16pt}\heiti\selectfont} p{2.0in}} - 提交论文日期 & & - 论文答辩日期 & \\ + 提交论文日期 & \thedatesubmit & + 论文答辩日期 & \thedateoral \\ \cline{2-2} \cline{4-4} \end{tabular} \\ \begin{tabular}{>{\fontsize{12pt}{12pt}\selectfont}l >{\centering\arraybackslash\fontsize{16pt}{16pt}\heiti\selectfont} p{3.97in}} - 学位授予单位和日期 & 电子科技大学\chinesespace 年\chinesespace 月 \\ + 学位授予单位和日期 & 电子科技大学\chinesespace{} \thedateconfer \\ \cline{2-2} \end{tabular} \\ \begin{tabular}{>{\fontsize{12pt}{12pt}\selectfont}l