diff options
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r-- | macros/latex/contrib/easybook/easybook.dtx | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 86168e7329..169e50a8a7 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/12}{1.41Q} +\ProvidesExplClass{easybook}{2021/12/12}{1.41S} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -34,7 +34,7 @@ scheme .code:n = \eb_put_ctexbook:n { scheme = #1 }, enmode .meta:n = { newline,scheme = plain }, font .choices:nn = - { noto,garamond,times,times*,libertine,palatino,auto } + { noto,times,times*,ebgaramond,libertine,palatino,auto } { \tl_set:Nn \l__eb_font_value_tl {#1} }, font .value_required:n = true, font .initial:n = auto, @@ -79,6 +79,7 @@ \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 @@ -102,7 +103,7 @@ \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:n { \l_tmpa_tl } } + { \eb_switch_family:V \l_tmpa_tl } \eb_set_family:nnn { \l_tmpa_tl } {#3,#5} {#4} } @@ -184,7 +185,7 @@ BoldItalicFont = *-boldoblique } } -\cs_new_protected:Npn \eb@font@load@garamond +\cs_new_protected:Npn \eb@font@load@ebgaramond { \eb_setmainfont:nn { EBGaramond } { @@ -309,7 +310,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/12/12}{1.41Q} +\ProvidesExplPackage{easybase}{2021/12/12}{1.41S} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -567,8 +568,6 @@ 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.5pt, uppercase .bool_set:N = \l__eb_mark_uppercase_bool, uppercase .default:n = true, uppercase .initial:n = true, @@ -658,24 +657,28 @@ } \ctex_define:nn { hdrset } { - chap-mark .cs_set:Np = \eb_fancyhf_chapter_mark:n #1, - chap-mark .initial:n = \CTEXifname{\eb@mark@chapter@label}{}#1, - sec-mark .cs_set:Np = \eb_fancyhf_section_mark:n #1, - sec-mark .initial:n = \CTEXifname{\eb@mark@section@label}{}#1, - subsec-mark .cs_set:Np = \eb_fancyhf_subsection_mark:n #1, - subsec-mark .initial:n = \CTEXifname{\eb@mark@subsection@label}{}#1, - chap-label .code:n = \eb_mark_chapter_name_parse:n {#1}, - chap-label .initial:n = \hspace{1em}, - sec-label .code:n = \eb_mark_section_name_parse:n {#1}, - sec-label .initial:n = \hspace{0.5em}, - subsec-label .code:n = \eb_mark_subsection_name_parse:n {#1}, - subsec-label .initial:n = \hspace{0.5em}, - headrule .tl_gset:N = \headrule, - headrule .initial:n = \markrule{\l__eb_rule_width_dim}, - footrule .tl_gset:N = \footrule, - footrule .initial:n = { }, - footnoterule .tl_gset:N = \footnoterule, - footnoterule .initial:n = \markrule[0.35\textwidth]{\l__eb_rule_width_dim}[|2.6pt] + chap-mark .cs_set:Np = \eb_fancyhf_chapter_mark:n #1, + chap-mark .initial:n = \CTEXifname{\eb@mark@chapter@label}{}#1, + sec-mark .cs_set:Np = \eb_fancyhf_section_mark:n #1, + sec-mark .initial:n = \CTEXifname{\eb@mark@section@label}{}#1, + subsec-mark .cs_set:Np = \eb_fancyhf_subsection_mark:n #1, + subsec-mark .initial:n = \CTEXifname{\eb@mark@subsection@label}{}#1, + chap-label .code:n = \eb_mark_chapter_name_parse:n {#1}, + chap-label .initial:n = \hspace{1em}, + sec-label .code:n = \eb_mark_section_name_parse:n {#1}, + sec-label .initial:n = \hspace{0.5em}, + subsec-label .code:n = \eb_mark_subsection_name_parse:n {#1}, + subsec-label .initial:n = \hspace{0.5em}, + headrulewd .dim_set:N = \eb@head@rule@wd, + headrulewd .initial:n = 0.5pt, + footnoterulewd .dim_set:N = \eb@footnote@rule@wd, + footnoterulewd .initial:n = 0.5pt, + headrule .tl_gset:N = \headrule, + headrule .initial:n = \markrule{\eb@head@rule@wd}, + footrule .tl_gset:N = \footrule, + footrule .initial:n = { }, + footnoterule .tl_gset:N = \footnoterule, + footnoterule .initial:n = \markrule[0.35\textwidth]{\eb@footnote@rule@wd}[|2.6pt] } \cs_set_eq:NN \eb_mark_uppercase:n \text_uppercase:n @@ -2223,11 +2226,11 @@ belowcaptionskip = 1.5ex, keepspaces = true, escapeinside = {(*}{*)}, - framerule = \l__eb_rule_width_dim, + frame = single, + framerule = 0.5pt, + framesep = 4.5pt, xleftmargin = 5pt, xrightmargin = 5pt, - framesep = \dimexpr(5pt - \l__eb_rule_width_dim), - frame = single, rulecolor = \color{ctex@frame}, commentstyle = \color{SlateGray}, emphstyle = \color{ctex@emph} @@ -2430,7 +2433,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/12}{1.41Q} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/12}{1.41S} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 @@ -2520,21 +2523,20 @@ { standard~jigsaw,on~line, top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt, - boxrule = 0.5pt,arc = 1pt, - opacityback = 0.2 + arc = 1pt,opacityback = 0.2 } \deftcbstyle{tc-ebfbox} { on~line,sharpish~corners, top = 1.5pt,bottom = 1.5pt,left = 1pt,right = 1pt, - boxrule = 0.5pt,leftrule = 0pt,rightrule = 0pt + leftrule = 0pt,rightrule = 0pt } \tcbset { breakable, boxsep = 0pt, fonttitle = \sffamily, - boxrule = \l__eb_rule_width_dim + boxrule = 0.5pt } \tl_new:N \p@eb@exercise |