mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 04:14:35 +08:00
将 scheme=chinese 时的“第1章”改为“第一章”
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
\documentclass[lang=cn,10pt]{elegantbook}
|
\documentclass[lang=cn,10pt,scheme=chinese]{elegantbook}
|
||||||
|
|
||||||
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
||||||
\subtitle{Elegant\LaTeX{} 经典之作}
|
\subtitle{Elegant\LaTeX{} 经典之作}
|
||||||
|
|
||||||
\author{Ethan Deng \& Liam Huang}
|
\author{Ethan Deng \& Liam Huang}
|
||||||
\institute{Elegant\LaTeX{} Program}
|
\institute{Elegant\LaTeX{} Program}
|
||||||
\date{May 25, 2022}
|
\date{May 28, 2022}
|
||||||
\version{4.4}
|
\version{4.4}
|
||||||
\bioinfo{自定义}{信息}
|
\bioinfo{自定义}{信息}
|
||||||
|
|
||||||
@@ -926,11 +926,12 @@ Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非
|
|||||||
|
|
||||||
根据用户的反馈,我们不断修正和完善模板。由于 3.00 之前版本与现在版本差异非常大,在此不列出 3.00 之前的更新内容。
|
根据用户的反馈,我们不断修正和完善模板。由于 3.00 之前版本与现在版本差异非常大,在此不列出 3.00 之前的更新内容。
|
||||||
|
|
||||||
\datechange{2022/05/25}{版本 4.4 正式发布。}
|
\datechange{2022/05/28}{版本 4.4 正式发布。}
|
||||||
|
|
||||||
\begin{change}
|
\begin{change}
|
||||||
\item \textbf{重要改动}:提供了一个定义定理类环境的命令 \lstinline|\elegantnewtheorem|。
|
\item \textbf{重要改动}:提供了一个定义定理类环境的命令 \lstinline|\elegantnewtheorem|。
|
||||||
\item \textbf{重要改动}:为所有内置定理类环境提供了带星号的版本,带星号的定理类环境不会编号,修复 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/167}{issue: \#167};
|
\item \textbf{重要改动}:为所有内置定理类环境提供了带星号的版本,带星号的定理类环境不会编号,修复 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/167}{issue: \#167};
|
||||||
|
\item \textbf{重要改动}:在 \lstinline{scheme=chinese} 下将目录中的“第 1 章”修改为“第一章”;
|
||||||
\item 将 TeX Gyre Termes 改为 TeX Gyre TermesX,使英文部分字形与 newtx 系列宏包更相近;
|
\item 将 TeX Gyre Termes 改为 TeX Gyre TermesX,使英文部分字形与 newtx 系列宏包更相近;
|
||||||
\item 重写了内置定理类环境的实现方法,修复了一些 bug,由于修改部分较大,如果引入了新的 bug,请及时在 QQ 群或 \href{https://github.com/ElegantLaTeX}{Github} 上进行反馈;
|
\item 重写了内置定理类环境的实现方法,修复了一些 bug,由于修改部分较大,如果引入了新的 bug,请及时在 QQ 群或 \href{https://github.com/ElegantLaTeX}{Github} 上进行反馈;
|
||||||
\end{change}
|
\end{change}
|
||||||
|
|||||||
@@ -844,8 +844,12 @@
|
|||||||
\ifdefstring{\ELEGANT@lang}{cn}{
|
\ifdefstring{\ELEGANT@lang}{cn}{
|
||||||
\ifdefstring{\ELEGANT@scheme}{chinese}{
|
\ifdefstring{\ELEGANT@scheme}{chinese}{
|
||||||
\newcommand{\xchaptertitle}{第\zhnumber{\arabic{chapter}}章} }{
|
\newcommand{\xchaptertitle}{第\zhnumber{\arabic{chapter}}章} }{
|
||||||
\newcommand{\xchaptertitle}{第 \thechapter{} 章}} }{
|
\newcommand{\xchaptertitle}{第 \thechapter{} 章}}
|
||||||
\newcommand{\xchaptertitle}{\chaptername~\thechapter~}}
|
\patchcmd{\NR@chapter}%
|
||||||
|
{\numberline{\thechapter}}{\numberline{\xchaptertitle}}%
|
||||||
|
{}{\fail}
|
||||||
|
}
|
||||||
|
{\newcommand{\xchaptertitle}{\chaptername~\thechapter~}}
|
||||||
|
|
||||||
\setcounter{secnumdepth}{5}
|
\setcounter{secnumdepth}{5}
|
||||||
\titleformat{\chapter}[\style]{\bfseries}{
|
\titleformat{\chapter}[\style]{\bfseries}{
|
||||||
@@ -1369,13 +1373,17 @@ beforechap\newpage%
|
|||||||
|
|
||||||
|
|
||||||
% https://tex.stackexchange.com/questions/56839/chaptername-is-used-even-for-appendix-chapters-in-toc
|
% https://tex.stackexchange.com/questions/56839/chaptername-is-used-even-for-appendix-chapters-in-toc
|
||||||
\usepackage{calc}
|
\RequirePackage{calc}
|
||||||
\usepackage[titles]{tocloft}
|
\RequirePackage[titles]{tocloft}
|
||||||
\ifdefstring{\ELEGANT@lang}{cn}{
|
\ifdefstring{\ELEGANT@lang}{cn}{
|
||||||
\renewcommand{\cftchappresnum}{\beforechap\space}
|
% \renewcommand{\cftchappresnum}{\beforechap\space}
|
||||||
\renewcommand{\cftchapaftersnum}{\space\afterchap}
|
% \renewcommand{\cftchapaftersnum}{\space\afterchap}
|
||||||
\setlength{\cftchapnumwidth}{\widthof{\textbf{附录~999}}}
|
\setlength{\cftchapnumwidth}{\widthof{\textbf{附录~999}}}
|
||||||
\g@addto@macro\appendix{%
|
\g@addto@macro\appendix{%
|
||||||
|
% recover \thechapter in the \NR@chapter's \numberline
|
||||||
|
\patchcmd{\NR@chapter}
|
||||||
|
{\numberline{\xchaptertitle}}
|
||||||
|
{\numberline{\thechapter}}{}{}
|
||||||
\addtocontents{toc}{%
|
\addtocontents{toc}{%
|
||||||
\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}%
|
\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}%
|
||||||
\protect\renewcommand{\protect\cftchapaftersnum}{}%
|
\protect\renewcommand{\protect\cftchapaftersnum}{}%
|
||||||
|
|||||||
Reference in New Issue
Block a user