summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls117
1 files changed, 85 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index fff5697b188..6af14757398 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/03/19}{1.23v}{}
+\ProvidesExplClass{easybook}{2021/03/21}{1.23x}{beta}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -134,14 +134,6 @@
withpart .bool_set:N = \l__chap_withpart_bool,
withpart .default:n = true,
withpart .initial:n = false,
- footwith .choice:,
- footwith .value_required:n = true,
- footwith/part .code:n =
- {\tl_set:Nn \l__foot_numberwith_tl{#1}},
- footwith/page .code:n =
- {\tl_set:Nn \l__foot_numberwith_tl{#1}},
- footwith/chapter .code:n = {},
- footwith .initial:n = chapter,
notomath .bool_set:N = \l__notomath_bool,
notomath .default:n = true,
notomath .initial:n = true,
@@ -150,6 +142,16 @@
uppercase .bool_set:N = \l__uppercase_bool,
uppercase .default:n = true,
uppercase .initial:n = true,
+
+ footwith .choice:,
+ footwith .value_required:n = true,
+ footwith/part .code:n =
+ {\tl_set:Nn \l__foot_numberwith_tl{#1}},
+ footwith/page .code:n =
+ {\tl_set:Nn \l__foot_numberwith_tl{#1}},
+ footwith/chapter .code:n = {},
+ footwith .initial:n = chapter,
+
figure-sep .tl_set:N = \l__figure_separator_tl,
table-sep .tl_set:N = \l__table_separator_tl,
listing-sep .tl_set:N = \l__lstlisting_separator_tl,
@@ -184,6 +186,28 @@
\tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}}
}
+\cs_new_protected:Npn \__ifpackage_later:nn #1#2
+ {
+ \@ifpackagelater{#1}{#2}
+ {}{\msg_warning:nnn {easybook}{package-old}{#1}}
+ }
+\msg_new:nnn {easybook}{package-old}
+ {
+ Package~#1~has~been~out~of~date. \\
+ Some~problems~or~errors~may~occur \\
+ if~you~continue~compiling. \\\\
+ Please~update~your~macro~package~from~CTAN.
+ }
+\clist_map_inline:nn
+ {
+ {expl3}{2020/10/27},
+ {xparse}{2020/10/27},
+ {l3keys2e}{2020/10/27},
+ {ctex}{2020/10/19},
+ {thmtools}{2020/08/01},
+ {caption-light}{2020/08/24}
+ }{\__ifpackage_later:nn #1}
+
\sys_if_engine_xetex:TF
{
\cs_new_eq:NN \__set_family:nnn \xeCJK_set_family:nnn
@@ -288,7 +312,15 @@
\clist_new:N \g__geometry_clist
\__ctex_define:nn {geoset}
{
- unknown .code:n =
+ footnotemargin .dim_set:N = \footnotemargin,
+ footnotemargin .initial:n = 0.5\ccwd,
+ footparskip .tl_set:N = \hangfootparskip,
+ footparskip .initial:n = 0ex,
+ footparindent .tl_set:N = \hangfootparindent,
+ footparindent .initial:n = 2\ccwd,
+ list-labelsep .dim_set:N = \list@labelsep,
+ list-labelsep .initial:n = \ccwd,
+ unknown .code:n =
{
\clist_gput_right:Nx \g__geometry_clist
{
@@ -465,7 +497,7 @@
lists/indent .initial:n = 0\ccwd,
lists/rule .tl_set:N = \l__toc_lists_rule_tl,
lists/rule .initial:n = \tocrule{$\cdot$},
- lists/lolskip .dim_set:N = \l__toc_lolskip_dim,
+ lists/lolskip .skip_set:N = \l__toc_lolskip_skip,
lists/lolskip .initial:n = 0.8pc,
lists/belowoffset .dim_set:N = \l__toc_listsoffset_dim,
lists/belowoffset .initial:n = 0pc,
@@ -499,19 +531,34 @@
}{\__titlecontents_set:nn #1}
\ctex_patch_cmd:Nnn \caption@@@addcontentsline
{\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}}
- {\addcontentsline{#1}{#2}{#3\hspace{\ccwd}#4}}
+ {\addcontentsline{#1}{#2}{#3\hspace{\list@labelsep}#4}}
\ctex_patch_cmd:Nnn \lst@MakeCaption
{
\addcontentsline{lol}{lstlisting}
{\protect\numberline{\thelstlisting}\lst@@caption}
}{
\addcontentsline{lol}{lstlisting}
- {\thelstlisting\hspace{\ccwd}\lst@@caption}
+ {\thelstlisting\hspace{\list@labelsep}\lst@@caption}
}
\__appto_cmd:Nn \@chapter
{
- \addtocontents{lol}
- {\protect\addvspace{\dim_use:N \l__toc_lolskip_dim}}
+ \skip_if_eq:nnF {\l__toc_lolskip_skip}{\c_zero_skip}
+ {
+ \addtocontents{lol}
+ {\protect\addvspace{\skip_use:N \l__toc_lolskip_skip}}
+ }
+ \bool_if:NF \l__class_book_bool
+ {\msg_error:nn {easybook}{no-chapter}}
+ }
+\__appto_cmd:Nn \@schapter
+ {
+ \bool_if:NF \l__class_book_bool
+ {\msg_error:nn {easybook}{no-chapter}}
+ }
+\msg_new:nnn {easybook}{no-chapter}
+ {
+ Your~document~class~is~in~article~mode. \\
+ The~\string\chapter\space~command~will~not~be~used.
}
\cs_new_protected:Npn \__markboth:n #1
@@ -594,7 +641,7 @@
\RenewDocumentCommand{\tableofcontents}{o}
{
\group_begin:
- \IfValueT {#1}{\keys_set:nn {listoc}{#1}}
+ \IfValueT{#1}{\keys_set:nn {listoc}{#1}}
\__ifmultoc_pre_set:
\__title_mark:n {\contentsname}
\vspace*{\dim_use:N \l__toc_offset_dim}
@@ -605,9 +652,9 @@
\RenewDocumentCommand{\listoffigures}{so}
{
\group_begin:
- \IfValueT {#2}{\keys_set:nn {listoc}{#2}}
+ \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
\__ifmultoc_pre_set:
- \IfBooleanTF {#1}
+ \IfBooleanTF{#1}
{\__title_mark:n {\listfigurename}}
{\__title_mark_intoc:n {\listfigurename}}
\dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
@@ -619,9 +666,9 @@
\RenewDocumentCommand{\listoftables}{so}
{
\group_begin:
- \IfValueT {#2}{\keys_set:nn {listoc}{#2}}
+ \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
\__ifmultoc_pre_set:
- \IfBooleanTF {#1}
+ \IfBooleanTF{#1}
{\__title_mark:n {\listtablename}}
{\__title_mark_intoc:n {\listtablename}}
\dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
@@ -633,9 +680,9 @@
\NewDocumentCommand{\listoflistings}{so}
{
\group_begin:
- \IfValueT {#2}{\keys_set:nn {listoc}{#2}}
+ \IfValueT{#2}{\keys_set:nn {listoc}{#2}}
\__ifmultoc_pre_set:
- \IfBooleanTF {#1}
+ \IfBooleanTF{#1}
{\__title_mark:n {\lstlistlistingname}}
{\__title_mark_intoc:n {\lstlistlistingname}}
\dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
@@ -755,9 +802,20 @@
}
}
\AtBeginEnvironment{tabularx}
- {\exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}\selectfont\ignorespaces}
+ {
+ \exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}
+ \selectfont\ignorespaces
+ }
\AtBeginEnvironment{tabular}
- {\exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}\selectfont\ignorespaces}
+ {
+ \exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}
+ \selectfont\ignorespaces
+ }
+\ctex_after_end_preamble:n
+ {
+ \exp_args:Nx \linespread{\fp_use:N \l__spread_line_fp}
+ \selectfont\ignorespaces
+ }
\fp_new:N \l__spread_line_fp
\fp_new:N \l__spread_table_fp
@@ -792,8 +850,6 @@
\cs_gset:Npn \topfraction{0.85}
\cs_gset:Npn \bottomfraction{0.65}
\cs_gset:Npn \floatpagefraction{0.60}
-\ctex_after_end_preamble:n
- {\exp_args:Nx \linespread{\fp_use:N \l__spread_line_fp}\selectfont}
\newcolumntype{L}{X}
\newcolumntype{C}{>{\centering\arraybackslash}X}
@@ -989,6 +1045,7 @@
\ctex_at_end_package:nn {tcolorbox}
{
+ \__ifpackage_later:nn {tcolorbox}{2020/10/09}
\tcbset
{
thmsty/.style =
@@ -1168,11 +1225,11 @@
\NewDocumentCommand{\printbibliography}{so}
{
\group_begin:
- \IfValueT {##2}{\keys_set:nn {listoc}{##2}}
+ \IfValueT{##2}{\keys_set:nn {listoc}{##2}}
\__ifmultoc_pre_set:
\cs_set:Npn \bibsection
{
- \IfBooleanTF {##1}
+ \IfBooleanTF{##1}
{\__title_mark:n {\bibname}}
{\__title_mark_intoc:n {\bibname}}
}
@@ -1220,15 +1277,11 @@
\ctex_at_end_preamble:n
{
- \skip_set:Nn \footnotemargin{0.5\ccwd}
\group_begin:
\footnotesize
\exp_args:Nx \linespread{\fp_use:N \l__spread_footnote_fp}\selectfont
\skip_gset:Nn \footnotesep{\ht\strutbox}
\group_end:
- \cs_gset:Npn \hangfootparskip{0ex}
- \bool_if:NT \l__lang_chinese_bool
- {\cs_gset:Npn \hangfootparindent{2\ccwd}}
\bool_if:NT \l__chap_withpart_bool
{\counterwithin*{chapter}{part}}
\tl_if_eq:NnT \l__foot_numberwith_tl{part}