1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
%%
%% This is file `eb-tcolorbox.cfg',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% easybook.dtx (with options: `tcolorbox')
%% Copyright (C) 2021 by Qu Yi <q1jx@foxmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
\ProvidesExplFile{eb-tcolorbox.cfg}{2021/11/04}{1.40J}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
\newtcbstyle{tc-theorem}
{
enhanced~jigsaw,pad~at~break* = 3pt,
opacityback = 0,
colframe = ctex@emph,
sharpish~corners,
beforeafter~skip = 1.75ex plus .2ex minus .1ex,
left = 8pt,right = 8pt,
top = \eb@tc@line@skip,bottom = \eb@tc@line@skip,
middle = \eb@tc@line@skip
}
\newtcbstyle{tc-outline}
{
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},
after~skip = 3ex plus .2ex minus .1ex,
arc = 3pt,
left = 2pc,right = 2pc,top = 1.5pc,bottom = 1pc
}
\newtcbstyle{tc-exercise}
{
blank,on~line,center,
sharpish~corners,
fontupper = \Large\sffamily,
beforeafter~skip = 3.75ex plus .2ex minus .1ex
}
\newtcbstyle{tc-easybox}
{
enhanced~jigsaw,pad~at~break* = 3pt,
center~title,
sharpish~corners,
left = 8pt,right = 8pt,
opacityback = 0.2,opacitybacktitle = 0.2,
coltitle = black,colframe = black,
top = \eb@tc@line@skip,bottom = \eb@tc@line@skip,
middle = \eb@tc@line@skip,
toptitle = \eb@tc@line@skip,
titlerule = 0pt,
beforeafter~skip = 1.75ex plus .2ex minus .1ex
}
\newtcbstyle{tc-ebparbox}
{
frame~hidden,
enhanced~jigsaw,pad~at~break* = 3pt,
boxrule = 0pt,
sharpish~corners,
left = 8pt,
middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip,
beforeafter~skip = 1.75ex plus .2ex minus .1ex
}
\newtcbstyle{tc-ebemph}{on~line,blank}
\newtcbstyle{tc-eblink}
{
standard~jigsaw,on~line,
top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt,
boxrule = 0.75pt,arc = 1pt,
opacityback = 0.2
}
\newtcbstyle{tc-ebfbox}
{
on~line,sharpish~corners,
top = 2pt,bottom = 2pt,left = 1pt,right = 1pt,
leftrule = 0pt,rightrule = 0pt
}
\tcbset
{
breakable,
boxsep = 0pt,
fonttitle = \sffamily,
boxrule = \l__eb_rule_width_dim
}
\tl_new:N \p@eb@exercise
\tl_new:N \eb@tc@list@prologue
\cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} }
\cs_new:Npn \tcphantomifname #1#2
{
\tl_gset:Nn \eb@tc@exercise@ifnametrue {#1}
\tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2}
}
\tcphantomifname
{
\markright
{
\eb_tcb_toc_counter_numsep:n { exercise }
\eb@tc@exercise@title
}
\addcontentsline{toc}{section}
{
\eb_tcb_toc_counter_numsep:n { exertoc }
\eb@tc@exercise@title
}
}{}
\cs_set:Npn \eb_exercise_label_noempty_use:
{
\eb_current_label:n { eb@exercise }
\tl_if_empty:NF \eb@tc@exercise@label
{ \exp_args:NV \label \eb@tc@exercise@label }
}
\cs_new:Npn \eb_tcb_toc_counter_numsep:n #1
{
\thetcbcounter
\hspace{\use:c { eb@toc@#1@numsep }}
}
\newtcbox[auto~counter]{\eb@tc@exercise@box}[1]{tc-exercise,#1}
\newtcolorbox{eb@tc@outline@box}[2]{title = #1,tc-outline,#2}
\NewDocumentEnvironment{outline}{O{}D(){\abstractname}o+b}
{
\begin{eb@tc@outline@box}{#2}{IfValueT = {#3}{#3}}
\begin{eb@outline@list}[#1]
#4
\end{eb@outline@list}
\end{eb@tc@outline@box}
}{}
\NewDocumentEnvironment{exercise}{st+od()O{}+b}
{
\IfValueT{#3}{ \keys_set:nn { eb/exercise } {#3} }
\IfBooleanF{#2}
{
\eb@tc@exercise@box
{
fuzzy~halo = 5pt~with~\eb@tc@background@color,
IfValueT = {#4}{#4},
phantom =
\IfBooleanTF{#1}
{\eb@tc@exercise@ifnamefalse}
{\eb@tc@exercise@ifnametrue}
}{
\IfBooleanF{#1}
{
\eb_tcb_toc_counter_numsep:n { exercise }
\tl_set_eq:NN \theeb@exercise \thetcbcounter
\eb_exercise_label_noempty_use:
}
\eb@tc@exercise@title
}
}
\tl_if_empty:NF \eb@tc@list@prologue { \eb@tc@list@prologue }
\exp_last_unbraced:NnNo
\begin{eb@exercise@list}[\eb@tc@list@number,#5]
#6
\end{eb@exercise@list}
\tl_gclear:N \eb@tc@list@prologue
}{}
\DeclareTColorBox{easybox}{sO{Khaki}d()O{}}
{
IfBooleanF = {#1}{frame~hidden,boxrule = 0pt},
IfValueT = {#3}{title = #3},
colback = #2,colbacktitle = #2,
tc-easybox,#4
}
\DeclareTColorBox{ebparbox}{sO{DarkSlateBlue}d()O{}}
{
borderline~west = {3pt}{0pt}{#2},
IfBooleanTF = {#1}
{
colback = #2,colbacktitle = #2,
opacityback = 0.2,opacitybacktitle = 0.2,
IfValueTF = {#3}{title = #3,top = 0pt}{top = \eb@tc@line@skip},
bottom = \eb@tc@line@skip,toptitle = \eb@tc@line@skip,
right = 8pt
}{
colback = white,
IfValueT = {#3}{title = #3},
top = 0pt,bottom = 0pt,right = 0pt,toptitle = 0pt
},
coltitle = #2,tc-ebparbox,#4
}
\DeclareTotalTCBox{\ebfbox}{O{Lime}vO{}}
{colback = #1!10!white,colframe = #1!50!black,tc-ebfbox,#3}{#2}
\DeclareTotalTCBox{\ebemph}{O{DarkSeaGreen}vO{}}
{fuzzy~halo = 2pt~with~#1,tc-ebemph,#3}{#2}
\DeclareTotalTCBox{\eblink}{O{Aqua}vO{}}
{colback = #1,colframe = #1,tc-eblink,#3}{#2}
\endinput
%%
%% End of file `eb-tcolorbox.cfg'.
|