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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
|
% \LaTeX-Main\
%% The LaTeX package tcolorbox - version 2.51 (2013/09/16)
%% tcolorbox.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
%% Copyright (c) 2006-2013 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
%%
\documentclass[a4paper,11pt]{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage{lmodern,parskip,array,ifthen,calc,makeidx}
\usepackage{amsmath,amssymb}
\usepackage[svgnames,table,hyperref]{xcolor}
\usepackage{tikz}
\usepackage{varioref}
\usepackage[pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref}
\usepackage{cleveref}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=1.5cm,bottom=1.5cm,
marginparsep=5mm,marginparwidth=10mm,
headheight=0mm,headsep=0cm,
footskip=1.5cm,includeheadfoot]{geometry}
\usepackage{fancyhdr}
\fancyhf{}
\fancyfoot[C]{\thepage}%
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}
\tolerance=2000%
\setlength{\emergencystretch}{20pt}%
\usepackage{csquotes}
\usepackage[style=numeric-comp,sorting=nyt,
maxnames=8,minnames=8,abbreviate=false,backend=biber]{biblatex}
\DeclareFieldFormat{url}{\newline\url{#1}}%
\DeclareListFormat{language}{}%
\setlength{\bibitemsep}{\smallskipamount}
\addbibresource{tcolorbox.doc.bib}
\usetikzlibrary{shadings,shadows}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{patterns}
\usepackage{array,tabularx}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{changepage}
\strictpagecheck
\usepackage[all]{tcolorbox}
\tcbset{skin=enhanced}
\urlstyle{sf}
\tcbmakedocSubKey{docTcbKey}{tcb}
\tcbmakedocSubKey{langTcbKey}{tcb/doclang}
\tcbmakedocSubKey{newTcbKey}{tcb/new}
\makeatletter
\def\index@Skin#1{\index{#1\idx@actual\texttt{#1} Skin}\index{Skins\idx@level#1\idx@actual\texttt{#1}}}
\newenvironment{docSkin}[1]{\begin{manual@entry}%
\hypertarget{skin:#1}{\manual@top{\texttt{/tcb/skin=}\disp@com{#1}\index@Skin{#1}\protected@edef\@currentlabel{#1}\label{skin:#1}\hfill(skin)}}}%
{\end{manual@entry}}
\def\refSkin#1{\ref@doc{skin:#1}}
\makeatother
\newtcolorbox{marker}[1][]{marker,#1}
\def\version{2.51}%
\def\datum{2013/09/16}%
\makeindex
\hypersetup{
pdftitle={Manual for the tcolorbox package},
pdfauthor={Thomas F. Sturm},
pdfsubject={colored boxes},
pdfkeywords={colored boxes, LaTeX examples, theorems}
}
\newcounter{texexp}
\newcounter{texercise}
\newcounter{mytheorem}[section]
\newcounter{myexample}
\newcounter{example}
\newlength{\examlen}
\lstdefinestyle{mydocumentation}{style=tcbdocumentation,
classoffset=0,
texcsstyle=\color{blue},
% LaTeX and other packages
moretexcs={arrayrulecolor,draw,includegraphics,ifthenelse,isodd,lipsum,path,pgfkeysalso},
classoffset=1,
% tcolorbox macros
moretexcs={% core
endtcolorbox,endtcbverbatimwrite,newtcolorbox,newtcbox,newtcboxfit,tcbusetemp,
tcblower,tcbox,tcboxfit,tcbset,tcbuselibrary,tcolorbox,tcbverbatimwrite,
% listings
endtcblisting,newtcblisting,newtcbinputlisting,
tcblisting,tcbinputlisting,tcbuselistingtext,tcbuselistinglisting,tcbusetemplisting,
tcbfitdim,tcbfitsteps,
% theorems
tcbmaketheorem,tcboxmath,tcbhighmath,thetcbcounter,newtcbtheorem,
% documentation
brackets,
colDef,colOpt,cs,
docAuxCommand,docColor,
meta,marg,
oarg,
refCom,refEnv,refKey,
tcbmakedocSubKey,
% skins
tcbline,
},
texcsstyle=\color{Definition}\bfseries,
classoffset=2,
keywordstyle=\color{Option}\bfseries,
% tcolorbox options
morekeywords={% core
adjusted,adjust,after,arc,auto,autoparskip,align,
before,bottom,boxsep,boxrule,bottomtitle,bottomrule,broken,basedim,
collower,coltext,coltitle,colback,colframe,colupper,center,code,capture,check,counter,
equal,enlarge,enlargement,extrude,every,box,higher,layers,
fontupper,fontlower,fonttitle,first,floatplacement,float,fit,fontsize,flushleft,flushright,freestyle,format,
group,gap,
height,
lowerbox,left,leftrule,lefttitle,leftupper,leftlower,lower,last,lefthand,label,
middle,minimum,maxstep,macros,
notitle,natural,noparskip,nobeforeafter,nofloat,number,
parskip,parbox,phantom,page,
outer,oversize,overlay,odd,
right,rightrule,righttitle,rightupper,rightlower,righthand,ratio,
savelowerto,savedelimiter,space,split,shrink,sidebyside,skip,step,separated,
title,top,toptitle,toprule,titlerule,tabularx,tikz,toggle,tight,tempfile,text,
upper,unbroken,
valign,
width,within,
% listings
comment,
file,
inputencoding,
listing,minted,
options,outside,
style,side,
utf,
% theorems
ams,align,
dash,
equation,
gather,
highlight,
math,
nodisplayskip,
separator,sign,
theorem,
% documentation
actual,
color,colors,
docexample,documentation,definition,default,
example,english,environment,environments,
german,
hyperlink,
key,
index,
level,language,
pageshort,
option,
quote,
settings,
% skins
beamer,bicolor,blank,borderline,clip,
colbacktitle,code,colbacklower,
draft,drop,
enhanced,engine,extend,
frame,freelance,fuzzy,freelancefirst,freelancemiddle,freelancelast,
graphical,geometry,graphics,
hidden,halo,
interior,
opacity,overzoom,
midday,
nodes,
skin,segmentation,stretch,standard,shadow,
titled,
watermark,widget,
zoom,
% breakable
breakable,break,enlargepage,
goal,
pad,
unbreakable,
% hooks
app,pre,
},
classoffset=0% restore default
}
\tcbset{documentation listing style=mydocumentation,%
sbs/.style={sidebyside,before lower app={\tcbset{sidebyside=false}}},%
innerbox/.style={reset,documentation listing style=mydocumentation,docexample/.style={docexample original},
},
base example/.style={enhanced,colframe=Navy!50!ExampleFrame,colback=Navy!5!ExampleBack,fontlower=\footnotesize,
bicolor,colbacklower=ExampleBack!5!white,drop fuzzy shadow},
docexample/.style={base example,%
every box on layer 2/.style={every box},
before upper={\tcbset{innerbox}},before lower={\tcbset{innerbox}}
},
docexample original/.style={colframe=ExampleFrame,colback=ExampleBack,fontlower=\footnotesize,frame style={}},
}
\newcommand{\inputpreamblelisting}[1]{%
\tcbinputlisting{title=Definition in the preamble:,
base example,coltitle=black,fonttitle=\itshape,titlerule=0pt,
colbacktitle=Navy!15!ExampleBack,
top=0mm,
before=\par\smallskip,%
listing style=mydocumentation,
listing only,listing file={\jobname_preamble_#1.tex}}%
}
\newtcolorbox{deprecated}{blank,breakable,watermark text=deprecated}
\newtcbox{\mylib}{enhanced,nobeforeafter,tcbox raise base,boxrule=0.4pt,top=0mm,bottom=0mm,
right=0mm,left=4mm,arc=1pt,boxsep=2pt,before upper={\vphantom{dlg}},
colframe=green!50!black,coltext=green!25!black,colback=green!10!white,
overlay={\begin{tcbclipinterior}\fill[green!75!blue!50!white] (frame.south west)
rectangle node[text=white,font=\sffamily\bfseries\tiny,rotate=90] {LIB} ([xshift=4mm]frame.north west);\end{tcbclipinterior}}}
\robustify{\mylib}
%\tcbset{every box/.style={enhanced}}
\begin{tcbverbatimwrite}{\jobname_preamble_A.tex}
\newtcolorbox[auto counter,number within=section]{pabox}[2][]{%
colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
title=Examp.~\thetcbcounter: #2,#1}
\end{tcbverbatimwrite}
\input{\jobname_preamble_A.tex}
\begin{tcbverbatimwrite}{\jobname_preamble_B.tex}
% counter from previous example
\newtcbox[use counter from=pabox]{\pbbox}[2][]{%
colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
title=(\thetcbcounter) #2,#1}
\end{tcbverbatimwrite}
\input{\jobname_preamble_B.tex}
\begin{tcbverbatimwrite}{\jobname_preamble_C.tex}
\newtcblisting[auto counter]{mycbox}[1]{%
colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,
title=Listing \thetcbcounter: #1}
\end{tcbverbatimwrite}
\input{\jobname_preamble_C.tex}
\begin{tcbverbatimwrite}{\jobname_preamble_D.tex}
\tcbset{
texexp/.style={colframe=red!50!yellow!50!black, colback=red!50!yellow!5!white,
coltitle=red!50!yellow!3!white,
fonttitle=\small\sffamily\bfseries, fontupper=\small, fontlower=\small},
example/.style 2 args={texexp,
title={Example \thetcbcounter: #1},label={#2}},
}
\newtcblisting{texexp}[1]{texexp,#1}
\newtcblisting[auto counter,number within=section]{texexptitled}[3][]{%
example={#2}{#3},#1}
\newtcolorbox[use counter from=texexptitled]{texexptitledspec}[3][]{%
example={#2}{#3},#1}
\end{tcbverbatimwrite}
\input{\jobname_preamble_D.tex}
\begin{tcbverbatimwrite}{\jobname_preamble_E.tex}
\newtcolorbox[auto counter,number within=section,list inside=exam]%
{texercise}[2][]{texercisestyle,
listing file={\solfile\thetcbcounter},label={exe:#2},
phantom={\writesol{#2}},
title={Exercise \thetcbcounter\hfill\mdseries Solution on page \pageref{sol:#2}},
list entry={\numberline{\thetcbcounter}Exercise with solution on
page \pageref{sol:#2}},#1}
\end{tcbverbatimwrite}
\input{\jobname_preamble_E.tex}
\begin{tcbverbatimwrite}{\jobname_preamble_F.tex}
\newtcbtheorem[number within=section]{mytheo}{My Theorem}%
{colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{th}
\end{tcbverbatimwrite}
\input{\jobname_preamble_F.tex}
\begin{tcbverbatimwrite}{\jobname_preamble_G.tex}
\tcbset{
defstyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
arc=0mm, colback=blue!5!white,colframe=blue!75!black},
theostyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
colback=red!10!white,colframe=red!75!black},
}
\newtcbtheorem[number within=subsection]{Definition}{Definition}{defstyle}{def}
\newtcbtheorem[use counter from=Definition]{Theorem}{Theorem}{theostyle}{theo}
\newtcbtheorem[use counter from=Definition]{Corollary}{Corollary}{theostyle}{cor}
\end{tcbverbatimwrite}
\input{\jobname_preamble_G.tex}
\begin{tcbverbatimwrite}{\jobname_preamble_H.tex}
\newtcolorbox[auto counter,number within=section,
number freestyle={(Q/\noexpand\thesection/\noexpand\Alph{\tcbcounter})},
]{phbox}[2][]{%
colback=yellow!15!white,colframe=blue!75!black,fonttitle=\bfseries,
title=Question~\thetcbcounter: #2,#1}
\end{tcbverbatimwrite}
\input{\jobname_preamble_H.tex}
%\includeonly{tcolorbox.doc.skins}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\include{tcolorbox.doc.abstract}
\include{tcolorbox.doc.intro}
\include{tcolorbox.doc.coremacros}
\include{tcolorbox.doc.coreoptions}
\include{tcolorbox.doc.initoptions}
\include{tcolorbox.doc.verbatim}
\include{tcolorbox.doc.skins}
\include{tcolorbox.doc.listings}
\include{tcolorbox.doc.theorems}
\include{tcolorbox.doc.breakable}
\include{tcolorbox.doc.fitting}
\include{tcolorbox.doc.hooks}
\include{tcolorbox.doc.documentation}
\include{tcolorbox.doc.references}
\include{tcolorbox.doc.index}
\end{document}
|