summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-24 20:19:11 +0000
committerKarl Berry <karl@freefriends.org>2024-04-24 20:19:11 +0000
commit41f716c942ca6db8d18267801f5fc12752993914 (patch)
tree574acf5d45bae488805d62545c48fecaa06954da
parent26e2aa5630cce49e4cc226c6a17bf1727e576be5 (diff)
easybook (24apr24)
git-svn-id: svn://tug.org/texlive/trunk@71062 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook.pdfbin618466 -> 639763 bytes
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook.tex288
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx187
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybase.sty183
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls2
-rw-r--r--Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg2
6 files changed, 387 insertions, 275 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf
index c186d69e7a9..eb2bc6422e6 100644
--- a/Master/texmf-dist/doc/latex/easybook/easybook.pdf
+++ b/Master/texmf-dist/doc/latex/easybook/easybook.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.tex b/Master/texmf-dist/doc/latex/easybook/easybook.tex
index 38eed7aa2bb..a00aeb12d0f 100644
--- a/Master/texmf-dist/doc/latex/easybook/easybook.tex
+++ b/Master/texmf-dist/doc/latex/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024aw,
- date = 2024/04/22,
+ version = v2024az,
+ date = 2024/04/24,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -53,9 +53,12 @@
\setlist[1]{labelindent = \parindent}
\setlist[itemize,1]{label = smallbullet,leftmargin = *}
\setcounter{tocdepth}{2}
-\SetTblrInner[talltblr]{hline{1,Z} = {0.8pt,DarkBlue}}
-\SetTblrTemplate{caption}{empty}
+\SetTblrInner[longtblr]{hline{1,Z} = {1pt,DarkBlue}}
+\SetTblrOuter[longtblr]{presep = \bigskipamount,postsep = \bigskipamount}
+\DefTblrTemplate{caption-tag}{default}{表\thetable}
+\DefTblrTemplate{caption-sep}{default}{\quad}
\DefTblrTemplate{remark-sep}{default}{\space}
+\SetTblrStyle{caption-tag}{font = \bfseries}
\SetTblrStyle{remark}{font = \small\normalfont}
\ExplSyntaxOn\makeatletter
@@ -124,14 +127,6 @@
% Use a separate module margin marker to prevent overlap
\newcommand{\smodule}[1]{\cnltx@module@text*{\normalsize #1}}
\newcommand{\noitemsep}{\setlength{\itemsep}{0ex}}
-\newcommand{\insertalltblr}[3][]
- {
- \begin{center}
- \begin{talltblr}[#1]{#2}
- #3
- \end{talltblr}
- \end{center}
- }
\renewcommand{\cnltx@package@abstract@width}{0.85\linewidth}
\renewcommand{\cnltx@write@lastname}{}
\renewcommand{\cmltx@list@setup}
@@ -158,13 +153,13 @@
rulecolor = \color{DarkBlue},
framerule = 0.5pt,
frame = single,
- framesep = 6pt
+ framesep = 8pt
}
\DefineVerbatimEnvironment{frameverb}{Verbatim}
{
listparameters =
{
- \setlength{\topsep}{\bigskipamount}
+ \setlength{\topsep}{1.2\bigskipamount}
\appto\FV@EndList{\nointerlineskip}
}
}
@@ -173,40 +168,31 @@
label = \rule{0pt}{12pt}\textnormal{\bfseries 例~\arabic{ctexexam}},
listparameters =
{
- \setlength{\topsep}{\bigskipamount}
+ \setlength{\topsep}{1.2\bigskipamount}
\appto\FV@EndList{\nointerlineskip}
\refstepcounter{ctexexam}\ctexexamlabelref
}
}
-\newcommand{\cancelitem}
- {
- \renewcommand*{\@cnltx@option@one}[2]
- {
- ##1{##2}
- \cnltx@checkdefault{\hfill\newline}
- }
- \renewcommand*{\@cnltx@option@two}[3]
- {
- ##1{##2}{##3}
- \cnltx@checkdefault{\hfill\newline}
- }
- }
\newcommand{\optpath}[1]{\item\code{\textcolor{SlateGray}{#1}}}
\makeatother\ExplSyntaxOff
\labelformat{section}{节#1}
\labelformat{subsection}{小节#1}
\labelformat{subsubsection}{小节#1}
\labelformat{ctexexam}{例#1}
+\labelformat{table}{表#1}
\begin{document}
\section{准备开始}
您在使用 \easybook{} 文档类编写文档前可能需要具备以下的条件:
\begin{itemize}
- \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
+ \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式之一。
\item 由于文档类用到了一些 \LaTeX 和依赖宏包较新的功能,需要版本至少在\textbf{2021/11/15}以后的 \LaTeX 内核支持。建议您安装最新的 \TeX 发行版。
- \item 虽然手册对基本用法做了介绍,但这并不是入门教程,所涉及到宏包的用法与命令也需要有了解。您应当具有一定的 \LaTeX 使用基础,可以在 \TeX 综合网站 \href{https://www.ctan.org/}{CTAN} 查看相关资源。
+ \item 虽然手册对基本用法做了介绍,但这并不是入门教程,所涉及到宏包的用法与命令并未进行详细介绍,需要对它们有所了解。您应当具有一定的 \LaTeX 使用基础,可以在 \TeX 综合网站 \href{https://www.ctan.org/}{CTAN} 查看相关资源。
\end{itemize}
+\subsection{前言}
+对于排版外文文档已有诸如 \cls*{KOMA-Script} 和 \cls*{memoir} 等应用广泛的文档类,但这些文档类并不是为中文用户设计的,难免有些水土不符,且用户手册繁杂,对于普通用户来说学习成本高,难以快速上手。中文文档的解决方案 \pkg*{ctex} 宏集解决了中文输出和章节标题格式的设置问题,但在编写文档过程中往往需要更多基本的定制功能,例如目录、图表标题、页眉页脚、脚注和页面边距等,这往往需要额外加载不同功能的宏包。\easybook{} 文档类在 \cls*{ctexbook} 基础上载入了一些使用频率较高且基本稳定的宏包,对它们的功能进行整合并优化联动使用,模块化的改装提供统一的接口兼容 \pkg*{ctex} 文档类,可以满足学术类文档例如中国学位论文模板的基本需求。\easybook{} 提供了与 \CTeX 相同现代化风格的键值设置,支持不同类型的选项与层次化的选项设置。
+
\subsection{基本用法}
\label{subsec:basic usage}
以下一份简单的 \TeX 文档演示了 \easybook{} 的最基本用法,在导言区进行宏包载入与文档设置,一些详细的使用样例会不定期上传在 \href{https://www.latexstudio.net/}{\LaTeX 工作室} 的网站。
@@ -252,24 +238,25 @@
\ding{72} 需要注意正确\textbf{编译索引}要增加 \code{-shell-escape} 命令行选项。
\subsection{依赖宏包}
-以下为 \pkg*{easybase} 直接调用的关键宏包清单,通常情况下它们是常用且稳定的。\colorbox{PaleTurquoise}{蓝色}背景的宏包表示修改了或依赖它们的内部命令。\colorbox{GreenYellow}{绿色}背景的宏包表示并未调用它们,但做了一些预配置,可在导言区手动载入以实现相关的功能。
-\insertalltblr
+\ref{table:package list} 为 \pkg*{easybase} 直接调用的关键宏包清单,通常情况下它们是常用且稳定的。\colorbox{PaleTurquoise}{蓝色}背景的宏包表示修改了或依赖它们的内部命令。\colorbox{GreenYellow}{绿色}背景的宏包表示并未调用它们,但做了一些预配置,可在导言区手动载入以实现相关的功能。
+\begin{longtblr}
+ [caption = 依赖的宏包清单,label = table:package list]
{
- colspec = *{5}{c},
- cells = {cmd = \pkg*},
- cell{1}{3,4} = PaleTurquoise,
- cell{2}{5} = PaleTurquoise,
- cell{3}{2,4} = PaleTurquoise,
- cell{5}{1} = GreenYellow,
- cell{1}{2} = GreenYellow,
- cell{3}{1,4} = GreenYellow
- }{
- amsthm & bicaption & ctex & caption & chemformula \\
- enumitem & etoolbox & fancyhdr & geometry & hyperref \\
- imakeidx & listings & marginnote & mathtools & multicol \\
- pifont & pdfpages & siunitx & spbmark & thmtools \\
- tcolorbox & titletoc & tabularray & ulem &
+ colspec = *{5}{c},
+ cells = {cmd = \pkg*},
+ cell{1}{3,4} = PaleTurquoise,
+ cell{2}{5} = PaleTurquoise,
+ cell{3}{2,4} = PaleTurquoise,
+ cell{5}{1} = GreenYellow,
+ cell{1}{2} = GreenYellow,
+ cell{3}{1,4} = GreenYellow
}
+ amsthm & bicaption & ctex & caption & chemformula \\
+ enumitem & etoolbox & fancyhdr & geometry & hyperref \\
+ imakeidx & listings & marginnote & mathtools & multicol \\
+ pifont & pdfpages & siunitx & spbmark & thmtools \\
+ tcolorbox & titletoc & tabularray & ulem &
+\end{longtblr}
\section{文档类选项}
\label{sec:document class options}
@@ -292,7 +279,7 @@
\keychoice{floatpage}{true,\fbox{false}}
开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值。关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
\keychoice{theorem}{\fbox{true},false}
- 是否提供定理功能支持。选项开启时定理样式模块生效,此时会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包。
+ 是否提供定理功能支持。选项开启时定理模块生效,此时会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包。
\end{options}
\subsection{配置字体}
@@ -311,23 +298,26 @@
\begin{options}
\keychoice{font}{noto,times,times*,ebgaramond,libertine,palatino,\fbox{auto}}\dtag
- 预置的英文字体相关配置方案如下表所示。这些字体已经包含在了 \hologo{TeXLive} 发行版中,所以通常不需要再专门安装。如果您想使用其它英文字体,可以使用 \pkg*{fontspec} 宏包的相关命令进行设置。
- \insertalltblr[
- remark{\ding{72}} = \code{times*} 方案为 \textsf{windows} 系统的预置字体。
- ]{
- colspec = @{}*{4}{c}@{},
- hline{2} = {0.5pt,DarkBlue},
- row{1} = {font = \sffamily},
- column{1} = {cmd = \code}
- }{
- & 正文字体 & 无衬线字体 & 等宽字体 \\
- noto & Noto Serif & Noto Sans & Noto Sans Mono \\
- times & XITS & TG Heros & TG Cursor \\
- times* & Times New Roman & Arial & Courier New \\
- ebgaramond & EB Garamond & Libertinus Sans & LM Mono \\
- palatino & TG Pagella & Libertinus Sans & LM Mono \\
- libertine & Libertinus Serif & Libertinus Sans & LM Mono
- }
+ 预置的英文字体相关配置方案如\ref{table:english font} 所示。这些字体已经包含在了 \hologo{TeXLive} 发行版中,所以通常不需要再专门安装。如果您想使用其它英文字体,可以使用 \pkg*{fontspec} 宏包的相关命令进行设置。
+ \begin{longtblr}
+ [
+ caption = 英文字体预设方案,
+ label = table:english font,
+ remark{\ding{72}} = \code{times*} 方案为 \textsf{windows} 系统的预置字体。
+ ]{
+ colspec = @{}*{4}{c}@{},
+ hline{2} = {0.5pt,DarkBlue},
+ row{1} = {font = \sffamily},
+ column{1} = {cmd = \code}
+ }
+ & 正文字体 & 无衬线字体 & 等宽字体 \\
+ noto & Noto Serif & Noto Sans & Noto Sans Mono \\
+ times & XITS & TG Heros & TG Cursor \\
+ times* & Times New Roman & Arial & Courier New \\
+ ebgaramond & EB Garamond & Libertinus Sans & LM Mono \\
+ palatino & TG Pagella & Libertinus Sans & LM Mono \\
+ libertine & Libertinus Serif & Libertinus Sans & LM Mono
+ \end{longtblr}
\end{options}
\begin{options}
@@ -349,49 +339,51 @@
\section{接口选项}
\label{sec:interface options}
\begin{commands}
- \command*{ctexset}[\marg{键值列表}]
- \easybook{} 扩展了 \CTeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \cs*{ctexset},接口选项同样可用它设置,原有的 \meta{键值列表} 仍然可用。本文档类目前有9个模块用于实现常规的排版功能,如下表所示。模块名也是统一接口 \cs*{ctexset} 的路径,不同模块单独接口的命令名\textbf{加上前缀} \code{eb}:
- \insertalltblr
+ \command*{ctexset}[\oarg{模块名}\marg{键值列表}]
+ \easybook{} 扩展了 \CTeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \cs*{ctexset},接口选项同样可用它设置,原有的 \meta{键值列表} 仍然可用。本文档类目前有9个模块用于实现常规的排版功能,如\ref{table:module List} 所示。
+ \begin{longtblr}
+ [caption = 模块功能和名称清单,label = table:module List]
{
- colspec = @{}*{5}{c}@{},
- hline{3} = {0.5pt,DarkBlue},
- row{1,3} = {font = \sffamily,belowsep = 0pt},
- row{2,4} = {cmd = \module*}
- }{
- \hyperref[subsec:style]{风格} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:reference]{参考文献} \\
- style & subfont & spread & refset & bibset \\
- \hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\
- thmset & geoset & hdrset & tocset &
+ colspec = @{}*{5}{c}@{},
+ hline{3} = {0.5pt,DarkBlue},
+ row{1,3} = {font = \sffamily,belowsep = 0pt},
+ row{2,4} = {cmd = \module*}
}
-
- 例如使用下面\ref{subsec:style} 介绍的风格 \module*{style} 模块,路径名与所属下级选项之间可以 \code{/} 或 \code{=} 号分开,斜线 \code{/} 后不能有空格或者换行:
- \begin{ctexexam}
+ \hyperref[subsec:tools]{工具} & \hyperref[subsec:font]{字体} & \hyperref[subsec:spread]{行距} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:reference]{参考文献} \\
+ tools & font & spread & ref & bib \\
+ \hyperref[subsec:theorem]{定理} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog]{目录} & \\
+ thmt & geo & hdr & toc &
+ \end{longtblr}
+
+ \ref{exam:kv setting} 使用\ref{subsec:tools} 介绍的工具模块 \module*{tools} 举例三种键值列表设置方式:1. 各 \meta{模块名} 是统一接口 \cs*{ctexset} 的键路径。2. 不同模块还具有单独的接口命令 \cs*{eb}\meta{模块名}\code{\textcolor{cs}{set}}。3. \meta{模块名} 也可以使用 \cs*{ctexset} 命令的可选参数设置。路径名与所属下级选项之间可以 \code{/} 或 \code{=} 号分开,斜线 \code{/} 后不能有空格或者换行。
+ \begin{ctexexam}[labelref = exam:kv setting]
\ctexset
{
- style/color = seaside,
- style =
+ tools/color = seaside,
+ tools =
{
fntnumwith = page,
uppercase = first
}
}
- \ebstyle{hyphen-figure = {-}}
+ \ctexset[tools]{spcmd = \color{red}}
+ \ebtoolsset{hyphen-figure = {-}}
\end{ctexexam}
- 文档类有三种选项:布尔型 \choicekey*{key}{true,false},选项的值为真 \code{true} 或假 \code{false},如果不指定默认为真。键值型 \key*{key}{value} 需要为选项指定值,后面 \code{=} 号不能省略。选择型 \choicekey*{key}{one,\fbox{two},three} 根据提供的可选值进行设定。
+ \easybook{} 文档类有三种选项:布尔型 \choicekey*{key}{true,false},选项的值为真 \code{true} 或假 \code{false},如果不指定默认为真。键值型 \key*{key}{value} 需要为选项指定值,后面 \code{=} 号不能省略。选择型 \choicekey*{key}{one,\fbox{two},three} 根据提供的可选值进行设定。
\end{commands}
-\subsection[风格]{风格\smodule{style}}
-\label{subsec:style}
+\subsection[工具]{工具\smodule{tools}}
+\label{subsec:tools}
\begin{options}
\keychoice{color}{\fbox{none},seaside,energy,cyberpunk}
- 预置了四种颜色主题,默认主题 \code{none} 为黑白页面,颜色主题不包括超链接。
+ \easybook{} 预置了四种颜色主题,默认主题 \code{none} 为黑白页面,颜色主题不包括超链接。
\begin{commands}
\command{DeclareThemeColor}[\splitmarg{风格名称,颜色1,颜色2,颜色3}]
声明新的颜色主题命令。它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成主题颜色列表。其中 \meta{颜色1} 为标题标签,\meta{颜色2} 为列表编号、定理标签和公式编号括号,\meta{颜色3} 为代码抄录。类似地更改超链接颜色见\ref{subsec:hyperlinks}。
\begin{ctexexam}
\DeclareThemeColor{fancy,2acb25,60aacc,ebc01c}
- \ctexset{style/color = fancy}
+ \ctexset{tools/color = fancy}
\end{ctexexam}
\end{commands}
\keyval{color-every}{HTML颜色代码}
@@ -408,7 +400,7 @@
设置行间公式标签的括号及格式,以英文逗号分隔,分别代表左右括号。\meta{左括号} 的末尾可以是带有一个参数的命令,用于接受公式编号。将标签括号设置为方括号,并给编号使用无衬线字体:
\begin{ctexexam}
\newcommand{\bracketsf}[1]{[\textsf{#1}}
- \ebstyle{tagform = {\bracketsf,]}}
+ \ebtoolsset{tagform = {\bracketsf,]}}
\end{ctexexam}
\kvsplit-{figurepath}{\marg{路径名1}\marg{路径名2}$\cdots$\marg{路径名n}}
设置插入图片的文件夹路径名。可以有多个路径名,每个路径包含在花括号内分隔,只有一个路径时需要包含在两层括号内。
@@ -457,9 +449,9 @@
上下标命令 \cs{supersub} 对应的上下标水平对齐方式,有左 \code{l}、居中 \code{c} 和右 \code{r} 三种对齐方式。
\end{options}
-\subsection[超链接]{超链接\smodule{refset}}
+\subsection[超链接]{超链接\smodule{ref}}
\label{subsec:hyperlinks}
-模块 \module*{refset} 将超链接选项交给 \pkg*{hyperref} 宏包处理。除了一些超链接颜色的选项失效,其它由宏包全局和接口命令 \cs*{hypersetup} 支持的多数选项可用。
+模块 \module*{ref} 将超链接选项交给 \pkg*{hyperref} 宏包处理。除了一些超链接颜色的选项失效,其它由宏包全局和接口命令 \cs*{hypersetup} 支持的多数选项可用。
\begin{options}
\keychoice{linktype}{\fbox{edge},colors,none}
超链接类型。\code{edge} 使超链接形式为边框,\code{colors} 使超链接字体为彩色,\code{none} 关闭超链接边框与颜色,此时 \option{linkcolor} 选项无效。
@@ -476,7 +468,7 @@
\end{options}
\subsection[行距]{行距\smodule{spread}}
-\label{subsec:spacing}
+\label{subsec:spread}
行距因子用于设置各种行距倍数,\meta{数值} 是不带有长度单位的浮点数。各类行距既可以在导言区全局设置,也可以在正文中设置对后面生效。
\begin{options}
\keyval{line}{数值}
@@ -494,9 +486,9 @@
\keyval{caption-every}{数值}\Default{1.2}
同时设置图片、表格和代码题注的行距因子。
\keyval{footnote}{数值}\Default{1.2}
- 脚注内容整体的行距因子。可以使用 \module*{hdrset} 模块 \option{fnpara-format} 选项的代码单独覆盖每个脚注的行距,从而使脚注间和内容文本自身的行距不同。
+ 脚注内容整体的行距因子。可以使用 \module*{hdr} 模块 \option{fnpara-format} 选项的代码单独覆盖每个脚注的行距,从而使脚注间和内容文本自身的行距不同。
\begin{ctexexam}
- \ebspread{footnote = 1.3}
+ \ebspreadset{footnote = 1.3}
\ebhdrset{fnpara-format = \linespread{1.2}\selectfont}
\end{ctexexam}
\keyval{every}{数值}
@@ -507,8 +499,8 @@
行间公式与下面正文间的额外距离。
\end{options}
-\subsection[其它字体]{其它字体\smodule{subfont}}
-\label{subsec:other font}
+\subsection[其它字体]{其它字体\smodule{font}}
+\label{subsec:font}
\begin{options}
\keyval{caption-table}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
设置表格题注的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
@@ -525,15 +517,15 @@
\end{options}
\begin{commands}
- \command{addtosubfont}[\marg{字体类型}\marg{字体命令}]
+ \command{ebaddtofont}[\marg{字体类型}\marg{字体命令}]
用于在上述各种字体原有的格式上附加代码。其中 \meta{字体命令} 也可以包括行距命令且相对于 \module*{spread} 模块具有优先性,不同题注的 \meta{字体类型} 则为相应选项的后缀名。
\begin{ctexexam}
- \addtosubfont{every}{\linespread{1.5}\selectfont}
- \addtosubfont{footnote}{\sffamily}
+ \ebaddtofont{every}{\linespread{1.5}\selectfont}
+ \ebaddtofont{footnote}{\sffamily}
\end{ctexexam}
\end{commands}
-\subsection[参考文献]{参考文献\smodule{bibset}}
+\subsection[参考文献]{参考文献\smodule{bib}}
\label{subsec:reference}
\begin{options}
\keychoice{backend}{\fbox{bibtex},biblatex}
@@ -543,7 +535,7 @@
\keyval{citestyle}{标注风格}
标注参考文献的风格。后端为 \hologo{BibTeX} 时可使用 \option{super}(数字上标标注,默认)或 \option{numbers}(数字标注)等 \pkg*{natbib} 宏包带有的标注风格,后端为 \hologo{biber} 时可使用 \pkg*{biblatex} 宏包支持的标注风格。
\keyval{datafile}{数据库列表}
- 参考文献数据库的文件名列表,文件列表以花括号包裹并以英文逗号分隔。使用 \hologo{biber} 处理时文件名要带 \code{bib} 扩展名,若参考文献文件不在当前文件夹则文件名需要包含路径,即 \code{path/file.bib}。不设置参考文献数据库名时 \module*{bibset} 模块中的选项会失效,即不自动载入 \pkg*{natbib} 或 \pkg*{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。
+ 参考文献数据库的文件名列表,文件列表以花括号包裹并以英文逗号分隔。使用 \hologo{biber} 处理时文件名要带 \code{bib} 扩展名,若参考文献文件不在当前文件夹则文件名需要包含路径,即 \code{path/file.bib}。不设置参考文献数据库名时 \module*{bib} 模块中的选项会失效,即不自动载入 \pkg*{natbib} 或 \pkg*{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。
\end{options}
\begin{commands}
@@ -576,9 +568,9 @@
\end{ctexexam}
\end{options}
-\subsection[定理样式]{定理样式\smodule{thmset}}
-\label{subsec:theorem of style}
-模块 \module*{thmset} 由 \pkg*{thmtools} 宏包提供支持,主要提供了定理环境和样式声明两个命令。定理环境声明命令 \cs{declaretheorem} 使用的定理样式由样式声明命令 \cs{declaretheoremstyle} 提供,文档类预置了一个定理样式 \code{default},但未定义任何定理环境。
+\subsection[定理]{定理\smodule{thmt}}
+\label{subsec:theorem}
+定理模块 \module*{thmt} 由 \pkg*{thmtools} 宏包提供支持,主要提供了定理环境和样式声明两个命令。定理环境声明命令 \cs{declaretheorem} 使用的定理样式由样式声明命令 \cs{declaretheoremstyle} 提供,文档类预置了一个定理样式 \code{default},但未定义任何定理环境。
\begin{commands}
\command{declaretheorem}[\oarg{键值列表1}\marg{环境名}\oarg{键值列表2}]
定理环境声明命令。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,其中常用的选项如下:
@@ -644,9 +636,35 @@
\end{ctexexam}
\end{commands}
-\subsection[页面尺寸]{页面尺寸\smodule{geoset}}
+\begin{commands}\noitemsep
+ \command{listoftheorems}[\sarg\oarg{键值列表}]\default{}
+ \item\key{listoftheorems}{定理目录标题名}
+ \command{settheoremtocline}[\sarg\marg{环境名}\marg{标题定义}]\newtagv{2024az}%
+ 对 \pkg*{thmtools} 宏包的定理环境目录命令 \cs{listoftheorems} 进行了兼容调整,\ref{subsec:directory command} 和\ref{subsec:catalog} 中的选项机制均可用,但标题定义选项 \option{tocline} 较为特殊,需用 \cs{settheoremtocline} 命令单独设置。在 \meta{标题定义} 中有三个命令 \cs{thmtname}、\cs{thmtenvname} 和 \cs{thmtnote} 分别代表定理名、定理环境名和题注用于排版目录条目。
+\end{commands}
+
+\begin{commands}
+ \optpath{thmt/}\key{loeskip}{弹性长度}\Default{10pt}
+ 定理目录中每章第一个条目上方增加的垂直距离。与 \CTeX 的表格和图片目录中每章间的条目距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
+ \command{thmtifnote}[\marg{存在题注代码}\marg{不存在题注代码}]
+ 如果标题没题注即定理环境不用可选参数,则标题不加入定理目录,这是默认且合理的行为。若需要将无题注的标题加入目录可将 \meta{环境名} 加入目录风格的 \option{show} 选项或使用 \cs*{settheoremtocline}\code{*} 命令。是否存在题注需要在 \meta{标题定义} 中使用 \cs{thmtifnote} 命令判定,从而输出不同的内容。
+ \command{thmtifname}[\marg{存在编号代码}\marg{不存在编号代码}]
+ 在 \meta{标题定义} 中测试当前定理是否有编号从而输出不同的内容,定理风格选项 \keyis{numbered}{no} 设置当前定理环境没有编号。
+ \begin{ctexexam}
+ \contentsuse{caixiang}{loe}
+ \RegisterTocName{caixiang}
+ \setlisttheoremstyle{ignoreall,show = caixiang}
+ \settheoremtocline{caixiang}
+ {%
+ \listnumberline{caixiang}
+ \thmtname\thmtifnote{[\thmtnote]}{}
+ }
+ \end{ctexexam}
+\end{commands}
+
+\subsection[页面尺寸]{页面尺寸\smodule{geo}}
\label{subsec:page margins}
-模块 \module*{geoset} 会将选项(除了前两个为附加)交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \textsf{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。
+模块 \module*{geo} 会将选项(除了前两个为附加)交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \textsf{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。
\begin{options}\noitemsep
\keyval{headruleskip}{页眉线间距}\Default*{0pt}
\keyval{footruleskip}{页脚线间距}\Default*{3.5pt}
@@ -665,9 +683,9 @@
\end{ctexexam}
\end{options}
-\subsection[页眉页脚]{页眉页脚\smodule{hdrset}}
+\subsection[页眉页脚]{页眉页脚\smodule{hdr}}
\label{subsec:header and footer}
-模块 \module*{hdrset} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。标题标记由标签和标题组成,选项中参数 \code{\#1} 代表当前章、节或小节的标题。在 \cls*{book} 模式时使用标题标记选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致。重新设置标题标记选项时标记大小写选项 \option{uppercase} 会失效。
+模块 \module*{hdr} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。标题标记由标签和标题组成,选项中参数 \code{\#1} 代表当前章、节或小节的标题。在 \cls*{book} 模式时使用标题标记选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致。重新设置标题标记选项时标记大小写选项 \option{uppercase} 会失效。
\begin{options}
\keyval{chap-mark}{标题标记}
\code{chapter} 级别标题标记的内容,包含了标签选项 \option{chap-label} 和章标题 \code{\#1}。
@@ -701,6 +719,16 @@
\end{options}
\begin{commands}\noitemsep
+ \command{fancyhead}[\marg{风格名}\oarg{基础风格}\marg{风格定义}]
+ 定义名为 \meta{风格名} 的页面风格。\meta{风格定义} 中可包含设置页眉页脚不同位置格式的命令,如果为空则等于 \code{fancy} 风格。如果存在 \meta{基础风格},则在它的基础上进行定义。
+ \begin{ctexexam}
+ \fancypagestyle{plain}
+ {
+ \fancyhf{}
+ \fancyfoot[C]{\textbf{--~\thepage~--}}
+ \ebhdrset{headrule = {}}
+ }
+ \end{ctexexam}
\command{fancyhead}[\oarg{位置}\marg{内容}]\default{}
\command{fancyfoot}[\oarg{位置}\marg{内容}]
为了确保页面显示正确,使用 \cs{fancyhead} 和 \cs{fancyfoot} 等命令设置页眉页脚时需要在页边距的命令之后。默认设置的是一个名为 \code{fancy} 的页面风格。\pkg*{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中 \code{E} 和 \code{O} 代表偶数和奇数,\code{L}、\code{C} 和 \code{R} 代表左、中和右部分。单面打印时,含有偶数位置的命令无效。
@@ -724,8 +752,8 @@
\end{ctexexam}
\end{commands}
-\subsection[脚注格式]{脚注格式\smodule{hdrset}}
-模块 \module*{hdrset} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号和对齐方式等,以及脚注内容的首行缩进、行距和字体等。基本思想是提供常规和自定义标记(\code{fncustom})两种脚注,常规脚注的标记分为正文(\code{fnmark})和内容(\code{fntext})标记两种,且两者编号类型分离,自定义脚注的标记与其共享格式。目前脚注模块基本兼容 \pkg*{footmisc} 宏包。
+\subsection[脚注]{脚注\smodule{hdr}}
+模块 \module*{hdr} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号和对齐方式等,以及脚注内容的首行缩进、行距和字体等。基本思想是提供常规和自定义标记(\code{fncustom})两种脚注,常规脚注的标记分为正文(\code{fnmark})和内容(\code{fntext})标记两种,且两者编号类型分离,自定义脚注的标记与其共享格式。目前脚注模块基本兼容 \pkg*{footmisc} 宏包。
\begin{options}
\keychoice{footnotetype}{plain,\fbox{hang},flush,bottom}
脚注的类型。悬挂缩进 \code{hang} 是默认值,\code{plain} 是原始的类型,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。当存在浮动环境排版时,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用:
@@ -817,9 +845,9 @@
\end{ctexexam}
\end{commands}
\keychoice{fnboth-format}{\textcolor{SlateGray}{format code},match}
- 同时设定默认脚注标记 \option{fnmarktext-format} 和自定义脚注标记 \option{fncustom-format} 的格式。两种脚注标记匹配上标格式 \option{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。会覆盖 \module*{subfont} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注标记。
+ 同时设定默认脚注标记 \option{fnmarktext-format} 和自定义脚注标记 \option{fncustom-format} 的格式。两种脚注标记匹配上标格式 \option{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。会覆盖 \module*{font} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注标记。
\keyval{fnpara-format}{格式代码}
- 脚注内容文本的格式。会覆盖 \module*{subfont} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注内容文本。
+ 脚注内容文本的格式。会覆盖 \module*{font} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注内容文本。
\kvsplit{fntext-code}{前代码,后代码}
可以用 \meta{前代码} 与 \meta{后代码} 额外增加脚注内容标记前后的代码。也可以只有前部分,\meta{前代码} 中最后一个格式命令可以带有一个参数接受脚注内容标记。由于脚注标记处于水平模式,可以配合盒子命令设置脚注内容标记的对齐方式,或在标记与脚注首行间插入一点距离。
\begin{ctexexam}
@@ -831,14 +859,16 @@
\end{ctexexam}
\end{options}
-\subsection[目录样式]{目录样式\smodule{tocset}}
-\label{subsec:catalog style}
-模块 \module*{tocset} 将使用 \pkg*{titletoc} 宏包处理目录样式。默认包括 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 条目名的键路径,而使用 \module*{float} 路径可以统一设置图片、表格和代码目录的样式。选项前带有 \ding{73} 符号表示支持所有相应\textbf{条目名}的路径,其它选项则处于 \module*{tocset} 键路径下。目前支持多数学术论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。
+\subsection[目录]{目录\smodule{toc}}
+\label{subsec:catalog}
+模块 \module*{toc} 将使用 \pkg*{titletoc} 宏包处理目录样式。默认包括 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 条目名的键路径,而使用 \module*{float} 路径可以统一设置图片、表格和代码目录的样式。选项前带有 \ding{73} 符号表示支持所有相应\textbf{条目名}的路径,其它选项则处于 \module*{toc} 键路径下。目前支持多数学术论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。
\begin{options}
\keyval{tocformat}{条目格式}\dtag
目录中各类型条目的格式。可以设置条目字体和加入垂直间距等,垂直间距最好使用防止垂直间距重合的 \cs*{addvspace} 命令。如果是段落型目录,格式代码仅在段落中当前级别条目前执行一次。
\keyval{tocformat+}{条目格式}\dtag
与选项 \option{tocformat} 用法一样,只是在已有的格式命令后附加代码。
+ \keyval{tocformat*}{条目格式}\dtag
+ 没有编号/名字标题的附加格式代码。目录中判断标题是否有编号/名字的依据为:如果在 \option{tocline} 选项中使用了 \cs{numberline} 命令输出标签,则判定为有编号/名字。格式最后的命令可带有一个参数,用于接受标题内容。
\keyval{tocindent}{刚性长度}\dtag
目录条目左边的缩进距离,通常标题级别越低缩进越大。如果是段落型目录,仅在当前条目级别为段落中最高时有效。
\keyval{tocrule}{引导线命令}\dtag
@@ -907,7 +937,7 @@
\newcommand{\listoffiguretables}{\listoffigures} % 同时输出图表目录的命令
\end{ctexexam}
\command{SetTocStyle}[\marg{条目名}\marg{风格名}\marg{键值列表}]
- 定义条目类型名称为 \meta{风格名} 的目录风格。使用 \cs*{ctexset} 命令设置目录样式时,除了条目标题定义选项 \option{tocline},其它选项只有在目录输出命令前设置才有效,定义完目录风格后用 \cs{UseTocStyle} 命令可以在正文中任意位置生效。如果是没有 \ding{73} 符号的选项,\meta{条目名} 设置为 \module*{tocset}。
+ 定义条目类型名称为 \meta{风格名} 的目录风格。使用 \cs*{ctexset} 命令设置目录样式时,除了条目标题定义选项 \option{tocline},其它选项只有在目录输出命令前设置才有效,定义完目录风格后用 \cs{UseTocStyle} 命令可以在正文中任意位置生效。如果是没有 \ding{73} 符号的选项,\meta{条目名} 设置为 \module*{toc}。
\command{UseTocStyle}[\marg{条目名}\marg{风格名}\marg{扩展名}]
使用对应条目类型名称为 \meta{风格名} 的目录风格,随后标题在目录中的格式会改变。本命令导言区和正文区均可使用,第三个必选参数还需要指定条目标题加入目录文件的 \meta{扩展名}。
\begin{ctexexam}
@@ -933,7 +963,7 @@
\keyval{lolskip}{弹性长度}\Default{10pt}
代码目录中每章第一个条目上方增加的垂直距离。与 \CTeX 的表格和图片目录中每章间的条目距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
\keyval{between}{代码钩子}\dtag[\textcolor{red}{\ding{73}}]
- 目录标题与条目内容间的钩子(作用于标题下方间距之后),如果是 \cls*{book} 模式则默认插入 \code{-10pt} 垂直距离抵消首行目录的额外垂直间距,这是由于图表和 由 \pkg*{newfloat} 宏包所创建环境的目录默认每使用一次章标题在题注目录中插入 \code{10pt} 距离。除了条目名的键路径外,此选项也可用于 \module*{tocset} 路径中,表示章节标题目录标题代码钩子,如果是 \cls*{book} 模式则默认插入 \code{-1pc} 垂直距离。
+ 目录标题与条目内容间的钩子(作用于标题下方间距之后),如果是 \cls*{book} 模式则默认插入 \code{-10pt} 垂直距离抵消首行目录的额外垂直间距,这是由于图表和 由 \pkg*{newfloat} 宏包所创建环境的目录默认每使用一次章标题在题注目录中插入 \code{10pt} 距离。除了条目名的键路径外,此选项也可用于 \module*{toc} 路径中,表示章节标题目录标题代码钩子,如果是 \cls*{book} 模式则默认插入 \code{-1pc} 垂直距离。
\keyval{bibetween}{代码钩子}
与选项 \option{between} 类似,是英文章节标题目录(如果启用)标题代码钩子。
\keychoice{dotalign}{\fbox{true},false}
@@ -1032,7 +1062,7 @@
\end{options}
\end{commands}
-\subsection{双语章节标题与新建标题}
+\subsection{双语章节标题和新建标题}
双语目录标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有独立的计数器\footnote{默认情况下与普通标题命令共享使用计数器。},并对应 \cs*{the}\meta{计数器} 的值,可以用于 \option{number} 选项更改英文目录中标题的编号格式。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。
\begin{commands}
\command{bichapter}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
@@ -1042,26 +1072,26 @@
\command{bisubsection}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
\code{subsection} 小节级别的双语目录标题命令,具有独立的 \code{bisubsection} 计数器。
- 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \cs*{chapter}\sarg{} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文条目,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录条目的格式是一致的,共享使用 \module*{tocset} 模块的设置。提供了两个选项 \option{biname} 和 \option{binumber} 修改英文目录章标题条目的名字及编号:
- \begin{options}\cancelitem
+ 它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \cs*{chapter}\sarg{} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文条目,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录条目的格式是一致的,共享使用 \module*{toc} 模块的设置。提供了两个选项 \option{biname} 和 \option{binumber} 修改英文目录章标题条目的名字及编号:
+ \begin{options}
\optpath{chapter/}\kvsplit+{biname}{英文目录前名字,英文目录后名字}\Default{Chapter\cs*{space}}
更改英文目录 \code{chapter} 级别的标题条目编号前后名字,类似于 \CTeX 的 \option*{name} 选项。
- \optpath{chapter/}\keyval{binumber}{英文目录编号输出命令}\Default{\cs*{arabic}\Marg{chapter}}
+ \optpath{chapter/}\key{binumber}{英文目录编号输出命令}\Default{\cs*{arabic}\Marg{chapter}}
更改英文目录 \code{chapter} 级别的标题条目编号输出格式,类似于 \CTeX 的 \option*{number} 选项。下面两种设置英文目录中章标题编号的方式等效:
\end{options}
\begin{ctexexam}
\ctexset{chapter/binumber = \arabic{chapter}}
- \BeforeAddBitoc{\ctexset{chapter/nmuber = \arabic{chapter}}}
+ \BeforeAddtoBitoc{\ctexset{chapter/nmuber = \arabic{chapter}}}
\end{ctexexam}
\end{commands}
\begin{commands}
\command{appendix}[\splitoarg{前名字,后名字}\darg{编号输出命令}]
附录起始命令,其后的章节标题变为附录形式。\meta{前名字} 为英文目录中附录标题的前名字,同理 \meta{后名字} 为英文目录中附录标题的后名字。前后名字之间用一个半角逗号分开,也可以只有一部分,表示英文目录中附录标题前名字。\meta{编号输出命令} 为附录标题计数器在英文目录中的编号命令。注意这两个参数仅对 \code{bichapter} 级别的标题生效。
- \command{BeforeAddBitoc}[\sarg\marg{英文标题加入目录前的代码}]
+ \command{BeforeAddtoBitoc}[\sarg\marg{英文标题加入目录前的代码}]
作用于局部范围的英文目录标题条目钩子,代码在标题加入目录前执行,可以插入条目标题定义命令临时改变英文目录中条目的格式,带有星号参数的命令会重置之前的代码。这个命令设置英文目录条目的标题格式具有最高优先级,放置在导言区或 \cs{bichapter} 等双语标题命令前生效。举一个在英文目录节标题条目编号前添加 \code{Section} 字符串的例子:
\begin{ctexexam}
- \BeforeAddBitoc{\ctexset{section/name = Section\space}}
+ \BeforeAddtoBitoc{\ctexset{section/name = Section\space}}
\bisection{中文标题}{English title}
\end{ctexexam}
\end{commands}
@@ -1082,7 +1112,7 @@
\end{ctexexam}
\end{commands}
-\subsection[上标和下标]{上标和下标\smodule{style}}
+\subsection[上标和下标]{上标和下标\smodule{tools}}
上标和下标的功能来自 \pkg*{spbmark} 宏包,下面有三个命令可以用于输出上标和下标。可以使用键值列表的形式对上下标格式进行局部或全局设置,下面命令中两个可选参数的键值列表是等效的。全局设置的详情见\ref{subsubsec:super-sub-script},更多命令和详细用法见 \pkg*{spbmark} 宏包说明文档。
\begin{commands}
\command{super}[\sarg\oarg{键值列表1}\marg{内容}\oarg{键值列表2}]
@@ -1274,9 +1304,10 @@
\section{扩展功能}
\subsection{物理量}
+使用 \pkg*{siunitx} 宏包提供国际单位制的物理量支持。\pkg*{siunitx} 宏包旨在为 \LaTeX 用户提供一种统一的方法,以便正确、轻松地排版数字和单位。\pkg*{siunitx} 的设计理念是默认遵循约定的规则,但允许通过选项设置进行更改。
\begin{commands}
\command{num}[\oarg{键值列表}\marg{数字}]
- \pkg*{siunitx} 宏包的 \cs{num} 命令可以输出以科学计数法表示的数值。
+ \cs{num} 命令可以输出以科学计数法表示的数值。
\command{unit}[\oarg{键值列表}\marg{单位}]
单位格式化命令 \cs{unit} 包含文字元素(例如字母或数字)时,使用 \Marg{.} 和 \code{\~{}} 放置在单元乘积中间,并使用 \code{\_{}} 和 \code{\^{}} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。
\command{qty}[\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位}]
@@ -1292,9 +1323,10 @@
\end{commands}
\subsection{化学式}
+除了以普通公式的方式,化学式的输出还可用 \pkg*{chemformula} 宏包实现。\pkg*{chemformula} 的工作原理与 \pkg*{mhchem} 非常相似,但对化合物、化学计量数和箭头的输入方式更为严格。同时 \pkg*{chemformula} 提供了多种自定义输出的可能性。
\begin{commands}
\command{ch}[\oarg{键值列表}\marg{化学式}]
- 除了以普通公式的方式,化学式还可用 \pkg*{chemformula} 实现。无机化学式使用 \cs{ch} 命令书写。化合物表达式中的原子数不需要加下标符号,化学计量数与表达式间隔一个空格。
+ 无机化学式使用 \cs{ch} 命令书写。化合物表达式中的原子数不需要加下标符号,化学计量数与表达式间隔一个空格。
\begin{ctexexam}
\ch{[Cu(NH3)4]^2+}
\ch{Cu2S + 2 O2 - 2 e^- == 2 Cu^2+ + SO4^2-}
@@ -1331,6 +1363,7 @@
\end{commands}
\subsection{图表题注}
+\pkg*{caption} 宏包提供了多种方法来定制浮动环境(例如 \env{figure} 和 \env{table})中的标题,并可与许多其它宏包配合使用。功能包括旋转题注、侧向题注和连续题注等。
\begin{commands}
\command{captionsetup}[\oarg{条目名}\marg{键值列表}]
这是 \pkg*{caption} 宏包的接口命令,\meta{键值列表} 提供多个选项更改图表题注的格式。题注主要由三部分组成:标题标签即图表名与题注编号的组合,标题文本本身通常是内容的简短描述,以及将文本与标签分开的题注分隔符。可以在导言区设置整体格式,也可以在正文使用局部更改格式。
@@ -1346,7 +1379,7 @@
\subsection{索引}
\begin{commands}
\command{indexsetup}[\marg{键值列表}]
- \pkg*{imakeidx} 宏包增强了索引的功能。这是它的的接口命令,用于设置索引表的整体格式。
+ \pkg*{imakeidx} 宏包增强了索引的功能,可使用户在制作和排版文档的同时制作一个或多个索引。这是 \pkg*{imakeidx} 宏包的接口命令,用于设置索引表的整体格式。
\command{index}[\oarg{索引名}\marg{标签}]
索引标签命令的可选参数可以用不同的 \meta{索引名} 给多个索引表设置标签。
\command{makeindex}[\oarg{键值列表}]
@@ -1476,6 +1509,7 @@
\item 新增段落型目录条目附加代码的选项 \option{tocbegin}、\option{tocsep} 和 \option{tocend}。
\end{version}
\shortversion{v = 2024aw,date = 2022/04/22,changes = 新增新建章节标题命令 \cs{NewTitleCommand} 和 \cs{NewTitleEntryCommand}。}
+ \shortversion{v = 2024az,date = 2022/04/24,changes = 增加对 \pkg*{thmtools} 宏包定理环境目录 \cs{listoftheorems} 的支持。}
\end{changelog}
\nocite{*}
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index ed8abf47f56..08b7136aac3 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2024/04/22}{2024aw}
+\ProvidesExplClass{easybook}{2024/04/24}{2024az}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2024/04/22}{2024aw}
+\ProvidesExplPackage{easybase}{2024/04/24}{2024az}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -310,6 +310,7 @@
\cs_generate_variant:Nn \ctex_define:nn { nx }
\cs_generate_variant:Nn \eb_set_hyperref:n { x }
\cs_generate_variant:Nn \eb_at_begin_environment:nn { on }
+\cs_generate_variant:Nn \tl_if_novalue:nF { V }
\cs_set_protected:Npn \ctex_define:nn #1
{ \keys_define:nn { ctex/#1 } }
@@ -373,7 +374,7 @@
{\IfFileExists{#2.sty}{\RequirePackage{#2}[#3]}{}}
{\IfFileExists{#2.sty}{\RequirePackage[#1]{#2}[#3]}{}}
}
-\cs_new_protected:Npn \LoadPackage #1
+\cs_new_protected:Npn \ebloadpackage #1
{
\int_compare:nTF { \clist_count:n {#1} <= 1 }
{ \RequirePackage }
@@ -433,14 +434,20 @@
\seq_set_from_clist:Nn \l__eb_module_paths_seq
{
- style,subfont,spread,
- bibset,thmset,tocset,
- hdrset,refset,geoset,float
+ tools,font,spread,
+ bib,thmt,toc,
+ hdr,ref,geo,float
}
\seq_map_inline:Nn \l__eb_module_paths_seq
{
\ctex_define:n { #1 .meta:nn = { ctex/#1 } {##1} }
- \cs_new_protected:cpn { eb#1 } ##1 { \ctex_set:nn {#1} {##1} }
+ \cs_new_protected:cpn { eb#1set } ##1 { \ctex_set:nn {#1} {##1} }
+ }
+\RenewDocumentCommand{\ctexset}{om}
+ {
+ \IfValueTF{#1}
+ {\ctex_set:nn {#1} {#2}}
+ {\ctex_set:n {#2}}
}
\bool_until_do:nn
{ \int_compare_p:nNn { \seq_count:N \l__eb_module_paths_seq } < { 8 } }
@@ -481,7 +488,7 @@
The~'\string\chapter'\ command~will~not~be~used.
}
-\LoadPackage
+\ebloadpackage
{
[text]{spbmark},
[normalem]{ulem},
@@ -525,7 +532,7 @@
\eb@tag@brackets@right
}
}
-\ctex_define:nn { style }
+\ctex_define:nn { tools }
{
multoc .int_set:N = \l__eb_toc_columns_int,
multoc .default:n = 2,
@@ -554,20 +561,20 @@
marginparsep = 8pt,
marginparwidth = 2.54cm
}
-\ctex_define:nn { geoset }
+\cs_new:Npn \eb_unknown_kv_handle:
+ {
+ \str_use:N \l_keys_key_str
+ \tl_if_novalue:VF \l_keys_value_tl
+ { = {\exp_not:V \l_keys_value_tl} }
+ }
+\ctex_define:nn { geo }
{
headruleskip .tl_set:N = \headruleskip,
headruleskip .initial:n = 0pt,
footruleskip .tl_set:N = \footruleskip,
footruleskip .initial:n = 3.5pt,
- unknown .code:n =
- {
- \exp_args:Nx \geometry
- {
- \str_use:N \l_keys_key_str
- \tl_if_empty:NF \l_keys_value_tl { = \exp_not:n { {#1} } }
- }
- }
+ unknown .code:n = \exp_args:Nx \geometry { \eb_unknown_kv_handle: },
+ unknown .default:V = \c_novalue_tl
}
\cs_new_protected:Npn \blankpagestyle #1
@@ -628,7 +635,7 @@
{ none* } { \text_lowercase:n }
}
}
-\ctex_define:nn { hdrset }
+\ctex_define:nn { hdr }
{
chap-mark .cs_set:Np = \eb@mark@chapter@whole #1,
chap-mark .initial:n =
@@ -710,7 +717,7 @@
\providecommand{\kaishu}{\itshape}
}
-\ctex_define:nn { style }
+\ctex_define:nn { tools }
{
fntnumwith .choices:nn =
{ part,page,chapter }
@@ -866,7 +873,7 @@
\tl_new:N \l__eb_fnmarktext_format_tl
\tl_new:N \l__eb_fncustom_format_tl
\clist_new:N \l__eb_footnote_value_clist
-\ctex_define:nn { hdrset }
+\ctex_define:nn { hdr }
{
fnfirstindent .tl_set:N = \fnfirstindent,
fnfirstindent .initial:n = 1em,
@@ -907,7 +914,7 @@
fntext-num/unknown .code:n = \eb_fnmarktext_short_label_set:Nn \thefootnote {#1},
fnmarktext-num .meta:n = { fntext-num = #1,fnmark-num = #1 },
fnmarktext-num .initial:n = plain,
- unknown .code:n = \eb_msg_deprecated_option:n { hdrset }
+ unknown .code:n = \eb_msg_deprecated_option:n { hdr }
}
\eb_at_end_preamble:n
@@ -1033,7 +1040,7 @@
{ \reset@font }
{
\setspread{\eb@spread@footnote}
- \eb@subfont@footnote
+ \eb@font@footnote
}
}
\cs_set_eq:NN \eb@@makefntext \@makefntext
@@ -1150,7 +1157,7 @@
{ \tl_clear:N \l__eb_fnmarktext_format_tl }
}
\bool_if:NF \l__eb_fnmarktext_format_match_bool { \spbset{spcmd = { }} }
- \eb@subfont@footnote
+ \eb@font@footnote
}
\cs_new_protected:Npn \defupfntmark #1
{ \cs_set:Npn \@makefnmark { \hbox:n {#1} } }
@@ -1241,7 +1248,7 @@
\@addtoreset{#3}{#5}
\IfBooleanF{#1}
{
- \exp_args:Nc \cs_gset:Npn { the#3 }
+ \cs_gset:cpn { the#3 }
{ \use:c { the#5 }#4#2{#3} }
}
}
@@ -1255,20 +1262,21 @@
\cs_set:Npn \thebisection { \eb_section_counter_prefix:n { bi } }
\cs_set:Npn \thebisubsection { \thebisection.\@arabic\c@bisubsection }
\cs_set:Npn \thesection { \eb_section_counter_prefix:n { } }
-\tl_new:N \eb@before@addbitoc@hook
-\NewDocumentCommand{\BeforeAddBitoc}{sm}
+\tl_new:N \eb@before@bitocline@hook
+\NewDocumentCommand{\BeforeAddtoBitoc}{sm}
{
\IfBooleanTF{#1}
- {\tl_gset:Nn \eb@before@addbitoc@hook {#2}}
- {\tl_gput_right:Nn \eb@before@addbitoc@hook {#2}}
+ {\tl_gset:Nn \eb@before@bitocline@hook {#2}}
+ {\tl_gput_right:Nn \eb@before@bitocline@hook {#2}}
}
+\cs_set_eq:NN \BeforeAddBitoc \BeforeAddtoBitoc
\cs_new_protected:Npn \CTEX@addbitocline #1#2
{
\group_begin:
\def\CTEX@prechapter{\CTEX@prebichapter}
\def\CTEX@thechapter{\CTEX@bichapter@number}
\def\CTEX@postchapter{\CTEX@postbichapter}
- \eb@before@addbitoc@hook
+ \eb@before@bitocline@hook
\tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix }
{ \addcontentsline{toc}{#1} }
{ \addcontentsline{tec}{#1} }
@@ -1332,7 +1340,7 @@
}
}
-\ctex_define:nn { style }
+\ctex_define:nn { tools }
{
hyphen-figure .tl_set:N = \l__eb_hyphen_figure_tl,
hyphen-table .tl_set:N = \l__eb_hyphen_table_tl,
@@ -1344,7 +1352,7 @@
hyphen-listing = #1,hyphen-equation = #1
},
hyphen-every .initial:n = .,
- unknown .code:n = \eb_msg_deprecated_option:n { style }
+ unknown .code:n = \eb_msg_deprecated_option:n { tools }
}
\eb_seq_map_inline:nn
{ figure,table,lstlisting,equation }
@@ -1559,6 +1567,7 @@
#1/tocformat .tl_set:c = l__eb_toc_#1_format_tl,
#1/tocformat+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
#1/tocformat~+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
+ #1/tocformat* .tl_set:c = l__eb_toc_#1_entry_nolabel_tl,
#1/tocindent .tl_set:c = l__eb_toc_#1_indent_tl,
#1/toclabel .cs_set:cp = { eb_toc_entry_#1:nnn } ##1##2##3,
#1/tocrule .tl_set:c = l__eb_toc_#1_rule_tl,
@@ -1584,7 +1593,8 @@
{#2}
[\tl_use:c { l__eb_toc_#2_indent_tl }]
{\tl_use:c { l__eb_toc_#2_format_tl }}
- {\use:c { eb_toc_entry_#2:nnn } { \thecontentslabel } {#2} {#1}}{}
+ {\use:c { eb_toc_entry_#2:nnn } { \thecontentslabel } {#2} {#1}}
+ {\tl_use:c { l__eb_toc_#2_entry_nolabel_tl }}
{\tl_use:c { l__eb_toc_#2_rule_tl }}
[\tl_use:c { l__eb_toc_#2_below_tl }]
}
@@ -1611,7 +1621,7 @@
{
\IfBooleanT{#1}
{
- \ctex_set:nn { tocset } { between = { },bibetween = { } }
+ \ctex_set:nn { toc } { between = { },bibetween = { } }
\tl_set:Nn \l__eb_toc_tmpa_tl {*}
\tl_set:Nn \l__eb_toc_tmpb_tl
{
@@ -1644,7 +1654,7 @@
\eb_seq_map_inline:nn
{ tocafter,tocindent,tocrule }
{
- \ctex_define:nn { tocset }
+ \ctex_define:nn { toc }
{
#1-every .code:n =
{
@@ -1657,7 +1667,7 @@
}
}
}
-\ctex_define:nn { tocset }
+\ctex_define:nn { toc }
{
lolskip .skip_set:N = \eb@toc@lol@skip,
lolskip .initial:n = 10pt,
@@ -1673,7 +1683,7 @@
hang .initial:n = true,
pagenumwd .code:n = \contentsmargin{#1},
pagenumwd .initial:n = 1.55em,
- unknown .code:n = \eb_msg_deprecated_option:n { tocset }
+ unknown .code:n = \eb_msg_deprecated_option:n { toc }
}
\NewDocumentCommand{\tocrule}{st-O{0.7pc}d()mO{}}
{
@@ -1769,7 +1779,7 @@
\ctex_assign_heading_name:nn { biappendix } {#1}
\bool_if:NTF \l__eb_class_mode_book_bool
{
- \eb_preto_cmd:nn { eb@before@addbitoc@hook }
+ \eb_preto_cmd:nn { eb@before@bitocline@hook }
{
\def\CTEX@prechapter{\CTEX@prebiappendix}
\def\CTEX@thechapter{#2}
@@ -1795,40 +1805,40 @@
}
}
-\ctex_define:nn { subfont }
+\ctex_define:nn { font }
{
- caption-table .tl_set:N = \l__eb_subfont_caption_table_tl,
- caption-figure .tl_set:N = \l__eb_subfont_caption_figure_tl,
- caption-listing .tl_set:N = \l__eb_subfont_caption_listing_tl,
+ caption-table .tl_set:N = \l__eb_font_caption_table_tl,
+ caption-figure .tl_set:N = \l__eb_font_caption_figure_tl,
+ caption-listing .tl_set:N = \l__eb_font_caption_listing_tl,
caption-every .meta:n =
{
caption-table = #1,caption-figure = #1,
caption-listing = #1
},
caption-every .initial:n = \sffamily\small,
- footnote .tl_set:N = \eb@subfont@footnote,
+ footnote .tl_set:N = \eb@font@footnote,
marginpar .tl_set:N = \marginfont,
marginpar .initial:n = \footnotesize,
- unknown .code:n = \eb_msg_deprecated_option:n { subfont }
+ unknown .code:n = \eb_msg_deprecated_option:n { font }
}
-\cs_new_protected:Npn \addtosubfont #1#2
+\cs_new_protected:Npn \ebaddtofont #1#2
{
\str_case:nnF {#1}
{
{ table }
- { \tl_put_right:Nn \l__eb_subfont_caption_table_tl {#2} }
+ { \tl_put_right:Nn \l__eb_font_caption_table_tl {#2} }
{ figure }
- { \tl_put_right:Nn \l__eb_subfont_caption_figure_tl {#2} }
+ { \tl_put_right:Nn \l__eb_font_caption_figure_tl {#2} }
{ listing }
- { \tl_put_right:Nn \l__eb_subfont_caption_listing_tl {#2} }
+ { \tl_put_right:Nn \l__eb_font_caption_listing_tl {#2} }
{ every }
{
- \tl_put_right:Nn \l__eb_subfont_caption_table_tl {#2}
- \tl_put_right:Nn \l__eb_subfont_caption_figure_tl {#2}
- \tl_put_right:Nn \l__eb_subfont_caption_listing_tl {#2}
+ \tl_put_right:Nn \l__eb_font_caption_table_tl {#2}
+ \tl_put_right:Nn \l__eb_font_caption_figure_tl {#2}
+ \tl_put_right:Nn \l__eb_font_caption_listing_tl {#2}
}
}
- { \tl_put_right:cn { l__eb_subfont_#1_tl } {#2} }
+ { \tl_put_right:cn { l__eb_font_#1_tl } {#2} }
}
\ctex_define:nn { spread }
{
@@ -1890,7 +1900,7 @@
\DeclareCaptionFont{eb@#1@font}
{
\setspread{\fp_use:c { l__eb_spread_caption_#1_fp }}
- \tl_use:c { l__eb_subfont_caption_#1_tl }
+ \tl_use:c { l__eb_font_caption_#1_tl }
}
}
\captionsetup
@@ -1973,7 +1983,7 @@
\SetEnumitemValue{ref}{enumii}{\arabic{enumi}.\alph*}
\SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*}
\setlist{nosep,labelsep = 0.5em,listparindent = \parindent}
-\setlist[1]{leftmargin = *,align = left,mode = unboxed}
+\setlist[1]{leftmargin = *,align = left}
\setlist[itemize,1]{label = bullet}
\setlist[itemize,2]{label = endash}
\setlist[itemize,3]{label = asterisk}
@@ -2068,8 +2078,12 @@
\cs_set_eq:NN \eb@declaretheoremsyle@save \declaretheoremstyle
\RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}}
{\eb@declaretheoremsyle@save[#1,#3]{#2}}
- \ctex_define:nn { thmset }
- { unknown .code:n = \eb_msg_deprecated_option:n { thmset } }
+ \ctex_define:nn { thmt }
+ {
+ loeskip .skip_set:N = \eb@thmt@loe@skip,
+ loeskip .initial:n = 10pt,
+ unknown .code:n = \eb_msg_deprecated_option:n { thmt }
+ }
\declaretheoremstyle{default}[
spaceabove = 0ex plus .1ex,
spacebelow = 0ex plus .1ex,
@@ -2082,6 +2096,35 @@
]
\theoremstyle{default}
\cs_undefine:N \proof
+ \DeclareFloatList{theorem}{loe}
+ \eb_preto_cmd:nn { listoftheorems }
+ {
+ \group_begin:
+ \def\contentsline #1 {\use:c { thmt@contentsline@#1 }{#1}}
+ }
+ \eb_appto_cmd:nn { listoftheorems } { \group_end: }
+ \eb_preto_cmd:nn { @chapter }
+ {
+ \skip_if_eq:nnF { \eb@thmt@loe@skip } { \c_zero_skip }
+ { \addtocontents{loe}{\protect\addvspace{\skip_use:N \eb@thmt@loe@skip}} }
+ }
+ \def\thmtlo@chaptervspacehack{}
+ \def\thmtname{\thmt@thmname}
+ \def\thmtenvname{\thmt@envname}
+ \def\thmtnote{\thmt@shortoptarg}
+ \def\thmtformatoptarg #1 {#1}
+ \def\thmtifname #1#2 {\ifbool{thmt@isstarred}{#2}{#1}}
+ \def\thmtifnote #1#2
+ {
+ \tl_if_empty:NTF \thmt@shortoptarg
+ {#2}
+ { \protect\thmtformatoptarg{#1} }
+ }
+ \NewDocumentCommand{\settheoremtocline}{smm}
+ {
+ \IfBooleanT{#1}{\def\thmt@contentslineIgnore{\thmt@contentsline}}
+ \cs_set:cpn { ll@#2 } {#3}
+ }
}
\setchemformula
@@ -2132,7 +2175,7 @@
{ \file_if_exist_input:n { eb-tcolorbox.cfg } }
\bool_set_true:N \l__eb_backend_bibtex_bool
-\ctex_define:nn { bibset }
+\ctex_define:nn { bib }
{
backend .choice:,
backend .value_required:n = true,
@@ -2144,7 +2187,7 @@
datafile .clist_set:N = \l__eb_bib_datafile_clist,
bititle .tl_set:N = \eb@bib@bitoc@title,
bititle .initial:n = Bibliography,
- unknown .code:n = \eb_msg_deprecated_option:n { bibset }
+ unknown .code:n = \eb_msg_deprecated_option:n { bib }
}
\cs_new_protected:Npn \eb_bibtex_natbib_set:
@@ -2273,9 +2316,9 @@
\cs_new_protected:Npn \eb_define_theme_color:n #1
{ \definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1} }
\cs_new_protected:Npn \DeclareLinkColor #1
- { \ctex_define:nx { refset } { \eb_link_color_set:n {#1} } }
+ { \ctex_define:nx { ref } { \eb_link_color_set:n {#1} } }
\cs_new_protected:Npn \DeclareThemeColor #1
- { \ctex_define:nx { style } { \eb_theme_color_set:n {#1} } }
+ { \ctex_define:nx { tools } { \eb_theme_color_set:n {#1} } }
\cs_new_protected:Npn \eb_color_assign_cmd_set:nn #1#2
{
\cs_new:cpn { eb_#2_color_set:n } ##1
@@ -2295,7 +2338,7 @@
{ color } { theme }
}
{ \eb_color_assign_cmd_set:nn #1 }
-\ctex_define:nx { refset }
+\ctex_define:nx { ref }
{
linkcolor .choice:,
linkcolor .value_required:n = true,
@@ -2310,7 +2353,7 @@
linkcolor .initial:n = navyblue,
linkcolor-every .code:n = \eb_define_link_color:n { \exp_not:n {#1} }
}
-\ctex_define:nx { style }
+\ctex_define:nx { tools }
{
color .choice:,
color .value_required:n = true,
@@ -2340,7 +2383,7 @@
{ \eb_set_hyperref:n { colorlinks } }
\cs_new_protected:Npn \eb_link_toc_put:n #1
{ \eb_set_hyperref:n { linktoc = #1 } }
-\ctex_define:nn { refset }
+\ctex_define:nn { ref }
{
linktype .choice:,
linktype .value_required:n = true,
@@ -2353,14 +2396,8 @@
linktoc .value_required:n = true,
linktoc/unknown .code:n = \eb_link_toc_put:n {#1},
linktoc .initial:n = all,
- unknown .code:n =
- {
- \eb_set_hyperref:x
- {
- \str_use:N \l_keys_key_str
- \tl_if_empty:NF \l_keys_value_tl { = \exp_not:n { {#1} } }
- }
- }
+ unknown .code:n = \eb_set_hyperref:x { \eb_unknown_kv_handle: },
+ unknown .default:V = \c_novalue_tl
}
\cs_new_protected:Npn \eb_allow_url_break:
@@ -2418,7 +2455,8 @@
\ctex_define:n
{
lstlistlistingname .tl_set:N = \listlstlistingname,
- lstlistingname .tl_set:N = \lstlistingname
+ lstlistingname .tl_set:N = \lstlistingname,
+ listtheoremname .tl_set:N = \listtheoremname
}
\tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
{
@@ -2428,7 +2466,8 @@
listfigurename = 插图清单,
listtablename = 附表清单,
lstlistlistingname = 代码清单,
- lstlistingname = 代码
+ lstlistingname = 代码,
+ listtheoremname = 定理清单
}
}
{
@@ -2440,7 +2479,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/04/22}{2024aw}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/04/24}{2024az}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty
index 1ec8b9ca6c5..c54b6421415 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybase.sty
+++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty
@@ -20,7 +20,7 @@
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2024/04/22}{2024aw}
+\ProvidesExplPackage{easybase}{2024/04/24}{2024az}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -33,6 +33,7 @@
\cs_generate_variant:Nn \ctex_define:nn { nx }
\cs_generate_variant:Nn \eb_set_hyperref:n { x }
\cs_generate_variant:Nn \eb_at_begin_environment:nn { on }
+\cs_generate_variant:Nn \tl_if_novalue:nF { V }
\cs_set_protected:Npn \ctex_define:nn #1
{ \keys_define:nn { ctex/#1 } }
@@ -96,7 +97,7 @@
{\IfFileExists{#2.sty}{\RequirePackage{#2}[#3]}{}}
{\IfFileExists{#2.sty}{\RequirePackage[#1]{#2}[#3]}{}}
}
-\cs_new_protected:Npn \LoadPackage #1
+\cs_new_protected:Npn \ebloadpackage #1
{
\int_compare:nTF { \clist_count:n {#1} <= 1 }
{ \RequirePackage }
@@ -156,14 +157,20 @@
\seq_set_from_clist:Nn \l__eb_module_paths_seq
{
- style,subfont,spread,
- bibset,thmset,tocset,
- hdrset,refset,geoset,float
+ tools,font,spread,
+ bib,thmt,toc,
+ hdr,ref,geo,float
}
\seq_map_inline:Nn \l__eb_module_paths_seq
{
\ctex_define:n { #1 .meta:nn = { ctex/#1 } {##1} }
- \cs_new_protected:cpn { eb#1 } ##1 { \ctex_set:nn {#1} {##1} }
+ \cs_new_protected:cpn { eb#1set } ##1 { \ctex_set:nn {#1} {##1} }
+ }
+\RenewDocumentCommand{\ctexset}{om}
+ {
+ \IfValueTF{#1}
+ {\ctex_set:nn {#1} {#2}}
+ {\ctex_set:n {#2}}
}
\bool_until_do:nn
{ \int_compare_p:nNn { \seq_count:N \l__eb_module_paths_seq } < { 8 } }
@@ -204,7 +211,7 @@
The~'\string\chapter'\ command~will~not~be~used.
}
-\LoadPackage
+\ebloadpackage
{
[text]{spbmark},
[normalem]{ulem},
@@ -248,7 +255,7 @@
\eb@tag@brackets@right
}
}
-\ctex_define:nn { style }
+\ctex_define:nn { tools }
{
multoc .int_set:N = \l__eb_toc_columns_int,
multoc .default:n = 2,
@@ -277,20 +284,20 @@
marginparsep = 8pt,
marginparwidth = 2.54cm
}
-\ctex_define:nn { geoset }
+\cs_new:Npn \eb_unknown_kv_handle:
+ {
+ \str_use:N \l_keys_key_str
+ \tl_if_novalue:VF \l_keys_value_tl
+ { = {\exp_not:V \l_keys_value_tl} }
+ }
+\ctex_define:nn { geo }
{
headruleskip .tl_set:N = \headruleskip,
headruleskip .initial:n = 0pt,
footruleskip .tl_set:N = \footruleskip,
footruleskip .initial:n = 3.5pt,
- unknown .code:n =
- {
- \exp_args:Nx \geometry
- {
- \str_use:N \l_keys_key_str
- \tl_if_empty:NF \l_keys_value_tl { = \exp_not:n { {#1} } }
- }
- }
+ unknown .code:n = \exp_args:Nx \geometry { \eb_unknown_kv_handle: },
+ unknown .default:V = \c_novalue_tl
}
\cs_new_protected:Npn \blankpagestyle #1
@@ -351,7 +358,7 @@
{ none* } { \text_lowercase:n }
}
}
-\ctex_define:nn { hdrset }
+\ctex_define:nn { hdr }
{
chap-mark .cs_set:Np = \eb@mark@chapter@whole #1,
chap-mark .initial:n =
@@ -433,7 +440,7 @@
\providecommand{\kaishu}{\itshape}
}
-\ctex_define:nn { style }
+\ctex_define:nn { tools }
{
fntnumwith .choices:nn =
{ part,page,chapter }
@@ -589,7 +596,7 @@
\tl_new:N \l__eb_fnmarktext_format_tl
\tl_new:N \l__eb_fncustom_format_tl
\clist_new:N \l__eb_footnote_value_clist
-\ctex_define:nn { hdrset }
+\ctex_define:nn { hdr }
{
fnfirstindent .tl_set:N = \fnfirstindent,
fnfirstindent .initial:n = 1em,
@@ -630,7 +637,7 @@
fntext-num/unknown .code:n = \eb_fnmarktext_short_label_set:Nn \thefootnote {#1},
fnmarktext-num .meta:n = { fntext-num = #1,fnmark-num = #1 },
fnmarktext-num .initial:n = plain,
- unknown .code:n = \eb_msg_deprecated_option:n { hdrset }
+ unknown .code:n = \eb_msg_deprecated_option:n { hdr }
}
\eb_at_end_preamble:n
@@ -756,7 +763,7 @@
{ \reset@font }
{
\setspread{\eb@spread@footnote}
- \eb@subfont@footnote
+ \eb@font@footnote
}
}
\cs_set_eq:NN \eb@@makefntext \@makefntext
@@ -873,7 +880,7 @@
{ \tl_clear:N \l__eb_fnmarktext_format_tl }
}
\bool_if:NF \l__eb_fnmarktext_format_match_bool { \spbset{spcmd = { }} }
- \eb@subfont@footnote
+ \eb@font@footnote
}
\cs_new_protected:Npn \defupfntmark #1
{ \cs_set:Npn \@makefnmark { \hbox:n {#1} } }
@@ -964,7 +971,7 @@
\@addtoreset{#3}{#5}
\IfBooleanF{#1}
{
- \exp_args:Nc \cs_gset:Npn { the#3 }
+ \cs_gset:cpn { the#3 }
{ \use:c { the#5 }#4#2{#3} }
}
}
@@ -978,20 +985,21 @@
\cs_set:Npn \thebisection { \eb_section_counter_prefix:n { bi } }
\cs_set:Npn \thebisubsection { \thebisection.\@arabic\c@bisubsection }
\cs_set:Npn \thesection { \eb_section_counter_prefix:n { } }
-\tl_new:N \eb@before@addbitoc@hook
-\NewDocumentCommand{\BeforeAddBitoc}{sm}
+\tl_new:N \eb@before@bitocline@hook
+\NewDocumentCommand{\BeforeAddtoBitoc}{sm}
{
\IfBooleanTF{#1}
- {\tl_gset:Nn \eb@before@addbitoc@hook {#2}}
- {\tl_gput_right:Nn \eb@before@addbitoc@hook {#2}}
+ {\tl_gset:Nn \eb@before@bitocline@hook {#2}}
+ {\tl_gput_right:Nn \eb@before@bitocline@hook {#2}}
}
+\cs_set_eq:NN \BeforeAddBitoc \BeforeAddtoBitoc
\cs_new_protected:Npn \CTEX@addbitocline #1#2
{
\group_begin:
\def\CTEX@prechapter{\CTEX@prebichapter}
\def\CTEX@thechapter{\CTEX@bichapter@number}
\def\CTEX@postchapter{\CTEX@postbichapter}
- \eb@before@addbitoc@hook
+ \eb@before@bitocline@hook
\tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix }
{ \addcontentsline{toc}{#1} }
{ \addcontentsline{tec}{#1} }
@@ -1055,7 +1063,7 @@
}
}
-\ctex_define:nn { style }
+\ctex_define:nn { tools }
{
hyphen-figure .tl_set:N = \l__eb_hyphen_figure_tl,
hyphen-table .tl_set:N = \l__eb_hyphen_table_tl,
@@ -1067,7 +1075,7 @@
hyphen-listing = #1,hyphen-equation = #1
},
hyphen-every .initial:n = .,
- unknown .code:n = \eb_msg_deprecated_option:n { style }
+ unknown .code:n = \eb_msg_deprecated_option:n { tools }
}
\eb_seq_map_inline:nn
{ figure,table,lstlisting,equation }
@@ -1282,6 +1290,7 @@
#1/tocformat .tl_set:c = l__eb_toc_#1_format_tl,
#1/tocformat+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
#1/tocformat~+ .code:n = \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1},
+ #1/tocformat* .tl_set:c = l__eb_toc_#1_entry_nolabel_tl,
#1/tocindent .tl_set:c = l__eb_toc_#1_indent_tl,
#1/toclabel .cs_set:cp = { eb_toc_entry_#1:nnn } ##1##2##3,
#1/tocrule .tl_set:c = l__eb_toc_#1_rule_tl,
@@ -1307,7 +1316,8 @@
{#2}
[\tl_use:c { l__eb_toc_#2_indent_tl }]
{\tl_use:c { l__eb_toc_#2_format_tl }}
- {\use:c { eb_toc_entry_#2:nnn } { \thecontentslabel } {#2} {#1}}{}
+ {\use:c { eb_toc_entry_#2:nnn } { \thecontentslabel } {#2} {#1}}
+ {\tl_use:c { l__eb_toc_#2_entry_nolabel_tl }}
{\tl_use:c { l__eb_toc_#2_rule_tl }}
[\tl_use:c { l__eb_toc_#2_below_tl }]
}
@@ -1334,7 +1344,7 @@
{
\IfBooleanT{#1}
{
- \ctex_set:nn { tocset } { between = { },bibetween = { } }
+ \ctex_set:nn { toc } { between = { },bibetween = { } }
\tl_set:Nn \l__eb_toc_tmpa_tl {*}
\tl_set:Nn \l__eb_toc_tmpb_tl
{
@@ -1367,7 +1377,7 @@
\eb_seq_map_inline:nn
{ tocafter,tocindent,tocrule }
{
- \ctex_define:nn { tocset }
+ \ctex_define:nn { toc }
{
#1-every .code:n =
{
@@ -1380,7 +1390,7 @@
}
}
}
-\ctex_define:nn { tocset }
+\ctex_define:nn { toc }
{
lolskip .skip_set:N = \eb@toc@lol@skip,
lolskip .initial:n = 10pt,
@@ -1396,7 +1406,7 @@
hang .initial:n = true,
pagenumwd .code:n = \contentsmargin{#1},
pagenumwd .initial:n = 1.55em,
- unknown .code:n = \eb_msg_deprecated_option:n { tocset }
+ unknown .code:n = \eb_msg_deprecated_option:n { toc }
}
\NewDocumentCommand{\tocrule}{st-O{0.7pc}d()mO{}}
{
@@ -1492,7 +1502,7 @@
\ctex_assign_heading_name:nn { biappendix } {#1}
\bool_if:NTF \l__eb_class_mode_book_bool
{
- \eb_preto_cmd:nn { eb@before@addbitoc@hook }
+ \eb_preto_cmd:nn { eb@before@bitocline@hook }
{
\def\CTEX@prechapter{\CTEX@prebiappendix}
\def\CTEX@thechapter{#2}
@@ -1518,40 +1528,40 @@
}
}
-\ctex_define:nn { subfont }
+\ctex_define:nn { font }
{
- caption-table .tl_set:N = \l__eb_subfont_caption_table_tl,
- caption-figure .tl_set:N = \l__eb_subfont_caption_figure_tl,
- caption-listing .tl_set:N = \l__eb_subfont_caption_listing_tl,
+ caption-table .tl_set:N = \l__eb_font_caption_table_tl,
+ caption-figure .tl_set:N = \l__eb_font_caption_figure_tl,
+ caption-listing .tl_set:N = \l__eb_font_caption_listing_tl,
caption-every .meta:n =
{
caption-table = #1,caption-figure = #1,
caption-listing = #1
},
caption-every .initial:n = \sffamily\small,
- footnote .tl_set:N = \eb@subfont@footnote,
+ footnote .tl_set:N = \eb@font@footnote,
marginpar .tl_set:N = \marginfont,
marginpar .initial:n = \footnotesize,
- unknown .code:n = \eb_msg_deprecated_option:n { subfont }
+ unknown .code:n = \eb_msg_deprecated_option:n { font }
}
-\cs_new_protected:Npn \addtosubfont #1#2
+\cs_new_protected:Npn \ebaddtofont #1#2
{
\str_case:nnF {#1}
{
{ table }
- { \tl_put_right:Nn \l__eb_subfont_caption_table_tl {#2} }
+ { \tl_put_right:Nn \l__eb_font_caption_table_tl {#2} }
{ figure }
- { \tl_put_right:Nn \l__eb_subfont_caption_figure_tl {#2} }
+ { \tl_put_right:Nn \l__eb_font_caption_figure_tl {#2} }
{ listing }
- { \tl_put_right:Nn \l__eb_subfont_caption_listing_tl {#2} }
+ { \tl_put_right:Nn \l__eb_font_caption_listing_tl {#2} }
{ every }
{
- \tl_put_right:Nn \l__eb_subfont_caption_table_tl {#2}
- \tl_put_right:Nn \l__eb_subfont_caption_figure_tl {#2}
- \tl_put_right:Nn \l__eb_subfont_caption_listing_tl {#2}
+ \tl_put_right:Nn \l__eb_font_caption_table_tl {#2}
+ \tl_put_right:Nn \l__eb_font_caption_figure_tl {#2}
+ \tl_put_right:Nn \l__eb_font_caption_listing_tl {#2}
}
}
- { \tl_put_right:cn { l__eb_subfont_#1_tl } {#2} }
+ { \tl_put_right:cn { l__eb_font_#1_tl } {#2} }
}
\ctex_define:nn { spread }
{
@@ -1613,7 +1623,7 @@
\DeclareCaptionFont{eb@#1@font}
{
\setspread{\fp_use:c { l__eb_spread_caption_#1_fp }}
- \tl_use:c { l__eb_subfont_caption_#1_tl }
+ \tl_use:c { l__eb_font_caption_#1_tl }
}
}
\captionsetup
@@ -1696,7 +1706,7 @@
\SetEnumitemValue{ref}{enumii}{\arabic{enumi}.\alph*}
\SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*}
\setlist{nosep,labelsep = 0.5em,listparindent = \parindent}
-\setlist[1]{leftmargin = *,align = left,mode = unboxed}
+\setlist[1]{leftmargin = *,align = left}
\setlist[itemize,1]{label = bullet}
\setlist[itemize,2]{label = endash}
\setlist[itemize,3]{label = asterisk}
@@ -1791,8 +1801,12 @@
\cs_set_eq:NN \eb@declaretheoremsyle@save \declaretheoremstyle
\RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}}
{\eb@declaretheoremsyle@save[#1,#3]{#2}}
- \ctex_define:nn { thmset }
- { unknown .code:n = \eb_msg_deprecated_option:n { thmset } }
+ \ctex_define:nn { thmt }
+ {
+ loeskip .skip_set:N = \eb@thmt@loe@skip,
+ loeskip .initial:n = 10pt,
+ unknown .code:n = \eb_msg_deprecated_option:n { thmt }
+ }
\declaretheoremstyle{default}[
spaceabove = 0ex plus .1ex,
spacebelow = 0ex plus .1ex,
@@ -1805,6 +1819,35 @@
]
\theoremstyle{default}
\cs_undefine:N \proof
+ \DeclareFloatList{theorem}{loe}
+ \eb_preto_cmd:nn { listoftheorems }
+ {
+ \group_begin:
+ \def\contentsline #1 {\use:c { thmt@contentsline@#1 }{#1}}
+ }
+ \eb_appto_cmd:nn { listoftheorems } { \group_end: }
+ \eb_preto_cmd:nn { @chapter }
+ {
+ \skip_if_eq:nnF { \eb@thmt@loe@skip } { \c_zero_skip }
+ { \addtocontents{loe}{\protect\addvspace{\skip_use:N \eb@thmt@loe@skip}} }
+ }
+ \def\thmtlo@chaptervspacehack{}
+ \def\thmtname{\thmt@thmname}
+ \def\thmtenvname{\thmt@envname}
+ \def\thmtnote{\thmt@shortoptarg}
+ \def\thmtformatoptarg #1 {#1}
+ \def\thmtifname #1#2 {\ifbool{thmt@isstarred}{#2}{#1}}
+ \def\thmtifnote #1#2
+ {
+ \tl_if_empty:NTF \thmt@shortoptarg
+ {#2}
+ { \protect\thmtformatoptarg{#1} }
+ }
+ \NewDocumentCommand{\settheoremtocline}{smm}
+ {
+ \IfBooleanT{#1}{\def\thmt@contentslineIgnore{\thmt@contentsline}}
+ \cs_set:cpn { ll@#2 } {#3}
+ }
}
\setchemformula
@@ -1855,7 +1898,7 @@
{ \file_if_exist_input:n { eb-tcolorbox.cfg } }
\bool_set_true:N \l__eb_backend_bibtex_bool
-\ctex_define:nn { bibset }
+\ctex_define:nn { bib }
{
backend .choice:,
backend .value_required:n = true,
@@ -1867,7 +1910,7 @@
datafile .clist_set:N = \l__eb_bib_datafile_clist,
bititle .tl_set:N = \eb@bib@bitoc@title,
bititle .initial:n = Bibliography,
- unknown .code:n = \eb_msg_deprecated_option:n { bibset }
+ unknown .code:n = \eb_msg_deprecated_option:n { bib }
}
\cs_new_protected:Npn \eb_bibtex_natbib_set:
@@ -1996,9 +2039,9 @@
\cs_new_protected:Npn \eb_define_theme_color:n #1
{ \definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1} }
\cs_new_protected:Npn \DeclareLinkColor #1
- { \ctex_define:nx { refset } { \eb_link_color_set:n {#1} } }
+ { \ctex_define:nx { ref } { \eb_link_color_set:n {#1} } }
\cs_new_protected:Npn \DeclareThemeColor #1
- { \ctex_define:nx { style } { \eb_theme_color_set:n {#1} } }
+ { \ctex_define:nx { tools } { \eb_theme_color_set:n {#1} } }
\cs_new_protected:Npn \eb_color_assign_cmd_set:nn #1#2
{
\cs_new:cpn { eb_#2_color_set:n } ##1
@@ -2018,7 +2061,7 @@
{ color } { theme }
}
{ \eb_color_assign_cmd_set:nn #1 }
-\ctex_define:nx { refset }
+\ctex_define:nx { ref }
{
linkcolor .choice:,
linkcolor .value_required:n = true,
@@ -2033,7 +2076,7 @@
linkcolor .initial:n = navyblue,
linkcolor-every .code:n = \eb_define_link_color:n { \exp_not:n {#1} }
}
-\ctex_define:nx { style }
+\ctex_define:nx { tools }
{
color .choice:,
color .value_required:n = true,
@@ -2063,7 +2106,7 @@
{ \eb_set_hyperref:n { colorlinks } }
\cs_new_protected:Npn \eb_link_toc_put:n #1
{ \eb_set_hyperref:n { linktoc = #1 } }
-\ctex_define:nn { refset }
+\ctex_define:nn { ref }
{
linktype .choice:,
linktype .value_required:n = true,
@@ -2076,14 +2119,8 @@
linktoc .value_required:n = true,
linktoc/unknown .code:n = \eb_link_toc_put:n {#1},
linktoc .initial:n = all,
- unknown .code:n =
- {
- \eb_set_hyperref:x
- {
- \str_use:N \l_keys_key_str
- \tl_if_empty:NF \l_keys_value_tl { = \exp_not:n { {#1} } }
- }
- }
+ unknown .code:n = \eb_set_hyperref:x { \eb_unknown_kv_handle: },
+ unknown .default:V = \c_novalue_tl
}
\cs_new_protected:Npn \eb_allow_url_break:
@@ -2141,7 +2178,8 @@
\ctex_define:n
{
lstlistlistingname .tl_set:N = \listlstlistingname,
- lstlistingname .tl_set:N = \lstlistingname
+ lstlistingname .tl_set:N = \lstlistingname,
+ listtheoremname .tl_set:N = \listtheoremname
}
\tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
{
@@ -2151,7 +2189,8 @@
listfigurename = 插图清单,
listtablename = 附表清单,
lstlistlistingname = 代码清单,
- lstlistingname = 代码
+ lstlistingname = 代码,
+ listtheoremname = 定理清单
}
}
{
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 0cbf6efe167..76926ae746e 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -20,7 +20,7 @@
%% This work has the LPPL maintenance status `maintained'.
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2024/04/22}{2024aw}
+\ProvidesExplClass{easybook}{2024/04/24}{2024az}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
index 48cd0cc7d07..2df24f8bd55 100644
--- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
+++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
@@ -18,7 +18,7 @@
%% LaTeX version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/04/22}{2024aw}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/04/24}{2024az}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2