From 6749f197f068ccc7a12ea95ee2bbfca4942c1b13 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 6 Mar 2020 03:02:13 +0000 Subject: CTAN sync 202003060302 --- macros/latex/contrib/hitszthesis/hitszthesis.dtx | 351 +++++++++++++---------- 1 file changed, 203 insertions(+), 148 deletions(-) (limited to 'macros/latex/contrib/hitszthesis/hitszthesis.dtx') diff --git a/macros/latex/contrib/hitszthesis/hitszthesis.dtx b/macros/latex/contrib/hitszthesis/hitszthesis.dtx index 7ae72e10e2..eebbca7b50 100644 --- a/macros/latex/contrib/hitszthesis/hitszthesis.dtx +++ b/macros/latex/contrib/hitszthesis/hitszthesis.dtx @@ -3,20 +3,20 @@ % Copyright (C) 2019-2020 by Jingxuan Yang % % This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 +% conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX +% and version 1.3c or later is part of all distributions of LaTeX % version 2005/12/01 or later. % -% This work has the LPPL maintenance status `maintained'. +% This work has the LPPL1.3c maintenance status `maintained'. % % \fi % % \iffalse %<*driver> -\ProvidesFile{hitszthesis.dtx}[2020/02/23 v2.1 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen (HITSZ) ] +\ProvidesFile{hitszthesis.dtx}[2020/03/05 v2.3 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen (HITSZ) ] \documentclass{ltxdoc} \usepackage{dtx-style} @@ -78,7 +78,7 @@ % % \def\abstractname{\Large 摘要} % \begin{abstract}\normalsize\vskip0.5cm -% \hitszthesis 宏包旨在建立一个规格严格、功夫到家的哈尔滨工业大学(深圳)学位论文模板,目前只包含本科毕业设计(论文)模板。模板的构建基于 \pkg{hitszthesis.dtx} 与 \pkg{hitszthesis.ins},在使用本模板之前,请仔细阅读\file{hitszthesis.pdf}(本文件)、\file{main.tex}(撰写示例)及\file{main.pdf}(撰写效果)。 +% \hitszthesis 宏包旨在建立一个{\bfseries 规格严格、功夫到家}的哈尔滨工业大学(深圳)学位论文模板,目前只包含本科毕业设计(论文)模板。模板的构建基于 \pkg{hitszthesis.dtx} 与 \pkg{hitszthesis.ins},在使用本模板之前,请仔细阅读\file{hitszthesis.pdf}(本文件)、\file{main.tex}(撰写示例)及\file{main.pdf}(撰写效果)。 % \end{abstract} % % \vskip1.5cm @@ -86,7 +86,7 @@ % \begin{abstract} % \normalsize\noindent % \begin{enumerate} -% \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License},使用前请认真阅读协议内 +% \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c}以及其后的最新版本,使用前请认真阅读协议内 % 容。 % \item 本模板为作者根据哈尔滨工业大学(深圳)教务处颁发的《本科毕业设计(论文)撰写规范》、《书写范例》 % 编写而成,旨在供哈尔滨工业大学(深圳)本科毕业生撰写学位论文使用。 @@ -94,7 +94,7 @@ % 权第三方模板为官方模板,所以此模板仅为写作指南的参考实现,不保证格式审查老师 % 不提意见。任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。 % \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵 -% 守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License} 协议。由于违犯协议而引起的任何纠纷争端均与 +% 守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 协议以及其后的最新版本。由于违犯协议而引起的任何纠纷争端均与 % 本模板作者无关。 % \end{enumerate} % \end{abstract} @@ -126,7 +126,8 @@ % \section{安装} % \label{sec:installation} % -% \hitszthesis\ 已经上传CTAN,将包含在2020年主要的 \TeX\ 发行版中。% 安装方法:打开命令行,输入以下命令即可 +% \hitszthesis\ 已经上传CTAN,已包含在TeXLive与MiKTeX发行版中。 +% 安装方法:打开命令行,输入以下命令即可 % \begin{shell} % $ tlmgr install hitszthesis % \end{shell} @@ -163,7 +164,7 @@ % tex/ & 示例文档正文各部分路径\\ % hitszthesis.sty & 为示例文档加载其它宏包\\\midrule % Makefile & GNU make 使用 Makefile\\ -% Compile.bat & Windows 编译用脚本文件\\ +% compile.bat & Windows 编译用脚本文件\\ % latexmkrc & latexmk 配置文件 \\ % README.md & Readme\\ % \textbf{hitszthesis.pdf} & 用户手册(本文档)\\\bottomrule @@ -232,10 +233,10 @@ % 链来进行生成,它会自动运行多次工具直到交叉引用都被解决。下面给出了一个用 % \texttt{latexmk} 调用 \texttt{xelatex} 生成最终文档的示例: % \begin{shell} -% $ latexmk main.tex # 生成论文 main.pdf -% $ latexmk spine.tex # 生成书脊 spine.pdf +% $ latexmk main.tex # 生成论文 main.pdf +% $ latexmk spine.tex # 生成书脊 spine.pdf % $ latexmk hitszthesis.dtx # 生成说明文档 hitszthesis.pdf -% $ latexmk -c # 清理编译生成的辅助文件 +% $ latexmk -c # 清理编译生成的辅助文件 % \end{shell} % % \subsubsection{GNU make} @@ -252,10 +253,10 @@ % $ make doc # 生成说明文档 hitszthesis.pdf % $ make thesis # 生成示例文档 main.pdf % $ make spine # 生成书脊 spine.pdf -% $ make all # 生成示例文档 main.pdf 以及书脊 spine.pdf +% $ make all # 生成示例文档 main.pdf 以及书脊 spine.pdf % $ make wordcount # 统计论文字数 -% $ make clean # 清理辅助文件 -% $ make cleanall # 删除所有 pdf 文件和所有辅助文件 +% $ make clean # 清理辅助文件 +% $ make cleanall # 删除所有 pdf 文件和所有辅助文件 % \end{shell} % % \hitszthesis\ 的 \file{Makefile} 默认用 \texttt{latexmk} 调用\texttt{xelatex} 编 @@ -263,20 +264,20 @@ % 改 \file{Makefile} 开头的参数或通过命令行传递参数(请参看 \file{README.md}), % 进一步还可以修改 \file{latexmkrc} 进行定制。 % -% \changes{v2.1}{2020/02/23}{Add \file{Compile.bat}, add wordcount function, regulate writing style of \file{main.tex} to use \file{input}} -% \subsubsection{Compile.bat} +% \subsubsection{compile.bat} % \label{sec:bat} -% 针对windows系统,本模板提供了 \file{Compile.bat} 脚本文件, +% \changes{v2.1}{2020/02/23}{Add \file{compile.bat}, add wordcount function, regulate writing style of \file{main.tex} to use \file{input}} +% 针对windows系统,本模板提供了 \file{compile.bat} 脚本文件, % 可以双击直接编译,也可以在命令提示符窗口中使用脚本提供的额外功能: % \begin{shell} -% $ Compile.bat cls # 生成 hitszthesis.cls -% $ Compile.bat doc # 生成说明文档 hitszthesis.pdf -% $ Compile.bat thesis # 生成示例文档 main.pdf -% $ Compile.bat spine # 生成书脊 spine.pdf -% $ Compile.bat all # 生成示例文档 main.pdf 以及书脊 spine.pdf -% $ Compile.bat wordcount # 统计论文字数 -% $ Compile.bat clean # 删除编译所产生的辅助文件 -% $ Compile.bat cleanall # 删除所有 pdf 文件和所有辅助文件 +% $ compile.bat cls # 生成 hitszthesis.cls +% $ compile.bat doc # 生成说明文档 hitszthesis.pdf +% $ compile.bat thesis # 生成示例文档 main.pdf +% $ compile.bat spine # 生成书脊 spine.pdf +% $ compile.bat all # 生成示例文档 main.pdf 以及书脊 spine.pdf +% $ compile.bat wordcount # 统计论文字数 +% $ compile.bat clean # 删除编译所产生的辅助文件 +% $ compile.bat cleanall # 删除所有 pdf 文件和所有辅助文件 % \end{shell} % \subsection{升级} % \label{sec:updgrade} @@ -306,8 +307,8 @@ % 按照优先级推荐提问的位置如下: % % \begin{itemize} -% \item Github Issues: \href{http://github.com/YangLaTeX/hitszthesis/issues}{http://github.com/YangLaTeX/hitszthesis/issues} % \item QQ group: 1039392552 +% \item Github Issues: \href{http://github.com/YangLaTeX/hitszthesis/issues}{http://github.com/YangLaTeX/hitszthesis/issues} % \item Email: \href{mailto:yanglatex2e@gmail.com}{yanglatex2e@gmail.com}, \href{mailto:yangjingxuan@stu.hit.edu.cn}{yangjingxuan@stu.hit.edu.cn} % \end{itemize} % @@ -326,8 +327,8 @@ % \label{sec:option} % % \DescribeOption{covertitle} -% 选择论文类型,当前支持:\option{onerow},\option{tworow},其中 -% \option{onerow}为默认选项。 +% 选择论文封面第一页标题行数,当前支持:\option{onerow}, +% \option{tworow},其中\option{onerow}为默认选项。 % \begin{latex} % % 封面标题两行 % \documentclass[covertitle=tworow]{hitszthesis} @@ -341,10 +342,21 @@ % \end{latex} % % \DescribeOption{mathfont} -% 论文使用的数学字体。可选:\option{newtxmath},\option{mtpro2},其中\option{newtxmath}为默认选项。推荐使用\option{mtpro2}字体,但是此字体需要额外下载安装。 +% 论文使用的数学字体。可选:\option{newtxmath},\option{SITX},\option{mtpro2},\option{mtpro2lite},其中\option{newtxmath}为默认选项,\option{mtpro2lite}字体可以\href{https://www.pctex.com/mtpro2.html}{免费使用},但是\option{mtpro2}完全版需要\href{https://www.pctex.com/mtpro2.html}{购买授权},\option{SITX}字体为可选备用选项。 % \begin{latex} % % 论文采用mtpro2数学字体 % \documentclass[mathfont=mtpro2]{hitszthesis} +% % 论文采用mtpro2 lite数学字体 +% \documentclass[mathfont=mtpro2lite]{hitszthesis} +% % 论文采用SITX数学字体 +% \documentclass[mathfont=SITX]{hitszthesis} +% \end{latex} +% +% \DescribeOption{boldcaption} +% 论文中图表的题注是否加粗选项,这是一个布尔选项,默认为否。 +% \begin{latex} +% % 论文题注加粗 +% \documentclass[boldcaption=true]{hitszthesis} % \end{latex} % % \subsection{引用方式} @@ -595,7 +607,7 @@ % \begin{macrocode} %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesClass{hitszthesis} -%[2020/02/23 v2.1 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen +%[2020/03/05 v2.3 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen % (HITSZ)] % \end{macrocode} % @@ -603,7 +615,7 @@ % \begin{macrocode} \RequirePackage{ifxetex} \ifxetex\else - \ClassError{hitszthesis}{Please use XeLaTeX to compile the file}{} + \ClassError{hitszthesis}{Please use XeLaTeX to compile this file}{} \end{document} \fi % \end{macrocode} @@ -646,14 +658,25 @@ \DeclareVoidOption{tworow}{\ykv{covertitle = tworow}} % \end{macrocode} % -% 数学字体选择 +% 数学字体选择,添加XITS数学字体 +%(https://github.com/alif-type/xits),该字体来源于 +% Scientific and Technical Information Exchange(XTIS)字体 +% \changes{v2.3}{2020/03/05}{Add math font option XITS} % \begin{macrocode} \DeclareStringOption[newtxmath]{mathfont} -\DeclareVoidOption{newtxmath}{\ykv{mathfont = newtxmath}} +\DeclareVoidOption{XITS}{\ykv{mathfont = XITS}} \DeclareVoidOption{mtpro2}{\ykv{mathfont = mtpro2}} +\DeclareVoidOption{mtpro2lite}{\ykv{mathfont = mtpro2lite}} +\DeclareVoidOption{newtxmath}{\ykv{mathfont = newtxmath}} % \end{macrocode} % -% 默认选项 +% 题注是否加粗选项,默认不加粗 +% \changes{v2.3}{2020/03/05}{Add boldcaption option to control the caption font} +% \begin{macrocode} +\DeclareBoolOption[false]{boldcaption} +% \end{macrocode} +% +% 将其他选项传递给|book|文档类 % \begin{macrocode} \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}} % \end{macrocode} @@ -674,34 +697,106 @@ \RequirePackage{etex} % \end{macrocode} % -% 加载支持中文的 \pkg{ctex} 宏包 -% \begin{macrocode} -\RequirePackage[UTF8,space=auto,scheme=plain]{ctex} +% 加载支持中文的 \pkg{ctex} 宏包,并设置章节标题格式 +% \changes{v2.2}{2020/03/04}{Use \pkg{ctex} to set chinese titile and toc} +% \begin{macrocode} +\RequirePackage[UTF8,scheme=chinese,zihao=-4,heading=true]{ctex} +\ctexset{% + space = auto, + chapter={ + afterindent=true, + number=\arabic{chapter}, + beforeskip={28.34658bp},%一个空行 1.57481 × 18 + afterskip={24.74658bp},%0.8应该不计算间距 0.8 × 18 + 0.57481×18 + aftername=\enspace, + format={\centering\heiti\xiaoer[1.57481]},%\center 会影响之后全局 + nameformat=\relax, + numberformat=\relax, + fixskip=true, % 添加这一行去除默认间距 + %hang=true, + }, + section={ + afterindent=true, + beforeskip={12bp},%上下空0.5行 + afterskip={13.5bp}, + format={\heiti\fontsize{15bp}{21bp}\selectfont}, + aftername=\enspace, + fixskip=true, + break={}, + }, + subsection={ + afterindent=true, + beforeskip={10bp}, + afterskip={11bp}, + format={\heiti\fontsize{14bp}{18bp}\selectfont}, + aftername=\enspace, + fixskip=true, + break={}, + }, + subsubsection={ + afterindent=true, + beforeskip={9bp}, + afterskip={9bp}, + format={\heiti\normalsize}, + aftername=\enspace, + fixskip=true, + break={}, + }, + paragraph/afterindent=true, + subparagraph/afterindent=true +} % \end{macrocode} % % 正文和数学字体设置 % \begin{macrocode} \RequirePackage{amsmath} -\RequirePackage[T1]{fontenc} -\RequirePackage{newtxtext} -\ifdefstring{\hitsz@mathfont}{mtpro2}{ -\RequirePackage[mtphrb,mtpcal,zswash,uprightGreek]{mtpro2} +\ifdefstring{\hitsz@mathfont}{XITS}{ + \setmainfont{Times New Roman} + \setsansfont{Arial} + \setmonofont[Scale=MatchLowercase]{Consolas} + \RequirePackage{unicode-math} + \unimathsetup{ + math-style = ISO, + bold-style = ISO, + nabla = upright, + partial = upright, + } + \IfFontExistsTF{XITSMath-Regular.otf}{ + \setmathfont[ + Extension = .otf, + BoldFont = XITSMath-Bold, + StylisticSet = 8, + ]{XITSMath-Regular} + \setmathfont[range={cal,bfcal},StylisticSet=1]{XITSMath-Regular.otf} + }{ + \setmathfont[ + Extension = .otf, + BoldFont = *bold, + StylisticSet = 8, + ]{xits-math} + \setmathfont[range={cal,bfcal},StylisticSet=1]{xits-math.otf} + } + \AtBeginDocument{\renewcommand{\mathbf}{\mathbfup} + \newcommand\square{\mdlgwhtsquare} + } }{\relax} -\ifdefstring{\hitsz@mathfont}{newtxmath}{ -\RequirePackage{newtxmath} +\ifdefstring{\hitsz@mathfont}{mtpro2}{% + \RequirePackage{newtxtext} % newtxtext宏包必须加在数学字体宏包之前 + \RequirePackage[mtphrb,mtpcal,zswash,uprightGreek]{mtpro2} +}{\relax} +\ifdefstring{\hitsz@mathfont}{mtpro2lite}{% + \RequirePackage{newtxtext} + \RequirePackage[lite,subscriptcorrection,slantedGreek,nofontinfo]{mtpro2} +}{\relax} +\ifdefstring{\hitsz@mathfont}{newtxmath}{% + \RequirePackage{newtxtext} + \RequirePackage{newtxmath} \let\openbox\relax }{\relax} -\renewcommand{\rmdefault}{ptm} -\RequirePackage[scaled=0.92]{helvet} \RequirePackage{type1cm} \RequirePackage{lipsum} % \end{macrocode} % -% 使字体设置生效,排除其他干扰,不一定起作用,但为防万一需要保留 -% \begin{macrocode} -\RequirePackage{mathdesign} -% \end{macrocode} -% % \begin{macro}{\kai} % \begin{macro}{\song} % 设置中文加粗字体 @@ -836,8 +931,9 @@ % \end{macrocode} % % 子公式编号 +% \changes{v2.2}{2020/03/05}{Use \pkg{subeqnarray} rather than \pkg{cases} to write sub equations} % \begin{macrocode} -\RequirePackage{cases} +\RequirePackage{subeqnarray} % \end{macrocode} % % 书写单位 @@ -851,13 +947,10 @@ \includepdfset{fitpaper=true} % \end{macrocode} % -% \begin{macro}{\ttdefault} % 排版代码 % \begin{macrocode} \RequirePackage{listings} -\renewcommand{\ttdefault}{cmtt} % \end{macrocode} -% \end{macro} % % \begin{macro}{\lstdefinestyle} % 定义 |ystyle| 样式 @@ -1110,27 +1203,11 @@ % \begin{macro}{\keywordsname} % \begin{macro}{\keywordsenname} % \begin{macro}{\contentsname} -% \begin{macro}{\figurename} -% \begin{macro}{\tablename} -% \begin{macro}{\partname} -% \begin{macro}{\bibname} -% \begin{macro}{\appendixname} % \begin{macro}{\indexname} % \begin{macro}{\notename} % \begin{macro}{\proofname} % \begin{macro}{\problemname} % \begin{macro}{\definitionname} -% \begin{macro}{\theoremname} -% \begin{macro}{\axiomname} -% \begin{macro}{\postulatename} -% \begin{macro}{\lemmaname} -% \begin{macro}{\propositionname} -% \begin{macro}{\corollaryname} -% \begin{macro}{\examplename} -% \begin{macro}{\exercisename} -% \begin{macro}{\remarkname} -% \begin{macro}{\assumptionname} -% \begin{macro}{\conclusionname} % 中文标题名称设置 % \begin{macrocode} \renewcommand\listfigurename{插图目录} @@ -1139,27 +1216,11 @@ \newcommand{\keywordsname}{关键词} \newcommand{\keywordsenname}{Keywords} \renewcommand{\contentsname}{目\quad 录} -\renewcommand{\figurename}{图} -\renewcommand{\tablename}{表} -\renewcommand{\partname}{部分} -\renewcommand{\bibname}{参考文献} -\renewcommand{\appendixname}{附录~\thechapter} \renewcommand{\indexname}{索\quad 引} \newcommand{\notename}{笔记} \renewcommand*{\proofname}{证明} \newcommand{\problemname}{问题} \newcommand{\definitionname}{定义} -\newcommand{\theoremname}{定理} -\newcommand{\axiomname}{公理} -\newcommand{\postulatename}{公设} -\newcommand{\lemmaname}{引理} -\newcommand{\propositionname}{命题} -\newcommand{\corollaryname}{推论} -\newcommand{\examplename}{例} -\newcommand{\exercisename}{练习} -\newcommand{\remarkname}{注} -\newcommand{\assumptionname}{假设} -\newcommand{\conclusionname}{结论} % \end{macrocode} % \end{macro} % \end{macro} @@ -1172,11 +1233,32 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} +% +% \begin{macro}{\theoremname} +% \begin{macro}{\axiomname} +% \begin{macro}{\postulatename} +% \begin{macro}{\lemmaname} +% \begin{macro}{\propositionname} +% \begin{macro}{\corollaryname} +% \begin{macro}{\examplename} +% \begin{macro}{\exercisename} +% \begin{macro}{\remarkname} +% \begin{macro}{\assumptionname} +% \begin{macro}{\conclusionname} +% 继续设置 +% \begin{macrocode} +\newcommand{\theoremname}{定理} +\newcommand{\axiomname}{公理} +\newcommand{\postulatename}{公设} +\newcommand{\lemmaname}{引理} +\newcommand{\propositionname}{命题} +\newcommand{\corollaryname}{推论} +\newcommand{\examplename}{例} +\newcommand{\exercisename}{练习} +\newcommand{\remarkname}{注} +\newcommand{\assumptionname}{假设} +\newcommand{\conclusionname}{结论} +% \end{macrocode} % \end{macro} % \end{macro} % \end{macro} @@ -1293,7 +1375,7 @@ bottom=30mm, headheight = 2.17cm, headsep = 1mm, - footskip = 0cm, + footskip = 5mm, } % \end{macrocode} % \end{macro} @@ -1332,49 +1414,9 @@ % \end{macrocode} % % \begin{macro}{\setcounter} -% \begin{macro}{\chaptername} -% 更改章节编号样式 +% 更改章节编号深度 % \begin{macrocode} \setcounter{secnumdepth}{3} -\renewcommand{\chaptername}{第 \thechapter\;章} -% \end{macrocode} -% \end{macro} -% \end{macro} -% -% \begin{macro}{\titleformat} -% 设置章节标题样式 -% \begin{macrocode} -\titleformat{\chapter}[hang]{\centering\heiti} -{\filcenter\xiaoer\enspace\heiti{% -\IfAppendix{\appendixname}{\chaptername}\enspace}}{1pt}{\xiaoer} -% \end{macrocode} -% -% 设置节标题样式 -% \begin{macrocode} -\titleformat{\section}[hang]{\heiti} -{\xiaosan\heiti{\thesection}\enspace}{1pt}{\xiaosan\heiti\filright} -% \end{macrocode} -% -% 设置条标题样式 -% \begin{macrocode} -\titleformat{\subsection}[hang]{\heiti} -{\sihao\heiti\thesubsection\enspace}{1pt}{\sihao\heiti\filright} -% \end{macrocode} -% -% 设置四级标题样式 -% \begin{macrocode} -\titleformat{\subsubsection}[hang]{\heiti} -{\xiaosi\heiti\thesubsubsection\enspace}{1pt}{\xiaosi\heiti\filright} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\titlespacing} -% 设置标题与上下文间距 -% \begin{macrocode} -\titlespacing{\chapter}{0pt}{0bp}{14.4bp} -\titlespacing{\section}{0pt}{7.5bp}{7.5bp} -\titlespacing{\subsection}{0pt}{7bp}{7bp} -\titlespacing{\subsubsection}{0pt}{6bp}{6bp} % \end{macrocode} % \end{macro} % @@ -1382,6 +1424,9 @@ % 图表标题设置,字号为small,分割符为空格 % \begin{macrocode} \RequirePackage[font=small,labelsep=quad]{caption} +\ifhitsz@boldcaption + \renewcommand\captionfont{\small\song\bfseries} +\fi % \end{macrocode} % % 标题与图表的间距为3pt @@ -1542,7 +1587,7 @@ % \begin{macrocode} \newenvironment{proof}{ \par\noindent\textbf{\proofname\;} -}{\hfill$\Box$\quad\par} +}{\hfill$\square$\quad\par} % \end{macrocode} % \end{environment} % @@ -1646,7 +1691,7 @@ \end{center} % 日期 \vspace{2.6cm} - {\xiaosi[0]\song\textbf{2020年7月}} + {\xiaosi[0]\song\textbf{2020年6月}} \end{center} %%---------------------------- %% 第二页 @@ -1814,6 +1859,7 @@ {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep + \addtolength{\itemsep}{-1.5ex} \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty @@ -1834,7 +1880,6 @@ % 定义页眉页脚 % \begin{macrocode} \RequirePackage{fancyhdr} -\RequirePackage{lastpage} \pagestyle{fancy} % \end{macrocode} % @@ -1879,26 +1924,27 @@ % 1级目录格式 % \begin{macrocode} \titlecontents{chapter}[0pt]{\vspace{1mm}\heiti} -{第\thecontentslabel\,\,章\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} +{\thecontentslabel\hskip.5em}{}{\titlerule*[4pt]{.}\contentspage} % \end{macrocode} % % 2级目录格式 % \begin{macrocode} \titlecontents{section}[25pt]{\songti} -{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} +{\thecontentslabel\hskip.5em}{}{\titlerule*[4pt]{.}\contentspage} % \end{macrocode} % % 3级目录格式 % \begin{macrocode} \titlecontents{subsection}[47pt]{\songti} -{\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} +{\thecontentslabel\hskip.5em}{}{\titlerule*[4pt]{.}\contentspage} % \end{macrocode} -% \end{macro} % -% 附录环境设置,暂时无用 +% 附录章节,节标题不计入目录中 +% \changes{v2.2}{2020/03/04}{Omit sections of appendix in toc} % \begin{macrocode} -\RequirePackage[title,titletoc]{appendix} +\g@addto@macro\appendix{\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}} % \end{macrocode} +% \end{macro} % % \begin{environment}{tabular} % 修改表格字号,注意 |tabular| 要放在 |table| 环境里 @@ -2215,10 +2261,10 @@ text centered, draw=black] % \begin{macro}{\vY} % 向量 % \begin{macrocode} -\newcommand\vx{\bf{x}} -\newcommand\vX{\bf{X}} -\newcommand\vy{\bf{y}} -\newcommand\vY{\bf{Y}} +\newcommand\vx{\mathbf{x}} +\newcommand\vX{\mathbf{X}} +\newcommand\vy{\mathbf{y}} +\newcommand\vY{\mathbf{Y}} % \end{macrocode} % \end{macro} % \end{macro} @@ -2290,6 +2336,15 @@ text centered, draw=black] % \subsection{其它} % \label{sec:other} % +% \changes{v2.2}{2020/03/02}{Deal with warnings about PDF string} +% 处理生成的PDF中某些\LaTeX{}命令无法识别的问题 +% \begin{macrocode} +\pdfstringdefDisableCommands{% + \def\quad{}% + \def\hskip#1{}% +} +% \end{macrocode} +% % 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改。 % \begin{macrocode} \AtEndOfClass{\sloppy} @@ -2408,7 +2463,7 @@ text centered, draw=black] \DeclareDocumentCommand{\file}{s m}{% \texttt{#2}\IfBooleanF#1{\hitsz@special@index{file}{#2}}} \newcommand{\myentry}[1]{% - \marginpar{\raggedleft\color{purple}\bfseries\strut #1}} + \marginpar{\raggedleft\color{purple}\bfseries\small\strut #1}} \newcommand{\note}[2][Note]{{% \color{magenta}{\bfseries #1}\emph{#2}}} -- cgit v1.2.3