From 50e8ddb8e24f9fe60fbea1708f370d4545c93811 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 18 Aug 2021 20:45:39 +0000 Subject: easybook (18aug21) git-svn-id: svn://tug.org/texlive/trunk@60266 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/easybook/easybook.pdf | Bin 587175 -> 590797 bytes Master/texmf-dist/doc/latex/easybook/easybook.tex | 28 ++++++--- .../texmf-dist/source/latex/easybook/easybook.dtx | 69 ++++++++++----------- Master/texmf-dist/tex/latex/easybook/easybase.sty | 63 +++++++++---------- Master/texmf-dist/tex/latex/easybook/easybook.cls | 4 +- .../texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 2 +- 6 files changed, 88 insertions(+), 78 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf index e8462e7c52b..59fc52c31d8 100644 Binary files a/Master/texmf-dist/doc/latex/easybook/easybook.pdf and b/Master/texmf-dist/doc/latex/easybook/easybook.pdf differ diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.tex b/Master/texmf-dist/doc/latex/easybook/easybook.tex index 59ad7179cdb..8485acc4783 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook.tex @@ -12,7 +12,7 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.28q, + version = v1.29, date = 2021/08/16, authors = 瞿毅, info = 排版简体中文学位论文和书籍, @@ -593,7 +593,7 @@ \subsection{页面尺寸} \label{subsec:page margins} -预置的页面尺寸与 \cls*{Word} 的默认值接近,模块 \module*{geoset} 会将前两个之外的选项交给 \pkg*{geometry} 宏包接口命令 \cs*{geometry} 处理,并且 \meta{键值列表} 的选项与之相同,下面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。 +模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面是列举的一小部分选项,其它选项可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。 \begin{options}\noitemsep \keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default* \keyval-{footruleskip}{页脚线间距}\Default* @@ -808,7 +808,7 @@ \environment*{tabularx}[\marg{长度}\marg{列格式}]\default{} \environment*{tabular}[\marg{列格式}]\default{} \environment{tblr}[\marg{键值列表}] - \pkg*{tabularray} 是一个较新的宏包,不仅提供了 \pkg*{tabularx}、\pkg*{multirow}、和 \pkg*{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法: + \pkg*{tabularray} 是一个较新的表格宏包,不仅提供了 \pkg*{tabularx}、\pkg*{multirow}、和 \pkg*{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法: \begin{ctexexam} \begin{tblr} { @@ -829,7 +829,20 @@ \end{environments} \subsection{列表} -\pkg*{enumitem} 宏包为系统预置的三种列表环境即排序列表 \env{enumerate}、常规列表 \env{itemize} 和 主题列表 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \cs*{setlist} 命令设置三种列表格式,或者直接使用可选参数的 \meta{键值列表},具体选项见 \pkg*{enumitem} 宏包文档。 +\begin{commands} + \command*{setlist}[\sarg\splitoarg{列表类型,级别}\marg{键值列表}] + 列表宏包 \pkg*{enumitem} 为系统预置的三个列表环境提供了灵活的标签以及间距控制,这是设置列表环境的通用接口命令。带有星号参数的命令在原有格式上补充。\meta{列表类型} 是排序列表 \code{enumerate}、常规列表 \code{itemize} 和主题列表 \code{description} 三个基本类型,也可以是 \cs*{newlist} 新建的定理环境,若不指定则设置所有列表类型的格式。若不指定 \meta{级别} 则设置所有列表级别的格式。 + \command*{newlist}[\marg{列表名}\marg{列表类型}\marg{最大级别}] + 克隆基本的 \meta{列表类型} 在其基础上新建一个名为 \meta{列表名} 的列表环境。不要将 \meta{最大级别} 设置过大以避免创建过多的计数器和相关宏。 + \begin{ctexexam} + \setlist[1]{labelindent = \parindent} + \setlist[itemize,1]{label = $\triangleleft$} + \setlist[enumerate]{labelsep = *,leftmargin = 1.5pc} + \newlist{steps}{enumerate}{2} + \setlist[steps,1,2]{label = (\arabic*)} + \end{ctexexam} +\end{commands} + \begin{environments}\noitemsep \environment*{enumerate}[\oarg{键值列表}]\default{} \environment*{itemize}[\oarg{键值列表}]\default{} @@ -855,7 +868,7 @@ \environment{example}\default{} \environment{remark}\default{} \environment{proof} - 这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改边框样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名名如下: + 这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名如下: \begin{center} \begin{tabular}{*{8}{c}} \toprule @@ -912,7 +925,7 @@ \label{subsec:exercise} \begin{environments} \environment{exercise}[\sarg\parg\oarg{键值列表1}\darg{键值列表2}\oarg{键值列表3}] - 习题环境的标题使用 \cs*{tcbox} 行内盒子包装样式,内容则使用 \env{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 \parg{} 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \option{label} 选项失效。\par + 习题环境的标题使用 \cs*{tcbox} 行内盒子包装样式,内容则使用 \env*{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 \parg{} 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \option{label} 选项失效。 \meta{键值列表2} 包括 \pkg*{tcolorbox} 的盒子样式选项,例如 \option*{boxsep} 和 \option*{fontupper} 等,也可以使用下述 \option{tcolorbox} 选项。在这里可以使用 \cs{addtcbstyle} 命令设置标题选项 \meta{键值列表2} 的值,第一个参数为 \code{exercise}。 \begin{ctexexam} @@ -946,8 +959,7 @@ 设置习题环境的引用标签,它与标签格式命令 \cs{labelformat} 对应的计数器是 \code{eb@exercise}。 \end{options} \command{setexerlist}[\marg{键值列表3}] - \meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。 - \cs{setexerlist} 命令用于设置习题条目选项 \meta{键值列表3} 的值。 + 命令 \cs{setexerlist} 用于全局设置习题条目选项 \meta{键值列表3} 的值。\meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。 \command{exerprologue}[\marg{序言内容}] 序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。 \command{tcphantomifname}[\marg{编号代码}\marg{不编号代码}] diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index 29456c1287f..778d47e92ad 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/08/16}{1.28q} +\ProvidesExplClass{easybook}{2021/08/16}{1.29} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -63,7 +63,7 @@ } \ProcessKeysOptions{easybook} -\PassOptionsToPackage{no-math,quiet,CJKmath}{xeCJK} +\PassOptionsToPackage{CJKmath,quiet}{xeCJK} \eb_put_ctexbook:n { \g__eb_options_clist } \LoadClass[UTF8]{ctexbook} @@ -297,7 +297,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/08/16}{1.28q} +\ProvidesExplPackage{easybase}{2021/08/16}{1.29} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } @@ -437,7 +437,7 @@ { \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption } } -\clist_map_inline:nn +\eb_clist_map_inline:nn { { protrusion = false } { microtype }, { list = off } { bicaption }, @@ -536,7 +536,7 @@ if~you~continue~compiling. \\\\ Please~update~your~macro~package~from~CTAN. } -\clist_map_inline:nn +\eb_clist_map_inline:nn { { expl3 } { 2020/10/27 }, { xparse } { 2020/10/27 }, @@ -1548,21 +1548,18 @@ \eb_toc_start_multi_column_ext:n {#5} \group_end: } -\clist_map_inline:nn +\cs_new_protected:Npn \eb_list_content_cmd_set:nn #1#2 { - { figure,lof }, - { table,lot }, - { lstlisting,lol } + \exp_args:Nc \DeclareDocumentCommand { listof#1s }{st+o} + {\eb_toc_list_parse:nnnnn {##1} {##2} {##3} {#1} {#2}} } +\eb_clist_map_inline:nn { - \exp_args:Nc \DeclareDocumentCommand - { listof\clist_item:nn {#1} { 1 }s }{st+o} - { - \eb_toc_list_parse:nnnnn {##1} {##2} {##3} - { \clist_item:nn {#1} { 1 } } - { \clist_item:nn {#1} { 2 } } - } + { figure } { lof }, + { table } { lot }, + { lstlisting } { lol } } + { \eb_list_content_cmd_set:nn #1 } \cs_set_eq:NN \listoflistings \listoflstlistings \RenewDocumentCommand{\tableofcontents}{t+oD(){}} { @@ -1680,18 +1677,18 @@ \cs_new_protected:Npn \eb_put_newtxmath:n #1 { \PassOptionsToPackage{#1}{newtxmath} } -\eb_at_end_preamble:n +\AfterPreamble { \str_case:VnT \l__eb_subfont_math_choice_tl { + { times } { } + { nc } { \eb_put_newtxmath:n { nc } } { noto } { \eb_put_newtxmath:n { noto } } + { stix } { \eb_put_newtxmath:n { stix2 } } + { charter } { \eb_put_newtxmath:n { charter } } { notosans } { \eb_put_newtxmath:n { notosans } } { garamond } { \eb_put_newtxmath:n { ebgaramond } } - { times } { \eb_put_newtxmath:n { noOT1 } } - { libertine } { \eb_put_newtxmath:n { libertine,noOT1 } } - { stix } { \eb_put_newtxmath:n { stix2,noOT1 } } - { nc } { \eb_put_newtxmath:n { nc,noOT1 } } - { charter } { \eb_put_newtxmath:n { charter,noOT1 } } + { libertine } { \eb_put_newtxmath:n { libertine } } } { \LoadPackage{newtxmath+bm} } } @@ -1809,7 +1806,7 @@ }{} \cs_new_protected:Npn \eb_enumitem_label_set:nn #1#2 { \SetEnumitemValue{label}{#1}{\color{ctex@emph}#2} } -\clist_map_inline:nn +\eb_clist_map_inline:nn { { bullet } { \textbullet }, { endash } { \normalfont\bfseries\textendash }, @@ -2134,7 +2131,7 @@ \group_begin: \tl_set_eq:NN \eb@toc@title \bibname \IfValueT{##3}{ \keys_set:nn { eb/listoc } {##3} } - \tl_set:Nn \bibsection + \cs_set:Npn \bibsection { \eb_title_number_intoc_spec:nn {##2} {##1} \bool_if:NT \l__eb_toc_multi_column_bool @@ -2235,23 +2232,25 @@ { \ctex_define:nx { refset } { \eb_link_color_set:n {#1} } } \cs_new_protected:Npn \DeclareThemeColor #1 { \ctex_define:nx { style } { \eb_theme_color_set:n {#1} } } -\clist_map_inline:nn - { - { linkcolor,link }, - { color,theme } - } +\cs_new_protected:Npn \eb_color_assign_cmd_set:nn #1#2 { - \cs_new:cpn { eb_\clist_item:nn {#1} { 2 }_color_set:n } ##1 + \cs_new:cpn { eb_#2_color_set:n } ##1 { - \clist_item:nn {#1} { 1 }/\clist_item:nn {##1} { 1 } .code:n = + #1/\clist_item:nn {##1} { 1 } .code:n = { - \use:c { eb_define_\clist_item:nn {#1} { 2 }_color:nnn } + \use:c { eb_define_#2_color:nnn } { \clist_item:nn {##1} { 2 } } { \clist_item:nn {##1} { 3 } } { \clist_item:nn {##1} { 4 } } }, } } +\eb_clist_map_inline:nn + { + { linkcolor } { link }, + { color } { theme } + } + { \eb_color_assign_cmd_set:nn #1 } \bool_set_false:N \l__eb_toc_number_color_bool \ctex_define:nn { refset } @@ -2274,12 +2273,12 @@ linktoc/unknown .code:n = { \eb_put_hyperref:n { linktoc = #1 } - \clist_map_inline:nn { page,none } + \eb_clist_map_inline:nn { page,none } { \tl_if_eq:NnT \l_keys_value_tl {##1} { \colorlet{ctex@toc@number}{black} - \clist_map_break: + \seq_map_break: } } }, @@ -2395,7 +2394,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/16}{1.28q} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/16}{1.29} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index f0a6f761b60..d03de597fe5 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/08/16}{1.28q} +\ProvidesExplPackage{easybase}{2021/08/16}{1.29} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } @@ -160,7 +160,7 @@ { \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption } } -\clist_map_inline:nn +\eb_clist_map_inline:nn { { protrusion = false } { microtype }, { list = off } { bicaption }, @@ -259,7 +259,7 @@ if~you~continue~compiling. \\\\ Please~update~your~macro~package~from~CTAN. } -\clist_map_inline:nn +\eb_clist_map_inline:nn { { expl3 } { 2020/10/27 }, { xparse } { 2020/10/27 }, @@ -1271,21 +1271,18 @@ \eb_toc_start_multi_column_ext:n {#5} \group_end: } -\clist_map_inline:nn +\cs_new_protected:Npn \eb_list_content_cmd_set:nn #1#2 { - { figure,lof }, - { table,lot }, - { lstlisting,lol } + \exp_args:Nc \DeclareDocumentCommand { listof#1s }{st+o} + {\eb_toc_list_parse:nnnnn {##1} {##2} {##3} {#1} {#2}} } +\eb_clist_map_inline:nn { - \exp_args:Nc \DeclareDocumentCommand - { listof\clist_item:nn {#1} { 1 }s }{st+o} - { - \eb_toc_list_parse:nnnnn {##1} {##2} {##3} - { \clist_item:nn {#1} { 1 } } - { \clist_item:nn {#1} { 2 } } - } + { figure } { lof }, + { table } { lot }, + { lstlisting } { lol } } + { \eb_list_content_cmd_set:nn #1 } \cs_set_eq:NN \listoflistings \listoflstlistings \RenewDocumentCommand{\tableofcontents}{t+oD(){}} { @@ -1403,18 +1400,18 @@ \cs_new_protected:Npn \eb_put_newtxmath:n #1 { \PassOptionsToPackage{#1}{newtxmath} } -\eb_at_end_preamble:n +\AfterPreamble { \str_case:VnT \l__eb_subfont_math_choice_tl { + { times } { } + { nc } { \eb_put_newtxmath:n { nc } } { noto } { \eb_put_newtxmath:n { noto } } + { stix } { \eb_put_newtxmath:n { stix2 } } + { charter } { \eb_put_newtxmath:n { charter } } { notosans } { \eb_put_newtxmath:n { notosans } } { garamond } { \eb_put_newtxmath:n { ebgaramond } } - { times } { \eb_put_newtxmath:n { noOT1 } } - { libertine } { \eb_put_newtxmath:n { libertine,noOT1 } } - { stix } { \eb_put_newtxmath:n { stix2,noOT1 } } - { nc } { \eb_put_newtxmath:n { nc,noOT1 } } - { charter } { \eb_put_newtxmath:n { charter,noOT1 } } + { libertine } { \eb_put_newtxmath:n { libertine } } } { \LoadPackage{newtxmath+bm} } } @@ -1532,7 +1529,7 @@ }{} \cs_new_protected:Npn \eb_enumitem_label_set:nn #1#2 { \SetEnumitemValue{label}{#1}{\color{ctex@emph}#2} } -\clist_map_inline:nn +\eb_clist_map_inline:nn { { bullet } { \textbullet }, { endash } { \normalfont\bfseries\textendash }, @@ -1857,7 +1854,7 @@ \group_begin: \tl_set_eq:NN \eb@toc@title \bibname \IfValueT{##3}{ \keys_set:nn { eb/listoc } {##3} } - \tl_set:Nn \bibsection + \cs_set:Npn \bibsection { \eb_title_number_intoc_spec:nn {##2} {##1} \bool_if:NT \l__eb_toc_multi_column_bool @@ -1958,23 +1955,25 @@ { \ctex_define:nx { refset } { \eb_link_color_set:n {#1} } } \cs_new_protected:Npn \DeclareThemeColor #1 { \ctex_define:nx { style } { \eb_theme_color_set:n {#1} } } -\clist_map_inline:nn - { - { linkcolor,link }, - { color,theme } - } +\cs_new_protected:Npn \eb_color_assign_cmd_set:nn #1#2 { - \cs_new:cpn { eb_\clist_item:nn {#1} { 2 }_color_set:n } ##1 + \cs_new:cpn { eb_#2_color_set:n } ##1 { - \clist_item:nn {#1} { 1 }/\clist_item:nn {##1} { 1 } .code:n = + #1/\clist_item:nn {##1} { 1 } .code:n = { - \use:c { eb_define_\clist_item:nn {#1} { 2 }_color:nnn } + \use:c { eb_define_#2_color:nnn } { \clist_item:nn {##1} { 2 } } { \clist_item:nn {##1} { 3 } } { \clist_item:nn {##1} { 4 } } }, } } +\eb_clist_map_inline:nn + { + { linkcolor } { link }, + { color } { theme } + } + { \eb_color_assign_cmd_set:nn #1 } \bool_set_false:N \l__eb_toc_number_color_bool \ctex_define:nn { refset } @@ -1997,12 +1996,12 @@ linktoc/unknown .code:n = { \eb_put_hyperref:n { linktoc = #1 } - \clist_map_inline:nn { page,none } + \eb_clist_map_inline:nn { page,none } { \tl_if_eq:NnT \l_keys_value_tl {##1} { \colorlet{ctex@toc@number}{black} - \clist_map_break: + \seq_map_break: } } }, diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 0b492265d45..788286ba650 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/08/16}{1.28q} +\ProvidesExplClass{easybook}{2021/08/16}{1.29} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -68,7 +68,7 @@ } \ProcessKeysOptions{easybook} -\PassOptionsToPackage{no-math,quiet,CJKmath}{xeCJK} +\PassOptionsToPackage{CJKmath,quiet}{xeCJK} \eb_put_ctexbook:n { \g__eb_options_clist } \LoadClass[UTF8]{ctexbook} diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index b8548b31f98..066a9b641e2 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/08/16}{1.28q} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/16}{1.29} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } -- cgit v1.2.3