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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
%% The LaTeX package tcolorbox - version 5.0.2 (2022/01/07)
%% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% 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 `author-maintained'.
%%
%% This work consists of all files listed in README
%%
\tcb@set@library@version{5.0.2}
\newcounter{tcbrastercolumn}
\newcounter{tcbrasterrow}
\newcounter{tcbrasternum}
\newcounter{tcbraster}
\def\tcb@raster@number{\@arabic\c@tcbraster}%
\def\theHtcbrasternum{\tcb@raster@number.\@arabic\c@tcbrasternum}
\setcounter{tcbrasternum}{1}
\setcounter{tcbrastercolumn}{1}
\setcounter{tcbrasterrow}{1}
\def\tcb@raster@ehg@all{%
\tcbset{equal height group={\kvtcb@raster@ehgid}}%
}
\def\tcb@raster@ehg@row{%
\tcbset{equal height group={\kvtcb@raster@ehgid @\number\c@tcbrasterrow}}%
}
\tcbset{%
raster columns/.store in=\kvtcb@raster@columns,
raster rows/.store in=\kvtcb@raster@rows,
raster width/.store in=\kvtcb@raster@width,
raster height/.store in=\kvtcb@raster@height,
%
raster before skip/.store in=\kvtcb@raster@skip@before,
raster after skip/.store in=\kvtcb@raster@skip@after,
raster left skip/.store in=\kvtcb@raster@skip@left,
raster right skip/.store in=\kvtcb@raster@skip@right,
%
raster column skip/.store in=\kvtcb@raster@xskip,
raster row skip/.store in=\kvtcb@raster@yskip,
%
raster equal skip/.style={raster before skip=#1,raster after skip=#1,
raster column skip=#1,raster row skip=#1},
%
raster@halign/.store in=\kvtcb@raster@halign,
raster halign/.is choice,
raster halign/center/.style={raster@halign=\centering},
raster halign/left/.style={raster@halign=\raggedright},
raster halign/right/.style={raster@halign=\raggedleft},
%
raster valign/.store in=\kvtcb@raster@valign,
%
raster equal height group/.store in=\kvtcb@raster@ehgid,%
raster equal height/.is choice,
raster equal height/.default=all,
raster equal height/none/.code={\let\tcb@raster@ehg@set\@empty},%
raster equal height/rows/.code={\let\tcb@raster@ehg@set\tcb@raster@ehg@row},%
raster equal height/all/.code={\let\tcb@raster@ehg@set\tcb@raster@ehg@all},%
%
raster force size/.is choice,%
raster force size/.default=true,%
raster force size/true/.code={\let\tcb@raster@set@size\tcbset@late@options},%
raster force size/false/.code={\let\tcb@raster@set@size\tcbset},%
raster multicolumn/.code={%
\ifnum\numexpr\c@tcbrastercolumn+#1>\numexpr\kvtcb@raster@columns+1\relax
\tcb@warning{'raster multicolumn' combined too much columns}%
\else%
\tcbset@late@options{%
code={\preto\kvtcb@afterbox{\addtocounter{tcbrastercolumn}{\numexpr#1-1}\addtocounter{tcbrasternum}{\numexpr#1-1}}},
width=(\tcb@raster@box@width+\tcb@raster@xskip)*#1-\tcb@raster@xskip}%
\fi%
},
raster multirow/.code={%
\ifdefined\tcb@raster@box@height%
\tcbset@late@options{%
height=(\tcb@raster@box@height+\tcb@raster@yskip)*#1-\tcb@raster@yskip}%
\else%
\tcb@warning{'raster multirow' needs a fixed 'raster height'}%
\fi%
},
raster width center/.style={raster width=\linewidth,raster left skip=(\linewidth-(#1))/2,raster right skip=(\linewidth-(#1))/2},
raster width flush left/.style={raster width=\linewidth,raster left skip=0pt,raster right skip=\linewidth-(#1)},
raster width flush right/.style={raster width=\linewidth,raster left skip=\linewidth-(#1),raster right skip=0pt},
}
\tcbset{
raster reset/.style={
raster width=\linewidth,raster height=0pt,
raster equal skip=2mm,
raster columns=2,raster rows=2,
raster left skip=0pt,raster right skip=0pt,
raster halign=left,raster valign=center,
raster equal height=none,
raster equal height group={REG@\tcb@raster@number},
raster force size,},
raster reset
}
\setcounter{tcbraster}{0}
\let\tcb@raster@change@minipage\@empty
\let\tcb@raster@change@fitbox\@empty
\def\tcb@raster@change@hbox{\tcbset{capture=minipage}}
\def\tcb@height@fill@unbroken@raster#1{%
\ifnum\c@tcblayer<2\relax%
\kvtcb@beforebox%
\def\kvtcb@beforebox{}%
\tcb@breakat@init%
\tcbset{compress page=#1}%
\tcb@comp@h@page%
\ifdim\tcb@h@page<0pt\relax\unkern\pagebreak\tcb@comp@h@page\kern\tcb@raster@skip@left\fi%
\tcbset{height=\tcb@h@page-\kvtcb@bbtop@stand-\kvtcb@bbbottom@stand}%
\fi%
}
\newenvironment{tcbraster}[1][]{%
\tcb@layer@pushup%
\stepcounter{tcbraster}%
\edef\tcb@raster@number{\number\c@tcbraster}%
\edef\tcb@raster@save@num{\number\c@tcbrasternum}%
\edef\tcb@raster@save@column{\number\c@tcbrastercolumn}%
\edef\tcb@raster@save@row{\number\c@tcbrasterrow}%
\let\tcb@raster@change@fitbox\@empty%
\setcounter{tcbrasternum}{1}%
\setcounter{tcbrastercolumn}{1}%
\setcounter{tcbrasterrow}{1}%
\let\tcb@height@fill@unbroken\tcb@height@fill@unbroken@raster%
\tcbset{every box on layer \the\numexpr\number\c@tcblayer+1\relax/.append code={%
\tcb@raster@ehg@set%
\tcbset{raster every box/.try}%
\ifodd\c@tcbrastercolumn\relax%
\tcbset{raster odd column/.try}%
\else%
\tcbset{raster even column/.try}%
\fi%
\tcbset{raster column \number\c@tcbrastercolumn/.try}%
\ifodd\c@tcbrasterrow\relax%
\tcbset{raster odd row/.try}%
\else%
\tcbset{raster even row/.try}%
\fi%
\tcbset{raster row \number\c@tcbrasterrow/.try}%
\ifodd\c@tcbrasternum\relax%
\tcbset{raster odd number/.try}%
\else%
\tcbset{raster even number/.try}%
\fi%
\tcbset{raster row \number\c@tcbrasterrow\space column \number\c@tcbrastercolumn/.try}%
\tcbset{raster number \number\c@tcbrasternum/.try}%
}}%
\tcbset{#1}%
% sanitize
\tcbdimto\tcb@raster@width{\kvtcb@raster@width}%
\tcbdimto\tcb@raster@height{\kvtcb@raster@height}%
\tcbglueto\tcb@raster@skip@before{\kvtcb@raster@skip@before}%
\tcbglueto\tcb@raster@skip@after{\kvtcb@raster@skip@after}%
\tcbdimto\tcb@raster@skip@left{\kvtcb@raster@skip@left}%
\tcbdimto\tcb@raster@skip@right{\kvtcb@raster@skip@right}%
\tcbdimto\tcb@raster@xskip{\kvtcb@raster@xskip}%
\tcbdimto\tcb@raster@yskip{\kvtcb@raster@yskip}%
\tcbset@late@options{%
before={\ifhmode\unskip\fi\ifnum\c@tcbrastercolumn>1 \kern\tcb@raster@xskip\else%
\ifnum\c@tcbrasterrow>1 \parindent\z@\parskip\z@\par\nointerlineskip\addvspace{\the\dimexpr\tcb@raster@yskip\relax}\noindent\fi%
\kern\tcb@raster@skip@left\fi},
after={%
\stepcounter{tcbrasternum}%
\ifnum\c@tcbrastercolumn=\kvtcb@raster@columns\relax%
\kern\tcb@raster@skip@right%
\setcounter{tcbrastercolumn}{1}\stepcounter{tcbrasterrow}%
\else%
\stepcounter{tcbrastercolumn}%
\fi},%
box align=\kvtcb@raster@valign,%
code={\preto\kvtcb@phantom{\addtocounter{tcbrasternum}{-1}\refstepcounter{tcbrasternum}}},%
}%
\tcbdimto\tcb@raster@box@width{(\tcb@raster@width+\tcb@raster@xskip-\tcb@raster@skip@left-\tcb@raster@skip@right)/\kvtcb@raster@columns-\tcb@raster@xskip}%
\tcb@raster@set@size{%
code={\csuse{tcb@raster@change@\kvtcb@capture}},
width=\tcb@raster@box@width,
}%
\ifdim\dimexpr\tcb@raster@height>0pt\relax%
\tcbdimto\tcb@raster@box@height{(\tcb@raster@height+\tcb@raster@yskip-0.001pt)/\kvtcb@raster@rows-\tcb@raster@yskip}%
\tcb@raster@set@size{height=\tcb@raster@box@height}%
\fi%
\let\tcb@end@raster\@empty%
\ifinner\ifhmode%
\color@vbox%
\hsize=\tcb@raster@width%
\let\tcb@end@raster\color@endbox%
\fi\fi%
\if@nobreak%
\iftcb@ignorenobreak%
{\par\nointerlineskip%
\addvspace{\glueexpr\tcb@raster@skip@before-\parskip}}%
\fi%
\else%
{\par\nointerlineskip%
\addvspace{\glueexpr\tcb@raster@skip@before-\parskip}}%
\fi%
\tcb@parfillskip@check\kvtcb@raster@halign\noindent%
}{%
\ifhmode\unskip\fi%
\ifnum\c@tcbrastercolumn>1\relax%
\kern\tcb@raster@skip@right%
\fi%
\begingroup%
\par\nointerlineskip%
\addvspace{\glueexpr\tcb@raster@skip@after-\parskip}%
\endgroup%
\tcb@end@raster%
\setcounter{tcbrasternum}{\tcb@raster@save@num}%
\setcounter{tcbrastercolumn}{\tcb@raster@save@column}%
\setcounter{tcbrasterrow}{\tcb@raster@save@row}%
}
\newcommand{\tcbitem@following}[1][]{%
\end{tcolorbox}\begin{tcolorbox}[#1]%
}
\newcommand{\tcbitem@first}[1][]{%
\let\tcbitem=\tcbitem@following%
\begin{tcolorbox}[#1]%
}
\newenvironment{tcbitemize}[1][]{%
\begin{tcbraster}[#1]%
\let\tcb@raster@change@fitbox=\tcb@raster@change@hbox%
\let\tcbitem=\tcbitem@first%
}{\end{tcolorbox}\end{tcbraster}}
\newenvironment{tcboxedraster}[2][]{%
\tcolorbox[#2]\begin{tcbraster}[#1]}%
{\end{tcbraster}\endtcolorbox}
\newenvironment{tcboxeditemize}[2][]{%
\tcolorbox[#2]\tcbitemize[#1]}%
{\endtcbitemize\endtcolorbox}
|