diff options
author | Norbert Preining <preining@logic.at> | 2021-04-04 01:49:16 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2021-04-04 01:49:16 +0000 |
commit | 425b066c37d773e7d575b5c3749d3f3bc3f1dca3 (patch) | |
tree | 3a8f6f48fb8ad28242c4426d4fa529b6d2e7a3f7 /Master/texmf-dist/tex | |
parent | 010fef6beed8d8f505513fdc9c92bc110a954082 (diff) |
easybook (4apr21)
git-svn-id: svn://tug.org/texlive/trunk@58719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 195 |
1 files changed, 110 insertions, 85 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 2f7b207e63c..44b3616bc43 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/23}{1.23z}{beta} +\ProvidesExplClass{easybook}{2021/04/01}{1.24b}{beta} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -38,21 +38,21 @@ \keys_define:nn {easybook} { - draft .code:n = {\bool_set_true:N \l__draft_bool}, - newline .code:n = {\bool_set_true:N \l__newline_bool}, - entitle .code:n = {\bool_set_false:N \l__zhtitle_bool}, - english .code:n = {\bool_set_false:N \l__lang_chinese_bool}, + draft .code:n = \bool_set_true:N \l__draft_bool, + newline .code:n = \bool_set_true:N \l__newline_bool, + entitle .code:n = \bool_set_false:N \l__zhtitle_bool, + english .code:n = \bool_set_false:N \l__lang_chinese_bool, enstyle .meta:n = {newline,entitle,english}, 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 @@ -62,7 +62,7 @@ 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, @@ -76,7 +76,7 @@ class .choice:, class .value_required:n = true, class/book .code:n = {}, - class/article .code:n = {\bool_set_false:N \l__class_book_bool}, + class/article .code:n = \bool_set_false:N \l__class_book_bool, class .initial:n = book, unknown .code:n = @@ -119,7 +119,10 @@ geoset,hdrset,tocset } \seq_map_inline:Nn \c__options_path_seq - {\ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}}} + { + \ctex_define:n {#1 .meta:nn = {ctex/#1}{##1}} + \cs_new:cpn {#1}##1{\keys_set:nn {ctex/#1}{##1}} + } \ctex_define:n { config .tl_set:N = \g__config_tl, @@ -135,7 +138,7 @@ withpart .initial:n = false, notomath .bool_set:N = \l__notomath_bool, notomath .default:n = true, - notomath .initial:n = true, + notomath .initial:n = false, rulewidth .dim_set:N = \l__rule_width_dim, rulewidth .initial:n = 0.75pt, uppercase .bool_set:N = \l__uppercase_bool, @@ -173,7 +176,7 @@ pdfpages,graphicx, fancyhdr,titletoc, caption-light,subcaption, - tabularx,multirow,makecell,booktabs, + tabularx,multirow,booktabs, tasks,enumitem, listings, imakeidx @@ -620,7 +623,7 @@ \fi }{\tl_set:Nn \l__toc_type_tl{article}} } -\cs_new_protected:Npn \__ifmultoc_after_set: +\cs_new_protected:Npn \__ifmultoc_post_set: { \bool_if:NTF \l__class_book_bool { @@ -639,7 +642,7 @@ \__title_mark:n {\contentsname} \vspace*{\dim_use:N \l__toc_offset_dim} \@starttoc{toc} - \__ifmultoc_after_set: + \__ifmultoc_post_set: \group_end: } \RenewDocumentCommand{\listoffigures}{so} @@ -653,7 +656,7 @@ \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim \vspace*{\dim_use:N \l__toc_offset_dim} \@starttoc{lof} - \__ifmultoc_after_set: + \__ifmultoc_post_set: \group_end: } \RenewDocumentCommand{\listoftables}{so} @@ -667,7 +670,7 @@ \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim \vspace*{\dim_use:N \l__toc_offset_dim} \@starttoc{lot} - \__ifmultoc_after_set: + \__ifmultoc_post_set: \group_end: } \NewDocumentCommand{\listoflistings}{so} @@ -681,7 +684,7 @@ \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim \vspace*{\dim_use:N \l__toc_offset_dim} \@starttoc{lol} - \__ifmultoc_after_set: + \__ifmultoc_post_set: \group_end: } @@ -879,24 +882,24 @@ { \clist_map_inline:nn { - {theorem}{定理}, + {example}{例}, {definition}{定义}, + {theorem}{定理}, + {proposition}{性质}, {lemma}{引理}, {corollary}{推论}, - {proposition}{性质}, - {example}{例}, {remark}{注}, {exercise}{练习} }{\__thmname_set:nn #1} }{ \clist_map_inline:nn { - {theorem}{Theorem}, + {example}{Example}, {definition}{Definition}, + {theorem}{Theorem}, + {proposition}{Proposition}, {lemma}{Lemma}, {corollary}{Corollary}, - {proposition}{Proposition}, - {example}{Example}, {remark}{Remark}, {exercise}{Exercise} }{\__thmname_set:nn #1} @@ -918,24 +921,24 @@ thmbox .bool_set:N = \l__thmbox_bool, thmbox .default:n = true, thmbox .initial:n = false, - numberwith .tl_set:N = \l__thm_numberwith_tl, - numberwith .initial:n = {chapter}, - headpunct .tl_set:N = \l__thm_headpunct_tl, - headpunct .initial:n = {}, + within .tl_set:N = \l__thm_numberwith_tl, + within .initial:n = chapter, bodyfont .tl_set:N = \l__thm_bodyfont_tl, bodyfont .initial:n = {}, notefont .tl_set:N = \l__thm_notefont_tl, notefont .initial:n = {}, headfont .tl_set:N = \l__thm_headfont_tl, - headfont .initial:n = {\color{ctex@emph}\sffamily}, + headfont .initial:n = \color{ctex@emph}\sffamily, + headpunct .tl_set:N = \l__thm_headpunct_tl, + headpunct .initial:n = {}, + spacepost .tl_set:N = \l__thm_spacepost_tl, + spacepost .initial:n = \ccwd, headindent .tl_set:N = \l__thm_headindent_tl, - headindent .initial:n = {0\ccwd}, + headindent .initial:n = 0\ccwd, spaceabove .tl_set:N = \l__thm_spaceabove_tl, - spaceabove .initial:n = {.75ex plus .1ex}, + spaceabove .initial:n = .75ex plus .1ex, spacebelow .tl_set:N = \l__thm_spacebelow_tl, - spacebelow .initial:n = {.75ex plus .1ex}, - spacepost .tl_set:N = \l__thm_spacepost_tl, - spacepost .initial:n = {\ccwd} + spacebelow .initial:n = .75ex plus .1ex } \ctex_at_end_preamble:n { @@ -949,27 +952,31 @@ bodyfont = \l__thm_bodyfont_tl, headpunct = \l__thm_headpunct_tl, postheadspace = \l__thm_spacepost_tl, - numberwithin = \l__thm_numberwith_tl, + within = \l__thm_numberwith_tl, headformat = \NAME\space\NUMBER\NOTE - ]{mythm} - \declaretheorem[style = mythm,name = \c__name_theorem_tl]{theorem} - \declaretheorem[style = mythm,name = \c__name_definition_tl]{definition} - \declaretheorem[style = mythm,name = \c__name_lemma_tl]{lemma} - \declaretheorem[style = mythm,name = \c__name_corollary_tl]{corollary} - \declaretheorem[style = mythm,name = \c__name_proposition_tl]{proposition} - \declaretheorem[style = mythm,name = \c__name_example_tl]{example} + ]{easythm} + \clist_map_inline:nn + { + example,definition,theorem, + proposition,lemma,corollary + }{ + \declaretheorem[ + style = easythm, + name = \use:c {c__name_#1_tl} + ]{#1} + } \cs_gset_eq:NN \proof\relax - \declaretheorem{remark}[ - style = mythm, + \declaretheorem[ + style = easythm, name = \c__name_remark_tl, numbered = no - ] - \declaretheorem{proof}[ - style = mythm, + ]{remark} + \declaretheorem[ + style = easythm, name = \proofname, numbered = no, qed = \qedsymbol - ] + ]{proof} } \settasks @@ -1119,7 +1126,7 @@ #6 \end{enumerate} }{} - \DeclareTColorBox{mybox}{sO{MintCream}d()O{}} + \DeclareTColorBox{easybox}{sO{MintCream}d()O{}} { enhanced~jigsaw,pad~at~break* = 3pt, IfBooleanTF = {#1}{colback = #2}{opacityback = 0,colframe = ctex@emph}, @@ -1227,7 +1234,7 @@ {\__title_mark_intoc:n {\bibname}} } \exp_args:NV \bibliography\l__bib_file_tl - \__ifmultoc_after_set: + \__ifmultoc_post_set: \group_end: } } @@ -1246,7 +1253,7 @@ {\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}} \__put_biblatex:n {backend = biber} } -\cs_new_protected:Npn \__biblatex_after_set: +\cs_new_protected:Npn \__biblatex_post_set: { \exp_args:NV \addbibresource\l__bib_file_tl \cs_gset:Npn \blx@default@theheading{bibintoc} @@ -1262,7 +1269,7 @@ }{ \__biblatex_pre_set: \RequirePackage{biblatex} - \__biblatex_after_set: + \__biblatex_post_set: } } @@ -1299,9 +1306,29 @@ { language = [LaTeX]TeX, texcsstyle = - *\lst@ifdisplaystyle\bfseries\color{ctex@verb}\else\color{ctex@verb}\fi, + { + *\lst@ifdisplaystyle + \bfseries\color{ctex@verb} + \else + \color{ctex@verb} + \fi + }, basicstyle = - \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi, + { + \ttfamily\lst@ifdisplaystyle + \small + \else + \color{ctex@verb} + \fi + }, + keywordstyle = + { + \lst@ifdisplaystyle + \bfseries\color{ctex@verb} + \else + \color{ctex@verb} + \fi + }, framexleftmargin = 0pt, framexrightmargin = 0pt, xleftmargin = 3pt, @@ -1312,9 +1339,7 @@ rulecolor = \color{ctex@frame}, commentstyle = \color{gray}, emphstyle = \color{ctex@emph}, - emph = {caption,makecell,subcaption,tabularx}, - keywordstyle = - \lst@ifdisplaystyle\bfseries\color{ctex@verb}\else\color{ctex@verb}\fi, + emph = {caption,multirow,subcaption,tabularx}, morekeywords = { includegraphics,setmainfont,setsansfont,setmonofont,setCJKmainfont,setCJKsansfont,setCJKmonofont,setCJKfamilyfont,RequirePackage @@ -1385,8 +1410,8 @@ { hyperlink .choice:, hyperlink/edge .code:n = {}, - hyperlink/various .code:n = {\__put_hyperref:n {colorlinks}}, - hyperlink/none .code:n = {\__put_hyperref:n {hidelinks}}, + hyperlink/various .code:n = \__put_hyperref:n {colorlinks}, + hyperlink/none .code:n = \__put_hyperref:n {hidelinks}, hyperlink .default:n = edge, hyperlink .initial:n = edge, @@ -1403,7 +1428,7 @@ linkcolor .initial:n = fresh, linktopage .choice:, - linktopage/true .code:n = {\__put_hyperref:n {linktocpage}}, + linktopage/true .code:n = \__put_hyperref:n {linktocpage}, linktopage/false .code:n = {}, linktopage .default:n = true, linktopage .initial:n = false @@ -1415,7 +1440,7 @@ \clist_map_function:nN { {none, 000000,000000,000000}, - {seaside, 4682B4,004986,a40000}, + {seaside, 4682B4,004986,2E8B57}, {energy, f39800,00a0e9,893895}, {cyberpunk, 601986,eb6877,a4005b} } @@ -1491,10 +1516,10 @@ pagestyle = empty, number = {\bool_if:NTF \l__zhtitle_bool{\chinese{part}}{\thepart}}, - format = {\color{ctex@frame}\sffamily\Huge}, + format = \color{ctex@frame}\sffamily\Huge, aftername = {\bool_if:NTF \l__newline_bool{\par\nobreak}{\hspace{\ccwd}}}, - tocline = {\CTEXifname{\CTEXthepart\hspace{\ccwd}}{}#2} + tocline = \CTEXifname{\CTEXthepart\hspace{\ccwd}}{}#2 }, chapter = { @@ -1511,37 +1536,37 @@ \bool_if:NTF \l__newline_bool {\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}} }, - beforeskip = {-1.5ex}, - afterskip = {3ex}, - lotskip = {0.8pc}, - lofskip = {0.8pc}, - tocline = {\CTEXifname{\CTEXthechapter\hspace{\ccwd}}{}#2} + beforeskip = -1.5ex, + afterskip = 3ex, + lotskip = 0.8pc, + lofskip = 0.8pc, + tocline = \CTEXifname{\CTEXthechapter\hspace{\ccwd}}{}#2 }, section = { hang = true, - format = {\color{ctex@frame}\sffamily\Large}, - aftername = {\hspace{0.5\ccwd}}, - beforeskip = {1.5ex plus .2ex minus .1ex}, - afterskip = {1.5ex plus .2ex minus .1ex}, - tocline = {\CTEXifname{\CTEXthesection\hspace{\ccwd}}{}#2} + format = \color{ctex@frame}\sffamily\Large, + aftername = \hspace{0.5\ccwd}, + beforeskip = 1.5ex plus .2ex minus .1ex, + afterskip = 1.5ex plus .2ex minus .1ex, + tocline = \CTEXifname{\CTEXthesection\hspace{\ccwd}}{}#2 }, subsection = { hang = true, - format = {\color{ctex@frame}\sffamily\large}, - aftername = {\hspace{0.5\ccwd}}, - beforeskip = {1.3ex plus .2ex minus .1ex}, - afterskip = {1.3ex plus .2ex minus .1ex}, - tocline = {\CTEXifname{\CTEXthesubsection\hspace{\ccwd}}{}#2} + format = \color{ctex@frame}\sffamily\large, + aftername = \hspace{0.5\ccwd}, + beforeskip = 1.3ex plus .2ex minus .1ex, + afterskip = 1.3ex plus .2ex minus .1ex, + tocline = \CTEXifname{\CTEXthesubsection\hspace{\ccwd}}{}#2 }, subsubsection = { hang = true, - format = {\color{ctex@frame}\sffamily}, - aftername = {\hspace{0.5\ccwd}}, - beforeskip = {\parskip}, - afterskip = {\parskip} + format = \color{ctex@frame}\sffamily, + aftername = \hspace{0.5\ccwd}, + beforeskip = \parskip, + afterskip = \parskip } } |