summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-19 21:31:05 +0000
committerKarl Berry <karl@freefriends.org>2021-03-19 21:31:05 +0000
commitbe5be64bb624a852ee9fae46049cc54a5ad8ed87 (patch)
tree7299a2c1e8a43e2969546ef70c4424ce72dd2eca /Master/texmf-dist/tex
parent74dfe0155019ca519310172158e05e697991bd40 (diff)
easybook (19mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58548 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls259
1 files changed, 133 insertions, 126 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 2802bf40edd..fff5697b188 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/18}{1.23u}{}
+\ProvidesExplClass{easybook}{2021/03/19}{1.23v}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -96,7 +96,7 @@
{normalem}{ulem},
{protrusion = false}{microtype},
{shortlabels,inline}{enumitem},
- {most}{tcolorbox},
+ {many}{tcolorbox},
{xindy}{imakeidx},
{CJKmath = true}{xeCJK},
{no-math}{fontspec},
@@ -165,18 +165,17 @@
\RequirePackage
{
xcolor,
- pdfpages,
footmisc,setspace,
amsmath,amsthm,thmtools,cases,
chemformula,siunitx,ulem,
geometry,marginnote,nccfoots,
- rotfloat,graphicx,
+ pdfpages,graphicx,
fancyhdr,titletoc,
- caption,bicaption,subcaption,
- microtype,zhlipsum,pifont,
+ caption-light,subcaption,
+ pifont,microtype,
tabularx,multirow,makecell,booktabs,
- paralist,tasks,enumitem,
- tcolorbox,
+ tasks,enumitem,
+ listings,
imakeidx
}
\ctex_at_end_preamble:n
@@ -322,7 +321,6 @@
}
\cs_gset_eq:NN \easyhead\fancyhead
\cs_gset_eq:NN \easyfoot\fancyfoot
-\cs_gset_eq:NN \easypagestyle\fancypagestyle
\__ctex_define:nn {hdrset}
{
head-foot .tl_set:N = \l__fancyhf_content_tl,
@@ -476,7 +474,7 @@
belowoffset .initial:n = -1pc
}
-\NewDocumentCommand{\tocrule}{O{0.7pc}O{1.2}mO{}}
+\NewDocumentCommand{\tocrule}{O{0.7pc}D(){1.2}mO{}}
{
\normalsize\normalfont
\titlerule*[#1]{\scalebox{#2}{#3}}#4\contentspage
@@ -575,8 +573,7 @@
{
\if@twocolumn
\@restonecoltrue
- \onecolumn
- \bool_if:NT \l__multoc_bool{\twocolumn}
+ \bool_if:NTF \l__multoc_bool{\twocolumn}{\onecolumn}
\else
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
@@ -709,8 +706,11 @@
font += figure@font,
belowskip = 2pt,aboveskip = 6pt
}
-\captionsetup[figure][bi-second]{name = Figure}
-\captionsetup[table][bi-second]{name = Table}
+\ctex_at_end_package:nn {bicaption}
+ {
+ \captionsetup[figure][bi-second]{name = Figure}
+ \captionsetup[table][bi-second]{name = Table}
+ }
\cs_new:Npn \__arabic:n #1{\int_to_arabic:v {c@#1}}
\cs_new_protected:Npn \__separator_set:n #1
{
@@ -804,7 +804,14 @@
\setlist
{
labelsep = .75\ccwd,listparindent = 2\ccwd,
- itemsep = .75ex plus .1ex,parsep = 0ex,topsep = .75ex plus .1ex,partopsep = 0ex
+ itemsep = .75ex plus .1ex,topsep = .75ex plus .1ex,
+ partopsep = 0ex,parsep = 0ex
+ }
+\newlist{outlinelist}{itemize}{1}
+\setlist[outlinelist]
+ {
+ label = \color{ctex@emph}\upshape\ding{111},
+ itemsep = .5ex plus .1ex,leftmargin = *
}
\setlist[itemize,1]
{label = \color{ctex@emph}\ensuremath{\bullet},leftmargin = *}
@@ -816,13 +823,6 @@
{label = \color{ctex@emph}(\alph*),ref = \theenumi(\alph*),leftmargin = *}
\setlist[description]
{font = \color{ctex@emph}\sf,labelwidth = *,leftmargin = 2\ccwd}
-\newlist{outlinelist}{itemize}{1}
-\setlist[outlinelist]
- {label = \color{ctex@emph}\upshape\ding{111},itemsep = .5ex plus .1ex,leftmargin = *}
-\skip_set:Nn \pltopsep{.75ex plus .1ex}
-\skip_set:Nn \plpartopsep{0ex}
-\skip_set:Nn \plitemsep{.75ex plus .1ex}
-\skip_set:Nn \plparsep{0ex}
\cs_new_protected:Npn \__thmname_set:nn #1#2
{\tl_const:cn {c__name_#1_tl}{#2}}
@@ -987,123 +987,130 @@
\cs_gset:Npn \tagform@#1
{\maketag@@@{\color{ctex@emph}(\ignorespaces#1\unskip\@@italiccorr)}}
-\tcbset
+\ctex_at_end_package:nn {tcolorbox}
{
- thmsty/.style =
+ \tcbset
+ {
+ thmsty/.style =
+ {
+ enhanced~jigsaw,pad~at~break* = 3pt,
+ opacityback = 0,
+ colframe = ctex@emph,
+ left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
+ arc = 0pt
+ },
+ outlinesty/.style =
+ {
+ enhanced,nofloat,
+ tikznode~boxed~title,
+ interior~style = white,colframe = ctex@emph,
+ colbacktitle = white,coltitle = ctex@emph,
+ fonttitle = \large\sffamily,fontupper = \itshape,
+ boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt},
+ attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2},
+ arc = 3pt,
+ after~skip = 3ex,
+ left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc,
+ boxsep = 5pt
+ },
+ exersty/.style =
+ {
+ enhanced,on~line,
+ arc = 5pt,
+ fontupper = \sffamily\Large,
+ boxrule = 1pt,boxsep = 0pt,
+ left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
+ before~skip = 4ex,after~skip = 2.25ex
+ },
+ breakable,
+ boxrule = \l__rule_width_dim
+ }
+ \NewDocumentEnvironment{outline}{D(){\abstractname}o+b}
+ {
+ \begin{tcolorbox}[outlinesty,title = #1,IfValueT = {#2}{#2}]
+ \begin{outlinelist}
+ #3
+ \end{outlinelist}
+ \end{tcolorbox}
+ }{}
+ \NewDocumentEnvironment{exercise}
+ {sO{LightYellow}O{1.}D(){\c__name_exercise_tl}o+b}
+ {
+ \begin{center}
+ \bool_if:NTF \l__thmbox_bool
+ {
+ \tcbox[
+ exersty,
+ colback = #2,colframe = black,
+ drop~fuzzy~shadow = #2,
+ IfValueT = {#5}{#5},
+ 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}
+ {
+ \CTEX@ifnametrue
+ \refstepcounter{section}
+ \markright{\CTEXthesection\hspace{0.5\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
+ \CTEXthesection\hspace{0.5\ccwd}
+ }#4
+ }
+ \end{center}
+ \begin{enumerate}[#3,labelsep = 0.5\ccwd]
+ #6
+ \end{enumerate}
+ }{}
+ \DeclareTColorBox{mybox}{sO{MintCream}d()O{}}
{
enhanced~jigsaw,pad~at~break* = 3pt,
- opacityback = 0,
- colframe = ctex@emph,
+ IfBooleanTF = {#1}{colback = #2}{opacityback = 0,colframe = ctex@emph},
+ IfValueT = {#3}{title = #3},
+ coltitle = black,colbacktitle = white,
+ fonttitle = \sffamily,
left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
- arc = 0pt
- },
- outlinesty/.style =
+ arc = 0pt,
+ toptitle = 2pt,bottomtitle = 2pt,
+ beforeafter~skip=2ex,
+ halign~upper = left,halign~lower = left,
+ center~title,#4
+ }
+ \DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
{
- enhanced,nofloat,
- tikznode~boxed~title,
- interior~style = white,colframe = ctex@emph,
- colbacktitle = white,coltitle = ctex@emph,
- fonttitle = \large\sffamily,fontupper = \itshape,
- boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt},
- attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2},
- arc = 3pt,
- after~skip = 3ex,
- left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc,
- boxsep = 5pt
- },
- exersty/.style =
+ nobeforeafter,tcbox~raise~base,
+ blank,fuzzy~halo = 2pt~with~#1,#3
+ }{#2}
+ \DeclareTotalTCBox{\concise}{O{Aqua}vO{}}
{
- enhanced,on~line,
- arc = 5pt,
- fontupper = \sffamily\Large,
- boxrule = 1pt,boxsep = 0pt,
- left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt,
- before~skip = 4ex,after~skip = 2.25ex
- },
- breakable,
- boxrule = \l__rule_width_dim
+ nobeforeafter,tcbox~raise~base,
+ top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
+ boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
+ colback = #1!15!white,#3
+ }{#2}
}
\ctex_at_end_preamble:n
{
\bool_if:NT \l__thmbox_bool
{
- \tcolorboxenvironment{theorem}{thmsty}
- \tcolorboxenvironment{definition}{thmsty}
- \tcolorboxenvironment{lemma}{thmsty}
- \tcolorboxenvironment{corollary}{thmsty}
- \tcolorboxenvironment{proposition}{thmsty}
- \tcolorboxenvironment{example}{thmsty}
+ \@ifpackageloaded{tcolorbox}
+ {
+ \tcolorboxenvironment{theorem}{thmsty}
+ \tcolorboxenvironment{definition}{thmsty}
+ \tcolorboxenvironment{lemma}{thmsty}
+ \tcolorboxenvironment{corollary}{thmsty}
+ \tcolorboxenvironment{proposition}{thmsty}
+ \tcolorboxenvironment{example}{thmsty}
+ }{}
}
}
-\NewDocumentEnvironment{outline}{O{\abstractname}o}
- {
- \begin{tcolorbox}[outlinesty,title = #1,IfValueT = {#2}{#2}]
- \begin{outlinelist}
- }{
- \end{outlinelist}
- \end{tcolorbox}
- }
-\NewDocumentEnvironment{exercise}{sO{LightYellow}O{1.}O{\c__name_exercise_tl}o}
- {
- \begin{center}
- \bool_if:NTF \l__thmbox_bool
- {
- \tcbox[
- exersty,
- colback = #2,colframe = black,
- drop~fuzzy~shadow = #2,
- IfValueT = {#5}{#5},
- 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}
- {
- \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]
- }{
- \end{compactenum}
- }
-\DeclareTColorBox{mybox}{soO{MintCream}O{}}
- {
- enhanced~jigsaw,pad~at~break* = 3pt,
- IfBooleanTF = {#1}{colback = #3}{opacityback = 0,colframe = ctex@emph},
- IfValueT = {#2}{title = #2},
- coltitle = black,colbacktitle = white,
- fonttitle = \sffamily,
- left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc,
- arc = 0pt,
- toptitle = 2pt,bottomtitle = 2pt,
- beforeafter~skip=2ex,
- halign~upper = left,halign~lower = left,
- center~title,#4
- }
-\DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}}
- {
- nobeforeafter,tcbox~raise~base,
- blank,fuzzy~halo = 2pt~with~#1,#3
- }{#2}
-\DeclareTotalTCBox{\concise}{O{Aqua}vO{}}
- {
- nobeforeafter,tcbox~raise~base,
- top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt,
- boxsep = 0pt,boxrule = 0.75pt,arc = 1pt,
- colback = #1!15!white,#3
- }{#2}
\bool_set_true:N \l__backend_bibtex_bool
\tl_new:N \l__bib_style_tl