From 119dd66bd04be86e878563dfdc69216266e9a52f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 19 Feb 2019 22:19:26 +0000 Subject: hithesis (19feb19) git-svn-id: svn://tug.org/texlive/trunk@50062 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/bibtex/bst/hithesis/hithesis.bst | 6 +- Master/texmf-dist/doc/latex/hithesis/Makefile | 105 -------- Master/texmf-dist/doc/latex/hithesis/README.md | 25 +- .../doc/latex/hithesis/body/introduction.tex | 227 +++++++++++----- Master/texmf-dist/doc/latex/hithesis/dtx-style.sty | 2 +- .../texmf-dist/doc/latex/hithesis/front/cover.tex | 9 +- Master/texmf-dist/doc/latex/hithesis/hithesis.pdf | Bin 586524 -> 603014 bytes Master/texmf-dist/doc/latex/hithesis/latexmkrc | 17 +- Master/texmf-dist/doc/latex/hithesis/main.pdf | Bin 310847 -> 339214 bytes Master/texmf-dist/doc/latex/hithesis/main.tex | 24 +- Master/texmf-dist/doc/latex/hithesis/reference.bib | 8 +- Master/texmf-dist/makeindex/hithesis/hithesis.ist | 8 +- Master/texmf-dist/source/latex/hithesis/Makefile | 108 ++++++++ .../texmf-dist/source/latex/hithesis/hithesis.dtx | 284 +++++++++++++++------ Master/texmf-dist/tex/latex/hithesis/hithesis.cfg | 10 +- Master/texmf-dist/tex/latex/hithesis/hithesis.cls | 152 ++++++----- Master/texmf-dist/tex/latex/hithesis/hithesis.sty | 245 +++++++++++++++++- 17 files changed, 895 insertions(+), 335 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/hithesis/Makefile create mode 100644 Master/texmf-dist/source/latex/hithesis/Makefile diff --git a/Master/texmf-dist/bibtex/bst/hithesis/hithesis.bst b/Master/texmf-dist/bibtex/bst/hithesis/hithesis.bst index 17a21417b6d..98d64a7ac62 100644 --- a/Master/texmf-dist/bibtex/bst/hithesis/hithesis.bst +++ b/Master/texmf-dist/bibtex/bst/hithesis/hithesis.bst @@ -101,7 +101,7 @@ FUNCTION {cap.period} {"\@. "} FUNCTION {cap.comma} {"\@, "} FUNCTION {cap.colon} {"\thinspace{}\textnormal{: }"} FUNCTION {cap.double.slash} {" //\thinspace{}"} -FUNCTION {cap.dash} {"\thinspace{}\textnormal{--}\thinspace{}"} +FUNCTION {cap.dash} {"\textnormal{-}"} % Predefined latex command used to format the style of bibitems FUNCTION {env.bibbegin} { "\begin{thebibliography}" } @@ -112,7 +112,7 @@ FUNCTION {cmd.bibtranslator} { "\providecommand{\bibtranslator}[1]{#1}" } FUNCTION {cmd.bibtitle} { "\providecommand{\bibtitle}[1]{#1}" } FUNCTION {cmd.bibbooktitle} { "\providecommand{\bibbooktitle}[1]{#1}" } FUNCTION {cmd.bibjournal} { "\providecommand{\bibjournal}[1]{#1}" } -FUNCTION {cmd.bibmark} { "\providecommand{\bibmark}[1]{#1}" } +FUNCTION {cmd.bibmark} { "\providecommand{\bibmark}[1]{\mbox{#1}}" } FUNCTION {cmd.bibcountry} { "\providecommand{\bibcountry}[1]{#1}" } FUNCTION {cmd.bibpatentid} { "\providecommand{\bibpatentid}[1]{#1}" } FUNCTION {cmd.bibedition} { "\providecommand{\bibedition}[1]{#1}" } @@ -827,7 +827,7 @@ FUNCTION {format.citedate} { % String Emtry::format_citedat % // since if the URL contains special symbols such % // as '%', the \biburl{} will be broken. FUNCTION {format.url} { % String Emtry::format_url(String url) { - "\newline\url{" swap$ * "}" * % return "\newline\url{" + url + "}"; + "\url{" swap$ * "}" * % return "\url{" + url + "}"; } % } % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/doc/latex/hithesis/Makefile b/Master/texmf-dist/doc/latex/hithesis/Makefile deleted file mode 100644 index 56ac92cc818..00000000000 --- a/Master/texmf-dist/doc/latex/hithesis/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# Makefile for ThuThesis - -# Compiling method: latexmk/xelatex/pdflatex -METHOD = xelatex -# Set opts for latexmk if you use it -LATEXMKOPTS = -xelatex -# Basename of thesis -THESISMAIN = main - -PACKAGE=hithesis -SOURCES=$(PACKAGE).ins $(PACKAGE).dtx -THESISCONTENTS=$(THESISMAIN).tex front/*.tex body/*.tex back/*.tex $(FIGURES) *.bst -# NOTE: update this to reflect your local file types. -FIGURES=$(wildcard figures/*.eps figures/*.pdf) -BIBFILE=*.bib -CLSFILES=dtx-style.sty $(PACKAGE).cls $(PACKAGE).ist h$(PACKAGE).cfg - -# make deletion work on Windows -ifdef SystemRoot - RM = del /Q - OPEN = start -else - RM = rm -f - OPEN = open -endif - -.PHONY: all clean distclean dist thesis viewthesis doc viewdoc cls check FORCE_MAKE - -all: doc thesis - -cls: $(CLSFILES) - -$(CLSFILES): $(SOURCES) - latex $(PACKAGE).ins - -viewdoc: doc - $(OPEN) $(PACKAGE).pdf - -doc: $(PACKAGE).pdf - -viewthesis: thesis - $(OPEN) $(THESISMAIN).pdf - -thesis: $(THESISMAIN).pdf - -ifeq ($(METHOD),latexmk) - -$(PACKAGE).pdf: $(CLSFILES) FORCE_MAKE - $(METHOD) $(LATEXMKOPTS) $(PACKAGE).dtx - -$(THESISMAIN).pdf: $(CLSFILES) FORCE_MAKE - $(METHOD) $(LATEXMKOPTS) $(THESISMAIN) - -else ifneq (,$(filter $(METHOD),xelatex pdflatex)) - -$(PACKAGE).pdf: $(CLSFILES) - $(METHOD) $(PACKAGE).dtx - makeindex -s gind.ist -o $(PACKAGE).ind $(PACKAGE).idx - makeindex -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo - $(METHOD) $(PACKAGE).dtx - $(METHOD) $(PACKAGE).dtx - -$(THESISMAIN).idx: $(THESISMAIN).bbl - $(METHOD) $(THESISMAIN) - $(METHOD) $(THESISMAIN) - - -$(THESISMAIN)_china.idx : $(CLSFILES) $(THESISMAIN).bbl $(THESISMAIN).idx - splitindex $(THESISMAIN) -- -s $(PACKAGE).ist # 自动生成索引 - -$(THESISMAIN)_english.ind $(THESISMAIN)_china.ind $(THESISMAIN)_english.idx : $(THESISMAIN)_china.idx - -$(THESISMAIN).pdf: $(CLSFILES) $(THESISCONTENTS) $(THESISMAIN)_china.ind $(THESISMAIN)_china.idx $(THESISMAIN)_english.ind $(THESISMAIN)_english.idx $(THESISMAIN).bbl - $(METHOD) $(THESISMAIN) - -$(THESISMAIN).bbl: $(BIBFILE) - $(METHOD) $(THESISMAIN) - -bibtex $(THESISMAIN) - $(RM) $(THESISMAIN).pdf - -else -$(error Unknown METHOD: $(METHOD)) - -endif - -clean: - latexmk -c $(PACKAGE).dtx $(THESISMAIN) - -@$(RM) *~ *.idx *.ind *.ilg *.thm *.toe *.bbl latexmkrc - -cleanall: clean - -@$(RM) $(PACKAGE).pdf $(THESISMAIN).pdf - -distclean: cleanall - -@$(RM) $(CLSFILES) - -@$(RM) -r dist - -check: FORCE_MAKE - ag 'Harbin Institute of Technology Template|\\def\\version|"version":' hithesis.dtx package.json - -dist: all - @if [ -z "$(version)" ]; then \ - echo "Usage: make dist version=[x.y.z | ctan]"; \ - else \ - npm run build -- --version=$(version); \ - fi diff --git a/Master/texmf-dist/doc/latex/hithesis/README.md b/Master/texmf-dist/doc/latex/hithesis/README.md index 018a9a43dcc..18117fdfcbe 100644 --- a/Master/texmf-dist/doc/latex/hithesis/README.md +++ b/Master/texmf-dist/doc/latex/hithesis/README.md @@ -33,6 +33,10 @@ hithesis 已收录在[CTAN](https://ctan.org/pkg/hithesis 各位刀客一定要先看清楚我工规范两大歧义之处:[版芯歧义](http://yanshuo.name/cn/2017/06/hithesisregulation/)和[本科生行距歧义](http://yanshuo.name/cn/2017/06/hithesissiyuan/)。 +另外注意几处小歧义: +- 在[规范](http://hitgs.hit.edu.cn/aa/fd/c3425a109309/page.htm)中规定和[研究生word排版范例](http://hitgs.hit.edu.cn/ab/1f/c3425a109343/page.htm)的中文目录中出现的“ABSTRACT”和“Abstract”的写法歧义(规格严格功夫大家!!!)。 +- 本科生论文官方模板的页眉页码格式混乱,有的有页码横线有的没有,有的有页眉有的没有。 + ## 模板特点 ### 呆萌的操作,傲娇的效果 @@ -70,6 +74,7 @@ hithesis 已收录在[CTAN](https://ctan.org/pkg/hithesis ### 为了我工的规格严格、功夫到家 - 行间距、段前后距离设置精确到小数后四位, 例如 1bp = 1.00374pt,1mm = 2.84526pt, 按照我工之要求, 行距在3mm~4mm之间,换算之后为20.50398~23.33863bp,严格符合规范要求,哪怕是显微镜级别 + - 规范明确规定,数字间空格要求为汉字宽度的四分之一(形式类似与 12 2345 和 0.123 456 这样多于3位以上的整数或小数)。默认情况下在LaTeX中任何人工输入的空格均不正确(“\:”为4/18汉字宽度,“\;”为5/18汉字宽度,所以PlutoThesis中的数字间宽度错误)。hithesis模板中定义了精准的数字间宽度。 - 重写了一堆重要函数,例如章节标题由原来的`BiChapter{}{}`方式进化为`chapter{}[]`,极大简化,后面方括号中为可选括号,硕本可以不用,用了自动忽略 - 严格符合(满足)两个规范要求,由于规范中有矛盾之处,例如本科生的标题段前距离有两处不一样的规定,刚性行距尽量满足行数(要求约33行)要求。 - 规范中给出了行距区间,为了规格严格,设置了弹性行距 @@ -114,7 +119,19 @@ CTAN的版本一般会比较落后,但在每年年底会同步为最新版本 - 生成论文格式文件(第一步要生成 *.cls,*.cfg,*.ist,然后再生成论文) - latex hithesis.ins +注意,如果下载最新版本(>= 2018)的texlive或Miktex或Mactex,如果使用自带的模板,可能会出现一些错误,因为自带的版本老。 +查看自带版本的命令是 + + texdoc hithesis + + - 如果是Linux/Mac执行 (此处作者没测试过Mac,如遇到问题到谈论区可以问一下热心刀客大侠们,比如陈登泰教授、郭大侠等) + + latex hithesis.ins + + - 如果是Windows执行(作者没测试过,如遇问题同上) + + lualatex hithesis.ins + - 生成论文 @@ -168,13 +185,15 @@ LaTeX 中的ctex package版本要求: ![1](http://wx4.sinaimg.cn/large/61dccbaaly1fge32qrvgij20my0uzjso.jpg "谢谢") -或者支付宝,不限额度, +或者随便吧…… + +![wechat](http://wx2.sinaimg.cn/large/61dccbaaly1fqwvz6sd4ej20yi1au797.jpg "谢谢") ![zfb](http://wx3.sinaimg.cn/large/61dccbaaly1fizali9tafj20k00ucgos.jpg "谢谢") 其实没关系,为了我工的“规格严格,功夫到家”! - 本模板以PlutoThesis为核心基础,参考了CTAN中清华大学薛瑞尼所开发的thuthesis以及其分支重庆大学等毕业论文模板的代码开发而来 -- 学校教务处和研究生院只提供了规范,并没有提供官方的任何模板(包括word),所以此模板仅为规范的参考实现,不保证格式审查老师不提意见。任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关 +- ~~学校教务处和研究生院只提供了规范,并没有提供官方的任何模板(包括word),所以~~ 学校教务处和研究生院提供了规范和[研究生word模板](http://hitgs.hit.edu.cn/ab/1f/c3425a109343/page.htm)以及[本科生word模板](http://jwc.hit.edu.cn/2566/list.htm)(厉害了word哥……),此模板仅为规范的参考实现,不保证格式审查老师不提意见。任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关 知识共享许可协议
hithesishttps://github.com/dustincys/hithesis 采用 知识共享 署名-非商业性使用 4.0 国际 许可协议进行许可。
基于https://github.com/dustincys/hithesis上的作品创作。 diff --git a/Master/texmf-dist/doc/latex/hithesis/body/introduction.tex b/Master/texmf-dist/doc/latex/hithesis/body/introduction.tex index 46507f2e043..ee9d8c3c995 100644 --- a/Master/texmf-dist/doc/latex/hithesis/body/introduction.tex +++ b/Master/texmf-dist/doc/latex/hithesis/body/introduction.tex @@ -1,4 +1,4 @@ -% !Mode:: "TeX:UTF-8" +% !Mode:: "TeX:UTF-8" \chapter{示例文档}[Example] @@ -8,6 +8,19 @@ hithesis.pdf文件},本示例文档也最好能看一看。此示例文档尽 ,然而对于一些不在我工规范中规定的文档,理论上是由用户自由发挥,这里不给出样例 。需要另行载入的宏包和自定义命令在文件`hithesis.sty'中有示例,这里不列举。 +\section{关于数字}[Number] + +按《关于出版物上数字用法的试行规定》(1987年1月1日国家语言文字工作委员会等7个单位公布),除习惯用中文数字表示的以外,一般数字均用阿拉伯数字。 +(1)公历的世纪、年代、年、月、日和时刻一律用阿拉伯数字,如20世纪,80年代,4时3刻等。年号要用四位数,如1989年,不能用89年。 +(2)记数与计算(含正负整数、分数、小数、百分比、约数等)一律用阿拉伯数字,如3/4,4.5%,10个月,500多种等。 +(3)一个数值的书写形式要照顾到上下文。不是出现在一组表示科学计量和具有统计意义数字中的一位数可以用汉字,如一个人,六条意见。星期几一律用汉字,如星期六。邻近两个数字并列连用,表示概数,应该用汉字数字,数字间不用顿号隔开,如三五天,七八十种,四十五六岁,一千七八百元等。 +(4)数字作为词素构成定型的词、词组、惯用语、缩略语等应当使用汉字。如二倍体,三叶虫,第三世界,“七五”规划,相差十万八千里等。 +(5)5位以上的数字,尾数零多的,可改写为以万、亿为单位的数。一般情况下不得以十、百、千、十万、百万、千万、十亿、百亿、千亿作为单位。如~\num{345000000}~公里可改写为3.45亿公里或~\num{34500}~万公里,但不能写为3亿~\num{4500}~万公里或3亿4千5百万公里。 +(6)数字的书写不必每格一个数码,一般每两数码占一格,数字间分节不用分位号“,”,凡4位或4位以上的数都从个位起每3位数空半个数码(1/4汉字)。“\num{3000000}”,不要写成“3,000,000”,小数点后的数从小数点起向右按每三位一组分节。一个用阿拉伯数字书写的多位数不能从数字中间转行。 +(7)数量的增加或减少要注意下列用词的概念:1)增加为(或增加到)过去的二倍,即过去为一,现在为二;2)增加(或增加了)二倍,即过去为一,现在为三;3)超额80%,即定额为100,现在为180;4)降低到80%,即过去为100,现在为80;5)降低(或降低了)80%,即原来为100,现在为20;6)为原数的1/4,即原数为4,现在为1,或原数为1,现在为0.25。 +应特别注意在表达数字减小时,不宜用倍数,而应采用分数。如减少为原来的1/2,1/3等。 + + \section{索引示例}[Index] 为便于检索文中内容,可编制索引置于论文之后(根据需要决定是否设置)。索引以论文中 @@ -15,6 +28,14 @@ hithesis.pdf文件},本示例文档也最好能看一看。此示例文档尽 前。\sindex[china]{qi!乔峰}\sindex[english]{Xu Zhu}\sindex[english]{Qiao Feng} 中文按各词汉语拼音第一个字母排序,英文按该词第一个英文字母排序。 +\section{术语排版举例}[Glossaries and index] + +术语的定义和使用可以结合索引,灵活使用。 +例如,\gtssbp 是一种应用于狄利克雷过程抽样的算法。 +下次出现将是另一种格式:\gtssbp 。 +还可以切换单复数例如:\gscnas ,下次出现为:\gscnas 。 +此处体现了\LaTeX\ 格式内容分离的优势。 + \section{引用}[Cite] \sindex[china]{du!段誉}引文标注遵照GB/T7714-2005,采用顺序编码制。正文中引用文献的标示应置于所引内容最后一个字的右上角,所引文献编号用阿拉伯数字置于方括号“[ ]”中,用小4号字体的上角标。要求: @@ -23,6 +44,7 @@ hithesis.pdf文件},本示例文档也最好能看一看。此示例文档尽 (2)同一处引用多篇文献时,各篇文献的序号在方括号内全部列出,各序号间用“,”,如 遇连续序号,可标注讫序号。如,…形成了多种数学模型\cite{cnarticle,cnproceed}… +注意此处添加\cs{inlinecite}中文空格\inlinecite{cnarticle,cnproceed},可以在cfg文件中修改空格类型。 (3)多次引用同一文献时,在文献序号的“[ ]”后标注引文页码。如,…间质细胞CAMP含量 测定\cite[100-197]{cnarticle}…。…含量测定方法规定 @@ -30,6 +52,37 @@ hithesis.pdf文件},本示例文档也最好能看一看。此示例文档尽 (4)当提及的参考文献为文中直接说明时,则用小4号字与正文排齐,如“由文献\inlinecite{hithesis2017}可知” +\section{定理和定义等}[Theorem] +\begin{theorem}[\cite{cnproceed}] +宇宙大爆炸是一种爆炸。 +\end{theorem} +\begin{definition}[(霍金)] +宇宙大爆炸是一种爆炸。 +\end{definition} +\begin{assumption} +宇宙大爆炸是一种爆炸。 +\end{assumption} +\begin{lemma} +宇宙大爆炸是一种爆炸。 +\end{lemma} +\begin{corollary} +宇宙大爆炸是一种爆炸。 +\end{corollary} +\begin{exercise} +宇宙大爆炸是一种爆炸。 +\end{exercise} +\begin{problem}[(Albert Einstein)] +宇宙大爆炸是一种爆炸。 +\end{problem} +\begin{remark} +宇宙大爆炸是一种爆炸。 +\end{remark} +\begin{axiom}[(爱因斯坦)] +宇宙大爆炸是一种爆炸。 +\end{axiom} +\begin{conjecture} +宇宙大爆炸是一种爆炸。 +\end{conjecture} \section{图片}[Pictures] 图应有自明性。插图应与文字紧密配合,文图相符,内容正确。选图要力求精练,插图、照 片应完整清晰。机械工程图:采用第一角投影法,严格按照GB4457~GB131-83《机械制图》 @@ -92,13 +145,13 @@ Times New Roman字体,字号尽量采用5号字(当字数较多时可用小5 \begin{minipage}[t]{0.4\textwidth} \centering \includegraphics[width=\textwidth]{golfer} -\bicaption[golfer2]{}{打高尔夫球的人}{Fig.$\!$}{The person playing golf} +\bicaption[golfer5]{}{打高尔夫球的人}{Fig.$\!$}{The person playing golf} \end{minipage} \centering \begin{minipage}[t]{0.4\textwidth} \centering \includegraphics[width=\textwidth]{golfer} -\bicaption[golfer3]{}{打高尔夫球的人。注意,此图是顶部对齐}{Fig.$\!$}{The person playing golf. Please note that, it is vertically top aligned.} +\bicaption[golfer8]{}{打高尔夫球的人。注意,此图是顶部对齐}{Fig.$\!$}{The person playing golf. Please note that, it is vertically top aligned.} \end{minipage} \end{figure} @@ -107,13 +160,13 @@ Times New Roman字体,字号尽量采用5号字(当字数较多时可用小5 \begin{minipage}[t]{0.4\textwidth} \centering \includegraphics[width=\textwidth,height=\textwidth]{golfer} -\bicaption[golfer3]{}{打高尔夫球的人。注意,此图对齐方式是图片底部对齐}{Fig.$\!$}{The person playing golf. Please note that, it is vertically bottom aligned for figure.} +\bicaption[golfer9]{}{打高尔夫球的人。注意,此图对齐方式是图片底部对齐}{Fig.$\!$}{The person playing golf. Please note that, it is vertically bottom aligned for figure.} \end{minipage} \centering \begin{minipage}[t]{0.4\textwidth} \centering \includegraphics[width=\textwidth]{golfer} -\bicaption[golfer2]{}{打高尔夫球的人}{Fig.$\!$}{The person playing golf} +\bicaption[golfer6]{}{打高尔夫球的人}{Fig.$\!$}{The person playing golf} \end{minipage} \end{figure} @@ -154,16 +207,16 @@ Times New Roman字体,字号尽量采用5号字(当字数较多时可用小5 \centering \begin{minipage}{\textwidth} \centering - \subfigure{\label{golfer41}}\addtocounter{subfigure}{-2} + \subfigure{\label{golfer45}}\addtocounter{subfigure}{-2} \subfigure[The person playing golf]{\subfigure[打高尔夫球的人~1]{\includegraphics[width=0.4\textwidth]{golfer}}} \hspace{4em} - \subfigure{\label{golfer42}}\addtocounter{subfigure}{-2} + \subfigure{\label{golfer46}}\addtocounter{subfigure}{-2} \subfigure[The person playing golf]{\subfigure[打高尔夫球的人~2]{\includegraphics[width=0.4\textwidth]{golfer}}} \end{minipage} \vskip 0.2em \wuhao 注意:这里是中文图注添加位置(我工要求,图注在图题之上)。 \vspace{0.2em} -\bicaption[golfer4]{}{打高尔夫球的人。注意,此处我工有另外一处要求,子图图题可以位于主图题之下。但由于没有明确说明位于下方具体是什么格式,所以这里不给出举例。}{Fig.$\!$}{The person playing golf. Please note that, although it is appropriate to put subfigures' captions under this caption as stipulated in regulation, but its format is not clearly stated.} +\bicaption[golfer47]{}{打高尔夫球的人。注意,此处我工有另外一处要求,子图图题可以位于主图题之下。但由于没有明确说明位于下方具体是什么格式,所以这里不给出举例。}{Fig.$\!$}{The person playing golf. Please note that, although it is appropriate to put subfigures' captions under this caption as stipulated in regulation, but its format is not clearly stated.} \end{minipage} \end{figure} @@ -176,7 +229,7 @@ Times New Roman字体,字号尽量采用5号字(当字数较多时可用小5 \node at (0.8,0.2) {b)}; \end{scope} \end{tikzpicture} -\bicaption[golfer1]{}{打高尔夫球球的人(博士论文双语题注)}{Fig.$\!$}{The person playing golf (Doctoral thesis)} +\bicaption[golfer0]{}{打高尔夫球球的人(博士论文双语题注)}{Fig.$\!$}{The person playing golf (Doctoral thesis)} \vskip -0.4em \hspace{2em} \begin{minipage}[t]{0.3\textwidth} @@ -195,9 +248,85 @@ Times New Roman字体,字号尽量采用5号字(当字数较多时可用小5 \end{minipage} \end{figure} + +\begin{figure}[!h] + \centering + \begin{sideways} + \begin{minipage}{\textheight} + \centering + \fbox{\includegraphics[width=0.2\textwidth]{golfer}} + \fbox{\includegraphics[width=0.2\textwidth]{golfer}} + \fbox{\includegraphics[width=0.2\textwidth]{golfer}} + \fbox{\includegraphics[width=0.2\textwidth]{golfer}} + \fbox{\includegraphics[width=0.2\textwidth]{golfer}} + \fbox{\includegraphics[width=0.2\textwidth]{golfer}} + \fbox{\includegraphics[width=0.2\textwidth]{golfer}} +\bicaption[golfer7]{}{打高尔夫球的人(非规范要求)}{Fig.$\!$}{The person playing golf (Not stated in the regulation)} + \end{minipage} + \end{sideways} +\end{figure} + \clearpage 如果不想让图片浮动到下一章节,那么在此处使用\cs{clearpage}命令。 + +\section{如何做出符合规范的漂亮的图} +关于作图工具在后文\ref{drawtool}中给出一些作图工具的介绍,此处不多言。 +此处以R语言和Tikz为例说明如何做出符合规范的图。 + +\subsection{Tikz作图举例} +使用Tikz作图核心思想是把格式、主题、样式与内容分离,定义在全局中。 +注意字体设置可以有两种选择,如何字少,用五号字,字多用小五。 +使用Tikz作图不会出现字体问题,字体会自动与正文一致。 + +\begin{figure}[thb!] + \centering + \begin{tikzpicture}[xscale=0.8,yscale=0.3,rotate=90] + \small + \draw (-22,6.5) node[refcell]{参考基因组}; + \draw[refline] (-23, 5) -- (27, 5); + \draw (-22,3.75) node[tscell]{肿瘤样本}; + \draw (-20,3.75) node[tncell]{正常细胞}; + \draw[tnline] (-21, 2.5) -- (27, 2.5); + \draw (-20,1.25) node[ttcell]{肿瘤细胞}; + \rcell{2}{6}; + \draw[fakeevolve] (4.5, 5.25) -- (4.5, 4.8); + \ncell{2}{4}; + \draw[evolve] (4.5, 3) .. controls (4.5,2.8) and (-3.5,2.9) .. (-3.5, 2); + \draw[evolve] (4.5, 3) .. controls (4.5,2.8) and (11.5,2.9) .. (11.5, 2); + \tcellone{-6}{1.5}; + \draw (-9, 2) node[ttcell]{1}; + \draw[evolve] (-3.5, 0) .. controls (-3.5,-0.2) and (-12,-0.1) .. (-12, -1.5); + \draw[evolve] (-3.5, 0) .. controls (-3.5,-0.2) and (1.5,-0.1) .. (1.5, -1.5); + \tcellthree{7}{1.5}; + \draw (4, 2) node[ttcell]{2}; + \draw[evolve] (11, 0.5) .. controls (11,0.3) and (19,0.4) .. (19, -1.5); + \tcellfive{-16}{-2}; + \draw (-19, -1.5) node[ttcell]{3}; + \tcelltwo{-1}{-2}; + \draw (-4, -1.5) node[ttcell]{4}; + \tcellfour{12}{-2}; + \draw (9, -1.5) node[ttcell]{5}; + \end{tikzpicture} + \begin{minipage}{.9\linewidth} + \vskip 0.2em + \wuhao 图中,带有箭头的淡蓝色箭头表示肿瘤子种群的进化方向。一般地,从肿瘤组织中取用于进行二代测序的样本中含有一定程度的正常细胞污染,因此肿瘤的样本中含有正常细胞和肿瘤细胞。每一个子种群的基因组的模拟过程是把生殖细胞变异和体细胞变异加入到参考基因组中。 + \vspace{0.6em} + \end{minipage} +\bicaption[tumor]{}{肿瘤组织中各个子种群的进化示意图}{Fig.$\!$}{The diagram of tumor subpopulation evolution process} +\end{figure} + +\subsection{R作图} +R是一种极具有代表性的典型的作图工具,应用广泛。 +与Tikz图~\ref{tumor}~不同,R作图分两种情况:(1)可以转换为Tikz码;(2)不可转换为Tikz码。 +第一种情况图形简单,图形中不含有很多数据点,使用R语言中的Tikz包即可。 +第二种情况是图形复杂,含有海量数据点,这时候不要转成Tikz矢量图,这会使得论文体积巨大。 +推荐使用pdf或png非矢量图形。 +使用非矢量图形时要注意选择好字号(五号或小五),和字体(宋体、新罗马)然后选择生成图形大小,注意此时在正文中使用\cs{includegraphics}命令导入时,不要像导入矢量图那样控制图形大小,使用图形的原本的 +宽度和高度,这样就确保了非矢量图形中的文字与正文一致了。 + +为了控制\hithesis\ 的大小,此处不给出具体举例, + \section{表格} 表应有自明性。表格不加左、右边线。表的编排建议采用国际通行的三线表。表中文字用宋 @@ -240,10 +369,11 @@ $D$(in) & $P_u$(lbs) & $u_u$(in) & $\beta$ & $G_f$(psi.in)\\ 注意,长表格双语标题的格式。 -\ltfontsize{\dawu[1.667]} -\dawu[1.667]\begin{longtable}{ccc}% +\vspace{-1.5bp} +\ltfontsize{\wuhao[1.667]} +\wuhao[1.667]\begin{longtable}{ccc}% \longbionenumcaption{}{{\wuhao 中国省级行政单位一览 -}\label{table2}}{Table$\!$}{}{{\wuhao Overview of the provincial administrative +}\label{table3}}{Table$\!$}{}{{\wuhao Overview of the provincial administrative unit of China}}{-0.5em}{3.15bp}\\ %\caption{\wuhao 中国省级行政单位一览}\\ \toprule[1.5pt] 名称 & 简称 & 省会或首府 \\ \midrule[1pt] @@ -288,52 +418,8 @@ unit of China}}{-0.5em}{3.15bp}\\ 澳门特别行政区 & 澳 & 澳门\\ 台湾省 & 台 & 台北市\\ \end{longtable}\normalsize +\vspace{-1em} -\ltfontsize{\dawu[1.667]} -\dawu[1.667]\begin{longtable}{ccc}% - \caption{\wuhao 中国省级行政单位一览}\\[0.3em] -\toprule[1.5pt] 名称 & 简称 & 省会或首府 \\ \midrule[1pt] -\endfirsthead -\multicolumn{3}{r}{表~\thetable(续表)}\vspace{0.5em}\\ -\toprule[1.5pt] 名称 & 简称 & 省会或首府 \\ \midrule[1pt] -\endhead -\bottomrule[1.5pt] -\endfoot -北京市 & 京 & 北京\\ -天津市 & 津 & 天津\\ -河北省 & 冀 & 石家庄市\\ -山西省 & 晋 & 太原市\\ -内蒙古自治区 & 蒙 & 呼和浩特市\\ -辽宁省 & 辽 & 沈阳市\\ -吉林省 & 吉 & 长春市\\ -黑龙江省 & 黑 & 哈尔滨市\\ -上海市 & 沪/申 & 上海\\ -江苏省 & 苏 & 南京市\\ -浙江省 & 浙 & 杭州市\\ -安徽省 & 皖 & 合肥市\\ -福建省 & 闽 & 福州市\\ -江西省 & 赣 & 南昌市\\ -山东省 & 鲁 & 济南市\\ -河南省 & 豫 & 郑州市\\ -湖北省 & 鄂 & 武汉市\\ -湖南省 & 湘 & 长沙市\\ -广东省 & 粤 & 广州市\\ -广西壮族自治区 & 桂 & 南宁市\\ -海南省 & 琼 & 海口市\\ -重庆市 & 渝 & 重庆\\ -四川省 & 川/蜀 & 成都市\\ -贵州省 & 黔/贵 & 贵阳市\\ -云南省 & 云/滇 & 昆明市\\ -西藏自治区 & 藏 & 拉萨市\\ -陕西省 & 陕/秦 & 西安市\\ -甘肃省 & 甘/陇 & 兰州市\\ -青海省 & 青 & 西宁市\\ -宁夏回族自治区 & 宁 & 银川市\\ -新疆维吾尔自治区 & 新 & 乌鲁木齐市\\ -香港特别行政区 & 港 & 香港\\ -澳门特别行政区 & 澳 & 澳门\\ -台湾省 & 台 & 台北市\\ -\end{longtable}\normalsize 此长表格~\ref{table2}~第~2~页的标题“编号(续表)”和表头是通过代码自动添加上去的,无需人工添加,若表格在页面中的竖直位置发生了变化,长表格在第~2~页 及之后各页的标题和表头位置能够始终处于各页的最顶部,也无需人工调整,\LaTeX~系统的这一优点是~word~等软件所无法比拟的。 @@ -347,7 +433,7 @@ some cells of tables are too long] 首先给出这种情况下的一个例子如表~\ref{table3}~所示。 \begin{table}[htbp] \centering -\bicaption[table3]{}{最小的三个正整数的英文表示法}{Table$\!$}{The English construction of the smallest three positive integral numbers}\vspace{0.5em}\wuhao +\bicaption[table4]{}{最小的三个正整数的英文表示法}{Table$\!$}{The English construction of the smallest three positive integral numbers}\vspace{0.5em}\wuhao \begin{tabularx}{0.7\textwidth}{llX} \toprule[1.5pt] Value & Name & Alternate names, and names for sets of the given size\\\midrule[1pt] @@ -389,6 +475,28 @@ need to be annotated] 需要转页的代码放入一个新的\verb|tabularx|环境中,将原来的一个\verb|tabularx|环境 拆分为两个\verb|tabularx|环境。 +\subsubsection{排版横版表格的举例}[An example of landscape table] + +\begin{table}[p] +\centering +\begin{sideways} +\begin{minipage}{\textheight} +\bicaption[table2]{}{不在规范中规定的横版表格}{Table$\!$}{A table style which is not stated in the regulation} +\vspace{0.5em}\centering\wuhao +\begin{tabular}{ccccc} +\toprule[1.5pt] +$D$(in) & $P_u$(lbs) & $u_u$(in) & $\beta$ & $G_f$(psi.in)\\ +\midrule[1pt] + 5 & 269.8 & 0.000674 & 1.79 & 0.04089\\ +10 & 421.0 & 0.001035 & 3.59 & 0.04089\\ +20 & 640.2 & 0.001565 & 7.18 & 0.04089\\ +\bottomrule[1.5pt] +\end{tabular} +\end{minipage} +\end{sideways} +\end{table} + + \section{公式} 与正常\LaTeX\ 使用方法一致,此处略。关于公式中符号样式的定义在`hithesis.sty'有示 例。 @@ -430,6 +538,7 @@ need to be annotated] 处下载。 \subsection{专业绘图工具}[Processional drawing tool] +\label{drawtool} 推荐使用tikz包,使用tikz源码绘图的好处是,图片中的字体与正文中的字体一致。具体如 何使用tikz绘图不属于模板范畴。 tikz适合用来画不需要大量实验数据支撑示意图。但R语言等专业绘图工具具有画出各种、 @@ -444,7 +553,7 @@ tikz适合用来画不需要大量实验数据支撑示意图。但R语言等专 推荐使用glossaries包管理术语、缩略语,可以自动生成首次全写,非首次缩写。 \subsection{\TeX\ 源码编辑器}[\TeX editor] -推荐:(1)付费软件Winedt;(2)免费软件kile;(3)vim或emaces或sublime等神级编 +推荐:(1)付费软件Winedt;(2)免费软件kile;(3)vim或emacs或spacemacs等神级编 译器(需要配置)。 \subsection{\LaTeX\ 排版重要原则}[\LaTeX\ typesetting rules] diff --git a/Master/texmf-dist/doc/latex/hithesis/dtx-style.sty b/Master/texmf-dist/doc/latex/hithesis/dtx-style.sty index b60aaa0f32f..b9f52afc586 100644 --- a/Master/texmf-dist/doc/latex/hithesis/dtx-style.sty +++ b/Master/texmf-dist/doc/latex/hithesis/dtx-style.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2017-2018 by Chu Yanshuo +%% Copyright (C) 2017-2019 by Chu Yanshuo %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3a diff --git a/Master/texmf-dist/doc/latex/hithesis/front/cover.tex b/Master/texmf-dist/doc/latex/hithesis/front/cover.tex index 4cff7b6c06a..9a1d61a8700 100644 --- a/Master/texmf-dist/doc/latex/hithesis/front/cover.tex +++ b/Master/texmf-dist/doc/latex/hithesis/front/cover.tex @@ -17,9 +17,10 @@ %========= % 中文信息 %========= - ctitleone={局部多孔质气体静压}, - ctitletwo={轴承关键技术的研究}, - ctitle={局部多孔质气体静压轴承关键技术的研究}, + ctitleone={局部多孔质气体静压},%本科生封面使用 + ctitletwo={轴承关键技术的研究},%本科生封面使用 + ctitlecover={局部多孔质气体静压轴承关键技术的研究},%放在封面中使用,自由断行 + ctitle={局部多孔质气体静压轴承关键技术的研究},%放在原创性声明中使用 csubtitle={一条副标题}, %一般情况没有,可以注释掉 cxueke={工学}, csubject={机械制造及其自动化}, @@ -29,7 +30,7 @@ cassosupervisor={某某某教授}, % 副指导老师 ccosupervisor={某某某教授}, % 联合指导老师 % 日期自动使用当前时间,若需指定按如下方式修改: - cdate={超新星纪元}, + %cdate={超新星纪元}, cstudentid={9527}, cstudenttype={同等学力人员}, %非全日制教育申请学位者 %(同等学力人员)、(工程硕士)、(工商管理硕士)、 diff --git a/Master/texmf-dist/doc/latex/hithesis/hithesis.pdf b/Master/texmf-dist/doc/latex/hithesis/hithesis.pdf index fd7ba2f5fa7..ce315baaa3a 100644 Binary files a/Master/texmf-dist/doc/latex/hithesis/hithesis.pdf and b/Master/texmf-dist/doc/latex/hithesis/hithesis.pdf differ diff --git a/Master/texmf-dist/doc/latex/hithesis/latexmkrc b/Master/texmf-dist/doc/latex/hithesis/latexmkrc index c3919ae2575..8f73cb3286e 100644 --- a/Master/texmf-dist/doc/latex/hithesis/latexmkrc +++ b/Master/texmf-dist/doc/latex/hithesis/latexmkrc @@ -1,3 +1,16 @@ # vim: set ft=perl: -$clean_ext = 'thm glo gls bbl hd loe'; -$makeindex = 'splitindex main -- -s hithesis.ist'; +@default_files = ('main.tex'); + +$pdf_mode = 1; +$bibtex_use = 2; +$recorder = 1; +$preview_continuous_mode = 1; +$clean_ext = "synctex.gz acn acr alg aux bbl bcf blg brf fdb_latexmk glg glo gls idx ilg ind lof log lot out run.xml toc pdf thm toe ist idx"; +$pdflatex = "xelatex -file-line-error --shell-escape -src-specials -synctex=1 -interaction=nonstopmode %O %S;cp %D %R.pdf"; +$pdf_update_method = 0; + +@cus_dep_list = (@cus_dep_list, "idx ind 0 makenomenclature"); +sub makenomenclature { + system("splitindex $_[0] -- -s $_[0].ist"); } +@generated_exts = (@generated_exts, 'glo'); + diff --git a/Master/texmf-dist/doc/latex/hithesis/main.pdf b/Master/texmf-dist/doc/latex/hithesis/main.pdf index b993ba0c541..515665ee409 100644 Binary files a/Master/texmf-dist/doc/latex/hithesis/main.pdf and b/Master/texmf-dist/doc/latex/hithesis/main.pdf differ diff --git a/Master/texmf-dist/doc/latex/hithesis/main.tex b/Master/texmf-dist/doc/latex/hithesis/main.tex index 31ac330ab07..5c632115a8a 100644 --- a/Master/texmf-dist/doc/latex/hithesis/main.tex +++ b/Master/texmf-dist/doc/latex/hithesis/main.tex @@ -1,5 +1,5 @@ % !Mode:: "TeX:UTF-8" -\documentclass[capcenterlast=true,subcapcenterlast=true,openright=false,fontset=windowsnew,type=doctor]{hithesis} +\documentclass[newtxmath=true,newgeometry=two,capcenterlast=true,subcapcenterlast=true,openright=true,absupper=true,fontset=windowsnew,type=doctor]{hithesis} % 此处选项中不要有空格 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 必填选项 @@ -36,9 +36,11 @@ % subtitle=true|false % 含义:论文题目是否含有副标题,缺省值为false,如果有要在cover中设置副标 % 题内容,封面中显示。 -% newgeometry=true|false +% newgeometry=one|two % 含义:规范中的自相矛盾之处,版芯是否包含页眉页脚,旧方法是按照包含页眉 -% 页脚来设置,缺省值为false,即旧方法。 +% 页脚来设置。该选项是多选选项,如果没有这个选项,缺省值是旧模板的版芯设 +% 置方法,如果设置该选项one或two,分别对应两种页眉页码对应版芯线的相对位 +% 置。第一种是严格按照规范要求,难看。第二种微调了页眉页码位置,好一点。 % debug=true|false % 含义:是否显示版芯框和行号,用来调试。默认否。 % openright=true|false @@ -53,6 +55,22 @@ % subcapcenterlast=true|false % 含义:子图图题最后一行是否居中对齐(我工规范要求居中,但不要求居中对齐 % ),此选项不在规范要求中,按个人喜好自行决定。默认否。 +% absupper=true|false +% 含义:中文目录中的英文索引在中文目录中的大小写样式歧义,在规范中要求首 +% 字母大写,在work样例中是全大写。该选项控制是否全大写。默认否。 +% bsmainpagenumberline=true|false +% 含义:由于本科生论文官方模板的页码和页眉格式混乱,提供这个选项自定义设 +% 置是否在正文中显示页码横线,默认否。 +% bsfrontpagenumberline=true|false +% 含义:由于本科生论文官方模板的页码和页眉格式混乱,提供这个选项自定义设 +% 置是否在前文中显示页码横线,默认否。 +% bsheadrule=true|false +% 含义:由于本科生论文官方模板的页码和页眉格式混乱,提供这个选项自定义设 +% 置是否显示页眉横线,默认显示。 +% splitbibitem=true|false +% 含义:参考文献每一个条目内能不能断页,应广大刀客要求添加。默认否。 +% newtxmath=true|false +% 含义:数学字体是否使用新罗马。默认是。 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{hithesis} diff --git a/Master/texmf-dist/doc/latex/hithesis/reference.bib b/Master/texmf-dist/doc/latex/hithesis/reference.bib index 5b4b2604872..49e0405fb15 100644 --- a/Master/texmf-dist/doc/latex/hithesis/reference.bib +++ b/Master/texmf-dist/doc/latex/hithesis/reference.bib @@ -1,5 +1,11 @@ % !Mode:: "TeX:UTF-8" - +@ONLINE{DoeOnline, +author = {Doe, Ringo}, +title = {This is a test entry of type {@ONLINE}}, +month = jun, +year = {2009}, +url = {http://www.test.org/doe/} +} @INPROCEEDINGS{cnproceed, author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝}, title = {武林高手从入门到精通}, diff --git a/Master/texmf-dist/makeindex/hithesis/hithesis.ist b/Master/texmf-dist/makeindex/hithesis/hithesis.ist index 77b72ed7d00..061be8b7ef9 100644 --- a/Master/texmf-dist/makeindex/hithesis/hithesis.ist +++ b/Master/texmf-dist/makeindex/hithesis/hithesis.ist @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2017-2018 by Chu Yanshuo +%% Copyright (C) 2017-2019 by Chu Yanshuo %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3a @@ -23,10 +23,10 @@ %% This is the configuration file of the hithesis package with LaTeX2e. %% headings_flag 1 -heading_prefix "\{\\centering\\normalsize\\textbf\{" +heading_prefix "\{\\vskip -\\baselineskip\\centering\\normalsize\\textbf\{" heading_suffix "\}\\par\}\\nopagebreak\\wuhao\n" -delim_0 "\\hspace{2em}" -delim_1 "\\hspace{2em}" +delim_0 "\\hspace*{\\fill}" +delim_1 "\\hspace*{\\fill}" \endinput %% %% End of file `hithesis.ist'. diff --git a/Master/texmf-dist/source/latex/hithesis/Makefile b/Master/texmf-dist/source/latex/hithesis/Makefile new file mode 100644 index 00000000000..337d8d0561e --- /dev/null +++ b/Master/texmf-dist/source/latex/hithesis/Makefile @@ -0,0 +1,108 @@ +# Makefile for ThuThesis + +# Compiling method: latexmk/xelatex/pdflatex +METHOD = xelatex +# Set opts for latexmk if you use it +LATEXMKOPTS = -xelatex +# Basename of thesis +THESISMAIN = main + +PACKAGE=hithesis +SOURCES=$(PACKAGE).ins $(PACKAGE).dtx +THESISCONTENTS=$(THESISMAIN).tex front/*.tex body/*.tex back/*.tex $(FIGURES) *.bst +# NOTE: update this to reflect your local file types. +FIGURES=$(wildcard figures/*.eps figures/*.pdf) +BIBFILE=*.bib +CLSFILES=dtx-style.sty $(PACKAGE).cls $(PACKAGE).ist h$(PACKAGE).cfg + +# make deletion work on Windows +ifdef SystemRoot + RM = del /Q + OPEN = start +else + RM = rm -f + OPEN = open +endif + +.PHONY: all clean distclean dist thesis viewthesis doc viewdoc cls check FORCE_MAKE + +all: doc thesis + +cls: $(CLSFILES) + +$(CLSFILES): $(SOURCES) + latex $(PACKAGE).ins + +viewdoc: doc + $(OPEN) $(PACKAGE).pdf + +doc: $(PACKAGE).pdf + +viewthesis: thesis + $(OPEN) $(THESISMAIN).pdf + +thesis: $(THESISMAIN).pdf + +ifeq ($(METHOD),latexmk) + +$(PACKAGE).pdf: $(CLSFILES) FORCE_MAKE + $(METHOD) $(LATEXMKOPTS) $(PACKAGE).dtx + +$(THESISMAIN).pdf: $(CLSFILES) FORCE_MAKE + $(METHOD) $(LATEXMKOPTS) $(THESISMAIN) + +else ifeq ($(METHOD),xelatex) + +$(PACKAGE).pdf: $(CLSFILES) + $(METHOD) $(PACKAGE).dtx + makeindex -s gind.ist -o $(PACKAGE).ind $(PACKAGE).idx + makeindex -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo + $(METHOD) $(PACKAGE).dtx + $(METHOD) $(PACKAGE).dtx + +$(THESISMAIN).idx: $(THESISMAIN).bbl + $(METHOD) $(THESISMAIN) + $(METHOD) $(THESISMAIN) + + +$(THESISMAIN)_china.idx : $(CLSFILES) $(THESISMAIN).bbl $(THESISMAIN).idx + splitindex $(THESISMAIN) -- -s $(PACKAGE).ist # 自动生成索引 + +$(THESISMAIN)_english.ind $(THESISMAIN)_china.ind $(THESISMAIN)_english.idx : $(THESISMAIN)_china.idx + +$(THESISMAIN).pdf: $(CLSFILES) $(THESISCONTENTS) $(THESISMAIN)_china.ind $(THESISMAIN)_china.idx $(THESISMAIN)_english.ind $(THESISMAIN)_english.idx $(THESISMAIN).bbl + $(METHOD) $(THESISMAIN) + splitindex $(THESISMAIN) -- -s $(PACKAGE).ist # 自动生成索引 + $(METHOD) $(THESISMAIN) + +$(THESISMAIN).bbl: $(BIBFILE) + $(METHOD) $(THESISMAIN) + -bibtex $(THESISMAIN) + $(RM) $(THESISMAIN).pdf + +else +$(error Unknown METHOD: $(METHOD)) + +endif + +clean: + latexmk -c $(PACKAGE).dtx + latexmk -c $(THESISMAIN) + -@$(RM) *~ *.idx *.ind *.ilg *.thm *.toe *.bbl + +cleanall: clean + -@$(RM) $(PACKAGE).pdf $(THESISMAIN).pdf + +distclean: cleanall + -@$(RM) $(CLSFILES) + -@$(RM) -r dist + +check: FORCE_MAKE + ag 'Harbin Institute of Technology Template|\\def\\version|"version":' hithesis.dtx package.json + +dist: all + @if [ -z "$(version)" ]; then \ + echo "Usage: make dist version=[x.y.z | ctan]"; \ + else \ + npm run build -- --version=$(version); \ + fi diff --git a/Master/texmf-dist/source/latex/hithesis/hithesis.dtx b/Master/texmf-dist/source/latex/hithesis/hithesis.dtx index 7ec3d376787..5cddf61a13c 100644 --- a/Master/texmf-dist/source/latex/hithesis/hithesis.dtx +++ b/Master/texmf-dist/source/latex/hithesis/hithesis.dtx @@ -16,7 +16,7 @@ % % \iffalse %<*driver> -\ProvidesFile{hithesis.dtx}[2017/11/5 1.0.9 Harbin Institute of Technology Thesis Template] +\ProvidesFile{hithesis.dtx}[2018/12/05 2.0.6 Harbin Institute of Technology Thesis Template] \documentclass{ltxdoc} \usepackage{dtx-style} @@ -377,6 +377,7 @@ % 如果有副标题,需要在封面选项中设置subtitle=true,否则不显示副标题。 % \begin{latex} % \hitsetup{ +% ctitlecover={封面中文题目可断行}, % ctitle={论文中文题目}, % etitle={Thesis English Title}, % csubtitle={论文中文副题目(如果有)}, @@ -940,7 +941,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesClass{hithesis} %\ProvidesFile{hithesis.cfg} -%[2017/11/5 1.0.9 Harbin Institute of Technology] +%[2018/12/05 2.0.6 Harbin Institute of Technology Thesis Template] % \end{macrocode} % % \subsection{定义选项} @@ -962,6 +963,16 @@ \hit@doctorfalse \expandafter\csname hit@#1true\endcsname} % \end{macrocode} +% 设置版芯,由于窝工版芯歧义。 +% \changes{v2.0.0}{2018/6/14}{此处添加geometry选项} +% \begin{macrocode} +\newif\ifhit@geometrynewone +\newif\ifhit@geometrynewtwo +\define@key{hit}{newgeometry}{% + \hit@geometrynewonefalse + \hit@geometrynewtwofalse + \expandafter\csname hit@geometrynew#1true\endcsname} +% \end{macrocode} % 目录中英文是否用 Arial 字体(默认关闭)。 % \begin{macrocode} \DeclareBoolOption[false]{arialtoc} @@ -1008,10 +1019,7 @@ % \begin{macrocode} \DeclareBoolOption[false]{debug} % \end{macrocode} -% 是否使用新的版心设置(默认否)。 -% \begin{macrocode} -\DeclareBoolOption[false]{newgeometry} -% \end{macrocode} +% \changes{v2.0.0}{2018/6/14}{此处删除newgeometry选项} % 是否使用右开页(默认否)。 % \begin{macrocode} \DeclareBoolOption[false]{openright} @@ -1026,6 +1034,28 @@ % \begin{macrocode} \DeclareBoolOption[false]{subcapcenterlast} % \end{macrocode} +% 中文目录中Abstract是否均为大写 +% \changes{v1.0.13}{2018/4/5}{此处添加中文目录中Abstract是否均为大写选项} +% \begin{macrocode} +\DeclareBoolOption[false]{absupper} +% \end{macrocode} +% 此处添加控制本科论文的页码横线选项 +% \changes{v1.0.15}{2018/06/05}{添加控制本科论文的页码横线选项} +% \begin{macrocode} +\DeclareBoolOption[false]{bsmainpagenumberline} +\DeclareBoolOption[false]{bsfrontpagenumberline} +\DeclareBoolOption[true]{bsheadrule} +% \end{macrocode} +% 数学字体是否使用新罗马 +% \changes{v2.0.5}{2018/12/05}{添加数学字体开关} +% \begin{macrocode} +\DeclareBoolOption[true]{newtxmath} +% \end{macrocode} +% 此处应广大刀客要求添加一参考文献分割开关 +% \changes{v2.0.3}{2018/10/08}{添加参考文献分割开关} +% \begin{macrocode} +\DeclareBoolOption[false]{splitbibitem} +% \end{macrocode} % 声明字体选项。 % \begin{macrocode} \DeclareStringOption{fontset} @@ -1114,11 +1144,15 @@ % \begin{macrocode} \RequirePackage{amsmath} % \end{macrocode} -% % \pkg{newtx} 设置 Times New Roman,Helvetica。 % \begin{macrocode} \RequirePackage[defaultsups]{newtxtext} +% \end{macrocode} +% 添加数学字体开关 +% \begin{macrocode} +\ifhit@newtxmath \RequirePackage{newtxmath} +\fi % \end{macrocode} % \pkg{newtx} 的 Mono 字体虽然很好看,但在论文中不常见。学校虽未要求 Mono 字体, % 还是选择常见的 Courier 字体。由于比较新的实现 \TeX\ Gyre Cursor 会修 @@ -1208,26 +1242,42 @@ ignoreall, nomarginpar, } -\ifhit@newgeometry% -\geometry{ - centering, - text={150true mm,240true mm}, - left=30true mm, - head=5true mm, - headsep=0true mm, - footskip=0true mm, - foot=0true mm -} +% \end{macrocode} +% 添加版芯设置选项 +% \changes{v2.0.0}{2018/6/14}{添加版芯设置选项} +% \begin{macrocode} +\ifhit@geometrynewtwo% + \geometry{ + centering, + text={150true mm,236true mm}, + left=30true mm, + head=5true mm, + headsep=2true mm, + footskip=0true mm, + foot=5.2true mm + } \else% -\geometry{%根据PlutoThesis 原版定义而来 - text={150true mm,224true mm}, - top=35.5true mm, - left=30true mm, - head=5true mm, - headsep=2.5true mm, - foot=8.5true mm -} -\fi + \ifhit@geometrynewone% + \geometry{ + centering, + text={150true mm,240true mm}, + left=30true mm, + head=5true mm, + headsep=0true mm, + footskip=0true mm, + foot=0true mm + } + \else% + \geometry{%根据PlutoThesis 原版定义而来 + text={150true mm,224true mm}, + top=35.5true mm, + left=30true mm, + head=5true mm, + headsep=2.5true mm, + foot=8.5true mm + } + \fi% +\fi% % \end{macrocode} % 载入显示行号的包。 % \changes{v1.0.9}{2018/01/07}{添加debug包} @@ -1247,6 +1297,11 @@ % \begin{macrocode} \RequirePackage{tabularx} \RequirePackage{varwidth} +% \end{macrocode} +% 此处changepage环境用来控制索引页面的左右边距,规范中给出的示例的边距要大于正文。 +% \changes{v1.0.10}{2018/02/19}{修改了索引的间距,使其更符合规范中的示例} +% \begin{macrocode} +\RequirePackage{changepage} \RequirePackage{multicol} \RequirePackage{amssymb} \RequirePackage[below]{placeins}%允许上一个section的浮动图形出现在下一个section的开始部分,还提供\FloatBarrier命令,使所有未处理的浮动图形立即被处理 @@ -1266,13 +1321,14 @@ % % \end{macrocode} % 我工要求的索引格式。 +% \changes{v1.0.10}{2018/02/19}{修改了索引的间距,使其更符合规范中的示例} % \begin{macrocode} %<*ist> headings_flag 1 -heading_prefix "\{\\centering\\normalsize\\textbf\{" +heading_prefix "\{\\vskip -\\baselineskip\\centering\\normalsize\\textbf\{" heading_suffix "\}\\par\}\\nopagebreak\\wuhao\n" -delim_0 "\\hspace{2em}" -delim_1 "\\hspace{2em}" +delim_0 "\\hspace*{\\fill}" +delim_1 "\\hspace*{\\fill}" % % \end{macrocode} % 排版logo。 @@ -1455,14 +1511,11 @@ delim_1 "\\hspace{2em}" \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} } - -\fancypagestyle{hit@plain}{% - \fancyhead{} - \fancyfoot[C]{\xiaowu\thepage} - \renewcommand{\headrulewidth}{0pt} - \renewcommand{\footrulewidth}{0pt} -} - +% \end{macrocode} +% 此处根据本科生模板的多种版本,提供选项自定义页码、页眉样式。 +% \changes{v1.0.15}{2018/06/05}{添加控制本科论文的页码横线选项} +% \changes{v1.0.15}{2018/06/05}{删除冗余的页面格式} +% \begin{macrocode} \fancypagestyle{hit@headings}{% \fancyhf{} \ifhit@doctor @@ -1475,23 +1528,32 @@ delim_1 "\\hspace{2em}" \fi \ifhit@bachelor \fancyhead[C]{\songti\xiaowu[0]\hit@cschoolname\hit@bachelor@cxuewei\hit@bachelor@cthesisname}% - \fancyfoot[C]{\xiaowu \thepage} + \fancyfoot[C]{\xiaowu\if@mainmatter\ifhit@bsmainpagenumberline-~\thepage~-\else\thepage\fi\else\ifhit@bsfrontpagenumberline-~\thepage~-\else\thepage\fi\fi} + \ifhit@bsheadrule + \renewcommand{\headrule}{ + \vskip 1.190132pt + \hrule\@height2.276208pt\@width\headwidth + \vskip 0.75pt + \hrule\@height.75pt\@width\headwidth + } \else - \fancyfoot[C]{\xiaowu -~\thepage~-} + \renewcommand{\headrulewidth}{0pt} + \fi + \else + \fancyfoot[C]{\xiaowu-~\thepage~-} + \renewcommand{\headrule}{ + \vskip 1.190132pt + \hrule\@height2.276208pt\@width\headwidth + \vskip 0.75pt + \hrule\@height.75pt\@width\headwidth + } \fi % 此处可能和word模板不一致 % 页眉中小五汉字,0行距时,占用9bt,页眉高度为14pt, 所以以下数字之和要保持等于14pt-9bt=4.96634pt % 根据PlutoThesis模板中rule宽度定义为2.25, 0.75, 保持粗线和细线之间的间距为细线宽度。 % 如果页眉是多行的情况,rule向下溢出 - \renewcommand{\headrule}{ - \vskip 1.190132pt - \hrule\@height2.276208pt\@width\headwidth - \vskip 0.75pt - \hrule\@height.75pt\@width\headwidth - } \renewcommand{\footrulewidth}{0pt} } - \AtBeginDocument{%此处解决页眉经典bug \pagestyle{hit@empty} \renewcommand{\chaptermark}[1]{\@mkboth{\CTEXthechapter\enspace#1}{}}} @@ -1501,7 +1563,6 @@ delim_1 "\\hspace{2em}" % \end{macro} % \end{macro} % -% % \subsubsection{段落} % \label{sec:paragraph} % @@ -1559,8 +1620,10 @@ delim_1 "\\hspace{2em}" %<*cls> \allowdisplaybreaks[4] \predisplaypenalty=0 %公式之前可以换页,公式出现在页面顶部 +\postdisplaypenalty=0 \renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} % \end{macrocode} +% \changes{v2.0.3}{2018/10/08}{设置公式前后随意断页} % 公式距前后文的距离由 4 个参数控制,参见 \cs{normalsize} 的定义。 % 同时为了让 \pkg{amsmath} 的 \cs{tag*} 命令得到正确的格式,我们必须修改这些代 % 码。\cs{make@df@tag} 是定义 \cs{tag*} 和 \cs{tag} 内部命令的。 @@ -1598,7 +1661,11 @@ delim_1 "\\hspace{2em}" \newtheorem*{proof}{证明} \theoremstyle{plain} \theoremsymbol{} -\theoremseparator{:} +% \end{macrocode} +% 此处去除了冒号,(如果需要在加上这个冒号?),反正规范中没有。 +% \changes{v2.0.2}{2018/06/28}{取出了定理冒号} +% \begin{macrocode} +\theoremseparator{} \newtheorem{assumption}{假设}[chapter] \newtheorem{definition}{定义}[chapter] \newtheorem{proposition}{命题}[chapter] @@ -1619,13 +1686,14 @@ delim_1 "\\hspace{2em}" % \changes{v1.0.9}{2018/01/07}{修正float垂直间距bug} % \begin{macrocode} %<*cls> -\setlength{\floatsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\intextsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\textfloatsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\@fptop}{0bp} -\setlength{\@fpsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\@fpbot}{0bp} +\setlength{\intextsep}{\ifhit@glue 8.50398bp \@plus 2.83465bp \@minus 0bp\else 8.50398bp\fi} +\setlength{\textfloatsep}{\ifhit@glue 8.50398bp \@plus 2.83465bp \@minus 0bp\else 8.50398bp\fi} +\setlength{\floatsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 20.50398bp\fi} % \end{macrocode} +% 此处设置float在p选项时间隔,此处不设置\cs{@fptop}和\cs{@fpbot}以确保居中。 +% \changes{v1.0.12}{2018/04/03}{修正float为p状态时默认不居中bug} +% \changes{v2.0.4}{2018/12/04}{删除\cs{@fpsep}设置,似乎没有什么用} +% \changes{v2.0.4}{2018/12/04}{更新\cs{intextsep}\cs{textfloatsep}\cs{floatsep}间距为正文行间距} % 下面这组命令使浮动对象的缺省值稍微宽松一点,从而防止幅度对象占据过多的文本页面, % 也可以防止在很大空白的浮动页上放置很小的图形。 % \changes{v1.0.8}{2017/11/5}{修改附录中图、表、公式数字编码} @@ -1639,16 +1707,9 @@ delim_1 "\\hspace{2em}" \renewcommand{\floatpagefraction}{0.60} % \end{macrocode} % 由于我工的双标题,导致标题之下多出一空白字符的距离,去除。 -% \begin{macrocode} -\let\hit@oldfigure\figure -\let\hit@oldendfigure\endfigure -\def\figure{\begingroup\hit@oldfigure} -\def\endfigure{\vskip-1em\hit@oldendfigure\endgroup} -\let\hit@oldtable\table -\let\hit@oldendtable\endtable -\def\table{\begingroup\hit@oldtable} -\def\endtable{\vskip-1em\hit@oldendtable\endgroup} -% \end{macrocode} +% \changes{v2.0.4}{2018/12/04}{更新图段后空白距离} +% \changes{v2.0.4}{2018/12/04}{删除表段后空白距离} +% \changes{v2.0.5}{2018/12/05}{删除图段后空白距离} % \begin{macro}{\@makecaption} % 根据我工规范,本科和硕博的图题序号之后的空格不一样。 % \begin{hitrgu}[\PGR][2.13.1] @@ -1755,8 +1816,13 @@ delim_1 "\\hspace{2em}" \setlength{\listparindent}{0pt} % 段落缩进量 }} {\end{list}} +% \end{macrocode} % 设置定理定义格式 -\theoremstyle{plain} +% \changes{v2.0.1}{2018/6/28}{去除定理注释括号} +% \begin{macrocode} +\renewtheoremstyle{plain} +{\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\theorem@separator]} +{\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ ##3\theorem@separator]} \theorembodyfont{\songti\rmfamily} \theoremheaderfont{\heiti\rmfamily} \theoremsymbol{$\square$} @@ -1789,8 +1855,11 @@ delim_1 "\\hspace{2em}" \newcommand\equationname{公式} \newcommand{\cabstractcname}{摘\hspace{\ccwd}要} \newcommand{\cabstractename}{Abstract (In Chinese)} +% \end{macrocode} +% 此处删除冗余选项 +% \changes{v1.0.13}{2018/4/5}{此处删除冗余的Abstract标题} +% \begin{macrocode} \newcommand{\eabstractcname}{Abstract} -\def\hit@doctor@eabstract@ename{ABSTRACT} \newcommand{\eabstractename}{Abstract (In English)} \newcommand{\hit@ckeywords@title}{关键词:} \def\hit@ckeywords@separator{;} @@ -1807,7 +1876,11 @@ delim_1 "\\hspace{2em}" \or\def\CJK@today{\CJK@todaysmall} \or\def\CJK@today{\CJK@todaybig} \fi} -\cdate{\ifhit@bachelor\CJK@todaysmall\else\CJK@todaybig@short\fi} +% \end{macrocode} +% 按照word示范要求,此处使用阿拉伯数字 +% \changes{v1.0.14}{2018/05/06}{修正自动生成日期bug} +% \begin{macrocode} +\cdate{\ifhit@bachelor\CJK@todaysmall\else\CJK@todaysmall@short\fi} \edate{\ifcase \month \or January\or February\or March\or April\or May% \or June\or July \or August\or September\or October\or November \or December\fi\unskip,\ \ \the\year} @@ -1890,14 +1963,18 @@ delim_1 "\\hspace{2em}" } % \end{macrocode} % 设置附表、附录格式。 +% \changes{v1.0.13}{2018/4/5}{此处添加中文目录中Abstract是否均为大写选项} % \begin{macrocode} \NewDocumentCommand{\hit@appendix@chapter}{s m o}{% \IfBooleanT{#1}% { \phantomsection \markboth{#2}{#2} - \addcontentsline{toc}{chapter}{\ifhit@arialtitle\sffamily\heiti\else\heiti\fi #2} - \IfValueT{#3}{\addcontentsline{toe}{chapter}{\bfseries #3}} + \ifthenelse% + {\equal{#2}{\eabstractcname}}% + {\addcontentsline{toc}{chapter}{\texorpdfstring{\ifhit@arialtitle\sffamily\heiti\else\heiti\fi \ifhit@absupper\MakeUppercase{#2}\else#2\fi}{#2}}} + {\addcontentsline{toc}{chapter}{\texorpdfstring{\ifhit@arialtitle\sffamily\heiti\else\heiti\fi #2}{#2}}} + \IfValueT{#3}{\addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries #3}{#3}}} \hit@chapter*{#2} } } @@ -1905,7 +1982,11 @@ delim_1 "\\hspace{2em}" \newcommand{\BiAppChapter}[2] % 该附录命令适用于有章节的完整附录 {\phantomsection \chapter{#1} - \addcontentsline{toe}{chapter}{\bfseries \xiaosi Appendix \thechapter~~#2} +% \end{macrocode} +% 此处添加保护选项 +% \changes{v1.0.13}{2018/4/5}{添加\cs{texorpdfstring}命令去除书签中带有格式时的警告} +% \begin{macrocode} + \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries \xiaosi Appendix \thechapter~~#2}{Appendix \thechapter~~#2}} } % \end{macrocode} % 设置章节命令。s: 星号,表示在目录中出不出现序号。m: 必须要有的选项,中文章 @@ -1923,7 +2004,11 @@ delim_1 "\\hspace{2em}" {% if \chapter* \hit@chapter*{#3}% \IfValueT{#4}{% - \addcontentsline{toe}{chapter}{\bfseries #4} +% \end{macrocode} +% 此处添加保护选项 +% \changes{v1.0.13}{2018/4/5}{添加\cs{texorpdfstring}命令去除书签中带有格式时的警告} +% \begin{macrocode} + \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries #4}{#4}} } }% {% if \chapter @@ -1934,8 +2019,10 @@ delim_1 "\\hspace{2em}" % \end{macrocode} % 此处需删除章节的空白 % \changes{v1.0.5}{2017/09/20}{添加\cs{ignorespaces}选项,矫正英文目录多出一个空白而无法对其的bug} +% 此处添加保护选项 +% \changes{v1.0.13}{2018/4/5}{添加\cs{texorpdfstring}命令去除书签中带有格式时的警告} % \begin{macrocode} - \addcontentsline{toe}{chapter}{\bfseries\relax Chapter \thechapter\hspace{0.5em}\ignorespaces #4} + \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries\relax Chapter \thechapter\hspace{0.5em}\ignorespaces #4}{Chapter \thechapter\hspace{0.5em}\ignorespaces #4}} } } } @@ -2017,6 +2104,8 @@ delim_1 "\\hspace{2em}" % \subsubsection{定义封面} % \label{sec:cov} % 封面信息。 +% \changes{v1.0.11}{2018/03/07}{更改的中文标题,根据反馈,在封面中标题需要自由 +% 换行且不能影响到原创性声明。此处额外设置了一个变量ctitlecover。} % \begin{macrocode} \def\hit@def@term#1{% \define@key{hit}{#1}{\csname #1\endcsname{##1}} @@ -2028,6 +2117,7 @@ delim_1 "\\hspace{2em}" \hit@def@term{natclassifiedindex} %国内图书分类号 \hit@def@term{intclassifiedindex} %国际图书分类号 +\hit@def@term{ctitlecover} %中文标题封面 \hit@def@term{ctitle} %中文标题 \hit@def@term{csubtitle} %中文副标题 \hit@def@term{cxueke} %中文学科 @@ -2197,7 +2287,7 @@ delim_1 "\\hspace{2em}" \vspace*{1.2cm} \begin{center} \parbox[t][3.4cm][t]{\textwidth}{ - \begin{center}\erhao[0]\heiti\hit@ctitle\end{center} } + \begin{center}\erhao[0]\heiti\hit@ctitlecover\end{center} } \parbox[t][9cm][t]{\textwidth}{ \begin{center}\xiaoer[0]\songti\textbf{\hit@cauthor}\end{center} } @@ -2220,6 +2310,8 @@ delim_1 "\\hspace{2em}" % \end{macrocode} % 此处本科生使用了\hit\ 的logo且本科生论文标题使用了华文新魏字体,为了方便使用, % 此处使用了矢量化图片作为输入。 +% \changes{v1.0.11}{2018/03/07}{更改的中文标题,根据反馈,在封面中标题需要自由 +% 换行且不能影响到原创性声明。此处额外设置了一个变量ctitlecover。} % \begin{macrocode} \newcommand{\hit@second@titlepage@bachelor}{ \vspace*{0.8cm} @@ -2261,15 +2353,15 @@ delim_1 "\\hspace{2em}" \ifhit@fulltime\vspace{1.4cm}\else% \begin{center}\xiaoyi[1]\songti\textbf{\hit@cbraceleft\hit@cstudenttype\hit@cbraceright}\end{center} \fi% - \parbox[t][2.8cm][t]{\textwidth}{% - \begin{center}\erhao\heiti\hit@ctitle\end{center} -\ifhit@subtitle\begin{center}\hspace{-4em}\xiaoer\heiti\pozhehao\hit@csubtitle\end{center}\fi} - \parbox[t][5.1cm][t]{\textwidth}{%英文标题太长时可以采用\xiaoer + \parbox[t][7.8cm][t]{\textwidth}{% + \begin{center}\erhao\heiti\hit@ctitlecover\end{center} +\ifhit@subtitle\begin{center}\hspace{-4em}\xiaoer\heiti\pozhehao\hit@csubtitle\end{center}\fi \begin{center}% \settowidth{\hit@etitlelength}{\erhao\hit@etitle\ifhit@subtitle\hit@title@esep\hit@esubtitle\fi}% \ifdim\hit@etitlelength>450mm\xiaoer\else\erhao\fi% \textbf{\MakeUppercase{\hit@etitle}% \ifhit@subtitle\hit@title@esep\MakeUppercase{\hit@esubtitle}\fi}\end{center}} + \parbox[t][7.4cm][t]{\textwidth}{ \begin{center}\xiaoer\songti\textbf{\hit@cauthor}\end{center}} \parbox[t][1.4cm][t]{\textwidth}{ @@ -2296,7 +2388,7 @@ delim_1 "\\hspace{2em}" \begin{center}\songti\bfseries\hit@cdegree\hit@cthesisname\end{center} \ifhit@fulltime\relax\else\begin{center}\songti\textbf{\hit@cbraceleft\hit@cstudenttype\hit@cbraceright}\end{center}\fi} \parbox[t][5cm][t]{\textwidth}{\erhao - \begin{center}\heiti\hit@ctitle\end{center} + \begin{center}\heiti\hit@ctitlecover\end{center} \ifhit@subtitle\begin{center}\hspace{-4em}\xiaoer\heiti\pozhehao\hit@csubtitle\end{center}\fi} \parbox[t][9.8cm][b]{\textwidth} {\sihao @@ -2561,10 +2653,18 @@ delim_1 "\\hspace{2em}" \newenvironment{publication}{% \ifhit@openright\cleardoublepage\else\clearpage\fi \hit@appendix@chapter*{\hit@publication@ctitle}[\hit@publication@etitle]}{} - +% \end{macrocode} +% 此处中英文索引的格式设置尽量符合\PGR\ 中给出的示例的格式。此处间距常数是人工调节的。 +% \changes{v1.0.10}{2018/02/19}{修改了索引的间距,使其更符合规范中的示例} +% \begin{macrocode} \newenvironment{ceindex}{% \ifhit@openright\cleardoublepage\else\clearpage\fi - \hit@appendix@chapter*{\indexname}[\hit@index@etitle]\begin{multicols*}{2}}{\end{multicols*}} + \hit@appendix@chapter*{\indexname}[\hit@index@etitle] + \setlength{\columnsep}{4em} + \begin{adjustwidth}{2em}{2em} + \begin{multicols*}{2}}{\end{multicols*} + \end{adjustwidth} + } \newlist{idxwordlist}{description}{3} \setlist[idxwordlist, 1]{% @@ -2614,7 +2714,10 @@ delim_1 "\\hspace{2em}" \thispagestyle{hit@empty}% \phantomsection\addcontentsline{toc}{chapter}{\ifhit@bachelor\hit@declarename@bachelor\else\hit@authorization@ctitle\fi}% \ifhit@doctor% - \addcontentsline{toe}{chapter}{\bfseries \hit@authorization@etitle}% +% \end{macrocode} +% \changes{v1.0.13}{2018/4/5}{添加\cs{texorpdfstring}命令去除书签中带有格式时的警告} +% \begin{macrocode} + \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries \hit@authorization@etitle}{\hit@authorization@etitle}}% \fi% }]{#1}% }% @@ -2622,10 +2725,13 @@ delim_1 "\\hspace{2em}" \newcommand\bibstyle@numerical{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}} \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}} -\newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{,}} +% \end{macrocode} +% \changes{v2.0.6}{2018/12/5}{在\cs{inlinecite}内添加空格} +% \begin{macrocode} +\newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{\hit@inline@sep}} \citestyle{numerical} \DeclareRobustCommand\inlinecite{\@inlinecite} -\def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup} +\def\@inlinecite#1{\begingroup\citestyle{inline}\let\@cite\NAT@citenum\citep{#1}\endgroup} \let\onlinecite\inlinecite \renewenvironment{thebibliography}[1]{% \ifhit@openright\cleardoublepage\else\clearpage\fi\phantomsection% @@ -2642,10 +2748,20 @@ delim_1 "\\hspace{2em}" \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy\frenchspacing +% \end{macrocode} +% \changes{v2.0.3}{2018/10/08}{添加参考文献分割开关} +% \begin{macrocode} + \ifhit@splitbibitem + \clubpenalty0 + \@clubpenalty \clubpenalty + \widowpenalty0% + \interlinepenalty-50% + \else \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \interlinepenalty4000% + \fi \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% @@ -2806,7 +2922,9 @@ delim_1 "\\hspace{2em}" %{《\hit 研究生学位论文撰写规范》}} %\def\UGR{\href{http://jwc.hit.edu.cn/2566/list.htm} %{《\hit 本科生毕业论文撰写规范》}} +%\def\hit@inline@sep{,} % \end{macrocode} +% \changes{v2.0.6}{2018/12/5}{在\cs{inlinecite}内添加空格} % \begin{macrocode} %<*dtx-style> \NewDocumentEnvironment{hitrgu}{o o} diff --git a/Master/texmf-dist/tex/latex/hithesis/hithesis.cfg b/Master/texmf-dist/tex/latex/hithesis/hithesis.cfg index b93cdbd30d1..5b7e59d5d0c 100644 --- a/Master/texmf-dist/tex/latex/hithesis/hithesis.cfg +++ b/Master/texmf-dist/tex/latex/hithesis/hithesis.cfg @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2017-2018 by Chu Yanshuo +%% Copyright (C) 2017-2019 by Chu Yanshuo %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3a @@ -23,14 +23,14 @@ %% This is the configuration file of the hithesis package with LaTeX2e. %% \ProvidesFile{hithesis.cfg} -[2017/11/5 1.0.9 Harbin Institute of Technology] +[2018/12/05 2.0.6 Harbin Institute of Technology Thesis Template] \theorembodyfont{\normalfont} \theoremheaderfont{\normalfont\heiti} \theoremsymbol{\ensuremath{\square}} \newtheorem*{proof}{证明} \theoremstyle{plain} \theoremsymbol{} -\theoremseparator{:} +\theoremseparator{} \newtheorem{assumption}{假设}[chapter] \newtheorem{definition}{定义}[chapter] \newtheorem{proposition}{命题}[chapter] @@ -62,7 +62,6 @@ \newcommand{\cabstractcname}{摘\hspace{\ccwd}要} \newcommand{\cabstractename}{Abstract (In Chinese)} \newcommand{\eabstractcname}{Abstract} -\def\hit@doctor@eabstract@ename{ABSTRACT} \newcommand{\eabstractename}{Abstract (In English)} \newcommand{\hit@ckeywords@title}{关键词:} \def\hit@ckeywords@separator{;} @@ -79,7 +78,7 @@ \or\def\CJK@today{\CJK@todaysmall} \or\def\CJK@today{\CJK@todaybig} \fi} -\cdate{\ifhit@bachelor\CJK@todaysmall\else\CJK@todaybig@short\fi} +\cdate{\ifhit@bachelor\CJK@todaysmall\else\CJK@todaysmall@short\fi} \edate{\ifcase \month \or January\or February\or March\or April\or May% \or June\or July \or August\or September\or October\or November \or December\fi\unskip,\ \ \the\year} @@ -186,6 +185,7 @@ {《\hit 研究生学位论文撰写规范》}} \def\UGR{\href{http://jwc.hit.edu.cn/2566/list.htm} {《\hit 本科生毕业论文撰写规范》}} +\def\hit@inline@sep{,} \endinput %% %% End of file `hithesis.cfg'. diff --git a/Master/texmf-dist/tex/latex/hithesis/hithesis.cls b/Master/texmf-dist/tex/latex/hithesis/hithesis.cls index f3659498d67..e9dc36c4c86 100644 --- a/Master/texmf-dist/tex/latex/hithesis/hithesis.cls +++ b/Master/texmf-dist/tex/latex/hithesis/hithesis.cls @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2017-2018 by Chu Yanshuo +%% Copyright (C) 2017-2019 by Chu Yanshuo %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3a @@ -25,7 +25,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{hithesis} -[2017/11/5 1.0.9 Harbin Institute of Technology] +[2018/12/05 2.0.6 Harbin Institute of Technology Thesis Template] \RequirePackage{ifthen} \RequirePackage{kvoptions} \SetupKeyvalOptions{ @@ -40,6 +40,12 @@ \hit@masterfalse \hit@doctorfalse \expandafter\csname hit@#1true\endcsname} +\newif\ifhit@geometrynewone +\newif\ifhit@geometrynewtwo +\define@key{hit}{newgeometry}{% + \hit@geometrynewonefalse + \hit@geometrynewtwofalse + \expandafter\csname hit@geometrynew#1true\endcsname} \DeclareBoolOption[false]{arialtoc} \DeclareBoolOption[false]{arialtitle} \DeclareBoolOption[true]{raggedbottom} @@ -51,10 +57,15 @@ \DeclareBoolOption[true]{fulltime} \DeclareBoolOption[false]{subtitle} \DeclareBoolOption[false]{debug} -\DeclareBoolOption[false]{newgeometry} \DeclareBoolOption[false]{openright} \DeclareBoolOption[false]{capcenterlast} \DeclareBoolOption[false]{subcapcenterlast} +\DeclareBoolOption[false]{absupper} +\DeclareBoolOption[false]{bsmainpagenumberline} +\DeclareBoolOption[false]{bsfrontpagenumberline} +\DeclareBoolOption[true]{bsheadrule} +\DeclareBoolOption[true]{newtxmath} +\DeclareBoolOption[false]{splitbibitem} \DeclareStringOption{fontset} \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}} \ProcessKeyvalOptions* @@ -103,7 +114,9 @@ \RequirePackage{xparse} \RequirePackage{amsmath} \RequirePackage[defaultsups]{newtxtext} +\ifhit@newtxmath \RequirePackage{newtxmath} +\fi \RequirePackage{courier} \RequirePackage{graphicx} \RequirePackage{pdfpages} @@ -143,7 +156,18 @@ ignoreall, nomarginpar, } -\ifhit@newgeometry% +\ifhit@geometrynewtwo% +\geometry{ + centering, + text={150true mm,236true mm}, + left=30true mm, + head=5true mm, + headsep=2true mm, + footskip=0true mm, + foot=5.2true mm +} +\else% +\ifhit@geometrynewone% \geometry{ centering, text={150true mm,240true mm}, @@ -155,14 +179,15 @@ } \else% \geometry{%根据PlutoThesis 原版定义而来 - text={150true mm,224true mm}, - top=35.5true mm, - left=30true mm, - head=5true mm, - headsep=2.5true mm, - foot=8.5true mm +text={150true mm,224true mm}, +top=35.5true mm, +left=30true mm, +head=5true mm, +headsep=2.5true mm, +foot=8.5true mm } -\fi +\fi% +\fi% \ifhit@debug% \RequirePackage{layout} \RequirePackage{layouts} @@ -171,6 +196,7 @@ \RequirePackage{fancyhdr} \RequirePackage{tabularx} \RequirePackage{varwidth} +\RequirePackage{changepage} \RequirePackage{multicol} \RequirePackage{amssymb} \RequirePackage[below]{placeins}%允许上一个section的浮动图形出现在下一个section的开始部分,还提供\FloatBarrier命令,使所有未处理的浮动图形立即被处理 @@ -245,14 +271,6 @@ \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} } - -\fancypagestyle{hit@plain}{% - \fancyhead{} - \fancyfoot[C]{\xiaowu\thepage} - \renewcommand{\headrulewidth}{0pt} - \renewcommand{\footrulewidth}{0pt} -} - \fancypagestyle{hit@headings}{% \fancyhf{} \ifhit@doctor @@ -265,23 +283,32 @@ \fi \ifhit@bachelor \fancyhead[C]{\songti\xiaowu[0]\hit@cschoolname\hit@bachelor@cxuewei\hit@bachelor@cthesisname}% - \fancyfoot[C]{\xiaowu \thepage} + \fancyfoot[C]{\xiaowu\if@mainmatter\ifhit@bsmainpagenumberline-~\thepage~-\else\thepage\fi\else\ifhit@bsfrontpagenumberline-~\thepage~-\else\thepage\fi\fi} + \ifhit@bsheadrule + \renewcommand{\headrule}{ + \vskip 1.190132pt + \hrule\@height2.276208pt\@width\headwidth + \vskip 0.75pt + \hrule\@height.75pt\@width\headwidth + } \else - \fancyfoot[C]{\xiaowu -~\thepage~-} + \renewcommand{\headrulewidth}{0pt} + \fi + \else + \fancyfoot[C]{\xiaowu-~\thepage~-} + \renewcommand{\headrule}{ + \vskip 1.190132pt + \hrule\@height2.276208pt\@width\headwidth + \vskip 0.75pt + \hrule\@height.75pt\@width\headwidth + } \fi % 此处可能和word模板不一致 % 页眉中小五汉字,0行距时,占用9bt,页眉高度为14pt, 所以以下数字之和要保持等于14pt-9bt=4.96634pt % 根据PlutoThesis模板中rule宽度定义为2.25, 0.75, 保持粗线和细线之间的间距为细线宽度。 % 如果页眉是多行的情况,rule向下溢出 - \renewcommand{\headrule}{ - \vskip 1.190132pt - \hrule\@height2.276208pt\@width\headwidth - \vskip 0.75pt - \hrule\@height.75pt\@width\headwidth - } \renewcommand{\footrulewidth}{0pt} } - \AtBeginDocument{%此处解决页眉经典bug \pagestyle{hit@empty} \renewcommand{\chaptermark}[1]{\@mkboth{\CTEXthechapter\enspace#1}{}}} @@ -312,6 +339,7 @@ \apptocmd{\@makefntext}{\let\@makefnmark\hit@makefnmark}{}{} \allowdisplaybreaks[4] \predisplaypenalty=0 %公式之前可以换页,公式出现在页面顶部 +\postdisplaypenalty=0 \renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} \def\make@df@tag{\@ifstar\hit@make@df@tag@@\make@df@tag@@@} \def\hit@make@df@tag@@#1{\gdef\df@tag{\hit@maketag{#1}\def\@currentlabel{#1}}} @@ -326,12 +354,9 @@ \def\hit@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}} \def\tagform@#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}} \renewcommand{\eqref}[1]{\textup{(\ref{#1})}} -\setlength{\floatsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\intextsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\textfloatsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\@fptop}{0bp} -\setlength{\@fpsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 21bp\fi} -\setlength{\@fpbot}{0bp} +\setlength{\intextsep}{\ifhit@glue 8.50398bp \@plus 2.83465bp \@minus 0bp\else 8.50398bp\fi} +\setlength{\textfloatsep}{\ifhit@glue 8.50398bp \@plus 2.83465bp \@minus 0bp\else 8.50398bp\fi} +\setlength{\floatsep}{\ifhit@glue 20.50398bp \@plus 2.83465bp \@minus 0bp\else 20.50398bp\fi} \g@addto@macro\appendix{\renewcommand*{\thefigure}{\thechapter-\arabic{figure}}} \g@addto@macro\appendix{\renewcommand*{\thetable}{\thechapter-\arabic{table}}} \g@addto@macro\appendix{\renewcommand*{\theequation}{\thechapter-\arabic{equation}}} @@ -339,14 +364,6 @@ \renewcommand{\topfraction}{0.85} \renewcommand{\bottomfraction}{0.65} \renewcommand{\floatpagefraction}{0.60} -\let\hit@oldfigure\figure -\let\hit@oldendfigure\endfigure -\def\figure{\begingroup\hit@oldfigure} -\def\endfigure{\vskip-1em\hit@oldendfigure\endgroup} -\let\hit@oldtable\table -\let\hit@oldendtable\endtable -\def\table{\begingroup\hit@oldtable} -\def\endtable{\vskip-1em\hit@oldendtable\endgroup} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \wuhao\sbox\@tempboxa{#1\ifhit@bachelor\hskip\ccwd\else\enskip\fi#2}% @@ -410,7 +427,9 @@ \setlength{\listparindent}{0pt} % 段落缩进量 }} {\end{list}} -\theoremstyle{plain} +\renewtheoremstyle{plain} +{\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\theorem@separator]} +{\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ ##3\theorem@separator]} \theorembodyfont{\songti\rmfamily} \theoremheaderfont{\heiti\rmfamily} \theoremsymbol{$\square$} @@ -492,15 +511,18 @@ { \phantomsection \markboth{#2}{#2} - \addcontentsline{toc}{chapter}{\ifhit@arialtitle\sffamily\heiti\else\heiti\fi #2} - \IfValueT{#3}{\addcontentsline{toe}{chapter}{\bfseries #3}} + \ifthenelse% + {\equal{#2}{\eabstractcname}}% + {\addcontentsline{toc}{chapter}{\texorpdfstring{\ifhit@arialtitle\sffamily\heiti\else\heiti\fi \ifhit@absupper\MakeUppercase{#2}\else#2\fi}{#2}}} + {\addcontentsline{toc}{chapter}{\texorpdfstring{\ifhit@arialtitle\sffamily\heiti\else\heiti\fi #2}{#2}}} + \IfValueT{#3}{\addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries #3}{#3}}} \hit@chapter*{#2} } } \newcommand{\BiAppChapter}[2] % 该附录命令适用于有章节的完整附录 {\phantomsection \chapter{#1} - \addcontentsline{toe}{chapter}{\bfseries \xiaosi Appendix \thechapter~~#2} + \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries \xiaosi Appendix \thechapter~~#2}{Appendix \thechapter~~#2}} } \let\hit@chapter\chapter \RenewDocumentCommand{\chapter}{s o m o}{% @@ -509,7 +531,7 @@ {% if \chapter* \hit@chapter*{#3}% \IfValueT{#4}{% - \addcontentsline{toe}{chapter}{\bfseries #4} + \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries #4}{#4}} } }% {% if \chapter @@ -517,7 +539,7 @@ {\hit@chapter{#3}}% {\hit@chapter[#2]{#3}}% \IfValueT{#4}{% - \addcontentsline{toe}{chapter}{\bfseries\relax Chapter \thechapter\hspace{0.5em}\ignorespaces #4} + \addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries\relax Chapter \thechapter\hspace{0.5em}\ignorespaces #4}{Chapter \thechapter\hspace{0.5em}\ignorespaces #4}} } } } @@ -588,6 +610,7 @@ \hit@def@term{natclassifiedindex} %国内图书分类号 \hit@def@term{intclassifiedindex} %国际图书分类号 +\hit@def@term{ctitlecover} %中文标题封面 \hit@def@term{ctitle} %中文标题 \hit@def@term{csubtitle} %中文副标题 \hit@def@term{cxueke} %中文学科 @@ -650,7 +673,7 @@ \vspace*{1.2cm} \begin{center} \parbox[t][3.4cm][t]{\textwidth}{ - \begin{center}\erhao[0]\heiti\hit@ctitle\end{center} } + \begin{center}\erhao[0]\heiti\hit@ctitlecover\end{center} } \parbox[t][9cm][t]{\textwidth}{ \begin{center}\xiaoer[0]\songti\textbf{\hit@cauthor}\end{center} } @@ -710,15 +733,15 @@ \ifhit@fulltime\vspace{1.4cm}\else% \begin{center}\xiaoyi[1]\songti\textbf{\hit@cbraceleft\hit@cstudenttype\hit@cbraceright}\end{center} \fi% - \parbox[t][2.8cm][t]{\textwidth}{% - \begin{center}\erhao\heiti\hit@ctitle\end{center} -\ifhit@subtitle\begin{center}\hspace{-4em}\xiaoer\heiti\pozhehao\hit@csubtitle\end{center}\fi} - \parbox[t][5.1cm][t]{\textwidth}{%英文标题太长时可以采用\xiaoer + \parbox[t][7.8cm][t]{\textwidth}{% + \begin{center}\erhao\heiti\hit@ctitlecover\end{center} +\ifhit@subtitle\begin{center}\hspace{-4em}\xiaoer\heiti\pozhehao\hit@csubtitle\end{center}\fi \begin{center}% \settowidth{\hit@etitlelength}{\erhao\hit@etitle\ifhit@subtitle\hit@title@esep\hit@esubtitle\fi}% \ifdim\hit@etitlelength>450mm\xiaoer\else\erhao\fi% \textbf{\MakeUppercase{\hit@etitle}% \ifhit@subtitle\hit@title@esep\MakeUppercase{\hit@esubtitle}\fi}\end{center}} + \parbox[t][7.4cm][t]{\textwidth}{ \begin{center}\xiaoer\songti\textbf{\hit@cauthor}\end{center}} \parbox[t][1.4cm][t]{\textwidth}{ @@ -744,7 +767,7 @@ \begin{center}\songti\bfseries\hit@cdegree\hit@cthesisname\end{center} \ifhit@fulltime\relax\else\begin{center}\songti\textbf{\hit@cbraceleft\hit@cstudenttype\hit@cbraceright}\end{center}\fi} \parbox[t][5cm][t]{\textwidth}{\erhao - \begin{center}\heiti\hit@ctitle\end{center} + \begin{center}\heiti\hit@ctitlecover\end{center} \ifhit@subtitle\begin{center}\hspace{-4em}\xiaoer\heiti\pozhehao\hit@csubtitle\end{center}\fi} \parbox[t][9.8cm][b]{\textwidth} {\sihao @@ -960,10 +983,14 @@ \newenvironment{publication}{% \ifhit@openright\cleardoublepage\else\clearpage\fi \hit@appendix@chapter*{\hit@publication@ctitle}[\hit@publication@etitle]}{} - \newenvironment{ceindex}{% \ifhit@openright\cleardoublepage\else\clearpage\fi - \hit@appendix@chapter*{\indexname}[\hit@index@etitle]\begin{multicols*}{2}}{\end{multicols*}} + \hit@appendix@chapter*{\indexname}[\hit@index@etitle] + \setlength{\columnsep}{4em} + \begin{adjustwidth}{2em}{2em} + \begin{multicols*}{2}}{\end{multicols*} + \end{adjustwidth} + } \newlist{idxwordlist}{description}{3} \setlist[idxwordlist, 1]{% @@ -1013,7 +1040,7 @@ \thispagestyle{hit@empty}% \phantomsection\addcontentsline{toc}{chapter}{\ifhit@bachelor\hit@declarename@bachelor\else\hit@authorization@ctitle\fi}% \ifhit@doctor% -\addcontentsline{toe}{chapter}{\bfseries \hit@authorization@etitle}% +\addcontentsline{toe}{chapter}{\texorpdfstring{\bfseries \hit@authorization@etitle}{\hit@authorization@etitle}}% \fi% }]{#1}% }% @@ -1021,10 +1048,10 @@ \newcommand\bibstyle@numerical{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}} \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}} -\newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{,}} +\newcommand\bibstyle@inline{\bibpunct{[}{]}{,}{n}{,}{\hit@inline@sep}} \citestyle{numerical} \DeclareRobustCommand\inlinecite{\@inlinecite} -\def\@inlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup} +\def\@inlinecite#1{\begingroup\citestyle{inline}\let\@cite\NAT@citenum\citep{#1}\endgroup} \let\onlinecite\inlinecite \renewenvironment{thebibliography}[1]{% \ifhit@openright\cleardoublepage\else\clearpage\fi\phantomsection% @@ -1041,10 +1068,17 @@ \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy\frenchspacing + \ifhit@splitbibitem + \clubpenalty0 + \@clubpenalty \clubpenalty + \widowpenalty0% + \interlinepenalty-50% + \else \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \interlinepenalty4000% + \fi \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% diff --git a/Master/texmf-dist/tex/latex/hithesis/hithesis.sty b/Master/texmf-dist/tex/latex/hithesis/hithesis.sty index 11c154a8795..b1508de9c77 100644 --- a/Master/texmf-dist/tex/latex/hithesis/hithesis.sty +++ b/Master/texmf-dist/tex/latex/hithesis/hithesis.sty @@ -1,17 +1,40 @@ -\ProvidesPackage{hithesis}[2017/08/25 1.0.0 Harbin Institute of Technology +\ProvidesPackage{hithesis}[2018/02/19 1.0.10 Harbin Institute of Technology Thesis Template Extension] % 此文件声明不在规范中要求的格式所使用的宏包。 % (所以,格式基本上是自由发挥的。) + +\setCJKfamilyfont{siyuan}[]{SourceHanSerifCN-Regular} +\newcommand{\highlight}[1]{{\CJKfamily{siyuan}\textbf{#1}}} + + + +% 根据窝工规范中对数字书写规范的规定(6): +% 凡4位或4位以上的数都从个位起每3位数空半个数码(1/4汉字)。 +% 注意此处,除此任何空格都是错误的(包括\:\;\ 等) +\RequirePackage{siunitx} +\sisetup{group-minimum-digits=4, group-separator= \hspace{0.25em}} + % 处理数学公式中的黑斜体的宏包 \RequirePackage{bm} % 不同于 \mathcal \mathfrak 之类的英文花体字体 \RequirePackage{mathrsfs} % 支持彩色 -\RequirePackage{color} +\RequirePackage{xcolor} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% set global color theme of thesis % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\definecolor{colorzero}{rgb}{0, 0, 0} +\definecolor{colorone}{rgb}{1, 0, 0} +\definecolor{colortwo}{rgb}{0, 0, 1} +\definecolor{colorthree}{rgb}{0, 1, 0} % 图形和表格的控制旋转 \RequirePackage{rotating} + + % 算法的宏包,注意宏包兼容性,先后顺序为float、hyperref、algorithm(2e),否则无法 % 生成算法列表。我工算法混乱问题详见hithesis文档。各个实验室设置具体方法详见 % hithesis文档或者示例中给出的地址。 @@ -58,9 +81,19 @@ breaklines=true % 术语宏包,用来处理首次全写,之后缩写的问题 \RequirePackage{glossaries} +\setacronymstyle{short-long} +\renewcommand*{\genacrfullformat}[2]{% + \glsentrylong{#1}% +} \makeglossaries % 添加术语举例 -% \newacronym{dual}{DLP}{对偶规划(Dual linear programming, DLP)} + +\newacronym{tssbp}{树结构折筷过程}{树结构折筷过程(Tree-structured Stick-breaking process)} +\def\gtssbp{\gls{tssbp}\sindex[china]{shu!树结构折筷过程}\sindex[english]{Tree-structured Stick-breaking process}} + +\newacronym[shortplural=SCNAs,longplural={体细胞拷贝数变异(Somatic copy number alternation,SCNA)}]{scna}{SCNA}{体细胞拷贝数变异(Somatic copy number alternation,SCNA)} +\def\gscna{\gls{scna}\sindex[china]{ti!体细胞拷贝数变异}\sindex[english]{Somatic copy number alternation}\ignorespaces} +\def\gscnas{\glspl{scna}\sindex[china]{ti!体细胞拷贝数变异}\sindex[english]{Somatic copy number alternation}\ignorespaces} % tikz做图宏宏包 \usepackage{tikz} @@ -68,6 +101,212 @@ breaklines=true % \tikzstyle{nodestyle}= [circle, fill=gray!60] % \tikzstyle{edgestyle}= [-latex] +\tikzstyle{maternal}= [colorone] +\tikzstyle{paternal}= [colortwo] +\tikzstyle{variant}= [colorthree!80!colorzero] +\tikzstyle{reference}= [colorzero] + +\tikzstyle{aallele}= [colorzero,rotate=90] +\tikzstyle{ballele}= [colorthree!80!colorzero,rotate=90] + +\tikzstyle{refseg}= [colorzero,draw=colorzero, opacity=0.2] +\tikzstyle{mseg}= [colorone,draw=colorone, opacity=0.2] +\tikzstyle{pseg}= [colortwo,draw=colortwo, opacity=0.2] +\tikzstyle{vseg}= [colorthree!80!colorzero,draw=colorthree!80!colorzero, opacity=0.6] + +\tikzstyle{bncell}= [draw=colorzero,opacity=0.2,line width=2pt, rounded corners=1pt] +\tikzstyle{btcell}= [draw=colorone,opacity=0.6, line width=2pt, rounded corners=1pt] + +\tikzstyle{tncell}= [colorzero,opacity=0.9] +\tikzstyle{ttcell}= [colorone,opacity=0.6] +\tikzstyle{tscell}= [colorzero] +\tikzstyle{refcell}= [colorzero] + +\tikzstyle{evolve}= [->,draw=colortwo,opacity=0.3,line width=1.5pt] +\tikzstyle{fakeevolve}= [->,draw=colorzero,opacity=0.3,line width=1.5pt] + +\tikzstyle{refline}= [dashed,draw=colorzero,line width=1pt] +\tikzstyle{tnline}= [dashed,draw=colorzero,opacity=0.3,line width=1pt] + +\newcommand{\gseg}[9]{% + \pgfmathsetmacro{\sstartx}{#1} + \pgfmathsetmacro{\slengx}{#2} + \pgfmathsetmacro{\sy}{#3} + \pgfmathsetmacro{\sdy}{#4} + \pgfmathsetmacro{\sdx}{#5} + \pgfmathsetmacro{\sdxh}{#7} + \pgfmathsetmacro{\sdxt}{#8} + \fill[#6](\sstartx,\sy)--(\sstartx-\sdx,\sy+\sdy)-- + (\slengx+\sstartx+1.5-\sdx,\sy+\sdy)--(\slengx+\sstartx+1.5,\sy)-- + (\slengx+\sstartx+1.5-\sdx,\sy-\sdy)--(\sstartx-\sdx,\sy-\sdy)--cycle; + \draw[#9] (\sstartx-\sdxh,\sy) -- (\sstartx, \sy); + \draw[#9] (\slengx+\sstartx+1.5, \sy) -- (\slengx+\sstartx+1.5+\sdxt,\sy); +} +\newcommand{\gsegr}[9]{% + \pgfmathsetmacro{\sstartx}{#1} + \pgfmathsetmacro{\slengx}{#2} + \pgfmathsetmacro{\sy}{#3} + \pgfmathsetmacro{\sdy}{#4} + \pgfmathsetmacro{\sdx}{#5} + \pgfmathsetmacro{\sdxh}{#7} + \pgfmathsetmacro{\sdxt}{#8} + \fill[#6](\sstartx-0.5,\sy)--(\sstartx+\sdx-0.5,\sy+\sdy)-- + (\slengx+\sstartx+1.5+\sdx-0.5,\sy+\sdy)--(\slengx+\sstartx+1.5-0.5,\sy)-- + (\slengx+\sstartx+1.5+\sdx-0.5,\sy-\sdy)--(\sstartx+\sdx-0.5,\sy-\sdy)--cycle; + \draw[#9] (\sstartx-\sdxh-0.5,\sy) -- (\sstartx-0.5, \sy); + \draw[#9] (\slengx+\sstartx+1.5-0.5, \sy) -- (\slengx+\sstartx+1.5+\sdxt-0.5,\sy); +} + +\newcommand{\rcell}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node at (\x+10, \y) {Reference}; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[aallele]{C}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{refseg}{1.5}{1}{reference}; +} + +\newcommand{\ncell}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [paternal] at (\x+8, \y-0.5) {P}; + \draw[bncell](\x-2,\y+0.5)--(\x+7,\y+0.5)-- + (\x+7,\y-1)--(\x-2,\y-1)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[ballele]{T}; + \draw (\x+2,\y-0.5) node[aallele]{C}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{A}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcellone}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [maternal] at (\x+8, \y-0.5) {M}; + %\node [paternal] at (\x+8, \y-1) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+7,\y+0.5)-- + (\x+7,\y-1.5)--(\x-2,\y-1.5)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[aallele]{A}; + \draw (\x+2,\y-0.5) node[ballele]{G}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[aallele]{C}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-1) node[ballele]{T}; + \draw (\x+2,\y-1) node[aallele]{C}; + \draw (\x+3,\y-1) node[aallele]{T}; + \draw (\x+4,\y-1) node[ballele]{A}; + \gseg{\x}{4}{\y-1}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcellthree}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+12, \y) {M}; + %\node [paternal] at (\x+12, \y-0.5) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+11,\y+0.5)-- + (\x+11,\y-1)--(\x-2,\y-1)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \gseg{\x}{2}{\y}{0.2}{0.5}{mseg}{1.5}{0}{maternal}; + \gseg{\x+4}{0}{\y}{0.2}{0.5}{vseg}{0.5}{0.5}{variant}; + \draw (\x+7,\y) node[aallele]{T}; + \draw (\x+8,\y) node[aallele]{C}; + \gseg{\x+6}{2}{\y}{0.2}{0.5}{mseg}{0}{1}{maternal}; + \draw (\x+1,\y-0.5) node[ballele]{T}; + \draw (\x+2,\y-0.5) node[aallele]{C}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{A}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcellfour}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+18, \y) {M}; + %\node [paternal] at (\x+18, \y-0.5) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+15,\y+0.5)-- + (\x+15,\y-1)--(\x-2,\y-1)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \gseg{\x}{2}{\y}{0.2}{0.5}{mseg}{1.5}{0}{maternal}; + \gseg{\x+4}{0}{\y}{0.2}{0.5}{vseg}{0.5}{0.5}{variant}; + \draw (\x+7,\y) node[aallele]{T}; + \gseg{\x+6}{1}{\y}{0.2}{0.5}{mseg}{0}{0}{maternal}; + \gseg{\x+9}{0}{\y}{0.2}{0.5}{vseg}{0.5}{0.5}{variant}; + \draw (\x+12,\y) node[aallele]{C}; + \gseg{\x+11}{1}{\y}{0.2}{0.5}{mseg}{0}{1}{maternal}; + \draw (\x+1,\y-0.5) node[ballele]{T}; + \draw (\x+2,\y-0.5) node[aallele]{C}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{A}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcelltwo}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [maternal] at (\x+8, \y-0.5) {M}; + %\node [paternal] at (\x+8, \y-1) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+7,\y+0.5)-- + (\x+7,\y-1.5)--(\x-2,\y-1.5)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[aallele]{A}; + \draw (\x+2,\y-0.5) node[ballele]{G}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{G}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-1) node[ballele]{T}; + \draw (\x+2,\y-1) node[aallele]{C}; + \draw (\x+3,\y-1) node[aallele]{T}; + \draw (\x+4,\y-1) node[ballele]{A}; + \gseg{\x}{4}{\y-1}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + + +\newcommand{\tcellfive}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [maternal] at (\x+8, \y-0.5) {M}; + %\node [paternal] at (\x+8, \y-1) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+9.5,\y+0.5)-- + (\x+9.5,\y-1.5)--(\x-2,\y-1.5)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[aallele]{A}; + \draw (\x+2,\y-0.5) node[ballele]{G}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[aallele]{C}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-1) node[ballele]{T}; + \gseg{\x}{1}{\y-1}{0.2}{0.5}{pseg}{1.5}{0}{paternal}; + \draw (\x+4.5,\y-1) node[ballele]{A}; + \draw (\x+5.5,\y-1) node[aallele]{T}; + \draw (\x+6.5,\y-1) node[aallele]{C}; + \gsegr{\x+3.5}{3}{\y-1}{0.2}{0.5}{pseg}{0.5}{1.5}{paternal}; +} % 最后定义一些常见的数学公式样式。格式和内容分离,是LaTeX的巨大优势 % 例如如下定义: -- cgit v1.2.3