diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 72 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 2 |
2 files changed, 51 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 080c7f9e569..ce81ac27db4 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybase.sty +++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty @@ -13,7 +13,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{etoolbox} -\ProvidesExplPackage{easybase}{2021/06/05}{1.25t}{beta} +\ProvidesExplPackage{easybase}{2021/06/06}{1.25u}{beta} \cs_generate_variant:Nn \eb_ctex_define:nn { nx } \cs_generate_variant:Nn \int_to_arabic:n { v } @@ -794,12 +794,14 @@ } \tl_set:Nx \l__eb_toc_type_tl - { \bool_if:NTF \l__eb_class_book_bool { book } { article } } + { \bool_if:NTF \l__eb_class_book_bool { chapter } { section } } \tl_new:N \eb@bitoc@title \keys_define:nn { eb/listoc } { - article .code:n = \tl_set:Nn \l__eb_toc_type_tl { article }, - book .code:n = { }, + section .code:n = \tl_set:Nn \l__eb_toc_type_tl { section }, + chapter .code:n = { }, + article .meta:n = section, + book .meta:n = chapter, multoc .bool_set:N = \l__eb_multoc_bool, multoc .default:n = true, multoc .initial:n = false, @@ -841,7 +843,7 @@ \cs_new_protected:Npn \eb_title_mark_intoc:n #1 { - \tl_if_eq:NnTF \l__eb_toc_type_tl { book } + \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter } { \bichapter*{#1}{\eb@bitoc@title} \eb@nonumber@markdouble{#1} @@ -855,7 +857,7 @@ } \cs_new_protected:Npn \eb_title_mark_notoc:n #1 { - \tl_if_eq:NnTF \l__eb_toc_type_tl { book } + \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter } { \chapter*{\phantomsection #1} \eb@nonumber@markdouble{#1} @@ -871,7 +873,7 @@ { \IfBooleanTF{#1} { - \tl_if_eq:NnTF \l__eb_toc_type_tl { book } + \tl_if_eq:NnTF \l__eb_toc_type_tl { chapter } { \bichapter{\eb@toc@title}{\eb@bitoc@title} } { \bisection{\eb@toc@title}{\eb@bitoc@title} } }{ @@ -959,8 +961,6 @@ \cs_set_eq:NN \imki@indexlevel \use_none:n \setkeys{imki}{intoc = false} \IfValueT{#4}{\keys_set:nn { eb/listoc } {#4}} - \bool_if:NF \l__eb_class_book_bool - { \tl_set:Nn \l__eb_toc_type_tl { article } } \tl_set:Nn \imki@indexheaders { \eb_title_number_intoc_bool:nn {#2} {#1} @@ -1400,6 +1400,17 @@ \ctex_at_end_package:nn { unicode-math } { \msg_redirect_module:nnn { unicode-math } { warning } { none } } +\keys_define:nn { eb/exercise } + { + color .tl_set:N = \eb@tc@background@color, + color .initial:n = LightSkyBlue, + number .tl_set:N = \eb@tc@list@number, + number .initial:n = { 1. }, + title .tl_set:N = \eb@tc@exercise@title, + title .initial:n = \c__eb_name_exercise_tl, + numsep .dim_set:N = \eb@tc@exercise@numsep, + numsep .initial:n = 0.5\ccwd + } \ctex_at_end_package:nn { tcolorbox } { \eb_package_later_bool:nn { tcolorbox } { 2020/10/09 } @@ -1438,6 +1449,8 @@ boxrule = \eb@rule@width@dim } \newtcbox[auto~counter]{\eb@exercise@box}[1]{tc-exercise,#1} + \tl_new:N \eb@list@prologue + \cs_new:Npn \exerprologue #1 { \tl_set:Nn \eb@list@prologue {#1} } \NewDocumentEnvironment{outline}{O{}D(){\abstractname}o+b} { \begin{tcolorbox}[tc-outline,title = #2,IfValueT = {#3}{#3}] @@ -1446,34 +1459,49 @@ \end{eb@outline@list} \end{tcolorbox} }{} - \NewDocumentEnvironment{exercise} - {st+O{LightSkyBlue}O{1.}D(){\c__eb_name_exercise_tl}o+O{}+b} + \NewDocumentEnvironment{exercise}{st+od()O{}+b} { + \IfValueT{#3}{ \keys_set:nn { eb/exercise } {#3} } \IfBooleanTF{#2} { \eb@exercise@box { - fuzzy~halo = 5pt~with~#3, - IfValueT = {#6}{#6}, + fuzzy~halo = 5pt~with~\eb@tc@background@color, + IfValueT = {#4}{#4}, phantom = \IfBooleanF{#1} { - \markright{\thetcbcounter\hspace{0.5\ccwd}#5} + \markright + { + \thetcbcounter + \hspace{\eb@tc@exercise@numsep} + \eb@tc@exercise@title + } \addcontentsline{toc}{section} - {\thetcbcounter\hspace{\eb@toc@section@numsep}#5} + { + \thetcbcounter + \hspace{\eb@toc@section@numsep} + \eb@tc@exercise@title + } } + }{ + \IfBooleanF{#1}{\thetcbcounter\hspace{\eb@tc@exercise@numsep}} + \eb@tc@exercise@title } - {\IfBooleanF{#1}{\thetcbcounter\hspace{0.5\ccwd}}#5} }{ \group_begin: \ctex_set:nn { section } { format += \centering } - \IfValueT{#6}{\ctex_set:nn { section } {#6}} - \IfBooleanTF{#1}{\section*{#5}}{\section{#5}} + \IfValueT{#4}{\ctex_set:nn { section } {#4}} + \IfBooleanTF{#1} + {\section*{\eb@tc@exercise@title}} + {\section{\eb@tc@exercise@title}} \group_end: - }#7 - \begin{enumerate}[#4,labelsep = 0.5\ccwd] - #8 + } + \tl_if_empty:NF \eb@list@prologue { \eb@list@prologue } + \begin{enumerate}[\eb@tc@list@number,labelsep = 0.5\ccwd,#5] + #6 \end{enumerate} + \tl_gclear:N \eb@list@prologue }{} \DeclareTColorBox{easybox}{sO{DarkCyan}d()O{}} { @@ -1522,7 +1550,7 @@ { standard~jigsaw, nobeforeafter,tcbox~raise~base, - top = 1.25tt,bottom = 1.25tt,left = 1.25tt,right = 1.25tt, + top = 1.25ut,bottom = 1.25ut,left = 1.25ut,right = 1.25ut, boxrule = 0.75pt,arc = 1pt, colback = #1,opacityback = 0.12,colframe = #1,#3 }{#2} diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 5a86c9f4054..9bec7f2a7a1 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -13,7 +13,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/06/05}{1.25t}{beta} +\ProvidesExplClass{easybook}{2021/06/06}{1.25u}{beta} \bool_set_false:N \l__eb_compile_draft_bool \bool_set_false:N \l__eb_title_newline_bool |