diff options
author | Norbert Preining <norbert@preining.info> | 2021-12-17 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-12-17 03:01:00 +0000 |
commit | 6827f87d3315fc677ae89a9260d455a312a90864 (patch) | |
tree | 88318243546c8d29294c2d21d5d7998ccd9d57a4 /macros/latex/contrib/easybook | |
parent | 16b22a983bc0f05cbbb201a6e0f5cbbfc3c8fffb (diff) |
CTAN sync 202112170300
Diffstat (limited to 'macros/latex/contrib/easybook')
-rw-r--r-- | macros/latex/contrib/easybook/easybook.dtx | 89 | ||||
-rw-r--r-- | macros/latex/contrib/easybook/easybook.pdf | bin | 593159 -> 593346 bytes | |||
-rw-r--r-- | macros/latex/contrib/easybook/easybook.tex | 16 |
3 files changed, 51 insertions, 54 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 0765fb3ecc..655d567ae0 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/15}{1.41U} +\ProvidesExplClass{easybook}{2021/12/15}{1.41V} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -79,7 +79,6 @@ \cs_new_eq:NN \eb_set_family:nnn \ctex_ltj_set_family:nnn \cs_new_eq:NN \eb_switch_family:n \ctex_ltj_switch_family:n } -\cs_generate_variant:Nn \eb_switch_family:n { V } \cs_new_protected:Npn \eb_setmainfont:nn #1#2 { \__fontspec_main_setmainfont:nn {#2} {#1} } \cs_new_protected:Npn \eb_setsansfont:nn #1#2 @@ -101,7 +100,7 @@ \RenewDocumentCommand{\newCJKfontfamily}{omO{}mO{}} { \tl_set:Nx \l_tmpa_tl { \tl_if_novalue:nTF {#1} { \cs_to_str:N #2 } {#1} } - \cs_new_protected:Npx #2 { \eb_switch_family:V \l_tmpa_tl } + \cs_new_protected:Npx #2 { \eb_switch_family:n { \l_tmpa_tl } } \eb_set_family:nnn { \l_tmpa_tl } {#3,#5} {#4} } @@ -308,7 +307,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/12/15}{1.41U} +\ProvidesExplPackage{easybase}{2021/12/15}{1.41V} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -534,7 +533,7 @@ { fancyhdr } { 2021/01/28 }, { siunitx } { 2021/06/22 }, { tabularray } { 2021/07/01 }, - { spbmark } { 2021/06/30 } + { spbmark } { 2021/12/15 } } { \eb_package_date_check:nn #1 } @@ -727,7 +726,7 @@ \bool_if:NF \l__eb_ps_used_bool { \pagestyle{fancy} } \tl_if_empty:NF \l_eb_graphics_path_tl { \exp_args:NV \graphicspath \l_eb_graphics_path_tl } - \cs_if_exist:NF \kaishu { \cs_gset_eq:NN \kaishu \itshape } + \providecommand{\kaishu}{\itshape} } \ctex_define:nn { style } @@ -781,10 +780,10 @@ { s } { \eb_int_to_symbols:n } } } -\cs_new_protected:Npn \eb_fnmate_normal_label_set:nn #1#2 +\cs_new_protected:Npn \eb_fnmate_normal_label_set:Nn #1#2 { - \tl_set:Nn \l__eb_fnmate_number_type_tl {#1} - \cs_set:cpx {#2} + \tl_set:Nn \l__eb_fnmate_number_type_tl {#2} + \cs_set:Npx #1 { \str_case:VnT \l__eb_fnmate_number_type_tl { @@ -802,20 +801,20 @@ { \exp_not:N \c@footnote } } } -\cs_new_protected:Npn \eb_fnmate_short_label_set:nn #1#2 +\cs_new_protected:Npn \eb_fnmate_short_label_set:Nn #1#2 { - \tl_set:Nn \l__eb_fnmate_short_tokens_tl {#1} + \tl_set:Nn \l__eb_fnmate_short_tokens_tl {#2} \eb_seq_map_inline:nn { A,a,1,I,i,c,s } { - \tl_if_in:nnT {#1} {##1} + \tl_if_in:nnT {#2} {##1} { \tl_replace_once:Nnn \l__eb_fnmate_short_tokens_tl {##1} { \eb_int_format_trans:NN ##1 \c@footnote } \seq_map_break: } } - \cs_set_eq:cN {#2} \l__eb_fnmate_short_tokens_tl + \cs_set_eq:NN #1 \l__eb_fnmate_short_tokens_tl } \cs_new_protected:Npn \eb_footnote_value_handle:n #1 { @@ -892,14 +891,14 @@ fnmark-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } - { \eb_fnmate_normal_label_set:nn {#1} { the@footnote } }, + { \eb_fnmate_normal_label_set:Nn \the@up@footnote {#1} }, fnmark-num .value_required:n = true, - fnmark-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { the@footnote }, + fnmark-num/unknown .code:n = \eb_fnmate_short_label_set:Nn \the@up@footnote {#1}, fntext-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } - { \eb_fnmate_normal_label_set:nn {#1} { thefootnote } }, + { \eb_fnmate_normal_label_set:Nn \thefootnote {#1} }, fntext-num .value_required:n = true, - fntext-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { thefootnote }, + fntext-num/unknown .code:n = \eb_fnmate_short_label_set:Nn \thefootnote {#1}, fnmate-num .meta:n = { fntext-num = #1,fnmark-num = #1 }, fnmate-num .initial:n = plain, unknown .code:n = \eb_msg_abandon_option:n { hdrset } @@ -1016,12 +1015,12 @@ \tl_if_eq:NnT \l__eb_footnote_value_tl { hang } { \par } \group_end: } -\cs_set_eq:NN \eb@makefntext \@makefntext +\cs_set_eq:NN \eb@makefntext@save \@makefntext \ctex_at_end_package:nn { footmisc } { \notbool{FN@para} { - \cs_set_eq:NN \@makefntext \eb@makefntext + \cs_set_eq:NN \@makefntext \eb@makefntext@save \msg_warning:nn { easybase } { footmisc } }{} } @@ -1035,7 +1034,7 @@ \cs_set_protected:Npn \footref #1 { \group_begin: - \unrestored@protected@xdef\eb@thefnmark{\ref{#1}} + \unrestored@protected@xdef\@the@up@fnmark{\ref{#1}} \group_end: \H@@footnotemark } @@ -1045,9 +1044,9 @@ { \@xfootnote } { \exp_args:NV \stepcounter \@mpfn - \eb_current_label:n { @footnote } + \eb_current_label:n { @up@footnote } \protected@xdef\@thefnmark{\thempfn} - \protected@xdef\eb@thefnmark{\the@footnote} + \protected@xdef\@the@up@fnmark{\the@up@footnote} \@footnotemark \@footnotetext } @@ -1058,12 +1057,12 @@ { \@xfootnotemark } { \stepcounter{footnote} - \protected@xdef\eb@thefnmark{\the@footnote} + \protected@xdef\@the@up@fnmark{\the@up@footnote} \@footnotemark } } \eb_patch_cmd:wnn { \@footnotetext,\@mpfootnotetext } - { \footnotesize } + { \reset@font } { \setspread{\fp_use:N \l__eb_spread_footnote_fp} \tl_use:N \l__eb_subfont_footnote_tl @@ -1074,7 +1073,7 @@ { \group_begin: \setcounter{footnote}{#1} - \unrestored@protected@xdef\eb@thefnmark{\the@footnote} + \unrestored@protected@xdef\@the@up@fnmark{\the@up@footnote} \group_end: \H@@footnotemark } @@ -1105,8 +1104,7 @@ \bool_if:NT \l__eb_fncust_format_match_bool { \tl_clear:N \l__eb_fnmate_format_tl } } - \bool_if:NF \l__eb_fnmate_format_match_bool - { \spbset{super-format = { }} } + \bool_if:NF \l__eb_fnmate_format_match_bool { \spbset{spcmd = { }} } \tl_use:N \l__eb_subfont_footnote_tl } \bool_set_true:N \l__eb_normal_footnote_bool @@ -1118,7 +1116,7 @@ { \eb_fnmate_format_initial: \tl_if_eq:NnTF \@mpfn { footnote } - { \eb@fnmate@super{\eb@thefnmark} } + { \eb@fnmate@super{\@the@up@fnmark} } { \eb@fnmate@super{\@thefnmark} } } } @@ -1140,13 +1138,13 @@ } \tl_clear:N \@thefnmark -\tl_new:N \eb@thefnmark +\tl_new:N \@the@up@fnmark \cs_new:Npn \eb@@makefnmark #1#2 { \tl_if_empty:oF {#2} { \group_begin: - \unrestored@protected@xdef\eb@thefnmark{#1} + \unrestored@protected@xdef\@the@up@fnmark{#1} \unrestored@protected@xdef\@thefnmark{#2} \group_end: } @@ -1272,7 +1270,7 @@ \ctex_define:nn { tocset } { - lolskip .skip_set:N = \eb@toc@lolskip, + lolskip .skip_set:N = \eb@toc@lol@skip, lolskip .initial:n = 10pt, between .tl_set:N = \l__eb_toc_main_between_hook_tl, between .initial:n = @@ -1467,8 +1465,8 @@ { \eb_appto_cmd:Nn \@chapter { - \skip_if_eq:nnF { \eb@toc@lolskip } { \c_zero_skip } - { \addtocontents{lol}{\protect\addvspace{\skip_use:N \eb@toc@lolskip}} } + \skip_if_eq:nnF { \eb@toc@lol@skip } { \c_zero_skip } + { \addtocontents{lol}{\protect\addvspace{\skip_use:N \eb@toc@lol@skip}} } } } @@ -1712,9 +1710,8 @@ }, caption-every .initial:n = \sffamily\small, footnote .tl_set:N = \l__eb_subfont_footnote_tl, - footnote .initial:n = \rmfamily\footnotesize, marginpar .tl_set:N = \l__eb_subfont_marginpar_tl, - marginpar .initial:n = \rmfamily\footnotesize, + marginpar .initial:n = \footnotesize, unknown .code:n = \eb_msg_abandon_option:n { subfont } } \cs_new_protected:Npn \addtosubfont #1#2 @@ -1743,7 +1740,7 @@ 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, + math .initial:n = 1.3, 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, @@ -1976,7 +1973,7 @@ \eb_thm_biname_set:nnn {#1} {#2} {#3} \declaretheorem{#1}[ name = \tl_use:c { l__eb_thm_biname_#1_tl }, - style = eb-theorem,#5 + style = fancy,#5 ] \eb_if_thmframe_with_tcolorbox:TF { @@ -2049,7 +2046,7 @@ \clist_put_right:Nx \c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl } \exp_last_unbraced:NNV - \declaretheoremstyle[\c__eb_thmtools_entry_clist]{eb-theorem} + \declaretheoremstyle[\c__eb_thmtools_entry_clist]{fancy} \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol] \deftheorem{remark}{注}[numbered = no] \deftheorem{proposition}{性质} @@ -2138,12 +2135,12 @@ bibstyle .initial:n = numerical, citestyle .code:n = \tl_set:Nn \l__eb_bib_cite_style_tl {#1}, datafile .clist_set:N = \l__eb_bib_datafile_clist, - bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl, - bitoc-title .initial:n = Reference, + bititle .tl_set:N = \l__eb_bib_en_bitoc_title_tl, + bititle .initial:n = Bibliography, unknown .code:n = \eb_msg_abandon_option:n { bibset } } -\cs_new_protected:Npn \eb_natbib_bibtex_set: +\cs_new_protected:Npn \eb_bibtex_natbib_set: { \LoadPackage[sort&compress]{natbib} \str_case:VnTF \l__eb_bib_both_style_tl @@ -2180,7 +2177,7 @@ } \cs_new_protected:Npn \eb_put_biblatex:n #1 { \PassOptionsToPackage{#1}{biblatex} } -\cs_new_protected:Npn \eb_biblatex_biber_set: +\cs_new_protected:Npn \eb_biber_biblatex_set: { \str_case:VnF \l__eb_bib_both_style_tl { @@ -2204,8 +2201,8 @@ \clist_if_empty:NF \l__eb_bib_datafile_clist { \bool_if:NTF \l__eb_backend_bibtex_bool - { \eb_natbib_bibtex_set: } - { \eb_biblatex_biber_set: } + { \eb_bibtex_natbib_set: } + { \eb_biber_biblatex_set: } } } @@ -2394,7 +2391,7 @@ \labelformat{chapter}{\CTEXthechapter} \labelformat{figure}{\figurename~#1} \labelformat{table}{\tablename~#1} -\cs_if_free:NT \bibname { \cs_set_eq:NN \bibname \refname } +\providecommand{\bibname}{\refname} \ctex_define:n { lstlistlistingname .tl_set:N = \listlstlistingname, @@ -2432,7 +2429,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/15}{1.41U} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/15}{1.41V} {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 Binary files differindex 8676768a4a..1369c58630 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index f52cbce436..9773c1cd4a 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -20,7 +20,7 @@ name = easybook, color-scheme = blue, title = EASYBOOK 使用手册, - version = v1.41U, + version = v1.41V, date = 2021/12/15, authors = 瞿毅, info = 排版简体中文学位论文和书籍, @@ -356,12 +356,12 @@ \end{commands} \subsection{上标和下标} -上标和下标的功能来自 \pkg*{spbmark} 宏包,下面三个命令可以用于输出上标和下标。可以使用键值列表的形式对上下标格式进行局部或全局设置,这些命令两个可选参数的键值列表是等效的。全局设置的详情见\ref{subsubsec:super-sub-script}。 +上标和下标的功能来自 \pkg*{spbmark} 宏包,下面三个命令可以用于输出上标和下标。可以使用键值列表的形式对上下标格式进行局部或全局设置,下面命令中两个可选参数的键值列表是等效的。全局设置的详情见\ref{subsubsec:super-sub-script}。 \begin{commands} \command{super}[\oarg{键值列表1}\splitoarg{高度,深度}\marg{内容}\oarg{键值列表2}] 输出上标的命令,与简短命令 \cs{sp} 等效。 \command{sub}[\oarg{键值列表1}\splitoarg{高度,深度}\marg{内容}\oarg{键值列表2}] - 输出下标的命令,与简短命令 \cs{sp} 等效。用法和参数与上标命令 \cs{super} 类似。 + 输出下标的命令,与简短命令 \cs{sb} 等效。用法和参数与上标命令 \cs{super} 类似。 \command{supersub}[\oarg{键值列表1}\marg{上标内容}\marg{下标内容}\oarg{键值列表2}] 同时输出上标和下标的命令,与简短命令 \cs{spb} 等效。 \end{commands} @@ -511,7 +511,7 @@ 正文行距因子,注意 C\TeX 宏集原有的行距选项 \option*{linespread} 失效。 \keyval-{table}{数值}\Default{1.354} 表格内容行距因子,对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。 - \keyval-{math}{数值}\Default{1.2} + \keyval-{math}{数值}\Default{1.3} 数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。 \keyval-{caption-figure}{数值}\Default{1.2} 图片题注的行距因子。 @@ -542,9 +542,9 @@ 代码题注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。 \keyval-{caption-every}{字体命令}\Default{\cs*{sffamily}\cs*{small}} 同时设置图片、表格和代码题注的字体命令。 - \keyval-{footnote}{字体命令}\Default{\cs*{rmfamily}\cs*{footnotesize}} + \keyval-{footnote}{字体命令}\Default 设置脚注标记与内容的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keyval-{marginpar}{字体命令}\Default{\cs*{rmfamily}\cs*{footnotesize}} + \keyval-{marginpar}{字体命令}\Default{\cs*{footnotesize}} 边注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。 \end{options} @@ -600,7 +600,7 @@ \subsection{定理样式} \label{subsec:theorem of style} -文档类已预置 12 个定理环境,环境名及对应的定理名见\ref{subsec:theorem},它们均使用预置的定理样式 \code{eb-theorem}。下面 \module*{thmset} 模块选项的用法名称与 \pkg*{thmtools} 宏包基本一致,且仅对预置定理样式生效。如果下面的选项不满足需求,可使用支持完整选项的相关命令创建定理环境。 +文档类已预置 12 个定理环境,环境名及对应的定理名见\ref{subsec:theorem},它们均使用预置的定理样式 \code{fancy}。下面 \module*{thmset} 模块选项的用法名称与 \pkg*{thmtools} 宏包基本一致,且仅对预置定理样式生效。如果下面的选项不满足需求,可使用支持完整选项的相关命令创建定理环境。 \begin{options} \keybool{thmframe}\Module{thmset}\Default{false} 给定理环境使用彩色盒子。这个特殊选项在本模块中使用 \pkg*{tcolorbox} 宏包来支持,\meta{盒子风格} 默认为 \code{tc-theorem}。注意它应当在定理声明命令前使用。\pkg*{thmtools} 具有类似的选项 \option*{thmbox}。 @@ -655,7 +655,7 @@ \item 中英文模式下定理标题自动切换。针对中文定理标题的特点将 \meta{中文标题} 设计为必选参数,\meta{英文标题} 则默认为首字母大写的 \meta{环境名}。 \item 自动定义交叉引用的格式,引用标签前缀为相应定理名。 \item 定理盒子选项 \option{thmframe} 仍然生效,\meta{盒子风格} 可以使用 \cs{deftcbstyle} 命令创建。 - \item 新建定理环境默认使用的 \meta{定理样式} 为 \code{eb-theorem},而不是 \pkg*{thmtools} 的默认样式。 + \item 新建定理环境默认使用的 \meta{定理样式} 为 \code{fancy},而不是 \pkg*{thmtools} 的默认样式。 \end{itemize} 下面新建一个与\ref{exam:new theorem env} 相同的定理环境猜想,并使用 \cs{addtotcbstyle} 命令调整 \option{thmframe} 开启时默认的盒子风格。它的第一个参数为 \code{tc-theorem},关于命令的介绍在\ref{subsec:box}。 |