summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-01 21:35:55 +0000
committerKarl Berry <karl@freefriends.org>2021-07-01 21:35:55 +0000
commit9bbe89667b78619aa50dd3a4b62d55a187f47a37 (patch)
tree70801a746f5ec8bf813f5342dfdbfb16f8da78b1 /Master/texmf-dist/tex/latex
parent77d5e4b2de7129a1afde87ff578040e74449959e (diff)
easybook (1jul21)
git-svn-id: svn://tug.org/texlive/trunk@59794 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybase.sty87
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls2
2 files changed, 54 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty
index 2e3a361bfea..68532f2467c 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/30}{1.26n}
+\ProvidesExplPackage{easybase}{2021/07/01}{1.26o}
{Typeset Chinese books or notes}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
@@ -465,19 +465,10 @@
\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:VnF \l__eb_foot_counter_parent_choice_tl
+ \str_case:Vn \l__eb_foot_counter_parent_choice_tl
{
- { part } { \use_i:nn }
- { page } { \use_ii:nn }
- }
- { \use_none:nn }
- {
- \counterwithout*{footnote}{chapter}
- \counterwithin*{footnote}{part}
- }
- {
- \counterwithout*{footnote}{chapter}
- \counterwithin*{footnote}{page}
+ { part } { \counterwithin*{footnote}{part} }
+ { page } { \counterwithin*{footnote}{page} }
}
\bool_if:NTF \l__eb_footnote_hang_bool
{ \booltrue{FN@hangfoot} }
@@ -743,21 +734,26 @@
\newcounter{bichapter}
\newcounter{bisection}[bichapter]
\newcounter{bisubsection}[bisection]
-\NewDocumentCommand{\EBUseCounter}{soD(){arabic}mmO{.}}
+\cs_set_protected:Npn \eb_current_label:n #1
+ {
+ \tl_set:Nx \@currentlabel
+ {
+ \use:c { p@#1 }
+ \tl_use:c { the#1 }
+ }
+ }
+\NewDocumentCommand{\EBUseCounter}{soD(){arabic}mmO{.}d()}
{
\IfBooleanF{#1}{\stepcounter{#4}}
- \tl_set:cn { eb@the#4 }
+ \IfValueT{#7}{\setcounter{#4}{#7}}
+ \tl_set:cn { theeb@#4 }
{
\IfValueT{#2}{\use:c { the#2 }#6}
\use:c {#3}{#4}\space #5
}
- \tl_use:c { eb@the#4 }
- \tl_remove_once:cn { eb@the#4 } {#5}
- \tl_set:Nx \@currentlabel
- {
- \use:c { p@eb@#4 }
- \use:c { eb@the#4 }
- }
+ \tl_use:c { theeb@#4 }
+ \tl_remove_once:cn { theeb@#4 } {#5}
+ \eb_current_label:n { eb@#4 }
}
\cs_new:Npn \eb_arabic:n #1 { \int_to_arabic:v { c@#1 } }
\cs_new:Npn \eb_section_counter_prefix:n #1
@@ -798,8 +794,7 @@
\def\CTEX@thechapter{\CTEX@bichapter@number}
\def\CTEX@postchapter{\CTEX@postbichapter}
\eb@before@addbitoc@hook
- \addcontentsline{tec}{#1}
- {\use:c { CTEX@#1@tocline }{#1}{#2}}
+ \addcontentsline{tec}{#1}{\use:c { CTEX@#1@tocline }{#1}{#2}}
\group_end:
}
\seq_const_from_clist:Nn \c__eb_bitoc_title_level_seq
@@ -1263,7 +1258,6 @@
\RenewDocumentCommand{\declaretheorem}{O{}m}
{\AfterPreamble{\eb@declare@theorem@save[#1]{#2}}}
\cs_set_eq:NN \newtheorem \declaretheorem
-
\prop_new:N \l__eb_thmtools_entry_prop
\clist_const:Nn \c__eb_thmtools_entry_clist
{
@@ -1283,11 +1277,31 @@
\l__eb_thmtools_entry_prop \c__eb_thmtools_entry_clist
\prop_map_inline:Nn \l__eb_thmtools_entry_prop
{ \eb_ctex_define:nn { thmset } { #1 .tl_set:N = #2 } }
+\NewDocumentCommand{\eb_assign_tag_brackets:n}
+ {>{\SplitArgument{1}{,}}m}
+ {\eb_assign_tag_brackets_pos:nn #1}
+\cs_new_protected:Npn \eb_assign_tag_brackets_pos:nn #1#2
+ {
+ \tl_set:Nn \eb@tag@brackets@left {#1}
+ \tl_set:Nn \eb@tag@brackets@right {#2}
+ }
+\cs_gset:Npn \tagform@ #1
+ {
+ \maketag@@@
+ {
+ \color{ctex@emph}
+ \eb@tag@brackets@left
+ \ignorespaces #1\unskip\@@italiccorr
+ \eb@tag@brackets@right
+ }
+ }
\eb_ctex_define:nn { thmset }
{
thmbox .bool_set:N = \l__eb_thmbox_bool,
thmbox .default:n = true,
- thmbox .initial:n = false
+ thmbox .initial:n = false,
+ brackets .code:n = \eb_assign_tag_brackets:n {#1},
+ brackets .initial:n = { (,) }
}
\ctex_set:nn { thmset }
{
@@ -1368,8 +1382,6 @@
\skip_set:Nn \abovedisplayshortskip { 0pt }
\skip_set:Nn \belowdisplayshortskip { 5pt plus 1pt minus 1pt }
}
-\cs_gset:Npn \tagform@ #1
- { \maketag@@@{\color{ctex@emph}(\ignorespaces #1\unskip\@@italiccorr)} }
\ctex_at_end_package:nn { unicode-math }
{ \msg_redirect_module:nnn { unicode-math } { warning } { info } }
@@ -1381,7 +1393,7 @@
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 .dim_set:N = \eb@toc@exercise@numsep,
numsep .initial:n = 0.5\ccwd
}
\ctex_at_end_package:nn { tcolorbox }
@@ -1424,6 +1436,11 @@
\newtcbox[auto~counter]{\eb@tc@exercise@box}[1]{tc-exercise,#1}
\tl_new:N \eb@tc@list@prologue
\cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} }
+ \cs_new:Npn \eb_tcb_toc_counter_numsep:n #1
+ {
+ \thetcbcounter
+ \hspace{\use:c { eb@toc@#1@numsep }}
+ }
\NewDocumentEnvironment{outline}{O{}D(){\abstractname}o+b}
{
\begin{tcolorbox}[tc-outline,title = #2,IfValueT = {#3}{#3}]
@@ -1446,19 +1463,21 @@
{
\markright
{
- \thetcbcounter
- \hspace{\eb@tc@exercise@numsep}
+ \eb_tcb_toc_counter_numsep:n { exercise }
\eb@tc@exercise@title
}
\addcontentsline{toc}{section}
{
- \thetcbcounter
- \hspace{\eb@toc@section@numsep}
+ \eb_tcb_toc_counter_numsep:n { section }
\eb@tc@exercise@title
}
}
}{
- \IfBooleanF{#1}{\thetcbcounter\hspace{\eb@tc@exercise@numsep}}
+ \IfBooleanF{#1}
+ {
+ \eb_tcb_toc_counter_numsep:n { exercise }
+ \eb_current_label:n { tcbcounter }
+ }
\eb@tc@exercise@title
}
}{
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index a5aefe2fcb0..e7c80c31094 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/30}{1.26n}
+\ProvidesExplClass{easybook}{2021/07/01}{1.26o}
{Typeset Chinese books or notes}
\bool_set_false:N \l__eb_compile_draft_bool