summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-04-11 21:10:56 +0000
committerKarl Berry <karl@freefriends.org>2021-04-11 21:10:56 +0000
commit1d2e2ac9a87fc3f31456f44714e1f6afd2945b6d (patch)
treec44a3cf769f7cf05f43491df5d4b2d11b988a8a1 /Master/texmf-dist/tex
parent3d3efb1f22048b945c97b8c68967616dba0fb78e (diff)
easybook (11apr21)
git-svn-id: svn://tug.org/texlive/trunk@58832 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls128
1 files changed, 62 insertions, 66 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 0b5f1562a0f..bef937bc786 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/04/10}{1.24j}{beta}
+\ProvidesExplClass{easybook}{2021/04/11}{1.24k}{beta}
\cs_generate_variant:Nn \__ctex_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -333,13 +333,13 @@
}
}
-\cs_gset:Npn \cleardoublepage
+\RenewDocumentCommand{\cleardoublepage}{O{empty}}
{
\clearpage
\bool_if:NT \l__eb_page_twoside_bool
{
- \int_if_odd:nF \c@page
- {\hbox:n {}\thispagestyle{empty}\clearpage}
+ \int_if_odd:nF {\c@page}
+ {\hbox:n {}\thispagestyle{#1}\clearpage}
}
}
\RenewDocumentCommand{\frontmatter}{sO{Roman}}
@@ -959,34 +959,23 @@
\setlist*[enumerate,3]{labelwidth = *}
\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
-\cs_new_protected:Npn \__eb_thmname_set:nn #1#2
- {\tl_const:cn {c__eb_name_#1_tl}{#2}}
-\tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
+\cs_new_protected:Npn \__eb_thmname_set:nnn #1#2#3
{
- \clist_map_inline:nn
- {
- {example}{例},
- {definition}{定义},
- {theorem}{定理},
- {proposition}{性质},
- {lemma}{引理},
- {corollary}{推论},
- {remark}{注},
- {exercise}{练习}
- }{\__eb_thmname_set:nn #1}
- }{
- \clist_map_inline:nn
- {
- {example}{Example},
- {definition}{Definition},
- {theorem}{Theorem},
- {proposition}{Proposition},
- {lemma}{Lemma},
- {corollary}{Corollary},
- {remark}{Remark},
- {exercise}{Exercise}
- }{\__eb_thmname_set:nn #1}
+ \tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
+ {\tl_const:cn {c__eb_name_#1_tl}{#2}}
+ {\tl_const:cn {c__eb_name_#1_tl}{#3}}
}
+\clist_map_inline:nn
+ {
+ {example}{例}{Example},
+ {definition}{定义}{Definition},
+ {theorem}{定理}{Theorem},
+ {proposition}{性质}{Proposition},
+ {lemma}{引理}{Lemma},
+ {corollary}{推论}{Corollary},
+ {remark}{注}{Remark},
+ {exercise}{练习}{Exercise}
+ }{\__eb_thmname_set:nnn #1}
\bool_new:N \l__eb_thmbox_bool
\tl_new:N \l__eb_thm_numberwith_tl
@@ -1005,7 +994,7 @@
thmbox .default:n = true,
thmbox .initial:n = false,
within .tl_set:N = \l__eb_thm_numberwith_tl,
- within .initial:n = chapter,
+ within .initial:n = \bool_if:NT \l__eb_class_book_bool{chapter},
bodyfont .tl_set:N = \l__eb_thm_bodyfont_tl,
bodyfont .initial:n = {},
notefont .tl_set:N = \l__eb_thm_notefont_tl,
@@ -1348,6 +1337,7 @@
{
\exp_args:NV \addbibresource\l__eb_bib_file_tl
\cs_gset:Npn \blx@default@theheading{bibintoc}
+ \cs_gset:Npn \blx@warning@noline##1{}
\defbibheading{bibintoc}[\bibname]{\__eb_class_title_bool:n {##1}}
\skip_set:Nn \bibitemsep{0ex}
}
@@ -1367,7 +1357,7 @@
}
}
-\ctex_at_end_preamble:n
+\__eb_at_end_preamble:n
{
\group_begin:
\footnotesize
@@ -1470,6 +1460,10 @@
{\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
\cs_new_protected:Npn \__eb_define_themecolor:nnn #1#2#3
{\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
+\cs_new_protected:Npn \__eb_define_linkcolor:n #1
+ {\definecolorset{HTML}{ctex@}{}{link,#1;url,#1;cite,#1}}
+\cs_new_protected:Npn \__eb_define_themecolor:n #1
+ {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1}}
\cs_new:Npn \__eb_linkcolor_set:n #1
{
linkcolor/\clist_item:nn {#1}{1} .code:n =
@@ -1531,6 +1525,7 @@
\__eb_linkcolor_set:n
linkcolor .default:n = fresh,
linkcolor .initial:n = fresh,
+ linkcol-all .code:n = \__eb_define_linkcolor:n {\exp_not:n {#1}},
linktoc .choice:,
linktoc/unknown .code:n =
@@ -1549,8 +1544,8 @@
}
\__ctex_define:nx {style}
{
- color .choice:,
- color .value_required:n = true,
+ color .choice:,
+ color .value_required:n = true,
\clist_map_function:nN
{
{none, 000000,000000,000000},
@@ -1559,16 +1554,19 @@
{cyberpunk, 601986,eb6877,a4005b}
}
\__eb_themecolor_set:n
- color .initial:n = none
+ color .initial:n = none,
+ color-all .code:n = \__eb_define_themecolor:n {\exp_not:n {#1}}
}
\ctex_at_end_preamble:n
{
- \RequirePackage{hyperref,cleveref}
+ \RequirePackage{hyperref}
\urlstyle{same}
\__eb_allow_urlbreak:
\ctex_hypersetup:n {pdfstartview = FitH}
\exp_args:NV \hypersetup\l__eb_hyperref_clist
+ \labelformat{part}{\CTEXthepart}
+ \labelformat{chapter}{\CTEXthechapter}
\tl_if_eq:NnTF \l__ctex_scheme_tl{chinese}
{
\keys_set_known:nn {ctex}
@@ -1581,21 +1579,20 @@
lstlistlistingname = 代码索引,
lstlistingname = 代码
}
- \crefformat{equation}{#2式(#1)#3}
- \crefformat{align}{#2式(#1)#3}
- \crefformat{multline}{#2式(#1)#3}
- \crefformat{gather}{#2式(#1)#3}
- \crefformat{figure}{#2图#1#3}
- \crefformat{table}{#2表#1#3}
- \crefformat{chapter}{#2第#1章#3}
- \crefformat{section}{#2节#1#3}
- \crefformat{subsection}{#2小节#1#3}
- \crefformat{theorem}{#2定理#1#3}
- \crefformat{definition}{#2定义#1#3}
- \crefformat{lemma}{#2引理#1#3}
- \crefformat{corollary}{#2推论#1#3}
- \crefformat{proposition}{#2性质#1#3}
- \crefformat{example}{#2例#1#3}
+ \labelformat{equation}{式(#1)}
+ \labelformat{align}{式(#1)}
+ \labelformat{multline}{式(#1)}
+ \labelformat{gather}{式(#1)}
+ \labelformat{figure}{图#1}
+ \labelformat{table}{表#1}
+ \labelformat{section}{节#1}
+ \labelformat{subsection}{小节#1}
+ \labelformat{theorem}{定理#1}
+ \labelformat{definition}{定义#1}
+ \labelformat{lemma}{引理#1}
+ \labelformat{corollary}{推论#1}
+ \labelformat{proposition}{性质#1}
+ \labelformat{example}{例#1}
}{
\keys_set_known:nn {ctex}
{
@@ -1603,21 +1600,20 @@
lstlistlistingname = List~of~Codes,
lstlistingname = Code
}
- \crefformat{equation}{#2Equation~(#1)#3}
- \crefformat{align}{#2Equation~(#1)#3}
- \crefformat{multline}{#2Equation~(#1)#3}
- \crefformat{gather}{#2Equation~(#1)#3}
- \crefformat{figure}{#2Figure~#1#3}
- \crefformat{table}{#2Table~#1#3}
- \crefformat{chapter}{#2Chapter~#1#3}
- \crefformat{section}{#2Section~#1#3}
- \crefformat{subsection}{#2Subsection~#1#3}
- \crefformat{theorem}{#2Theorem~#1#3}
- \crefformat{definition}{#2Definition~#1#3}
- \crefformat{lemma}{#2Lemma~#1#3}
- \crefformat{corollary}{#2Corollary~#1#3}
- \crefformat{proposition}{#2Proposition~#1#3}
- \crefformat{example}{#2Example~#1#3}
+ \labelformat{equation}{Equation~(#1)}
+ \labelformat{align}{Equation~(#1)}
+ \labelformat{multline}{Equation~(#1)}
+ \labelformat{gather}{Equation~(#1)}
+ \labelformat{figure}{Figure~#1}
+ \labelformat{table}{Table~#1}
+ \labelformat{section}{Section~#1}
+ \labelformat{subsection}{Subsection~#1}
+ \labelformat{theorem}{Theorem~#1}
+ \labelformat{definition}{Definition~#1}
+ \labelformat{lemma}{Lemma~#1}
+ \labelformat{corollary}{Corollary~#1}
+ \labelformat{proposition}{Proposition~#1}
+ \labelformat{example}{Example~#1}
}
}