Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- 默认数学符号风格 `math-style` 改为 `TeX`。
- 本科生模板去掉 pdf 文件内封面的书签。

### Fixed

- 修正了调用 `mathtools` 后 `\eqref` 与前文间距的问题([tuna/thuthesis#1043](https://github.com/tuna/thuthesis/discussions/1043))。
- 修正 biblatex 中 authoryear 参考文献样式不同作者仅因同姓被错误地认为是同一作者的错误([ustctug/ustcthesis#499](https://github.com/ustctug/ustcthesis/issues/499)、[hushidong/biblatex-gb7714-2015#236](https://github.com/hushidong/biblatex-gb7714-2015/issues/236))。

## [2.1.0] - 2026-06-01

### 版本亮点
Expand Down
10 changes: 4 additions & 6 deletions docs/chap03.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ \section{公式}

\section{例子、定理与证明}

示例文件中使用 \pkg{amsthm} 宏包配置了定理、引理和证明等环境。
用户也可以使用 \pkg{ntheorem} 宏包。

\begin{theorem}[定理例子]
\label{the:example-theorem}
这是一个定理。
Expand All @@ -67,10 +70,5 @@ \section{例子、定理与证明}


\begin{proof}

下面我们开始证明:

由本定理的证明可见,我可以引用\autoref{the:example-theorem}和引理\ref{the:example-corollary}以及推论\ref{the:example-lemma}来证明我这个 \LaTeX 可以用来写各种证明。 \\

\autoref{the:example-theorem-sysu-thesis}得证。
Trivial.
Comment thread
wu-kan marked this conversation as resolved.
\end{proof}
2 changes: 1 addition & 1 deletion sysuthesis-authoryear.bbx
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
% v1.0s,20190828
\@ifpackagelater{biblatex}{2019/08/16}{%
\ExecuteBibliographyOptions{%
nohashothers=true}}{}
nohashothers=false}}{}


%=====================================================================
Expand Down
8 changes: 4 additions & 4 deletions sysuthesis-guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
\xeCJKsetwidth{‘’“”}{1em}
}{}
\unimathsetup{
math-style=ISO,
bold-style=ISO,
math-style=TeX,
bold-style=TeX,
}
\IfFontExistsTF{xits-math.otf}{
\setmathfont[
Expand Down Expand Up @@ -491,10 +491,10 @@ \subsection{数学}

\DescribeOption{math-style}
用户可以通过设置 \opt{math-style} 选择数学符号样式(可选:
\opt{GB}(中文默认),\opt{TeX}(英文默认)和 \opt{ISO}),比如:
\opt{TeX}(默认),\opt{GB}(默认)和 \opt{ISO}),比如:
\begin{latex}
\sysusetup{
math-style = ISO,
math-style = GB,
}
\end{latex}

Expand Down
94 changes: 78 additions & 16 deletions sysuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@
},
default = false,
},
eqn-paren-style = {
name = eqn@paren@style,
choices = {
full,
half,
}
},
}

% 将 \sysu@cite@style 置空方便后续进行判断。
Expand Down Expand Up @@ -1145,21 +1152,22 @@
\fi
}

\ifsysu@main@language@chinese
\sysusetup{math-style = GB}%
\else
\sysusetup{math-style = TeX}%
\fi
% \ifsysu@main@language@chinese
% \sysusetup{math-style = GB}%
% \else
% \sysusetup{math-style = TeX}%
% \fi
\sysusetup{math-style = TeX}%

\sysu@set@math@style
\sysu@option@hook{math-style}{\sysu@set@math@style}
\sysu@option@hook{main-language}{%
\ifsysu@main@language@chinese
\sysusetup{math-style = GB}%
\else
\sysusetup{math-style = TeX}%
\fi
}
% \sysu@option@hook{main-language}{%
% \ifsysu@main@language@chinese
% \sysusetup{math-style = GB}%
% \else
% \sysusetup{math-style = TeX}%
% \fi
% }

% 针对 \pkg{unicode-math} 逐项配置数学符号。

Expand Down Expand Up @@ -1753,10 +1761,10 @@
\csname clist_use:Nn\endcsname{#1}{#2}%
}
\newcommand\sysu@supervisor@names{%
\sysu@clist@use{\sysu@supervisor}{\quad}
\sysu@clist@use{\sysu@supervisor}{\quad}%
}
\newcommand\sysu@practice@supervisor@names{%
\sysu@clist@use{\sysu@practice@supervisor}{\quad}
\sysu@clist@use{\sysu@practice@supervisor}{\quad}%
}
\newcounter{sysu@count}
\newcommand\sysu@supervisor@en@line{%
Expand Down Expand Up @@ -1957,7 +1965,7 @@
% 本科生的外封
\newcommand\sysu@cover{%
\begin{titlepage}%
\sysu@pdfbookmark{Cover}%
\sysu@pdfbookmark{封面}%
\centering
\vskip 0.5cm%
\includegraphics[width=3cm]{\sysu@logo@path/sysu-logo.pdf}
Expand Down Expand Up @@ -2013,7 +2021,6 @@
% 本科生的扉页(内封)
\newcommand\sysu@title@page@bachelor{%
\begin{titlepage}%
\sysu@pdfbookmark{Title page}%
\centering
\ \vskip 2cm%
{
Expand Down Expand Up @@ -2897,6 +2904,41 @@
\patchcmd{\@getpen}{\@M}{\@Mi}
{}{\sysu@patch@error{\@getpen}}

% \subsection{表达式}

% 重定义 `\eqref`,使`式~\eqref` 这样的写法不产生额外的空格。
% \DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}}
\DeclareRobustCommand{\eqref}[1]{%
\ifsysu@language@chinese
\ifsysu@eqn@paren@style@full
\unskip
\fi
\fi
\textup{\tagform@{\ref{#1}}}%
\ifsysu@language@chinese
\ifsysu@eqn@paren@style@full
\ignorespaces
\fi
\fi
}

% 修改 `amsmath` 的 `\tagform@`
% \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}}
\def\tagform@#1{%
\ifsysu@language@chinese
\ifsysu@eqn@paren@style@full
% 这里的 `\unskip` 是为了 `式~\eqref` 不产生额外的空格。
\unskip
% \kern 0pt 防止中文左括号与前面文字的距离过窄
% 防止中文左括号与前面文字的距离过窄
\maketag@@@{\kern 0pt\relax (\ignorespaces#1\unskip\@@italiccorr)}%
\else
\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}%
\fi
\else
\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}%
\fi
}

% \subsection{参考文献}

Expand Down Expand Up @@ -3501,11 +3543,31 @@
% \pkg{mathtools} 会修改 \pkg{unicode-math} 的 `\underbrace` 和 `\overbrace`,
% 需要还原为 `\LaTeXunderbrace` 和 `\LaTeXoverbrace`,
% 参考 \url{https://tex.stackexchange.com/q/521394/82731}。
%
% \pkg{mathtools} 的 `showonlyrefs` 选项修改了 `\eqref`,
% 需要重新处理括号与前后文字的空白。
% 见 <https://github.com/tuna/thuthesis/issues/1043>。
\AtEndOfPackageFile*{mathtools}{
\@ifpackageloaded{unicode-math}{
\let\underbrace\LaTeXunderbrace
\let\overbrace\LaTeXoverbrace
}{}
\expandafter\def\csname MT_extended_eqref:n\endcsname#1{%
\ifsysu@language@chinese
\ifsysu@eqn@paren@style@full
\unskip
\fi
\fi
\protected@write\@auxout{}
{\string\MT@newlabel{#1}}%
\textup{\let\df@label\@empty\csname MT_prev_tagform:n\endcsname{\ref{#1}}}%
\ifsysu@language@chinese
\ifsysu@eqn@paren@style@full
\ignorespaces
\fi
\fi
}
\expandafter\MakeRobust\csname MT_extended_eqref:n\endcsname
}

% \subsubsection{\pkg{nomencl} 宏包}
Expand Down