% \iffalse meta-comment % % 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 % 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 % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % \fi % % \iffalse %<*driver> \ProvidesFile{hitszthesis.dtx}[2020/02/18 v2.0 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen (HITSZ) ] \documentclass{ltxdoc} \usepackage{dtx-style} \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} \DocInput{\jobname.dtx} \end{document} % % \fi % % \GetFileInfo{\jobname.dtx} % % \DoNotIndex{\newenvironment,\@bsphack,\@empty,\@esphack,\sfcode} % \DoNotIndex{\addtocounter,\label,\let,\linewidth,\newcounter} % \DoNotIndex{\noindent,\normalfont,\par,\parskip,\phantomsection} % \DoNotIndex{\providecommand,\ProvidesPackage,\refstepcounter} % \DoNotIndex{\RequirePackage,\setcounter,\setlength,\string,\strut} % \DoNotIndex{\textbackslash,\texttt,\ttfamily,\usepackage} % \DoNotIndex{\begin,\end,\begingroup,\endgroup,\par,\\} % \DoNotIndex{\if,\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi} % \DoNotIndex{\let,\def,\xdef,\edef,\newcommand,\renewcommand} % \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect} % \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize} % \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny} % \DoNotIndex{\normalfont,\bfseries,\slshape,\sffamily,\interlinepenalty} % \DoNotIndex{\textbf,\textit,\textsf,\textsc} % \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad} % \DoNotIndex{\centering,\raggedright,\ref} % \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize} % \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne} % \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass} % \DoNotIndex{\AtBeginDocument,\AtEndDocument} % \DoNotIndex{\widowpenalty,\vfill,\usetikzlibrary,\usecounter} % \DoNotIndex{\underline,\to,\text,\textsuperscript,\textwidth} % \DoNotIndex{\thanks,\subsubsection,\subsection,\sloppy,\rule} % \DoNotIndex{\ProvidesClass,\makebox,\makeatletter,\makeatother} % \DoNotIndex{\,,\.,\;} % % \changes{v1.0}{2019/9/26}{Initial creation} % \changes{v1.1}{2019/10/30}{Fix loading \pkg{mtpro2} bug, add \pkg{etex} package} % \changes{v1.2}{2020/02/15}{Add two options: onerow or tworow, infoleft or infocenter, migrate settings file into cls file, initial commit on ctan} % \changes{v2.0}{2020/02/18}{Format cls file to dtx file, regulate thesis template for HITSZ} % % \def\indexname{索引} % \def\glossaryname{修改记录} % \IndexPrologue{\section{\indexname}} % \GlossaryPrologue{\section{\glossaryname}} % % \definecolor{hitcolor}{RGB}{21,95,130} % \title{\bfseries\color{hitcolor}\hitszthesis:哈尔滨工业大学(深圳)\\ 本科毕业设计(论文)模板} % \author{{\Large\fangsong 杨敬轩}\\[5pt]\texttt{yanglatex2e@gmail.com}\\[5pt]\texttt{yangjingxuan@stu.hit.edu.cn}} % \date{\fileversion\ (\filedate)} % \maketitle\thispagestyle{empty} % % \vskip0.5cm % % \def\abstractname{\Large 摘要} % \begin{abstract}\normalsize\vskip0.5cm % \hitszthesis 宏包旨在建立一个规格严格、功夫到家的哈尔滨工业大学(深圳)学位论文模板,目前只包含本科毕业设计(论文)模板。模板的构建基于 \pkg{hitszthesis.dtx} 与 \pkg{hitszthesis.ins},在使用本模板之前,请仔细阅读\file{hitszthesis.pdf}(本文件)、\file{main.tex}(撰写示例)及\file{main.pdf}(撰写效果)。 % \end{abstract} % % \vskip1.5cm % \def\abstractname{\Large 免责声明} % \begin{abstract} % \normalsize\noindent % \begin{enumerate} % \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License},使用前请认真阅读协议内 % 容。 % \item 本模板为作者根据哈尔滨工业大学(深圳)教务处颁发的《本科毕业设计(论文)撰写规范》、《书写范例》 % 编写而成,旨在供哈尔滨工业大学(深圳)本科毕业生撰写学位论文使用。 % \item 哈尔滨工业大学(深圳)教务处只提供毕业论文写作指南,不提供官方模板,也不会授 % 权第三方模板为官方模板,所以此模板仅为写作指南的参考实现,不保证格式审查老师 % 不提意见。任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。 % \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵 % 守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License} 协议。由于违犯协议而引起的任何纠纷争端均与 % 本模板作者无关。 % \end{enumerate} % \end{abstract} % % % \clearpage % \pagestyle{fancy} % \begin{multicols}{2}[ % \setlength{\columnseprule}{.4pt} % \setlength{\columnsep}{18pt}] % \large % \tableofcontents % \end{multicols} % \clearpage % % \section{模板介绍} % \hitszthesis\ (\textbf{H}arbin \textbf{I}nstitute of \textbf{T}echnology, % \textbf{S}hen\textbf{Z}hen \LaTeX\ % \textbf{Thesis} Template) 是为了帮助哈尔滨工业大学(深圳)本科毕业生撰写毕业论文而编写 % 的 \LaTeX\ 论文模板。 % % 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据 % 第~\ref{sec:howtoask} 节说明提问,有兴趣者可以联系作者参与完善此手册,非常欢迎窝工学子对本代码作出贡献。 % % \note[注意:]{模板的作用在于减少论文写作过程中格式调整的时间。前提是遵守模板的 % 用法,否则即便用了 \textup{\hitszthesis}\ 也难以保证输出的论文符合学校规范。} % % % \section{安装} % \label{sec:installation} % % \hitszthesis\ 已经上传CTAN,将包含在2020年主要的 \TeX\ 发行版中。% 安装方法:打开命令行,输入以下命令即可 % \begin{shell} % $ tlmgr install hitszthesis % \end{shell} % 阅读本说明文档可以使用以下命令: % \begin{shell} % $ texdoc hitszthesis % \end{shell} % % 如果要使用开发版,需自己下载,\hitszthesis\ 相关链接: % \begin{itemize} % \item 主页:\href{https://github.com/YangLaTeX/hitszthesis}{GitHub} % \item 下载:\href{http://www.ctan.org/pkg/hitszthesis}{CTAN} % \end{itemize} % % \subsection{模板的组成} % 下表列出了 \hitszthesis\ 的主要文件及其功能介绍: % % \begin{longtable}{l|p{8cm}} % \toprule % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule % \endfirsthead % \midrule % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule % \endhead % \endfoot % \endlastfoot % hitszthesis.ins & \textsc{DocStrip} 驱动文件(开发用) \\ % hitszthesis.dtx & \textsc{DocStrip} 源文件(开发用)\\\midrule % hitszthesis.cls & 模板类文件(由上述两个文件生成)\\\midrule % main.tex & 示例文档主文件\\ % spine.tex & 书脊示例文档\\ % figure/ & 示例文档插图路径\\ % front/ & 示例文档封面插图路径\\ % hitszthesis.sty & 为示例文档加载其它宏包\\\midrule % Makefile & Makefile\\ % latexmkrc & latexmk 配置文件 \\ % README.md & Readme\\ % \textbf{hitszthesis.pdf} & 用户手册(本文档)\\\bottomrule % \end{longtable} % % 几点说明: % \begin{itemize} % \item \file{hitszthesis.cls} 可由 \file{hitszthesis.ins} % 和 \file{hitszthesis.dtx} 生成,但为了降低同学们的使用难度,故 % 将 \file{hitszthesis.cls} 文件一起发布。 % \item 使用前请一定阅读文档:\file{hitszthesis.pdf}。 % \end{itemize} % % \subsection{生成模板} % \label{sec:generate-cls} % \note[提示:]{若使用 \TeX 发行版自带的 \textup{\hitszthesis}\ 或 Github 上发布的版本,可忽 % 略此节,直接阅读第~\ref{sec:generate-thesis} 节。若下载 CTAN 包或者 Github 开发 % 代码,请阅读本节了解生成模板文件的步骤。} % % 模板解压缩后生成文件夹 \file{hitszthesis-vX.Y}\footnote{\texttt{vX.Y} 为版本 % 号。},其中包括:模板源文件(\file{hitszthesis.ins} 和 \file{hitszthesis.dtx}),示例文档 % (\file{main.tex},\file{spine.tex},\file{hitszthesis.sty}\footnote{可能用到的包 % 以及一些命令定义都放在这里,以免 \file{hitszthesis.cls} 过分臃 % 肿。},文件夹\file{figure/} 和 \file{front/} 。在使用之前需要先生成模 % 板文件和配置文件(具体命令细节请参考 \file{README.md} 和 \file{Makefile}): % % \begin{shell} % $ cd hitszthesis-vX.Y % # 生成 hitszthesis.cls 与 dtx-style.sty % $ xetex hitszthesis.ins % % # 下面的命令用来生成用户手册,首先生成索引 % $ xelatex hitszthesis.dtx % $ makeindex -s gind.ist -o hitszthesis.ind hitszthesis.idx % $ makeindex -s gglo.ist -o hitszthesis.gls hitszthesis.glo % % # 最后两次编译生成说明文档 hitszthesis.pdf % $ xelatex hitszthesis.dtx % $ xelatex hitszthesis.dtx % \end{shell} % % \subsection{生成论文} % \label{sec:generate-thesis} % 本节介绍几种常见的生成论文的方法。用户可根据自己的情况选择。 % % \subsubsection{\XeLaTeX} % \label{sec:xelatex} % 很多用户对 \LaTeX\ 命令执行的次数不太清楚。一个基本的原则是多次运行 \LaTeX\ 命 % 令直至不再出现警告。下面给出生成示例文档的详细过程(\texttt{\#} 开头的行为注 % 释),首先来看推荐的 \texttt{xelatex} 方式: % \begin{shell} % # 1. 发现里面的引用关系,文件后缀 .tex 可以省略 % $ xelatex main % % # 2. 编译参考文件源文件,生成 bbl 文件 % $ bibtex main % % # 3. 下面解决引用 % $ xelatex main % $ xelatex main # 此时生成完整的 pdf 文件 % \end{shell} % % \subsubsection{latexmk} % \label{sec:latexmk} % \texttt{latexmk} 命令支持全自动生成 \LaTeX\ 编写的文档,并且支持使用不同的工具 % 链来进行生成,它会自动运行多次工具直到交叉引用都被解决。下面给出了一个用 % \texttt{latexmk} 调用 \texttt{xelatex} 生成最终文档的示例: % \begin{shell} % $ latexmk main.tex # 生成论文 main.pdf % $ latexmk spine.tex # 生成书脊 spine.pdf % $ latexmk hitszthesis.dtx # 生成说明文档 hitszthesis.pdf % $ latexmk -c # 清理编译生成的辅助文件 % \end{shell} % % \subsubsection{GNU make} % \label{sec:make} % \note[提示:]{若要使用 \texttt{make} 编译,需自行下载模板。因为 \TeX\ 发行版中 % 的 \file{Makefile} 不在当前目录。} % % 上面的方法虽然不困难,但是每次都输入还是非常麻烦,所以 \hitszthesis\ 提供了一 % 个 \file{Makefile}。如果可以使用 GNU make 工具, % 则使用 \texttt{make} 生成文件是最方便的办法。 % % \begin{shell} % $ make clean # 清理辅助文件 % $ make cls # 生成 hitszthesis.cls % $ make doc # 生成说明文档 hitszthesis.pdf % $ make thesis # 生成示例文档 main.pdf % $ make spine # 生成书脊 spine.pdf % \end{shell} % % \hitszthesis\ 的 \file{Makefile} 默认用 \texttt{latexmk} 调用\texttt{xelatex} 编 % 译。如有需要可修 % 改 \file{Makefile} 开头的参数或通过命令行传递参数(请参看 \file{README.md}), % 进一步还可以修改 \file{latexmkrc} 进行定制。 % % \subsection{升级} % \label{sec:updgrade} % \hitszthesis\ 升级非常简单,可以通过 \TeX\ 发行版的包管理工具自动更新发行版, % \begin{shell} % # 更新 hitszthesis 宏包 % $ tlmgr update hitszthesis % # 或者直接更新全部宏包至最新版 % $ tlmgr update --all % \end{shell} % % 也可以下载最新的开发版,将 \file{hitszthesis.ins},\file{hitszthesis.dtx},拷贝至工作目录覆盖相应的文件,然后运行: % \begin{shell} % $ xetex hitszthesis.ins % \end{shell} % 生成新的类文件和配置文件即可。 % % 还可以直接拷贝 \file{hitszthesis.cls}替换原有文件,避免执行上面的命令行。 % % \section{使用说明} % \label{sec:usage} % 本手册假定用户已经能处理一般的 \LaTeX\ 文档,并对 \BibTeX\ 有一定了解。如果 % 从来没有接触过 \TeX\ 和 \LaTeX,建议先学习相关的基础知识。 % % \subsection{关于提问} % \label{sec:howtoask} % 按照优先级推荐提问的位置如下: % % \begin{itemize} % \item Github Issues: \href{http://github.com/YangLaTeX/hitszthesis/issues}{http://github.com/YangLaTeX/hitszthesis/issues} % \item QQ group: 1039392552 % \item Email: \href{mailto:yanglatex2e@gmail.com}{yanglatex2e@gmail.com}, \href{mailto:yangjingxuan@stu.hit.edu.cn}{yangjingxuan@stu.hit.edu.cn} % \end{itemize} % % \subsection{示例文件} % \label{sec:userguide} % % 模板核心文件为:\file{hitszthesis.cls}, % 但如果没有示例文档会很难下手,所以推荐从模板自带的示例文档入手,其中包括了论文 % 写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。对于不清 % 楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示例文档, % 具体内容可以参考模板附带的 \file{main.tex}。 % % \lstinputlisting[style=lstStyleLaTeX]{main.tex} % % \subsection{论文选项} % \label{sec:option} % % \DescribeOption{covertitle} % 选择论文类型,当前支持:\option{onerow},\option{tworow},其中 % \option{onerow}为默认选项。 % \begin{latex} % % 封面标题两行 % \documentclass[covertitle=tworow]{hitszthesis} % \end{latex} % % \DescribeOption{infoalign} % 论文封面第二页下划线部分内容对齐方式。可选:\option{infoleft},\option{infocenter},其中\option{infocenter}为默认选项。 % \begin{latex} % % 封面第二页信息居左对齐 % \documentclass[infoalign=infoleft]{hitszthesis} % \end{latex} % % \subsection{引用方式} % \label{sec:citestyle} % % \myentry{引用} % \DescribeMacro{\upcite} % 学校要求的参考文献引用有两种模式:(1)上标模式。比如“同样的工作有很 % 多$^{[1,2]}$\ldots”。(2)正文模式。比如“文[3] 中详细说明了\ldots”。其中上标 % 模式采用 \cs{upcite}\marg{key},而 \cs{cite}\marg{key} 则用来生成正文模式。 % % 关于参考文献表推荐使用 \cs{thebibliography} 环境,虽然有些麻烦, % 但是避免了使用 \BibTeX 带来的很多格式设置问题。 % 有余力者可以尝试使用 \BibTeX, % \BibTeX 默认情况下可以自动识别文献语言, % 并自动处理文献类型和载体类型标识,也可以手动指定,如: % \begin{latex} % @misc{citekey, % language = {japanese}, % mark = {Z}, % medium = {DK}, % ... % \end{latex} % 可选的语言有 english, chinese, japanese, russian。 % % \subsection{中文字体} % \label{sec:chinese-fonts} % % \subsubsection{字体配置} % \label{sec:font-config} % 模板默认使用 \CTeX\ 的字体配置。关于中文字体安装、配置的所有问题不在本模板讨论 % 范围。 % % \subsubsection{字体命令} % \label{sec:fontcmds} % \myentry{字体} % \DescribeMacro{\songti} % \DescribeMacro{\fangsong} % \DescribeMacro{\heiti} % \DescribeMacro{\kaishu} % 用来切换宋体、仿宋、黑体、楷体四种基本字体。 % % \begin{latex} % {\songti 乾:元,亨,利贞} % {\fangsong 初九,潜龙勿用} % {\heiti 九二,见龙在田,利见大人} % {\kaishu 九三,君子终日乾乾,夕惕若,厉,无咎} % \end{latex} % % \myentry{字号} % \DescribeMacro{\chuhao} % \DescribeMacro{\xiaochu} % \DescribeMacro{\yihao} % \DescribeMacro{\xiaoyi} % \DescribeMacro{\bahao} % 定义字体大小,分别为: % % \begin{center} % \begin{tabular}{llllll} % \toprule % \cs{chuhao} & \cs{xiaochu} & \cs{yihao} & \cs{xiaoyi} & \cs{erhao} & \cs{xiaoer}\\ % \cs{sanhao} & \cs{xiaosan} & \cs{sihao} & \cs{xiaosi} & \cs{wuhao} & \cs{xiaowu}\\ % \cs{liuhao} & \cs{xiaoliu} & \cs{qihao} & \cs{bahao}\\\bottomrule % \end{tabular} % \end{center} % % 使用方法为:\cs{command}\oarg{num},其中 \cs{command} 为字号命令,\meta{num} 为行距。比 % 如 \cs{xiaosi}[1.5] 表示选择小四字体,行距 1.5 倍。 % % \begin{latex} % {\erhao 二号} % {\sanhao[1.5] 三号,一点五倍行距} % {\sihao 四号} % {\qihao[2] 七号,两倍行距} % \end{latex} % % 也可以使用 \CTeX\ 定义的 \cs{zihao}\marg{num} 来切换字号,具体用法参看其文 % 档。 % % \subsection{封面信息} % \label{sec:titlepage} % 封面信息配置方法:每个信息利用命令独立设置,大多数命令的使用方法都是 \cs{command}\marg{arg},例外者将具体指出。 % % \myentry{封面信息} % \DescribeMacro{\thesistitle} % \cs{thesistitle}\marg{arg},输入论文标题 % % \DescribeMacro{\titleone} % \cs{titleone}\marg{arg},输入论文标题第一行 % % \DescribeMacro{\titletwo} % \cs{titletwo}\marg{arg},输入论文标题第二行 % % \DescribeMacro{\schoolname} % \cs{schoolname}\marg{arg},输入学校名称 % % \DescribeMacro{\departname} % \cs{departname}\marg{arg},输入学院名称 % % \DescribeMacro{\majorin} % \cs{majorin}\marg{arg},输入专业 % % \DescribeMacro{\authorname} % \cs{authorname}\marg{arg},输入姓名 % % \DescribeMacro{\studentID} % \cs{studentID}\marg{arg},输入学号 % % \DescribeMacro{\dateinput} % \cs{dateinput}\marg{arg},输入答辩日期 % % \DescribeMacro{\instructor} % \cs{instructor}\marg{arg},输入指导教师 % % \subsubsection{摘要} % \myentry{摘要关键词} % \DescribeEnv{abstract} % \DescribeEnv{abstracten} % \DescribeMacro{\keywords} % \DescribeMacro{\keywordsen} % \begin{latex} % \begin{abstract} % 摘要请写在这里... % \keywords{xxx} % \end{abstract} % % \begin{abstracten} % Here comes the abstract in English... % \keywordsen{xxx} % \end{abstracten} % \end{latex} % % \subsection{目录和索引表} % 目录、插图和表格等索引命令分别如下, % 将其插入到期望的位置即可 % (带星号的命令表示对应的索引表不会出现在目录中): % % \myentry{目录索引} % \DescribeMacro{\tableofcontents} % \DescribeMacro{\listoffigures} % \DescribeMacro{\listoffigures*} % \DescribeMacro{\listoftables} % \DescribeMacro{\listoftables*} % \begin{longtable}{ll} % \toprule % {\heiti 用途} & {\heiti 命令} \\\midrule % 目录 & \cs{tableofcontents} \\\midrule % 插图索引 & \cs{listoffigures} \\ % & \cs{listoffigures*} \\\midrule % 表格索引 & \cs{listoftables} \\ % & \cs{listoftables*} \\\bottomrule % \end{longtable} % % \LaTeX\ 默认支持插图和表格索引,是通过 \cs{caption} 命令完成的,因此它们必须出 % 现在浮动环境中,否则不被计数。 % % 如果不想让某个表格或者图片出现在索引里面,那么请使用命令 \cs{caption*},这 % 个命令不会给表格编号,也就是出来的只有标题文字而没有“表~xx”,“图~xx”, % % \subsection{封底部分} % % \subsubsection{原创性声明} % \myentry{声明} % \DescribeMacro{\declaration} % \cs{declaration}会自动生成原创性声明的全部内容,其中签字部分需要打印后手签。 % % \subsubsection{附录} % \myentry{附录} % \DescribeMacro{\appendix} % 附录里主要是外文资料以及翻译,放置在 |\appendix| 后面即可。 % % \subsection{自定义} % \label{sec:othercmd} % % \subsubsection{数学环境} % \label{sec:math} % \hitszthesis\ 定义了常用的数学环境: % % \begin{center} % \begin{tabular}{*{8}{l}}\toprule % axiom & theorem & definition & proposition & lemma & postulate ¬e& conclusion\\ % 公理 & 定理 & 定义 & 命题 & 引理 & 公设 &笔记& 结论\\\midrule % proof & corollary & example & exercise & assumption & remark & problem & property\\ % 证明 & 推论 & 例& 练习 & 假设 & 注 & 问题 & 性质\\\bottomrule % \end{tabular} % \end{center} % % 比如: % \begin{latex} % \begin{definition} % 道千乘之国,敬事而信,节用而爱人,使民以时。 % \end{definition} % \end{latex} % 产生(自动编号): % \medskip % % \noindent\framebox[\linewidth][l]{{\heiti 定义~1.1~~~} % {道千乘之国,敬事而信,节用而爱人,使民以时。}} % % \smallskip % 列举出来的数学环境毕竟是有限的,如果想用\emph{胡说}这样的数学环境,那么可以定义: % \begin{latex} % \theoremstyle{ydefstyle} % \newtheorem{ydefinition}{nonsense}[chapter] % \end{latex} % % 然后这样使用: % \begin{latex} % \begin{nonsense} % 契丹武士要来中原夺武林秘笈。—— 慕容博 % \end{nonsense} % \end{latex} % 产生(自动编号): % % \medskip % \noindent\framebox[\linewidth][l]{{\heiti 胡说~1.1~~~} % {契丹武士要来中原夺武林秘笈。—— 慕容博}} % % \subsubsection{列表环境} % \myentry{列表} % \DescribeEnv{itemize} % \DescribeEnv{enumerate} % \DescribeEnv{description} % 为了适合中文习惯,模板将这三个常用的列表环境用 \pkg{enumitem} 进行了纵向间距压 % 缩。一方面清除了多余空间,另一方面用户可以自己指定列表环境的样式(如标签符号, % 缩进等)。细节请参看 \pkg{enumitem} 文档,此处不再赘述。 % % \subsection{书脊} % \myentry{书脊} % \DescribeMacro{\spine} % 生成装订的书脊,为竖排格式,命令格式:\cs{spine}\oarg{标题}\oarg{作者}。默认参 % 数为论文中文题目和中文作者。如果中文题目中没有英文字母,那么直接调用此命令即可。 % 否则,可参考参看模板示例文件 \file{spine.tex} 进行微调: % % \lstinputlisting[style=lstStyleLaTeX]{spine.tex} % % \section{致谢} % \label{sec:thanks} % 感谢|thuthesis|、|hithesis|、|elegantbook|模板的作者,本模板基于他们改编而来! % % 欢迎各位到 \href{http://github.com/YangLaTeX/hitszthesis/}{\hitszthesis\ Github 主页}贡献! % % \StopEventually{\PrintChanges\PrintIndex} % \clearpage % % \section{实现细节} % % \subsection{基本信息} % 设置需要的 \LaTeX 版本,定义提供的类文件名称以及说明文字 % \begin{macrocode} %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesClass{hitszthesis} %[2020/02/18 v2.0 A Bachelor Thesis Template for Harbin Institute of Technology, ShenZhen % (HITSZ)] % \end{macrocode} % % 检查编译引擎,要求使用 \XeLaTeX,否则提示错误 % \begin{macrocode} \RequirePackage{ifxetex} \ifxetex\else \ClassError{hitszthesis}{Please use XeLaTeX to compile the file}{} \end{document} \fi % \end{macrocode} % % \subsection{定义选项} % 加载键值对设置宏包 % \begin{macrocode} %<*cls> \RequirePackage{kvoptions} % \end{macrocode} % % 加载对宏包、环境、命令进行操作的强大宏包 % \begin{macrocode} \RequirePackage{etoolbox} % \end{macrocode} % % 设置关键词:|hitsz| % \begin{macrocode} \SetupKeyvalOptions{family=hitsz, prefix=hitsz@, setkeys=\kvsetkeys} % \end{macrocode} % % \begin{macro}{\ykv} % 定义设置关键词命令 \cs{ykv} % \begin{macrocode} \newcommand{\ykv}[1]{\kvsetkeys{hitsz}{#1}} % \end{macrocode} % \end{macro} % % 表格信息对齐 % \begin{macrocode} \DeclareStringOption[infocenter]{infoalign} \DeclareVoidOption{infocenter}{\ykv{infoalign = infocenter}} \DeclareVoidOption{infoleft}{\ykv{infoalign = infoleft}} % \end{macrocode} % % 封面标题行数 % \begin{macrocode} \DeclareStringOption[onerow]{covertitle} \DeclareVoidOption{onerow}{\ykv{covertitle = onerow}} \DeclareVoidOption{tworow}{\ykv{covertitle = tworow}} % \end{macrocode} % % 数学字体选择 % \begin{macrocode} \DeclareStringOption[newtxmath]{mathfont} \DeclareVoidOption{newtxmath}{\ykv{mathfont = newtxmath}} \DeclareVoidOption{mtpro2}{\ykv{mathfont = mtpro2}} % \end{macrocode} % % 默认选项 % \begin{macrocode} \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}} % \end{macrocode} % % 禁用键值对操作 % \begin{macrocode} \ProcessKeyvalOptions*\relax % \end{macrocode} % % 加载 |book| 类,A4大小,正文12磅,单面打印 % \begin{macrocode} \LoadClass[12pt,a4paper,openany,oneside]{book} % \end{macrocode} % % \subsection{加载宏包} % 使用 \XeLaTeX 编译 \pkg{mtpro2} 宏包必须加载此宏包 % \begin{macrocode} \RequirePackage{etex} % \end{macrocode} % % 加载支持中文的 \pkg{ctex} 宏包 % \begin{macrocode} \RequirePackage[UTF8,space=auto,scheme=plain]{ctex} % \end{macrocode} % % 正文和数学字体设置 % \begin{macrocode} \RequirePackage{amsmath} \RequirePackage[T1]{fontenc} \RequirePackage{newtxtext} \ifdefstring{\hitsz@mathfont}{mtpro2}{ \RequirePackage[mtphrb,mtpcal,zswash,uprightGreek]{mtpro2} }{\relax} \ifdefstring{\hitsz@mathfont}{newtxmath}{ \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} % 设置中文加粗字体 % \begin{macrocode} \setCJKfamilyfont{kai}[AutoFakeBold]{simkai.ttf} \newcommand*{\kai}{\CJKfamily{kai}} \setCJKfamilyfont{song}[AutoFakeBold]{SimSun} \newcommand*{\song}{\CJKfamily{song}} % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\linespread} % 行间距,设为1.3,due to 12pt与小四号字的大小微差 % \begin{macrocode} \linespread{1.3} % \end{macrocode} % \end{macro} % % 加载常用宏包 % 在一页上可以使用单栏和多栏样式 % \begin{macrocode} \RequirePackage{multicol} % \end{macrocode} % % 排版代码 % \begin{macrocode} \RequirePackage{fancyvrb} % \end{macrocode} % % 自定义目录格式 % \begin{macrocode} \RequirePackage{titletoc} % \end{macrocode} % % 设置颜色 % \begin{macrocode} \RequirePackage{xcolor} % \end{macrocode} % % 插入图片 % \begin{macrocode} \RequirePackage{graphicx} % \end{macrocode} % % 表格 % \begin{macrocode} \RequirePackage{array} % \end{macrocode} % % 长表格 % \begin{macrocode} \RequirePackage{longtable} % \end{macrocode} % % \pkg{booktabs} 提供了\cs{toprule} 等命令 % \begin{macrocode} \RequirePackage{booktabs} % \end{macrocode} % % \pkg{multirow} 支持在表格中跨行 % \begin{macrocode} \RequirePackage{multirow} % \end{macrocode} % % 调整间隔, 让表格更好看些 % \begin{macrocode} \RequirePackage{bigstrut} % \end{macrocode} % % 在跨行表格中输入定界符 % \begin{macrocode} \RequirePackage{bigdelim} % \end{macrocode} % % 保护脆落命令 % \begin{macrocode} \RequirePackage{cprotect} % \end{macrocode} % % 定制列表环境 % \begin{macrocode} \RequirePackage{enumitem} % \end{macrocode} % % 设置代码环境 % \begin{macrocode} \RequirePackage{listings} % \end{macrocode} % % 超链接格式设置 % \begin{macrocode} \RequirePackage{hyperref} % \end{macrocode} % % \begin{macro}{\parindent} % 首行缩进 % \begin{macrocode} \RequirePackage{indentfirst} \setlength\parindent{2em} % \end{macrocode} % \end{macro} % % 设置浮动体的标题 % \begin{macrocode} \RequirePackage{caption} % \end{macrocode} % % 浮动环境 % \begin{macrocode} \RequirePackage{float} % \end{macrocode} % % 下划线 % \begin{macrocode} \RequirePackage{ulem} % \end{macrocode} % % 尺寸计算 % \begin{macrocode} \RequirePackage{calc} % \end{macrocode} % % \pkg{tikz} 绘图 % \begin{macrocode} \RequirePackage{tikz} % \end{macrocode} % % 公式字母加粗 % \begin{macrocode} \RequirePackage{bm} % \end{macrocode} % % 子公式编号 % \begin{macrocode} \RequirePackage{cases} % \end{macrocode} % % 书写单位 % \begin{macrocode} \RequirePackage{siunitx} % \end{macrocode} % % \pkg{pdfpages} 宏包便于我们插入扫描后的授权页和声明页 PDF 文档。 % \begin{macrocode} \RequirePackage{pdfpages} \includepdfset{fitpaper=true} % \end{macrocode} % % \begin{macro}{\ttdefault} % 排版代码 % \begin{macrocode} \RequirePackage{listings} \renewcommand{\ttdefault}{cmtt} % \end{macrocode} % \end{macro} % % \begin{macro}{\lstdefinestyle} % 定义 |ystyle| 样式 % \begin{macrocode} \lstdefinestyle{ystyle}{ basicstyle=% \ttfamily \lst@ifdisplaystyle\small\fi } % \end{macrocode} % \end{macro} % % \begin{macro}{\lstset} % 使用 |ystyle| 样式 % \begin{macrocode} \lstset{basicstyle = \ttfamily, style = ystyle, breaklines = true} % \end{macrocode} % \end{macro} % % \begin{macro}{\definecolor} % 定义代码颜色 % \begin{macrocode} \definecolor{lightgrey}{rgb}{0.9,0.9,0.9} \definecolor{frenchplum}{RGB}{190,20,83} \definecolor{winered}{rgb}{0.5,0,0} % \end{macrocode} % \end{macro} % % \begin{macro}{\lstset} % 设置 \LaTeX 代码排版样式 % \begin{macrocode} \lstset{language = [LaTeX]TeX, texcsstyle = *\color{winered}, numbers = none, mathescape, breaklines = true, keywordstyle = \color{winered}, commentstyle = \color{gray}, emph = {hitszpaper,fontenc,fontspec,xeCJK,FiraMono,xunicode,newtxmath, figure,fig,image,img,table,itemize,enumerate,newtxtext,newtxtt, ctex, microtype,description,times,newtx,booktabs,tabular, PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang, amsthm,tcolorbox,titlestyle,cite,marginnote,ctex,listings,base, subnumcases}, emphstyle = {\color{frenchplum}}, morekeywords = {DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule, institute,version,includegraphics,setmainfont,setsansfont, setmonofont,setCJKmainfont,setCJKsansfont,setCJKmonofont, RequirePackage,figref, tabref,email,maketitle,keywords,definecolor, extrainfo,logo,cover,subtitle,appendix,chapter,hypersetup, mainmatter,frontmatter,tableofcontents, hitszpar,heiti,kaishu,lstset, pagecolor,zhnumber,marginpar,part, equote,marginnote}, frame = single, tabsize = 2, rulecolor = \color{black}, framerule = 0.2pt, columns = flexible, % backgroundcolor = \color{lightgrey} } % \end{macrocode} % \end{macro} % % \subsection{输入信息} % \subsubsection{定义输入常量} % \begin{macro}{\hitsz@tokens@thesistitle} % 论文标题 % \begin{macrocode} \newcommand\hitsz@tokens@thesistitle{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@keywords} % 关键词,中文 % \begin{macrocode} \newcommand\hitsz@tokens@keywords{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@keywordsen} % 关键词,英文 % \begin{macrocode} \newcommand\hitsz@tokens@keywordsen{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@papercategory} % 论文类别 % \begin{macrocode} \newcommand*\hitsz@tokens@papercategory{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@schoolname} % 学校名称 % \begin{macrocode} \newcommand*\hitsz@tokens@schoolname{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@departname} % 院系 % \begin{macrocode} \newcommand*\hitsz@tokens@departname{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@dateinput} % 日期 % \begin{macrocode} \newcommand*\hitsz@tokens@dateinput{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@authorname} % 姓名 % \begin{macrocode} \newcommand*\hitsz@tokens@authorname{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@studentID} % 学号 % \begin{macrocode} \newcommand*\hitsz@tokens@studentID{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@majorin} % 专业 % \begin{macrocode} \newcommand*\hitsz@tokens@majorin{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@instructor} % 指导教师 % \begin{macrocode} \newcommand*\hitsz@tokens@instructor{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@titleone} % 第一行标题 % \begin{macrocode} \newcommand*\hitsz@tokens@titleone{} % \end{macrocode} % \end{macro} % % \begin{macro}{\hitsz@tokens@titletwo} % 第二行标题 % \begin{macrocode} \newcommand*\hitsz@tokens@titletwo{} % \end{macrocode} % \end{macro} % % \subsubsection{定义与常量有关的新命令} % % \begin{macro}{\thesistitle} % 输入论文标题 % \begin{macrocode} \newcommand*\thesistitle[1]{% \renewcommand{\hitsz@tokens@thesistitle}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\papercategory} % 输入论文类别 % \begin{macrocode} \newcommand*\papercategory[1]{% \renewcommand{\hitsz@tokens@papercategory}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\schoolname} % 输入校名 % \begin{macrocode} \newcommand*\schoolname[1]{% \renewcommand{\hitsz@tokens@schoolname}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\departname} % 输入院系名称 % \begin{macrocode} \newcommand*\departname[1]{% \renewcommand{\hitsz@tokens@departname}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\dateinput} % 输入日期 % \begin{macrocode} \newcommand*\dateinput[1]{% \renewcommand{\hitsz@tokens@dateinput}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\authorname} % 输入姓名 % \begin{macrocode} \newcommand*\authorname[1]{% \renewcommand{\hitsz@tokens@authorname}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\studentID} % 输入学号 % \begin{macrocode} \newcommand*\studentID[1]{% \renewcommand{\hitsz@tokens@studentID}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\majorin} % 输入专业 % \begin{macrocode} \newcommand*\majorin[1]{% \renewcommand{\hitsz@tokens@majorin}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\instructor} % 输入指导教师 % \begin{macrocode} \newcommand*\instructor[1]{% \renewcommand{\hitsz@tokens@instructor}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\titleone} % 输入第一行标题 % \begin{macrocode} \newcommand*\titleone[1]{% \renewcommand{\hitsz@tokens@titleone}{#1}} % \end{macrocode} % \end{macro} % % \begin{macro}{\titletwo} % 输入第二行标题 % \begin{macrocode} \newcommand*\titletwo[1]{% \renewcommand{\hitsz@tokens@titletwo}{#1}} % \end{macrocode} % \end{macro} % % \subsection{定义常量的值} % \begin{macro}{\listfigurename} % \begin{macro}{\listtablename} % \begin{macro}{\abstractname} % \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{插图目录} \renewcommand\listtablename{附表目录} \renewcommand\abstractname{摘\quad 要} \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} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\solutionname} % \begin{macro}{\propertyname} % 继续定义 % \begin{macrocode} \newcommand{\solutionname}{解} \newcommand{\propertyname}{性质} % \end{macrocode} % \end{macro} % \end{macro} % % \vskip0.3cm % \subsection{字号设置} % \begin{macro}{\hitsz@def@fontsize} % 中英字号转换 % \begin{macrocode} \def\hitsz@def@fontsize#1#2{% \expandafter\newcommand\csname #1\endcsname[1][1.3]{% \fontsize{#2}{##1\dimexpr #2}\selectfont}} % \end{macrocode} % \end{macro} % % \begin{macro}{\chuhao} % \begin{macro}{\xiaochu} % \begin{macro}{\yihao} % \begin{macro}{\xiaoyi} % \begin{macro}{\erhao} % 定义一组字号 % \begin{macrocode} \hitsz@def@fontsize{chuhao}{42bp} \hitsz@def@fontsize{xiaochu}{36bp} \hitsz@def@fontsize{yihao}{26bp} \hitsz@def@fontsize{xiaoyi}{24bp} \hitsz@def@fontsize{erhao}{22bp} % \end{macrocode} % \begin{macro}{\xiaoer} % \begin{macro}{\sanhao} % \begin{macro}{\xiaosan} % \begin{macro}{\sihao} % \begin{macro}{\banxiaosi} % \begin{macro}{\xiaosi} % \begin{macro}{\dawu} % \begin{macro}{\wuhao} % \begin{macro}{\xiaowu} % \begin{macro}{\liuhao} % \begin{macro}{\xiaoliu} % \begin{macro}{\qihao} % \begin{macro}{\bahao} % 继续定义字号 % \begin{macrocode} \hitsz@def@fontsize{xiaoer}{18bp} \hitsz@def@fontsize{sanhao}{16bp} \hitsz@def@fontsize{xiaosan}{15bp} \hitsz@def@fontsize{sihao}{14bp} \hitsz@def@fontsize{banxiaosi}{13bp} \hitsz@def@fontsize{xiaosi}{12bp} \hitsz@def@fontsize{dawu}{11bp} \hitsz@def@fontsize{wuhao}{10.5bp} \hitsz@def@fontsize{xiaowu}{9bp} \hitsz@def@fontsize{liuhao}{7.5bp} \hitsz@def@fontsize{xiaoliu}{6.5bp} \hitsz@def@fontsize{qihao}{5.5bp} \hitsz@def@fontsize{bahao}{5bp} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \subsection{图片搜索目录设置} % \begin{macro}{\graphicspath} % 图片搜索目录 % \begin{macrocode} \graphicspath{{./figure/}{./figures/}{./image/}{./images/} {./graphics/}{./graphic/}{./pictures/}{./picture/}{./front/}} % \end{macrocode} % \end{macro} % % \subsection{页面设置} % \begin{macro}{\geometry} % 页面设置,按照撰写示例word模板设置页边距 % \begin{macrocode} \RequirePackage{geometry} \geometry{ a4paper, left=30mm, right=30mm, top=41mm, bottom=30mm, headheight = 2.17cm, headsep = 1mm, footskip = 0cm, } % \end{macrocode} % \end{macro} % % \subsection{超链接设置} % \begin{macro}{\hypersetup} % 超链接设置,设置目录、图表公式引用的跳转 % \begin{macrocode} \RequirePackage{hyperref} \hypersetup{ breaklinks, unicode, linktoc=all, bookmarksnumbered=true, bookmarksopen=true, pdfsubject={哈尔滨工业大学(深圳)本科毕业设计(论文)}, pdftitle = {哈尔滨工业大学(深圳)本科毕业设计(论文)}, pdfauthor = {杨敬轩}, pdfkeywords={HITSZThesis, Dissertation}, pdfcreator={XeLaTeX with hitszthesis class}, colorlinks, linkcolor=black, citecolor=black, plainpages=false, pdfstartview=FitH, pdfborder={0 0 0}, } % \end{macrocode} % \end{macro} % % \subsection{正文内容设置} % 章节设置 % \begin{macrocode} \RequirePackage[pagestyles]{titlesec} \RequirePackage{apptools} % \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} % % \begin{macro}{\captionsetup} % 图表标题设置,字号为small,分割符为空格 % \begin{macrocode} \RequirePackage[font=small,labelsep=quad]{caption} % \end{macrocode} % % 标题与图表的间距为3pt % \begin{macrocode} \captionsetup[table]{skip=3pt} \captionsetup[figure]{skip=10pt} % \end{macrocode} % \end{macro} % % \begin{macro}{\figref} % \begin{macro}{\tabref} % \begin{macro}{\equref} % 图表的引用格式 % \begin{macrocode} \newcommand\figref[1]{图\ref{#1}} \newcommand\tabref[1]{表\ref{#1}} \newcommand\equref[1]{式(\ref{#1})} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\setlist} % 设置列表环境各项间无自动间距 % \begin{macrocode} \setlist{nolistsep} % \end{macrocode} % \end{macro} % % \subsection{定理样式设置} % 定义各类定理样式 % \begin{macrocode} \RequirePackage{amsthm} \let\proof\relax \let\endproof\relax % \end{macrocode} % % \begin{macro}{\newtheoremstyle} % 定义新定义样式 % \begin{macrocode} \newtheoremstyle{ydefstyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{% 0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}} % \end{macrocode} % % 定义新定理样式 % \begin{macrocode} \newtheoremstyle{ythmstyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{% 0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}} % \end{macrocode} % % 定义新命题样式 % \begin{macrocode} \newtheoremstyle{yprostyle}{3pt}{3pt}{\itshape}{}{\bfseries}{}{% 0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}} % \end{macrocode} % \end{macro} % % \begin{macro}{\theoremstyle} % \begin{macro}{\newtheorem} % 应用定义样式 % \begin{macrocode} \theoremstyle{ydefstyle} \newtheorem{ydefinition}{\definitionname }[chapter] % \end{macrocode} % % 应用定理样式 % \begin{macrocode} \theoremstyle{ythmstyle} \newtheorem{ytheorem}{\theoremname }[chapter] \newtheorem{ylemma}{\lemmaname }[chapter] \newtheorem{ycorollary}{\corollaryname }[chapter] \newtheorem{ypostulate}{\postulatename }[chapter] \newtheorem{yaxiom}{\axiomname }[chapter] % \end{macrocode} % % 应用命题样式 % \begin{macrocode} \theoremstyle{yprostyle} \newtheorem{yproposition}{\propositionname }[chapter] % \end{macrocode} % \end{macro} % \end{macro} % % \begin{environment}{theorem} % 定义新定理环境 % \begin{macrocode} \newenvironment{theorem}[2] {\ifstrempty{#1}{\ytheorem}{\ytheorem[#1]}\ifstrempty{#2}{}{\label{#2}}} {\endytheorem} % \end{macrocode} % \end{environment} % % \begin{environment}{definition} % 定义新定义环境 % \begin{macrocode} \newenvironment{definition}[2] {\ifstrempty{#1}{\ydefinition}{\ydefinition[#1]}\ifstrempty{#2}{}{\label{#2}}} {\endydefinition} % \end{macrocode} % \end{environment} % % \begin{environment}{lemma} % 定义新引理环境 % \begin{macrocode} \newenvironment{lemma}[2] {\ifstrempty{#1}{\ylemma}{\ylemma[#1]}\ifstrempty{#2}{}{\label{#2}}} {\endylemma} % \end{macrocode} % \end{environment} % % \begin{environment}{corollary} % 定义新推论环境 % \begin{macrocode} \newenvironment{corollary}[2] {\ifstrempty{#1}{\ycorollary}{\ycorollary[#1]}\ifstrempty{#2}{}{\label{#2}}} {\endycorollary} % \end{macrocode} % \end{environment} % % \begin{environment}{postulate} % 定义新公设环境 % \begin{macrocode} \newenvironment{postulate}[2] {\ifstrempty{#1}{\ypostulate}{\ypostulate[#1]}\ifstrempty{#2}{}{\label{#2}}} {\endypostulate} % \end{macrocode} % \end{environment} % % \begin{environment}{axiom} % 定义新公理环境 % \begin{macrocode} \newenvironment{axiom}[2] {\ifstrempty{#1}{\yaxiom}{\yaxiom[#1]}\ifstrempty{#2}{}{\label{#2}}} {\endyaxiom} % \end{macrocode} % \end{environment} % % \begin{environment}{proposition} % 定义新命题环境 % \begin{macrocode} \newenvironment{proposition}[2] {\ifstrempty{#1}{\yproposition}{\yproposition[#1]}\ifstrempty{#2}{}{\label{#2}}} {\endyproposition} % \end{macrocode} % \end{environment} % % \begin{environment}{note} % 定义新注解环境 % \begin{macrocode} \newenvironment{note}{ \par\noindent\textbf{\notename\,} \itshape}{\par} % \end{macrocode} % \end{environment} % % \begin{environment}{proof} % 定义新证明环境 % \begin{macrocode} \newenvironment{proof}{ \par\noindent\textbf{\proofname\;} }{\hfill$\Box$\quad\par} % \end{macrocode} % \end{environment} % % \begin{environment}{solution} % 定义新解答环境 % \begin{macrocode} \newenvironment{solution}{\medskip\par\noindent\textbf{\solutionname} \itshape}{\par} % \end{macrocode} % \end{environment} % % \begin{environment}{remark} % 定义新注释环境 % \begin{macrocode} \newenvironment{remark}{\noindent\textbf{\remarkname}}{\par} % \end{macrocode} % \end{environment} % % \begin{environment}{assumption} % 定义新假设环境 % \begin{macrocode} \newenvironment{assumption}{\par\noindent\textbf{\assumptionname}}{\par} % \end{macrocode} % \end{environment} % % \begin{environment}{conclusion} % 定义新结论环境 % \begin{macrocode} \newenvironment{conclusion}{\par\noindent\textbf{\conclusionname}}{\par} % \end{macrocode} % \end{environment} % % \begin{environment}{property} % 定义新性质环境 % \begin{macrocode} \newenvironment{property}{\par\noindent\textbf{\propertyname}}{\par} % \end{macrocode} % \end{environment} % % \subsection{封面设置} % \begin{macro}{\maketitle} % 重定义\cs{maketitle}命令 % \begin{macrocode} \renewcommand{\maketitle}{\par \begingroup \newgeometry{left=20mm,right=20mm,top=30mm,bottom=35mm} \newpage % 禁止图片位于页面最上方 \global\@topnum\z@ \@maketitle % 下面再设置封面具体内容 \endgroup % 先取消原来封面样式的所有设置,以便后面重写此命令 \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } % 定义封面具体内容 \newdimen\infowidth \infowidth = 6.5cm \def\@maketitle{% \newpage % 开始写封面 \thispagestyle{empty} \vspace*{2cm} %%------------------------ \begin{center} \ifdefstring{\hitsz@covertitle}{tworow}{ \parbox[t][1.4cm][t]{\textwidth}{ \begin{center}\erhao[0]\bfseries\hitsz@tokens@titleone\end{center} }\par \parbox[t][2.5cm][t]{\textwidth}{ \begin{center}\erhao[0]\bfseries\hitsz@tokens@titletwo\end{center} }\par }{\relax} \ifdefstring{\hitsz@covertitle}{onerow}{ \parbox[t][3.4cm][t]{\textwidth}{ \begin{center}\erhao[0]\bfseries\hitsz@tokens@thesistitle\end{center} } }{\relax} \parbox[t][8.7cm][t]{\textwidth}{ \begin{center}\xiaoer[0]\song\textbf{\ziju{0.2}\hitsz@tokens@authorname}\end{center} } \begin{center} \bfseries \begin{tabular}{rl} {\xiaosi 学\hphantom{教师}院:} & \xiaosi\hitsz@tokens@departname\\[14pt] {\xiaosi 学\hphantom{教师}号:} & \xiaosi\hitsz@tokens@studentID \end{tabular} \hspace{0.5cm} \begin{tabular}{rl} {\xiaosi 专\hphantom{教师}业:} & \xiaosi\hitsz@tokens@majorin\\[14pt] {\xiaosi 指导教师:} & \xiaosi\hitsz@tokens@instructor \end{tabular} \end{center} % 日期 \vspace{2.6cm} {\xiaosi[0]\song\textbf{2020年7月}} \end{center} %%---------------------------- %% 第二页 \clearpage \thispagestyle{empty} \vspace*{0.8cm} \centering\includegraphics[width=8cm]{HITSZname} \vspace{1.3cm} \begin{center} \centering\includegraphics[width=10.5cm]{thesistitle} \vfill \parbox[t][14.2cm][b]{\textwidth} {\heiti\xiaosan \begin{center} \renewcommand{\arraystretch}{2.6} \bfseries % 居中对齐 \ifdefstring{\hitsz@infoalign}{infocenter}{ \begin{tabular}{l@{\ \ }c} {\xiaoer 题\hphantom{\ 导\ \ \ }目} & \underline{\makebox[\infowidth]{% \xiaoer \hitsz@tokens@titleone}}\\ & \underline{\makebox[\infowidth]{% \xiaoer \hitsz@tokens@titletwo}}\\ & \\ {\xiaosan 专\hphantom{\ 导\ 教\ }业} & \underline{\makebox[\infowidth]{% \xiaosan\hitsz@tokens@majorin}}\\ {\xiaosan 学\hphantom{\ 导\ 教\ }号} & \underline{\makebox[\infowidth]{% \xiaosan\hitsz@tokens@studentID}}\\ {\xiaosan 学\hphantom{\ 导\ 教\ }生} & \underline{\makebox[\infowidth]{% \xiaosan\hitsz@tokens@authorname}}\\ {\xiaosan 指\ 导\ 教\ 师} & \underline{\makebox[\infowidth]{% \xiaosan\hitsz@tokens@instructor}}\\ {\xiaosan 答\ 辩\ 日\ 期} & \underline{\makebox[\infowidth]{% \xiaosan\hitsz@tokens@dateinput}} \end{tabular} \renewcommand{\arraystretch}{1} }{\relax} % 左对齐 \ifdefstring{\hitsz@infoalign}{infoleft}{ \begin{tabular}{l@{\ \ }c} {\xiaoer 题\hphantom{\ 导\ \ \ }目} & \underline{\makebox[\infowidth][l]{% \hspace*{1em}\xiaoer \hitsz@tokens@titleone}}\\ & \underline{\makebox[\infowidth][l]{% \hspace*{1em}\xiaoer \hitsz@tokens@titletwo}}\\ & \\ {\xiaosan 专\hphantom{\ 导\ 教\ }业} & \underline{\makebox[\infowidth][l]{% \hspace*{1em}\xiaosan\hitsz@tokens@majorin}}\\ {\xiaosan 学\hphantom{\ 导\ 教\ }号} & \underline{\makebox[\infowidth][l]{% \hspace*{1em}\xiaosan\hitsz@tokens@studentID}}\\ {\xiaosan 学\hphantom{\ 导\ 教\ }生} & \underline{\makebox[\infowidth][l]{% \hspace*{1em}\xiaosan\hitsz@tokens@authorname}}\\ {\xiaosan 指\ 导\ 教\ 师} & \underline{\makebox[\infowidth][l]{% \hspace*{1em}\xiaosan\hitsz@tokens@instructor}}\\ {\xiaosan 答\ 辩\ 日\ 期} & \underline{\makebox[\infowidth][l]{% \hspace*{1em}\xiaosan\hitsz@tokens@dateinput}} \end{tabular} \renewcommand{\arraystretch}{1} }{\relax} \end{center} } \end{center} \restoregeometry \clearpage } % \end{macrocode} % \end{macro} % % \begin{macro}{\frontmatter} % 设置前言页码编号为大写罗马数字 % \begin{macrocode} \renewcommand{\frontmatter}{% \cleardoublepage \@mainmatterfalse \pagenumbering{Roman} } % \end{macrocode} % \end{macro} % % \subsection{中英文摘要环境与关键词命令设置} % \begin{environment}{abstract} %% 中文摘要环境 % \begin{macrocode} \newenvironment{abstract}{\chapter*{\abstractname} \addcontentsline{toc}{chapter}{\abstractname} }{\if@twocolumn\else\null\fi} % \end{macrocode} % \end{environment} % % \begin{environment}{keywords} % 中文关键词环境 % \begin{macrocode} \newcommand\keywords[1]{% \renewcommand{\hitsz@tokens@keywords}{#1} {\vskip18pt \hspace{-30bp}\begin{tabular}{lp{132mm}} {\zihao{-4}\heiti\keywordsname:}& {\xiaosi\hitsz@tokens@keywords} \end{tabular}} } % \end{macrocode} % \end{environment} % % \begin{environment}{abstracten} % 英文摘要环境 % \begin{macrocode} \newenvironment{abstracten}{\chapter*{\bfseries Abstract} \addcontentsline{toc}{chapter}{ABSTRACT} }{\if@twocolumn\else\null\fi} % \end{macrocode} % \end{environment} % % \begin{environment}{keywordsen} % 英文关键词环境 % \begin{macrocode} \newcommand\keywordsen[1]{% \renewcommand{\hitsz@tokens@keywordsen}{#1} {\vskip 18pt \hspace{-30bp}\begin{tabular}{lp{127mm}} {\zihao{-4}\bf\keywordsenname:}& {\xiaosi\hitsz@tokens@keywordsen} \end{tabular}} } % \end{macrocode} % \end{environment} % % \subsection{原创性声明设置} % \begin{macro}{\declaration} % 定义原创性声明命令 % \begin{macrocode} \newcommand{\declaration}{\par \begingroup \hitsz@declaration \endgroup } % \end{macrocode} % % 定义原创性声明具体内容 % \begin{macrocode} \def\hitsztitle{\hitsz@tokens@thesistitle} \def\hitszauthor{\hitsz@tokens@authorname} \def\hitsz@declaration{ \chapter*{\sanhao 哈尔滨工业大学(深圳)本科毕业设计(论文)原创性声明} \addcontentsline{toc}{chapter}{原创性声明}\par 本人郑重声明:在哈尔滨工业大学(深圳)攻读学士学位期间,所提交的毕业设计(论文)《\hitsztitle》,是本人在导师指导下独立进行研究工作所取得的成果。对本文的研究工作做出重要贡献的个人和集体,均已在文中以明确方式注明,其它未注明部分不包含他人已发表或撰写过的研究成果,不存在购买、由他人代写、剽窃和伪造数据等作假行为。 \par 本人愿为此声明承担法律责任。\par \vspace{30pt} \hspace{6em}作者签名:\hspace{8em}日期:\hspace{3em}年\hspace{1.5em}月\hspace{1.5em}日 } % \end{macrocode} % \end{macro} % % \subsection{参考文献设置} % \begin{environment}{thebibliography} % 重定义参考文献环境 % \begin{macrocode} \renewenvironment{thebibliography}[1] {\chapter*{\bibname}% \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} % \end{macrocode} % \end{environment} % % \subsection{页眉页脚设置} % \begin{macro}{\pagestyle} % 定义页眉页脚 % \begin{macrocode} \RequirePackage{fancyhdr} \RequirePackage{lastpage} \pagestyle{fancy} % \end{macrocode} % % 页眉 % \begin{macrocode} \lhead{} \chead{\wuhao 哈尔滨工业大学(深圳)本科毕业设计(论文)} \rhead{} % \end{macrocode} % % 页脚 % \begin{macrocode} \lfoot{} \cfoot{\wuhao -\thepage-} \rfoot{} % \end{macrocode} % \end{macro} % % \begin{macro}{\makeheadrule} % 定义页眉双横线样式,注意下面代码中的\pkg{\%}不能删 % \begin{macrocode} \newcommand{\makeheadrule}{% \makebox[0pt][l]{\rule[1mm]{\headwidth}{0.4mm}}% \rule[0.35\baselineskip]{\headwidth}{0.8mm}} % \end{macrocode} % \end{macro} % % \begin{macro}{\headrule} % 定义页眉横线为双横线 % \begin{macrocode} \renewcommand{\headrule}{% {\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi% \makeheadrule}} % \end{macrocode} % \end{macro} % % \subsection{目录格式设置} % % \begin{macro}{\titlecontents} % 设置目录格式,目录只有三级 % % 1级目录格式 % \begin{macrocode} \titlecontents{chapter}[0pt]{\vspace{1mm}\heiti} {第\thecontentslabel\,\,章\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} % \end{macrocode} % % 2级目录格式 % \begin{macrocode} \titlecontents{section}[25pt]{\songti} {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} % \end{macrocode} % % 3级目录格式 % \begin{macrocode} \titlecontents{subsection}[47pt]{\songti} {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} % \end{macrocode} % \end{macro} % % 附录环境设置,暂时无用 % \begin{macrocode} \RequirePackage[title,titletoc]{appendix} % \end{macrocode} % % \begin{environment}{tabular} % 修改表格字号,注意 |tabular| 要放在 |table| 环境里 % \begin{macrocode} \BeforeBeginEnvironment{tabular}{\wuhao} % \end{macrocode} % \end{environment} % % \begin{environment}{table} % 修改表格与后文间距,缩短1cm % \begin{macrocode} \AfterEndEnvironment{table}{\vspace{-1cm}} % \end{macrocode} % \end{environment} % % \begin{macro}{\newcounter} % 新计数器,编排表格编号用 % \begin{macrocode} \newcounter{rowno} % \end{macrocode} % \end{macro} % % \begin{macro}{\thefigure} % \begin{macro}{\thetable} % \begin{macro}{\theequation} % 设置图表公式编号格式为1-1 % \begin{macrocode} \renewcommand{\thefigure}{\thechapter-\arabic{figure}} \renewcommand{\thetable}{\thechapter-\arabic{table}} \renewcommand{\theequation}{\thechapter-\arabic{equation}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % % \subsection{其他杂项设置} % \begin{macro}{\usetikzlibrary} % 使用\pkg{tikz}配置流程图基本图形 % \begin{macrocode} \usetikzlibrary{shapes.geometric, arrows} % \end{macrocode} % \end{macro} % % \begin{environment}{startstop} % 开始 % \begin{macrocode} \tikzstyle{startstop} = [rectangle, rounded corners, minimum width = 2cm, minimum height=1cm,text centered, draw = black] % \end{macrocode} % \end{environment} % % \begin{environment}{io} % 输入输出 % \begin{macrocode} \tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=2cm, minimum height=1cm, text centered, draw=black] % \end{macrocode} % \end{environment} % % \begin{environment}{process} % 过程 % \begin{macrocode} \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black] % \end{macrocode} % \end{environment} % % \begin{environment}{decision} % 判断 % \begin{macrocode} \tikzstyle{decision} = [diamond, aspect = 3, text centered, draw=black] % \end{macrocode} % \end{environment} % % \begin{environment}{arrow} % 箭头形式 % \begin{macrocode} \tikzstyle{arrow} = [->,>=stealth] % \end{macrocode} % \end{environment} % % \begin{macro}{\upcite} % 参考文献标号为上标 % \begin{macrocode} \newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}} % \end{macrocode} % \end{macro} % % \begin{macro}{\thefootnote} % 设置脚注编号格式 % \begin{macrocode} \renewcommand{\thefootnote}{\fnsymbol{footnote}} % \end{macrocode} % \end{macro} % % \begin{macro}{\chapter} % 解决book类文档章首页和目录页没有页眉页脚的问题 % \begin{macrocode} \makeatletter \renewcommand\chapter{ \if@openright\cleardoublepage \else\clearpage \fi \thispagestyle{fancy} \global\@topnum\z@ \@afterindentfalse \secdef\@chapter\@schapter } \makeatother % \end{macrocode} % \end{macro} % % \subsection{新数学命令设置} % \begin{macro}{\dif} % \begin{macro}{\no} % \begin{macro}{\dis} % \begin{macro}{\ls} % \begin{macro}{\gs} % 新简记数学命令 % \begin{macrocode} \newcommand\dif{\text{d}} \newcommand\no{\noindent} \newcommand\dis{\displaystyle} \newcommand\ls{\leqslant} \newcommand\gs{\geqslant} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\limit} % \begin{macro}{\limn} % \begin{macro}{\limxz} % \begin{macro}{\limxi} % \begin{macro}{\limxpi} % \begin{macro}{\limxni} % \begin{macro}{\limtpi} % \begin{macro}{\limtni} % 极限 % \begin{macrocode} \newcommand\limit{\dis\lim\limits} \newcommand\limn{\dis\lim\limits_{n\to\infty}} \newcommand\limxz{\dis\lim\limits_{x\to0}} \newcommand\limxi{\dis\lim\limits_{x\to\infty}} \newcommand\limxpi{\dis\lim\limits_{x\to+\infty}} \newcommand\limxni{\dis\lim\limits_{x\to-\infty}} \newcommand\limtpi{\dis\lim\limits_{t\to+\infty}} \newcommand\limtni{\dis\lim\limits_{t\to-\infty}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\sumn} % \begin{macro}{\sumnz} % $n$求和 % \begin{macrocode} \newcommand\sumn{\dis\sum\limits_{n=1}^{\infty}} \newcommand\sumnz{\dis\sum\limits_{n=0}^{\infty}} % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\sumi} % \begin{macro}{\sumiz} % \begin{macro}{\sumin} % \begin{macro}{\sumizn} % $i$求和 % \begin{macrocode} \newcommand\sumi{\dis\sum\limits_{i=1}^{\infty}} \newcommand\sumiz{\dis\sum\limits_{i=0}^{\infty}} \newcommand\sumin{\dis\sum\limits_{i=1}^{n}} \newcommand\sumizn{\dis\sum\limits_{i=0}^{n}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\sumk} % \begin{macro}{\sumkz} % \begin{macro}{\sumkn} % \begin{macro}{\sumkfn} % $k$求和 % \begin{macrocode} \newcommand\sumk{\dis\sum\limits_{k=1}^{\infty}} \newcommand\sumkz{\dis\sum\limits_{k=0}^{\infty}} \newcommand\sumkn{\dis\sum\limits_{k=0}^n} \newcommand\sumkfn{\dis\sum\limits_{k=1}^n} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\pzx} % \begin{macro}{\pzy} % $z$偏微分 % \begin{macrocode} \newcommand\pzx{\dis\frac{\partial z}{\partial x}} \newcommand\pzy{\dis\frac{\partial z}{\partial y}} % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\pfx} % \begin{macro}{\pfy} % $f$偏微分 % \begin{macrocode} \newcommand\pfx{\dis\frac{\partial f}{\partial x}} \newcommand\pfy{\dis\frac{\partial f}{\partial y}} % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\pzxx} % \begin{macro}{\pzxy} % \begin{macro}{\pzyx} % \begin{macro}{\pzyy} % $z$二重偏微分 % \begin{macrocode} \newcommand\pzxx{\dis\frac{\partial^2 z}{\partial x^2}} \newcommand\pzxy{\dis\frac{\partial^2 z}{\partial x\partial y}} \newcommand\pzyx{\dis\frac{\partial^2 z}{\partial y\partial x}} \newcommand\pzyy{\dis\frac{\partial^2 z}{\partial y^2}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\pfxx} % \begin{macro}{\pfxy} % \begin{macro}{\pfyx} % \begin{macro}{\pfyy} % $f$二重偏微分 % \begin{macrocode} \newcommand\pfxx{\dis\frac{\partial^2 f}{\partial x^2}} \newcommand\pfxy{\dis\frac{\partial^2 f}{\partial x\partial y}} \newcommand\pfyx{\dis\frac{\partial^2 f}{\partial y\partial x}} \newcommand\pfyy{\dis\frac{\partial^2 f}{\partial y^2}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\intzi} % \begin{macro}{\intd} % \begin{macro}{\intab} % 积分 % \begin{macrocode} \newcommand\intzi{\dis\int_{0}^{+\infty}} \newcommand\intd{\dis\int} \newcommand\intab{\dis\int_a^b} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\degree} % 角度符号 % \begin{macrocode} \newcommand{\degree}{^\circ} % \end{macrocode} % \end{macro} % % \begin{macro}{\ma} % 花体 % \begin{macrocode} \newcommand\ma{\mathcal{A}} % \end{macrocode} % \end{macro} % % \begin{macro}{\mb} % \begin{macro}{\mc} % \begin{macro}{\me} % \begin{macro}{\mg} % 继续定义 % \begin{macrocode} \newcommand\mb{\mathcal{B}} \newcommand\mc{\mathcal{C}} \newcommand\me{\mathcal{E}} \newcommand\mg{\mathcal{g}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\mcc} % \begin{macro}{\mrr} % \begin{macro}{\mzz} % 重体 % \begin{macrocode} \newcommand\mcc{\mathbb{C}} \newcommand\mrr{\mathbb{R}} \newcommand\mzz{\mathbb{Z}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\vx} % \begin{macro}{\vX} % \begin{macro}{\vy} % \begin{macro}{\vY} % 向量 % \begin{macrocode} \newcommand\vx{\bf{x}} \newcommand\vX{\bf{X}} \newcommand\vy{\bf{y}} \newcommand\vY{\bf{Y}} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\sgn} % \begin{macro}{\arccot} % \begin{macro}{\arccosh} % 定义新数学符号 % \begin{macrocode} \DeclareMathOperator{\sgn}{sgn} \DeclareMathOperator{\arccot}{arccot} \DeclareMathOperator{\arccosh}{arccosh} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % % \begin{macro}{\arcsinh} % \begin{macro}{\arctanh} % \begin{macro}{\arccoth} % \begin{macro}{\grad} % \begin{macro}{\argmax} % \begin{macro}{\argmin} % \begin{macro}{\diag} % \begin{macro}{\csign} % 继续定义数学符号 % \begin{macrocode} \DeclareMathOperator{\arcsinh}{arcsinh} \DeclareMathOperator{\arctanh}{arctanh} \DeclareMathOperator{\arccoth}{arccoth} \DeclareMathOperator{\grad}{\bf{grad}} \DeclareMathOperator{\argmax}{argmax} \DeclareMathOperator{\argmin}{argmin} \DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\csign}{csign} % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % % \subsection{书脊} % \label{sec:spine} % \begin{macro}{\spine} % 单独使用书脊命令会在新的一页产生竖排书脊。 % \begin{macrocode} \newcommand{\spine}{% \begingroup \hitsz@spine \endgroup } \def\hitsz@spine{% \newpage\thispagestyle{empty}% \fangsong\addCJKfontfeatures*{RawFeature={vertical:}} \xiaosan\ziju{0.4}% \noindent\hfill\rotatebox[origin=lt]{-90}{% \makebox[\textheight]{\hitsztitle \hfill \hitszauthor} } } % \end{macrocode} % \end{macro} % % \subsection{其它} % \label{sec:other} % % 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改。 % \begin{macrocode} \AtEndOfClass{\sloppy} % % \end{macrocode} % % \iffalse % \begin{macrocode} %<*dtx-style> \ProvidesPackage{dtx-style} \RequirePackage{hypdoc} \RequirePackage{ifthen} \RequirePackage[UTF8,scheme=chinese]{ctex} \RequirePackage{newtxtext} \RequirePackage{newtxmath} \RequirePackage[ top=2.5cm, bottom=2.5cm, left=5cm, right=1.5cm, headsep=8mm]{geometry} \RequirePackage{array,longtable,booktabs} \RequirePackage{listings} \RequirePackage{fancyhdr} \RequirePackage{xcolor} \RequirePackage{enumitem} \RequirePackage{etoolbox} \RequirePackage{metalogo} \ifthenelse{\equal{\@nameuse{g__ctex_fontset_tl}}{mac}}{% \xeCJKsetwidth{‘’“”}{1em} }{} \colorlet{hitsz@macro}{blue!60!black} \colorlet{hitsz@env}{blue!70!black} \colorlet{hitsz@option}{purple} \patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{} \patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{hitsz@macro}}{}{} \patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{} \patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{hitsz@env}}{}{} \def\DescribeOption{% \leavevmode\@bsphack\begingroup\MakePrivateLetters% \Describe@Option} \def\Describe@Option#1{\endgroup \marginpar{\raggedleft\PrintDescribeOption{#1}}% \hitsz@special@index{option}{#1}\@esphack\ignorespaces} \def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{hitsz@option} #1\ } \def\hitsz@special@index#1#2{\@bsphack \begingroup \HD@target \let\HDorg@encapchar\encapchar \edef\encapchar usage{% \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}% }% \index{#2\actualchar{\string\ttfamily\space#2} (#1)\encapchar usage}% \index{#1:\levelchar#2\actualchar {\string\ttfamily\space#2}\encapchar usage}% \endgroup \@esphack} \lstdefinestyle{lstStyleBase}{% basicstyle=\small\ttfamily, aboveskip=\medskipamount, belowskip=\medskipamount, lineskip=0pt, boxpos=c, showlines=false, extendedchars=true, upquote=true, tabsize=2, showtabs=false, showspaces=false, showstringspaces=false, numbers=none, linewidth=\linewidth, xleftmargin=4pt, xrightmargin=0pt, resetmargins=false, breaklines=true, breakatwhitespace=false, breakindent=0pt, breakautoindent=true, columns=flexible, keepspaces=true, gobble=2, framesep=3pt, rulesep=1pt, framerule=1pt, backgroundcolor=\color{gray!5}, stringstyle=\color{green!40!black!100}, keywordstyle=\bfseries\color{blue!50!black}, commentstyle=\slshape\color{black!60}} \lstdefinestyle{lstStyleShell}{% style=lstStyleBase, frame=l, rulecolor=\color{purple}, language=bash} \definecolor{hitcolor}{RGB}{21,95,130} \lstdefinestyle{lstStyleLaTeX}{% style=lstStyleBase, frame=l, rulecolor=\color{hitcolor}, language=[LaTeX]TeX} \lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{} \lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{} \setlist{nosep} \DeclareDocumentCommand{\option}{m}{\textsf{#1}} \DeclareDocumentCommand{\env}{m}{\texttt{#1}} \DeclareDocumentCommand{\pkg}{s m}{% \texttt{#2}\IfBooleanF#1{\hitsz@special@index{package}{#2}}} \DeclareDocumentCommand{\file}{s m}{% \texttt{#2}\IfBooleanF#1{\hitsz@special@index{file}{#2}}} \newcommand{\myentry}[1]{% \marginpar{\raggedleft\color{purple}\bfseries\strut #1}} \newcommand{\note}[2][Note]{{% \color{magenta}{\bfseries #1}\emph{#2}}} \def\hitszthesis{\textsc{Hitsz}\-\textsc{Thesis}} % % \end{macrocode} % \fi % % \Finale % \endinput % \iffalse % Local Variables: % mode: doctex % TeX-master: t % End: % \fi