diff options
author | Karl Berry <karl@freefriends.org> | 2021-11-29 21:11:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-11-29 21:11:20 +0000 |
commit | 1f8faf3d0b1260c492c706b5a523fc2eda244dff (patch) | |
tree | 388d337dc708372d17224175ac6a9b3ecb357497 /Master/texmf-dist/tex/latex | |
parent | 4ba2e0681aa294664393dfcc3362fe924d1ed0db (diff) |
easybook (29nov21)
git-svn-id: svn://tug.org/texlive/trunk@61184 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 60 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 2 |
3 files changed, 40 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index ab3ff40924b..ba583221c87 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/11/28}{1.41A} +\ProvidesExplPackage{easybase}{2021/11/28}{1.41B} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -983,9 +983,9 @@ lolskip .initial:n = 10pt, main-voffset .skip_set:N = \l__eb_toc_main_voffset_skip, main-voffset .initial:n = \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.2pc }, - line-align .bool_set:N = \l__eb_toc_line_align_bool, - line-align .default:n = true, - line-align .initial:n = true, + dotalign .bool_set:N = \l__eb_toc_dot_align_bool, + dotalign .default:n = true, + dotalign .initial:n = true, hang .bool_set:N = \eb@titletoc@hang@fix@bool, hang .default:n = true, hang .initial:n = false, @@ -999,7 +999,7 @@ \IfBooleanTF{#1} {\thecontentspage} { - \bool_if:NTF \l__eb_toc_line_align_bool + \bool_if:NTF \l__eb_toc_dot_align_bool { \contentspage } { \thecontentspage } } @@ -1208,7 +1208,8 @@ \keys_define:nn { eb/listoc } { section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section }, - chapter .code:n = { }, + chapter .code:n = \tl_set:Nn \l__eb_toc_type_tl { chapter }, + none .code:n = \tl_set:Nn \l__eb_toc_type_tl { none }, article .meta:n = section, book .meta:n = chapter, multoc .int_set:N = \l__eb_toc_columns_int, @@ -1231,31 +1232,40 @@ { \tl_set:Nn \eb@bitoc@title {#2} } } -\cs_new_protected:Npn \eb_title_mark_intoc:n #1 +\cs_new_protected:Npn \eb_toc_type_section_initial: { - \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter } - { \bichapter*{#1}{\eb@bitoc@title} } - { \bisection*{#1}{\eb@bitoc@title} } + \bool_if:NF \l__eb_class_book_bool + { + \tl_if_eq:NnT \l__eb_toc_type_tl { chapter } + { \tl_set:Nn \l__eb_toc_type_tl { section } } + } } -\cs_new_protected:Npn \eb_title_mark_notoc:n #1 +\cs_new_protected:Npn \eb_title_mark_intoc:n #1 { - \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter } + \str_case:Vn \l__eb_toc_type_tl { - \chapter*{\phantomsection #1} - \chaptermark{#1} + { chapter } { \bichapter*{#1}{\eb@bitoc@title} } + { section } { \bisection*{#1}{\eb@bitoc@title} } } + } +\cs_new_protected:Npn \eb_title_mark_notoc:n #1 + { + \str_case:Vn \l__eb_toc_type_tl { - \section*{\phantomsection #1} - \sectionmark{#1} + { chapter } { \chapter*{\phantomsection #1}\chaptermark{#1} } + { section } { \section*{\phantomsection #1}\sectionmark{#1} } } } \cs_new_protected:Npn \eb_title_number_intoc_spec:nn #1#2 { + \eb_toc_type_section_initial: \IfBooleanTF{#1} { - \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter } - { \bichapter{\eb@toc@title}{\eb@bitoc@title} } - { \bisection{\eb@toc@title}{\eb@bitoc@title} } + \str_case:Vn \l__eb_toc_type_tl + { + { chapter } { \bichapter{\eb@toc@title}{\eb@bitoc@title} } + { section } { \bisection{\eb@toc@title}{\eb@bitoc@title} } + } }{ \IfBooleanTF{#2} {\eb_title_mark_notoc:n { \eb@toc@title }} @@ -1279,13 +1289,18 @@ } { \@starttoc{#1} } } +\cs_new_protected:Npn \eb_toc_if_title_voffset:n #1 + { + \tl_if_eq:NnF \l__eb_toc_type_tl { none } + { \vspace*{-\dim_use:c { l__eb_toc_#1_voffset_skip }} } + } \cs_new_protected:Npn \eb_toc_list_parse:nnnnn #1#2#3#4#5 { \group_begin: \tl_set_eq:Nc \eb@toc@title { list#4name } \IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}} \eb_title_number_intoc_spec:nn {#2} {#1} - \vspace*{-\dim_use:c { l__eb_toc_#4_voffset_skip }} + \eb_toc_if_title_voffset:n {#4} \eb_toc_start_multi_column_ext:n {#5} \group_end: } @@ -1308,13 +1323,14 @@ \tl_set_eq:NN \eb@toc@title \contentsname \tl_set:Nn \eb@bitoc@title { Contents } \IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}} + \eb_toc_type_section_initial: \eb_title_mark_notoc:n { \eb@toc@title } - \vspace*{-\dim_use:N \l__eb_toc_main_voffset_skip} + \eb_toc_if_title_voffset:n { main } \eb_toc_start_multi_column_ext:n { toc }#3 \IfBooleanT{#1} { \eb_title_mark_notoc:n { \eb@bitoc@title } - \vspace*{-\dim_use:N \l__eb_toc_main_voffset_skip} + \eb_toc_if_title_voffset:n { main } \eb_toc_start_multi_column_ext:n { tec } } \group_end: diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 714c473b56c..7cae1be57f3 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}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/11/28}{1.41A} +\ProvidesExplClass{easybook}{2021/11/28}{1.41B} {Typeset 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 fb341f67a9d..9db6c0b5c06 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}{2021/11/28}{1.41A} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/28}{1.41B} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \setexercise #1 |