summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/easybook
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-12-17 22:37:41 +0000
committerKarl Berry <karl@freefriends.org>2021-12-17 22:37:41 +0000
commit1a8e14082561ae158650ab8bb04fdcbc54802cac (patch)
tree4a06fdd5dba6901faaf3642f9f25940595fea93a /Master/texmf-dist/source/latex/easybook
parent3dbbfcc8ae8eafc123d1550de3c9a3ef8ba2ab0b (diff)
easybook (17dec21)
git-svn-id: svn://tug.org/texlive/trunk@61336 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/easybook')
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx105
1 files changed, 51 insertions, 54 deletions
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index 0765fb3ecc8..752a7341c4d 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/12/15}{1.41U}
+\ProvidesExplClass{easybook}{2021/12/16}{1.41X}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -79,7 +79,6 @@
\cs_new_eq:NN \eb_set_family:nnn \ctex_ltj_set_family:nnn
\cs_new_eq:NN \eb_switch_family:n \ctex_ltj_switch_family:n
}
-\cs_generate_variant:Nn \eb_switch_family:n { V }
\cs_new_protected:Npn \eb_setmainfont:nn #1#2
{ \__fontspec_main_setmainfont:nn {#2} {#1} }
\cs_new_protected:Npn \eb_setsansfont:nn #1#2
@@ -101,7 +100,7 @@
\RenewDocumentCommand{\newCJKfontfamily}{omO{}mO{}}
{
\tl_set:Nx \l_tmpa_tl { \tl_if_novalue:nTF {#1} { \cs_to_str:N #2 } {#1} }
- \cs_new_protected:Npx #2 { \eb_switch_family:V \l_tmpa_tl }
+ \cs_new_protected:Npx #2 { \eb_switch_family:n { \l_tmpa_tl } }
\eb_set_family:nnn { \l_tmpa_tl } {#3,#5} {#4}
}
@@ -308,7 +307,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/12/15}{1.41U}
+\ProvidesExplPackage{easybase}{2021/12/16}{1.41X}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -534,7 +533,7 @@
{ fancyhdr } { 2021/01/28 },
{ siunitx } { 2021/06/22 },
{ tabularray } { 2021/07/01 },
- { spbmark } { 2021/06/30 }
+ { spbmark } { 2021/12/15 }
}
{ \eb_package_date_check:nn #1 }
@@ -727,7 +726,7 @@
\bool_if:NF \l__eb_ps_used_bool { \pagestyle{fancy} }
\tl_if_empty:NF \l_eb_graphics_path_tl
{ \exp_args:NV \graphicspath \l_eb_graphics_path_tl }
- \cs_if_exist:NF \kaishu { \cs_gset_eq:NN \kaishu \itshape }
+ \providecommand{\kaishu}{\itshape}
}
\ctex_define:nn { style }
@@ -781,10 +780,10 @@
{ s } { \eb_int_to_symbols:n }
}
}
-\cs_new_protected:Npn \eb_fnmate_normal_label_set:nn #1#2
+\cs_new_protected:Npn \eb_fnmate_normal_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmate_number_type_tl {#1}
- \cs_set:cpx {#2}
+ \tl_set:Nn \l__eb_fnmate_number_type_tl {#2}
+ \cs_set:Npx #1
{
\str_case:VnT \l__eb_fnmate_number_type_tl
{
@@ -802,20 +801,20 @@
{ \exp_not:N \c@footnote }
}
}
-\cs_new_protected:Npn \eb_fnmate_short_label_set:nn #1#2
+\cs_new_protected:Npn \eb_fnmate_short_label_set:Nn #1#2
{
- \tl_set:Nn \l__eb_fnmate_short_tokens_tl {#1}
+ \tl_set:Nn \l__eb_fnmate_short_tokens_tl {#2}
\eb_seq_map_inline:nn
{ A,a,1,I,i,c,s }
{
- \tl_if_in:nnT {#1} {##1}
+ \tl_if_in:nnT {#2} {##1}
{
\tl_replace_once:Nnn \l__eb_fnmate_short_tokens_tl {##1}
{ \eb_int_format_trans:NN ##1 \c@footnote }
\seq_map_break:
}
}
- \cs_set_eq:cN {#2} \l__eb_fnmate_short_tokens_tl
+ \cs_set_eq:NN #1 \l__eb_fnmate_short_tokens_tl
}
\cs_new_protected:Npn \eb_footnote_value_handle:n #1
{
@@ -892,14 +891,14 @@
fnmark-num .choices:nn =
{ plain,pifont,pifont*,pifont-sans,pifont-sans* }
- { \eb_fnmate_normal_label_set:nn {#1} { the@footnote } },
+ { \eb_fnmate_normal_label_set:Nn \the@up@footnote {#1} },
fnmark-num .value_required:n = true,
- fnmark-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { the@footnote },
+ fnmark-num/unknown .code:n = \eb_fnmate_short_label_set:Nn \the@up@footnote {#1},
fntext-num .choices:nn =
{ plain,pifont,pifont*,pifont-sans,pifont-sans* }
- { \eb_fnmate_normal_label_set:nn {#1} { thefootnote } },
+ { \eb_fnmate_normal_label_set:Nn \thefootnote {#1} },
fntext-num .value_required:n = true,
- fntext-num/unknown .code:n = \eb_fnmate_short_label_set:nn {#1} { thefootnote },
+ fntext-num/unknown .code:n = \eb_fnmate_short_label_set:Nn \thefootnote {#1},
fnmate-num .meta:n = { fntext-num = #1,fnmark-num = #1 },
fnmate-num .initial:n = plain,
unknown .code:n = \eb_msg_abandon_option:n { hdrset }
@@ -1016,12 +1015,12 @@
\tl_if_eq:NnT \l__eb_footnote_value_tl { hang } { \par }
\group_end:
}
-\cs_set_eq:NN \eb@makefntext \@makefntext
+\cs_set_eq:NN \eb@makefntext@save \@makefntext
\ctex_at_end_package:nn { footmisc }
{
\notbool{FN@para}
{
- \cs_set_eq:NN \@makefntext \eb@makefntext
+ \cs_set_eq:NN \@makefntext \eb@makefntext@save
\msg_warning:nn { easybase } { footmisc }
}{}
}
@@ -1035,7 +1034,7 @@
\cs_set_protected:Npn \footref #1
{
\group_begin:
- \unrestored@protected@xdef\eb@thefnmark{\ref{#1}}
+ \unrestored@protected@xdef\@the@up@fnmark{\ref{#1}}
\group_end:
\H@@footnotemark
}
@@ -1045,9 +1044,9 @@
{ \@xfootnote }
{
\exp_args:NV \stepcounter \@mpfn
- \eb_current_label:n { @footnote }
+ \eb_current_label:n { @up@footnote }
\protected@xdef\@thefnmark{\thempfn}
- \protected@xdef\eb@thefnmark{\the@footnote}
+ \protected@xdef\@the@up@fnmark{\the@up@footnote}
\@footnotemark
\@footnotetext
}
@@ -1058,12 +1057,12 @@
{ \@xfootnotemark }
{
\stepcounter{footnote}
- \protected@xdef\eb@thefnmark{\the@footnote}
+ \protected@xdef\@the@up@fnmark{\the@up@footnote}
\@footnotemark
}
}
\eb_patch_cmd:wnn { \@footnotetext,\@mpfootnotetext }
- { \footnotesize }
+ { \reset@font }
{
\setspread{\fp_use:N \l__eb_spread_footnote_fp}
\tl_use:N \l__eb_subfont_footnote_tl
@@ -1074,7 +1073,7 @@
{
\group_begin:
\setcounter{footnote}{#1}
- \unrestored@protected@xdef\eb@thefnmark{\the@footnote}
+ \unrestored@protected@xdef\@the@up@fnmark{\the@up@footnote}
\group_end:
\H@@footnotemark
}
@@ -1087,10 +1086,9 @@
\IfBooleanTF{#1}
{\super{#2}[vshift = \l__eb_fntext_vshift_tl,nohshift]}
{
- \super{#2}[
- cmd = \l__eb_fnmate_format_tl,
- vshift = \l__eb_fnmark_vshift_tl,
- hshift = \l__eb_fnmark_hshift_tl
+ \super{\l__eb_fnmate_format_tl{#2}}[
+ vshift = \l__eb_fnmark_vshift_tl,
+ hshift = \l__eb_fnmark_hshift_tl
]
}
}
@@ -1105,8 +1103,7 @@
\bool_if:NT \l__eb_fncust_format_match_bool
{ \tl_clear:N \l__eb_fnmate_format_tl }
}
- \bool_if:NF \l__eb_fnmate_format_match_bool
- { \spbset{super-format = { }} }
+ \bool_if:NF \l__eb_fnmate_format_match_bool { \spbset{spcmd = { }} }
\tl_use:N \l__eb_subfont_footnote_tl
}
\bool_set_true:N \l__eb_normal_footnote_bool
@@ -1118,7 +1115,7 @@
{
\eb_fnmate_format_initial:
\tl_if_eq:NnTF \@mpfn { footnote }
- { \eb@fnmate@super{\eb@thefnmark} }
+ { \eb@fnmate@super{\@the@up@fnmark} }
{ \eb@fnmate@super{\@thefnmark} }
}
}
@@ -1140,13 +1137,13 @@
}
\tl_clear:N \@thefnmark
-\tl_new:N \eb@thefnmark
+\tl_new:N \@the@up@fnmark
\cs_new:Npn \eb@@makefnmark #1#2
{
\tl_if_empty:oF {#2}
{
\group_begin:
- \unrestored@protected@xdef\eb@thefnmark{#1}
+ \unrestored@protected@xdef\@the@up@fnmark{#1}
\unrestored@protected@xdef\@thefnmark{#2}
\group_end:
}
@@ -1272,7 +1269,7 @@
\ctex_define:nn { tocset }
{
- lolskip .skip_set:N = \eb@toc@lolskip,
+ lolskip .skip_set:N = \eb@toc@lol@skip,
lolskip .initial:n = 10pt,
between .tl_set:N = \l__eb_toc_main_between_hook_tl,
between .initial:n =
@@ -1395,8 +1392,8 @@
{
\tl_set:Nx \@currentlabel
{
- \use:c { p@#1 }
- \tl_use:c { the#1 }
+ \exp_args:Nnv
+ \use:c { p@#1 } { the#1 }
}
}
\NewDocumentCommand{\counteruse}{soD(){arabic}mO{.}d()}
@@ -1467,8 +1464,8 @@
{
\eb_appto_cmd:Nn \@chapter
{
- \skip_if_eq:nnF { \eb@toc@lolskip } { \c_zero_skip }
- { \addtocontents{lol}{\protect\addvspace{\skip_use:N \eb@toc@lolskip}} }
+ \skip_if_eq:nnF { \eb@toc@lol@skip } { \c_zero_skip }
+ { \addtocontents{lol}{\protect\addvspace{\skip_use:N \eb@toc@lol@skip}} }
}
}
@@ -1712,9 +1709,8 @@
},
caption-every .initial:n = \sffamily\small,
footnote .tl_set:N = \l__eb_subfont_footnote_tl,
- footnote .initial:n = \rmfamily\footnotesize,
marginpar .tl_set:N = \l__eb_subfont_marginpar_tl,
- marginpar .initial:n = \rmfamily\footnotesize,
+ marginpar .initial:n = \footnotesize,
unknown .code:n = \eb_msg_abandon_option:n { subfont }
}
\cs_new_protected:Npn \addtosubfont #1#2
@@ -1743,7 +1739,7 @@
table .fp_set:N = \l__eb_spread_table_fp,
table .initial:n = 1.354,
math .fp_set:N = \l__eb_spread_math_fp,
- math .initial:n = 1.2,
+ math .initial:n = 1.3,
footnote .fp_set:N = \l__eb_spread_footnote_fp,
footnote .initial:n = 1.2,
caption-table .fp_set:N = \l__eb_spread_cap_table_fp,
@@ -1976,7 +1972,7 @@
\eb_thm_biname_set:nnn {#1} {#2} {#3}
\declaretheorem{#1}[
name = \tl_use:c { l__eb_thm_biname_#1_tl },
- style = eb-theorem,#5
+ style = fancy,#5
]
\eb_if_thmframe_with_tcolorbox:TF
{
@@ -2049,7 +2045,7 @@
\clist_put_right:Nx
\c__eb_thmtools_entry_clist { notebraces = \l__eb_thm_notebraces_tl }
\exp_last_unbraced:NNV
- \declaretheoremstyle[\c__eb_thmtools_entry_clist]{eb-theorem}
+ \declaretheoremstyle[\c__eb_thmtools_entry_clist]{fancy}
\deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol]
\deftheorem{remark}{注}[numbered = no]
\deftheorem{proposition}{性质}
@@ -2138,12 +2134,12 @@
bibstyle .initial:n = numerical,
citestyle .code:n = \tl_set:Nn \l__eb_bib_cite_style_tl {#1},
datafile .clist_set:N = \l__eb_bib_datafile_clist,
- bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl,
- bitoc-title .initial:n = Reference,
+ bititle .tl_set:N = \l__eb_bib_en_bitoc_title_tl,
+ bititle .initial:n = Bibliography,
unknown .code:n = \eb_msg_abandon_option:n { bibset }
}
-\cs_new_protected:Npn \eb_natbib_bibtex_set:
+\cs_new_protected:Npn \eb_bibtex_natbib_set:
{
\LoadPackage[sort&compress]{natbib}
\str_case:VnTF \l__eb_bib_both_style_tl
@@ -2180,7 +2176,7 @@
}
\cs_new_protected:Npn \eb_put_biblatex:n #1
{ \PassOptionsToPackage{#1}{biblatex} }
-\cs_new_protected:Npn \eb_biblatex_biber_set:
+\cs_new_protected:Npn \eb_biber_biblatex_set:
{
\str_case:VnF \l__eb_bib_both_style_tl
{
@@ -2204,8 +2200,8 @@
\clist_if_empty:NF \l__eb_bib_datafile_clist
{
\bool_if:NTF \l__eb_backend_bibtex_bool
- { \eb_natbib_bibtex_set: }
- { \eb_biblatex_biber_set: }
+ { \eb_bibtex_natbib_set: }
+ { \eb_biber_biblatex_set: }
}
}
@@ -2394,7 +2390,8 @@
\labelformat{chapter}{\CTEXthechapter}
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
-\cs_if_free:NT \bibname { \cs_set_eq:NN \bibname \refname }
+\labelformat{exercise}{\exercisename~#1}
+\providecommand{\bibname}{\refname}
\ctex_define:n
{
lstlistlistingname .tl_set:N = \listlstlistingname,
@@ -2432,7 +2429,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/15}{1.41U}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/12/16}{1.41X}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \setexercise #1
@@ -2568,7 +2565,7 @@
}{}
\cs_new:Npn \eb_exercise_label_noempty_use:
{
- \eb_current_label:n { eb@exercise }
+ \eb_current_label:n { exercise }
\tl_if_empty:NF \eb@tc@exercise@label
{ \exp_args:NV \label \eb@tc@exercise@label }
}
@@ -2607,7 +2604,7 @@
\IfBooleanF{#1}
{
\eb_tcb_toc_counter_numsep:n { exercise }
- \tl_set_eq:NN \theeb@exercise \thetcbcounter
+ \cs_set_eq:NN \theexercise \thetcbcounter
\eb_exercise_label_noempty_use:
}
\eb@tc@exercise@title