texlive[72869] Master/texmf-dist: hduthesis (16nov24)
commits+karl at tug.org
commits+karl at tug.org
Sat Nov 16 22:29:30 CET 2024
Revision: 72869
https://tug.org/svn/texlive?view=revision&revision=72869
Author: karl
Date: 2024-11-16 22:29:30 +0100 (Sat, 16 Nov 2024)
Log Message:
-----------
hduthesis (16nov24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha3.tex
trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/thanks.tex
trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.pdf
trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.tex
trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.pdf
trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.tex
trunk/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.pdf
trunk/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex
trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-bc.layout-module.code.tex
trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-font-module.code.tex
trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-pg.layout-module.code.tex
trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-unv.layout-module.code.tex
trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis.cls
Removed Paths:
-------------
trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-preamble-module.code.tex
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha3.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/cha3.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -30,7 +30,7 @@
\draw [->, thick] (e.east) -- (f.west);
\draw [<-, thick] (g.west) --++ (-1.5,0);
\draw [->, thick] (g.east) -- (h.west);
- \draw [->, thick] (h.east) -- (i.west) node [midway, above = -1.5em] {串口};
+ \draw [->, thick] (h.east) -- node [above = -1.5em] {串口} (i.west);
\end{tikzpicture}
\caption{系统总体结构框图}
\label{3-1}
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/thanks.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/thanks.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/cha/thanks.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -1,4 +1,5 @@
\chapter*{致谢}
+\addcontentsline{toc}{chapter}{致谢}
在这几个月的时间里,从对课题的理解,方案的设计,到电路的制作,再到论文的写作,中间有着自己的努力,更有着老师和同学的关心和巨大的帮助。
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-bc.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -1,5 +1,6 @@
-\documentclass{hduthesis}
+\documentclass[I-agree]{hduthesis}
+\setmathfont{STIX Two Math}
\setCJKmainfont{Songti SC}[AutoFakeSlant]
\setCJKsansfont{STHeiti}[AutoFakeBold = 2]
\tikzset{ > = stealth }
@@ -6,16 +7,16 @@
\usetikzlibrary{positioning,shapes.geometric}
\DocInfo
-{
- title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文,
- school = 理学院,
- major = 物理学,
- class = 英才班,
- stdntid = C668668E,
- author = 申智能,
- supervisor = 李智能,
- reference = reference
-}
+ {
+ title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文,
+ department = 理学院,
+ major = 物理学,
+ class = 英才班,
+ stdntid = C668668E,
+ author = 申智能,
+ supervisor = 李智能,
+ bibsource = reference
+ }
\begin{document}
@@ -40,5 +41,6 @@
\appendix
\chapter*{附录}
+\addcontentsline{toc}{chapter}{附录}
\end{document}
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/doc/xelatex/hduthesis/examples/hduthesis-pg.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -1,5 +1,6 @@
-\documentclass{hduthesis}
+\documentclass[I-agree]{hduthesis}
+\setmathfont{STIX Two Math}
\setCJKmainfont{Songti SC}[AutoFakeSlant]
\setCJKsansfont{STHeiti}[AutoFakeBold = 2]
\tikzset{ > = stealth }
@@ -6,19 +7,62 @@
\usetikzlibrary{positioning,shapes.geometric}
\DocInfo
-{
- title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/
- \hologo{LaTeX} Template for Thesis at Hangzhou Dianzi University,
- school = 理学院,
- major = 物理学,
- stdntid = C668668E00,
- author = 申智能/SAN Chi Nan,
- supervisor = 李智能/LEE Chi Nan,
- reference = reference
-}
+ {
+ title = 基于 \hologo{LaTeX3} 开发的
+ 杭州电子科技大学硕士学位论文 \hologo{LaTeX} 模板/
+ \hologo{LaTeX} Template for Master's Thesis at Hangzhou Dianzi University that was Developed Based on \hologo{LaTeX3},
+ major = 凝聚态物理,
+ stdntid = C668668E0,
+ author = 申智能/SAN Chi Nan,
+ supervisor = 李智能/LEE Chi Nan,
+ bibsource = reference
+ }
\begin{document}
\maketitle
+\begin{abstract}[cn]
+
+ 设计模式被广泛用于解决软件设计和开发过程中反复出现的设计问题。设计模式在软件源码中的使用信息(即设计模式实例)能够在较大程度上反映软件系统的设计思路。准确地从软件源码中识别和挖掘设计模式实例能够帮助软件开发和维护人员快速理解软件系统的原始设计和实现,从而对软件系统的维护、升级
+ 更新和二次开发等工作提供方便。
+
+ 近些年来软件工程领域提出了多种自动化或半自动化地挖掘设计模式实例的方法。其中部分方法将设计模式和软件源码转化为某种特定的图的形式,然后通过挖掘同构子图的方式挖掘设计模式实例。然而,由于同构子图挖掘问题是一个NP完全问题,这些方法的执行效率通常较低。
+
+ 为了有效解决基于子图同构的设计模式挖掘方法的效率低下问题,本文提出了一种高效的基于快速搜索序列和行为模板的结构型设计模式挖掘方法。该方法首先将设计模式和软件源码转化为一种带权有向图,即类关系图,然后从软件源码的类关系图中找出所有与设计模式的类关系图相同构的子图,每个子图的顶点所表示的类组成了一个候选设计模式实例。在挖掘过程中,本文方法为每种设计模式构建了一个快速搜索序列,该快速搜索序列描述了设计模式的结构信息并指定了一个高效的搜索设计模式角色的次序,从而大大减少了挖掘过程的搜索空间。此外,本文为每种设计模式制定了一个特定的行为模板,用于过滤候选实例集合中不满足行为特征的错误实例,进一步提高了本文方法的准确率。最后,本文选取4个常用的开源软件系统进行验证实验。实验结果表明,针对本文制定的结果基准,该方法不仅能够达到100\%的召回率和相对较高的准确率和F-measure值,而且显著提高了执行效率。
+
+ \keywords{设计模式, 设计模式挖掘, 快速搜索序列, 行为模板, 子图同构}
+\end{abstract}
+
+\begin{abstract}[en]
+ \setstretch{1.3}
+ Design patterns are widely used to address the recurring design problems during the process of software design and development. The information about design patterns used in software source code-design pattern instances reveal much about the high-level abstract design ideas. Accurately identifying and detecting design pattern instances in a software system can help developers and maintainers to understand its original design and implementation, facilitating maintenance, update and re-development.
+
+ In recent years, many approaches have been proposed to automatically or semi-automatically detecting design pattern instances from software source code. Among these approaches, some approaches transform software source code and design patterns into certain graphs, and then exploit subgraph isomorphism techniques to detect design pattern instances. However, as mining isomorphic subgraphs is an NP-complete problem, those approaches usually fail to achieve satisfactory efficiency.
+
+ In order to effectively solve the inefficiency of the approaches which are based on subgraph isomorphism, we propose an efficient approach to detect structural design pattern instances based on quick-search sequences and behavior templates. In the proposed approach, we transform software source code and design patterns into a certain form of weighted and directed graph namely Class Relationship Graph, and then detect all the subgraphs from the source code graph which are isomorphic to the Class Relationship Graph of a certain design pattern. The classes that each isomorphic subgraph's vertices represent then consist of a candidate instance. During the process of detecting design pattern instances, we construct a quick-search sequence for each design pattern, which describes the structural characteristics of design pattern and specify an order to efficiently search the roles of each design pattern. According to the quick-search sequence, we can greatly reduce the search space. Afterwards, we construct a specific behavior template, which is used to filter the false positives in the candidate instance set and further improve the processing efficiency. Finally, we exploit our approach on four well-known open-source software systems. The results demonstrate that our approach not only achieves nearly 100\% recall and relatively high precision and F-measure on the benchmark we construct, but also significantly.
+
+ \keywords
+ {
+ Design Pattern, Design Pattern Detection, Quick-Search Sequence,
+ Behavior Template, Sub-graph Isomorphism
+ }
+\end{abstract}
+
+\frontmatter \tableofcontents \mainmatter
+
+\chapter{绪论}
+
+\section{研究背景与意义}
+
+随着信息技术的飞速发展和广泛应用,各行各业都积累了大量的软件系统。
+
+\section{国内外研究现状}
+
+设计模式挖掘的相关研究工作伴随着设计模式在软件工程领域的提出而应运而生,并得到了广泛的关注和研究。正如 Apostolos Ampatzoglou 的描述,关于挖掘软件源码中设计模式实例的研究是设计模式相关的所有研究工作中最受关注的一项研究课题。
+
+\subsection{结构分析}
+
+结构分析方法是最常见的挖掘设计模式实例的方法。
+
\end{document}
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex
===================================================================
--- trunk/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/doc/xelatex/hduthesis/hduthesis.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -3,7 +3,7 @@
\hypersetup{urlcolor = teal, filecolor = violet}
\hologoFontSetup{general = \sffamily}
\usepackage[mono = false]{libertine}
-\usepackage{geometry,framed,xeCJKfntef,pdfpages,subcaption,enumitem}
+\usepackage{geometry,framed,xeCJKfntef,tikz,pdfpages,subcaption,fadingimage}
\setlength{\oddsidemargin}{63pt}\setlength{\evensidemargin}{63pt}
\FrameSep = 0pt
\usepackage[os = mac]{menukeys}
@@ -15,8 +15,29 @@
\setCJKsansfont[BoldFont = Hei, AutoFakeSlant]{Heiti SC}
\setCJKmonofont[AutoFakeSlant]{LXGW WenKai Mono}
\renewcommand{\emph}[1]{\CJKsout*[thickness=2.5ex, format=\color{blue!15}]{#1}}
+\makeatletter
+\def\HoLogo at hduthesis#1{%
+ \kern -1.3ex\raisebox{-.5pt}
+ {
+ \HOLOGO at mbox
+ {
+ \tikz[baseline = (hduthesis.base)]
+ {
+ \node [ inner sep = 0pt ] (hduthesis)
+ {\textsc{\cls{hduThesi\scalebox{1.2}[1.2]{S}}}};
+ \draw
+ let \p1 = (hduthesis.west), \p2 = (hduthesis.east)
+ in (\x1,\y1) (\x2,\y2)
+ [line width = {.028pt*(\x2 - \x1)}]
+ ([yshift = -.5ex]hduthesis.north west) to[bend right = 5]
+ ([yshift = .25ex]hduthesis.north east);
+ }
+ }
+ }\kern -1.3ex
+ }
+\makeatother
-\title{\bfseries The \textsc{\cls{HduThesis}} Class\\\hologo{LaTeX} Thesis Template for Hangzhou Dianzi University}
+\title{\bfseries The \hologo{hduthesis} Class\\\hologo{LaTeX} Thesis Template for Hangzhou Dianzi University}
\author
{
Mingyu Xia \texttt{<\href{mailto:xiamyphys at gmail.com}{xiamyphys at hdu.edu.cn}>}
@@ -23,7 +44,7 @@
\footnote
{ School of Sciences, Physics Department, Graduate in 06/2025 (expected) }
}
-\date{v0.2.1\footnote{\url{https://github.com/xiamyphys/hduthesis}} ~(\today)}
+\date{v0.3.1\footnote{\url{https://github.com/xiamyphys/hduthesis}} ~(\today)}
\begin{document}
@@ -40,7 +61,7 @@
}
\end{center}
\begin{abstract}
- \textsc{\pkg{HDUThesis}} 是杭州电子科技大学毕业论文 \hologo{LaTeX}模板,支持学士和硕士学位论文排版.
+ \hologo{hduthesis} 是杭州电子科技大学毕业论文 \hologo{LaTeX}模板,支持学士和硕士学位论文排版.
\vspace*{1em}
\begin{center}
\small\bfseries User Agreement
@@ -47,8 +68,8 @@
\end{center}
\begin{enumerate}
\item 本模板通过 LPPL 1.3c 协议开放源代码,您可以随意使用编译出的 PDF 文件.
- \item 本模板根据杭州电子科技大学教务处颁发的 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 编写而成. 作者不对使用本模板产生的格式审查问题负责. \emph{如果您所在的学院因论文查重、收录等原因要求提交 \file{.docx} 格式,不接收 \file{.pdf} 论文稿件,请勿执意使用本模板,避免因格式转换带来不必要的麻烦.}
- \item 欢迎前往 GitHub 提交反馈意见,为推动学校认证与规范化 \textsc{\cls{HduThesis}} 贡献力量.
+ \item 本模板根据杭州电子科技大学教务处颁发的 \href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范} 编写而成. 作者不对使用本模板产生的格式审查问题负责. \emph{如果您所在的学院因论文查重、收录等原因要求提交 \file{.docx} 格式,不接收 \file{.pdf} 论文稿件,请勿执意使用本模板,避免因格式转换带来不必要的麻烦.} 使用本模板时,请按编译错误提示操作来勾选同意用户协议.
+ \item 欢迎前往 GitHub 提交反馈意见,为推动学校认证与规范化 \hologo{hduthesis} 贡献力量.
\end{enumerate}
\end{abstract}
\thispagestyle{empty}
@@ -55,6 +76,10 @@
\end{titlepage}
\restoregeometry
+\section{Introduction: Why ``\hologo{hduthesis}''?}
+
+本模板被命名为\hologo{hduthesis},奇怪的大小写方式诠释了HDU校门——亚洲第二大门!
+
\section{Generate the Cover}
\begin{function}{\DocInfo}
@@ -62,7 +87,7 @@
\cs{DocInfo}\marg{keyvals}
\end{syntax}
- 此命令接收键值,用于设置文档信息. 键 \keys{\cmdmac~title} 用于设置论文标题,键 \keys{\cmdmac~school} 用于设置学院,键 \keys{\cmdmac~major} 用于设置专业,键 \keys{\cmdmac~class} 用于设置班级,键 \keys{\cmdmac~stdntid} 用于设置学号,键 \keys{\cmdmac~author} 用于设置作者,键 \keys{\cmdmac~supervisor} 用于设置导师,键 \keys{\cmdmac~reference} 用于设置插入参考文献文件源. 命令会根据输入的学号自动判断使用者为本科生/研究生 \footnote{杭州电子科技大学本科生学号为8位,研究生学号为10位.}.
+ 此命令接收键值,用于设置文档信息. 键 \keys{\cmdmac~title} 用于设置论文标题,键 \keys{\cmdmac~department} 用于设置学院,键 \keys{\cmdmac~major} 用于设置专业,键 \keys{\cmdmac~class} 用于设置班级,键 \keys{\cmdmac~stdntid} 用于设置学号,键 \keys{\cmdmac~author} 用于设置作者,键 \keys{\cmdmac~supervisor} 用于设置导师,键 \keys{\cmdmac~bibsource} 用于设置插入参考文献文件源. 命令会根据输入的学号自动判断使用者为本科生/研究生 \footnote{杭州电子科技大学本科生学号为8位,研究生学号为9位.}.
命令 \cs{DocInfo} 需在导言区中执行. 完成文档信息输入后,在 \verb|\begin{document}| 后执行命令 \cs{maketitle} 会调用所设置的键值自动生成 \emph{论文封面} 和 \emph{诚信承诺书}.
\end{function}
@@ -73,17 +98,16 @@
\begin{verbatim}
\documentclass { hduthesis }
\DocInfo
- {
- title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文,
- school = 理学院, major = 物理学,
- stdntid = 21668668, author = 申智能,
- supervisor = 李智能, reference = reference
- }
+ {
+ title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/毕业论文,
+ department = 理学院, major = 物理学, stdntid = 21668668,
+ author = 申智能, supervisor = 李智能, bibsource = reference
+ }
\begin{document} \maketitle ... \end{document}
\end{verbatim}
\end{framed}
-下页包含所生成的本科毕业论文的封面、扉页和承诺书缩略图. 此文档样例可在终端执行 \cmd{texdoc hduthesis-bc} 获取.
+下页的缩略图为本科毕业论文文档样例 \cmd{hduthesis-bc} 中的封面、扉页和承诺书.
\includepdfmerge
[ angle = -90, nup = 1x2, frame, linktodoc, scale = 0.96, delta = 0 .25in ]
@@ -95,14 +119,14 @@
\begin{verbatim}
\documentclass { hduthesis }
\DocInfo
- {
- title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/
- \hologo{LaTeX} Template for Thesis at
- Hangzhou Dianzi University,
- school = 理学院, major = 物理学,
- stdntid = 2166866800, author = 申智能/SAN Chi Nan,
- supervisor = 李智能/LEE Chi Nan, reference = reference
- }
+ {
+ title = 杭州电子科技大学学位论文 \hologo{LaTeX} 模板/
+ \hologo{LaTeX} Template for Thesis at
+ Hangzhou Dianzi University,
+ major = 物理学, stdntid = 216686680,
+ author = 申智能/SAN Chi Nan, supervisor = 李智能/LEE Chi Nan,
+ bibsource = reference
+ }
\begin{document} \maketitle ... \end{document}
\end{verbatim}
\end{framed}
@@ -121,7 +145,7 @@
\includepdfmerge
[ nup = 2x2, frame, linktodoc, scale = 0.96, delta = .25in .25in ]
- { /Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-pg.pdf, 1-4 }
+ { /Users/xiamyphys/Desktop/LaTeXer/hduthesis/examples/hduthesis-pg.pdf, 1-8 }
\section{Enter Abstract in EN / CN}
@@ -154,7 +178,7 @@
\section{Input Text}
-\textsc{\cls{HduThesis}} 的 {chapter}、\cs{section}、\cs{subsection}、\cs{enumerate} 等段落级次均已按``\href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范}''定制,可直接使用.
+\hologo{hduthesis} 的 {chapter}、\cs{section}、\cs{subsection}、\cs{enumerate} 等段落级次均已按``\href{https://jwc.hdu.edu.cn/2022/0428/c4528a153813/page.htm}{杭电理工类毕业论文写作规范}''定制,可直接使用.
如需插入参考文献,通过命令 \cs{DocInfo} 指定 \file{.bib} 文件后在要插入参考文献等地方输入 \cs{printbiblography} 即可输出参考文献列表. 参考文献格式已设置为 \cmd{gb7714-2015}. 若未指定参考文献 \file{.bib} 文件,为加速编译,\pkg{gbt7714} 宏包将不会加载. 同时,模板额外预置了以下宏包
@@ -207,22 +231,14 @@
\begin{center}
\fbox
{ \parbox[c][1.5em]{16em}{\centering\file{hduthesis-bc.layout-module}} }
- \qquad\fbox
+ \quad\fbox
{
\parbox[c][1.5em]{16em}{\centering\file{hduthesis-pg.layout-module}}
}\\[2ex]
- \fbox
- { \parbox[c][1.5em]{5em}{\centering\file{hdulogo}} }
\quad\fbox
- { \parbox[c][1.5em]{5em}{\centering\file{hdubrand}} }
- \quad\fbox
+ { \parbox[c][1.5em]{14em}{\centering\file{hduthesis-font-module}} }
+ \qquad\fbox
{ \parbox[c][1.5em]{16em}{\centering\file{hduthesis-unv.layout-module}} }
- \quad\fbox
- { \parbox[c][1.5em]{5em}{\centering\file{hdumotto}} }\\[2ex]
- \fbox
- { \parbox[c][1.5em]{16em}{\centering\file{hduthesis-font-module}} }
- \qquad\fbox
- { \parbox[c][1.5em]{16em}{\centering\file{hduthesis-preamble-module}} }
\end{center}
\hrule
Modified: trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-bc.layout-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-bc.layout-module.code.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-bc.layout-module.code.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -51,7 +51,7 @@
{ \l__docinfo_cntitle_tl }\\[5.4ex]
学\qquad 院 &
\l_center_box:nn { .95\linewidth }
- { \l__docinfo_school_tl }\\[5.4ex]
+ { \l__docinfo_department_tl }\\[5.4ex]
专\qquad 业 &
\l_center_box:nn { .95\linewidth }
{ \l__docinfo_major_tl }\\[5.4ex]
@@ -109,32 +109,68 @@
\restoregeometry
}
-\def\@makechapterhead#1
+\RenewDocumentEnvironment {abstract} { O{en} }
{
- \vspace*{-15\p@}%
- {\parindent \z@ \centering \sffamily
- \large \thechapter \quad #1
- \par\nobreak
- \vskip 24\p@ \par\nobreak
- }
- \thispagestyle{fancy}
+ \str_if_eq:nnT {#1} {en}
+ {
+ \tl_set:Nn \l__keywords_name_tl {Keywords:~}
+ \tl_set:Nn \l__keywords_sep_tl {;~}
+ }
+ \str_if_eq:nnT {#1} {cn}
+ {
+ \tl_set:Nn \l__keywords_name_tl {\textsf{关键词:}}
+ \tl_set:Nn \l__keywords_sep_tl {;}
+ }
+ \@beginparpenalty\@lowpenalty
+ \str_if_eq:nnT {#1} {en} {\chapter*{\normalfont\bfseries ABSTRACT}}
+ \str_if_eq:nnT {#1} {cn} {\chapter*{摘\qquad 要}}
}
-\def\@makeschapterhead#1
{
- \vspace*{-15\p@}%
- {\parindent \z@ \raggedright
- \centering \sffamily
- \interlinepenalty\@M
- \large \bfseries #1\par\nobreak
- \vskip 24\p@
- }
- \tl_set:Nn \l__toc_schapter_tl {#1}
- \addcontentsline{toc}{chapter}{\l__toc_schapter_tl}
- \thispagestyle{fancy}
+ \par\null
+ \tl_clear:N \l__abstract_name_tl
+ \cfoot{}
+ \clearpage
}
+\clist_new:N \l__abstract_keywords_clist
+\NewDocumentCommand \keywords { m }
+ {
+ \par \vspace*{\baselineskip}
+ \noindent\textbf{\l__keywords_name_tl}
+ \clist_set:Nn \l__abstract_keywords_clist {#1}
+ \clist_use:Nn \l__abstract_keywords_clist {\l__keywords_sep_tl}
+ }
+
+\hook_gput_code:nnn { cmd/tableofcontents/after } { . }
+ { \thispagestyle{fancy} }
+\RequirePackage{tocloft}
+\renewcommand{\contentsname}{\hfill 目 \qquad 录 \hfill}
+\renewcommand \cfttoctitlefont{\sffamily\large}
+\dim_set:Nn \cftbeforetoctitleskip {3pt}
+\dim_set:Nn \cftaftertoctitleskip {24pt}
+\dim_set:Nn \cftbeforechapskip {1pt}
+\dim_set:Nn \cftbeforesecskip {-.2pt}
+\renewcommand*\l at chapter{\@dottedtocline{1}{0em}{1.6em}}
+\renewcommand*\l at section{\@dottedtocline{1}{2.3em}{2.1em}}
+\renewcommand*{\@dotsep}{1.7}
+\renewcommand*{\@pnumwidth}{2.5ex}
+\renewcommand{\cftchapfont}{\normalfont}
+\setcounter{tocdepth}{1}
+
+\ctexset
+ {
+ chapter =
+ {
+ name = {},
+ number = \arabic{chapter},
+ format = { \sffamily\centering\large },
+ beforeskip = { -18\p@ },
+ afterskip = { 24\p@ },
+ pagestyle = { fancy }
+ },
+ }
\renewcommand\section
{
- \vspace*{-2.5ex}
+ \vspace*{-2.4ex}
\@startsection {section}{1}{\z@}%
{0ex}{.1pt}{\sffamily\semilarge}
}
@@ -141,7 +177,7 @@
\renewcommand\subsection
{
\vspace*{-1.8ex}
- \@startsection {subsection}{1}{\z@}%
+ \@startsection {subsection}{2}{\z@}%
{0ex}{.1pt}{\sffamily}
}
Modified: trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-font-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-font-module.code.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-font-module.code.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -1,7 +1,5 @@
\hduthesis_provide_module:n {font}
-\PassOptionsToPackage{quiet,no-math}{xeCJK}
-\RequirePackage[zihao = -4]{ctex}
\linespread{1.39}
\dim_set:Nn \parindent {2\ccwd}
\newcommand\semilarge{\@setfontsize\semilarge{14}{16.5}}
@@ -21,6 +19,9 @@
\RequirePackage { amsmath, amssymb, mathtools, extarrows,
bm, cancel, physics2, fixdif, derivative }
\usephysicsmodule{ab, braket, ab.legacy, op.legacy}
+\RequirePackage
+ [ warnings-off = { mathtools-colon, mathtools-overbracket } ]
+ {unicode-math}
\AtBeginDocument{
\dim_set:Nn \abovedisplayskip {3pt}
\dim_set:Nn \belowdisplayskip {3pt}
Modified: trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-pg.layout-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-pg.layout-module.code.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-pg.layout-module.code.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -1,4 +1,4 @@
-\hduthesis_provide_module:n {bc.layout}
+\hduthesis_provide_module:n {pg.layout}
\makeatletter
\geometry { top = 2.75cm, bottom = 2cm, left = 3.2cm, right = 3.2cm,
@@ -8,8 +8,9 @@
\cs_new_protected_nopar:Nn \__hduthesis_cover_pg_aux:
{
\begin{center}
- \vspace*{4\p@}
- \includegraphics[scale = 1.6]{hdubadge}\par\vspace*{40\p@}
+ \null
+ \includegraphics[scale = 1.6]{hdubadge}
+ \par \vspace*{42\p@}
{ \LARGE\l_spread_box:nn {.575\linewidth} {硕士学位论文} }
\par\vspace*{98\p@}
\semiLarge 题\qquad 目:
@@ -16,7 +17,7 @@
\l_center_box:nn { .75\linewidth } { \kaishu \l__docinfo_cntitle_tl }
\vspace*{21\p@}\par
\begin{tabular}
- { >{\semiLarge\bfseries}p{4\ccwd}@{}
+ { >{\semiLarge\centering\arraybackslash}p{4\ccwd}@{}
>{\semiLarge\centering\arraybackslash\kaishu}p{.65\linewidth} }
\l_spread_box:nn { 4\ccwd } { 研究生 } &
\l_center_box:nn { .96\linewidth }
@@ -26,9 +27,10 @@
\l_spread_box:nn { 4\ccwd } { 指导教师 } &
\l_center_box:nn { .96\linewidth }
{ \l__docinfo_cnsupervisor_tl\qquad 教授 }\\[13.5ex]
- \l_spread_box:nn { 4\ccwd } { 完成日期 } &
+ \semilarge 完成日期 &
\l_center_box:nn { .96\linewidth }
- { \textsf{\int_use:N \c_sys_year_int} 年
+ { \semilarge
+ \textsf{\int_use:N \c_sys_year_int} 年
\textsf{\int_use:N \c_sys_month_int} 月
}
\end{tabular}
@@ -40,11 +42,11 @@
\begin{center}
\vspace*{25\p@}{
\LARGE 杭州电子科技大学硕士学位论文}
- \vspace*{142\p@}\par
+ \vspace*{142\p@} \par
\begin{spacing}{1.15}
\huge\textsf{\l__docinfo_cntitle_tl}
\end{spacing}
- \vspace*{130\p@}\par
+ \vspace*{125\p@} \par
\begin{tabular}{>{\large}p{7\ccwd}@{}>{\large\kaishu}p{.43\linewidth}}
\l_spread_box:nn { 4em } {研究生}:&
\l_spread_box:nn { 5\ccwd } { \l__docinfo_cnauthor_tl }\\[2ex]
@@ -60,16 +62,14 @@
\cs_new_protected_nopar:Nn \__hduthesis_enoverleaf_pg_aux:
{
\begin{center}
- \vspace*{30\p@}{\bfseries
+ \vspace*{25\p@}{\bfseries
Dissertation~Submitted~to~Hangzhou~Dianzi~University\\[.8ex]
for~the~Degree~of~Master}
- \vspace*{134\p@}\par
- \parbox[t][208\p@]{\linewidth}
- {\centering
- \begin{spacing}{1.08}
- \huge\bfseries\l__docinfo_entitle_tl
- \end{spacing}
- }\par
+ \vspace*{124\p@} \par
+ \begin{spacing}{1.09}
+ \huge\bfseries\l__docinfo_entitle_tl
+ \end{spacing}
+ \vspace*{114\p@} \par
\begin{tabular}
{ >{\bfseries\large}p{7.5\ccwd}@{}
>{\bfseries\large}p{.32\linewidth}
@@ -79,7 +79,7 @@
\l_spread_box:nn { 4.65em } {Supervisor}: &
Prof.~\l__docinfo_ensupervisor_tl\\[11ex]
\end{tabular}
- \vspace*{6\p@}\par
+ \vspace*{5\p@}\par
\bfseries\clist_item:Nn
\g_system_month_clist {\int_use:N \c_sys_month_int},~
\int_use:N \c_sys_year_int
@@ -88,29 +88,29 @@
\cs_new_protected_nopar:Nn \__hduthesis_promise_pg_aux:
{
- \vspace*{-6\p@}
+ \vspace*{-12\p@}
\begin{center}
\large
杭州电子科技大学\\[1ex] 学位论文原创性声明和使用授权说明
\end{center}
- \vspace*{19\p@}
+ \vspace*{15\p@}
\begin{center}
\semilarge 原创性声明
\end{center}
- \vspace*{.4\baselineskip}\par
+ \par \vspace*{.5\baselineskip}
\begin{spacing}{1.65}
本人郑重声明:所呈交的学位论文,是本人在导师的指导下,独立进行研究工作所取得的成果。
除文中已经注明引用的内容外,本论文不含任何其他个人或集体已经发表或撰写过的作品或成果。
对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。\par
\noindent 申请学位论文与资料若有不实之处,本人承担一切相关责任。
- \par\vspace*{.9\baselineskip}
+ \par \vspace*{\baselineskip}
\noindent \makebox[.45\linewidth][l]{论文作者签名:}
日期:\qquad 年\qquad 月\qquad 日
- \par\vspace*{.9\baselineskip}
+ \par\vspace*{35\p@}
\begin{center}
\semilarge 学位论文使用授权说明
\end{center}
- \vspace*{.7\baselineskip}\par
+ \par \vspace*{.5\baselineskip}
\begin{spacing}{1.65}
本人完全了解杭州电子科技大学关于保留和使用学位论文的规定,
即:研究生在校攻读学位期间论文工作的知识产权单位属杭州电子科技大学。
@@ -117,10 +117,10 @@
本人保证毕业离校后,发表论文或使用论文工作成果时署名单位仍然为杭州电子科技大学。
学校有权保留送交论文的复印件,允许查阅和借阅论文;学校可以公布论文的全部或部分内容,
可以允许采用影印、缩印或其它复制手段保存论文。(保密论文在解密后遵守此规定)
- \par\vspace*{2\baselineskip}
+ \par \vspace*{\baselineskip}
\noindent \makebox[.45\linewidth][l]{论文作者签名:}
日期:\qquad 年\qquad 月\qquad 日
- \par\vspace*{\baselineskip}
+ \par \vspace*{\baselineskip}
\noindent \makebox[.45\linewidth][l]{指导教师签名:}
日期:\qquad 年\qquad 月\qquad 日
\end{spacing}
@@ -145,5 +145,77 @@
\restoregeometry
}
+\RenewDocumentEnvironment {abstract} { O{en} }
+ {
+ \str_if_eq:nnT {#1} {en}
+ {
+ \tl_set:Nn \l__keywords_name_tl {Keywords:~}
+ \tl_set:Nn \l__keywords_sep_tl {,~}
+ }
+ \str_if_eq:nnT {#1} {cn}
+ {
+ \tl_set:Nn \l__keywords_name_tl {\textsf{关键词:}}
+ \tl_set:Nn \l__keywords_sep_tl {,}
+ }
+ \@beginparpenalty\@lowpenalty
+ \str_if_eq:nnT {#1} {cn} {\chapter*{摘要}}
+ \str_if_eq:nnT {#1} {en} {\chapter*{\normalfont\bfseries Abstract}}
+ }
+ {
+ \par\null
+ \tl_clear:N \l__abstract_name_tl
+ \cfoot{}
+ \clearpage
+ }
+
+\clist_new:N \l__abstract_keywords_clist
+\NewDocumentCommand \keywords { m }
+ {
+ \par \vspace*{\baselineskip}
+ \noindent\textbf{\l__keywords_name_tl}
+ \clist_set:Nn \l__abstract_keywords_clist {#1}
+ \clist_use:Nn \l__abstract_keywords_clist {\l__keywords_sep_tl}
+ }
+
+\hook_gput_code:nnn { cmd/tableofcontents/after } { . }
+ { \thispagestyle{fancy} }
+\RequirePackage{tocloft}
+\renewcommand{\contentsname}{\hfill 目录 \hfill}
+\renewcommand \cfttoctitlefont{\sffamily\large}
+\dim_set:Nn \cftbeforetoctitleskip {12pt}
+\dim_set:Nn \cftaftertoctitleskip {24pt}
+\dim_set:Nn \cftbeforechapskip {1pt}
+\dim_set:Nn \cftbeforesecskip {-.2pt}
+\renewcommand*\l at chapter{\@dottedtocline{1}{0em}{1.6em}}
+\renewcommand*\l at section{\@dottedtocline{1}{2.3em}{2.1em}}
+\renewcommand*{\@dotsep}{1.7}
+\renewcommand*{\@pnumwidth}{2.5ex}
+\renewcommand{\cftchapfont}{\normalfont}
+\setcounter{tocdepth}{1}
+
+\ctexset
+ {
+ chapter =
+ {
+ aftername = { \hspace{.5\ccwd} },
+ format = { \sffamily\centering\semiLarge },
+ beforeskip = { 10\p@ },
+ afterskip = { 20\p@ },
+ pagestyle = { fancy }
+ }
+ }
+\renewcommand\section
+ {
+ \vspace*{1pt}
+ \@startsection {section}{1}{\z@}%
+ {0ex}{.8ex}{\sffamily\large}
+ }
+\renewcommand\subsection
+ {
+ \vspace*{2pt}
+ \@startsection {subsection}{2}{\z@}%
+ {0ex}{1.2ex}{\sffamily\semilarge}
+ }
+
\makeatother
\endinput
Deleted: trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-preamble-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-preamble-module.code.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-preamble-module.code.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -1,69 +0,0 @@
-\hduthesis_provide_module:n {preamble}
-
-\RenewDocumentEnvironment {abstract} { O{en} }
- {
- \str_if_eq:nnT {#1} {en}
- {
- \tl_set:Nn \l__keywords_name_tl {Keywords:~}
- \tl_set:Nn \l__keywords_sep_tl {;~}
- }
- \str_if_eq:nnT {#1} {cn}
- {
- \tl_set:Nn \l__keywords_name_tl {\textsf{关键词:}}
- \tl_set:Nn \l__keywords_sep_tl {;}
- }
- \vspace*{-27\p@}
- \@beginparpenalty\@lowpenalty
- \begin{center}%
- \bfseries\large
- \str_if_eq:nnT {#1} {en} {ABSTRACT}
- \str_if_eq:nnT {#1} {cn} {\textsf{摘\qquad 要}}
- \@endparpenalty\@M
- \end{center}%
- \vspace*{.7\baselineskip}
- }
- {
- \par\null
- \tl_clear:N \l__abstract_name_tl
- \cfoot{}
- \clearpage
- }
-
-\clist_new:N \l__abstract_keywords_clist
-\NewDocumentCommand \keywords { m }
- {
- \vspace*{\baselineskip}
- \noindent\textbf{\l__keywords_name_tl}
- \clist_set:Nn \l__abstract_keywords_clist {#1}
- \clist_use:Nn \l__abstract_keywords_clist {\l__keywords_sep_tl}
- }
-
-\newcommand\frontmatter
-{
- \clearpage
- \pagenumbering{Roman}
- \cfoot{}
-}
-\newcommand\mainmatter
-{
- \clearpage
- \pagenumbering{arabic}
- \cfoot \thepage
-}
-
-\AddToHook{cmd/tableofcontents/after}{\thispagestyle{fancy}}
-\RequirePackage{tocloft}
-\renewcommand{\contentsname}{\hfill 目\qquad 录\hfill}
-\renewcommand \cfttoctitlefont{\sffamily\large}
-\dim_set:Nn \cftbeforetoctitleskip {3pt}
-\dim_set:Nn \cftaftertoctitleskip {24pt}
-\dim_set:Nn \cftbeforechapskip {1pt}
-\dim_set:Nn \cftbeforesecskip {-.2pt}
-\renewcommand*\l at chapter{\@dottedtocline{1}{0em}{1.6em}}
-\renewcommand*\l at section{\@dottedtocline{1}{2.3em}{2.1em}}
-\renewcommand*{\@dotsep}{1.7}
-\renewcommand*{\@pnumwidth}{2.5ex}
-\renewcommand{\cftchapfont}{\normalfont}
-\setcounter{tocdepth}{1}
-
-\endinput
Modified: trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-unv.layout-module.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-unv.layout-module.code.tex 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis-unv.layout-module.code.tex 2024-11-16 21:29:30 UTC (rev 72869)
@@ -1,8 +1,21 @@
\hduthesis_provide_module:n {unv.layout}
-\RequirePackage{geometry, fancyhdr, array, setspace, titlesec}
+\RequirePackage{geometry, fancyhdr, array, setspace}
\pagestyle{fancy}
+\newcommand\frontmatter
+ {
+ \clearpage
+ \pagenumbering{Roman}
+ \cfoot{}
+ }
+\newcommand\mainmatter
+ {
+ \clearpage
+ \pagenumbering{arabic}
+ \cfoot \thepage
+ }
+
\cs_new_protected:Npn \l_spread_box:nn #1#2
{
\mode_leave_vertical:
@@ -13,23 +26,28 @@
{
\mode_leave_vertical:
\dim_set:Nn \l_tmpa_dim {#1}
- \global\setbox1=\box\voidb at x
- {\setbox0=\vbox{
- \dim_set:Nn \hsize {#1}\relax
- \dim_set:Nn \parindent {0pt}
- \skip_set:Nn \leftskip {0pt plus 1fil}
- \skip_set:Nn \rightskip {0pt plus -1fil}
- \skip_set:Nn \parfillskip {0pt plus 2fil}
- #2\par
- \loop
- \setbox2=\lastbox
- \unless\ifvoid2
- \global\setbox1=\vtop{\hbox to\hsize{\strut\unhbox2}
- \vskip-3.6pt \hrule height .8pt
- \vskip9.6pt \unvbox1}
- \unskip\unpenalty
- \repeat
- }}
+ \global\setbox1 = \box\voidb at x
+ \group_begin:
+ \setbox0 = \vbox
+ {
+ \dim_set:Nn \hsize {#1}\relax
+ \dim_set:Nn \parindent {0pt}
+ \skip_set:Nn \leftskip {0pt plus 1fil}
+ \skip_set:Nn \rightskip {0pt plus -1fil}
+ \skip_set:Nn \parfillskip {0pt plus 2fil}
+ #2 \par
+ \loop
+ \setbox2 = \lastbox
+ \unless\ifvoid2
+ \global\setbox1 = \vtop
+ { \hbox to\hsize{\strut\unhbox2}
+ \vskip-3.8pt \hrule height .8pt
+ \vskip9.6pt \unvbox1
+ }
+ \unskip\unpenalty
+ \repeat
+ }
+ \group_end:
\box1
}
@@ -42,11 +60,11 @@
\RequirePackage{enumitem, cleveref}
\setlist[enumerate,1]
-{
- label = (\arabic*), itemindent = 4.5em, leftmargin = 0em,
- labelsep = 0em, topsep = .15ex, itemsep = 0em, partopsep = 0em,
- parsep = 0em, listparindent = 2\ccwd
-}
+ {
+ label = (\arabic*), itemindent = 4.5em, leftmargin = 0em,
+ labelsep = 0em, topsep = -1pt, itemsep = 0pt, partopsep = 0pt,
+ parsep = 0em, listparindent = 2\ccwd
+ }
\AddToHook{env/enumerate/after}{\vspace*{.1ex}}
\crefformat{figure}{图#2#1#3}
\crefformat{table}{表#2#1#3}
Modified: trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis.cls 2024-11-16 21:29:13 UTC (rev 72868)
+++ trunk/Master/texmf-dist/tex/xelatex/hduthesis/hduthesis.cls 2024-11-16 21:29:30 UTC (rev 72869)
@@ -14,16 +14,16 @@
%% *
%% This work consists of the files hduthesis.cls, *
%% hduthesis-font-module.code, *
+%% hduthesis-unv.layout-module.code, *
%% hduthesis-bc.layout-module.code, *
%% hduthesis-pg.layout-module.code, *
-%% hduthesis-preamble-module.code, *
-%% hduthesis-unv.layout-module.code, *
%% and README.md. *
%% available at https://github.com/xiamyphys/hduthesis *
%% ***********************************************************************
-\def\hduthesis at date{2024/10/10}
-\def\hduthesis at version{0.2.1}
+\def\hduthesis at date{2024/11/16}
+\def\hduthesis at version{0.3.1}
+\RequirePackage{etoolbox}
\ProvidesExplClass{hduthesis} {\hduthesis at date} {\hduthesis at version}
{HDU Thesis Class}
@@ -31,10 +31,23 @@
{ \msg_new:nnn { hduthesis } {#1} {#2} }
\cs_new_protected:Npn \hduthesis_msg_error:nn #1#2
{ \msg_error:nnn { hduthesis } {#1} {#2} }
+
+\hduthesis_msg_new:nn { 用户协议 }
+ { \exp_not:n
+ {
+ ⚠️⚠️⚠️⚠️⚠️⚠️~「HduThesis」编译受阻~⚠️⚠️⚠️⚠️⚠️⚠️~
+ 使用模板前请认真阅读模板说明文档封面上的「用户协议」~
+ 😡👊模板作者不对使用本模板产生的格式审查问题负责👊😡~
+ 导言区添加全局选项 `I-agree':
+ `\documentclass[I-agree]{hduthesis}`~
+ 即可顺利编译✌️并代表您已同意本协议🥰~
+ 可反馈Issues至📮xiamyphys at gmail.com.~ 祝君科研顺利!
+ }
+ }
+
\cs_generate_variant:Nn \hduthesis_msg_error:nn { nx }
\hduthesis_msg_new:nn { not found module }
{ The~hduthesis~module~`#1'~not~found. }
-
\cs_new_protected_nopar:Npn \hduthesis_load_module:n #1
{
\clist_map_inline:nn {#1}
@@ -50,10 +63,41 @@
{HDUThesis~ \text_titlecase:n {#1} ~Module}
}
-\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
-\ProcessOptions\relax
-\LoadClass[a4paper]{report}
+% global options
+\clist_new:N \g__hdu_base_class_options_clist
+\keys_define:nn { hduthesis / classoption }
+ {
+ I-agree .bool_set:N = \g__hduthesis_agreement_bool,
+ I-agree .initial:n = false,
+ I-agree .default:n = true,
+ math-font .tl_set:N = \g__hduthesis_math_font,
+ main-font .tl_set:N = \g__hduthesis_main_font,
+ sans-font .tl_set:N = \g__hduthesis_sans_font,
+ mono-font .tl_set:N = \g__hduthesis_mono_font,
+ CJKmain-font .tl_set:N = \g__hduthesis_main_CJK_font,
+ CJKsans-font .tl_set:N = \g__hduthesis_sans_CJK_font,
+ CJKmono-font .tl_set:N = \g__hduthesis_mono_CJK_font,
+ unknown .code:n = \__hduthesis_unknown_option:n { #1 },
+ }
+\cs_new_protected_nopar:Npn \__hduthesis_unknown_option:n #1
+ {
+ \tl_if_empty:nTF { #1 }
+ {
+ \clist_gput_right:NV \g__hdu_base_class_options_clist \l_keys_key_str
+ }
+ {
+ \exp_args:NNx \clist_gput_right:Nn \g__hdu_base_class_options_clist
+ { \l_keys_key_str = \exp_not:n {#1} }
+ }
+ }
+\ProcessKeyOptions[ hduthesis / classoption ]
+\PassOptionsToClass{a4paper,zihao = -4}{ctexrep}
+\PassOptionsToPackage{quiet,no-math}{xeCJK}
+\exp_args:NNV \LoadClass[\g__hdu_base_class_options_clist]{ctexrep}
+\bool_if:NF \g__hduthesis_agreement_bool
+ { \hduthesis_msg_error:nn { 用户协议 } { 未确认 } }
+
\RequirePackage { siunitx, circuitikz, pgfplots, listings, hologo,
lipsum, zhlipsum, booktabs, multicol, hyperref }
\pgfplotsset{compat = newest}
@@ -64,19 +108,18 @@
}
\hduthesis_load_module:n { font }
-\hduthesis_load_module:n { preamble }
\hduthesis_load_module:n { unv.layout }
\keys_define:nn { hduthesis / docinfo }
{
title.clist_set:N = \l__docinfo_title_clist,
- school.tl_set:N = \l__docinfo_school_tl,
+ department.tl_set:N = \l__docinfo_department_tl,
major.tl_set:N = \l__docinfo_major_tl,
class.tl_set:N = \l__docinfo_class_tl,
stdntid.tl_set:N = \l__docinfo_stdntid_tl,
author.clist_set:N = \l__docinfo_author_clist,
supervisor.clist_set:N = \l__docinfo_supervisor_clist,
- reference.tl_set:N = \l__docinfo_reference_tl,
+ bibsource.tl_set:N = \l__docinfo_bibsource_tl,
}
\clist_set:Nn \g_system_month_clist
{
@@ -104,7 +147,9 @@
\l__docinfo_cnsupervisor_tl { \seq_item:Nn \l__supervisor_tmp_seq {1} }
\exp_args:NNe \tl_set:Nn
\l__docinfo_ensupervisor_tl { \seq_item:Nn \l__supervisor_tmp_seq {2} }
- \tl_if_empty:NTF \l__docinfo_reference_tl
+ \bool_if:NF \g__hduthesis_agreement_bool
+ { \tl_clear:N \l__docinfo_bibsource_tl }
+ \tl_if_empty:NTF \l__docinfo_bibsource_tl
{
\newcommand*\printbibliography{\chapter*{参考文献}}
\renewcommand*\cite[1]{\textsuperscript{[##1]}}
@@ -112,18 +157,19 @@
{
\RequirePackage[sort&compress]{gbt7714}
\bibliographystyle{gbt7714-numerical}
+ \dim_set:Nn \bibsep {.35ex}
\newcommand*\printbibliography
+ { \nocite{*}\bibliography{ \l__docinfo_bibsource_tl } }
+ \hook_gput_code:nnn { cmd/printbibliography/before } { . }
{
- \begin{spacing}{1.11}
- \nocite{*}\bibliography{ \l__docinfo_reference_tl }
- \end{spacing}
+ \group_begin:
+ \hook_gput_code:nnn { cmd/@makeschapterhead/before } { . } { \null }
}
- \AddToHook{cmd/printbibliography/before}
+ \hook_gput_code:nnn { cmd/printbibliography/after } { . }
{
- \group_begin:
- \AddToHook{cmd/@makeschapterhead/before} { \linespread{2.1} }
+ \group_end:
+ \addcontentsline{toc}{chapter}{参考文献}
}
- \AddToHook{cmd/printbibliography/after} { \group_end: }
}
\hypersetup
{
@@ -132,15 +178,9 @@
pdfproducer = hduTeX~bundle~by~Mingyu~Xia,
}
\ExplSyntaxOn
- \int_compare:nNnT {\tl_count:N \l__docinfo_stdntid_tl} = {8}
+ \int_compare:nNnTF { \tl_count:N \l__docinfo_stdntid_tl } = { 8 }
{ \hduthesis_load_module:n { bc.layout } }
- \int_compare:nNnT {\tl_count:N \l__docinfo_stdntid_tl} = {10}
{ \hduthesis_load_module:n { pg.layout } }
- \bool_if:nT
- {
- !\int_compare_p:nNn {\tl_count:N \l__docinfo_stdntid_tl} = {8} &&
- !\int_compare_p:nNn {\tl_count:N \l__docinfo_stdntid_tl} = {10}
- } { \hduthesis_load_module:n { bc.layout } }
\ExplSyntaxOff
}
More information about the tex-live-commits
mailing list.