summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-09 03:00:44 +0000
committerNorbert Preining <norbert@preining.info>2024-02-09 03:00:44 +0000
commitfa4b456400bb2b415dcbbfe785542c50e9dd61e3 (patch)
tree61bb8ad8f9071ab1f33a17b7bc28dc74fd010b3c /macros/latex/contrib/easybook/easybook.dtx
parentbaa694429155689a0e8bba804206961689e0a606 (diff)
CTAN sync 202402090300
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx65
1 files changed, 40 insertions, 25 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 944bc72ec4..fb12b1d6d1 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2024/02/08}{2024x}
+\ProvidesExplClass{easybook}{2024/02/08}{2024z}
{Easily typesetting Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2024/02/08}{2024x}
+\ProvidesExplPackage{easybase}{2024/02/08}{2024z}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -848,10 +848,11 @@
{
fnfirstindent .dim_set:N = \fnfirstindent,
fnfirstindent .initial:n = 0.8em,
- fnafterindent .tl_set:N = \fnafterindent,
+ fnafterindent .dim_set:N = \fnafterindent,
fnafterindent .initial:n = 2em,
fnparskip .skip_set:N = \fnparskip,
fnparskip .initial:n = 0ex plus .1ex,
+ footnotesep .skip_set:N = \footnotesep,
fnpara-format .tl_set:N = \l__eb_fnpara_format_tl,
fntext-pos .tl_set:N = \l__eb_fntext_position_tl,
fntext-pos .initial:n = super,
@@ -889,11 +890,6 @@
\eb_at_end_preamble:n
{
- \group_begin:
- \footnotesize
- \setspread{\fp_use:N \l__eb_spread_footnote_fp}
- \exp_args:NNNo \group_end:
- \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:VnT \l__eb_fnt_parent_counter_tl
@@ -951,7 +947,7 @@
}
\msg_new:nnn { easybase } { bottom-not-compatible }
{
- Not~compatible~with~the~'footmisc'~package, \\
+ Not~compatible~with~the~'footmisc'~package. \\
Please~use~the~'bottom'~option~of~'footmisc'~package.
}
@@ -1061,13 +1057,21 @@
\@footnotemark
\@footnotetext
}
+\cs_new_protected:Npn \eb_set_current_label:n #1
+ {
+ \protected@edef\@currentlabel
+ {
+ \exp_args:Nnv
+ \use:c { p@#1 } { the#1 }
+ }
+ }
\cs_set_protected:Npn \footnote
{
\peek_meaning:NTF [
{ \@xfootnote }
{
\exp_args:NV \stepcounter \@mpfn
- \eb_current_label:n { upfootnote }
+ \eb_set_current_label:n { upfootnote }
\protected@xdef\@thefnmark{\thempfn}
\protected@xdef\@the@up@fnmark{\theupfootnote}
\@footnotemark
@@ -1198,24 +1202,27 @@
\newcounter{bichapter}
\newcounter{bisection}[bichapter]
\newcounter{bisubsection}[bisection]
-\cs_new_protected:Npn \eb_current_label:n #1
+\NewDocumentCommand{\counteruse}{sO{}D(){}mo}
{
- \tl_set:Nx \@currentlabel
- {
- \exp_args:Nnv
- \use:c { p@#1 } { the#1 }
- }
+ \use:c { the#4 }
+ \msg_warning:nnn { easybase } { counteruse } {#4}
+ }
+\msg_new:nnn { easybase } { counteruse }
+ {
+ The~command~\string\counteruse{#1}\ is~deprecated. \\
+ Please~use~the~\string\the#1\ command.
}
-\NewDocumentCommand{\counteruse}{sO{arabic}D(){.}mo}
+\RenewDocumentCommand{\counterwithin}{sO{\arabic}mO{.}m}
{
- \IfBooleanF{#1}{\stepcounter{#4}}
- \tl_set:cn { theeb-#4 }
+ \@ifbothcounters{#3}{#5}
{
- \IfValueT{#5}{\use:c { the#5 }#3}
- \use:c {#2}{#4}
+ \@addtoreset{#3}{#5}
+ \IfBooleanF{#1}
+ {
+ \exp_args:Nc \cs_gset:Npn { the#3 }
+ { \use:c { the#5 }#4#2{#3} }
+ }
}
- \tl_use:c { theeb-#4 }
- \eb_current_label:n { eb-#4 }
}
\cs_new:Npn \eb_section_counter_prefix:n #1
{
@@ -1724,7 +1731,15 @@
table .initial:n = 1.354,
math .fp_set:N = \l__eb_spread_math_fp,
math .initial:n = 1.354,
- footnote .fp_set:N = \l__eb_spread_footnote_fp,
+ footnote .code:n =
+ {
+ \fp_set:Nn \l__eb_spread_footnote_fp {#1}
+ \group_begin:
+ \footnotesize
+ \setspread{\fp_use:N \l__eb_spread_footnote_fp}
+ \exp_args:NNNo \group_end:
+ \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
+ },
footnote .initial:n = 1.2,
caption-table .fp_set:N = \l__eb_spread_caption_table_fp,
caption-figure .fp_set:N = \l__eb_spread_caption_figure_fp,
@@ -2304,7 +2319,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/08}{2024x}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/02/08}{2024z}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2