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.cls123
1 files changed, 55 insertions, 68 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 34602785126..d0d8ae2c1e7 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -9,7 +9,7 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/02/02}{1.23}{}
+\ProvidesExplClass{easybook}{2021/02/08}{1.23a}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -43,18 +43,12 @@
font .choice:,
font .value_required:n = true,
font/overleaf .code:n = {},
- font/adobe .code:n =
- {\__put_ctexbook:n {fontset = #1}},
- font/founder .code:n =
- {\__put_ctexbook:n {fontset = #1}},
- font/mac .code:n =
- {\__put_ctexbook:n {fontset = #1}},
- font/windows .code:n =
- {\__put_ctexbook:n {fontset = #1}},
- font/linux .code:n =
- {\__put_ctexbook:n {fontset = ubuntu}},
- font/none .code:n =
- {\__put_ctexbook:n {fontset = #1}},
+ font/adobe .code:n = {\__put_ctexbook:n {fontset = #1}},
+ font/founder .code:n = {\__put_ctexbook:n {fontset = #1}},
+ font/mac .code:n = {\__put_ctexbook:n {fontset = #1}},
+ font/windows .code:n = {\__put_ctexbook:n {fontset = #1}},
+ font/linux .code:n = {\__put_ctexbook:n {fontset = ubuntu}},
+ font/none .code:n = {\__put_ctexbook:n {fontset = #1}},
font/noto .code:n =
{
\bool_set_true:N \l__font_noto_bool
@@ -64,16 +58,14 @@
paper .choice:,
paper .value_required:n = true,
- paper/unknown .code:n =
- {\PassOptionsToPackage{#1}{geometry}},
+ paper/unknown .code:n = {\PassOptionsToPackage{#1}{geometry}},
paper .initial:n = a4paper,
- oneside .value_forbidden:n = true,
- twoside .value_forbidden:n = true,
- oneside .code:n =
- {\bool_set_false:N \l__page_twoside_bool},
+ oneside .value_forbidden:n = true,
+ twoside .value_forbidden:n = true,
+ oneside .code:n = {\bool_set_false:N \l__page_twoside_bool},
- unknown .code:n =
+ unknown .code:n =
{\clist_gput_right:No \g__options_clist{\CurrentOption}}
}
@@ -150,8 +142,7 @@
\RequirePackage
{
xcolor,
- pdfpages,subfiles,
- footmisc,
+ pdfpages,footmisc,
setspace,zhlineskip,
amsthm,thmtools,cases,
chemformula,chemfig,siunitx,ulem,
@@ -183,8 +174,7 @@
\RequirePackage[noto,upint]{newtxmath}
\RequirePackage{bm}
}
- \tl_if_empty:NF \g__config_tl
- {\file_input:n {\g__config_tl}}
+ \tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}}
}
\sys_if_engine_xetex:TF
@@ -316,15 +306,17 @@
\@mainmatterfalse
\pagenumbering{Roman}
}
-
+\cs_gset_eq:NN \easyhead\fancyhead
+\cs_gset_eq:NN \easyfoot\fancyfoot
+\cs_gset_eq:NN \easypagestyle\fancypagestyle
\ctex_define:n
{
hdrset .tl_set:N = \l__fancyhf_content_tl,
hdrset .initial:n =
{
- \fancyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
- \fancyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
- \fancyhead[EL,OR]{\color{ctex@frame}\thepage}
+ \easyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
+ \easyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
+ \easyhead[EL,OR]{\color{ctex@frame}\thepage}
}
}
\ctex_at_end_preamble:n
@@ -402,8 +394,8 @@
\bool_if:NT \l__draft_bool
{
\bool_if:NTF \l__page_twoside_bool
- {\fancyfoot[C]{\color{gray!60}\sffamily\today}}
- {\fancyhead[L]{\color{gray!60}\sffamily\today}}
+ {\easyfoot[C]{\color{gray!60}\sffamily\today}}
+ {\easyhead[L]{\color{gray!60}\sffamily\today}}
\geometry{showframe}
}
}
@@ -419,16 +411,14 @@
\__ctex_define:nn {tocset}
{
part/format .tl_set:N = \l__toc_part_format_tl,
- part/format .initial:n =
- {\addvspace{1pc}\sffamily\large},
+ part/format .initial:n = \addvspace{1pc}\sffamily\large,
part/indent .tl_set:N = \l__toc_part_indent_tl,
part/indent .initial:n = 0\ccwd,
part/rule .tl_set:N = \l__toc_part_rule_tl,
part/rule .initial:n = \tocrule{}[\bfseries],
chapter/format .tl_set:N = \l__toc_chap_format_tl,
- chapter/format .initial:n =
- {\addvspace{1pc}\sffamily\large},
+ chapter/format .initial:n = \addvspace{1pc}\sffamily\large,
chapter/indent .tl_set:N = \l__toc_chap_indent_tl,
chapter/indent .initial:n = 0\ccwd,
chapter/rule .tl_set:N = \l__toc_chap_rule_tl,
@@ -662,30 +652,20 @@
format = hang,
% figurewithin = section,
% tablewithin = section,
+ font = {stretch = \l__cap_spread_tl},
+ labelfont = {color = ctex@frame},
labelsep = ccwd,
belowskip = 0pt,aboveskip = 10pt
}
-\captionsetup[table]
- {
- labelfont = {tabfont,color = ctex@frame},
- textfont = {tabfont,stretch = \l__cap_spread_tl}
- }
-\captionsetup[figure]
- {
- labelfont = {figfont,color = ctex@frame},
- textfont = {figfont,stretch = \l__cap_spread_tl}
- }
+\captionsetup[table]{font += tabfont}
+\captionsetup[figure]{font += figfont}
+\captionsetup[lstlisting]{singlelinecheck = false,font += lstfont}
\captionsetup[subfigure]
{
labelformat = parens,
+ font += figfont,
belowskip = 2pt,aboveskip = 6pt
}
-\captionsetup[lstlisting]
- {
- singlelinecheck = false,
- labelfont = {lstfont,color = ctex@frame},
- textfont = {lstfont,stretch = \l__cap_spread_tl}
- }
\captionsetup[figure][bi-second]{name = Figure}
\captionsetup[table][bi-second]{name = Table}
\cs_new:Npn \__arabic:n #1{\int_to_arabic:v {c@#1}}
@@ -770,11 +750,6 @@
\skip_set:Nn \plpartopsep{0ex}
\skip_set:Nn \plitemsep{.75ex plus .1ex}
\skip_set:Nn \plparsep{0ex}
-\cs_new:Npn \circled#1
- {
- \lower .7ex
- \hbox{\tikz\draw(0pt,0pt)circle(.5\ccwd)node{\makebox[\ccwd][c]{\small#1}};}
- }
\cs_new_protected:Npn \__thmname_set:nn #1#2
{\tl_const:cn {c__name_#1_tl}{#2}}
@@ -972,13 +947,6 @@
}
\NewDocumentEnvironment{exercise}{sO{black}O{1.}O{\c__name_exercise_tl}}
{
- \IfBooleanF{#1}
- {
- \CTEX@ifnametrue
- \refstepcounter{section}
- \CTEX@addtocline{section}{#4}
- \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
- }
\begin{center}
\bool_if:NTF \l__thmbox_bool
{
@@ -986,9 +954,25 @@
exsty,
colback = #2!8!white,colframe = #2!50!black,
drop~fuzzy~shadow = #2!50!white,
+ phantom =
+ \IfBooleanF{#1}
+ {
+ \CTEX@ifnametrue
+ \refstepcounter{section}
+ \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
+ },
]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4}
}{
- \sffamily\Large\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4
+ \sffamily\Large
+ \IfBooleanF{#1}
+ {
+ \CTEX@ifnametrue
+ \refstepcounter{section}
+ \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
+ \CTEXthesection\hspace{0.5\ccwd}
+ }#4
}
\end{center}
\begin{compactenum}[#3]
@@ -1148,8 +1132,10 @@
\lstdefinestyle{mystyle}
{
language = [LaTeX]TeX,
- texcsstyle = *\lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi,
- basicstyle = \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi,
+ texcsstyle =
+ *\lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi,
+ basicstyle =
+ \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi,
framexleftmargin = 0pt,
framexrightmargin = 0pt,
xleftmargin = 0pt,
@@ -1160,7 +1146,8 @@
commentstyle = \color{gray},
emphstyle = \color{ctex@emph},
emph = {caption,subcaption,tabularx},
- keywordstyle = \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi,
+ keywordstyle =
+ \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi,
morekeywords =
{
includegraphics,setmainfont,setsansfont,setmonofont,setCJKmainfont,setCJKsansfont,setCJKmonofont,setCJKfamilyfont,RequirePackage
@@ -1172,7 +1159,7 @@
breaklines = true,
resetmargins = true,
numbers = left,
- numberstyle = \small,
+ numberstyle = \footnotesize,
abovecaptionskip = -1ex,
belowcaptionskip = 1ex,
aboveskip = 1.5ex plus .2ex minus .1ex,
@@ -1262,7 +1249,7 @@
\clist_map_function:nN
{
{none, 000000,000000,000000},
- {forest, 005752,004986,a40000},
+ {seaside, 13abae,004986,a40000},
{energy, f39800,00a0e9,893895},
{cyberpunk, 005982,eb6877,a4005b}
}