From 3b2bc6d736a76fce45995dc3ee3f60d5356f9af4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 18 Feb 2024 21:06:20 +0000 Subject: easybook (18feb24) git-svn-id: svn://tug.org/texlive/trunk@69963 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/easybook/easybase.sty | 105 +++++++++++++-------- Master/texmf-dist/tex/latex/easybook/easybook.cls | 2 +- .../texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 2 +- 3 files changed, 68 insertions(+), 41 deletions(-) (limited to 'Master/texmf-dist/tex/latex/easybook') diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 9fac3e3a21c..23c4eb1d843 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}[2021/11/15] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2024/02/16}{2024ad} +\ProvidesExplPackage{easybase}{2024/02/18}{2024ae} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -353,19 +353,19 @@ } \ctex_define:nn { hdrset } { - chap-mark .cs_set:Np = \eb_fancyhf_chapter_mark:n #1, + chap-mark .cs_set:Np = \eb@mark@chapter@whole #1, chap-mark .initial:n = { \CTEXifname{\eb@mark@chapter@label}{} \eb_mark_uppercase_case_init:n {#1} }, - sec-mark .cs_set:Np = \eb_fancyhf_section_mark:n #1, + sec-mark .cs_set:Np = \eb@mark@section@whole #1, sec-mark .initial:n = { \CTEXifname{\eb@mark@section@label}{} \eb_mark_uppercase_case_init:n {#1} }, - subsec-mark .cs_set:Np = \eb_fancyhf_subsection_mark:n #1, + subsec-mark .cs_set:Np = \eb@mark@subsection@whole #1, subsec-mark .initial:n = { \CTEXifname{\eb@mark@subsection@label}{} @@ -391,9 +391,9 @@ \cs_set:Npn \markdouble #1 { \markboth{#1}{\ifbool{@twoside}{#1}{}} } \cs_new:Npn \eb@level@markdouble #1#2 - { \markdouble{\use:c { eb_fancyhf_#1_mark:n } {#2}} } + { \markdouble{\use:c { eb@mark@#1@whole } {#2}} } \cs_new:Npn \eb@level@markright #1#2 - { \markright{\use:c { eb_fancyhf_#1_mark:n } {#2}} } + { \markright{\use:c { eb@mark@#1@whole } {#2}} } \cs_gset:Npn \chaptermark #1 { \eb@level@markdouble{chapter}{#1} } \cs_gset:Npn \sectionmark #1 { @@ -755,8 +755,8 @@ \eb_patch_cmd:Nnn #1 { \reset@font } { - \setspread{\fp_use:N \l__eb_spread_footnote_fp} - \tl_use:N \l__eb_subfont_footnote_tl + \setspread{\eb@spread@footnote} + \eb@subfont@footnote } } \cs_set_eq:NN \eb@@makefntext \@makefntext @@ -873,7 +873,7 @@ { \tl_clear:N \l__eb_fnmarktext_format_tl } } \bool_if:NF \l__eb_fnmarktext_format_match_bool { \spbset{spcmd = { }} } - \tl_use:N \l__eb_subfont_footnote_tl + \eb@subfont@footnote } \cs_new_protected:Npn \defupfntmark #1 { \cs_set:Npn \@makefnmark { \hbox:n {#1} } } @@ -1051,8 +1051,12 @@ } } +\cs_new_protected:Npn \SetTocOuter #1 + { \keys_set:nn { eb/tocouter } {#1} } \tl_new:N \eb@bitoc@title -\keys_define:nn { eb/floattoc } +\newbool{bitoc} +\cs_new:Npn \ebifbitoc { \ifbool{bitoc} } +\keys_define:nn { eb/tocouter } { level .tl_set:N = \eb@toc@title@level, level .initial:n = @@ -1087,13 +1091,27 @@ plan .initial:n = cn, columns .meta:n = { multoc = #1 }, title .code:n = \eb_assign_toc_title:n {#1}, - bilist .tl_gset:N = \g__eb_bilist_permute_value_tl, + bilist .code:n = + { + \tl_gset:Nn \g__eb_bilist_permute_value_tl {#1} + \str_if_eq:nnTF {#1} { mix } + { + \eb_preto_cmd:nn { CTEX@addtocline } + { \addtocontents{toc}{\boolfalse{bitoc}} } + \eb_preto_cmd:nn { CTEX@addbitocline } + { \addtocontents{toc}{\booltrue{bitoc}} } + } + { + \RemoveFromHook{cmd/CTEX@addtocline/before} + \RemoveFromHook{cmd/CTEX@addbitocline/before} + } + }, name .tl_set:N = \l__eb_print_index_name_tl, name .initial:n = \imki@jobname } \bool_if:NTF \l__eb_class_mode_book_bool - { \keys_define:nn { } { eb/floattoc .inherit:n = ctex/chapter } } - { \keys_define:nn { } { eb/floattoc .inherit:n = ctex/section } } + { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/chapter } } + { \keys_define:nn { } { eb/tocouter .inherit:n = ctex/section } } \NewDocumentCommand{\eb_assign_toc_title:n} {>{\SplitArgument{1}{,}}m} {\eb_assign_toc_title_judge:nn #1} @@ -1133,7 +1151,7 @@ { \group_begin: \tl_set_eq:Nc \eb@toc@title { list#4name } - \IfValueT{#3}{\keys_set:nn { eb/floattoc } {#3}} + \IfValueT{#3}{\keys_set:nn { eb/tocouter } {#3}} \eb_toc_title_level_cmd:n {#1} \eb_toc_if_title_between_hook:nn {#1} {#4} \eb_toc_start_multi_column_ext:n {#5} @@ -1188,7 +1206,7 @@ { \chapter* } { \section* } } - \IfValueT{#3}{\keys_set:nn { eb/floattoc } {#3}} + \IfValueT{#3}{\keys_set:nn { eb/tocouter } {#3}} \bool_if:NT \l__eb_toc_plan_cn_bool { \IfBooleanF{#1}{\eb@toc@title@level{\eb@toc@title}{}} @@ -1197,9 +1215,12 @@ } \bool_if:NT \l__eb_toc_plan_bi_bool { - \IfBooleanF{#1}{\eb@toc@title@level{\eb@bitoc@title}{}} - \eb_toc_if_title_between_hook:nn {#1} { bimain } - \eb_toc_start_multi_column_ext:n { tec } + \tl_if_eq:NnF \g__eb_bilist_permute_value_tl { mix } + { + \IfBooleanF{#1}{\eb@toc@title@level{\eb@bitoc@title}{}} + \eb_toc_if_title_between_hook:nn {#1} { bimain } + \eb_toc_start_multi_column_ext:n { tec } + } } \group_end: } @@ -1328,7 +1349,7 @@ \cs_set_eq:NN \eb@ctexsetii \ctex_set:nn \cs_new_protected:Npn \SetTocStyle #1#2#3 { - \cs_set:cpn { eb@toc@style@set@#1@#2 } + \cs_set_protected:cpn { eb@toc@style@set@#1@#2 } { \eb@ctexsetii{#1}{#3} } } \cs_new_protected:Npn \UseTocStyle #1#2#3 @@ -1377,7 +1398,7 @@ \group_begin: \tl_set_eq:NN \eb@toc@title \indexname \cs_set_eq:NN \imki@indexlevel \use_none:n - \IfValueT{#3}{\keys_set:nn { eb/floattoc } {#3}} + \IfValueT{#3}{\keys_set:nn { eb/tocouter } {#3}} \cs_set_protected:Npn \imki@indexheaders { \eb_toc_title_level_cmd:n {#1} @@ -1439,7 +1460,7 @@ caption-listing = #1 }, caption-every .initial:n = \sffamily\small, - footnote .tl_set:N = \l__eb_subfont_footnote_tl, + footnote .tl_set:N = \eb@subfont@footnote, marginpar .tl_set:N = \marginfont, marginpar .initial:n = \footnotesize, unknown .code:n = \eb_msg_deprecated_option:n { subfont } @@ -1465,23 +1486,23 @@ } \ctex_define:nn { spread } { - line .code:n = \AfterPreamble{\setspread{#1}}, + line .code:n = \setspread{#1}, line .initial:n = { - \fp_if_nan:nTF { \l__ctex_line_spread_fp } + \fp_compare:nNnTF { \l__ctex_line_spread_fp } = { 1.3 } { 1.354 } { \fp_use:N \l__ctex_line_spread_fp } }, 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.354, + math .initial:n = 1.2, footnote .code:n = { - \fp_set:Nn \l__eb_spread_footnote_fp {#1} + \tl_set:Nn \eb@spread@footnote {#1} \group_begin: \footnotesize - \setspread{\fp_use:N \l__eb_spread_footnote_fp} + \setspread{\eb@spread@footnote} \exp_args:NNNo \group_end: \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox } }, @@ -1500,8 +1521,22 @@ line = #1,table = #1,math = #1, caption-every = #1,footnote = #1 }, - unknown .code:n = \eb_msg_deprecated_option:n { spread } + abovedisplayskip .code:n = + {\AfterPreamble{\skip_set:Nn \abovedisplayskip {#1}}}, + abovedisplayskip .initial:n = 0.5ex plus .1ex minus .1ex, + belowdisplayskip .code:n = + { + \AfterPreamble + { + \skip_set:Nn \belowdisplayskip {#1} + \skip_set:Nn \belowdisplayshortskip {#1} + } + }, + belowdisplayskip .initial:n = 0.5ex plus .1ex minus .1ex, + unknown .code:n = \eb_msg_deprecated_option:n { spread } } +\AfterPreamble + {\skip_set:Nn \abovedisplayshortskip { 0ex plus .1ex }} \eb_seq_map_inline:nn { table,figure,listing } @@ -1529,9 +1564,9 @@ \captionsetup[table][bi-second]{name = Table} } \eb_at_begin_environment:nn - { tabular,tabularx,tblr,longtblr,longtable } + { tabular,tabularx,longtblr,longtable } { \setspread{\fp_use:N \l__eb_spread_table_fp} } -\IfPackageAtLeastTF{tabularray}{2021/07/01}{\UseTblrLibrary{booktabs}}{} +\UseTblrLibrary{booktabs} \bool_if:NF \l__eb_float_page_bool { @@ -1745,13 +1780,6 @@ \setspread{\fp_use:N \l__eb_spread_math_fp} \spread@equation } -\ctex_after_end_preamble:n - { - \skip_set:Nn \abovedisplayskip { 6pt plus 1pt minus 1pt } - \skip_set:Nn \belowdisplayskip { 6pt plus 1pt minus 1pt } - \skip_set:Nn \abovedisplayshortskip { 0pt plus 1pt minus 1pt } - \skip_set:Nn \belowdisplayshortskip { 6pt plus 1pt minus 1pt } - } \ctex_at_end_package:nn { unicode-math } { \msg_redirect_module:nnn { unicode-math } { warning } { info } } \ctex_at_end_package:nn { tcolorbox } @@ -1794,7 +1822,7 @@ { \group_begin: \tl_set_eq:NN \eb@toc@title \bibname - \IfValueT{##3}{ \keys_set:nn { eb/floattoc } {##3} } + \IfValueT{##3}{ \keys_set:nn { eb/tocouter } {##3} } \cs_set_protected:Npn \bibsection { \eb_toc_title_level_cmd:n {##1} @@ -1815,7 +1843,6 @@ \bool_if:NTF \l__eb_class_mode_book_bool { \bichapter*{#1}{\eb@bib@bitoc@title} } { \bisection*{#1}{\eb@bib@bitoc@title} } - \sectionmark{#1} } \cs_new_protected:Npn \eb_biber_biblatex_set: { @@ -1938,7 +1965,7 @@ \clist_map_function:nN { { none, 000000,000000,000000 }, - { seaside, 4169e1,9932cc,eb6100 }, + { seaside, 3f3fc4,9932cc,09cc00 }, { energy, f39800,00a0e9,893895 }, { cyberpunk, 601986,eb6877,a4005b } } diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 0a52ccb2eab..efaff728239 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}[2021/11/15] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2024/02/16}{2024ad} +\ProvidesExplClass{easybook}{2024/02/18}{2024ae} {Easily typesetting Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index 21290f966ae..f2f9b541d89 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}{2024/02/16}{2024ad} +\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/18}{2024ae} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 -- cgit v1.2.3