diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-09 21:04:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-09 21:04:51 +0000 |
commit | aaf82f524c0dfe58de47f941d55875e5a7a3e8da (patch) | |
tree | 2120172340bfe7c670600f735497ac1a93217338 /Master/texmf-dist/tex/latex | |
parent | 65ced2bb364c8d8a073845d6d98569f24c24f43c (diff) |
easybook (9dec21)
git-svn-id: svn://tug.org/texlive/trunk@61259 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 29 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 34 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 8 |
3 files changed, 30 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index cdd8b6b9d33..5da7c26c70a 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/12/08}{1.41L} +\ProvidesExplPackage{easybase}{2021/12/08}{1.41N} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -164,7 +164,7 @@ \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 +\tl_new:N \l__eb_foot_counter_parent_value_tl \eb_seq_map_inline:nn { @@ -174,11 +174,8 @@ } { \ctex_define:n { #1 .meta:nn = { ctex/#1 } {##1} } - \cs_new_protected:cpn {#1} ##1 { \ctex_set:nn {#1} {##1} } + \cs_new_protected:cpn { eb#1 } ##1 { \ctex_set:nn {#1} {##1} } } -\keys_define:nn { } { ctex/link .inherit:n = ctex/refset } -\ctex_define:n { link .meta:nn = { ctex/link } {#1} } -\cs_set_eq:NN \link \refset \eb_seq_map_inline:nn { style,subfont,spread,bibset,thmset,hdrset,tocset } { @@ -282,7 +279,7 @@ withpart .default:n = true, withpart .initial:n = false, rulewidth .dim_set:N = \l__eb_rule_width_dim, - rulewidth .initial:n = 0.6pt, + rulewidth .initial:n = 0.5pt, uppercase .bool_set:N = \l__eb_mark_uppercase_bool, uppercase .default:n = true, uppercase .initial:n = true, @@ -448,7 +445,7 @@ { footwith .choices:nn = { part,page,chapter } - { \tl_set:Nn \l__eb_foot_counter_parent_choice_tl {#1} }, + { \tl_set:Nn \l__eb_foot_counter_parent_value_tl {#1} }, footwith .value_required:n = true, footwith .initial:n = chapter } @@ -531,7 +528,7 @@ } \cs_set_eq:cN {#2} \l__eb_fnmate_short_tokens_tl } -\cs_new_protected:Npn \eb_footnote_choice_handle:n #1 +\cs_new_protected:Npn \eb_footnote_value_handle:n #1 { \str_case:nnF {#1} { @@ -539,7 +536,7 @@ { \bool_set_true:N \l__eb_fnpara_bottom_bool } { flush } { - \tl_set:Nn \l__eb_footnote_choice_tl { default } + \tl_set:Nn \l__eb_footnote_value_tl { default } \clist_push:Nn \l__eb_footnote_mulchoice_clist {#1} } } @@ -547,7 +544,7 @@ \bool_lazy_or:nnT { \str_if_eq_p:nn {#1} { hang } } { \str_if_eq_p:nn {#1} { default } } - { \tl_set:Nn \l__eb_footnote_choice_tl {#1} } + { \tl_set:Nn \l__eb_footnote_value_tl {#1} } } } \cs_new_protected:Npn \eb_fnmate_shift_set:nnn #1#2#3 @@ -593,7 +590,7 @@ footnotetype .multichoices:nn = { default,hang,bottom,para,flush } - { \eb_footnote_choice_handle:n {#1} }, + { \eb_footnote_value_handle:n {#1} }, footnotetype .value_required:n = true, footnotetype .initial:n = hang, @@ -628,7 +625,7 @@ \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox } \bool_if:NT \l__eb_chap_counter_withpart_bool { \counterwithin*{chapter}{part} } - \str_case:VnT \l__eb_foot_counter_parent_choice_tl + \str_case:VnT \l__eb_foot_counter_parent_value_tl { { part } { \counterwithin*{footnote}{part} } { page } { \counterwithin*{footnote}{page} } @@ -717,7 +714,7 @@ \cs_set:Npn \@makefntext #1 { \group_begin: - \str_case:Vn \l__eb_footnote_choice_tl + \str_case:Vn \l__eb_footnote_value_tl { { hang } { \use_i:nn } { default } { \use_ii:nn } @@ -727,7 +724,7 @@ \skip_set:NV \parskip \footparskip \dim_set:NV \parindent \footparindent \l__eb_fnpara_format_tl{#1} - \tl_if_eq:NnT \l__eb_footnote_choice_tl { hang } { \par } + \tl_if_eq:NnT \l__eb_footnote_value_tl { hang } { \par } \group_end: } \cs_set_eq:NN \eb@makefntext \@makefntext @@ -1438,7 +1435,7 @@ marginpar .initial:n = \rmfamily\footnotesize, unknown .code:n = \eb_msg_abandon_option:n { subfont } } -\cs_new_protected:Npn \addsubfont #1#2 +\cs_new_protected:Npn \addtosubfont #1#2 { \str_case:nnF {#1} { diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 7ca1ec98ed7..3935ea4d887 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -20,14 +20,14 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/12/08}{1.41L} +\ProvidesExplClass{easybook}{2021/12/08}{1.41N} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool \bool_set_false:N \l__eb_title_newline_bool \bool_set_true:N \l__eb_class_mode_book_bool \tl_new:N \g__eb_config_tl -\tl_new:N \l__eb_font_choice_tl +\tl_new:N \l__eb_font_value_tl \clist_new:N \g__eb_options_clist \cs_new_protected:Npn \eb_put_ctexbook:n #1 { \PassOptionsToClass{#1}{ctexbook} } @@ -40,18 +40,12 @@ enmode .meta:n = { newline,scheme = plain }, font .choices:nn = { noto,garamond,times,times*,libertine,palatino,auto } - { \tl_set:Nn \l__eb_font_choice_tl {#1} }, + { \tl_set:Nn \l__eb_font_value_tl {#1} }, font .value_required:n = true, font .initial:n = auto, cjkfont .code:n = \eb_put_ctexbook:n { fontset = #1 }, paper .code:n = \PassOptionsToPackage{#1}{geometry}, - mathfont .choices:nn = - { - noto,notosans,times,libertine, - charter,garamond,none,nc,stix - } - { \tl_set:Nn \l__eb_mathfont_choice_tl {#1} }, - mathfont .value_required:n = true, + mathfont .tl_set:N = \l__eb_mathfont_value_tl, mathfont .initial:n = times, class .choice:, class .value_required:n = true, @@ -77,7 +71,7 @@ \RequirePackage{easybase} \ctex_at_end:n { - \use:c { eb@font@load@\l__eb_font_choice_tl } + \use:c { eb@font@load@\l__eb_font_value_tl } \tl_if_empty:NF \g__eb_config_tl { \file_input:n { \g__eb_config_tl } } } @@ -236,18 +230,16 @@ } \cs_new_protected:Npn \eb_put_newtxmath:n #1 { \PassOptionsToPackage{#1}{newtxmath} } -\str_case:VnT \l__eb_mathfont_choice_tl +\cs_generate_variant:Nn \eb_put_newtxmath:n { V } +\str_case:VnF \l__eb_mathfont_value_tl + { + { times } { \LoadPackage{newtxmath+bm} } + { none } { } + } { - { 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 } } - { libertine } { \eb_put_newtxmath:n { libertine } } + \eb_put_newtxmath:V \l__eb_mathfont_value_tl + \LoadPackage{newtxmath+bm} } - { \LoadPackage{newtxmath+bm} } \ctex_set:n { diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index 602ac7c0de4..554368186a6 100644 --- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg +++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg @@ -18,17 +18,17 @@ %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/08}{1.41L} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/08}{1.41N} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 { \keys_set:nn { eb/exercise } {#1} } -\cs_set_protected:Npn \addtcbstyle #1#2 +\cs_set_protected:Npn \addtotcbstyle #1#2 { \tcbset{#1/.append~style = {#2}} } \cs_set_protected:Npn \deftcbstyle #1#2 { \tcbset{#1/.style = {#2}} } \cs_new_protected:Npn \tcbappstyle - { \@ifstar{\deftcbstyle}{\addtcbstyle} } + { \@ifstar{\deftcbstyle}{\addtotcbstyle} } \cs_set_eq:NN \newtcbstyle \deftcbstyle \keys_define:nn { eb/exercise } { @@ -44,7 +44,7 @@ tocnumsep .initial:n = 1em, label .tl_set:N = \eb@tc@exercise@label, enumitem .code:n = \setexerlist{#1}, - tcolorbox .code:n = \addtcbstyle{exercise}{#1} + tcolorbox .code:n = \addtotcbstyle{exercise}{#1} } \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } |