summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/easybook/easybook.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook/easybook.cls')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls80
1 files changed, 53 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 4cae8557d8e..bbd9acfebc9 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -13,11 +13,12 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/04/04}{1.24d}{beta}
+\ProvidesExplClass{easybook}{2021/04/05}{1.24e}{beta}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
\cs_generate_variant:Nn \dim_add:Nn {NV}
+\cs_generate_variant:Nn \__put_hyperref:n {x}
\cs_new_protected:Npn \__ctex_define:nn #1
{\keys_define:nn {ctex/#1}}
\cs_new_protected:Npn \__put_ctexbook:n #1
@@ -92,6 +93,7 @@
{hang,stable}{footmisc},
{normalem}{ulem},
{protrusion = false}{microtype},
+ {list = off}{bicaption},
{shortlabels,inline}{enumitem},
{many}{tcolorbox},
{xindy}{imakeidx},
@@ -465,12 +467,25 @@
}
\__ctex_define:nn {tocset}
{
- 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,
- belowoffset .dim_set:N = \l__toc_offset_dim,
- belowoffset .initial:n = -1pc
+ 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,
+ lists/labelname-fig .cs_set:Np = \labelname@lof#1#2,
+ lists/labelname-fig .initial:n =
+ {\figurename\space#1\hspace{\list@labelsep}#2},
+ lists/labelname-tab .cs_set:Np = \labelname@lot#1#2,
+ lists/labelname-tab .initial:n =
+ {\tablename\space#1\hspace{\list@labelsep}#2},
+ lists/labelname-lst .tl_set:N = \labelname@lol,
+ lists/labelname-lst .initial:n =
+ {
+ \lstlistingname\space
+ \thelstlisting\hspace{\list@labelsep}
+ \lst@@caption
+ },
+ belowoffset .dim_set:N = \l__toc_offset_dim,
+ belowoffset .initial:n = -1pc
}
\ctex_set:nn {tocset}
{
@@ -518,17 +533,22 @@
{table}{lists},
{lstlisting}{lists}
}{\__titlecontents_set:nn #1}
-\ctex_patch_cmd:Nnn \caption@@@addcontentsline
- {\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}}
- {\addcontentsline{#1}{#2}{#3\hspace{\list@labelsep}#4}}
+\prop_new:N \l_label_name_prop
+\prop_set_from_keyval:Nn \l_label_name_prop
+ {
+ figure = \labelname@lof,
+ table = \labelname@lot
+ }
+\cs_gset:Npn \caption@@@addcontentsline#1#2#3#4
+ {
+ \addcontentsline{#1}{#2}
+ {\prop_item:Nn \l_label_name_prop{#2}{#3}{#4}}
+ }
\ctex_patch_cmd:Nnn \lst@MakeCaption
{
\addcontentsline{lol}{lstlisting}
{\protect\numberline{\thelstlisting}\lst@@caption}
- }{
- \addcontentsline{lol}{lstlisting}
- {\thelstlisting\hspace{\list@labelsep}\lst@@caption}
- }
+ }{\addcontentsline{lol}{lstlisting}{\labelname@lol}}
\__appto_cmd:Nn \@chapter
{
\skip_if_eq:nnF {\l__toc_lolskip_skip}{\c_zero_skip}
@@ -952,25 +972,25 @@
postheadspace = \l__thm_spacepost_tl,
within = \l__thm_numberwith_tl,
headformat = \NAME\space\NUMBER\NOTE
- ]{easythm}
+ ]{easy-thm-sty}
\clist_map_inline:nn
{
example,definition,theorem,
proposition,lemma,corollary
}{
\declaretheorem[
- style = easythm,
+ style = easy-thm-sty,
name = \use:c {c__name_#1_tl}
]{#1}
}
\cs_gset_eq:NN \proof\relax
\declaretheorem[
- style = easythm,
+ style = easy-thm-sty,
name = \c__name_remark_tl,
numbered = no
]{remark}
\declaretheorem[
- style = easythm,
+ style = easy-thm-sty,
name = \proofname,
numbered = no,
qed = \qedsymbol
@@ -1216,9 +1236,7 @@
\tl_if_eq:VnT \l__bib_style_tl{authoryear}
{\bibliographystyle{gbt7714-author-year}}
\cs_set_eq:NN \cite\citep
- }{
- \exp_args:NV \bibliographystyle\l__bib_otherstyle_tl
- }
+ }{\exp_args:NV \bibliographystyle\l__bib_otherstyle_tl}
\tl_if_empty:NF \l__bib_citestyle_tl
{\exp_args:NV \setcitestyle\l__bib_citestyle_tl}
\skip_set:Nn \bibsep{0ex}
@@ -1423,11 +1441,19 @@
linkcolor .default:n = fresh,
linkcolor .initial:n = fresh,
- linktopage .choice:,
- linktopage/true .code:n = \__put_hyperref:n {linktocpage},
- linktopage/false .code:n = {},
- linktopage .default:n = true,
- linktopage .initial:n = false
+ linktoc .choice:,
+ linktoc/unknown .code:n = \__put_hyperref:n {linktoc = \exp_not:n {#1}},
+ linktoc .default:n = all,
+ linktoc .initial:n = all,
+ unknown .code:n =
+ {
+ \__put_hyperref:x
+ {
+ \exp_not:N \l_keys_key_str
+ \exp_not:N \tl_if_empty:NF
+ \exp_not:N \l_keys_value_tl{ = \exp_not:n {#1}}
+ }
+ }
}
\keys_define:nx {ctex/style}
{
@@ -1449,7 +1475,7 @@
\RequirePackage{hyperref,cleveref}
\urlstyle{same}
\__allow_urlbreak:
- \ctex_hypersetup:n {pdfstartview = FitH,bookmarksnumbered}
+ \ctex_hypersetup:n {pdfstartview = FitH}
\exp_args:NV \hypersetup\l__hyperref_clist
\bool_if:NTF \l__lang_chinese_bool
{