From a365f4320519cd6ebeb512575849a4582aae4f45 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 17 Aug 2021 03:00:45 +0000 Subject: CTAN sync 202108170300 --- macros/latex/contrib/easybook/easybook.dtx | 144 ++++++++++++++--------------- 1 file changed, 68 insertions(+), 76 deletions(-) (limited to 'macros/latex/contrib/easybook/easybook.dtx') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 3672b124b9..29456c1287 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/08/15}{1.28p} +\ProvidesExplClass{easybook}{2021/08/16}{1.28q} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -95,14 +95,12 @@ { \eb_set_family:nnn { \CJKsfdefault } {#2} {#1} } \cs_new_protected:Npn \eb_setCJKmonofont:nn #1#2 { \eb_set_family:nnn { \CJKttdefault } {#2} {#1} } -\cs_new_protected:Npn \eb_font_double_engine_set:n #1 +\eb_clist_map_inline:nn + { main,sans,mono,CJKmain,CJKsans,CJKmono } { \exp_args:Nc \RenewDocumentCommand { set#1font }{O{}mO{}} {\use:c { eb_set#1font:nn } {##2} {##1,##3}} } -\eb_clist_map_function:nN - { main,sans,mono,CJKmain,CJKsans,CJKmono } - \eb_font_double_engine_set:n \RenewDocumentCommand{\newCJKfontfamily}{omO{}mO{}} { \tl_set:Nx \l_tmpa_tl @@ -299,7 +297,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/08/15}{1.28p} +\ProvidesExplPackage{easybase}{2021/08/16}{1.28q} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } @@ -511,20 +509,6 @@ Your~document~class~is~in~article~mode. \\ The~\string\chapter\space~command~will~not~be~used. } -\ctex_define:nn { style } - { - multoc .bool_set:N = \l__eb_toc_multi_column_bool, - multoc .default:n = true, - withpart .bool_set:N = \l__eb_chap_counter_withpart_bool, - withpart .default:n = true, - withpart .initial:n = false, - rulewidth .dim_set:N = \l__eb_rule_width_dim, - rulewidth .initial:n = 0.75pt, - uppercase .bool_set:N = \l__eb_mark_uppercase_bool, - uppercase .default:n = true, - uppercase .initial:n = true, - figurepath .tl_set:N = \l_eb_graphics_path_tl - } \LoadPackage { @@ -566,6 +550,41 @@ } { \eb_package_date_check:nn #1 } +\NewDocumentCommand{\eb_assign_tag_brackets:n} + {>{\SplitArgument{1}{,}}m} + {\eb_assign_tag_brackets_pos:nn #1} +\cs_new_protected:Npn \eb_assign_tag_brackets_pos:nn #1#2 + { + \tl_set:Nn \eb@tag@brackets@left {#1} + \tl_set:Nn \eb@tag@brackets@right {#2} + } +\cs_gset:Npn \tagform@ #1 + { + \maketag@@@ + { + \color{ctex@emph} + \eb@tag@brackets@left + \ignorespaces #1\unskip\@@italiccorr + \eb@tag@brackets@right + } + } +\ctex_define:nn { style } + { + multoc .bool_set:N = \l__eb_toc_multi_column_bool, + multoc .default:n = true, + withpart .bool_set:N = \l__eb_chap_counter_withpart_bool, + withpart .default:n = true, + withpart .initial:n = false, + rulewidth .dim_set:N = \l__eb_rule_width_dim, + rulewidth .initial:n = 0.75pt, + uppercase .bool_set:N = \l__eb_mark_uppercase_bool, + uppercase .default:n = true, + uppercase .initial:n = true, + brackets .code:n = \eb_assign_tag_brackets:n {#1}, + brackets .initial:n = { (,) }, + figurepath .tl_set:N = \l_eb_graphics_path_tl + } + \includepdfset{fitpaper = true} \geometry { @@ -1757,20 +1776,14 @@ \selectfont\ignorespaces } -\cs_new_protected:Npn \eb_float_proportion_set:nn #1#2 - { \tl_gset:cn { #1fraction } {#2} } \bool_if:NF \l__eb_float_page_bool { - \clist_map_inline:nn - { - { text } { 0.1 }, - { top } { 0.9 }, - { bottom } { 0.9 }, - { floatpage } {0.9 }, - { dbltop } { 0.9 }, - { dblfloatpage } { 0.9 } - } - { \eb_float_proportion_set:nn #1 } + \tl_gset:Nn \textfraction { 0.1 } + \tl_gset:Nn \topfraction { 0.9 } + \tl_gset:Nn \bottomfraction { 0.9 } + \tl_gset:Nn \floatpagefraction { 0.9 } + \tl_gset:Nn \dbltopfraction { 0.9 } + \tl_gset:Nn \dblfloatpagefraction { 0.9 } } \skip_set:Nn \parskip { 0pt plus 2pt minus 1pt } \skip_set:Nn \intextsep { 14pt plus 2pt minus 2pt } @@ -1816,12 +1829,6 @@ itemsep = 0.75ex plus .1ex,topsep = 0.75ex plus .1ex, partopsep = 0ex,parsep = 0ex } -\newlist{eb@outline@list}{itemize}{1} -\newlist{eb@exercise@list}{enumerate}{2} -\newlist{eb@eqcomp@list}{description}{1} -\setlist[eb@outline@list]{label = outline,itemsep = 0.5ex plus .1ex} -\setlist[eb@exercise@list]{labelsep = 0.5em,nosep} -\setlist[eb@eqcomp@list]{labelsep = 0em,nosep} \setlist[itemize,1]{label = bullet} \setlist[itemize,2]{label = endash} \setlist[itemize,3]{label = asterisk} @@ -1829,6 +1836,12 @@ \setlist[enumerate,2]{label = alph,ref = enumii,labelwidth = *} \setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *} \setlist[description]{font = sf,labelwidth = *,leftmargin = 2em} +\newlist{eb@outline@list}{itemize}{1} +\newlist{eb@exercise@list}{enumerate}{2} +\newlist{eb@eqcomp@list}{description}{1} +\setlist[eb@outline@list]{label = outline,itemsep = 0.5ex plus .1ex} +\setlist[eb@exercise@list]{labelsep = 0.5em,nosep} +\setlist[eb@eqcomp@list]{labelsep = 0em,nosep} \cs_new:Npn \setexerlist #1 { \setlist*[eb@exercise@list]{#1} } \cs_new:Npn \seteqcomplist #1 { \setlist*[eb@eqcomp@list]{#1} } \cs_new:Npn \setoutlinelist #1 { \setlist*[eb@outline@list]{#1} } @@ -1939,7 +1952,6 @@ headindent = \l__eb_thm_headindent_tl, headfont = \l__eb_thm_headfont_tl, notefont = \l__eb_thm_notefont_tl, - notebraces = \l__eb_thm_notebraces_tl, bodyfont = \l__eb_thm_bodyfont_tl, headpunct = \l__eb_thm_headpunct_tl, postheadspace = \l__eb_thm_postheadspace_tl, @@ -1950,32 +1962,13 @@ \l__eb_thmtools_entry_prop \c__eb_thmtools_entry_clist \prop_map_inline:Nn \l__eb_thmtools_entry_prop { \ctex_define:nn { thmset } { #1 .tl_set:N = #2 } } -\NewDocumentCommand{\eb_assign_tag_brackets:n} - {>{\SplitArgument{1}{,}}m} - {\eb_assign_tag_brackets_pos:nn #1} -\cs_new_protected:Npn \eb_assign_tag_brackets_pos:nn #1#2 - { - \tl_set:Nn \eb@tag@brackets@left {#1} - \tl_set:Nn \eb@tag@brackets@right {#2} - } -\cs_gset:Npn \tagform@ #1 - { - \maketag@@@ - { - \color{ctex@emph} - \eb@tag@brackets@left - \ignorespaces #1\unskip\@@italiccorr - \eb@tag@brackets@right - } - } \ctex_define:nn { thmset } { - thmbox .bool_set:N = \l__eb_thmbox_bool, - thmbox .default:n = true, - thmbox .initial:n = false, - brackets .code:n = \eb_assign_tag_brackets:n {#1}, - brackets .initial:n = { (,) }, - unknown .code:n = \eb_msg_unknown_option:n { thmset } + thmbox .bool_set:N = \l__eb_thmbox_bool, + thmbox .default:n = true, + thmbox .initial:n = false, + notebraces .tl_set:N = \l__eb_thm_notebraces_tl, + unknown .code:n = \eb_msg_unknown_option:n { thmset } } \ctex_set:nn { thmset } { @@ -1984,27 +1977,26 @@ headindent = 0em, headfont = \color{ctex@emph}\sffamily, postheadspace = 1em, + notebraces = {(}{)}, within = \bool_if:NT \l__eb_class_book_bool { chapter }, headformat = \NAME\space\NUMBER\NOTE } \eb_at_end_preamble:n { + \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]{easy-theorem} \eb_thm_name_set:nnn { exercise } { Exercise } { 练习 } \cs_undefine:N \proof - \clist_map_inline:nn - { - { lemma } { 引理 }, - { example } { 例 }, - { theorem } { 定理 }, - { corollary } { 推论 }, - { definition } { 定义 }, - { proposition } { 性质 }, - { remark } { 注 } [ numbered = no ], - { { proof } { 证明 } [ numbered = no,qed = \qedsymbol ] } - } - { \DeclareTheorem #1 } + \DeclareTheorem{lemma}{引理} + \DeclareTheorem{example}{例} + \DeclareTheorem{theorem}{定理} + \DeclareTheorem{corollary}{推论} + \DeclareTheorem{definition}{定义} + \DeclareTheorem{proposition}{性质} + \DeclareTheorem{remark}{注}[numbered = no] + \DeclareTheorem{proof}{证明}[numbered = no,qed = \qedsymbol] } \setchemformula @@ -2403,7 +2395,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/15}{1.28p} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/16}{1.28q} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } -- cgit v1.2.3