summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-12-09 03:01:08 +0000
committerNorbert Preining <norbert@preining.info>2021-12-09 03:01:08 +0000
commit48aad54f9d8faf7776248c653b2a7da9bb2ffa95 (patch)
tree4b115380a5294d8a91bd4af25ddbe9b99c9ceb9f /macros
parent0bfca40c9f89076ad634464a530fcc3e55d1d4e1 (diff)
CTAN sync 202112090301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx168
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin586391 -> 590568 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex111
3 files changed, 159 insertions, 120 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index e2a2605b37..f8f3e85ddb 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/12/06}{1.41I}
+\ProvidesExplClass{easybook}{2021/12/08}{1.41L}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -39,6 +39,7 @@
font .value_required:n = true,
font .initial:n = auto,
cjkfont .code:n = \eb_put_ctexbook:n { fontset = #1 },
+ paper .code:n = \PassOptionsToPackage{#1}{geometry},
mathfont .choices:nn =
{
noto,notosans,times,libertine,
@@ -47,9 +48,6 @@
{ \tl_set:Nn \l__eb_mathfont_choice_tl {#1} },
mathfont .value_required:n = true,
mathfont .initial:n = times,
- paper .choice:,
- paper .value_required:n = true,
- paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry},
class .choice:,
class .value_required:n = true,
class/book .code:n = { },
@@ -321,7 +319,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/12/06}{1.41I}
+\ProvidesExplPackage{easybase}{2021/12/08}{1.41L}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -431,9 +429,7 @@
floatpage .bool_set:N = \l__eb_float_page_bool,
floatpage .default:n = true,
floatpage .initial:n = false,
- paper .choice:,
- paper .value_required:n = true,
- paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry},
+ paper .code:n = \PassOptionsToPackage{#1}{geometry},
paper .initial:n = a4paper,
class .choice:,
class .value_required:n = true,
@@ -1080,10 +1076,10 @@
}
}
\eb_patch_cmd:wnn { \@footnotetext,\@mpfootnotetext }
- { \reset@font }
+ { \footnotesize }
{
\setspread{\fp_use:N \l__eb_spread_footnote_fp}
- \l__eb_subfont_footnote_tl
+ \tl_use:N \l__eb_subfont_footnote_tl
}
\ctex_at_end_package:nn { hyperref }
{
@@ -1212,7 +1208,7 @@
\ctex_define:n { figure/#1 .meta:nn = { ctex/#1 } {##1} }
\ctex_define:n { table/#1 .meta:nn = { ctex/#1 } {##1} }
\ctex_define:n { list/#1 .meta:nn = { ctex/#1 } {##1} }
-\cs_new_protected:Npn \eb_titletoc_hang_fix:n #1
+\cs_new_protected:Npn \eb_titletoc_if_hang_fix:n #1
{
\bool_if:NT \eb@titletoc@hang@fix@bool
{
@@ -1239,7 +1235,7 @@
\titlecontents{#1}
[\dim_use:c { l__eb_toc_#1_indent_dim }]
{\tl_use:c { l__eb_toc_#1_format_tl }}
- {\eb_titletoc_hang_fix:n {#1}}{}
+ {\eb_titletoc_if_hang_fix:n {#1}}{}
{\tl_use:c { l__eb_toc_#1_rule_tl }}
}
\seq_map_function:NN
@@ -1273,7 +1269,7 @@
{
\ctex_define:nn { tocset }
{
- #1-all .code:n =
+ #1-every .code:n =
{
\ctex_set:n
{
@@ -1302,8 +1298,8 @@
hang .bool_set:N = \eb@titletoc@hang@fix@bool,
hang .default:n = true,
hang .initial:n = false,
- pnumwd .code:n = \contentsmargin{#1},
- pnumwd .initial:n = 1.55em,
+ pagenumwd .code:n = \contentsmargin{#1},
+ pagenumwd .initial:n = 1.55em,
unknown .code:n = \eb_msg_abandon_option:n { tocset }
}
\NewDocumentCommand{\tocrule}{st-O{0.7pc}D(){1.2}mO{}}
@@ -1378,7 +1374,7 @@
figure/tocline = \listnumberline{figure},
lstlisting/tocline = \listnumberline{lstlisting}
}
-\ctex_set:nn { tocset } { tocafter-all = \hspace{1em} }
+\ctex_set:nn { tocset } { tocafter-every = \hspace{1em} }
\prop_new:N \l__eb_list_label_entry_prop
\prop_set_from_keyval:Nn \l__eb_list_label_entry_prop
{
@@ -1498,16 +1494,16 @@
\ctex_define:nn { style }
{
- figure-connect .tl_set:N = \l__eb_figure_connector_tl,
- table-connect .tl_set:N = \l__eb_table_connector_tl,
- listing-connect .tl_set:N = \l__eb_lstlisting_connector_tl,
- equation-connect .tl_set:N = \l__eb_equation_connector_tl,
- connect-all .meta:n =
+ connect-figure .tl_set:N = \l__eb_connect_figure_tl,
+ connect-table .tl_set:N = \l__eb_connect_table_tl,
+ connect-listing .tl_set:N = \l__eb_connect_lstlisting_tl,
+ connect-equation .tl_set:N = \l__eb_connect_equation_tl,
+ connect-every .meta:n =
{
- figure-connect = #1,table-connect = #1,
- listing-connect = #1,equation-connect = #1
+ connect-figure = #1,connect-table = #1,
+ connect-listing = #1,connect-equation = #1
},
- connect-all .initial:n = { . },
+ connect-every .initial:n = { . },
unknown .code:n = \eb_msg_abandon_option:n { style }
}
\eb_seq_map_inline:nn
@@ -1518,7 +1514,7 @@
\int_compare:nNnT { \c@chapter } > { 0 }
{
\thechapter
- \tl_use:c { l__eb_#1_connector_tl }
+ \tl_use:c { l__eb_connect_#1_tl }
}
\int_to_arabic:v { c@#1 }
}
@@ -1724,71 +1720,96 @@
}
}
-\tl_new:N \l__eb_subfont_table_tl
-\tl_new:N \l__eb_subfont_figure_tl
-\tl_new:N \l__eb_subfont_listing_tl
-\tl_new:N \l__eb_subfont_footnote_tl
-
\ctex_define:nn { subfont }
{
- caption-table .tl_set:N = \l__eb_subfont_table_tl,
- caption-figure .tl_set:N = \l__eb_subfont_figure_tl,
- caption-listing .tl_set:N = \l__eb_subfont_listing_tl,
- caption .meta:n =
+ caption-table .tl_set:N = \l__eb_subfont_cap_table_tl,
+ caption-figure .tl_set:N = \l__eb_subfont_cap_figure_tl,
+ caption-listing .tl_set:N = \l__eb_subfont_cap_listing_tl,
+ caption-every .meta:n =
{
caption-table = #1,caption-figure = #1,
caption-listing = #1
},
- caption .initial:n = \sffamily\small,
+ caption-every .initial:n = \sffamily\small,
footnote .tl_set:N = \l__eb_subfont_footnote_tl,
- footnote .initial:n = \rmfamily,
- marginpar .tl_set:N = \marginfont,
+ footnote .initial:n = \rmfamily\footnotesize,
+ marginpar .tl_set:N = \l__eb_subfont_marginpar_tl,
marginpar .initial:n = \rmfamily\footnotesize,
unknown .code:n = \eb_msg_abandon_option:n { subfont }
}
-
-\fp_new:N \l__eb_spread_table_fp
-\fp_new:N \l__eb_spread_math_fp
-\fp_new:N \l__eb_spread_caption_fp
-\fp_new:N \l__eb_spread_footnote_fp
-
+\cs_new_protected:Npn \addsubfont #1#2
+ {
+ \str_case:nnF {#1}
+ {
+ { table }
+ { \tl_put_right:Nn \l__eb_subfont_cap_table_tl {#2} }
+ { figure }
+ { \tl_put_right:Nn \l__eb_subfont_cap_figure_tl {#2} }
+ { listing }
+ { \tl_put_right:Nn \l__eb_subfont_cap_listing_tl {#2} }
+ { every }
+ {
+ \tl_put_right:Nn \l__eb_subfont_cap_table_tl {#2}
+ \tl_put_right:Nn \l__eb_subfont_cap_figure_tl {#2}
+ \tl_put_right:Nn \l__eb_subfont_cap_listing_tl {#2}
+ }
+ }
+ { \tl_put_right:cn { l__eb_subfont_#1_tl } {#2} }
+ }
\ctex_define:nn { spread }
{
- line .code:n = \AfterPreamble{\setspread{#1}},
- line .initial:n = 1.354,
- table .fp_set:N = \l__eb_spread_table_fp,
- table .initial:n = 1.354,
- math .fp_set:N = \l__eb_spread_math_fp,
- math .initial:n = 1.2,
- caption .fp_set:N = \l__eb_spread_caption_fp,
- caption .initial:n = 1.2,
- footnote .fp_set:N = \l__eb_spread_footnote_fp,
- footnote .initial:n = 1.2,
- spread-all .meta:n = { line = #1,table = #1,math = #1,caption = #1,footnote = #1 },
+ line .code:n = \AfterPreamble{\setspread{#1}},
+ line .initial:n = 1.354,
+ table .fp_set:N = \l__eb_spread_table_fp,
+ table .initial:n = 1.354,
+ math .fp_set:N = \l__eb_spread_math_fp,
+ math .initial:n = 1.2,
+ footnote .fp_set:N = \l__eb_spread_footnote_fp,
+ footnote .initial:n = 1.2,
+ caption-table .fp_set:N = \l__eb_spread_cap_table_fp,
+ caption-figure .fp_set:N = \l__eb_spread_cap_figure_fp,
+ caption-listing .fp_set:N = \l__eb_spread_cap_listing_fp,
+ caption-every .meta:n =
+ {
+ caption-table = #1,caption-figure = #1,
+ caption-listing = #1
+ },
+ caption-every .initial:n = 1.2,
+ every .meta:n =
+ {
+ line = #1,table = #1,math = #1,
+ caption-every = #1,footnote = #1
+ },
unknown .code:n = \eb_msg_abandon_option:n { spread }
}
+\tl_gset:Nn \marginfont { \l__eb_subfont_marginpar_tl }
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
-\DeclareCaptionFont{eb@table@font}{\l__eb_subfont_table_tl}
-\DeclareCaptionFont{eb@figure@font}{\l__eb_subfont_figure_tl}
-\DeclareCaptionFont{eb@listing@font}{\l__eb_subfont_listing_tl}
+\eb_seq_map_inline:nn
+ { table,figure,listing }
+ {
+ \DeclareCaptionFont{eb@#1@font}
+ {
+ \setspread{\fp_use:c { l__eb_spread_cap_#1_fp }}
+ \tl_use:c { l__eb_subfont_cap_#1_tl }
+ }
+ }
\captionsetup
{
format = hang,
- font = {stretch = \fp_use:N \l__eb_spread_caption_fp},
labelfont = {color = ctex@frame},
labelsep = quad,
singlelinecheck = true,
belowskip = 0pt,
aboveskip = 10pt
}
-\captionsetup[table]{font += eb@table@font}
-\captionsetup[figure]{font += eb@figure@font}
-\captionsetup[lstlisting]{font += eb@listing@font}
+\captionsetup[table]{font = eb@table@font}
+\captionsetup[figure]{font = eb@figure@font}
+\captionsetup[lstlisting]{font = eb@listing@font}
\captionsetup[subfigure]
{
labelformat = parens,
- font+ = eb@figure@font,
+ font = eb@figure@font,
belowskip = 2pt,
aboveskip = 6pt
}
@@ -2039,13 +2060,16 @@
\c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl }
\exp_last_unbraced:NNV
\declaretheoremstyle[\c__eb_thmtools_entry_clist]{easy-theorem}
- \deftheorem{lemma}{引理}
- \deftheorem{example}{例}
- \deftheorem{theorem}{定理}
- \deftheorem{corollary}{推论}
- \deftheorem{definition}{定义}
- \deftheorem{proposition}{性质}
- \deftheorem{remark}{注}[numbered = no]
+ \deftheorem{exam}{例}
+ \deftheorem{conj}{猜想}
+ \deftheorem{defi}{定义}
+ \deftheorem{prop}{性质}
+ \deftheorem{lemm}{引理}
+ \deftheorem{theo}{定理}
+ \deftheorem{corol}{推论}
+ \deftheorem{assum}{假设}
+ \deftheorem{axiom}{公理}
+ \deftheorem{rema}{注}[numbered = no]
\deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol]
}
@@ -2277,7 +2301,7 @@
\eb_link_color_set:n
linkcolor .default:n = navyblue,
linkcolor .initial:n = navyblue,
- linkcolor-all .code:n = \eb_define_link_color:n { \exp_not:n {#1} }
+ linkcolor-every .code:n = \eb_define_link_color:n { \exp_not:n {#1} }
}
\ctex_define:nx { style }
{
@@ -2292,7 +2316,7 @@
}
\eb_theme_color_set:n
color .initial:n = none,
- color-all .code:n = \eb_define_theme_color:n { \exp_not:n {#1} }
+ color-every .code:n = \eb_define_theme_color:n { \exp_not:n {#1} }
}
\bool_set_false:N \l__eb_toc_number_color_bool
@@ -2417,7 +2441,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/06}{1.41I}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/08}{1.41L}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \setexercise #1
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index aed29d91ad..9d29831242 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index f2796f7684..ffb579a3b0 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -11,7 +11,7 @@
cs => purple,
option => black!10!teal,
cnltx => Blue,
- link => magenta,
+ link => OrangeRed,
module => violet,
meta => black
}
@@ -20,8 +20,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.41I,
- date = 2021/12/06,
+ version = v1.41L,
+ date = 2021/12/08,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = q1jx@foxmail.com,
@@ -47,6 +47,7 @@
\setlist{nosep,labelindent = \parindent,leftmargin = *,labelsep = 0.5em}
\setlist[itemize,1]{label = \small\color{Blue}\textbullet}
\setcounter{tocdepth}{2}
+\SetTblrInner{hline{1,Z} = {1pt,Blue}}
\ExplSyntaxOn\makeatletter
\newcommand{\splitmeta}[2][\code{,}]
@@ -189,7 +190,6 @@
\insertblr
{
colspec = @{}*{5}{c}@{},
- hline{1,6} = {1pt,Blue},
cells = {cmd = \pkg*},
cell{1}{3,4} = brown8,
cell{2}{5} = brown8,
@@ -208,7 +208,7 @@
\section{文档类选项}
\label{sec:document class options}
-文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见小节 \ref{subsec:basic usage} 的例子。目前 \pkg*{easybase} 宏包可用的选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage}。除了下面列举的选项,还可使用标准文档类和 C\TeX 文档类的选项。
+文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见小节 \ref{subsec:basic usage} 的例子。目前 \pkg*{easybase} 宏包可用的选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage}。除了下面列举的选项以外,还支持标准和 C\TeX 文档类的选项。
\begin{options}
\opt{draft}\Default!
开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖于 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见小节 \ref{subsec:box}。
@@ -247,7 +247,6 @@
\insertblr
{
colspec = @{}*{4}{c}@{},
- hline{1,8} = {1pt,Blue},
hline{2} = {0.6pt,Blue},
row{1} = {font = \sffamily},
column{1} = {cmd = \code}
@@ -326,7 +325,7 @@
目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。除了上述选项还支持 C\TeX 键值列表路径 \module*{chapter} 或 \module*{section} 所有的章节标题样式选项。
\end{options}
-\subsection{标题命令}
+\subsection{双语标题}
双语目录标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有独立的计数器\footnote{默认情况下与普通标题命令共享使用计数器。},并对应 \cs*{the}\meta{计数器} 的值,可以用于 \option{binumber} 选项更改英文目录中的编号。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。
\begin{commands}
\command{bichapter}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
@@ -353,7 +352,7 @@
\end{commands}
\subsection{上标和下标}
-上标和下标的功能来自 \pkg*{spbmark} 宏包,\cs{super}、\cs{sub} 和 \cs{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
+上标和下标的功能来自 \pkg*{spbmark} 宏包,下面三个命令可以用于输出上标和下标。它们根据当前处于文本还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
\begin{commands}
\command{super}[\sarg\oarg{垂直偏移}\splitoarg{高度,深度}\darg{格式代码}\marg{内容}\oarg{水平偏移}]
上标命令,与简短命令 \cs{sp} 等效。水平和垂直偏移进行距离微调,可以为带有长度单位的正值或负值,为正值时代表向上或向右移动,否则相反,默认均为 \code{0pt}。\meta{格式代码} 可以插入字体或颜色等命令,代码中的最后一个命令可以接受一个为上标或下标的参数。
@@ -371,7 +370,6 @@
\insertblr
{
colspec = @{}*{5}{c}@{},
- hline{1,5} = {1pt,Blue},
hline{3} = {0.6pt,Blue},
row{1,3} = {font = \sffamily,belowsep = 0pt},
row{2,4} = {cmd = \module*}
@@ -408,7 +406,7 @@
\command{DeclareThemeColor}[\splitmarg{风格名称,ctex@frame,ctex@emph,ctex@verb}]
可以使用 \cs{DeclareThemeColor} 命令声明新的颜色主题,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成颜色主题。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
\end{commands}
- \keyval-{color-all}{HTML颜色代码}\Default
+ \keyval-{color-every}{HTML颜色代码}\Default
统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
\keyval-{multoc}{整数}\Default{2}
使目录多栏排版,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
@@ -436,15 +434,15 @@
\subsubsection{连接符}
\begin{options}
- \keyval-{figure-connect}{图片连接符}\Default{\Carg{.}}
+ \keyval-{connect-figure}{图片连接符}\Default{\Carg{.}}
设置图片题注编号的连接符。
- \keyval-{table-connect}{表格连接符}\Default{\Carg{.}}
+ \keyval-{connect-table}{表格连接符}\Default{\Carg{.}}
设置表格题注编号的连接符。
- \keyval-{listing-connect}{代码连接符}\Default{\Carg{.}}
+ \keyval-{connect-listing}{代码连接符}\Default{\Carg{.}}
设置代码题注编号的连接符。
- \keyval-{equation-connect}{公式连接符}\Default{\Carg{.}}
+ \keyval-{connect-equation}{公式连接符}\Default{\Carg{.}}
设置公式题注编号的连接符。
- \keyval-{connect-all}{连接符}\Default{\Carg{.}}
+ \keyval-{connect-every}{连接符}\Default{\Carg{.}}
统一设置上述所有编号的连接符。
\end{options}
@@ -489,7 +487,7 @@
\command{DeclareLinkColor}[\splitmarg{风格名称,ctex@link,ctex@url,ctex@cite}]
可以使用 \cs{DeclareLinkColor} 命令声明新的超链接颜色样式,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成超链接颜色。
\end{commands}
- \keyval-{linkcolor-all}{HTML颜色代码}\Default
+ \keyval-{linkcolor-every}{HTML颜色代码}\Default
统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
\keychoice{linktoc}{none,section,page,all}\Default{all}
将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
@@ -500,40 +498,55 @@
行距因子用于设置各种行距倍数,\meta{数值} 是不带有长度单位的浮点数。各类行距既可以在导言区全局设置,也可以在正文中设置对后面生效。
\begin{options}
\keyval-{line}{数值}\Module{spread}\Default{1.354}
- 正文行距因子,C\TeX 原有的行距选项 \option*{linespread} 失效。
+ 正文行距因子,注意 C\TeX 宏集原有的行距选项 \option*{linespread} 失效。
\keyval-{table}{数值}\Default{1.354}
- 表格行距因子,对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。
+ 表格内容行距因子,对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。
\keyval-{math}{数值}\Default{1.2}
数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。
- \keyval-{caption}{数值}\Default{1.2}
- 图片、表格和代码题注的行距因子。
+ \keyval-{caption-figure}{数值}\Default{1.2}
+ 图片题注的行距因子。
+ \keyval-{caption-table}{数值}\Default{1.2}
+ 表格题注的行距因子。
+ \keyval-{caption-listing}{数值}\Default{1.2}
+ 代码题注的行距因子。
+ \keyval-{caption-every}{数值}\Default{1.2}
+ 同时设置图片、表格和代码题注的行距因子。
\keyval-{footnote}{数值}\Default{1.2}
- 脚注内容整体的行距因子,可以使用 \option{fnpara-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同。
+ 脚注内容整体的行距因子,可以使用 \option{fnpara-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同\footnote{若在正文区中更改脚注行距,脚注横线下方的间距不会随当前行距改变。}。
\begin{ctexexam}
\spread{footnote = 1.3}
\hdrset{fnpara-form = \linespread{1.2}\selectfont}
\end{ctexexam}
- \keyval-{spread-all}{数值}\Default
- 统一设置上述各种行距因子。
+ \keyval-{every}{数值}\Default
+ 统一设置上述所有的行距因子。
\end{options}
\subsection{其它字体}
\label{subsec:other font}
\begin{options}
\keyval-{caption-table}{字体命令}\Module{subfont}\Default{\cs*{sffamily}\cs*{small}}
- 表格标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
+ 表格题注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval-{caption-figure}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
- 图片标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
+ 图片题注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval-{caption-listing}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
- 代码标题的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
- \keyval-{caption}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
+ 代码题注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
+ \keyval-{caption-every}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
同时设置图片、表格和代码题注的字体命令。
- \keyval-{footnote}{字体命令}\Default{\cs*{rmfamily}}
+ \keyval-{footnote}{字体命令}\Default{\cs*{rmfamily}\cs*{footnotesize}}
设置脚注标记与内容的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval-{marginpar}{字体命令}\Default{\cs*{rmfamily}\cs*{footnotesize}}
边注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
\end{options}
+\begin{commands}
+ \command{addsubfont}[\marg{字体类型}\marg{字体命令}]
+ 用于在上述各种字体原有的格式上附加代码。其中 \meta{字体命令} 也可以包括行距命令且相对于 \module*{spread} 模块具有优先性,不同题注的 \meta{字体类型} 则为相应选项的后缀名。
+ \begin{ctexexam}
+ \addsubfont{every}{\linespread{1.5}\selectfont}
+ \addsubfont{footnote}{\sffamily}
+ \end{ctexexam}
+\end{commands}
+
\subsection{参考文献}
\label{subsec:reference}
\begin{options}
@@ -577,7 +590,7 @@
\subsection{定理样式}
\label{subsec:theorem of style}
-文档类已预置 8 个定理环境,环境名及对应的定理名见小节 \ref{subsec:theorem},它们均使用预置的定理样式 \code{easy-theorem}。下面 \module*{thmset} 模块的选项仅对这个定理样式生效,由 \pkg*{thmtools} 宏包提供支持。如果下面的选项不满足需求,可使用支持完整选项的相关命令新建定理环境。
+文档类已预置 11 个定理环境,环境名及对应的定理名见小节 \ref{subsec:theorem},它们均使用预置的定理样式 \code{easy-theorem}。下面 \module*{thmset} 模块的选项仅对这个定理样式生效,由 \pkg*{thmtools} 宏包提供支持。如果下面的选项不满足需求,可使用支持完整选项的相关命令新建定理环境。
\begin{options}
\keybool{thmframe}\Module{thmset}\Default{false}
给定理环境使用彩色盒子。这个特殊选项在本模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。\pkg*{thmtools} 具有类似的选项 \option*{thmbox},可在新建定理样式的命令中使用。
@@ -694,11 +707,11 @@
\kvsplit-{subsec-label}{\oarg{数字输出命令}\marg{距离命令}}\Default{\cs*{hspace}\Carg{0.5em}}
标题标记命令内容 \cs*{subsectionmark} 的标签,用法与 \option{chap-label} 类似。
\keyval-{headrule}{横线命令}
- 绘制页眉横线的选项,可以使用 \cs*{hrule}、\cs*{rule} 或下述 \cs{markrule} 等画线命令来绘制横线。手动绘制横线时线条粗细选项 \option{rulewidth} 会失效。
+ 绘制页眉横线的选项,可以使用 \cs*{hrule} 或下述 \cs{markrule} 等画线命令来绘制横线。手动绘制横线时线条粗细选项 \option{rulewidth} 会失效。
\keyval-{footrule}{横线命令}\Default
- 绘制页脚横线的选项,可以使用 \cs*{hrule}、\cs*{rule} 或下述 \cs{markrule} 等画线命令来绘制横线。
+ 绘制页脚横线的选项,可以使用 \cs*{hrule} 或下述 \cs{markrule} 等画线命令来绘制横线。
\keyval-{footnoterule}{横线命令}
- 绘制脚注横线的选项,可以使用 \cs*{hrule}、\cs*{rule} 或下述 \cs{markrule} 等画线命令来绘制横线。
+ 绘制脚注横线的选项,可以使用 \cs*{hrule} 或下述 \cs{markrule} 等画线命令来绘制横线。
\end{options}
\begin{commands}\noitemsep
@@ -753,7 +766,7 @@
\begin{commands}\noitemsep
\command{DefineFntSymbols}[\marg{符号表名}\marg{符号数量}\marg{符号列表}]\default{}
\command{setfntsymbol}[\marg{符号表名}]
- 这两个命令用于在脚注短编号标记为 \code{s} 自定义符号型时设置符号列表。\cs{DefineFntSymbols} 命令用于设置符号列表,\cs{setfntsymbol} 命令用于选择已定义符号列表。默认的脚注符号列表是空的,定义新列表时应注意 \meta{符号列表} 的写法和命令顺序:
+ 这两个命令用于在脚注短编号标记为 \code{s} 自定义符号型时设置符号列表。\cs{DefineFntSymbols} 命令用于设置符号列表,\cs{setfntsymbol} 命令用于选择已定义的符号列表。默认的脚注符号列表是空的,定义新列表时应注意 \meta{符号列表} 的写法和命令顺序:
\begin{ctexexam}
\DefineFntSymbols{myfnsymb}{2}{{1}{*}{2}{@}}
\setfntsymbol{myfnsymb}
@@ -850,13 +863,13 @@
目录标题与内容间的钩子,一般插入负的垂直距离代码,用于抵消目录首行额外的垂直间距。一级路径此选项对应文档主目录的钩子,二级路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用位于 \module*{list} 路径的此选项统一设置相应类型目录的钩子。
\keybool{dotalign}\Default{true}
引导线选项 \option{dotalign} 可以使目录引导线右端对齐并与页码保持一定间距,否则会与页码相连。
- \keyval-{pnumwd}{刚性长度}\Default{1.55em}
+ \keyval-{pagenumwd}{刚性长度}\Default{1.55em}
目录条目页码的宽度。开启 \option{dotalign} 选项时宽度越大引导线与页码的距离就越大。
- \keyval-{tocafter-all}{距离命令}\Default{\cs*{hspace}\Carg{1em}}
+ \keyval-{tocafter-every}{距离命令}\Default{\cs*{hspace}\Carg{1em}}
统一设置所有级别在目录中标签与标题间的代码。
- \keyval-{tocindent-all}{刚性长度}
+ \keyval-{tocindent-every}{刚性长度}
统一设置所有级别的目录标题左边缩进。
- \keyval-{tocrule-all}{目录引导线样式}
+ \keyval-{tocrule-every}{目录引导线样式}
统一设置所有级别的目录引导线样式。
\end{options}
@@ -928,25 +941,27 @@
\subsection{定理}
\label{subsec:theorem}
\begin{environments}\noitemsep
- \environment{theorem}\default{}
- \environment{definition}\default{}
- \environment{lemma}\default{}
- \environment{corollary}\default{}
- \environment{proposition}\default{}
- \environment{example}\default{}
- \environment{remark}\default{}
+ \environment{theo}\default{}
+ \environment{defi}\default{}
+ \environment{lemm}\default{}
+ \environment{corol}\default{}
+ \environment{prop}\default{}
+ \environment{exam}\default{}
+ \environment{conj}\default{}
+ \environment{assum}\default{}
+ \environment{axiom}\default{}
+ \environment{rema}\default{}
\environment{proof}
这些是预置的定理环境,可使用选项 \option{thmframe} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名如下:
\insertblr
{
- colspec = @{}*{8}{c}@{},
- hline{1,3} = {1pt,Blue},
+ colspec = @{}*{11}{c}@{},
hline{2} = {0.6pt,Blue},
row{1} = {font = \sffamily},
row{2} = {cmd = \env}
}{
- 定理 & 定义 & 引理 & 推论& 性质 & 例 & 注 & 证明 \\
- theorem & definition & lemma & corollary & proposition & example & remark & proof
+ 定理 & 定义 & 引理 & 推论& 性质 & 例 & 猜想 & 假设 & 公理 & 注 & 证明 \\
+ theo & defi & lemm & corol & prop & exam & conj & assum & axiom & rema & proof
}
\end{environments}