summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook.pdfbin581062 -> 579975 bytes
-rw-r--r--Master/texmf-dist/doc/latex/easybook/easybook.tex16
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx89
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybase.sty85
-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, 91 insertions, 103 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf
index 2e67d24923e..1746468440f 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 df4b4c4fb2f..a385bc26816 100644
--- a/Master/texmf-dist/doc/latex/easybook/easybook.tex
+++ b/Master/texmf-dist/doc/latex/easybook/easybook.tex
@@ -20,8 +20,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.40T,
- date = 2021/11/20,
+ version = v1.40U,
+ date = 2021/11/22,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = q1jx@foxmail.com,
@@ -305,10 +305,8 @@
使当前目录标题按照 \code{chapter} 章级别输出。
\opt{section}\Default!
使当前目录标题按照 \code{section} 节级别输出。
- \keybool{multoc}\Default{false}
- 与 \module*{style} 模块的 \option{multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否多栏排版,栏数默认为双栏,可使用 \option{columns} 更改。
- \keyval-{columns}{目录栏数}\Default{2}
- 设置目录的栏数,仅在 \keyis-{multoc}{true} 时有效,默认为双栏。
+ \keyval-{multoc}{整数}\Default{2}
+ 与 \module*{style} 模块的 \option{multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同类型目录的排版栏数。\meta{整数} 为目录栏数,不指定栏数值则默认为双栏。
\kvsplit{title}{中文目录标题,英文目录标题}\newline
用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入文档主目录 \cs*{tableofcontents}\parg{} 命令。
\keyval-{format}{目录标题格式}
@@ -403,8 +401,8 @@
\end{commands}
\keyval-{color-all}{HTML颜色代码}\Default
统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
- \keybool{multoc}\Default{false}
- 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
+ \keyval-{multoc}{整数}\Default{2}
+ 使目录多栏排版,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
\keybool{withpart}\Default{false}
使章标题跟随每一部分编号,开启新的一部分时章编号从 1 开始,默认不跟随。
\keychoice{footwith}{part,chapter,page}\Default{chapter}
@@ -490,7 +488,7 @@
\begin{options}
\keyval-{line}{数值}\Module{spread}\Default{1.354}
正文行距因子,C\TeX 原有的行距选项 \option*{linespread} 失效。
- \keyval-{table}{数值}\Default{1.2}
+ \keyval-{table}{数值}\Default{1.354}
表格行距因子,对传统表格环境 \env*{tabular}、\env*{tabularx} 以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距。
\keyval-{math}{数值}\Default{1.2}
数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index 302df73e057..637e238152f 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}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/11/20}{1.40T}
+\ProvidesExplClass{easybook}{2021/11/22}{1.40U}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -325,7 +325,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/11/20}{1.40T}
+\ProvidesExplPackage{easybase}{2021/11/22}{1.40U}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -471,7 +471,6 @@
}
}
-\bool_new:N \l__eb_toc_multi_column_bool
\bool_new:N \l__eb_mark_uppercase_bool
\bool_new:N \l__eb_chap_counter_withpart_bool
\tl_new:N \l__eb_foot_counter_parent_choice_tl
@@ -499,10 +498,7 @@
}
}
\cs_new:Npn \eb_msg_unknown_option:n #1
- {
- \msg_warning:nnx
- { easybase } { ignore-#1 } { \l_keys_key_str }
- }
+ { \msg_warning:nnx { easybase } { ignore-#1 } { \l_keys_key_str } }
\cs_if_exist:NF \chapter
{
\newcounter{chapter}
@@ -515,7 +511,10 @@
\ctex_after_end_preamble:n
{
\NewDocumentCommand{\chapter}{som}
- {\msg_error:nn { easybase } { no-chapter }}
+ {
+ \msg_error:nn { easybase } { no-chapter }
+ \msg_redirect_name:nnn { easybase } { no-chapter } { none }
+ }
}
}
\msg_new:nnn { easybase } { no-chapter }
@@ -540,8 +539,8 @@
}
\cs_new_protected:Npn \eb_package_date_check:nn #1#2
{
- \IfPackageAtLeastTF{#1}{#2}
- {}{\msg_warning:nnn { easybase } { package-old } {#1}}
+ \IfPackageAtLeastTF{#1}{#2}{}
+ {\msg_warning:nnn { easybase } { package-old } {#1}}
}
\msg_new:nnn { easybase } { package-old }
{
@@ -586,8 +585,8 @@
}
\ctex_define:nn { style }
{
- multoc .bool_set:N = \l__eb_toc_multi_column_bool,
- multoc .default:n = true,
+ multoc .int_set:N = \l__eb_toc_columns_int,
+ multoc .default:n = 2,
withpart .bool_set:N = \l__eb_chap_counter_withpart_bool,
withpart .default:n = true,
withpart .initial:n = false,
@@ -1512,16 +1511,15 @@
\tl_new:N \eb@bitoc@title
\keys_define:nn { eb/listoc }
{
- section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section },
- chapter .code:n = { },
- article .meta:n = section,
- book .meta:n = chapter,
- multoc .bool_set:N = \l__eb_toc_multi_column_bool,
- multoc .default:n = true,
- multoc .initial:n = false,
- title .code:n = \eb_assign_toc_title:n {#1},
- columns .int_set:N = \l__eb_toc_columns_int,
- columns .initial:n = 2
+ section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section },
+ chapter .code:n = { },
+ article .meta:n = section,
+ book .meta:n = chapter,
+ multoc .int_set:N = \l__eb_toc_columns_int,
+ multoc .default:n = 2,
+ multoc .initial:n = 1,
+ columns .meta:n = { multoc = #1 },
+ title .code:n = \eb_assign_toc_title:n {#1}
}
\bool_if:NTF \l__eb_class_book_bool
{ \keys_define:nn { } { eb/listoc .inherit:n = ctex/chapter } }
@@ -1540,14 +1538,8 @@
\cs_new_protected:Npn \eb_title_mark_intoc:n #1
{
\tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
- {
- \bichapter*{#1}{\eb@bitoc@title}
- \chaptermark{#1}
- }
- {
- \bisection*{#1}{\eb@bitoc@title}
- \sectionmark{#1}
- }
+ { \bichapter*{#1}{\eb@bitoc@title} }
+ { \bisection*{#1}{\eb@bitoc@title} }
}
\cs_new_protected:Npn \eb_title_mark_notoc:n #1
{
@@ -1583,7 +1575,7 @@
}
\cs_new_protected:Npn \eb_toc_start_multi_column_ext:n #1
{
- \bool_if:NTF \l__eb_toc_multi_column_bool
+ \int_compare:nNnTF { \l__eb_toc_columns_int } > { 1 }
{
\begin{multicols}{\int_use:N \l__eb_toc_columns_int}
\@starttoc{#1}
@@ -1728,7 +1720,7 @@
line .code:n = \AfterPreamble{\setspread{#1}},
line .initial:n = 1.354,
table .fp_set:N = \l__eb_spread_table_fp,
- table .initial:n = 1.2,
+ 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,
@@ -1924,6 +1916,11 @@
\RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}}
{\eb@declaretheoremsyle@save[#1,#3]{#2}}
\cs_set_eq:NN \newtheorem \declaretheorem
+\cs_new_protected:Npn \eb_if_thmframe_with_tcolorbox:TF #1#2
+ {
+ \bool_if:NT \l__eb_thmframe_bool
+ { \@ifpackageloaded{tcolorbox}{#1}{#2} }
+ }
\NewDocumentCommand{\deftheorem}
{mO{\text_titlecase_first:n {#1}}mD(){tc-theorem}O{}}
{
@@ -1932,19 +1929,10 @@
name = \tl_use:c { c__eb_name_#1_tl },
style = easy-theorem,#5
]
- \bool_if:NT \l__eb_thmframe_bool
- {
- \@ifpackageloaded{tcolorbox}
- {\tcolorboxenvironment{#1}{#4}}
- {\msg_warning:nn { easybase } { need-tcolorbox }}
- }
+ \eb_if_thmframe_with_tcolorbox:TF
+ { \tcolorboxenvironment{#1}{#4} } { }
\labelformat{#1}{\tl_use:c { c__eb_name_#1_tl }~##1}
}
-\msg_new:nnn { easybase } { need-tcolorbox }
- {
- Now~that~the~thmframe~option~is~true. \\
- Please~load~the~tcolorbox~macro~package.
- }
\prop_new:N \l__eb_thmtools_entry_prop
\clist_const:Nn \c__eb_thmtools_entry_clist
@@ -1994,8 +1982,15 @@
within = \bool_if:NT \l__eb_class_book_bool { chapter },
headformat = \NAME\NUMBER\NOTE
}
+\msg_new:nnn { easybase } { need-tcolorbox }
+ {
+ Now~that~the~thmframe~option~is~true. \\
+ Please~load~the~tcolorbox~macro~package.
+ }
\eb_at_end_preamble:n
{
+ \eb_if_thmframe_with_tcolorbox:TF { }
+ { \msg_warning:nn { easybase } { need-tcolorbox } }
\clist_put_right:Nx
\c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl }
\exp_last_unbraced:NNV
@@ -2106,8 +2101,6 @@
{ \exp_args:NV \bibliographystyle \l__eb_bib_otherstyle_tl }
\tl_if_empty:NF \l__eb_bib_cite_style_tl
{ \exp_args:NV \setcitestyle \l__eb_bib_cite_style_tl }
- \AtEndEnvironment{thebibliography}
- {\bool_if:NT \l__eb_toc_multi_column_bool { \end{multicols} }}
\NewDocumentCommand{\printbibliography}{st+o}
{
\group_begin:
@@ -2116,12 +2109,14 @@
\cs_set_protected:Npn \bibsection
{
\eb_title_number_intoc_spec:nn {##2} {##1}
- \bool_if:NT \l__eb_toc_multi_column_bool
+ \int_compare:nNnT { \l__eb_toc_columns_int } > { 1 }
{ \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
}
\exp_args:NV \bibliography \l__eb_bib_datafile_clist
\group_end:
}
+ \AtEndEnvironment{thebibliography}
+ {\int_compare:nNnT { \l__eb_toc_columns_int } > { 1 } { \end{multicols} }}
\skip_zero:N \bibsep
}
\cs_new_protected:Npn \eb_put_biblatex:n #1
@@ -2375,7 +2370,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/20}{1.40T}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/22}{1.40U}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \setexercise #1
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty
index da95e0d7a5b..67b1a765a4c 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}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/11/20}{1.40T}
+\ProvidesExplPackage{easybase}{2021/11/22}{1.40U}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -166,7 +166,6 @@
}
}
-\bool_new:N \l__eb_toc_multi_column_bool
\bool_new:N \l__eb_mark_uppercase_bool
\bool_new:N \l__eb_chap_counter_withpart_bool
\tl_new:N \l__eb_foot_counter_parent_choice_tl
@@ -194,10 +193,7 @@
}
}
\cs_new:Npn \eb_msg_unknown_option:n #1
- {
- \msg_warning:nnx
- { easybase } { ignore-#1 } { \l_keys_key_str }
- }
+ { \msg_warning:nnx { easybase } { ignore-#1 } { \l_keys_key_str } }
\cs_if_exist:NF \chapter
{
\newcounter{chapter}
@@ -210,7 +206,10 @@
\ctex_after_end_preamble:n
{
\NewDocumentCommand{\chapter}{som}
- {\msg_error:nn { easybase } { no-chapter }}
+ {
+ \msg_error:nn { easybase } { no-chapter }
+ \msg_redirect_name:nnn { easybase } { no-chapter } { none }
+ }
}
}
\msg_new:nnn { easybase } { no-chapter }
@@ -235,8 +234,8 @@
}
\cs_new_protected:Npn \eb_package_date_check:nn #1#2
{
- \IfPackageAtLeastTF{#1}{#2}
- {}{\msg_warning:nnn { easybase } { package-old } {#1}}
+ \IfPackageAtLeastTF{#1}{#2}{}
+ {\msg_warning:nnn { easybase } { package-old } {#1}}
}
\msg_new:nnn { easybase } { package-old }
{
@@ -281,8 +280,8 @@
}
\ctex_define:nn { style }
{
- multoc .bool_set:N = \l__eb_toc_multi_column_bool,
- multoc .default:n = true,
+ multoc .int_set:N = \l__eb_toc_columns_int,
+ multoc .default:n = 2,
withpart .bool_set:N = \l__eb_chap_counter_withpart_bool,
withpart .default:n = true,
withpart .initial:n = false,
@@ -1207,16 +1206,15 @@
\tl_new:N \eb@bitoc@title
\keys_define:nn { eb/listoc }
{
- section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section },
- chapter .code:n = { },
- article .meta:n = section,
- book .meta:n = chapter,
- multoc .bool_set:N = \l__eb_toc_multi_column_bool,
- multoc .default:n = true,
- multoc .initial:n = false,
- title .code:n = \eb_assign_toc_title:n {#1},
- columns .int_set:N = \l__eb_toc_columns_int,
- columns .initial:n = 2
+ section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section },
+ chapter .code:n = { },
+ article .meta:n = section,
+ book .meta:n = chapter,
+ multoc .int_set:N = \l__eb_toc_columns_int,
+ multoc .default:n = 2,
+ multoc .initial:n = 1,
+ columns .meta:n = { multoc = #1 },
+ title .code:n = \eb_assign_toc_title:n {#1}
}
\bool_if:NTF \l__eb_class_book_bool
{ \keys_define:nn { } { eb/listoc .inherit:n = ctex/chapter } }
@@ -1235,14 +1233,8 @@
\cs_new_protected:Npn \eb_title_mark_intoc:n #1
{
\tl_if_eq:NnTF \l__eb_toc_type_tl { chapter }
- {
- \bichapter*{#1}{\eb@bitoc@title}
- \chaptermark{#1}
- }
- {
- \bisection*{#1}{\eb@bitoc@title}
- \sectionmark{#1}
- }
+ { \bichapter*{#1}{\eb@bitoc@title} }
+ { \bisection*{#1}{\eb@bitoc@title} }
}
\cs_new_protected:Npn \eb_title_mark_notoc:n #1
{
@@ -1278,7 +1270,7 @@
}
\cs_new_protected:Npn \eb_toc_start_multi_column_ext:n #1
{
- \bool_if:NTF \l__eb_toc_multi_column_bool
+ \int_compare:nNnTF { \l__eb_toc_columns_int } > { 1 }
{
\begin{multicols}{\int_use:N \l__eb_toc_columns_int}
\@starttoc{#1}
@@ -1423,7 +1415,7 @@
line .code:n = \AfterPreamble{\setspread{#1}},
line .initial:n = 1.354,
table .fp_set:N = \l__eb_spread_table_fp,
- table .initial:n = 1.2,
+ 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,
@@ -1619,6 +1611,11 @@
\RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}}
{\eb@declaretheoremsyle@save[#1,#3]{#2}}
\cs_set_eq:NN \newtheorem \declaretheorem
+\cs_new_protected:Npn \eb_if_thmframe_with_tcolorbox:TF #1#2
+ {
+ \bool_if:NT \l__eb_thmframe_bool
+ { \@ifpackageloaded{tcolorbox}{#1}{#2} }
+ }
\NewDocumentCommand{\deftheorem}
{mO{\text_titlecase_first:n {#1}}mD(){tc-theorem}O{}}
{
@@ -1627,19 +1624,10 @@
name = \tl_use:c { c__eb_name_#1_tl },
style = easy-theorem,#5
]
- \bool_if:NT \l__eb_thmframe_bool
- {
- \@ifpackageloaded{tcolorbox}
- {\tcolorboxenvironment{#1}{#4}}
- {\msg_warning:nn { easybase } { need-tcolorbox }}
- }
+ \eb_if_thmframe_with_tcolorbox:TF
+ { \tcolorboxenvironment{#1}{#4} } { }
\labelformat{#1}{\tl_use:c { c__eb_name_#1_tl }~##1}
}
-\msg_new:nnn { easybase } { need-tcolorbox }
- {
- Now~that~the~thmframe~option~is~true. \\
- Please~load~the~tcolorbox~macro~package.
- }
\prop_new:N \l__eb_thmtools_entry_prop
\clist_const:Nn \c__eb_thmtools_entry_clist
@@ -1689,8 +1677,15 @@
within = \bool_if:NT \l__eb_class_book_bool { chapter },
headformat = \NAME\NUMBER\NOTE
}
+\msg_new:nnn { easybase } { need-tcolorbox }
+ {
+ Now~that~the~thmframe~option~is~true. \\
+ Please~load~the~tcolorbox~macro~package.
+ }
\eb_at_end_preamble:n
{
+ \eb_if_thmframe_with_tcolorbox:TF { }
+ { \msg_warning:nn { easybase } { need-tcolorbox } }
\clist_put_right:Nx
\c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl }
\exp_last_unbraced:NNV
@@ -1801,8 +1796,6 @@
{ \exp_args:NV \bibliographystyle \l__eb_bib_otherstyle_tl }
\tl_if_empty:NF \l__eb_bib_cite_style_tl
{ \exp_args:NV \setcitestyle \l__eb_bib_cite_style_tl }
- \AtEndEnvironment{thebibliography}
- {\bool_if:NT \l__eb_toc_multi_column_bool { \end{multicols} }}
\NewDocumentCommand{\printbibliography}{st+o}
{
\group_begin:
@@ -1811,12 +1804,14 @@
\cs_set_protected:Npn \bibsection
{
\eb_title_number_intoc_spec:nn {##2} {##1}
- \bool_if:NT \l__eb_toc_multi_column_bool
+ \int_compare:nNnT { \l__eb_toc_columns_int } > { 1 }
{ \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
}
\exp_args:NV \bibliography \l__eb_bib_datafile_clist
\group_end:
}
+ \AtEndEnvironment{thebibliography}
+ {\int_compare:nNnT { \l__eb_toc_columns_int } > { 1 } { \end{multicols} }}
\skip_zero:N \bibsep
}
\cs_new_protected:Npn \eb_put_biblatex:n #1
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 63d24b2edd6..4ee88f61921 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}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/11/20}{1.40T}
+\ProvidesExplClass{easybook}{2021/11/22}{1.40U}
{Typeset Chinese theses or books}
\bool_set_false: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 e2584309959..f349baf2031 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}{2021/11/20}{1.40T}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/22}{1.40U}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \setexercise #1