diff options
author | Karl Berry <karl@freefriends.org> | 2024-05-12 19:13:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-05-12 19:13:22 +0000 |
commit | 78682e50a10cf6f5b835a01ea798e1e67c604706 (patch) | |
tree | fe9ec4ce1c19f3083a284a3a2cbb95fba7f5ec31 /Master/texmf-dist/tex/latex | |
parent | 1fd451410782129bfc0b3a8c7ccf9879a9c09df8 (diff) |
easybook (12may24)
git-svn-id: svn://tug.org/texlive/trunk@71242 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 121 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 2 |
3 files changed, 72 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 2dae33aa53b..78dd12dd720 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{etoolbox} -\ProvidesExplPackage{easybase}{2024/05/10}{2024bn} +\ProvidesExplPackage{easybase}{2024/05/12}{2024bo} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -37,11 +37,6 @@ \cs_set_protected:Npn \ctex_define:nn #1 { \keys_define:nn { ctex/#1 } } -\cs_new_protected:Npn \eb_seq_map_inline:nn #1#2 - { - \seq_set_from_clist:Nn \l_tmpa_seq {#1} - \seq_map_inline:Nn \l_tmpa_seq {#2} - } \cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3 { \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3} @@ -53,7 +48,7 @@ { \AddToHook{cmd/#1/after}{#2} } \cs_new_protected:Npn \eb_at_begin_environment:nn #1#2 { - \eb_seq_map_inline:nn {#1} + \clist_map_inline:nn {#1} { \AtBeginEnvironment{##1}{#2} } } \cs_new_protected:Npn \eb_at_end_preamble:n @@ -79,7 +74,7 @@ \RenewDocumentCommand{\usepackage}{O{}mO{}} { \PassOptionsToPackage{#1}{#2} - \eb_seq_map_inline:nn {#2} + \clist_map_inline:nn {#2} { \eb_if_package_loaded:nnF {##1} {#1} { \eb@usepackage@save{##1}[#3] } @@ -102,7 +97,7 @@ \int_compare:nTF { \clist_count:n {#1} <= 1 } { \RequirePackage } { - \eb_seq_map_inline:nn {#1} + \clist_map_inline:nn {#1} { \eb_match_load_package:n {##1} } } } @@ -159,6 +154,10 @@ {\RequirePackage[heading]{ctex}} } } +\ctex_disable_package:n { nccfoots } +\ctex_disable_package:n { setspace } +\ctex_disable_package:n { tocloft } +\ctex_disable_package:n { titlesec } \seq_set_from_clist:Nn \l__eb_module_paths_seq { @@ -330,7 +329,7 @@ \booltrue{@mainmatter} \pagenumbering{arabic} } -\eb_seq_map_inline:nn +\clist_map_inline:nn { chapter,section,subsection } { \exp_args:Nc \NewDocumentCommand { eb@mark@#1@label@layout } @@ -545,7 +544,7 @@ \cs_new_protected:Npn \eb_fnmarktext_short_label_set:Nn #1#2 { \tl_set:Nn \l__eb_fnmarktext_short_tokens_tl {#2} - \eb_seq_map_inline:nn + \clist_map_inline:nn { A,a,1,I,i,c,s } { \regex_match:nnT {##1} {#2} @@ -762,7 +761,7 @@ \l__eb_fnpara_format_tl{#1} \tl_if_eq:NnT \l__eb_footnote_value_tl { hang } { \par } } -\eb_seq_map_inline:nn { \@footnotetext,\@mpfootnotetext } +\clist_map_inline:nn { \@footnotetext,\@mpfootnotetext } { \eb_patch_cmd:Nnn #1 { \reset@font } @@ -1010,7 +1009,7 @@ { \use:c { CTEX@#1@tocline }{#1}{#2} } \group_end: } -\cs_new_protected:Npn \RegisterBititle #1 +\cs_new_protected:Npn \eb@register@bititle #1 { \exp_args:Nc \NewDocumentCommand { bi#1 }{sO{##3}mm} { @@ -1027,9 +1026,12 @@ } } } -\clist_map_function:nN - { chapter,section,subsection } - \RegisterBititle +\cs_new_protected:Npn \RegisterBititle #1 + { + \clist_map_function:nN {#1} + \eb@register@bititle + } +\RegisterBititle{chapter,section,subsection} \eb_preto_cmd:nn { @chapter } { \skip_if_eq:nnF { \eb@toc@lol@skip } { \c_zero_skip } @@ -1098,7 +1100,7 @@ hyphen-every .initial:n = ., unknown .code:n = \eb_msg_deprecated_option:n { tools } } -\eb_seq_map_inline:nn +\clist_map_inline:nn { figure,table,listing,equation } { \cs_set:cpn { the#1 } @@ -1344,7 +1346,7 @@ \ctex_set:nn {#2} { tocformat = \IfBooleanT{#1}{\contentsmargin{0pt}}, - tocindent = 0em, + tocindent = 0pt, tocrule = \IfBooleanTF{#1}{,~\thecontentspage}{\tocrule{$\cdot$}}, toclabel = { @@ -1360,13 +1362,19 @@ } \seq_new:N \l__eb_toc_every_include_name_seq \cs_new_protected:Npn \ExcludeEveryTocName #1 - { \seq_remove_all:Nn \l__eb_toc_every_include_name_seq {#1} } + { + \clist_map_inline:nn {#1} + { \seq_remove_all:Nn \l__eb_toc_every_include_name_seq {##1} } + } \cs_new_protected:Npn \IncludeEveryTocName #1 { - \seq_put_right:Nn \l__eb_toc_every_include_name_seq {#1} - \seq_remove_duplicates:N \l__eb_toc_every_include_name_seq + \clist_map_inline:nn {#1} + { + \seq_put_right:Nn \l__eb_toc_every_include_name_seq {##1} + \seq_remove_duplicates:N \l__eb_toc_every_include_name_seq + } } -\NewDocumentCommand{\RegisterTocName}{sm} +\cs_new_protected:Npn \eb@register@toc@name #1#2 { \IfBooleanT{#1} { @@ -1384,10 +1392,16 @@ \tl_clear:N \l__eb_toc_tmpa_tl \tl_clear:N \l__eb_toc_tmpb_tl } -\seq_map_function:NN -\c__ctex_headings_seq \RegisterTocName +\NewDocumentCommand{\RegisterTocName}{sm} + { + \clist_map_inline:nn {#2} + { \eb@register@toc@name{#1}{##1} } + } +\clist_set_from_seq:NN +\c__ctex_headings_clist \c__ctex_headings_seq +\exp_args:NV \RegisterTocName \c__ctex_headings_clist \ctex_define:n { float/unknown .code:n = \eb_msg_deprecated_option:n { float } } -\cs_new_protected:Npn \RegisterEveryTocOption #1 +\cs_new_protected:Npn \eb@register@every@toc@option #1 { \ctex_define:nn { toc } { @@ -1398,9 +1412,12 @@ } } } -\clist_map_function:nN - { tocafter,tocindent,tocrule } - \RegisterEveryTocOption +\cs_new_protected:Npn \RegisterEveryTocOption #1 + { + \clist_map_function:nN {#1} + \eb@register@every@toc@option + } +\RegisterEveryTocOption{tocafter,tocindent,tocrule} \NewDocumentCommand{\tocrule}{st-O{0.7pc}d()mO{}} { \normalsize\normalfont @@ -1489,21 +1506,21 @@ part = { tocformat = \addvspace{1pc}\sffamily\large, - tocindent = 0em, + tocindent = 0pt, tocrule = \tocrule{}[\bfseries], tocline = \CTEXnumberline{#1}#2 }, chapter = { tocformat = \addvspace{1pc}\sffamily, - tocindent = 0em, + tocindent = 0pt, tocrule = \tocrule{$\cdot$}[\bfseries], tocline = \CTEXnumberline{#1}#2 }, section = { tocformat = \bool_if:NF \l__eb_class_mode_book_bool { \sffamily }, - tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 1.5em } { 0em }, + tocindent = \bool_if:NTF \l__eb_class_mode_book_bool { 1.5em } { 0pt }, tocrule = { \bool_if:NTF \l__eb_class_mode_book_bool @@ -1540,7 +1557,7 @@ binumber .initial:n = \arabic{chapter} } \cs_new_protected:Npn \eb_counter_zero:n #1 - { \eb_seq_map_inline:nn {#1} { \setcounter{##1}{0} } } + { \clist_map_inline:nn {#1} { \setcounter{##1}{0} } } \RenewDocumentCommand{\appendix} {O{Appendix\space}D(){\Alph{chapter}}} { @@ -1612,18 +1629,13 @@ } } \cs_set_eq:NN \addtosubfont \ebaddtofont + \ctex_define:nn { spread } { line .code:n = \setspread{#1}, - line .initial:n = - { - \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, + table .initial:n = 1.2, + math .tl_set:N = \eb@spread@math, math .initial:n = 1.2, footnote .code:n = { @@ -1663,10 +1675,15 @@ 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 }} +\tl_if_eq:NnT \l__ctex_scheme_tl { chinese } + { + \fp_compare:nNnTF { \l__ctex_line_spread_fp } = { 1.3 } + { \ctex_set:nn { spread } { line = 1.354,table = 1.354 } } + { \ctex_set:nn { spread } { line = \fp_use:N \l__ctex_line_spread_fp } } + } +\AfterPreamble{\skip_set:Nn \abovedisplayshortskip { 0ex plus .1ex }} -\eb_seq_map_inline:nn +\clist_map_inline:nn { table,figure,listing } { \DeclareCaptionFont{eb@#1@font} @@ -1741,7 +1758,7 @@ }{} \cs_new_protected:Npn \eb_enumitem_label_set:nn #1#2 { \SetEnumitemValue{label}{#1}{\color{ctex@emph}#2} } -\eb_seq_map_inline:nn +\clist_map_inline:nn { { bullet } { \textbullet }, { endash } { \normalfont\bfseries\textendash }, @@ -1764,7 +1781,7 @@ \setlist[enumerate,3]{label = roman,ref = enumiii} \setlist[description]{font = sf,style = standard} \newlist{eb@eqcomp@list}{description}{1} -\setlist[eb@eqcomp@list]{nosep,labelsep = 0em} +\setlist[eb@eqcomp@list]{nosep,labelsep = 0pt} \cs_new:Npn \seteqcomplist #1 { \setlist*[eb@eqcomp@list]{#1} } \keys_define:nn { eb/eqcomp } @@ -1772,7 +1789,7 @@ width .dim_set:N = \l__eb_eqsymb_width_dim, width .initial:n = 10pt, delim .tl_set:N = \l__eb_eqsymb_delim_tl, - delim .initial:n = ——, + delim .initial:n = \tl_if_eq:NnTF \l__ctex_scheme_tl { chinese } { —— } { --- }, space .dim_set:N = \l__eb_eqsymb_space_dim, space .initial:n = 0.25em, item-align .tl_set:N = \l__eb_eqsymb_item_align_tl, @@ -1862,7 +1879,7 @@ \declaretheoremstyle{default}[ spaceabove = 0ex plus .1ex, spacebelow = 0ex plus .1ex, - headindent = 0em, + headindent = 0pt, within = \bool_if:NT \l__eb_class_mode_book_bool { chapter }, headpunct = { }, headfont = \color{ctex@emph}\sffamily, @@ -1928,21 +1945,21 @@ cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*, aligned,alignedat,gathered,multlined,lgathered,rgathered } - { \setspread{\fp_use:N \l__eb_spread_math_fp} } -\eb_seq_map_inline:nn + { \setspread{\eb@spread@math} } +\clist_map_inline:nn { \start@gather,\start@align,\start@multline } { \eb_patch_cmd:Nnn #1 { \collect@body } { - \setspread{\fp_use:N \l__eb_spread_math_fp} + \setspread{\eb@spread@math} \collect@body } } \eb_patch_cmd:Nnn \gather@split { \spread@equation } { - \setspread{\fp_use:N \l__eb_spread_math_fp} + \setspread{\eb@spread@math} \spread@equation } \ctex_at_end_package:nn { unicode-math } @@ -2108,7 +2125,7 @@ }, } } -\eb_seq_map_inline:nn +\clist_map_inline:nn { { linkcolor } { link }, { color } { theme } diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index d19d6926cc9..220a6b5eec8 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -19,7 +19,7 @@ %% %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2021/11/15] -\ProvidesExplClass{easybook}{2024/05/10}{2024bn} +\ProvidesExplClass{easybook}{2024/05/12}{2024bo} {Easily typesetting Chinese theses or books} \bool_new:N \l__eb_compile_draft_bool @@ -90,7 +90,7 @@ { \eb_set_family:xnn { \CJKsfdefault } {#2} {#1} } \cs_new_protected:Npn \eb_setCJKmonofont:nn #1#2 { \eb_set_family:xnn { \CJKttdefault } {#2} {#1} } -\eb_seq_map_inline:nn +\clist_map_inline:nn { main,sans,mono,CJKmain,CJKsans,CJKmono } { \exp_args:Nc \RenewDocumentCommand { set#1font }{O{}mO{}} diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index f324dad2a02..fea29c72b1e 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/05/10}{2024bn} +\ProvidesExplFile{eb-tcolorbox.cfg}{2024/05/12}{2024bo} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 |