diff options
Diffstat (limited to 'tex')
66 files changed, 32550 insertions, 38 deletions
diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/Basilica_5.png b/tex/.texmf/tex/latex/misc/tcolorbox/Basilica_5.png Binary files differnew file mode 100644 index 0000000..1a9f191 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/Basilica_5.png diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/CHANGES b/tex/.texmf/tex/latex/misc/tcolorbox/CHANGES new file mode 100644 index 0000000..579884b --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/CHANGES @@ -0,0 +1,1062 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% + +(2006-2011): pre publication usage + +version 1.00 (2011/12/08): initial public release + +version 1.01 (2012/01/26): +- dates amended to \RequirePackage(s) +- provision of the tcolorbox.tds.zip file for easier installation + +version 1.02 (2012/02/15) +- documentation language changed from German to English +- small correction of the theorem title line appearance + +version 1.10 (2012/03/01) +- tcblatex style for listings changed (nolol added) +- improved hyperref support +- new keys parskip and noparskip +- source code of the documentation added +- new library 'documentation' to support LaTeX documentations + with several library commands, environments and keys (see documentation) + +version 1.20 (2012/03/16) +- new geometry keys: + 'lefttitle', 'leftupper', 'leftlower', 'righttitle', 'rightupper', 'rightlower' + and implementation changed for 'left' and 'right' +- implementation for tcolorbox changed (adaption to height options) +- new fixed height option keys: + 'natural height', 'height', 'equal height group', 'minimum for equal height group', + 'space', 'space to upper', 'space to lower', 'space to both', 'split', + 'valign', 'valign lower', + 'adjusted title' +- new bounding box option keys: + 'enlarge top by', 'enlarge bottom by', 'enlarge left by', 'enlarge right by', + 'toggle enlargement' +- preparations for a future skin changing option implemented +- commands \brackets and \docAuxCommand added to the documentation library +- documentation rearranged + +version 1.30 (2012/04/20) +- several internal code changes to provide a 'skin' exchange mechanism +- new keys for the core package: + 'frame engine', 'interior titled engine', 'interior engine', 'segmentation engine' + 'skin', 'graphical environment', 'geometry nodes', 'colupper', 'collower' +- tcolorbox now defined as 'long' macro +- new keys for the library 'listings': + 'comment', 'listing and comment', 'comment and listing' +- new library 'skins' with the skins + 'standard', 'enhanced', 'freelance', 'bicolor', 'beamer', 'widget' +- keys for the library 'skins': + 'frame style', 'interior style', 'segmentation style' + 'frame code', 'interior titled code', 'interior code', 'segmentation code', + 'colbacklower' + +version 2.00 (2013/03/01) +- breaking news: the new library 'breakable' adds breaking support to tcolorbox. +- e-TeX now used instead of calc +- new key 'adjust text' and new implementation for 'adjusted title' +- new geometry keys: + 'toprule', 'toprule at break', 'bottomrule', 'bottomrule at break', + 'leftrule', 'rightrule', 'titlerule', 'outer arc', 'auto outer arc', + 'toptitle', 'bottomtitle' +- new bounding box keys: + 'enlarge top at break by', 'enlarge bottom at break by' +- new overlay keys: + 'overlay', 'no overlay', 'overlay broken', 'overlay unbroken', + 'overlay first', 'overlay middle', 'overlay last', + 'overlay unbroken and first', 'overlay middle and last' +- new key: 'parbox' to change text behaviour +- new library 'breakable' for breakable boxes with the new keys: + 'breakable', 'unbreakable', 'title after break', 'notitle after break', + 'adjusted title after break', 'lines before break', 'shrink break goal' +- new keys for the 'skins' library + 'skin first', 'skin middle', 'skin last', 'title engine', 'pathfirst', + 'pathmiddle', 'pathlast', 'title style', 'title code', 'enhancedfirst', + 'enhancedmiddle', 'enhancedlast', 'enhanced', 'marker', 'bicolor', + 'bicolorfirst', 'bicolormiddle', 'bicolorlast', 'beamer', + 'beamerfirst', 'beamermiddle', 'beamerlast', 'draft', 'freelance', 'standard' +- NOTE: skins 'beamer' and 'widget' changed + use the new style options 'beamer' and 'widget' to get the old appearance +- new watermark keys: + 'watermark text', 'watermark text on', 'watermark graphics', + 'watermark graphics on', 'watermark tikz', 'watermark tikz on', + 'no watermark', 'watermark opacity', 'watermark color', + 'watermark zoom', 'watermark stretch' + +version 2.01 (2013/03/07) +- bug fix: superfluous vertical space for a breakable box which appeared after a page break +- bug fix: height computation error when a broken boxed starts with a segmentation line +- new key for the 'listings' library: + 'listing inputencoding' +- new library 'listingsutf8' as variant of 'listings' with new key + 'listing utf8' +- keys 'toprule at break', 'bottomrule at break', + 'enlarge top at break by', 'enlarge bottom at break by' + moved from core package to 'breakable' library. +- new keys for the 'breakable' library: + 'topsep at break', 'bottomsep at break', 'pad before break', + 'pad after break', 'pad at break' + +version 2.02 (2013/03/13) +- minor bug fix: segmentation line of 'enhanced' now matches 'standard' +- new macro '\tcbox' to draw a colorbox fitted to the content width +- new key 'autoparskip' to detect usage of package parskip automatically +- new key 'nobeforeafter' +- new macro '\tcbline' in the 'skins' library to draw 'just lines' +- new key 'colbacktitle' for the 'skins' library + +version 2.10 (2013/04/09) +- bug fix: \tcbox ignored font settings +- outdated documentation in German removed from package +- new core package keys: + 'oversize', 'tcbox raise', 'tcbox raise base', + 'before title', 'after title', 'before upper', 'after upper', 'before lower', + 'after lower', 'center title', 'center upper', 'center lower', + 'tabularx*', 'tabularx', 'tikz upper', 'tikz lower', + 'shrink tight', 'extrude left by', 'extrude right by', 'extrude top by', + 'extrude bottom by', 'extrude by' +- the 'theorems' library now loads 'amsmath' +- new macros for the 'theorems' library: + '\tcboxmath', '\tcbhighmath' +- new keys for the 'theorems' library: + 'math upper', 'math lower', 'math', 'highlight math', 'highlight math style', + 'ams equation upper', 'ams equation lower', 'ams equation', 'ams equation* upper', + 'ams equation* lower', 'ams equation*', 'ams align upper', 'ams align lower', + 'ams align', 'ams align* upper', 'ams align* lower', 'ams align*', + 'ams gather upper', 'ams gather lower', 'ams gather', 'ams gather* upper', + 'ams gather* lower', 'ams gather*', + 'ams nodisplayskip upper', 'ams nodisplayskip lower', 'ams nodisplayskip' +- new library 'hooks' for hook options with the new keys: + 'before upper app', 'before upper pre', 'after upper app', 'after upper pre', + 'before lower app', 'before lower pre', 'after lower app', 'after lower pre', + 'before title app', 'before title pre', 'after title app', 'after title pre', + 'before app', 'before pre', 'after app', 'after pre', + 'overlay unbroken app', 'overlay unbroken pre', 'overlay first app', 'overlay first pre', + 'overlay middle app', 'overlay middle pre', 'overlay last app', 'overlay last pre', + 'overlay app', 'overlay pre', 'overlay broken app', 'overlay broken pre', + 'overlay unbroken and first app', 'overlay unbroken and first pre', + 'overlay middle and last app', 'overlay middle and last pre', + 'watermark tikz app', 'watermark tikz pre', 'watermark tikz app on', 'watermark tikz pre on', + 'watermark graphics app', 'watermark graphics pre', 'watermark graphics app on', 'watermark graphics pre on', + 'watermark text app', 'watermark text pre', 'watermark text app on', 'watermark text pre on', + 'frame code app', 'frame code pre', 'interior titled code app', 'interior titled code pre', + 'interior code app', 'interior code pre', 'segmentation code app', 'segmentation code pre', + 'title code app', 'title code pre' +- colorization of source code snippets in the documentation + +version 2.20 (2013/04/17) +- bug fix: problem with breaking boxes after headings +- new feature: support for boxes with side by side content +- new keys: + 'sidebyside', 'sidebyside align', 'sidebyside gap', + 'lefthand width', 'righthand width', 'lefthand ratio', 'righthand ratio' +- key 'nofloat' documented +- new keys for the 'listings' library: + 'listing side text', 'text side listing' + 'listing outside text', 'text outside listing' +- new keys for the 'skins' library: + 'frame hidden', 'interior hidden', 'segmentation hidden', 'title hidden' +- new environments for the 'documentation' library: + 'dispExample*', 'dispListing*' +- the default style for 'highlight math' is changed to have no title +- minor change of internal width computation +- minor internal fixes +- slight overhaul of the documentation + +version 2.21 (2013/04/23) +- bug fix: \tcbox and 'sidebyside' needed 'breakable' library +- bug fix: library 'tcbhooks' relied on etoolbox package +- bug fix: breaking boxes between upper part and box frame +- new macro '\newtcolorbox' +- new macro '\newtcblisting' for the 'listings' library +- new key 'code' +- documentation corrections and extensions + +version 2.22 (2013/05/15) +- bug fix: text color bleeded out of the box in some cases +- bug fix: breakable boxes were too large in some cases (leading to blank pages) +- bug fix: breaking boxes produced empty boxes in some cases +- documentation forgot naming package 'colortbl' for the 'tabularx' option +- new feature: breakable boxes allow footnotes now (like minipages) +- new macro '\newtcbox' + +version 2.30 (2013/06/04) +- bug fix: handling of 'before' and 'after' for \tcbox corrected +- \tcbline now also works for centered environments +- implementation for \tcbox made more efficient +- new capture mode for automated content fit by font size adjustment + with the new macros '\tcboxfit' and '\newtcboxfit' + and the new keys 'fit', 'fit to', 'fit to height', 'fit basedim', 'fit skip', + 'fit maxstep' +- new keys 'baseline', 'capture', 'hbox', 'minipage' +- new stackable borderlines with the 'skins' library: + 'borderline', 'no borderline' +- new keys for the 'skins' library: + 'enhanced standard', 'blank' +- new key 'index format' for the 'documentation' library + +version 2.31 (2013/06/18) +- several internal changes +- library loading mechanism revisited +- internal label change for '\tcbmaketheorem' +- new library options 'most' and 'all' +- \tcbline now also works for ragged environments +- new keys: + 'flushleft title', 'flushleft upper', 'flushleft lower', + 'flushright title', 'flushright upper', 'flushright lower' +- new key 'no listing options' for the 'listings' library +- new shadow features for the 'skins' library with the options: + 'shadow', 'fuzzy shadow', 'drop shadow', 'drop fuzzy shadow', 'halo', 'fuzzy halo' +- shadows for the 'beamer' skin changed to fuzzy +- new library 'fitting' for the content fit operations. + NOTE: '\tcboxfit' and the fit options introduced in version 2.30 are moved + to this new library +- the fit algorithm is completey revisited and extended +- new macro '\tcbfontsize' ('fitting library') for relative font sizes +- new keys for the 'fitting' library: + 'fit fontsize macros', 'fit height plus', 'fit width plus', + 'fit width from', 'fit height from' + +version 2.32 (2013/06/23) +- bug fix: 'ams nodisplayskip lower' was applied to upper. +- new option 'check odd page' +- new environments for the 'skins' library: + 'tcbclipinterior', 'tcbclipframe', 'tcbcliptitle' +- new keys for the 'skins' library: + 'watermark overzoom', 'clip watermark' + 'clip title', 'clip upper', 'clip lower' +- NOTE: watermarks are now clipped by default. + To get the old behaviour add the option 'clip watermark=false' + +version 2.33 (2013/07/04) +- new options 'phantom', 'step and label', 'nophantom', + 'lower separated', 'reset', 'toggle left and right' +- 'highlight math' sets 'notitle,nophantom' automatically +- hyper anchor setting for theorems and LaTeX examples improved +- new key 'shield externalize' for externalization +- additional empty-first-box test for breakable boxes +- new key 'enlargepage' for fine-tuning breakable boxes +- parameter added to option 'oversize' +- option 'toggle enlargement' has a default value 'evenpage' now + +version 2.40 (2013/07/15) +- bug fix: wrong footnote text width for breakable boxes +- bug fix: watermarks were influenced by baseline settings +- package etoolbox is now loaded by default +- 'phantom' changed to be stackable (!) +- introducing the new initialization option type for easy + numbering and list generation. New options: + 'use counter', 'auto counter', 'use counter from', + 'no counter', 'number within', 'number format', 'number freestyle', + 'list inside', 'list type' +- '\newtcolorbox' and 'newtcbox' take initialization options now +- new macros '\tcblistof', '\tcbsetmanagedlayers' +- introducing the layered box concept for boxes in boxes improvement: + * boxes inside boxes are automatically reset to default values + * new option 'every box', 'every box on layer x', 'every box on higher layers' + * support for footnotes for boxes in boxes (default: up to layer 4) +- new options 'step', 'label', 'list entry', 'add to list' +- library 'listings': + * '\newtcblisting' takes initialization options now + * new macro '\newtcbinputlisting' +- library 'theorems': + * '\tcbmaketheorem' takes initialization options now + * new macro '\newtcbtheorem' +- library 'fitting': + * 'newtcboxfit' takes initialization options now +- library 'documentation': + * the \ref... macros suppress the page numbers now if on the same page + * new macros '\refCom*', '\refEnv*', '\refKey*' + * docCommand and docEnvironment take options now + +version 2.41 (2013/07/23) +- NOTE: The deprecated macro '\tcbmaketheorem' is redefined to its signature + of v2.33 and before to ensure backward compatibility. This may break code + written with v2.40 using '\tcbmaketheorem'. +- minor internal improvements +- support for the cleveref package with + * new initialization options 'crefname', 'Crefname' + * new options 'label type', 'no label type' +- library 'theorems': + * new options: 'separator sign', 'separator sign colon', 'separator sign dash' +- library 'listings': + * capture mode can be changed for 'tcblisting' and '\tcbinputlisting' + * new option: 'listing remove caption' + +version 2.50 (2013/07/29) +- first line indent corrected for 'parbox=false' +- minor internal improvements +- new option keys + 'height plus', 'height from' +- new library 'minted' with support for the minted package (Pygments support) + * new options 'minted language', 'minted options', 'minted style' +- new library option 'many' +- new common listings options: + 'listing engine' +- library 'documentation': + * new options 'documentation minted style', 'documentation minted options' + +version 2.51 (2013/09/16) +- bug fix: processing of 'initialization option keys' fixed + for \newtcbox, \newtcbinputlisting, and \newtcboxfit +- bug fix: disturbing horizontal space in \tcboxfix removed +- new macros '\renewtcolorbox', '\renewtcbox' +- library 'skins': + * implementation for the skin families 'enhanced', 'beamer', and 'bicolor' changed + * break sequence changed for skin 'freelance' + * new skins: 'freelancefirst', 'freelancemiddle', 'freelancelast' + * new options: 'extend freelance', 'extend freelancefirst', + 'extend freelancemiddle', 'extend freelancelast', + 'drop midday shadow', 'drop fuzzy midday shadow' + * new environment 'tcbinvclipframe' +- library 'listings': + * new macros '\renewtcblisting', '\renewtcbinputlisting' +- library 'theorems': + * new macro '\renewtcbtheorem' +- library 'fitting': + * new macro '\renewtcboxfit' +- library 'documentation': + * new option 'documentation listing options' + +version 2.60 (2013/12/17) +- new 'jigsaw' variants for the skins 'standard' and 'enhanced' for + advanced transparency and similar effects. +- new package core skin 'standard jigsaw' +- 'tabularx' and 'tabularx*' reset the arrayrulecolor to black after the table now. +- option 'colbacktitle' moved from library 'skins' to package core +- new options: + 'title filled', 'opacityupper', 'opacitylower', 'opacitytitle', 'opacityframe', + 'opacityback', 'opacitybacktitle', 'opacityfill', 'opacitytext','hyphenationfix', + 'standard jigsaw', 'enlarge by', 'grow to left by', 'grow to right by' +- library 'skins': + * new skin: 'enhanced jigsaw', 'enhancedfirst jigsaw', 'enhancedmidle jigsaw', + 'enhancedlast jigsaw' + * marker style now based on 'enhancedmiddle jigsaw' + * new options: + 'enhanced jigsaw', 'tikz', 'tikz reset', 'show bounding box', + 'at begin tikz', 'at begin tikz reset', 'at end tikz', 'at end tikz reset', + 'rotate', 'scale', 'remember', 'remember as', + 'drop shadow southeast', 'drop shadow south', 'drop shadow southwest', 'drop shadow west', + 'drop shadow northwest', 'drop shadow north', 'drop shadow northeast', 'drop shadow east', + 'drop fuzzy shadow southeast', 'drop fuzzy shadow south', 'drop fuzzy shadow southwest', + 'drop fuzzy shadow west', 'drop fuzzy shadow northwest', 'drop fuzzy shadow north', + 'drop fuzzy shadow northeast','drop fuzzy shadow east', +- library 'listings': + new options 'text above listing' and 'listing above text' +- library 'theorems': + \newtcbtheorem creates an additional starred theorem environment +- library 'fitting': + fit algorithm warning switched off by default. + new options: + 'fit warning' +- library 'documentation': more values for 'index format' +- documentation extended +- major internal implementation changes and optimizations + +version 2.61 (2014/01/10) +- bug fix: '@' was set as letter in some situations +- typing error corrections +- new macro \tcbsetforeverylayer +- library 'skins': + * new macros and environments: + '\tcbstartdraftmode', '\tcbstopdraftmode', '\tcbinterruptdraftmode', '\tcbcontinuedraftmode' + * new skin: 'spartan' + * new options: 'spartan', 'draftmode' +- library 'fitting': + * alternative fitting algorithms implemented (fontsize, areasize, hybrid, squeeze) + * new option: 'fit algorithm' + +version 2.70 (2014/02/06) +- bug fix: global setting of 'before' or 'after' may produce errors or + side effects for layered boxes. +- compatibility issue with TikZ 3.00 solved +- new options: + 'detach title', 'attach title', 'attach title to upper', + 'tikznode upper', 'tikznode lower', 'tikznode' +- library 'theorems': + * new options: + 'separator sign none', 'terminator sign', 'terminator sign colon', + 'terminator sign dash', 'terminator sign none', 'description delimiters', + 'description delimiters parenthesis', 'description delimiters none', + 'theorem name and number', 'theorem number and name', 'theorem name', + 'theorem style' +- library 'documentation': + * re-implementation of the documenting environments + (may alter existing documents slightly) + * new environments: + 'docCommand*', 'docEnvironment*', 'docKey*' + * new commands: + '\docAuxCommand*', '\docAuxEnvironment', '\docAuxEnvironment*', + '\docValue', '\docValue*', '\docAuxKey', '\docAuxKey*', + '\docColor*', '\refAux', '\refAuxcs' + * new options: + 'doc left', 'doc right', 'doc left indent', 'doc right indent', + 'doc head', 'doc head command', 'doc head environment', 'doc head key', + 'doc description', 'doc into index', 'value', 'values' + +version 2.71 (2014/02/21) +- bug fix: sidebyside setting with empty left hand side caused false positioning +- new options: + 'external', 'remake' +- library 'listings': + * new options: + 'comment side listing', 'listing side comment', 'comment above listing', + 'listing above comment', 'comment outside listing', 'listing outside comment', + 'image comment', +- library 'documentation': + * automatic inclusion of the 'skins' library + * inclusion of 'makeidx' made dependent on the existence of '\printindex' + * new options: + 'keys', 'index colorize', 'index annotate', + 'color command', 'color environment', 'color key', 'color value', 'color color' + +version 2.72 (2014/03/18) +- bug fix: mixing \newtcblisting with 'ams align' and similar options was not possible +- bug fix: footnotes lost for 'listing outside text' and similar options +- sidebyside and outside implementation slightly changed for beamer usage +- bicolor skin respects 'opacityback' for the upper part now +- new TikZ options: + 'fill image opacity', 'fill image options', + 'fill plain image', 'fill plain image*', 'fill stretch image', 'fill stretch image*', + 'fill overzoom image', 'fill overzoom image*', 'fill zoom image', 'fill zoom image*', + 'fill shrink image', 'fill shrink image*', 'fill tile image', 'fill tile image*' +- library 'skins': + * new options: + 'frame style image', 'frame style tile', 'interior style image', 'interior style tile', + 'title style image', 'title style tile' +- library 'listings': + * new options: + 'every listing line', 'every listing line*' + +version 2.80 (2014/03/31) +- implementation changed for all '\newtcolorbox', '\newtcbox', etc., macros. +- new option: + 'float*' +- new TikZ option: + 'fill image scale' +- library 'skins' new option: + 'watermark shrink' +- new library 'xparse' with new commands: + '\DeclareTColorBox', '\NewTColorBox', '\RenewTColorBox', '\ProvideTColorBox', + '\DeclareTotalTColorBox', '\NewTotalTColorBox', '\RenewTotalTColorBox', '\ProvideTotalTColorBox', + '\DeclareTCBox', '\NewTCBox', '\RenewTCBox', '\ProvideTCBox', + '\DeclareTotalTCBox', '\NewTotalTCBox', '\RenewTotalTCBox', '\ProvideTotalTCBox', + '\DeclareTCBListing', '\NewTCBListing', '\RenewTCBListing', '\ProvideTCBListing', + '\DeclareTCBInputListing', '\NewTCBInputListing', '\RenewTCBInputListing', '\ProvideTCBInputListing', + '\DeclareTCBoxFit', '\NewTCBoxFit', '\RenewTCBoxFit', '\ProvideTCBoxFit', + '\DeclareTotalTCBoxFit', '\NewTotalTCBoxFit', '\RenewTotalTCBoxFit', '\ProvideTotalTCBoxFit', + '\tcboxverb' + +version 3.00 (2014/05/08) +- bug fix: 'title code app', 'title code pre' changed wrong code +- documentation corrections +- implementation of graphical engines changed (!) +- note: optical backward compatibility issues with breakable 'freelance' boxes possible +- 'frame code' and similar options are moved from the 'skins' library to the core package +- 'enlarge top at break by' and 'enlarge bottom at break by' moved from 'breakable' library to the core package +- new macros: + '\tcbnewsubskin' +- new options: + 'skin first is subskin of', 'skin middle is subskin of', 'skin last is subskin of', + 'enlarge top initially by', 'enlarge finally last by', 'overlay unbroken and last' + 'size', 'on line', 'varwidth upper', + 'frame empty', 'interior empty', 'interior titled empty', 'segmentation empty', 'title empty' +- new TikZ options: + 'tcb fill frame', 'tcb fill interior', 'tcb fill title' + 'fill plain picture', 'fill stretch picture', 'fill overzoom picture', + 'fill zoom picture', 'fill shrink picture', 'fill tile picture', 'fill tile picture*' +- library 'skins' new options (concerning 'underlay', 'finish' and 'boxed title'): + 'underlay unbroken', 'underlay first', 'underlay middle', 'underlay last', + 'underlay', 'underlay broken', 'underlay unbroken and first', + 'underlay middle and last', 'underlay unbroken and last', + 'no underlay unbroken', 'no underlay first', + 'no underlay middle', 'no underlay last', 'no underlay', + 'finish unbroken', 'finish first', 'finish middle', 'finish last', + 'finish', 'finish broken', 'finish unbroken and first', + 'finish middle and last', 'finish unbroken and last', + 'no finish unbroken', 'no finish first', + 'no finish middle', 'no finish last', 'no finish', + 'empty', 'blanker', + 'boxed title style', 'varwidth boxed title', 'varwidth boxed title*', + 'minipage boxed title', 'minipage boxed title*', 'tikznode boxed title', + 'hbox boxed title', 'boxtitle/xshift', 'boxtitle/yshift', 'boxtitle/yshifttext', + 'boxtitle/yshift*', 'attach boxed title to top left', 'attach boxed title to top center', + 'attach boxed title to top right', 'attach boxed title to bottom left', + 'attach boxed title to bottom center', 'attach boxed title to bottom right', +- new engine and skin 'empty' +- implementation of 'show bounding box' changed to be a border line. +- library 'hooks' new options: + 'underlay unbroken pre', 'underlay first pre', 'underlay middle pre', + 'underlay last pre', 'underlay pre', 'underlay broken pre', + 'underlay unbroken and first pre', 'underlay middle and last pre', + 'underlay unbroken and last pre' + 'finish unbroken pre', 'finish first pre', 'finish middle pre', + 'finish last pre', 'finish pre', 'finish broken pre', + 'finish unbroken and first pre', 'finish middle and last pre', + 'finish unbroken and last pre' + 'overlay unbroken and last app', 'overlay unbroken and last pre' +- library 'theorems': + * new options: + 'description color', 'description font', 'description formatter' + +version 3.01 (2014/05/13) +- bug fix: 'parbox=false' plus 'breakable' had an unwanted indent +- compatibility fix for tabularx 2014/04/22 v2.09 + +version 3.02 (2014/05/13) +- compatibility fix for tabularx 2014/04/22 v2.09 (again) + +version 3.03 (2014/05/16) +- bug fix: some initialization option keys for \newtcblisting did not operate correctly +- bug fix: boxed title shape 'title' was unknown in underlays +- more boxed title example documented + +version 3.04 (2014/05/18) +- compatibility fix for tabularx removed; compatible with tabularx 2014/05/13 v2.10 +- boxed title improvements: + * the 'title' node is accessible now from inside 'frame code' and 'interior code' + * new keys 'underlay boxed title', 'no underlay boxed title', 'underlay boxed title pre' + * documentation example updated + +version 3.05 (2014/05/28) +- compatibility fix for the upcoming version 2.0 of the package minted +- inner boxes are enforced to be unbreakable now +- library 'breakable': + new key 'enforce breakable' (for breaking inner boxed deliberately) +- library 'skins': + * new options: + 'lifted shadow', 'drop small lifted shadow', 'drop lifted shadow', 'drop large lifted shadow' + +version 3.10 (2014/07/23) +- box breaking algorithm revised: + * breakable boxes now always have \noindent + * distance to preceeding text corrected + * interaction with floating objects fixed + * dimensioning of partial boxes improved + * splitting of an empty closing frame can now be avoided (depending on 'pad at break*') + * The upper total height limit for breakable boxes is extended from + about 16384pt to about 65536pt + * experimental code added (breakable=unlimited) for breakable boxes + without height limit besides memory + * splitting boxes inside multicols environments supported (to a certain degree) + * limited orphan control added ('enlargepage flexible') +- library 'breakable': + * new options: + 'break at', 'height fixed for', 'enlargepage flexible', + 'pad before break*', 'pad at break*' +- Corners can be set individually now to be 'rounded' or 'sharp' + for all types of boxes, skins, borders, and shadows: + * new options: 'sharpish corners', 'sharp corners', and 'rounded corners' +- library 'skins': + * new macros: '\tcbline*' + * bug fix: skin families 'bicolor' and 'beamer' did not respect 'colbacktitle' +- pictures 'blueshade.png', 'crinklepaper.png', 'goldshade.png', 'pink_marble.png' + moved to package folder + +version 3.11 (2014/07/25) +- regresssion: vertical space at end of breakable boxes was not removed +- example file updated with new features + +version 3.12 (2014/07/29) +- text color implementation changed to circumvent xelatex color problems +- multicol vs. twocolumn detection fixed +- code for breakable boxes without height limit improved +- before box \noindent is replaced by \parindent=0pt (bidi package compatibilty) +- library 'breakable': + * new option: 'vfill before first' + +version 3.20 (2014/09/22) +- bug fix: titles set with 'detach' or 'boxed title' options were not considered + for lists of tcolorboxes. +- bug fix: 'extrude left by', 'extrude right by' worked only for '\tcbox' but not for 'tcolorbox' +- bug fix: 'pad before break*' and 'pad at break*' were always setting to 0pt +- new options: 'every float', 'list text', 'overlay first and middle', + 'height fill' +- new initialization options: + 'use counter*', 'blend into' +- library 'skins': + * new macros: '\tcbsettowidthofnode', '\tcbsetmacrotowidthofnode', + '\tcbsettoheightofnode', '\tcbsetmacrotoheightofnode' + * new options: 'underlay first and middle', 'finish first and middle' +- library 'hooks': + * new options: 'underlay first and middle pre', + 'overlay first and middle app', 'overlay first and middle pre', + 'finish first and middle pre' +- library 'documentation': + * new macros: '\tcbdocmarginnote', '\tcbdocnew', '\tcbdocupdated' + * The 'docKey' and 'docKey*' environments take tcolorbox options now + * new options: + 'doclang/new', 'doclang/updated', + 'doc marginnote', 'doc updated', 'doc new', 'doc new and updated' + +version 3.21 (2014/10/10) +- bug fix: empty key path handling inside the 'docKey' and 'docKey*' environments was faulty +- bug fix: wrong coloring for '\docAuxCommand' and '\docAuxCommand*' +- bug fix: draft mode for inner boxes deactivated in v3.20 +- subtitles added +- new macros: + '\tcbsubtitle' +- new options: + 'subtitle style', 'before skip', 'after skip', 'beforeafter skip', +- library 'documentation': + implementation of handling macro and key names changed to accept underscores + several internal implementation changes + +version 3.22 (2014/10/31) +- new macro: '\tcolorboxenvironment' +- new options: + 'text width', 'text height' +- library 'skins': + * new options: 'borderline north', 'borderline south', + 'borderline east', 'borderline west', 'borderline horizontal', 'borderline vertical' +- library 'breakable': + * internal change for compatibility with the 'perpage' option of the 'footmisc' package +- library 'theorems': + * compatibility fix: The 'ams equation' options left too much vertical + space for the 'fleqn' case +- library 'fitting': + * new 'fit algorithm' settings: 'fontsize*', 'areasize*', 'hybrid*' + +version 3.30 (2014/11/17) +- bug fix: compilation errors using colors like 'red!10' in some skins like 'beamer' +- '\thetcbcounter' can now be used as part of a 'listing file' name for 'tcblisting' +- implementation of 'before skip' and 'after skip' improved +- implementation of 'equal height group' improved to take arbitrary id's +- Quick Reference added +- new options: + 'add to width', 'add to height', + 'box align', 'left skip', 'right skip', 'leftright skip' +- library 'skins': + * new macros: + '\tcbincludegraphics', '\tcbincludepdf' + * new options: + 'graphics options', 'graphics directory', 'graphics pages' +- library 'listings', 'listingsut8', 'minted': + * 'listing file' now usable inside 'tcblisting' and 'tcbinputlisting' + * new options: + 'comment only', 'text above* listing', 'listing above* text', + 'comment above* listing', 'listing above* comment', + 'comment style', 'tcbimage comment', 'pdf extension', 'pdf comment', + 'process code', 'no process', 'run system command', 'run pdflatex', + 'run xelatex', 'run lualatex', 'run makeindex', 'run bibtex', 'run biber', + 'run arara', 'run latex', 'run dvips', 'run ps2pdf', + 'compilable listing' +- new library 'raster': + * new macros and environments: + 'tcbraster', 'tcbitemize', 'tcbitem' + * new options: + 'raster columns', 'raster rows', 'raster width', 'raster height', 'raster before skip', + 'raster after skip', 'raster left skip', 'raster right skip', 'raster column skip', + 'raster row skip', 'raster halign', 'raster valign', 'raster equal height', + 'raster equal height group', 'raster force size' ,'raster reset', + 'raster odd column', 'raster even column', 'raster column n', 'raster odd row', + 'raster even row', 'raster row m','raster odd number', 'raster even number', + 'raster row m column n', 'raster number n' + +version 3.31 (2014/11/28) +- new macros: '\tcbstartrecording', '\tcbrecord', '\tcbstoprecording', '\tcbinputrecords' +- new options: 'squeezed title', 'squeezed title*', 'phantomlabel', + 'record', 'no recording' +- 'savelowerto' changed to need only one run instead of two +- library 'skins': + * '\imagename' macro can be used in more situations + * '\tcbincludegraphics' made aware of 'grffile' package +- new library 'raster': + * tcbraster safeguarded against restricted horizontal mode + * new option: 'raster every box' + +version 3.32 (2014/12/01) +- bug fix for 'crefname' and 'Crefname' options (cleveref support) + +version 3.33 (2014/12/11) +- The nobreak settings after a heading are respected now for breakable and + unbreakable boxes. Use the new option 'ignore nobreak' to restore the old + behavior. +- vertical skip of two successive tcbraster environments fixed + +version 3.34 (2014/12/16) +- 'height fill' now fills gapless and can be overruled by other height options +- 'before skip' and 'after skip' accept glue values now +- library 'breakable': + * new option 'compress page': + Use the new option 'compress page=none' to restore the old behavior. +- library 'raster': + * 'raster before skip' and 'raster after skip' accept glue values now + +version 3.35 (2015/01/07) +- fix: 'tcbdocumentation.code.tex' changed to US-ASCII +- text color implementation changed to fix some color problems +- new options: 'upperbox', 'visible', 'invisible' +- documentation complemented + +version 3.36 (2015/01/09) +- bug fix: dimension settings with 'em' or 'ex' units were sometimes converted to 0pt +- bug fix: 'boxed title' options and some algorithms of the 'fitting' library were not compatible +- bug fix: 'fit width from' ('fitting' library) may have updated counter too often +- new option: 'only' +- library 'fitting': fit process can now also includes the title +- library 'raster': new option 'raster equal skip' +- library 'documentation': + * new macros and environments: + '\docCounter', '\docCounter*', '\docLength', '\docLength*' + * new options: + 'index command', 'index command name' (for imakeidx), + 'color counter', 'color length', + 'doclang/counter', 'doclang/counters', 'doclang/length', 'doclang/lengths' + +version 3.40 (2015/01/14) +- bug fix: list environments had too much leading space if set as first elements in a box +- library 'skins': + * new option: 'titlerule style' +- library 'breakable': + algorithm for handling overfull boxes revised; new warnings implemented + +version 3.50 (2015/03/16) +- bug fix: \tcbline was broken for \tcboxfit-boxes since 3.36 +- text color implementation changed to fix some color problems +- before/after settings changed to detect special situations +- 'sidebyside align': new selections 'top seam', 'center seam', 'bottom seam' +- new options: + 'force nobeforeafter', 'blend before title', 'blend before title code' +- library 'documentation': + 'before example', 'after example' are deprecated; 'docexample' is changed +- new library 'external' + * new macros and environments: + 'tcbexternal', '\tcbEXTERNALIZE', 'extikzpicture', 'extcolorbox', + '\tcbifexternal', + '\newtcbexternalizeenvironment', 'renewtcbexternalizeenvironment', + 'newtcbexternalizetcolorbox', 'renewtcbexternalizetcolorbox' + * new options: + 'runner', 'externalize', 'force remake', '!', + 'name', 'externalize listing', 'externalize listing!', + 'externalize example', 'externalize example!', + 'prefix', 'environment', 'minipage', 'plain', 'compiler', 'runs', + 'input source on error', 'safety', 'preamble' +- documentation structure revised + +version 3.60 (2015/05/07) +- bug fix: dimension settings with 'em' or 'ex' units for 'enlarge .. by' converted to 0pt +- bug fix: 'bicolor' skin sometimes ignored color for lower part when broken +- new macros: '\tcbpatcharcangular', '\tcbpatcharcround' +- implementation of text alignment changed with new options: + 'halign', 'halign upper', 'halign lower', 'halign title', 'valign upper' +- new options: + 'saveto', 'circular arc', 'bean arc', 'arc is angular', 'arc is curved', + 'square', 'tcbox width' +- library 'skins': + * new option: 'smart shadow arc' +- library 'documentation': + package 'doc' removed from list of required packages +- library 'external': + * new options: + 'environment with percent', 'preamble tcbset', 'preclass', 'clear preclass', + 'PassOptionsToPackage', 'PassOptionsToClass' + +version 3.61 (2015/06/12) +- bug fix: nobreak settings after a heading were sometimes ignored depending + on the box content +- library 'external': + * now throws an error if the same external job name is used twice + * new option: '-' +- documentation bug fixes + +version 3.70 (2015/07/16) +- bug fix: 'attach title to upper' attached also empty titles +- bug fix: library 'raster': blank line after tcbitemize or tcbraster could give an error message +- new options: + 'text fill', 'valign scale bound', + 'valign=scale', 'valigns=scale*', 'valign lower=scale', 'valign lower=scale*' +- library 'breakable': + * Settings for broken box parts are now shielded by TeX grouping. This may + break code which used side-effects with unproper skins. + * new options: + 'extras unbroken', 'extras first', 'extras middle', 'extras last', + 'extras', 'extras broken', 'extras unbroken and first', + 'extras unbroken and last', 'extras middle and last', + 'extras first and middle', 'no extras unbroken', 'no extras first', + 'no extras middle', 'no extras last', 'no extras', +- library 'hooks': + * new options: + 'extras unbroken pre', 'extras first pre', 'extras middle pre', + 'extras last pre', 'extras pre', 'extras broken pre', + 'extras unbroken and first pre', 'extras unbroken and last pre', + 'extras middle and last pre', 'extras first and middle pre', +- new library 'magazine' + * new macros and environments: + '\newboxarray', '\boxarraygetsize', '\boxarrayreset', '\boxarrayclear', + '\boxarraygetbox', '\boxarraygetwidth', '\boxarraygetheight', '\boxarraygetdepth', + '\boxarraygettotalheight', '\useboxarray', '\usetcboxarray', + '\consumeboxarray', '\consumetcboxarray', 'boxarraystore', + * new options: + 'store to box array', 'reset box array', 'do not store to box array', + 'reset and store to box array' + +version 3.71 (2015/07/23) +- bug fix: An error introduced in 3.70 broke all code without 'breakable' library +- bug fix: library 'external': spurious blank in source input removed +- documentation extended + +version 3.72 (2015/08/12) +- bug fix: bounding box changes and boxed title additions were not considered + correctly by 'height fixed for' or 'height fill' (resulting in wrong page breaks) +- library loading made compatible with expl3 +- cosmetic documentation changes + +version 3.73 (2015/10/16) +- bug fix: '\tcbdocmarginnote' had a spurious blank. +- parbox=false settings adapted for embedded lists +- library 'documentation': + * new options: + 'before doc body command', 'after doc body command', + 'before doc body environment', 'after doc body environment', + 'before doc body key', 'after doc body key', + 'before doc body', 'after doc body' + +version 3.80 (2015/11/27) +- superfluous and sometimes troublesome \unskip's were removed. + Note that this changed the behavior of 'after upper' and 'after lower'. + Some user code may need to apply the new 'after upper*' / 'after lower*' + options or insert an \unskip. +- even/odd page testing completely rewritten. +- some difference formulas were revised. +- new macros: + '\thetcolorboxnumber', '\thetcolorboxpage', + '\tcbifoddpage', '\tcbheightfromgroup' +- new options: + 'after upper*', 'after lower*', + 'center', 'flush right', 'flush left', + 'if odd page', 'if odd page*', + 'use height from group' +- library 'xparse': + * new macro: '\tcbsidebyside' + * new options: 'sidebyside adapt', 'sidebyside switch' + +version 3.90 (2016/02/29) +- bug fix: 'height fill' after headings (nobreak) produced an error +- implementation for 'before' and 'before skip' changed to avoid spacing + problems when there is a page break before breakable/unbreakable boxes +- the 'height fill' option can be applied also for boxed inside a tcbraster +- new options: + 'add to natural height', 'space to', 'use height from group' (new default) +- new macros: + '\tcbheightspace', '\tcbtextwidth', '\tcbtextheight' +- library 'skins': + * 'halign title' works with 'boxed title' now + * 'boxed title style' changed to be stackable + * better support for titles at the bottom of the box + * new skin: 'tile' + * new options: + 'blankest', 'tile', 'no boxed title style', 'boxed title size', + 'attach boxed title to bottom', 'attach boxed title to bottom*', + 'attach boxed title to top', 'attach boxed title to top*', + 'flip title' +- library 'raster': + * new environment: + 'tcboxedraster' + * new options: + 'raster multicolumn', 'raster multirow' +- library 'documentation': + removal of some unwanted blanks + +version 3.91 (2016/04/27) +- bug fix: '\tcbline' was indented when setting '\parindent' inside a box +- bug fix: 'minimum for equal height group' changed current equal height group + and settings with 'em' or 'ex' units were converted to 0pt +- bug fix: setting '-output-directory' and 'outputdir=' for the minted package + broke \tcblisting for 'listing engine=minted' +- documentation: biber problem with latin1 encoding circumvented +- new options: + 'minimum for current equal height group' +- library 'theorems': + * new option: 'label separator' +- new library 'vignette' for ornamental frames: + * new fadings: 'semi west', 'semi east', 'semi north', 'semi south' + * new macros: '\tcbvignette' + * new options: + 'xmin', 'xmax', 'ymin', 'ymax', + 'lower left corner', 'upper right corner', 'inside node', 'outside node', + 'over node', 'over node offset', 'north size', 'south size', 'east size', + 'west size', 'size', 'north style', 'south style', 'east style', 'west style', + 'draw method', 'fade out', 'semi fade out', 'fade in', 'semi fade in', + 'base color', 'raised color', 'lowered color', + 'underlay vignette', 'underlay raised fading vignette', + 'underlay raised shading vignette', 'underlay shade in vignette', + 'finish vignette', 'finish raised fading vignette', 'finish fading vignette' +- library 'raster': + * new environment: 'tcboxeditemize' + +version 3.92 (2016/05/28) +- bug fix: 'compilable listing' used no '.tex' extension causing problems with minted +- compatibility patch for \vsplit in luatex 0.95 causing problems with breakable boxes +- settings inside \tcbvignette are now inside a group +- library 'vignette': new option 'scope' + +version 3.93 (2016/06/01) +- bug fix: compatibility patch for \vsplit in luatex 0.95 was buggy +- system commands are now accessed using the 'shellesc' package for + compatibility with luatex + +version 3.94 (2016/07/14) +- bug fix: '\tcbincludegraphics' for fixed height boxes was broken since v3.90 (2016/02/29) +- new option 'nameref' +- library 'theorems': + Theorems made nameref-aware +- library 'listings': + * new options: + 'freeze file', 'freeze none', 'freeze extension', + 'freeze pdf', 'freeze png', 'freeze jpg' +- library 'external': + * implementation improved for lualatex and xelatex + * new macro '\tcbiffileprocess' + +version 3.95 (2016/10/21) +- The behaviors of 'after upper' and 'after lower' are reverted back to + prior version 3.80 to have an automatic \unskip inserted. + Therefore, 'after upper*' and 'after lower*' are deprecated now. +- new option 'void' +- library 'skins': + '\tcbincludegraphics' made compatible with 'height fill' boxes. +- library 'minted': + now, included source files are searched for in relation to an optional + 'output-directory' and also locally. +- library 'documentation': + Language settings are not longer reset to English for embedded boxes. + +version 3.96 (2016/11/18) +- bug fix: unprotected definition of the 'nameref' option induced serious errors +- bug fix: nameref package was not detected if loaded after tcolorbox +- new macros: + '\tcbifoddpageoroneside' +- new options: + 'if odd page or oneside', 'if odd page or oneside*', +- library 'documentation': + * Documentation options are not longer reset to default values for embedded + boxes. User code may be affected by this change. + * marginnotes adapt to twosided documents now + +version 4.00 (2017/02/16) +- Code adaptions to support \parfillskip changing packages like KOMA-Script: + 'parskip', 'noparskip', 'after skip', 'breakable', 'raster' +- 'toggle left and right' toggles corners now +- new options: + 'left*', 'right*', + 'spread inwards', 'spread outwards', 'move upwards', 'move upwards*', 'fill downwards', + 'spread sidewards', 'spread upwards', 'spread upwards*', 'spread downwards', 'spread', + 'hypertarget', 'bookmark', 'bookmark*' +- library 'skins': + * new macro '\tcbhypernode' + * new options: + 'hyperref', 'hyperref node', 'hyperref interior', 'hyperref title', + 'hyperlink', 'hyperlink node', 'hyperlink interior', 'hyperlink title', + 'hyperurl', 'hyperurl node', 'hyperurl interior', 'hyperurl title', + 'hyperurl*', 'hyperurl* node', 'hyperurl* interior', 'hyperurl* title' + +version 4.01 (2017/02/19) +- bug fix: 'raster halign=center' was broken by 4.00 code changes + +version 4.02 (2017/02/24) +- Further code adaptions to support \parfillskip changing packages like KOMA-Script + and to respect center environments + 'parskip', 'noparskip', 'after skip', 'breakable', 'raster' +- new option: 'parfillskip restore' +- bug fix: 'segmentation style' was not applied correctly to breakable boxes with + 'bicolor' skin +- bug fix: '/tcb/external/!' and '/tcb/external/-' were not usable inside \tcbset +- documentation optimizations + +version 4.03 (2017/04/25) +- Implementation of 'raster equal height' changed to be more robust e.g. for loops +- Implementation of several fill options like 'fill stretch image' changed + to be more efficient and to be independent from TikZ node positioning options. +- Bug fix: 'fill plain image' and 'fill plain picture' ignored 'fill image opacity'. +- new macro: '\tcbsegmentstate' +- library 'breakable': + * new option: 'segmentation at break' +- library 'documentation': + * new options: 'documentation minted language', 'keywords bold' +- Creation of leaflets documented + +version 4.10 (2017/07/05) +- new options: + 'inherit height', 'verbatim ignore percent' +- library 'skins' + * new style 'enhanced standard jigsaw' +- library 'magazine': + * new macro: '\ifboxarrayempty' +- library 'breakable': + * option 'break at' allows negative values now. + * the algorithm for breaks inside a multicolumn environment was improved + (user code may be affected by this change). + * new macro: '\tcbbreak' +- library 'minted': + * the default settings for 'minted options' + are supplemented by 'breaklines,autogobble' +- new library 'poster' + * new macros and environments: + 'tcbposter', '\tcbposterset', '\posterbox', 'posterboxenv', + 'tcbposterwidth', 'tcbposterheight', 'tcbpostercolspacing', 'tcbposterrowspacing', + 'tcbpostercolumns', 'tcbposterrows', 'tcbpostercolwidth', 'tcbposterrowheight' + * new options: + 'poster', 'columns', 'rows', 'colspacing', 'rowspacing', 'spacing', + 'showframe', 'width', 'height', 'prefix', 'coverage', 'no coverage', + 'boxes', 'fontsize', 'name', 'column', 'column*', 'span', 'row', 'rowspan', + 'fixed height', 'below', 'above', 'at', 'between', 'sequence', + 'placeholder', 'xshift', 'yshift' +- New example file 'tcolorbox-example-poster' +- New tutorial 'tcolorbox-tutorial-poster' for poster creation + +version 4.11 (2017/09/14) +- Standard internal minipage settings changed from 'c' to 'b' which should + fix some glitches + +version 4.12 (2018/01/12) +- color implementation changed to fix problems with expl3 (thanks to Ulrike Fischer) +- Documentation typo corrected ('tcbsetmanagedlayers' instead of 'tcbsetmanagedlayer') +- Bug fix: 'borderline south' and 'borderline north' created 'Missing character' + messages for breakable boxes +- library 'theorems': + * new options 'theorem label supplement', 'theorem full label supplement' + +version 4.13 (2018/03/22) +- typos in 'tcolorbox-tutorial-poster' corrected +- new options: + 'grow sidewards by' +- library 'breakable': + * Warning for discarded zero height box content added +- library 'listings': + * Documentation for 'text side listing', 'listing side text', + 'comment side listing', 'listing side comment' supplemented with notes. +- library 'skins': + * Options given by '/tcb/graphics options' and '/tikz/fill image options' + are now fully expanded while applied to underlying '\includegraphics' + * new option: + 'graphics orientation' + +version 4.14 (2018/07/26) +- bug fix (#40): 'tikzlower' and 'tikzupper' failed to take more than one parameter +- '\tcblistof' issues a warning if tocdepth is lower than 1 (#42) +- macro definition of \tcolorbox@label removed from aux file (#47) +- documentation adapted to the changed argument collection of the xparse package (#43) +- new options: 'index', 'index*' +- library 'breakable': + * (#41) 'title after break' inherits the title alignment now + (may change output of existing documents!) + * new options 'extras title after break', 'no extras title after break' diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/README b/tex/.texmf/tex/latex/misc/tcolorbox/README new file mode 100644 index 0000000..cae9bed --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/README @@ -0,0 +1,95 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% + +tcolorbox provides an environment for colored and framed text boxes with a +heading line. Optionally, such a box can be split in an upper and a lower +part. The package tcolorbox can be used for the setting of LaTeX examples where +one part of the box displays the source code and the other part shows the +output. Another common use case is the setting of theorems. The package supports +saving and reuse of source code and text parts. + +Contents of the package +======================= + 'README' this file + 'CHANGES' log of changes (history) + 'tcolorbox.sty' LaTeX package file (style file) + 'tcbbreakable.code.tex' LaTeX package file (library of tcolorbox) + 'tcbdocumenation.code.tex' LaTeX package file (library of tcolorbox) + 'tcbexternal.code.tex' LaTeX package file (library of tcolorbox) + 'tcbfitting.code.tex' LaTeX package file (library of tcolorbox) + 'tcbhooks.code.tex' LaTeX package file (library of tcolorbox) + 'tcblistings.code.tex' LaTeX package file (library of tcolorbox) + 'tcblistingscore.code.tex' LaTeX package file (library of tcolorbox) + 'tcblistingsutf8.code.tex' LaTeX package file (library of tcolorbox) + 'tcbmagazine.code.tex' LaTeX package file (library of tcolorbox) + 'tcbminted.code.tex' LaTeX package file (library of tcolorbox) + 'tcbposter.code.tex' LaTeX package file (library of tcolorbox) + 'tcbprocessing.code.tex' LaTeX package file (library of tcolorbox) + 'tcbraster.code.tex' LaTeX package file (library of tcolorbox) + 'tcbskins.code.tex' LaTeX package file (library of tcolorbox) + 'tcbskinsjigsaw.code.tex' LaTeX package file (library of tcolorbox) + 'tcbtheorems.code.tex' LaTeX package file (library of tcolorbox) + 'tcbvignette.code.tex' LaTeX package file (library of tcolorbox) + 'tcbxparse.code.tex' LaTeX package file (library of tcolorbox) + 'blueshade.png' Picture (package) + 'crinklepaper.png' Picture (package) + 'goldshade.png' Picture (package) + 'pink_marble.png' Picture (package) + 'tcolorbox.pdf' Documentation for tcolorbox + 'tcolorbox.tex' Source code of the documentation (main file) + '*.doc.*' Source code of the documentation (include files) + 'tcolorbox-tutorial-poster.pdf' Tutorial for poster creation + 'tcolorbox-tutorial-poster.tex' Source code of the tutorial + 'tcolorbox-example.tex' Example file for package usage + 'tcolorbox-example.pdf' Compiled example + 'tcolorbox-example-poster.tex' Example file for package usage + 'tcolorbox-example-poster.pdf' Compiled example + 'Basilica_5.png' Example picture + 'lichtspiel.jpg' Example picture + +Installation +============ +Copy the contents of the 'tcolorbox.tds.zip' from CTAN to your local TeX file tree. + +Alternatively, put the files to their respective locations within the TeX installation: + 'tcolorbox.sty' -> /tex/latex/tcolorbox + 'tcbbreakable.code.tex' -> /tex/latex/tcolorbox + 'tcbdocumenation.code.tex' -> /tex/latex/tcolorbox + 'tcbexternal.code.tex' -> /tex/latex/tcolorbox + 'tcbfitting.code.tex' -> /tex/latex/tcolorbox + 'tcbhooks.code.tex' -> /tex/latex/tcolorbox + 'tcblistings.code.tex' -> /tex/latex/tcolorbox + 'tcblistingscore.code.tex' -> /tex/latex/tcolorbox + 'tcblistingsutf8.code.tex' -> /tex/latex/tcolorbox + 'tcbmagazine.code.tex' -> /tex/latex/tcolorbox + 'tcbminted.code.tex' -> /tex/latex/tcolorbox + 'tcbposter.code.tex' -> /tex/latex/tcolorbox + 'tcbprocessing.code.tex' -> /tex/latex/tcolorbox + 'tcbraster.code.tex' -> /tex/latex/tcolorbox + 'tcbskins.code.tex' -> /tex/latex/tcolorbox + 'tcbskinsjigsaw.code.tex' -> /tex/latex/tcolorbox + 'tcbtheorems.code.tex' -> /tex/latex/tcolorbox + 'tcbvignette.code.tex' -> /tex/latex/tcolorbox + 'tcbxparse.code.tex' -> /tex/latex/tcolorbox + 'blueshade.png' -> /tex/latex/tcolorbox + 'crinklepaper.png' -> /tex/latex/tcolorbox + 'goldshade.png' -> /tex/latex/tcolorbox + 'pink_marble.png' -> /tex/latex/tcolorbox + + all other files -> /doc/latex/tcolorbox diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/blueshade.png b/tex/.texmf/tex/latex/misc/tcolorbox/blueshade.png Binary files differnew file mode 100644 index 0000000..4b1713e --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/blueshade.png diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/crinklepaper.png b/tex/.texmf/tex/latex/misc/tcolorbox/crinklepaper.png Binary files differnew file mode 100644 index 0000000..c030edf --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/crinklepaper.png diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/goldshade.png b/tex/.texmf/tex/latex/misc/tcolorbox/goldshade.png Binary files differnew file mode 100644 index 0000000..7e08264 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/goldshade.png diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/lichtspiel.jpg b/tex/.texmf/tex/latex/misc/tcolorbox/lichtspiel.jpg Binary files differnew file mode 100644 index 0000000..76fb962 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/lichtspiel.jpg diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/pink_marble.png b/tex/.texmf/tex/latex/misc/tcolorbox/pink_marble.png Binary files differnew file mode 100644 index 0000000..d3279df --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/pink_marble.png diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbbreakable.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbbreakable.code.tex new file mode 100644 index 0000000..96ee406 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbbreakable.code.tex @@ -0,0 +1,1028 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbbreakable.code.tex: Code for breakable colorboxes +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\let\tcb@parboxrestore@true=\tcb@parboxrestore +\let\tcb@parboxrestore@false\tcb@parbox@false@settings + +% total height for boxes smaller than 0.4375\maxdimen and 0.4375\maxdimen else (ca 2.5m) +\def\tcb@defToTotalHeightBreakable#1#2{% + \ifnum\ht#2<0 % + \edef#1{7168pt}% + \else\ifnum\ht#2<469762048 % + \tcbdimto#1{\ht#2+\dp#2}% + \else% + \edef#1{7168pt}% + \fi\fi% +} + +\newbox\tcb@testbox + +% for oversized boxes height is detected as \textheight or larger +\def\tcb@defToTotalHeightUnlimited#1#2{% + \tcb@defToTotalHeightBreakable#1#2% + \ifdim\dimexpr#1<\textheight\relax% + \edef\tcb@thevfuzz{\the\vfuzz}% + \edef\tcb@thevbadness{\the\vbadness}% + \vfuzz=\maxdimen\vbadness=10000% + \splittopskip=0pt% + \splitmaxdepth=0pt% + \savingvdiscards=1% + \setbox\tcb@testbox=\vsplit#2 to \textheight% + \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz% + \ifdim\wd#2=0pt\relax% + \tcb@swap{#2}{\tcb@testbox}% + \tcbdimto#1{\ht#2+\dp#2}% + \else% + \setbox#2=\vbox{% + \unvbox\tcb@testbox% + \splitdiscards% + \unvbox#2}% + \edef#1{7168pt}% + \fi% + \savingvdiscards=0% + \fi% +} + +\def\tcb@@break{\par\xleaders\vbox{\rule{0pt}{2\textheight}}\vskip 2\textheight\par} + +\def\tcb@vbox#1#2{% + \edef\reserved@a{% + \endgroup% + \setbox#1\vbox{\hsize=#2% + \begingroup\aftergroup}% + \def\noexpand\@currenvir{\@currenvir}% + \def\noexpand\@currenvline{\on@line}}% + \reserved@a% + \@endpefalse% + \let\tcbbreak\tcb@@break% + \color@begingroup% + \textwidth\hsize% + \columnwidth\hsize% + \csname tcb@parboxrestore@\kvtcb@parbox\endcsname% + \def\@mpfn{mpfootnote}% + \def\thempfn{\thempfootnote}% + \c@mpfootnote\z@% + \let\@footnotetext\@mpfootnotetext% + \let\@listdepth\@mplistdepth \@mplistdepth\z@% + \@setminipage\tcb@hyph@fix% + \let\tcb@drawcolorbox\tcb@drawcolorbox@standalone% + \let\FN@pp@footnote\@empty% disable perpage mode of 'footmisc' package + \ignorespaces% +} + +\def\endtcb@vbox{% + \par% + \unskip% + \ifvoid\@mpfootins\else% + \vskip\skip\@mpfootins% + \normalcolor% + \footnoterule% + \unvbox\@mpfootins% + \fi% + \@minipagefalse% + \color@endgroup} + +% remaining height +\def\tcb@comp@h@page{% + \tcb@breakat@next% + \ifdim\tcb@breakat@dim>0pt\relax% + \tcbdimto\tcb@h@page{\tcb@breakat@dim-\kvtcb@shrinkbreakgoal}% + \else% + \ifx\kvtcb@float\@empty% + \iftcb@multicol% + \ifnum\c@tcbbreakpart>1\relax% + \tcbdimto\tcb@h@page{\@colroom}% + \else% + \ifdim\pagegoal=16383.99998pt + \tcbdimto\tcb@h@page{\@colroom}% + \else% + \@tempdima\pagetotal% + \@whiledim \@tempdima>\@colroom \do{\advance\@tempdima-\@colroom}% + \tcbdimto\tcb@h@page{\@colroom-\@tempdima}% + \fi% + \fi% + \else% + \ifdim\pagegoal=16383.99998pt + \tcbdimto\tcb@h@page{\vsize}% detects floating objects + \else% + \tcb@comp@compress% + \tcbdimto\tcb@h@page{\pagegoal-\pagetotal+\tcb@compress@height}% + \fi% + \fi% + \else% + \tcbdimto\tcb@h@page{\textheight}% + \fi% + \tcbdimto\tcb@h@page{\tcb@h@page+\tcb@breakat@dim-\kvtcb@shrinkbreakgoal}% + \fi% +} + +\def\tcb@comp@h@total@standalone{% + \tcbdimto\tcb@h@padding{\kvtcb@bbtop@stand+\kvtcb@bbbottom@stand+\kvtcb@top@rule@stand+\kvtcb@bottom@rule@stand+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}% + \tcbdimto\tcb@h@total{\tcb@h@padding+\tcb@h@padtitle+\tcb@h@upper+\tcb@h@segment+\tcb@h@lower}% +} + + +\newif\iftcb@final@box + +\def\tcb@check@for@final@box{% + \ifdim\tcb@h@total>\tcb@h@page\relax% + \iftcb@multicol% + \tcb@final@boxfalse% + \else% + \ifdim\tcb@h@total>\dimexpr\tcb@h@page+\kvtcb@enlargepage@flex\relax% + \tcb@final@boxfalse% + \else% + \tcbdimto\tcb@temp{\tcb@h@total-\tcb@h@page}% + \enlargethispage*{\tcb@temp}% + \tcbdimto\tcb@h@page{\tcb@h@page+\tcb@temp}% + \tcb@final@boxtrue% + \fi% + \fi% + \else% + \tcb@final@boxtrue% + \fi% +} + +\def\tcb@following@title{% + \ifx\kvtcb@followingtitle\@empty% + \tcb@hasTitlefalse% + \let\tcb@h@title=\tcb@zpt% + \let\tcb@h@padtitle=\tcb@zpt% + \else% + \tcb@hasTitletrue% + \tcbdimto\tcb@w@title{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@lefttitle-\kvtcb@righttitle}% + \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\tcb@extras@followingtitle\color{tcbcol@title}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@followingtitle\end{tcb@savebox}% + \tcbdimto\tcb@h@title{\ht\tcb@titlebox+\dp\tcb@titlebox}% + \tcbdimto\tcb@h@padtitle{\kvtcb@title@rule+\kvtcb@boxsep*2+\kvtcb@toptitle+\kvtcb@bottomtitle+\tcb@h@title}% + \fi% +} + +\newbox\tcb@totalupperbox +\newbox\tcb@totallowerbox +\newif\iftcb@break@allowed + +\def\tcb@enlbreak@next@final{% + \ifdim\dimexpr\tcb@enlbreak@dim=0pt\relax + \else% + \iftcb@multicol\else\enlargethispage{\tcb@enlbreak@dim}\fi% + \fi% +} + +\def\tcb@enlbreak@next@scan#1/#2@{% + \def\temp@a{#2}% + \tcbdimto\tcb@enlbreak@dim{#1}% + \ifx\temp@a\@empty% + \let\tcb@enlbreak@next=\tcb@enlbreak@next@final% + \else% + \edef\tcb@enlbreak@seq{\temp@a @}% + \fi% + \tcb@enlbreak@next@final% +} + +\def\tcb@enlbreak@next@step{% + \edef\tcb@temp{\noexpand\tcb@enlbreak@next@scan\tcb@enlbreak@seq}% + \tcb@temp% +} + +\def\tcb@enlbreak@init{% + \edef\tcb@enlbreak@seq{\kvtcb@enlargepage/@}% + \let\tcb@enlbreak@next=\tcb@enlbreak@next@step% + \tcb@enlbreak@next% +} + + +\def\tcb@breakat@next@scan#1/#2@{% + \def\temp@a{#2}% + \tcbdimto\tcb@breakat@dim{#1}% + \ifx\temp@a\@empty% + \let\tcb@breakat@next=\@empty% + \else% + \edef\tcb@breakat@seq{\temp@a @}% + \fi% +} + +\def\tcb@breakat@next@step{% + \edef\tcb@temp{\noexpand\tcb@breakat@next@scan\tcb@breakat@seq}% + \tcb@temp% +} + +\def\tcb@breakat@init{% + \edef\tcb@breakat@seq{\kvtcb@breakatdim/@}% + \let\tcb@breakat@next=\tcb@breakat@next@step% +} + + +\newif\iftcb@multicol +\newif\iftcb@vfillbeforefirst + +\def\tcb@do@nobreak@warning{% + \iftcb@ignorenobreak% + \tcb@warning{Using nobreak failed. You should set `ignore nobreak=false' to avoid this}% + \else% + \tcb@warning{Using nobreak failed. Try to enlarge `lines before break' or set page breaks manually}% + \fi% +} + +\def\tcb@handle@nobreak{% + \tcb@enlbreak@init% + \tcb@breakat@init% + \tcb@comp@h@page% + \tcbdimto\tcb@h@page{\tcb@h@page-1.5\baselineskip-\parskip-\lineskip}% security surcharge + \tcb@comp@h@total@standalone% + \tcb@check@for@final@box% + \iftcb@final@box% + \else% + \ifdim\dimexpr\tcb@h@page-\tcb@h@padding-\tcb@h@padtitle<\kvtcb@breakminlines\baselineskip\relax% + \tcbdimto\tcb@h@page{\tcb@h@page+3.5\baselineskip+\parskip+\lineskip}% + \vspace{\tcb@h@page}% + {\parskip\z@\nointerlineskip\noindent}% + \vspace{-\tcb@h@page}% + \par% + \fi% + \fi% +} + +\def\tcb@prepare@break@operation{% + \setcounter{tcbbreakpart}{0}% + \let\tcb@nobreak@warning\@empty% + \@ifundefined{columnbreak}{\tcb@multicolfalse}{% + \ifnum\doublecol@number>\z@ % + \tcb@multicoltrue% + \else% + \tcb@multicolfalse% + \fi}% + \ifx\kvtcb@float\@empty% + \iftcb@nobreak{% + \let\tcb@nobreak@warning\tcb@do@nobreak@warning% + \iftcb@ignorenobreak% + \kvtcb@beforebox% + \else% + \tcb@handle@nobreak% + \fi% + }{\kvtcb@beforebox}% + \def\kvtcb@beforebox{\parskip\z@\nointerlineskip\noindent}% + \noindent% applies parskip + \vskip\lineskip{\parskip\z@\par\vskip\z@}\bgroup\@nobreakfalse\addpenalty\z@\egroup% force update vertical list + \tcb@break@allowedtrue% + \tcb@enlbreak@init% + \else% + \tcb@break@allowedfalse% + \fi% +} + +\def\tcb@height@fill@unbroken#1{% + \ifnum\c@tcblayer<2\relax% + \tcb@ignorenobreaktrue% + \tcb@prepare@break@operation% + \tcb@breakat@init% + \tcbset{compress page=#1}% + \tcb@comp@h@page% + \tcbset{height=\tcb@h@page-\kvtcb@bbtop@stand-\kvtcb@bbbottom@stand}% + \fi% +} + +\def\tcb@height@fill@unbroken@normal{\tcb@height@fill@unbroken{none}} +\def\tcb@height@fill@unbroken@compressed{\tcb@height@fill@unbroken{all}} + +\def\tcb@use@after@lastbox{\bgroup\tcb@after@lastbox\egroup} + +\def\tcb@drawcolorbox@breakable{% + \tcb@prepare@break@operation% + \global\let\tcb@after@lastbox=\kvtcb@afterbox% + \let\kvtcb@afterbox=\@empty% + \begingroup% + \parskip\z@skip% + \parindent\z@% + \lineskip\z@skip% + \topskip\z@skip% + \tcb@parfillskip@check% + \tcb@split@start% + \endgroup% + \color{.}% hack for some special cases + \ifx\kvtcb@float\@empty% + \aftergroup\tcb@use@after@lastbox% + \fi% +} + +\def\tcb@split@pagebreak{% + \tcb@undo@before% + \iftcb@multicol\columnbreak\else\pagebreak\fi% + \tcb@nobreak@warning% + \tcb@enlbreak@init\tcb@break@allowedfalse% +} + +\def\tcb@split@start{% + \tcb@breakat@init% + \tcb@comp@h@page% + % height calculation + \tcb@comp@h@total@standalone% + % + \let\tcb@split@next=\relax% + \tcb@check@for@final@box% + \iftcb@final@box% + \tcb@drawcolorbox@standalone% + \else% + \iftcb@break@allowed% + \ifdim\dimexpr\tcb@h@page-\tcb@h@padding-\tcb@h@padtitle<\kvtcb@breakminlines\baselineskip\relax% + \tcb@split@pagebreak% + \tcb@comp@h@page% + \tcb@check@for@final@box% + \iftcb@final@box% + \tcb@drawcolorbox@standalone% + \else% + \let\tcb@split@next=\tcb@split@first% + \fi% + \else% + \let\tcb@split@next=\tcb@split@first% + \fi% + \else% + \let\tcb@split@next=\tcb@split@first% + \fi% + \fi% + \tcb@split@next% +} + + +\def\tcb@setbox#1#2#3{% + \setbox#1=\vbox{\unvbox#3}% + \ifdim\dimexpr\ht#1+\dp#1>#2\relax% + %\tcb@warning{Splitted box part too large by \the\dimexpr\ht#1+\dp#1-#2\relax}% switched off (99% useless/annoying) + \setbox#1=\vbox to\the\dimexpr#2-\dp#1\relax{\unvbox#1}% + \fi% +} + + +\def\tcb@setbox@upper#1#2{% + \tcb@setbox\tcb@upperbox{#1}{#2}% + \tcbdimto\tcb@h@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}% +} + +\def\tcb@vsplit@upper{% + \setbox\tcb@upperbox=\vsplit\tcb@totalupperbox to\tcb@split@dim% + \edef\tcb@upper@box@badness{\the\badness}% +} + +\def\tcb@split@upper@box@and@assemble{% + \vfuzz=\maxdimen\vbadness=10000\savingvdiscards=1% + \tcb@vsplit@upper% + \ifnum\tcb@upper@box@badness=1000000\relax% + \setbox\tcb@totalupperbox=\vbox{% + \unvbox\tcb@upperbox% + \splitdiscards% + \unvbox\tcb@totalupperbox}% + \else% + \tcb@setbox@upper{\tcb@split@dim}{\tcb@upperbox}% + \fi% + \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz\savingvdiscards=0% +} + +\def\tcb@split@upper@box{% + \vfuzz=\maxdimen\vbadness=10000% + \tcb@vsplit@upper% + \ifnum\tcb@upper@box@badness=1000000\relax% + \tcb@warning{The upper box part has become overfull}% + \fi% + \tcb@setbox@upper{\tcb@split@dim}{\tcb@upperbox}% + \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz% +} + +\def\tcb@setbox@lower#1#2{% + \tcb@setbox\tcb@lowerbox{#1}{#2}% + \tcbdimto\tcb@h@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}% +} + +\def\tcb@vsplit@lower{% + \setbox\tcb@lowerbox=\vsplit\tcb@totallowerbox to\tcb@split@dim% + \edef\tcb@lower@box@badness{\the\badness}% +} + +\def\tcb@split@lower@box@and@assemble{% + \vfuzz=\maxdimen\vbadness=10000\savingvdiscards=1% + \tcb@vsplit@lower% + \ifnum\tcb@lower@box@badness=1000000\relax% + \setbox\tcb@totallowerbox=\vbox{% + \unvbox\tcb@lowerbox% + \splitdiscards% + \unvbox\tcb@totallowerbox}% + \else% + \tcb@setbox@lower{\tcb@split@dim}{\tcb@lowerbox}% + \fi% + \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz\savingvdiscards=0% +} + + +\def\tcb@split@lower@box{% + \vfuzz=\maxdimen\vbadness=10000% + \tcb@vsplit@lower% + \ifnum\tcb@lower@box@badness=1000000\relax% + \tcb@warning{The lower box part has become overfull}% + \fi% + \tcb@setbox@lower{\tcb@split@dim}{\tcb@lowerbox}% + \vbadness=\tcb@thevbadness\vfuzz=\tcb@thevfuzz% +} + +% patch for luatex 0.95 (thanks to Jeremy Engel) +\ifdefined\directlua + \RequirePackage{ifluatex} + \ifnum\luatexversion=95\relax + \def\tcb@vsplit@upper{% + \directlua{% + tex.savingvdiscards = 1 + local vlist = tex.splitbox("tcb@totalupperbox", tex.sp("\tcb@split@dim"), "exactly") + tex.setbox("tcb@upperbox", vlist) + tex.savingvdiscards = 0 + }% + \edef\tcb@upper@box@badness{\the\badness}% + } + \def\tcb@vsplit@lower{% + \directlua{% + tex.savingvdiscards = 1 + local vlist = tex.splitbox("tcb@totallowerbox", tex.sp("\tcb@split@dim"), "exactly") + tex.setbox("tcb@lowerbox", vlist) + tex.savingvdiscards = 0 + }% + \edef\tcb@lower@box@badness{\the\badness}% + } +\fi\fi + +\def\tcb@split@setstate@first{% + \edef\tcb@split@state{first}% + \let\kvtcb@top@rule=\kvtcb@top@rule@stand% + \let\kvtcb@bottom@rule=\kvtcb@bottom@rule@break% + \let\kvtcb@bbtop=\kvtcb@bbtop@stand% + \let\kvtcb@bbbottom=\kvtcb@bbbottom@break% + \let\tcb@break@topsep=\tcb@zpt% + \let\tcb@break@bottomsep=\kvtcb@bottomsep% +} + +\def\tcb@split@setstate@middle{% + \edef\tcb@split@state{middle}% + \let\kvtcb@top@rule=\kvtcb@top@rule@break% + \let\kvtcb@bottom@rule=\kvtcb@bottom@rule@break% + \let\kvtcb@bbtop=\kvtcb@bbtop@break% + \let\kvtcb@bbbottom=\kvtcb@bbbottom@break% + \let\tcb@break@topsep=\kvtcb@topsep% + \let\tcb@break@bottomsep=\kvtcb@bottomsep% +} + +\def\tcb@split@setstate@last{% + \edef\tcb@split@state{last}% + \let\kvtcb@top@rule=\kvtcb@top@rule@break% + \let\kvtcb@bottom@rule=\kvtcb@bottom@rule@stand% + \let\kvtcb@bbtop=\kvtcb@bbtop@break% + \let\kvtcb@bbbottom=\kvtcb@bbbottom@stand% + \let\tcb@break@topsep=\kvtcb@topsep% + \let\tcb@break@bottomsep=\tcb@zpt% +} + + +\def\tcb@split@force@standalone{% + \tcb@comp@h@total@standalone% + \ifdim\tcb@h@total>\tcb@h@page\relax% + \tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand+\tcb@h@page-\tcb@h@total}% + \fi% +} + + +\def\tcb@split@break@to@start{% + \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}% + \tcb@swap{\tcb@totallowerbox}{\tcb@lowerbox}% + \tcbdimto\tcb@h@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}% + \tcbdimto\tcb@h@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}% + \tcb@split@pagebreak% + \let\tcb@split@next=\tcb@split@start% +} + +\def\tcb@split@first{% + \setcounter{tcbbreakpart}{1}% + \ifx\kvtcb@float\@empty% + \iftcb@vfillbeforefirst% + \let\tcb@before@first=\vfill% + \else% + \let\tcb@before@first=\@empty% + \fi% + \let\tcb@before@middle=\@empty% + \let\tcb@before@last=\@empty% + \iftcb@multicol% + \long\def\tcb@after@first{\par}% using \columnbreak here kills multicols' algortihm sometimes + \long\def\tcb@after@middle{\par\vfill}% + \else% + \long\def\tcb@after@first{\par\pagebreak\tcb@enlbreak@next}% + \long\def\tcb@after@middle{\par\vfill\eject\tcb@enlbreak@next}% + \fi% + \let\tcb@after@last=\par% + \else% + \edef\tcb@before@first{\noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]\noexpand\kvtcb@everyfloat}% + \let\tcb@before@middle=\tcb@before@first% + \let\tcb@before@last=\tcb@before@first% + \let\tcb@after@first=\tcb@float@env@end% + \let\tcb@after@middle=\tcb@float@env@end% + \let\tcb@after@last=\tcb@float@env@end% + \fi% + % + \edef\kvtcb@skin@@first{\kvtcb@skin@first}% + \edef\kvtcb@skin@@middle{\kvtcb@skin@middle}% + \edef\kvtcb@skin@@last{\kvtcb@skin@last}% + % + \let\tcb@h@breaksep@first=\kvtcb@bottomsep% + \tcbdimto\tcb@h@breaksep@middle{\kvtcb@bottomsep+\kvtcb@topsep}% + \let\tcb@h@breaksep@last=\kvtcb@topsep% + \tcbdimto\tcb@h@padding@first{\kvtcb@bbtop@stand+\kvtcb@bbbottom@break+\kvtcb@top@rule@stand+\kvtcb@bottom@rule@break+\tcb@h@breaksep@first+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}% + \tcbdimto\tcb@h@padding@middle{\kvtcb@bbtop@break+\kvtcb@bbbottom@break+\kvtcb@top@rule@break+\kvtcb@bottom@rule@break+\tcb@h@breaksep@middle+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}% + \tcbdimto\tcb@h@padding@last{\kvtcb@bbtop@break+\kvtcb@bbbottom@stand+\kvtcb@top@rule@break+\kvtcb@bottom@rule@stand+\tcb@h@breaksep@last+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}% + % + \tcb@split@setstate@first% + % + \splittopskip=0pt% + \splitmaxdepth=0pt% + \edef\tcb@thevfuzz{\the\vfuzz}% + \edef\tcb@thevbadness{\the\vbadness}% + % + \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}% + \tcb@swap{\tcb@totallowerbox}{\tcb@lowerbox}% + % + \let\tcb@split@next=\relax% + \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@first-\tcb@h@padtitle}% + \ifdim\tcb@split@dim<\tcb@h@upper\relax% + % + % + \iftcb@break@allowed% + \tcb@split@upper@box@and@assemble% + \ifnum\tcb@upper@box@badness=1000000\relax% + \tcb@split@break@to@start% + \else% + \ifdim\wd\tcb@totalupperbox=0pt\relax% + \iftcb@lowerspace% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@SL% + \else% + \tcb@split@force@standalone% + \tcb@drawcolorbox@standalone% + \fi% + \else% + \ifdim\dimexpr\tcb@h@upper=0pt\relax% + \tcb@warning{Discard zero height first box part due to break problems (possible loss of zero height content)}% + \tcb@split@break@to@start% + \else% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@USL% + \fi% + \fi% + \fi% + \else% + \tcb@split@upper@box% + \ifdim\wd\tcb@totalupperbox=0pt\relax% + \iftcb@lowerspace% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@SL% + \else% + \tcb@split@force@standalone% + \tcb@drawcolorbox@standalone% + \fi% + \else% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@USL% + \fi% + \fi% + \else% + \tcb@swap{\tcb@totalupperbox}{\tcb@upperbox}% + \iftcb@lowerspace% + \tcbdimto\tcb@split@dim{\tcb@split@dim-\tcb@h@upper-\tcb@h@segment}% + \ifdim\tcb@split@dim<\kvtcb@breakminlines\baselineskip\relax% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@SL% + \else + \tcb@split@lower@box@and@assemble% + \ifnum\tcb@lower@box@badness=1000000\relax% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@SL% + \else% + \ifdim\wd\tcb@totallowerbox=0pt\relax% + \tcb@split@force@standalone% + \tcb@drawcolorbox@standalone% + \else% + \tcb@sdraw@USL% + \let\tcb@split@next=\tcb@split@L% + \fi% + \fi% + \fi% + \else% + \tcb@split@force@standalone% + \tcb@drawcolorbox@standalone% + \fi% + \fi% + \tcb@split@next% +} + + +\def\tcb@split@force@last{% + \tcb@split@setstate@last% + \ifdim\tcb@h@total>\tcb@h@page% + \tcbdimto\kvtcb@bbbottom{\kvtcb@bbbottom+\tcb@h@page-\tcb@h@total}% + \fi% +} + +\def\tcb@nextbreakpart{% + \stepcounter{tcbbreakpart}% + \tcb@count@boxes% + \iftcb@checkpage% + \tcb@phantom@savepage% + \tcb@hasPhantomtrue% + \sbox\tcb@phantombox{\kvtcb@phantom}% + \let\kvtcb@phantom\@empty% + \fi% + \tcb@following@title% +} + + +\def\tcb@split@USL{% + \tcb@nextbreakpart% + \tcb@comp@h@page% + \tcb@defToTotalHeight\tcb@h@upper{\tcb@totalupperbox}% + \tcbdimto\tcb@h@total{\tcb@h@padding@last+\tcb@h@padtitle+\tcb@h@upper+\tcb@h@segment+\tcb@h@lower}% + % + \let\tcb@split@next=\relax% + \tcb@check@for@final@box% + \iftcb@final@box% + \tcb@split@setstate@last% + \tcb@setbox@upper{\tcb@h@upper}{\tcb@totalupperbox}% + \iftcb@lowerspace% + \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}% + \tcb@sdraw@USL% + \else + \tcb@sdraw@U% + \fi% + \else + \tcb@split@setstate@middle% + \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@middle-\tcb@h@padtitle}% + \ifdim\tcb@split@dim<\tcb@h@upper\relax% + \tcb@split@upper@box% + \ifdim\wd\tcb@totalupperbox=0pt\relax% + \iftcb@lowerspace% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@SL% + \else% + \tcb@split@force@last% + \tcb@sdraw@U% + \fi% + \else% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@USL% + \fi% + \else% + \tcb@setbox@upper{\tcb@h@upper}{\tcb@totalupperbox}% + \iftcb@lowerspace% + \tcbdimto\tcb@split@dim{\tcb@split@dim-\tcb@h@upper-\tcb@h@segment} + \ifdim\tcb@split@dim<\kvtcb@breakminlines\baselineskip\relax% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@SL% + \else + \tcb@split@lower@box@and@assemble% + \ifnum\tcb@lower@box@badness=1000000\relax% + \tcb@sdraw@U% + \let\tcb@split@next=\tcb@split@SL% + \else% + \ifdim\wd\tcb@totallowerbox=0pt\relax% + \tcb@split@force@last% + \tcb@sdraw@USL% + \else% + \tcb@sdraw@USL% + \let\tcb@split@next=\tcb@split@L% + \fi% + \fi% + \fi% + \else% + \tcb@split@force@last% + \tcb@sdraw@U% + \fi% + \fi% + \fi% + \tcb@split@next% +} + + +\def\tcb@split@SL@displayed{% + \tcb@nextbreakpart% + \tcb@comp@h@page% + \let\tcb@h@upper=\tcb@zpt% + \tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}% + \tcbdimto\tcb@h@total{\tcb@h@padding@last-\kvtcb@top-\kvtcb@boxsep+\tcb@h@padtitle+\tcb@h@segment+\tcb@h@lower}% + % + \let\tcb@split@next=\relax% + \tcb@check@for@final@box% + \iftcb@final@box% + \tcb@split@setstate@last% + \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}% + \tcb@sdraw@SL% + \else + \tcb@split@setstate@middle% + \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@middle+\kvtcb@top+\kvtcb@boxsep-\tcb@h@padtitle-\tcb@h@segment}% + \tcb@split@lower@box% + \ifdim\wd\tcb@totallowerbox=0pt\relax% + \tcb@split@force@last% + \tcb@sdraw@SL% + \else + \tcb@sdraw@SL% + \let\tcb@split@next=\tcb@split@L% + \fi% + \fi% + \tcb@split@next% +} + + +\def\tcb@split@L{% + \tcb@nextbreakpart% + \tcb@comp@h@page% + \let\tcb@h@upper=\tcb@zpt% + \tcb@defToTotalHeight\tcb@h@lower{\tcb@totallowerbox}% + \tcbdimto\tcb@h@total{\tcb@h@padding@last+\tcb@h@padtitle+\tcb@h@lower}% + % + \let\tcb@split@next=\relax% + \tcb@check@for@final@box% + \iftcb@final@box% + \tcb@split@setstate@last% + \tcb@setbox@lower{\tcb@h@lower}{\tcb@totallowerbox}% + \tcb@sdraw@L% + \else + \tcb@split@setstate@middle% + \tcbdimto\tcb@split@dim{\tcb@h@page-\tcb@h@padding@middle-\tcb@h@padtitle}% + \tcb@split@lower@box% + \ifdim\wd\tcb@totallowerbox=0pt\relax% + \tcb@split@force@last% + \tcb@sdraw@L% + \else + \tcb@sdraw@L% + \let\tcb@split@next=\tcb@split@L% + \fi% + \fi% + \tcb@split@next% +} + + +\def\tcb@break@ch@fixed{% + \ifdim\tcb@natheight<\tcb@h@page\relax% + \tcbdimto\kvtcb@height@fixed{\tcb@h@page-\kvtcb@bbtop-\kvtcb@bbbottom}% + \tcb@ch@fixed% + \else% + \tcb@ch@natural% + \fi% +} + + +\def\tcb@sdraw@USL{% + \begingroup% + \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}% + \csuse{tcb@extras@\tcb@split@state}% + \tcb@afteroptions@hook% + \def\tcbsegmentstate{1}% + \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\tcb@h@upper+\tcb@h@segment+\tcb@h@lower+\csname tcb@h@breaksep@\tcb@split@state\endcsname}% + \csname tcb@break@ch@\tcb@split@state\endcsname% + \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}% + \tcbdimto\tcbtextheight{\tcb@innerheight-\kvtcb@boxsep*2-\kvtcb@top-\kvtcb@bottom}% + \tcb@drawing@env@begin% + \tcb@extensions@preframe% + % draw frame and interior + \tcb@adraw@frame% + \tcb@adraw@interior% + \iftcb@lowerseparated% + \tcb@segmentation@code% + \fi% + \tcb@adraw@title% + \tcb@extensions@postframe% + % draw text boxes + \tcb@tdraw@title% + \tcb@tdraw@upper% + \tcb@tdraw@lower% + \tcb@extensions@final% + \tcb@drawing@env@end% + \endgroup% +} + + +\def\tcb@sdraw@U{% + \begingroup% + \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}% + \csuse{tcb@extras@\tcb@split@state}% + \tcb@afteroptions@hook% + \def\tcbsegmentstate{0}% + \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\tcb@h@upper+\csname tcb@h@breaksep@\tcb@split@state\endcsname}% + \csname tcb@break@ch@\tcb@split@state\endcsname% + \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}% + \tcbdimto\tcbtextheight{\tcb@innerheight-\kvtcb@boxsep*2-\kvtcb@top-\kvtcb@bottom}% + \tcb@drawing@env@begin% + \tcb@extensions@preframe% + % draw frame and interior + \tcb@adraw@frame% + \tcb@adraw@interior% + \tcb@adraw@title% + \tcb@extensions@postframe% + % draw text boxes + \tcb@tdraw@title% + \tcb@tdraw@upper% + \tcb@extensions@final% + \tcb@drawing@env@end% + \endgroup% +} + + +\def\tcb@sdraw@SL{% + \begingroup% + \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}% + \csuse{tcb@extras@\tcb@split@state}% + \tcb@afteroptions@hook% + \def\tcbsegmentstate{1}% + \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@bottom+\kvtcb@boxsep+\tcb@h@segment+\tcb@h@lower+\csname tcb@h@breaksep@\tcb@split@state\endcsname}% + \csname tcb@break@ch@\tcb@split@state\endcsname% + \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}% + \tcbdimto\tcbtextheight{\tcb@innerheight-\kvtcb@boxsep*2-\kvtcb@top-\kvtcb@bottom}% + \tcb@drawing@env@begin% + \tcb@extensions@preframe% + % draw frame and interior + \tcb@adraw@frame% + \tcb@adraw@interior% + \iftcb@lowerseparated% + \tcb@segmentation@code% + \fi% + \tcb@adraw@title% + \tcb@extensions@postframe% + % draw text boxes + \tcb@tdraw@title% + \tcb@tdraw@lower% + \tcb@extensions@final% + \tcb@drawing@env@end% + \endgroup% +} + + +\def\tcb@sdraw@L{% + \begingroup% + \tcbset{skin=\csname kvtcb@skin@@\tcb@split@state\endcsname}% + \csuse{tcb@extras@\tcb@split@state}% + \tcb@afteroptions@hook% + \def\tcbsegmentstate{2}% + \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\ht\tcb@lowerbox+\dp\tcb@lowerbox+\csname tcb@h@breaksep@\tcb@split@state\endcsname}% + \csname tcb@break@ch@\tcb@split@state\endcsname% + \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}% + \tcbdimto\tcbtextheight{\tcb@innerheight-\kvtcb@boxsep*2-\kvtcb@top-\kvtcb@bottom}% + \tcb@drawing@env@begin% + \tcb@extensions@preframe% + % draw frame and interior + \tcb@adraw@frame% + \tcb@adraw@interior% + \tcb@adraw@title% + \tcb@extensions@postframe% + % draw text boxes + \tcb@tdraw@title% + \tcb@tdraw@lower% + \tcb@extensions@final% + \tcb@drawing@env@end% + \endgroup% +} + + + +\tcbset{% + breakable@true/.code={% + \let\tcb@savebox=\tcb@vbox% + \let\endtcb@savebox=\endtcb@vbox% + \let\tcb@defToTotalHeight=\tcb@defToTotalHeightBreakable% + \let\tcb@drawcolorbox=\tcb@drawcolorbox@breakable}, + breakable@unlimited/.code={% + \let\tcb@savebox=\tcb@vbox% + \let\endtcb@savebox=\endtcb@vbox% + \let\tcb@defToTotalHeight=\tcb@defToTotalHeightUnlimited% + \let\tcb@drawcolorbox=\tcb@drawcolorbox@breakable}, + breakable/.style={breakable@#1}, + breakable/.default=true,% + unbreakable/.style={breakable=false},% + enforce breakable/.code={% + \let\tcb@savebox=\tcb@vbox% + \let\endtcb@savebox=\endtcb@vbox% + \let\tcb@defToTotalHeight=\tcb@defToTotalHeightBreakable% + \let\tcb@drawcolorbox=\tcb@drawcolorbox@breakable}, + title after break/.store in=\kvtcb@followingtitle,% + notitle after break/.style={title after break=},% + adjusted title after break/.style={title after break={#1\vphantom{\kvtcb@adjusttext}}},% + lines before break/.store in=\kvtcb@breakminlines,% + shrink break goal/.store in=\kvtcb@shrinkbreakgoal,% + toprule at break/.store in=\kvtcb@top@rule@break, + bottomrule at break/.store in=\kvtcb@bottom@rule@break, + topsep at break/.store in=\kvtcb@topsep,% + bottomsep at break/.store in=\kvtcb@bottomsep,% + pad before break/.code={\let\kvtcb@bottom@rule@break=\tcb@zpt% + \tcbdimto\kvtcb@bottomsep{#1-\kvtcb@bottom-\kvtcb@boxsep}},% + pad before break*/.style={pad before break={#1},% + code={\tcbdimto\tcb@temp{\kvtcb@bottom@rule@stand-\kvtcb@bottomsep}% + \ifdim\tcb@temp>0pt\relax% + \tcbdimto\kvtcb@enlargepage@flex{\kvtcb@enlargepage@flex+\tcb@temp}\fi}},% + pad after break/.code={\let\kvtcb@top@rule@break=\tcb@zpt% + \tcbdimto\kvtcb@topsep{#1-\kvtcb@top-\kvtcb@boxsep}},% + pad at break/.style={pad before break={#1},pad after break={#1}},% + pad at break*/.style={pad before break*={#1},pad after break={#1}},% + enlargepage/.store in=\kvtcb@enlargepage,% + enlargepage flexible/.store in=\kvtcb@enlargepage@flex,% + break at/.store in=\kvtcb@breakatdim,% + height fixed for/.is choice,% + height fixed for/none/.code={% + \let\tcb@break@ch@first=\tcb@ch@natural% + \let\tcb@break@ch@middle=\tcb@ch@natural% + \let\tcb@break@ch@last=\tcb@ch@natural},% + height fixed for/first/.code={% + \let\tcb@break@ch@first=\tcb@break@ch@fixed% + \let\tcb@break@ch@middle=\tcb@ch@natural% + \let\tcb@break@ch@last=\tcb@ch@natural},% + height fixed for/middle/.code={% + \let\tcb@break@ch@first=\tcb@ch@natural% + \let\tcb@break@ch@middle=\tcb@break@ch@fixed% + \let\tcb@break@ch@last=\tcb@ch@natural},% + height fixed for/last/.code={% + \let\tcb@break@ch@first=\tcb@ch@natural% + \let\tcb@break@ch@middle=\tcb@ch@natural% + \let\tcb@break@ch@last=\tcb@break@ch@fixed},% + height fixed for/first and middle/.code={% + \let\tcb@break@ch@first=\tcb@break@ch@fixed% + \let\tcb@break@ch@middle=\tcb@break@ch@fixed% + \let\tcb@break@ch@last=\tcb@ch@natural},% + height fixed for/middle and last/.code={% + \let\tcb@break@ch@first=\tcb@ch@natural% + \let\tcb@break@ch@middle=\tcb@break@ch@fixed% + \let\tcb@break@ch@last=\tcb@break@ch@fixed},% + height fixed for/all/.code={% + \let\tcb@break@ch@first=\tcb@break@ch@fixed% + \let\tcb@break@ch@middle=\tcb@break@ch@fixed% + \let\tcb@break@ch@last=\tcb@break@ch@fixed},% + vfill before first/.is if=tcb@vfillbeforefirst,% + height fill/true/.code={\let\tcb@height@adjust\tcb@height@fill@unbroken@normal},% + height fill/maximum/.code={\let\tcb@height@adjust\tcb@height@fill@unbroken@compressed},% + height fill/.default=true,% + compress page/.is choice,% + compress page/all/.code={\def\tcb@comp@compress{\def\tcb@compress@height{\pageshrink-1sp}}},% + compress page/none/.code={\def\tcb@comp@compress{\let\tcb@compress@height\tcb@zpt}},% + compress page/baselineskip/.code={\def\tcb@comp@compress{% + \ifdim\pageshrink>\baselineskip% + \let\tcb@compress@height\baselineskip% + \else% + \def\tcb@compress@height{\pageshrink-1sp}% + \fi}},% + compress page/.default=all,% + compress page=baselineskip,% global setting + extras unbroken/.code={\appto\tcb@extras@unbroken{\tcbset{#1}}},% + extras first/.code={\appto\tcb@extras@first{\tcbset{#1}}},% + extras middle/.code={\appto\tcb@extras@middle{\tcbset{#1}}},% + extras last/.code={\appto\tcb@extras@last{\tcbset{#1}}},% + extras title after break/.code={\appto\tcb@extras@followingtitle{\tcbset{#1}}},% + extras/.style={extras unbroken={#1},extras first={#1},extras middle={#1},extras last={#1}},% + extras broken/.style={extras first={#1},extras middle={#1},extras last={#1}},% + extras unbroken and first/.style={extras unbroken={#1},extras first={#1}},% + extras unbroken and last/.style={extras unbroken={#1},extras last={#1}},% + extras middle and last/.style={extras middle={#1},extras last={#1}},% + extras first and middle/.style={extras first={#1},extras middle={#1}},% + no extras unbroken/.code={\let\tcb@extras@unbroken\@empty},% + no extras first/.code={\let\tcb@extras@first\@empty},% + no extras middle/.code={\let\tcb@extras@middle\@empty},% + no extras last/.code={\let\tcb@extras@last\@empty},% + no extras title after break/.code={\let\tcb@extras@followingtitle\@empty}, + no extras/.code={\let\tcb@extras@unbroken\@empty\let\tcb@extras@first\@empty\let\tcb@extras@middle\@empty\let\tcb@extras@last\@empty\let\tcb@extras@followingtitle\@empty},% + if odd page*/.style 2 args={check odd page,extras={if odd page={#1}{#2}}},% + if odd page or oneside*/.style 2 args={check odd page,extras={if odd page or oneside={#1}{#2}}},% + segmentation at break/.is choice,% + segmentation at break/true/.code={\let\tcb@split@SL\tcb@split@SL@displayed}, + segmentation at break/false/.code={\let\tcb@split@SL\tcb@split@L}, + segmentation at break/.default=true, +} + + +\tcbset{% + reset@breakable/.style={% + unbreakable,notitle after break, + shrink break goal=0pt, + lines before break=2, + topsep at break=0pt, + bottomsep at break=0pt, + enlargepage=0pt,enlargepage flexible=0pt, + break at=0pt, + height fixed for=none, + vfill before first=false, + no extras, + segmentation at break + }, + initialize@reset=reset@breakable, +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbdocumentation.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbdocumentation.code.tex new file mode 100644 index 0000000..29a867c --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbdocumentation.code.tex @@ -0,0 +1,509 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbdocumentation.code.tex: Code for LaTeX documentations +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\tcbuselibrary{listings,skins,xparse,external} + +\RequirePackage{pifont}[2005/04/12] +\RequirePackage{marvosym}[2011/07/20] +\ifdefined\printindex\else\RequirePackage{makeidx}[2000/03/29]\fi +\RequirePackage{refcount}[2011/10/16] +\RequirePackage{hyperref}[2012/02/06] +\ifdefined\marginnote\else\RequirePackage{marginnote}[2012/03/29]\fi + +\definecolor{Option}{rgb}{0.118,0.546,0.222} +\definecolor{Definition}{rgb}{0.784,0.06,0.176} +\definecolor{ExampleFrame}{rgb}{0.628,0.705,0.942} +\definecolor{ExampleBack}{rgb}{0.963,0.971,0.994} +\definecolor{Hyperlink}{rgb}{0.281,0.275,0.485} + +\def\colDef#1{\textcolor{\kvtcb@col@command}{#1}} +\def\colOpt#1{\textcolor{\kvtcb@col@opt}{#1}} + +\lstdefinestyle{tcbdocumentation}{language={[LaTeX]TeX}, + aboveskip={0\p@ \@plus 6\p@}, + belowskip={0\p@ \@plus 6\p@}, + columns=fullflexible, + keepspaces=true, + breaklines=true, + prebreak={\Righttorque}, + postbreak={\space\Lefttorque}, + breakatwhitespace=true, + basicstyle=\ttfamily\footnotesize, + extendedchars=true, + moredelim={[is][\itshape\rmfamily]{^^a7}{^^a7}}, + nolol,inputencoding=\kvtcb@listingencoding} + +% The following macros are taken from ltxdoc +\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} +\def\meta@font@select{\rmfamily\itshape} + +\AtEndPreamble{% + \@ifpackageloaded{doc}{% + }{% code taken from doc.sty + \ifx\l@nohyphenation\undefined + \newlanguage\l@nohyphenation + \fi + \DeclareRobustCommand\meta[1]{% + \ensuremath\langle + \ifmmode \expandafter \nfss@text \fi + {% + \meta@font@select + \edef\meta@hyphen@restore + {\hyphenchar\the\font\the\hyphenchar\font}% + \hyphenchar\font\m@ne + \language\l@nohyphenation + #1\/% + \meta@hyphen@restore + }\ensuremath\rangle + }% + }% +}% + +\def\marg#1{% + {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}} +\def\oarg#1{% + \colOpt{{\ttfamily[}\meta{#1}{\ttfamily]}}} + +\newrobustcmd\tcb@cs[1]{{\catcode`\_=12\relax\catcode`\@11\relax\ttfamily\char`\\\scantokens{#1}\unskip}} +\newrobustcmd\tcb@scantokens[1]{{\catcode`\_=12\relax\catcode`\@11\relax\ttfamily\scantokens{#1}\unskip}} + +\newif\iftcb@doc@toindex +\newif\iftcb@doc@colorize +\newif\iftcb@doc@annotate + +% language specific texts +\tcbset{ + doclang/.cd, + color/.store in=\kvtcb@text@color, + colors/.store in=\kvtcb@text@colors, + counter/.store in=\kvtcb@text@counter, + counters/.store in=\kvtcb@text@counters, + environment content/.store in=\kvtcb@text@envcontent, + environment/.store in=\kvtcb@text@env, + environments/.store in=\kvtcb@text@envs, + index/.store in=\kvtcb@text@index, + key/.store in=\kvtcb@text@key, + keys/.store in=\kvtcb@text@keys, + length/.store in=\kvtcb@text@length, + lengths/.store in=\kvtcb@text@lengths, + new/.store in=\kvtcb@text@new, + pageshort/.store in=\kvtcb@text@pageshort, + updated/.store in=\kvtcb@text@updated, + value/.store in=\kvtcb@text@value, + values/.store in=\kvtcb@text@values, +} + +% documentation options +\tcbset{ + documentation listing options/.store in=\kvtcb@doclistingoptions,% + documentation listing style/.style={documentation listing options={style=#1}},% + documentation minted language/.store in=\kvtcb@docminted@language, + documentation minted style/.store in=\kvtcb@docmintstyle, + documentation minted options/.store in=\kvtcb@docmintoptions, + color command/.store in=\kvtcb@col@command, + color environment/.store in=\kvtcb@col@environment, + color key/.store in=\kvtcb@col@key, + color value/.store in=\kvtcb@col@value, + color counter/.store in=\kvtcb@col@counter, + color length/.store in=\kvtcb@col@length, + color color/.store in=\kvtcb@col@color, + color definition/.style={color command={#1},color environment={#1},color key={#1}, + color value={#1},color color={#1},color counter={#1},color length={#1}}, + color option/.store in=\kvtcb@col@opt, + color hyperlink/.store in=\kvtcb@colhyper, + color frame/.store in=\kvtcb@colhyper, + index actual/.store in=\idx@actual, + index quote/.store in=\idx@quote, + index level/.store in=\idx@level, + index format/.store in=\idx@format, + index colorize/.is if=tcb@doc@colorize,% + index annotate/.is if=tcb@doc@annotate,% + index command/.code={\def\kvtcb@index@command##1{#1{##1}}},% + index command name/.code={\def\kvtcb@index@command##1{\index[#1]{##1}}},% + doc left/.dimstore in=\kvtcb@doc@left, + doc right/.dimstore in=\kvtcb@doc@right, + doc left indent/.dimstore in=\kvtcb@doc@indentleft, + doc right indent/.dimstore in=\kvtcb@doc@indentright, + doc head command/.style={doc@head@command/.style={#1}}, + doc head environment/.style={doc@head@environment/.style={#1}}, + doc head key/.style={doc@head@key/.style={#1}}, + doc head/.style={doc head command={#1},doc head environment={#1},doc head key={#1}}, + before doc body command/.store in=\kvtcb@doc@body@command@before, + after doc body command/.store in=\kvtcb@doc@body@command@after, + before doc body environment/.store in=\kvtcb@doc@body@environment@before, + after doc body environment/.store in=\kvtcb@doc@body@environment@after, + before doc body key/.store in=\kvtcb@doc@body@key@before, + after doc body key/.store in=\kvtcb@doc@body@key@after, + before doc body/.style={before doc body command={#1},before doc body environment={#1},before doc body key={#1}}, + after doc body/.style={after doc body command={#1},after doc body environment={#1},after doc body key={#1}}, + doc description/.store in=\kvtcb@doc@description,% + doc into index/.is if=tcb@doc@toindex,% + doc updated/.style={before upper={\tcbdocmarginnote{\tcbdocupdated{#1}}}}, + doc new/.style={before upper={\tcbdocmarginnote{\tcbdocnew{#1}}}}, + doc new and updated/.style 2 args={before upper={\tcbdocmarginnote{\tcbdocnew{#1}\\\tcbdocupdated{#2}}}}, + doc marginnote/.style={doc@marginnote/.style={#1}}, + keywords bold/.is choice,% + keywords bold/.default=true,% + keywords bold/true/.code={\let\tcb@doc@bfseries\bfseries}, + keywords bold/false/.code={\let\tcb@doc@bfseries\mdseries}, +} + + +% styles +\tcbset{ + docexample/.style={colframe=ExampleFrame,colback=ExampleBack, + before skip=\medskipamount,after skip=\medskipamount, + fontlower=\footnotesize}, + documentation minted language=latex, + documentation minted style=, + documentation minted options={tabsize=2,fontsize=\small}, + index default settings/.style={index actual={@},index quote={"},index level={!}}, + index german settings/.style={index actual={=},index quote={!},index level={>}}, + english language/.code={\tcbset{doclang/.cd, + color=color,colors=Colors, + counter=counter,counters=Counters, + environment content=environment content, + environment=environment,environments=Environments, + index=Index, + key=key,keys=Keys, + length=length,lengths=Lengths, + new=New, + pageshort={P.}, + updated=Updated, + value=value,values=Values}}, +} + +\AtBeginDocument{% + \csname tcb@doc@index@\idx@format\endcsname% + \hypersetup{ + citecolor=\kvtcb@colhyper, + linkcolor=\kvtcb@colhyper, + urlcolor=\kvtcb@colhyper, + filecolor=\kvtcb@colhyper, + menucolor=\kvtcb@colhyper +}} + +\def\dispExample{\tcb@layer@pushup\tcbset{docexample}\begingroup\tcbwritetemp} + +\def\enddispExample{% + \endtcbwritetemp\endgroup% + \begin{tcolorbox}% + \tcb@doc@usetemplisting% + \tcblower% + \tcbusetemp% + \end{tcolorbox}% +} + +\newenvironment{dispExample*}[1]{% + \tcb@layer@pushup\tcbset{docexample,#1}\begingroup\tcbwritetemp% + }{\enddispExample} + +\def\dispListing{\tcb@layer@pushup\tcbset{docexample}\begingroup\tcbwritetemp} + +\def\enddispListing{% + \endtcbwritetemp\endgroup% + \begin{tcolorbox}% + \tcb@doc@usetemplisting% + \end{tcolorbox}% +} + +\newenvironment{dispListing*}[1]{% + \tcb@layer@pushup\tcbset{docexample,#1}\begingroup\tcbwritetemp% + }{\enddispListing} + +% index auxiliary macros +\def\tcb@Index@Print@CA#1#2#3{% + \iftcb@doc@colorize\textcolor{#2}{\tcb@scantokens{#1}}\else\tcb@scantokens{#1}\fi% + \iftcb@doc@annotate\ #3\fi% +} + +\def\tcb@Index@Print@C#1#2{% + \iftcb@doc@colorize\textcolor{#2}{\tcb@scantokens{#1}}\else\tcb@scantokens{#1}\fi% +} + +\def\tcb@Index@Print@ComCA#1#2#3{% + \iftcb@doc@colorize\textcolor{#2}{\tcb@cs{#1}}\else\tcb@cs{#1}\fi% + \iftcb@doc@annotate\ #3\fi% +} + +\def\tcb@Index@Print@ComC#1#2{% + \iftcb@doc@colorize\textcolor{#2}{\tcb@cs{#1}}\else\tcb@cs{#1}\fi% +} + +\newrobustcmd{\tcbIndexPrintComC}[1]{\tcb@Index@Print@ComC{#1}{\kvtcb@col@command}} +\def\tcb@Print@Com#1{\textcolor{\kvtcb@col@command}{\tcb@doc@bfseries\tcb@cs{#1}}} + +\newrobustcmd{\tcbIndexPrintEnvCA}[1]{\tcb@Index@Print@CA{#1}{\kvtcb@col@environment}{\kvtcb@text@env}} +\newrobustcmd{\tcbIndexPrintEnvC}[1]{\tcb@Index@Print@C{#1}{\kvtcb@col@environment}} +\def\tcb@Print@Env#1{\textcolor{\kvtcb@col@environment}{\tcb@doc@bfseries\tcb@scantokens{#1}}} + +\newrobustcmd{\tcbIndexPrintKeyCA}[1]{\tcb@Index@Print@CA{#1}{\kvtcb@col@key}{\kvtcb@text@key}} +\newrobustcmd{\tcbIndexPrintKeyC}[1]{\tcb@Index@Print@C{#1}{\kvtcb@col@key}} +\def\tcb@Print@Key#1{\textcolor{\kvtcb@col@key}{\tcb@doc@bfseries\tcb@scantokens{#1}}} + +\newrobustcmd{\tcbIndexPrintValCA}[1]{\tcb@Index@Print@CA{#1}{\kvtcb@col@value}{\kvtcb@text@value}} +\newrobustcmd{\tcbIndexPrintValC}[1]{\tcb@Index@Print@C{#1}{\kvtcb@col@value}} +\def\tcb@Print@Val#1{\textcolor{\kvtcb@col@value}{\tcb@doc@bfseries\tcb@scantokens{#1}}} + +\newrobustcmd{\tcbIndexPrintColCA}[1]{\tcb@Index@Print@CA{#1}{\kvtcb@col@color}{\kvtcb@text@color}} +\newrobustcmd{\tcbIndexPrintColC}[1]{\tcb@Index@Print@C{#1}{\kvtcb@col@color}} +\def\tcb@Print@Col#1{\textcolor{\kvtcb@col@color}{\tcb@doc@bfseries\tcb@scantokens{#1}}} + +\newrobustcmd{\tcbIndexPrintCountCA}[1]{\tcb@Index@Print@CA{#1}{\kvtcb@col@counter}{\kvtcb@text@counter}} +\newrobustcmd{\tcbIndexPrintCountC}[1]{\tcb@Index@Print@C{#1}{\kvtcb@col@counter}} +\def\tcb@Print@Count#1{\textcolor{\kvtcb@col@counter}{\tcb@doc@bfseries\tcb@scantokens{#1}}} + +\newrobustcmd{\tcbIndexPrintLenCA}[1]{\tcb@Index@Print@ComCA{#1}{\kvtcb@col@length}{\kvtcb@text@length}} +\newrobustcmd{\tcbIndexPrintLenC}[1]{\tcb@Index@Print@ComC{#1}{\kvtcb@col@length}} +\def\tcb@Print@Len#1{\textcolor{\kvtcb@col@length}{\tcb@doc@bfseries\tcb@cs{#1}}} + +\def\tcb@index@Com#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintComC{#1}}\fi} +\def\tcb@index@Env#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintEnvCA{#1}}\kvtcb@index@command{\kvtcb@text@envs\idx@level#1\idx@actual\tcbIndexPrintEnvC{#1}}\fi} +\def\tcb@index@Key#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintKeyCA{#1}}\kvtcb@index@command{\kvtcb@text@keys\idx@level#1\idx@actual\tcbIndexPrintKeyC{#1}}\fi}% +\def\tcb@index@KeyPath#1#2{\iftcb@doc@toindex\kvtcb@index@command{#2\idx@actual\tcbIndexPrintKeyCA{#2}}\kvtcb@index@command{\kvtcb@text@keys\idx@level#1\idx@actual\tcbIndexPrintKeyC{/#1/}\idx@level#2\idx@actual\tcbIndexPrintKeyC{#2}}\fi}% +\def\tcb@index@Val#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintValCA{#1}}\kvtcb@index@command{\kvtcb@text@values\idx@level#1\idx@actual\tcbIndexPrintValC{#1}}\fi} +\def\tcb@index@Col#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintColCA{#1}}\kvtcb@index@command{\kvtcb@text@colors\idx@level#1\idx@actual\tcbIndexPrintColC{#1}}\fi} +\def\tcb@index@Count#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintCountCA{#1}}\kvtcb@index@command{\kvtcb@text@counters\idx@level#1\idx@actual\tcbIndexPrintCountC{#1}}\fi} +\def\tcb@index@Len#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintLenCA{#1}}\kvtcb@index@command{\kvtcb@text@lengths\idx@level#1\idx@actual\tcbIndexPrintLenC{#1}}\fi} + +\def\brackets#1{{\ttfamily\char`\{}#1{\ttfamily\char`\}}} + +\newenvironment{tcb@manual@entry}{\begin{list}{}{% + \setlength{\leftmargin}{\kvtcb@doc@left}% + \setlength{\itemindent}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\rightmargin}{\kvtcb@doc@right}% + }\item}{\end{list}} + +\def\tcb@manual@top#1{\itemsep=0pt\parskip=0pt\item\strut{#1}\par\topsep=0pt} + +\def\tcb@doc@do@description{% + \ifx\kvtcb@doc@description\@empty\else\tcblower\raggedleft(\kvtcb@doc@description)\fi% +} + +\newtcolorbox{tcb@doc@head}[1]{blank,colback=white,colframe=white, + code={\tcbdimto\tcb@temp@grow@left{-\kvtcb@doc@indentleft}% + \tcbdimto\tcb@temp@grow@right{-\kvtcb@doc@indentright}}, + grow to left by=\tcb@temp@grow@left,% + grow to right by=\tcb@temp@grow@right, + sidebyside,sidebyside align=top, + sidebyside gap=-\tcb@w@upper@real, + phantom=\phantomsection,% + enlarge bottom by=-0.2\baselineskip,#1} + +% main documentation environments +\newenvironment{docCommand}[3][]{\tcbset{#1}% + \begin{tcb@manual@entry}% + \begin{tcb@doc@head}{doc@head@command}% + \tcb@Print@Com{#2}\tcb@index@Com{#2}\protected@edef\@currentlabel{\noexpand\tcb@cs{#2}}\label{com:#2}{\ttfamily #3}% + \tcb@doc@do@description% + \end{tcb@doc@head}\nobreak\tcbset{before upper=}\kvtcb@doc@body@command@before\ignorespaces}% + {\ifvmode\else\unskip\fi\kvtcb@doc@body@command@after\end{tcb@manual@entry}} + +\newenvironment{docCommand*}{\bgroup\tcb@doc@toindexfalse\begin{docCommand}}{\end{docCommand}\egroup} + +\newenvironment{docEnvironment}[3][]{\tcbset{#1}% + \begin{tcb@manual@entry}% + \begin{tcb@doc@head}{doc@head@environment}% + \strut\cs{begin}\brackets{\tcb@Print@Env{#2}}\tcb@index@Env{#2}\protected@edef\@currentlabel{#2}\label{env:#2}{\ttfamily #3}\par% + \strut~~\meta{\kvtcb@text@envcontent}\par% + \strut\cs{end}\brackets{\tcb@Print@Env{#2}}% + \tcb@doc@do@description% + \end{tcb@doc@head}\nobreak\tcbset{before upper=}\kvtcb@doc@body@environment@before\ignorespaces}% + {\ifvmode\else\unskip\fi\kvtcb@doc@body@environment@after\end{tcb@manual@entry}} + +\newenvironment{docEnvironment*}{\bgroup\tcb@doc@toindexfalse\begin{docEnvironment}}{\end{docEnvironment}\egroup} + +\NewDocumentEnvironment{docKey}{ O{} +O{} m m +m }{\tcbset{#2,doc description={#5}}% + \begin{tcb@manual@entry}% + \begin{tcb@doc@head}{doc@head@key}% + \ifblank{#1}{% + \tcb@Print@Key{#3}\tcb@index@Key{#3}\protected@edef\@currentlabel{#3}\label{key:#3}{\ttfamily #4}% + }{% + \tcb@Print@Key{/#1/#3}% + \tcb@index@KeyPath{#1}{#3}\protected@edef\@currentlabel{/#1/#3}\label{key:/#1/#3}{\ttfamily #4}% + }% + \tcb@doc@do@description% + \end{tcb@doc@head}\nobreak\tcbset{before upper=}\kvtcb@doc@body@key@before\ignorespaces}% + {\ifvmode\else\unskip\fi\kvtcb@doc@body@key@after\end{tcb@manual@entry}} + +\newenvironment{docKey*}{\bgroup\tcb@doc@toindexfalse\begin{docKey}}{\end{docKey}\egroup} + +\def\tcbmakedocSubKey#1#2{% + \NewDocumentEnvironment{#1}{ O{} +O{} m m +m }{% + \ifblank{##1}{\def\tcb@key@path{#2}}{\def\tcb@key@path{#2/##1}}% + \begin{docKey}[\tcb@key@path][##2]{##3}{##4}{##5}}% + {\end{docKey}}% + \newenvironment{#1*}{\bgroup\tcb@doc@toindexfalse\begin{#1}}{\end{#1}\egroup}% +} + +\DeclareDocumentCommand\docAuxCommand{sm}{% + \tcb@Print@Com{#2}% + \IfBooleanTF{#1}{}{\tcb@index@Com{#2}}% +} + +\DeclareDocumentCommand\docAuxEnvironment{sm}{% + \tcb@Print@Env{#2}% + \IfBooleanTF{#1}{}{\tcb@index@Env{#2}}% +} + +\DeclareDocumentCommand\docAuxKey{sO{}m}{% + \ifblank{#2}{% + \tcb@Print@Key{#3}% + \IfBooleanTF{#1}{}{\tcb@index@Key{#3}}% + }{% + \tcb@Print@Key{/#2/#3}% + \IfBooleanTF{#1}{}{\tcb@index@KeyPath{#2}{#3}}% +}} + +\DeclareDocumentCommand\docColor{sm}{% + \tcb@Print@Col{#2}% + \IfBooleanTF{#1}{}{\tcb@index@Col{#2}}% +} + +\DeclareDocumentCommand\docCounter{sm}{% + \tcb@Print@Count{#2}% + \IfBooleanTF{#1}{}{\tcb@index@Count{#2}}% +} + +\DeclareDocumentCommand\docLength{sm}{% + \tcb@Print@Len{#2}% + \IfBooleanTF{#1}{}{\tcb@index@Len{#2}}% +} + +\DeclareDocumentCommand\docValue{sm}{% + \tcb@Print@Val{#2}% + \IfBooleanTF{#1}{}{\tcb@index@Val{#2}}% +} + +\setrefcountdefault{-1} +\DeclareDocumentCommand\tcb@ref@doc{msm}{% + \hyperref[#1:#3]{\texttt{\ref*{#1:#3}}% + \IfBooleanTF{#2}{}{% + \ifnum\getpagerefnumber{#1:#3}=\thepage% + \else% + \textsuperscript{\ding{213}\,\kvtcb@text@pageshort\,\pageref*{#1:#3}}% + \fi}}% +} + +\def\refCom{\tcb@ref@doc{com}} +\def\refEnv{\tcb@ref@doc{env}} +\def\refKey{\tcb@ref@doc{key}} + +\def\refAux#1{\textcolor{\kvtcb@colhyper}{\tcb@scantokens{#1}}} +\def\refAuxcs#1{\textcolor{\kvtcb@colhyper}{\tcb@cs{#1}}} + +\newenvironment{absquote} + {\list{}{\leftmargin2cm\rightmargin\leftmargin}% + \item\relax\footnotesize} + {\endlist} + +\newcommand{\tcbdocmarginnote}[2][]{% + \marginnote{% + \begin{tcolorbox}[enhanced jigsaw,size=fbox,boxrule=1pt,leftrule=0pt,rightrule=0pt, + arc=0pt,outer arc=1pt,boxsep=1pt,top=1pt,bottom=1pt, + nobeforeafter,width=\marginparwidth, + colframe=red!50!white,colback=red!25!yellow!5!white,fontupper=\scriptsize, + if odd page or oneside={flushright upper}{flushleft upper}, + doc@marginnote,#1]#2\end{tcolorbox}}} + +\newcommand*{\tcbdocnew}[1]{\kvtcb@text@new: #1} +\newcommand*{\tcbdocupdated}[1]{\kvtcb@text@updated: #1} + +%--- index macros taken from pgfmanual-en-macros +\def\tcb@doc@index@pgf@{% + \ifdefined\c@IndexColumns% + \c@IndexColumns=2% + \fi% + \def\theindex{\@restonecoltrue + \columnseprule \z@ \columnsep 29\p@ + \twocolumn[\index@prologue]% + \parindent -30pt% + \columnsep 15pt% + \parskip 0pt plus 1pt% + \leftskip 30pt% + \rightskip 0pt plus 2cm% + \small% + \def\@idxitem{\par}% + \let\item\@idxitem\ignorespaces} + \def\endtheindex{\onecolumn}% + \def\noindexing{\let\index=\@gobble}% +} + +\def\tcb@doc@index@pgfsection{% + \def\index@prologue{\section*{\kvtcb@text@index}\addcontentsline{toc}{section}{\kvtcb@text@index}% + \par\noindent% + }% + \tcb@doc@index@pgf@% +} + +\def\tcb@doc@index@pgfchapter{% + \def\index@prologue{\ifdefined\phantomsection\phantomsection\fi\@makeschapterhead{\kvtcb@text@index}\addcontentsline{toc}{chapter}{\kvtcb@text@index}}% + \tcb@doc@index@pgf@% +} + +\let\tcb@doc@index@pgf=\tcb@doc@index@pgfsection% + +\def\tcb@doc@index@doc{% + \let\tcb@index@Com=\SpecialMainIndex%% + \let\tcb@index@Env=\SpecialMainEnvIndex% + \tcbset{index german settings}% + \EnableCrossrefs% + \PageIndex% +} + +\def\tcb@doc@index@off{}% + +\tcbset{% + reset@documentation/.style={% + }, + documentation listing style=tcbdocumentation, + doc left=2em, + doc right=0pt, + doc left indent=-2em, + doc right indent=0pt, + doc head=, + before doc body=, + after doc body=, + doc description=, + doc into index=true, + doc marginnote=, + initialize@reset=reset@documentation, + color option=Option, + color definition=Definition, + color hyperlink=Hyperlink, + index command=\index,% + index format=pgf, + index default settings, + index colorize=false, + index annotate=true, + english language, + keywords bold, +} + +% deprecated +\tcbset{ + before example/.store in=\kvtcb@beforeexample, + after example/.store in=\kvtcb@afterexample, + before example=\par\smallskip, + after example=, +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbexternal.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbexternal.code.tex new file mode 100644 index 0000000..806461a --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbexternal.code.tex @@ -0,0 +1,286 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbexternal.code.tex: Code for externalization +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\tcbuselibrary{pro@cessing} + +{ +\catcode`\"=12 +\xdef\tcbexternal@normal@dq{"} +\catcode`\"=13 +\gdef\tcbexternal@activate@normal@dq{\let"=\tcbexternal@normal@dq} +} + +\long\def\tcbifexternal#1#2{% + \ifdefined\TCBEXTERNALINPUT% + #1% + \else% + #2% + \fi% +} + +\tcbifexternal{% + \def\tcbEXTERNALIZE{% + \RequirePackage{incgraph}% + \TCBEXTERNALPREAMBLE% + \begin{document}% + \begin{inctext}[border=\TCBEXTERNALSAFETY]% + \input{\TCBEXTERNALINPUT}% + \end{inctext}% + \end{document}% + }% +}{% + \def\tcbEXTERNALIZE{% + \tcbset{ + external/.cd, + externalize/.is if=tcb@externalize, + externalize=true, + }% + }% +} + +\@onlypreamble\tcbEXTERNALIZE + +\def\tcbexternal@setbasename#1{% + \edef\tcbexternal@job@name{\expandonce{\tcbexternal@prefix}\expandonce{#1}}% + \edef\tcbexternal@job@mdfive{\expandonce{\tcbexternal@job@name.md5}}% + \edef\tcbexternal@job@source{\expandonce{\tcbexternal@job@name.tex}}% + \edef\tcbexternal@job@pdf{\expandonce{\tcbexternal@job@name.pdf}}% +} + +\def\tcbexternal@corecompile{% + \begingroup% + \ifnum\the\catcode`\"=13 \tcbexternal@activate@normal@dq\fi% + \message{=== Compile external '\tcbexternal@job@name': }% + \immediate\openout\tcb@out="\tcbexternal@run@tex" + \immediate\write\tcb@out{\string\gdef\string\TCBEXTERNALINPUT{"\tcbexternal@job@source"}}% + \immediate\write\tcb@out{\string\gdef\string\TCBEXTERNALSAFETY{\tcbexternal@safety}}% + \immediate\write\tcb@out{\string\gdef\string\TCBEXTERNALPREAMBLE{\expandonce{\tcbexternal@preamble}}}% + \ifdefempty{\tcbexternal@preclass}{}{\immediate\write\tcb@out{\expandonce{\tcbexternal@preclass}}}% + \immediate\write\tcb@out{\string\input{"\jobname.tex"}}% + \immediate\closeout\tcb@out% + \foreach \n in {1,...,\tcbexternal@runs} + {% + \ShellEscape{% + \tcbexternal@compiler\space + -shell-escape + -halt-on-error + -interaction=batchmode + -jobname="\tcbexternal@job@name" + "\tcbexternal@run@tex" + }% + }% + \endgroup% +} + +\def\tcbexternal@compile#1{% + \tcbiffileprocess{#1}% + {\tcbexternal@job@source}{\tcbexternal@job@mdfive}{\tcbexternal@job@pdf}% + {\tcbexternal@corecompile}{}% +} + +\def\tcbexternal@inputsource{% + \IfFileExists{\tcbexternal@job@source}% + {\input{\tcbexternal@job@source}}% + {\tcb@error{File '\tcbexternal@job@source' missing.}{}}% +} + +\def\tcbexternal@pdfmissing@warning{% + \tcb@warning{File '\tcbexternal@job@pdf' missing. + Compilation error or shell-escape wasn't enabled or a subdirectory could'nt be generated}% + \message{Load '\tcbexternal@job@source' instead}% + \tcbexternal@inputsource% +} + +\def\tcbexternal@pdfmissing@error{% + \tcb@error{File '\tcbexternal@job@pdf' missing. + Compilation error or shell-escape wasn't enabled or a subdirectory could'nt be generated}{}% +} + +\def\tcbexternal@inputpdf{% + \IfFileExists{\tcbexternal@job@pdf}% + {% + \begingroup\edef\x{\endgroup% + \noexpand\includegraphics[trim=\tcbexternal@safety\space\tcbexternal@safety% + \space\tcbexternal@safety\space\tcbexternal@safety]{\expandonce{\tcbexternal@job@pdf}}}% + \x% + }% + {\tcbexternal@pdfmissing}% +} + +\newif\iftcb@externalize +\tcb@externalizefalse + +\def\tcb@useexternal{% + \iftcb@externalize% + \tcbexternal@compile{\tcbexternal@condition}% + \tcbexternal@inputpdf% + \else% + \tcbexternal@compile{2}% + \tcbexternal@inputsource% + \fi% +} + +\newenvironment{tcbexternal}[2][]{% + \tcbset{external/.cd,#1,name=#2}% + \@ifundefined{@tcbexternal@JN@\tcbexternal@job@name}{% + \global\@namedef{@tcbexternal@JN@\tcbexternal@job@name}{}% + }{% + \tcb@error{External job name '\tcbexternal@job@name' already used}% + {Give a new unique name to the current external job.}% + }% + \begingroup% + \let\tcb@verbatim@begin@hook=\tcbexternal@out@begin% + \let\tcb@verbatim@end@hook=\tcbexternal@out@end% + \tcbverbatimwrite{\tcbexternal@job@source}}% +{% + \endtcbverbatimwrite\endgroup% + \tcb@useexternal% +} + +\long\def\new@tcb@externalizeenvironment#1#2#3#4#5{% + \tcb@newenvironment{#1}[2][]{% + #4% + \begingroup% + \tcbexternal[#3,##1,environment=#2]{##2}% + }{% + \endtcbexternal% + \endgroup% + #5% + }% +} + +\def\newtcbexternalizeenvironment{% + \let\tcb@newenvironment\newenvironment% + \new@tcb@externalizeenvironment% +} + +\def\renewtcbexternalizeenvironment{% + \let\tcb@newenvironment\renewenvironment% + \new@tcb@externalizeenvironment% +} + +\long\def\new@tcb@externalizetcolorbox#1#2#3#4{% + \new@tcb@externalizeenvironment{#1}{#2}% + {preamble tcbset={force nobeforeafter},#3}% + {\tcb@layer@pushup\tcb@apply@box@options{#4}\tcb@set@normal@unbroken@beforeafter\tcb@before@unbroken}% + {\tcb@after@unbroken}% +} + +\def\newtcbexternalizetcolorbox{% + \let\tcb@newenvironment\newenvironment% + \new@tcb@externalizetcolorbox% +} + +\def\renewtcbexternalizetcolorbox{% + \let\tcb@newenvironment\renewenvironment% + \new@tcb@externalizetcolorbox% +} + + +\newtcbexternalizeenvironment{extikzpicture}{tikzpicture}{}{}{} + +\newtcbexternalizetcolorbox{extcolorbox}{tcolorbox}{}{} + + +\tcbset{ + external/.cd, + % + runner/.code={% + \edef\tcbexternal@run@tex{\expandonce{#1}}% + }, + % + prefix/.store in=\tcbexternal@prefix, + compiler/.store in=\tcbexternal@compiler, + runs/.code={\numdef\tcbexternal@runs{#1}}, + name/.code={\tcbexternal@setbasename{#1}}, + safety/.store in=\tcbexternal@safety, + preamble/.code={\appto\tcbexternal@preamble{#1}}, + preamble tcbset/.code={\appto\tcbexternal@preamble{\tcbset{#1}}}, + clear preamble/.code={\def\tcbexternal@preamble{}}, + preclass/.code={\appto\tcbexternal@preclass{#1}}, + clear preclass/.code={\def\tcbexternal@preclass{}}, + PassOptionsToPackage/.code 2 args={\appto\tcbexternal@preclass{\PassOptionsToPackage{#1}{#2}}}, + PassOptionsToClass/.code 2 args={\appto\tcbexternal@preclass{\PassOptionsToClass{#1}{#2}}}, + externalize/.code={}, + -/.style={/tcb/external/externalize=false}, + % + force remake/.is choice, + force remake/true/.code={\def\tcbexternal@condition{0}}, + force remake/false/.code={\def\tcbexternal@condition{1}}, + force remake/.default=true, + !/.style={/tcb/external/force remake}, + % + input source on error/.is choice, + input source on error/true/.code={\let\tcbexternal@pdfmissing=\tcbexternal@pdfmissing@warning}, + input source on error/false/.code={\let\tcbexternal@pdfmissing=\tcbexternal@pdfmissing@error}, + input source on error/.default=true, + % + plain/.code={% + \let\tcbexternal@out@begin=\@empty% + \let\tcbexternal@out@end=\@empty% + }, + minipage/.code={% + \appto\tcbexternal@out@begin{\immediate\write\tcb@out{\string\begin{minipage}{\the\dimexpr#1\relax}\string\ignorespaces\@percentchar}}% + \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\end{minipage}\@percentchar}}% + }, + minipage/.default=\linewidth, + % + environment with percent/.is choice, + environment with percent/true/.style={% + /tcb/external/environment/.code={% + \appto\tcbexternal@out@begin{\immediate\write\tcb@out{\string\begin{##1}\@percentchar}}% + \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\end{##1}\@percentchar}}% + } + }, + environment with percent/false/.style={% + /tcb/external/environment/.code={% + \appto\tcbexternal@out@begin{\immediate\write\tcb@out{\string\begin{##1}}}% + \preto\tcbexternal@out@end{\immediate\write\tcb@out{\string\end{##1}}}% + } + }, + environment with percent/.default=true, + % + runner=\jobname_run.tex, + prefix={external/}, + compiler=pdflatex, + runs=1, + name=unnamed, + safety=2mm, + clear preamble, + clear preclass, + force remake=false, + input source on error, + environment with percent, + plain +} + +\tcbset{% + externalize example/.style={% + external/name=#1,tempfile=\tcbexternal@job@source, + code={\let\tcbusetemp=\tcb@useexternal}% + }, + externalize example!/.style={externalize example=#1,external/force remake}, + externalize listing/.style={% + external/name=#1,listing file=\tcbexternal@job@source, + code={\let\tcbuselistingtext@input=\tcb@useexternal}% + }, + externalize listing!/.style={externalize listing=#1,external/force remake}, +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbfitting.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbfitting.code.tex new file mode 100644 index 0000000..d58b332 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbfitting.code.tex @@ -0,0 +1,397 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbfitting.code.tex: Code for fit boxes +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +%\makeatletter +\tcb@set@library@version{4.14} + +\newdimen\tcbfitdim +\newdimen\tcb@lowerfitdim +\newdimen\tcb@upperfitdim +\newif\iftcb@continue + +\tcbset{% + fit/.style={capture=fitbox},% + fit to/.style args={#1 and #2}{capture=fitbox,width=#1,height=#2},% + fit to height/.style={capture=fitbox,height=#1},% + fit basedim/.code={\def\kvtcb@fit@basedim{#1}\tcbfitdim\kvtcb@fit@basedim},% + fit skip/.store in=\kvtcb@fit@skip,% + fit fontsize macros/.code={% + \renewcommand\tiny{\tcb@setfontsize\tiny{0.5}}% + \renewcommand\scriptsize{\tcb@setfontsize\scriptsize{0.7}}% + \renewcommand\footnotesize{\tcb@setfontsize\footnotesize{0.8}}% + \renewcommand\small{\tcb@setfontsize\small{0.9}}% + \renewcommand\normalsize{\tcb@setfontsize\normalsize{1}}% + \renewcommand\large{\tcb@setfontsize\large{1.2}}% + \renewcommand\Large{\tcb@setfontsize\Large{1.44}}% + \renewcommand\LARGE{\tcb@setfontsize\LARGE{1.728}}% + \renewcommand\huge{\tcb@setfontsize\huge{2.0736}}% + \renewcommand\Huge{\tcb@setfontsize\Huge{2.48832}}},% + fit height plus/.style={fit,height plus=#1},% + fit width plus/.dimstore in=\kvtcb@fit@plus@width,% + fit height from/.style args={#1 to #2}{fit,height from={#1} to {#2}}, + fit width from/.style args={#1 to #2}{fit,width={#1},fit width plus={#2-#1}}, + fit maxstep/.store in=\kvtcb@fit@maxstep,% + fit maxfontdiff/.store in=\kvtcb@fit@maxfontdiff,% + fit maxfontdiffgap/.store in=\kvtcb@fit@maxfontdiffgap,% + fit maxwidthdiff/.store in=\kvtcb@fit@maxwidthdiff,% + fit maxwidthdiffgap/.store in=\kvtcb@fit@maxwidthdiffgap,% + fit warning/.is choice, + fit warning/on/.code={\let\tcb@fit@warn@begin=\@empty% + \let\tcb@fit@warn@end=\@empty}, + fit warning/off/.code={\def\tcb@fit@warn@begin{\hbadness=10000\relax}% + \let\tcb@fit@warn@end=\@empty}, + fit warning/final/.code={\tcb@cur@hbadness=\hbadness\def\tcb@fit@warn@begin{\hbadness=10000\relax}% + \def\tcb@fit@warn@end{\hbadness=\tcb@cur@hbadness\relax\tcb@fit@@box}}, + fit algorithm/.is choice, + fit algorithm/fontsize/.code={\let\tcbox@fitalgorithm=\tcbox@fitalgorithm@fontsize}, + fit algorithm/fontsize*/.code={\let\tcbox@fitalgorithm=\tcbox@fitalgorithm@fontsize@star}, + fit algorithm/areasize/.code={\let\tcbox@fitalgorithm=\tcbox@fitalgorithm@areasize}, + fit algorithm/areasize*/.code={\let\tcbox@fitalgorithm=\tcbox@fitalgorithm@areasize@star}, + fit algorithm/hybrid/.code={\let\tcbox@fitalgorithm=\tcbox@fitalgorithm@hybrid}, + fit algorithm/hybrid*/.code={\let\tcbox@fitalgorithm=\tcbox@fitalgorithm@hybrid@star}, + fit algorithm/squeeze/.code={\let\tcbox@fitalgorithm=\tcbox@fitalgorithm@squeeze}, + spartan@fit/.style={fit algorithm=squeeze}, +} + +\def\tcb@@capture@fitbox{% + \let\endtcolorbox=\relax% + \Collect@Body\tcbox@inner@fitbox@collected% +} + +\def\tcbfontsize#1{\fontsize{#1\tcbfitdim}{#1\dimexpr\kvtcb@fit@skip\tcbfitdim}\selectfont} + +\def\tcb@setfontsize#1#2{\@setfontsize#1{#2\tcbfitdim}{#2\dimexpr\kvtcb@fit@skip\tcbfitdim}} + +\long\def\tcbox@inner@fitbox@collected#1{% + \tcbox@inner@fitbox{#1}% + \tcb@finalize@environment% +} + +\newcount\tcb@cur@hbadness + +\def\tcbox@fitalgorithm@fontsize{% + \tcb@continuetrue% + \loop% + \tcbfitdim.5\tcbfitdim% + \tcb@fit@@box% + \ifnum\count@=\kvtcb@fit@maxstep\relax% + \tcb@continuefalse% + \else% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \ifdim\tcbfitdim<18000sp\relax% + \count@\kvtcb@fit@maxstep\relax% + \tcb@continuefalse% + \fi% + \else% + \tcb@continuefalse% + \fi% + \fi% + \iftcb@continue \repeat% + \ifnum\count@<\kvtcb@fit@maxstep\relax% + \tcbdimto\tcb@fit@@gap{\tcb@fit@@target-\tcb@fit@@h}% + \tcb@lowerfitdim\tcbfitdim% + \tcb@upperfitdim2\tcbfitdim% + \tcbfitdim1.5\tcbfitdim% + \loop% + \tcb@fit@@box% + \tcb@continuetrue% + \ifnum\count@<\kvtcb@fit@maxstep\relax% + \ifdim\dimexpr\tcb@upperfitdim-\tcb@lowerfitdim<\kvtcb@fit@maxfontdiff\relax% + \tcb@continuefalse% + \else% + \ifdim\dimexpr\tcb@upperfitdim-\tcb@lowerfitdim<\kvtcb@fit@maxfontdiffgap\relax% + \ifdim\dimexpr\tcb@fit@@gap<\tcb@fit@@line\relax% + \tcb@continuefalse% + \fi% + \fi% + \fi% + \else% + \tcb@continuefalse% + \fi% + \iftcb@continue% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \tcb@upperfitdim\tcbfitdim% + \advance\tcbfitdim\tcb@lowerfitdim% + \tcbfitdim0.5\tcbfitdim% + \else% + \tcbdimto\tcb@fit@@gap{\tcb@fit@@target-\tcb@fit@@h}% + \tcb@lowerfitdim\tcbfitdim% + \advance\tcbfitdim\tcb@upperfitdim% + \tcbfitdim0.5\tcbfitdim% + \fi% + \else% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \tcbfitdim\tcb@lowerfitdim% + \tcb@fit@@box% + \fi% + \fi% + \iftcb@continue \repeat% + \fi% +} + +\def\tcbox@fitalgorithm@fontsize@star{% + \tcbox@fitalgorithm@fontsize% + \tcb@resize@box{\tcb@upperbox}{\tcb@w@upper}{\tcb@fit@@target}% + \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% +} + +\def\tcbox@fitalgorithm@areasize@core{% + \pgfmathdivide{\tcb@fit@@h}{\tcb@fit@@target}% + \pgfmathsqrt{\pgfmathresult}% + \let\tcb@temp=\pgfmathresult% + \tcbdimto\tcb@w@upper@temp{\pgfmathresult\dimexpr\tcb@w@upper}% + \tcb@fit@@boxsave{\tcb@w@upper@temp}% + % + \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% + \pgfmathdivide{\tcb@fit@@h}{\tcb@fit@@target}% + \pgfmathdivide{\pgfmathresult}{\tcb@temp}% + \pgfmathsqrt{\pgfmathresult}% + \ifdim\dimexpr\pgfmathresult pt<0.98pt\relax + \tcbdimto\tcb@w@upper@temp{\pgfmathresult\dimexpr\tcb@w@upper@temp}% + \tcb@fit@@boxsave{\tcb@w@upper@temp}% + \else\ifdim\dimexpr\pgfmathresult pt>1.02pt\relax + \tcbdimto\tcb@w@upper@temp{\pgfmathresult\dimexpr\tcb@w@upper@temp}% + \tcb@fit@@boxsave{\tcb@w@upper@temp}% + \fi\fi% + % + \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% +} + +\def\tcbox@fitalgorithm@areasize{% + \tcbox@fitalgorithm@areasize@core% + \pgfmathdivide{\tcb@w@upper}{\tcb@w@upper@temp}% + \tcbdimto\tcb@fit@@h{\pgfmathresult\dimexpr\tcb@fit@@h}% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \let\tcb@fit@@h=\tcb@fit@@target% + \fi + \tcb@resize@box{\tcb@upperbox}{\tcb@w@upper}{\tcb@fit@@h}% + % + \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% +} + +\def\tcbox@fitalgorithm@areasize@star{% + \tcbox@fitalgorithm@areasize@core% + \tcb@resize@box{\tcb@upperbox}{\tcb@w@upper}{\tcb@fit@@target}% + \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% +} + +\def\tcbox@fitalgorithm@squeeze{% + \tcb@resize@box{\tcb@upperbox}{\tcb@w@upper}{\tcb@fit@@target}% + \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% +} + +\def\tcbox@fitalgorithm@hybrid@core{% + \pgfmathdivide{\tcb@fit@@target}{\tcb@fit@@h}% + \pgfmathsqrt{\pgfmathresult}% + \tcbfitdim=\pgfmathresult\tcbfitdim% + \tcb@fit@@box% + % + \pgfmathdivide{\tcb@fit@@target}{\tcb@fit@@h}% + \pgfmathsqrt{\pgfmathresult}% + \ifdim\dimexpr\pgfmathresult pt<0.85pt\relax + \tcbfitdim=\pgfmathresult\tcbfitdim% + \tcb@fit@@box% + \else\ifdim\dimexpr\pgfmathresult pt>1.15pt\relax + \tcbfitdim=\pgfmathresult\tcbfitdim% + \tcb@fit@@box% + \fi\fi% +} + +\def\tcbox@fitalgorithm@hybrid{% + \tcbox@fitalgorithm@hybrid@core% + \tcbox@fitalgorithm@areasize% +} + +\def\tcbox@fitalgorithm@hybrid@star{% + \tcbox@fitalgorithm@hybrid@core% + \tcbox@fitalgorithm@areasize@star% +} + +\def\tcb@fit@@box{% + \iftcb@hasTitle% + \tcbdimto\tcb@w@title{\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)}% + \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\color{tcbcol@title}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@before@title\kvtcb@title\kvtcb@after@title\end{tcb@savebox}% + \tcbdimto\tcb@h@titletotal{\ht\tcb@titlebox+\dp\tcb@titlebox+\kvtcb@title@rule+(\kvtcb@boxsep)*2+\kvtcb@toptitle+\kvtcb@bottomtitle}% + \else% + \let\tcb@h@titletotal=\tcb@zpt% + \fi% + \tcbdimto\tcb@fit@@line{\kvtcb@fit@skip\tcbfitdim}% + \tcbdimto\tcb@w@upper{\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@leftupper)-(\kvtcb@rightupper)}% + \tcb@fit@@boxsave{\tcb@w@upper}% + \tcbdimto\tcb@fit@@h{\ht\tcb@upperbox+\dp\tcb@upperbox}% + \tcbdimto\tcb@fit@@target{\kvtcb@height@fixed-(\kvtcb@top@rule@stand)-(\kvtcb@bottom@rule@stand)-(\kvtcb@top)-(\kvtcb@bottom)-(\kvtcb@boxsep)*2-\tcb@h@titletotal}% +}% + +\long\def\tcbox@inner@fitbox#1{% + \tcbset{breakable@false,sidebyside=false}% + \let\tcb@space\tcb@zpt% + \let\tcb@val@raisebase=\tcb@zpt% + \unless\ifdefined\kvtcb@height@fixed% + \tcbset{height=\kvtcb@width}% + \fi% + \tcb@hasLowerfalse% + % + \count@\z@% + \tcbfitdim\kvtcb@fit@basedim% + \tcb@fit@warn@begin% + % + \def\tcb@fit@@boxsave##1{% + \tcbdimto\tcb@innerwidth{\kvtcb@width-\kvtcb@left@rule-\kvtcb@right@rule}% + \colorlet{tcbcol@origin}{.}% + \tcb@set@color{tcbcol@upper}% + \begin{tcb@savebox}{\tcb@upperbox}{##1}% + \kvtcb@fontupper\fontsize{\tcbfitdim}{\tcb@fit@@line}\selectfont% + \kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\ifvmode\else\unskip\fi\kvtcb@after@upper% + \end{tcb@savebox}% + \tcb@reset@color% + \advance\count@ 1\relax% + }% + % + \tcb@set@@phantom% + \tcb@set@@title% + \tcb@fit@@box% + % + % height fit + \ifdim\kvtcb@height@fixed@plus>0pt\relax% + \let\tcb@fit@@minheight=\kvtcb@height@fixed% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \ifdim\dimexpr\tcb@fit@@h>\dimexpr\tcb@fit@@target+\kvtcb@height@fixed@plus\relax% + \tcbdimto\kvtcb@height@fixed{\kvtcb@height@fixed+\kvtcb@height@fixed@plus}% + \tcbdimto\tcb@fit@@target{\tcb@fit@@target+\kvtcb@height@fixed@plus}% + \else% + \tcbdimto\kvtcb@height@fixed{\kvtcb@height@fixed+\tcb@fit@@h-\tcb@fit@@target}% + \let\tcb@fit@@target=\tcb@fit@@h% + \fi% + \fi% + \fi% + % + % width fit + \ifdim\kvtcb@fit@plus@width>0pt\relax% + \ifnum\count@<\kvtcb@fit@maxstep\relax% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \tcb@lowerfitdim\dimexpr\kvtcb@width\relax% + \tcb@upperfitdim\dimexpr\kvtcb@width+\kvtcb@fit@plus@width\relax% + \tcbdimto\kvtcb@width{\tcb@upperfitdim}% + \tcb@fit@@box% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \else% + \ifnum\count@<\kvtcb@fit@maxstep\relax% + \tcbdimto\tcb@fit@@gap{\tcb@fit@@target-\tcb@fit@@h}% + \tcbdimto\kvtcb@width{(\tcb@lowerfitdim+\tcb@upperfitdim)/2}% + \loop% + \tcb@fit@@box% + \tcb@continuetrue% + \ifnum\count@<\kvtcb@fit@maxstep\relax% + \ifdim\dimexpr\tcb@upperfitdim-\tcb@lowerfitdim<\kvtcb@fit@maxwidthdiff\relax% + \tcb@continuefalse% + \else% + \ifdim\dimexpr\tcb@upperfitdim-\tcb@lowerfitdim<\kvtcb@fit@maxwidthdiffgap\relax% + \ifdim\dimexpr\tcb@fit@@gap<\tcb@fit@@line\relax% + \tcb@continuefalse% + \fi% + \fi% + \fi% + \else% + \tcb@continuefalse% + \fi% + \iftcb@continue% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \tcb@lowerfitdim\dimexpr\kvtcb@width\relax% + \tcbdimto\kvtcb@width{(\tcb@lowerfitdim+\tcb@upperfitdim)/2}% + \else% + \tcb@upperfitdim\dimexpr\kvtcb@width\relax% + \tcbdimto\tcb@fit@@gap{\tcb@fit@@target-\tcb@fit@@h}% + \tcbdimto\kvtcb@width{(\tcb@lowerfitdim+\tcb@upperfitdim)/2}% + \fi% + \else% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \tcbdimto\kvtcb@width{\tcb@upperfitdim}% + \tcb@fit@@box% + \fi% + \fi% + \iftcb@continue \repeat% + \fi% + \fi% + \fi% + \fi% + \fi% + % + % (font) fit + \ifnum\count@<\kvtcb@fit@maxstep\relax% + \ifdim\dimexpr\tcb@fit@@h>\tcb@fit@@target\relax% + \tcbox@fitalgorithm% + \fi% + \fi% + % + \tcb@fit@warn@end% + % + % last height fit + \ifdim\kvtcb@height@fixed@plus>0pt\relax% + \ifdim\dimexpr\tcb@fit@@h<\tcb@fit@@target\relax% + \tcbdimto\tcb@temp{\kvtcb@height@fixed+\tcb@fit@@h-\tcb@fit@@target}% + \ifdim\dimexpr\tcb@temp<\tcb@fit@@minheight\relax% + \else% + \let\kvtcb@height@fixed=\tcb@temp% + \fi% + \fi% + \fi% + % + \edef\tcbfitsteps{\the\count@}% + \tcb@set@@dimensions% + \tcb@draw@color@box% +} + +\newcommand{\tcboxfit}[2][]{% + \tcb@ox{capture=fitbox,#1}{#2}% +} + +\long\def\tcb@newtcboxfit#1#2{\expandafter\tcb@newcommand\csname#1\endcsname{\tcboxfit[#2,options@for=#1]}} + +\long\def\tcb@newtcboxfit@#1[#2]#3{\expandafter\tcb@newcommand\csname#1\endcsname[#2]{\tcboxfit[#3,options@for=#1]}} + +\long\def\tcb@newtcboxfit@@#1[#2][#3]#4{\expandafter\tcb@newcommand\csname#1\endcsname[#2][#3]{\tcboxfit[#4,options@for=#1]}} + +\long\def\tcb@new@tcboxfit@#1[#2]{% + \@ifnextchar[{\tcb@newtcboxfit@@{#1}[#2]}{\tcb@newtcboxfit@{#1}[#2]}} + +\long\def\tcb@new@tcboxfit#1{% + \@ifnextchar[{\tcb@new@tcboxfit@{#1}}{\tcb@newtcboxfit{#1}}} + +\def\newtcboxfit{% + \let\tcb@newcommand\newcommand% + \let\tcb@process@newtcolorbox@continue\tcb@new@tcboxfit% + \tcb@process@newcommand} + +\def\renewtcboxfit{% + \let\tcb@newcommand\renewcommand% + \let\tcb@process@newtcolorbox@continue\tcb@new@tcboxfit% + \tcb@process@newcommand} + +\tcbset{% + reset@fitting/.style={% + fit algorithm=fontsize,% + fit basedim=10pt,fit skip=1.2, + height plus=0pt,fit width plus=0pt, + fit maxstep=20,fit maxfontdiff=0.1pt,fit maxfontdiffgap=1pt, + fit maxwidthdiff=1pt,fit maxwidthdiffgap=10pt, + fit warning=off + }, + initialize@reset=reset@fitting, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbhooks.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbhooks.code.tex new file mode 100644 index 0000000..5414137 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbhooks.code.tex @@ -0,0 +1,123 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbhooks.code.tex: Code for adding hooks +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +%\makeatletter +\tcb@set@library@version{4.14} + +\tcbset{% + before upper app/.code={\appto\kvtcb@before@upper{#1}},% + before upper pre/.code={\preto\kvtcb@before@upper{#1}},% + after upper app/.code={\appto\kvtcb@after@upper{#1}},% + after upper pre/.code={\preto\kvtcb@after@upper{#1}},% + before lower app/.code={\appto\kvtcb@before@lower{#1}},% + before lower pre/.code={\preto\kvtcb@before@lower{#1}},% + after lower app/.code={\appto\kvtcb@after@lower{#1}},% + after lower pre/.code={\preto\kvtcb@after@lower{#1}},% + before title app/.code={\appto\kvtcb@before@title{#1}},% + before title pre/.code={\preto\kvtcb@before@title{#1}},% + after title app/.code={\appto\kvtcb@after@title{#1}},% + after title pre/.code={\preto\kvtcb@after@title{#1}},% + % + % usable inside the document or in the preamble after setting before / after + before app/.code={\appto\kvtcb@beforebox{#1}},% + before pre/.code={\preto\kvtcb@beforebox{#1}},% + after app/.code={\appto\kvtcb@afterbox{#1}},% + after pre/.code={\preto\kvtcb@afterbox{#1}},% + % + overlay unbroken app/.code={\appto\tcb@overlay@unbroken{#1}},% + overlay unbroken pre/.code={\preto\tcb@overlay@unbroken{#1}},% + overlay first app/.code={\appto\tcb@overlay@first{#1}},% + overlay first pre/.code={\preto\tcb@overlay@first{#1}},% + overlay middle app/.code={\appto\tcb@overlay@middle{#1}},% + overlay middle pre/.code={\preto\tcb@overlay@middle{#1}},% + overlay last app/.code={\appto\tcb@overlay@last{#1}},% + overlay last pre/.code={\preto\tcb@overlay@last{#1}},% + % + overlay app/.style={overlay unbroken app={#1},overlay first app={#1},overlay middle app={#1},overlay last app={#1}},% + overlay pre/.style={overlay unbroken pre={#1},overlay first pre={#1},overlay middle pre={#1},overlay last pre={#1}},% + overlay broken app/.style={overlay first app={#1},overlay middle app={#1},overlay last app={#1}},% + overlay broken pre/.style={overlay first pre={#1},overlay middle pre={#1},overlay last pre={#1}},% + overlay unbroken and first app/.style={overlay unbroken app={#1},overlay first app={#1}},% + overlay unbroken and first pre/.style={overlay unbroken pre={#1},overlay first pre={#1}},% + overlay unbroken and last app/.style={overlay unbroken app={#1},overlay last app={#1}},% + overlay unbroken and last pre/.style={overlay unbroken pre={#1},overlay last pre={#1}},% + overlay middle and last app/.style={overlay middle app={#1},overlay last app={#1}},% + overlay middle and last pre/.style={overlay middle pre={#1},overlay last pre={#1}},% + overlay first and middle app/.style={overlay first app={#1},overlay middle app={#1}},% + overlay first and middle pre/.style={overlay first pre={#1},overlay middle pre={#1}},% + % + % skins: + frame code app/.code={\appto\tcb@frame@code{#1}},% + frame code pre/.code={\preto\tcb@frame@code{#1}},% + interior titled code app/.code={\appto\tcb@interiortitled@code{#1}},% + interior titled code pre/.code={\preto\tcb@interiortitled@code{#1}},% + interior code app/.code={\appto\tcb@interior@code{#1}},% + interior code pre/.code={\preto\tcb@interior@code{#1}},% + segmentation code app/.code={\appto\tcb@segmentation@code{#1}},% + segmentation code pre/.code={\preto\tcb@segmentation@code{#1}},% + title code app/.code={\appto\tcb@title@code{#1}},% + title code pre/.code={\preto\tcb@title@code{#1}},% + % + extras unbroken pre/.code={\preto\tcb@extras@unbroken{#1}},% + extras first pre/.code={\preto\tcb@extras@first{#1}},% + extras middle pre/.code={\preto\tcb@extras@middle{#1}},% + extras last pre/.code={\preto\tcb@extras@last{#1}},% + extras pre/.style={extras unbroken pre={#1},extras first pre={#1},extras middle pre={#1},extras last pre={#1}},% + extras broken pre/.style={extras first pre={#1},extras middle pre={#1},extras last pre={#1}},% + extras unbroken and first pre/.style={extras unbroken pre={#1},extras first pre={#1}},% + extras unbroken and last pre/.style={extras unbroken pre={#1},extras last pre={#1}},% + extras middle and last pre/.style={extras middle pre={#1},extras last pre={#1}},% + extras first and middle pre/.style={extras first pre={#1},extras middle pre={#1}},% + % + underlay unbroken pre/.code={\preto\tcb@underlay@unbroken{#1}},% + underlay first pre/.code={\preto\tcb@underlay@first{#1}},% + underlay middle pre/.code={\preto\tcb@underlay@middle{#1}},% + underlay last pre/.code={\preto\tcb@underlay@last{#1}},% + underlay boxed title pre/.code={\preto\tcb@underlay@boxedtitle{#1}},% + underlay pre/.style={underlay unbroken pre={#1},underlay first pre={#1},underlay middle pre={#1},underlay last pre={#1}},% + underlay broken pre/.style={underlay first pre={#1},underlay middle pre={#1},underlay last pre={#1}},% + underlay unbroken and first pre/.style={underlay unbroken pre={#1},underlay first pre={#1}},% + underlay unbroken and last pre/.style={underlay unbroken pre={#1},underlay last pre={#1}},% + underlay middle and last pre/.style={underlay middle pre={#1},underlay last pre={#1}},% + underlay first and middle pre/.style={underlay first pre={#1},underlay middle pre={#1}},% + finish unbroken pre/.code={\preto\tcb@finish@unbroken{#1}},% + finish first pre/.code={\preto\tcb@finish@first{#1}},% + finish middle pre/.code={\preto\tcb@finish@middle{#1}},% + finish last pre/.code={\preto\tcb@finish@last{#1}},% + finish pre/.style={finish unbroken pre={#1},finish first pre={#1},finish middle pre={#1},finish last pre={#1}},% + finish broken pre/.style={finish first pre={#1},finish middle pre={#1},finish last pre={#1}},% + finish unbroken and first pre/.style={finish unbroken pre={#1},finish first pre={#1}},% + finish unbroken and last pre/.style={finish unbroken pre={#1},finish last pre={#1}},% + finish middle and last pre/.style={finish middle pre={#1},finish last pre={#1}},% + finish first and middle pre/.style={finish first pre={#1},finish middle pre={#1}},% + % + watermark tikz app/.style={overlay app={\tcb@drawspec@watermark@tikz{#1}}}, + watermark tikz pre/.style={overlay pre={\tcb@drawspec@watermark@tikz{#1}}}, + watermark tikz app on/.style args={#1 is #2}{overlay #1 app={\tcb@drawspec@watermark@tikz{#2}}},% + watermark tikz pre on/.style args={#1 is #2}{overlay #1 pre={\tcb@drawspec@watermark@tikz{#2}}},% + watermark graphics app/.style={overlay app={\tcb@drawspec@watermark@graphics{#1}}}, + watermark graphics pre/.style={overlay pre={\tcb@drawspec@watermark@graphics{#1}}}, + watermark graphics app on/.style args={#1 is #2}{overlay #1 app={\tcb@drawspec@watermark@graphics{#2}}}, + watermark graphics pre on/.style args={#1 is #2}{overlay #1 pre={\tcb@drawspec@watermark@graphics{#2}}}, + watermark text app/.style={overlay app={\tcb@drawspec@watermark@text{#1}}}, + watermark text pre/.style={overlay pre={\tcb@drawspec@watermark@text{#1}}}, + watermark text app on/.style args={#1 is #2}{overlay #1 app={\tcb@drawspec@watermark@text{#2}}}, + watermark text pre on/.style args={#1 is #2}{overlay #1 pre={\tcb@drawspec@watermark@text{#2}}}, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcblistings.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcblistings.code.tex new file mode 100644 index 0000000..443b9cf --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcblistings.code.tex @@ -0,0 +1,97 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcblistings.code.tex: Code for colorboxes with listings +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +%\makeatletter +\tcb@set@library@version{4.14} + +\RequirePackage{listings}[2007/02/22] + +\tcbuselibrary{listings@core} + +\let\tcb@listing@MakeCaption@org=\lst@MakeCaption + +\def\tcb@listing@set@MakeCaption@org{% + \let\lst@MakeCaption\tcb@listing@MakeCaption@org} +\def\tcb@listing@set@MakeCaption@empty{% + \lst@HRefStepCounter{lstlisting}% + \let\lst@MakeCaption\@gobble} + +\lstdefinestyle{tcblatex}{language={[LaTeX]TeX}, + aboveskip={0\p@ \@plus 6\p@}, belowskip={0\p@ \@plus 6\p@}, + columns=fullflexible, keepspaces=true, + breaklines=true, breakatwhitespace=true, + basicstyle=\ttfamily\small, extendedchars=true, nolol, + inputencoding=\kvtcb@listingencoding} + +\def\tcb@listing@input@listing#1#2{% + \begingroup% + \toks@=\expandafter{#1}% + \edef\tcb@temp{\noexpand\lstinputlisting[nolol,\the\toks@]}% + \tcb@listing@set@MakeCaption% + \tcb@temp{#2}% + \endgroup% +}% + + +\def\tcb@listing@uselistinglisting{% + \tcb@listing@input@listing{\kvtcb@listingoptions}{\kvtcb@listingfile}% +}% + +\def\tcb@listing@usetemplisting{% + \tcb@listing@input@listing{\kvtcb@listingoptions}{\kvtcb@tempfile}% +}% + +\def\tcb@listing@doc@usetemplisting{% + \tcb@listing@input@listing{\kvtcb@doclistingoptions}{\kvtcb@tempfile}% +} + +\tcbset{% + listing options/.store in=\kvtcb@listingoptions,% + listing style/.style={listing options={style=#1}},% + no listing options/.style={listing options=},% + listing inputencoding/.store in=\kvtcb@listingencoding,% + listing remove caption/.is choice, + listing remove caption/true/.code={\let\tcb@listing@set@MakeCaption\tcb@listing@set@MakeCaption@empty}, + listing remove caption/false/.code={\let\tcb@listing@set@MakeCaption\tcb@listing@set@MakeCaption@org}, + listing remove caption/.default=true, + listing engine/listings/.code={\let\tcbuselistinglisting\tcb@listing@uselistinglisting% + \let\tcbusetemplisting\tcb@listing@usetemplisting% + \let\tcb@doc@usetemplisting\tcb@listing@doc@usetemplisting}, + every listing line/.code={% + \def\lst@NewLine{% + \ifx\lst@OutputBox\@gobble\else + \par\noindent \hbox{}#1% + \fi + \global\advance\lst@newlines\m@ne + \lst@newlinetrue}},% + every listing line*/.style={every listing line={#1},% + code={\setbox\z@=\hbox{#1}\tcbdimto\kvtcb@rightupper{\kvtcb@rightupper+\wd\z@}}},% +} + + +\tcbset{% + reset@listings/.style={% + listing style=tcblatex, + listing inputencoding=\inputencodingname, + listing remove caption, + listing engine=listings, + }, + initialize@reset=reset@listings, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcblistingscore.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcblistingscore.code.tex new file mode 100644 index 0000000..d4e55b9 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcblistingscore.code.tex @@ -0,0 +1,332 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcblistingscode.code.tex: Auxiliary code for colorboxes with listings +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +%\makeatletter +\tcb@set@library@version{4.14} + +\tcbuselibrary{pro@cessing} + +\def\tcbuselistingtext@input{\input{\kvtcb@listingfile}}% +\def\tcbuselistingtext{\tcbuselistingtext@input}% +\def\tcbuselistingcomment{\kvtcb@listingcomment}% +\def\tcb@listing@listing{\tcbuselistinglisting} + +\def\tcb@listing@listingAndOther{% + \tcbuselistinglisting% + \tcblower% + \tcb@use@listing@other% +} + +\def\tcb@listing@otherAndListing{% + \tcb@use@listing@other% + \tcblower% + \tcbuselistinglisting% +} + +\newenvironment{tcb@lower@outside}[1]{% + \tcbset{savedelimiter=tcb@lower@outside}\tcb@minipage{#1}% + \color{tcbcol@lower}\kvtcb@fontlower\kvtcb@halignlower\kvtcb@before@lower\ignorespaces}% + {\ifvmode\else\unskip\fi\kvtcb@after@lower\endminipage} + +\def\tcb@use@listing@other@reset{% + \tcbset{every box on layer 1/.style={reset,every box}}% + \tcb@use@listing@other} + +\def\tcb@use@lower@outside#1{% + \setbox\z@=\hbox{\begin{tcb@lower@outside}{#1}% + \tcb@use@listing@other@reset% + \end{tcb@lower@outside}}% + \tcbdimto{\tcb@temp@wd}{\wd\z@}% + \unhbox\z@% +} + +\def\tcb@inputlisting@out@otherAboveListing{% + {\kvtcb@beforebox}\noindent% + \iftcb@lowervisible% + \tcb@use@lower@outside{\kvtcb@width}% + \par\vskip-\parskip\vspace*{\kvtcb@middle}\noindent% + \fi% + \begin{tcolorbox}[before=,savedelimiter=tcolorbox]\tcbuselistinglisting\end{tcolorbox}% +} + +\def\tcb@inputlisting@out@otherAboveListing@Decoupled{% + \iftcb@lowervisible% + {\par\tcb@use@listing@other@reset\par}% + \fi% + \begin{tcolorbox}[savedelimiter=tcolorbox]\tcbuselistinglisting\end{tcolorbox}% +} + +\def\tcb@inputlisting@out@listingAboveOther{% + \begin{tcolorbox}[after=,savedelimiter=tcolorbox]\tcbuselistinglisting\end{tcolorbox}% + \iftcb@lowervisible\par\vskip-\parskip\vspace*{\kvtcb@middle}\noindent% + \tcb@use@lower@outside{\kvtcb@width}% + \fi% + {\kvtcb@afterbox}% +} + +\def\tcb@inputlisting@out@listingAboveOther@Decoupled{% + \begin{tcolorbox}[savedelimiter=tcolorbox]\tcbuselistinglisting\end{tcolorbox}% + \iftcb@lowervisible% + {\par\tcb@use@listing@other@reset\par}% + \fi% +} + + +\newenvironment{tcb@outside@environment}{% + \tcb@before@unbroken% + \begin{minipage}{\tcb@width}}% +{% + \end{minipage}% + \tcb@after@unbroken} + +\def\tcb@inputlisting@out@prepare{% + \tcbdimto\tcb@width{\kvtcb@width}% + \tcbdimto\tcb@innerwidth{\tcb@width-\kvtcb@left@rule-\kvtcb@right@rule}% + \tcbdimto\tcb@temp{\tcb@innerwidth-\kvtcb@boxsep*2}% + \tcbdimto\tcb@w@upper{\tcb@temp-\kvtcb@leftupper-\kvtcb@rightupper}% + \tcbset{breakable@false}% + \def\tcb@minipage{\csname tcb@minipage@\kvtcb@sbs@align\endcsname}% + \tcbdimto\tcb@w@upper@real{\tcb@w@upper}% + \tcbdimto\tcb@w@sbs{\tcb@w@upper@real-\kvtcb@sbs@gap}% + \tcb@sbs@quota% + \ifx\kvtcb@float\@empty% + \let\tcb@before@unbroken=\kvtcb@beforebox% + \let\tcb@after@unbroken=\kvtcb@afterbox% + \else% + \edef\tcb@before@unbroken{\noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]}% + \let\tcb@after@unbroken=\tcb@float@env@end% + \fi% +} + +\def\tcb@use@lower@outside@side#1{% + \setbox\z@=\hbox{\begin{tcb@lower@outside}{#1}% + \tcb@use@listing@other@reset% + \end{tcb@lower@outside}}% + \tcb@box@align\z@% + \tcbdimto{\tcb@temp@wd}{\wd\z@}% + \unhbox\z@% +} + +\def\tcb@inputlisting@out@listingAndOther{% + \tcb@inputlisting@out@prepare% + \tcbdimto\tcb@w@outside{\tcb@w@lower}% + \tcbdimto\tcb@w@inside{\tcb@width-\tcb@w@lower-\kvtcb@sbs@gap}% + \begin{tcb@outside@environment}% + \setbox\z@=\hbox{\tcb@minipage{\tcb@w@inside}% + \begin{tcolorbox}[width=\tcb@w@inside,nobeforeafter,nofloat,sidebyside=false,savedelimiter=tcolorbox]\tcbuselistinglisting\end{tcolorbox}% + \endminipage}% + \tcb@box@align\z@% + \unhbox\z@% + \kern\kvtcb@sbs@gap% + \iftcb@lowervisible% + \tcb@use@lower@outside@side{\tcb@w@outside}% + \fi% + \end{tcb@outside@environment}% +} + +\def\tcb@inputlisting@out@otherAndListing{% + \tcb@inputlisting@out@prepare% + \tcbdimto\tcb@w@outside{\tcb@w@upper}% + \tcbdimto\tcb@w@inside{\tcb@width-\tcb@w@upper-\kvtcb@sbs@gap}% + \begin{tcb@outside@environment}% + \iftcb@lowervisible% + \tcb@use@lower@outside@side{\tcb@w@outside}% + \tcbdimto{\tcb@temp@wd}{\tcb@w@outside-\tcb@temp@wd+\kvtcb@sbs@gap}% + \else% + \tcbdimto{\tcb@temp@wd}{\tcb@w@outside+\kvtcb@sbs@gap}% + \fi% + \kern\tcb@temp@wd% + \setbox\z@=\hbox{\tcb@minipage{\tcb@w@inside}% + \begin{tcolorbox}[width=\tcb@w@inside,nobeforeafter,nofloat,sidebyside=false,savedelimiter=tcolorbox]\tcbuselistinglisting\end{tcolorbox}% + \endminipage}% + \tcb@box@align\z@% + \unhbox\z@% + \end{tcb@outside@environment}% +} + +\def\tcb@inputlisting@inside{% + \begin{tcolorbox}[capture=\tcb@listing@capture,savedelimiter=tcolorbox]\tcb@listing@process\end{tcolorbox}% +} + +\long\def\tcb@run@system@command#1{% + \ifcase\pdf@shellescape\relax + \tcb@error{You must invoke LaTeX with the -shell-escape flag}{Pass the -shell-escape flag to LaTeX.}% + \or\or + \tcb@warning{System call with restricted shell escape may fail}% + \fi% + \ShellEscape{#1}% + \relax% +} + + +\tcbset{% + listing file/.store in=\kvtcb@listingfile,% + comment/.store in=\kvtcb@listingcomment,% + listing@process@inside/.code 2 args={% + \let\tcb@inputlisting\tcb@inputlisting@inside% + \let\tcb@listing@process=#1% + \let\tcb@use@listing@other=#2},% + listing@process@outside/.code 2 args={% + \let\tcb@inputlisting=#1% + \let\tcb@use@listing@other=#2},% + listing only/.style={listing@process@inside={\tcb@listing@listing}{\tcbuselistingtext}},% + text only/.style={listing@process@inside={\tcbuselistingtext}{\tcbuselistingtext}},% + comment only/.style={listing@process@inside={\tcbuselistingcomment}{\tcbuselistingcomment}},% + listing and text/.style={listing@process@inside={\tcb@listing@listingAndOther}{\tcbuselistingtext}},% + text and listing/.style={listing@process@inside={\tcb@listing@otherAndListing}{\tcbuselistingtext}},% + text above listing/.style={listing@process@outside={\tcb@inputlisting@out@otherAboveListing}{\tcbuselistingtext}},% + text above* listing/.style={listing@process@outside={\tcb@inputlisting@out@otherAboveListing@Decoupled}{\tcbuselistingtext}},% + listing above text/.style={listing@process@outside={\tcb@inputlisting@out@listingAboveOther}{\tcbuselistingtext}},% + listing above* text/.style={listing@process@outside={\tcb@inputlisting@out@listingAboveOther@Decoupled}{\tcbuselistingtext}},% + text outside listing/.style={listing@process@outside={\tcb@inputlisting@out@otherAndListing}{\tcbuselistingtext}},% + listing outside text/.style={listing@process@outside={\tcb@inputlisting@out@listingAndOther}{\tcbuselistingtext}},% + text side listing/.style={sidebyside,text and listing},% + listing side text/.style={sidebyside,listing and text},% + listing and comment/.style={listing@process@inside={\tcb@listing@listingAndOther}{\tcbuselistingcomment}},% + comment and listing/.style={listing@process@inside={\tcb@listing@otherAndListing}{\tcbuselistingcomment}},% + comment above listing/.style={listing@process@outside={\tcb@inputlisting@out@otherAboveListing}{\tcbuselistingcomment}},% + comment above* listing/.style={listing@process@outside={\tcb@inputlisting@out@otherAboveListing@Decoupled}{\tcbuselistingcomment}},% + listing above comment/.style={listing@process@outside={\tcb@inputlisting@out@listingAboveOther}{\tcbuselistingcomment}},% + listing above* comment/.style={listing@process@outside={\tcb@inputlisting@out@listingAboveOther@Decoupled}{\tcbuselistingcomment}},% + comment outside listing/.style={listing@process@outside={\tcb@inputlisting@out@otherAndListing}{\tcbuselistingcomment}},% + listing outside comment/.style={listing@process@outside={\tcb@inputlisting@out@listingAndOther}{\tcbuselistingcomment}},% + comment side listing/.style={sidebyside,comment and listing},% + listing side comment/.style={sidebyside,listing and comment},% + listing engine/.is choice,% + image comment/.style 2 args={comment={\includegraphics[#1]{#2}}},% + comment style/.store in=\kvtcb@commentstyle,% + tcbimage comment/.style={comment={\let\tcb@trans@commentstyle\kvtcb@commentstyle\tcbincludegraphics[code={\pgfkeysalsofrom\tcb@trans@commentstyle}]{#1}}}, + pdf extension/.store in=\kvtcb@pdf@extension,% + pdf comment/.style={comment={\let\tcb@trans@commentstyle\kvtcb@commentstyle\filename@parse{#1}\edef\tcb@trans@commentfile{\filename@area\filename@base.\kvtcb@pdf@extension}% + \begin{tcbraster}[raster halign=center,sharp corners,size=tight,colback=white,code={\pgfkeysalsofrom\tcb@trans@commentstyle}]\tcbincludepdf{\tcb@trans@commentfile}\end{tcbraster}}}, + pdf comment/.default={\kvtcb@listingfile}, + process code/.code={\appto\tcb@listing@process@hook{#1}},% + no process/.code={\def\tcb@listing@process@hook{}},% + compilable listing/.style={listing file={\jobname-listing-\thetcblistingcount.tex}}, + run system command/.style={process code={\tcb@run@system@command{#1}}},% + run@system@command/.style 2 args={run system command={#1\space#2\space\filename@area\filename@base}},% + run pdflatex/.style={run@system@command={pdflatex}{#1}},% + run xelatex/.style={run@system@command={xelatex}{#1}},% + run lualatex/.style={run@system@command={lualatex}{#1}},% + run makeindex/.style={run@system@command={makeindex}{#1}},% + run bibtex/.style={run@system@command={bibtex}{#1}},% + run biber/.style={run@system@command={biber}{#1}},% + run arara/.style={run@system@command={arara}{#1}},% + run latex/.style={run@system@command={latex}{#1}},% + run dvips/.style={run@system@command={dvips}{#1}},% + run ps2pdf/.style={run system command={ps2pdf\space#1\space\filename@area\filename@base.ps}},% + freeze file/.code={\def\tcbprocess@condition{1}\def\tcbprocess@target{#1}},% + freeze none/.code={\def\tcbprocess@condition{0}\def\tcbprocess@target{}},% + freeze extension/.style={freeze file={\filename@area\filename@base#1}},% + freeze pdf/.style={freeze extension={.pdf}}, + freeze png/.style={freeze extension={.png}}, + freeze jpg/.style={freeze extension={.jpg}}, +} + +\def\tcb@listing@process@core{% + \filename@parse{\kvtcb@listingfile}% + \tcbiffileprocess{\tcbprocess@condition}% + {\kvtcb@listingfile}{\filename@area\filename@base.md5}{\tcbprocess@target}% + {\tcb@listing@process@hook}{}% +} + +\def\tcbinputlisting@core{% + \ifdefempty\tcb@listing@process@hook{}{\tcb@listing@process@core}% + \let\tcb@listing@capture=\kvtcb@capture% + \tcb@inputlisting% +} + +\newcounter{tcblisting} + +\newenvironment{tcblisting}[1]{% + \stepcounter{tcblisting}\edef\thetcblistingcount{\thetcblisting}% + \tcb@layer@pushup% + \tcb@apply@box@options{capture=minipage,#1}% + \begingroup\tcbverbatimwrite{\kvtcb@listingfile}% +}{\endtcbverbatimwrite\endgroup% + \tcbinputlisting@core% +} + +\long\def\tcbinputlisting#1{% + \begingroup% + \stepcounter{tcblisting}\edef\thetcblistingcount{\thetcblisting}% + \tcb@layer@pushup% + \tcb@apply@box@options{capture=minipage,#1}% + \tcbinputlisting@core% + \endgroup% +} + +\newenvironment{tcboutputlisting}{% + \begingroup\tcbverbatimwrite{\kvtcb@listingfile}% +}{\endtcbverbatimwrite\endgroup} + +\long\def\tcb@newtcblisting#1#2{\tcb@newenvironment{#1}{\tcblisting{#2,options@for=#1}}{\endtcblisting}} + +\long\def\tcb@newtcblisting@#1[#2]#3{\tcb@newenvironment{#1}[#2]{\tcblisting{#3,options@for=#1}}{\endtcblisting}} + +\long\def\tcb@newtcblisting@@#1[#2][#3]#4{\tcb@newenvironment{#1}[#2][#3]{\tcblisting{#4,options@for=#1}}{\endtcblisting}} + +\long\def\tcb@new@tcblisting@#1[#2]{% + \@ifnextchar[{\tcb@newtcblisting@@{#1}[#2]}{\tcb@newtcblisting@{#1}[#2]}} + +\def\tcb@new@tcblisting#1{% + \@ifnextchar[{\tcb@new@tcblisting@{#1}}{\tcb@newtcblisting{#1}}} + +\def\newtcblisting{% + \let\tcb@newenvironment\newenvironment% + \let\tcb@process@newtcolorbox@continue\tcb@new@tcblisting% + \tcb@process@newenvironment} + +\def\renewtcblisting{% + \let\tcb@newenvironment\renewenvironment% + \let\tcb@process@newtcolorbox@continue\tcb@new@tcblisting% + \tcb@process@newenvironment} + +\long\def\tcb@newtcbinputlisting#1#2{\expandafter\tcb@newcommand\csname#1\endcsname{\tcbinputlisting{#2,options@for=#1}}} + +\long\def\tcb@newtcbinputlisting@#1[#2]#3{\expandafter\tcb@newcommand\csname#1\endcsname[#2]{\tcbinputlisting{#3,options@for=#1}}} + +\long\def\tcb@newtcbinputlisting@@#1[#2][#3]#4{\expandafter\tcb@newcommand\csname#1\endcsname[#2][#3]{\tcbinputlisting{#4,options@for=#1}}} + +\long\def\tcb@new@tcbinputlisting@#1[#2]{% + \@ifnextchar[{\tcb@newtcbinputlisting@@{#1}[#2]}{\tcb@newtcbinputlisting@{#1}[#2]}} + +\def\tcb@new@tcbinputlisting#1{% + \@ifnextchar[{\tcb@new@tcbinputlisting@{#1}}{\tcb@newtcbinputlisting{#1}}} + +\def\newtcbinputlisting{% + \let\tcb@newcommand\newcommand% + \let\tcb@process@newtcolorbox@continue\tcb@new@tcbinputlisting% + \tcb@process@newcommand} + +\def\renewtcbinputlisting{% + \let\tcb@newcommand\renewcommand% + \let\tcb@process@newtcolorbox@continue\tcb@new@tcbinputlisting% + \tcb@process@newcommand} + +\tcbset{% + reset@listingscore/.style={% + listing file=\jobname.listing, + comment=, listing and text, + no process,freeze none, + comment style=,pdf extension=pdf, + }, + initialize@reset=reset@listingscore, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcblistingsutf8.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcblistingsutf8.code.tex new file mode 100644 index 0000000..01338e4 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcblistingsutf8.code.tex @@ -0,0 +1,33 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcblistingsutf8.code.tex: Code for colorboxes with listings in UTF-8 +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\RequirePackage{listingsutf8}[2011/11/10] +\tcbuselibrary{listings} + +\tcbset{ + listing utf8/.style={listing inputencoding=utf8/#1}, +} + +\tcbset{% + reset@listingsutf8/.style={listing utf8=latin1}, + initialize@reset=reset@listingsutf8, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbmagazine.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbmagazine.code.tex new file mode 100644 index 0000000..2fc916c --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbmagazine.code.tex @@ -0,0 +1,185 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbmagazine.code.tex: Code for box sets and magazine styles +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\tcbuselibrary{breakable} + +\def\newboxarray#1{% + \ifcsdef{tcb@boxarray@#1@allocated}{% + \tcb@warning{box array '#1' is allocated again by \string\newboxarray. Memory and registers are wasted}% + }{}% + \global\csdef{tcb@boxarray@#1@size}{0}% + \global\csdef{tcb@boxarray@#1@allocated}{0}% +} + +\newboxarray{default} + +\newrobustcmd*{\boxarraygetsize}[2][default]{% + \letcs#2{tcb@boxarray@#1@size}% + \ifdef{#2}{}{% + \tcb@error{undefined box array '#1'}% + {You have to say \string\newboxarray{#1}, before '#1' can be used as box array.}% + }% +} + +\newrobustcmd*{\boxarrayreset}[1][default]{% + \boxarraygetsize[#1]\tcb@box@array@size% + \global\csdef{tcb@boxarray@#1@size}{0}% +} + +\newrobustcmd*{\boxarrayclear}[1][default]{% + \boxarraygetsize[#1]\tcb@box@array@size% + \global\csdef{tcb@boxarray@#1@size}{0}% + \letcs\tcb@box@array@allocated{tcb@boxarray@#1@allocated}% + \begingroup% + \count@=0% + \loop% + \ifnum\count@<\tcb@box@array@allocated\relax% + \advance\count@ 1\relax% + \letcs\tcb@box@array@box{tcb@boxarray@#1@\number\count@ @box}% + \setbox0=\box\tcb@box@array@box% + \repeat% + \endgroup% +} + +\newrobustcmd*{\boxarraygetbox}[3][default]{% + \boxarraygetsize[#1]\tcb@box@array@size% + \let#2\@undefined% + \ifnum\numexpr#3>0\relax% + \ifnum\numexpr#3>\tcb@box@array@size\relax% + \else% + \letcs#2{tcb@boxarray@#1@#3@box}% + \fi% + \fi% +} + +\newrobustcmd*{\boxarraygetwidth}[3][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#3}% + \ifdefined\tcb@box@array@box% + \tcbdimto#2{\wd\tcb@box@array@box}% + \else% + \let#2\tcb@zpt% + \fi% +} + +\newrobustcmd*{\boxarraygetheight}[3][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#3}% + \ifdefined\tcb@box@array@box% + \tcbdimto#2{\ht\tcb@box@array@box}% + \else% + \let#2\tcb@zpt% + \fi% +} + +\newrobustcmd*{\boxarraygetdepth}[3][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#3}% + \ifdefined\tcb@box@array@box% + \tcbdimto#2{\dp\tcb@box@array@box}% + \else% + \let#2\tcb@zpt% + \fi% +} + +\newrobustcmd*{\boxarraygettotalheight}[3][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#3}% + \ifdefined\tcb@box@array@box% + \tcbdimto#2{\ht\tcb@box@array@box+\dp\tcb@box@array@box}% + \else% + \let#2\tcb@zpt% + \fi% +} + +\newrobustcmd*{\useboxarray}[2][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#2}% + \ifdefined\tcb@box@array@box% + \usebox{\tcb@box@array@box}% + \fi% +} + +\newrobustcmd{\usetcboxarray}[3][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#2}% + \ifdefined\tcb@box@array@box% + \tcbox[#3]{\usebox{\tcb@box@array@box}}% + \fi% +} + +\newrobustcmd*{\consumeboxarray}[2][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#2}% + \ifdefined\tcb@box@array@box% + \leavevmode\box\tcb@box@array@box\relax% + \fi% +} + +\newrobustcmd{\consumetcboxarray}[3][default]{% + \boxarraygetbox[#1]{\tcb@box@array@box}{#2}% + \ifdefined\tcb@box@array@box% + \tcbox[#3]{\leavevmode\box\tcb@box@array@box\relax}% + \fi% +} + +\newrobustcmd{\ifboxarrayempty}[2][default]{% + \begingroup% + \boxarraygetbox[#1]{\tcb@box@array@box}{#2}% + \ifdefined\tcb@box@array@box\relax% + \aftergroup\@secondoftwo% + \else% + \aftergroup\@firstoftwo% + \fi% + \endgroup% +} + +\def\boxarraystore#1{% + \boxarraygetsize[#1]\tcb@box@array@size% + \numdef\tcb@box@array@size{\tcb@box@array@size+1}% + \global\cslet{tcb@boxarray@#1@size}{\tcb@box@array@size}% + \letcs\tcb@box@array@allocated{tcb@boxarray@#1@allocated}% + \ifnum\tcb@box@array@allocated<\tcb@box@array@size\relax% + \newbox\tcb@box@array@box\csxdef{tcb@boxarray@#1@\tcb@box@array@size @box}{\the\tcb@box@array@box}% + \global\cslet{tcb@boxarray@#1@allocated}{\tcb@box@array@size}% + \else% + \letcs\tcb@box@array@box{tcb@boxarray@#1@\tcb@box@array@size @box}% + \fi% + \edef\reserved@a{% + \endgroup + \global\setbox\tcb@box@array@box\hbox{% + \begingroup\aftergroup}% + \def\noexpand\@currenvir{\@currenvir}% + \def\noexpand\@currenvline{\on@line}}% + \reserved@a + \@endpefalse + \color@setgroup + \ignorespaces} + +\def\endboxarraystore{\unskip\color@endgroup} + +\def\tcb@storetoboxarray@begin#1#2[#3]{\begin{boxarraystore}{#1}} +\def\tcb@storetoboxarray@end{\end{boxarraystore}} + +\tcbset{ + store to box array/.code={% + \def\kvtcb@float{S}\def\tcb@float@env@begin{\tcb@storetoboxarray@begin{#1}}\def\tcb@float@env@end{\tcb@storetoboxarray@end}}, + store to box array/.default=default, + reset box array/.code={\boxarrayreset[#1]}, + reset box array/.default=default, + reset and store to box array/.style={reset box array={#1},store to box array={#1}},% + reset and store to box array/.default=default, + do not store to box array/.style={nofloat}, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbminted.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbminted.code.tex new file mode 100644 index 0000000..5b06b96 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbminted.code.tex @@ -0,0 +1,73 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbminted.code.tex: Code for colorboxes with listings +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +%\makeatletter +\tcb@set@library@version{4.14} + +\RequirePackage{minted}[2011/09/17] + +\tcbuselibrary{listings@core} + +\def\tcb@minted@input@listing#1#2#3#4{% + \edef\temp@a{#4}% + \ifx\temp@a\@empty% + \else% + \toks@=\expandafter{#4}% + \edef\tcb@temp{\noexpand\usemintedstyle{\the\toks@}}% + \tcb@temp% + \fi% + \toks@=\expandafter{#1}% + \edef\tcb@temp{\noexpand\inputminted[\the\toks@]}% + \IfFileExists{\minted@outputdir#3}% + {\tcb@temp{#2}{\minted@outputdir#3}}% + {\tcb@temp{#2}{#3}}% +} + +\def\tcb@minted@uselistinglisting{% + \tcb@minted@input@listing{\kvtcb@minted@options}{\kvtcb@minted@language}{\kvtcb@listingfile}{\kvtcb@minted@style}% +}% + +\def\tcb@minted@usetemplisting{% + \tcb@minted@input@listing{\kvtcb@minted@options}{\kvtcb@minted@language}{\kvtcb@tempfile}{\kvtcb@minted@style}% +}% + +\def\tcb@minted@doc@usetemplisting{% + \tcb@minted@input@listing{\kvtcb@docmintoptions}{\kvtcb@docminted@language}{\kvtcb@tempfile}{\kvtcb@docmintstyle}% +} + +\tcbset{% + minted language/.store in=\kvtcb@minted@language, + minted options/.store in=\kvtcb@minted@options, + minted style/.store in=\kvtcb@minted@style, + listing engine/minted/.code={\let\tcbuselistinglisting\tcb@minted@uselistinglisting% + \let\tcbusetemplisting\tcb@minted@usetemplisting% + \let\tcb@doc@usetemplisting\tcb@minted@doc@usetemplisting}, +} + + +\tcbset{% + reset@minted/.style={% + minted language=latex, + minted options={tabsize=2,fontsize=\small,breaklines,autogobble}, + minted style=, + listing engine=minted, + }, + initialize@reset=reset@minted, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbposter.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbposter.code.tex new file mode 100644 index 0000000..ab56433 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbposter.code.tex @@ -0,0 +1,274 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbposter.code.tex: Code for posters +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\tcbuselibrary{breakable,magazine,skins,fitting} + +\newif\iftcb@poster@showframe +\newif\iftcb@posterbox@sequence +\newboxarray{tcb@poster} + +\def\tcb@poster@compute@poster@boxheight#1#2{% + \pgfpointanchor{\tcb@poster@prefix#1}{south}\unskip% + \@tempdima\pgf@y% + \pgfpointanchor{\tcb@poster@prefix#2}{north}\unskip% + \advance \@tempdima by -\pgf@y\relax% + \advance \@tempdima by -\tcbposterrowspacing\relax% + \advance \@tempdima by -\tcbposterrowspacing\relax% + \edef\tcb@poster@boxheight{\the\@tempdima}% +} + +\def\poster@scan@sequence#1 between #2 and #3 then#4\@nil{% + \tcb@poster@compute@poster@boxheight{#2}{#3}% + \ifundef{\tcb@poster@firstboxheight}{\edef\tcb@poster@firstboxheight{\tcb@poster@boxheight}}{}% + \eappto\tcb@poster@breakat{\tcb@poster@boxheight/}% + \@tempcnta\numexpr#1\relax% + \listeadd\tcb@poster@list{{\tcb@poster@prefix col\@arabic\@tempcnta.west|-\tcb@poster@prefix#2.south}{\tcb@poster@boxheight}}% + \ifblank{#4}{}{\poster@scan@sequence#4\@nil}% +} + +\newenvironment{tcb@poster@env}{% + \let\posterbox\tcb@poster@box% + \let\posterboxenv\tcb@poster@boxenv% + \let\endposterboxenv\endtcb@poster@boxenv% + \ifundef\tcb@poster@height{% + \ifnum\c@tcblayer=0\relax% + \def\tcb@poster@height{\textheight}% + \else% + \ifdim\dimexpr\tcbtextheight>0pt\relax% + \def\tcb@poster@height{\tcbtextheight}% + \else% + \def\tcb@poster@height{0.75\textheight}% + \fi% + \fi}{}% + \tcbset{poster/.cd,poster@poster}% + \tcbdimto\tcbposterwidth{\tcb@poster@width}% + \tcbdimto\tcbposterheight{\tcb@poster@height}% + \tcbdimto\tcbpostercolspacing{\tcb@poster@colspacing}% + \tcbdimto\tcbposterrowspacing{\tcb@poster@rowspacing}% + \edef\tcbpostercolumns{\the\numexpr\tcb@poster@columns\relax}% + \edef\tcbposterrows{\the\numexpr\tcb@poster@rows\relax}% + \tcbdimto\tcbpostercolwidth{(\tcbposterwidth+\tcbpostercolspacing)/\tcbpostercolumns-\tcbpostercolspacing}% + \tcbdimto\tcbposterrowheight{(\tcbposterheight+\tcbposterrowspacing)/\tcbposterrows-\tcbposterrowspacing}% + \begin{tikzpicture}% + \path[use as bounding box] (0,0) rectangle (\tcbposterwidth,\tcbposterheight); + \node[name=\tcb@poster@prefix poster,at={(0,0)},line width=0mm,inner sep=0mm,outer sep=0mm,draw=none,fill=none,rectangle, + above right,minimum width=\tcbposterwidth,minimum height=\tcbposterheight]{}; + \coordinate (\tcb@poster@prefix top) at (0,\tcbposterheight+\tcbposterrowspacing); + \coordinate (\tcb@poster@prefix bottom) at (0,-\tcbposterrowspacing); + \coordinate (\tcb@poster@prefix middle) at (0,\the\dimexpr0.5\dimexpr\tcbposterheight\relax); + \begin{scope}[every node/.style={inner sep=0pt,outer sep=0,above right,minimum height=\tcbposterheight,minimum width=\tcbpostercolwidth}]% + \node (\tcb@poster@prefix col1) at (0,0) {}; + \@tempcnta 1% + \@tempcntb\numexpr\tcbpostercolumns\relax% + \@tempdima\dimexpr\tcbpostercolwidth+\tcbpostercolspacing\relax% + \@whilenum \@tempcnta<\@tempcntb \do{% + \edef\tcb@temp{\tcb@poster@prefix col\@arabic\@tempcnta}% + \advance\@tempcnta 1\relax% + \node[xshift=\tcbpostercolspacing] (\tcb@poster@prefix col\@arabic\@tempcnta) at (\tcb@temp.south east) {}; + }% + \end{scope}% + \begin{scope}[every node/.style={inner sep=0pt,outer sep=0,below right,minimum height=\tcbposterrowheight,minimum width=\tcbposterwidth}]% + \node (\tcb@poster@prefix row1) at (0,\tcbposterheight) {}; + \@tempcnta 1% + \@tempcntb\numexpr\tcbposterrows\relax% + \@tempdima\dimexpr\tcbposterrowheight+\tcbposterrowspacing\relax% + \@whilenum \@tempcnta<\@tempcntb \do{% + \edef\tcb@temp{\tcb@poster@prefix row\@arabic\@tempcnta}% + \advance\@tempcnta 1\relax% + \node[yshift=-\tcbposterrowspacing] (\tcb@poster@prefix row\@arabic\@tempcnta) at (\tcb@temp.south west) {}; + }% + \end{scope}% + \iftcb@poster@showframe% + \@tempcnta 0% + \@tempcntb\numexpr\tcbpostercolumns\relax% + \@whilenum \@tempcnta<\@tempcntb \do{% + \advance\@tempcnta 1\relax% + \edef\tcb@temp{\tcb@poster@prefix col\@arabic\@tempcnta}% + \draw[red] (\tcb@temp.north west) node[above right]{col\@arabic\@tempcnta} rectangle (\tcb@temp.south east); + }% + \@tempcnta 0% + \@tempcntb\numexpr\tcbposterrows\relax% + \@whilenum \@tempcnta<\@tempcntb \do{% + \advance\@tempcnta 1\relax% + \edef\tcb@temp{\tcb@poster@prefix row\@arabic\@tempcnta}% + \draw[red] (\tcb@temp.north west) node[below left]{row\@arabic\@tempcnta} rectangle (\tcb@temp.south east); + }% + \gdef\tcb@poster@framelist{}% + \fi% +}{% + \iftcb@poster@showframe% + \renewcommand*{\do}[1]{% + \node[red,fill=white,opacity=0.7,font=\Large] at (\tcb@poster@prefix##1) {##1};}% + \dolistloop{\tcb@poster@framelist}% + \gdef\tcb@poster@framelist{}% + \fi% +\end{tikzpicture}} + +% #1 tcolorbox options +% #2 position +% #3 Inhalt +\newcommand{\tcb@poster@box}[3][]{% + \bgroup% + \tcbset{posterloc/.cd,#2}% + \tcbdimto\tcb@poster@boxwidth{\tcb@poster@span\dimexpr\tcbpostercolwidth+\tcbpostercolspacing\relax-\tcbpostercolspacing}% + \iftcb@posterbox@sequence% + \begin{pgfinterruptpicture}% + \begin{tcolorbox}[tcb@poster@style,width=\tcb@poster@boxwidth,tcb@poster@boxheight, + height fixed for=all,#1, + enforce breakable,reset box array=tcb@poster,store to box array=tcb@poster]#3\end{tcolorbox}% + \end{pgfinterruptpicture}% + \def\tcb@poster@boxcount{0}% + \renewcommand*{\do}[1]{\edef\tcb@poster@boxcount{\the\numexpr\tcb@poster@boxcount+1\relax}% + \node[inner sep=0pt,outer sep=0,tcb@poster@node,name=\tcb@poster@prefix\tcb@poster@boxname\tcb@poster@boxcount] at (\@firstoftwo##1) {% + \ifboxarrayempty[tcb@poster]{\tcb@poster@boxcount}% + {\begin{tcolorbox}[placeholder,width=\tcb@poster@boxwidth,height=\@secondoftwo##1]\end{tcolorbox}}% + {\consumeboxarray[tcb@poster]{\tcb@poster@boxcount}}% + };}% + \dolistloop{\tcb@poster@list}% + \iftcb@poster@showframe% + \ifdefstring{\tcb@poster@boxname}{@}{}{% + \def\tcb@poster@boxcount{0}% + \renewcommand*{\do}[1]{\edef\tcb@poster@boxcount{\the\numexpr\tcb@poster@boxcount+1\relax}% + \listxadd\tcb@poster@framelist{\tcb@poster@boxname\tcb@poster@boxcount}}% + \dolistloop{\tcb@poster@list}% + }% + \fi% + \else% + \begin{pgfinterruptpicture}% + \begin{tcolorbox}[tcb@poster@style,width=\tcb@poster@boxwidth,tcb@poster@boxheight,#1, + reset box array=tcb@poster,store to box array=tcb@poster]#3\end{tcolorbox}% + \end{pgfinterruptpicture}% + \node[inner sep=0pt,outer sep=0,tcb@poster@node,name=\tcb@poster@prefix\tcb@poster@boxname] at (\tcb@poster@xpos|-\tcb@poster@ypos) + {\consumeboxarray[tcb@poster]{1}};% + \iftcb@poster@showframe% + \ifdefstring{\tcb@poster@boxname}{@}{}{\listxadd\tcb@poster@framelist{\tcb@poster@boxname}}% + \fi% + \fi% + \egroup% +} + +\newenvironment{tcb@poster@boxenv}[2][]{% + \newcommand{\tcb@poster@box@saved}{\posterbox[#1]{#2}{\tcbusetemp}}% + \tcbwritetemp}% + {\endtcbwritetemp\tcb@poster@box@saved} + +\newenvironment{tcbposter@coverage}{}{} + +\newenvironment{tcbposter}[1][]{% + \tcbposterset{#1}% + \begin{tcbposter@coverage}\begin{tcb@poster@env}% +}{\end{tcb@poster@env}\end{tcbposter@coverage}} + +\newcommand{\tcbposterset}[1]{\tcbset{posterset/.cd,#1}} + +\tcbset{% + poster/.cd, + width/.store in=\tcb@poster@width, + height/.store in=\tcb@poster@height, + colspacing/.store in=\tcb@poster@colspacing, + rowspacing/.store in=\tcb@poster@rowspacing, + spacing/.style={colspacing={#1},rowspacing={#1}}, + columns/.store in=\tcb@poster@columns, + rows/.store in=\tcb@poster@rows, + showframe/.is if=tcb@poster@showframe, + prefix/.store in=\tcb@poster@prefix, + % + width=\linewidth, + spacing=4mm, + columns=3, + rows=4, + showframe=false, + prefix=TCBPOSTER@, +} + +\tcbset{% + posterloc/.cd, + name/.store in=\tcb@poster@boxname, + column/.code={\edef\tcb@poster@xpos{\tcb@poster@prefix col#1.west}\edef\tcb@poster@orientation{right}},% + column*/.code={\edef\tcb@poster@xpos{\tcb@poster@prefix col#1.east}\edef\tcb@poster@orientation{left}},% + below/.code={\tcb@posterbox@sequencefalse% + \tikzset{tcb@poster@node/.style={below \tcb@poster@orientation,yshift=\the\dimexpr\tcb@poster@yshift-\tcbposterrowspacing\relax,xshift=\tcb@poster@xshift}}% + \tcbset{tcb@poster@boxheight/.style={natural height}}% + \edef\tcb@poster@ypos{\tcb@poster@prefix#1.south}}, + above/.code={\tcb@posterbox@sequencefalse% + \tikzset{tcb@poster@node/.style={above \tcb@poster@orientation,yshift=\the\dimexpr\tcb@poster@yshift+\tcbposterrowspacing\relax,xshift=\tcb@poster@xshift}}% + \tcbset{tcb@poster@boxheight/.style={natural height}}% + \edef\tcb@poster@ypos{\tcb@poster@prefix#1.north}}, + at/.code={\tcb@posterbox@sequencefalse% + \tikzset{tcb@poster@node/.style={\tcb@poster@orientation,yshift=\tcb@poster@yshift,xshift=\tcb@poster@xshift}}% + \tcbset{tcb@poster@boxheight/.style={natural height}}% + \edef\tcb@poster@ypos{\tcb@poster@prefix#1}}, + between/.code args={#1 and #2}{\tcb@posterbox@sequencefalse% + \tikzset{tcb@poster@node/.style={below \tcb@poster@orientation,yshift=\the\dimexpr\tcb@poster@yshift-\tcbposterrowspacing\relax,xshift=\tcb@poster@xshift}}% + \edef\tcb@poster@ypos{\tcb@poster@prefix#1.south}% + \tcb@poster@compute@poster@boxheight{#1}{#2}% + \tcbset{tcb@poster@boxheight/.style={height=\tcb@poster@boxheight}}% + }, + sequence/.code={\tcb@posterbox@sequencetrue% + \tikzset{tcb@poster@node/.style={below \tcb@poster@orientation,yshift=\the\dimexpr\tcb@poster@yshift-\tcbposterrowspacing\relax,xshift=\tcb@poster@xshift}}% + \undef\tcb@poster@firstboxheight% + \def\tcb@poster@breakat{}% + \def\tcb@poster@list{}% + \poster@scan@sequence #1 then\@nil% + \eappto\tcb@poster@breakat{\tcbposterheight}% + \tcbset{tcb@poster@boxheight/.style={break at=\tcb@poster@breakat,height=\tcb@poster@firstboxheight}}% + }, + row/.code={\tcb@posterbox@sequencefalse% + \tikzset{tcb@poster@node/.style={below \tcb@poster@orientation,yshift=\tcb@poster@yshift,xshift=\tcb@poster@xshift}}% + \tcbset{posterloc/fixed height}% + \edef\tcb@poster@ypos{\tcb@poster@prefix row#1.north}}, + % + span/.store in=\tcb@poster@span,% + row@span/.store in=\tcb@poster@rowspan,% + rowspan/.style={row@span=#1,fixed height},% + xshift/.store in=\tcb@poster@xshift,% + yshift/.store in=\tcb@poster@yshift,% + fixed height/.code={\tcbset{tcb@poster@boxheight/.style={height=\tcb@poster@rowspan\dimexpr\tcbposterrowheight+\tcbposterrowspacing\relax-\tcbposterrowspacing}}},% + % + name=@, + column=1, + below=top, + span=1, + row@span=1, + xshift=0pt, + yshift=0pt, +} + +\tcbposterset{% + coverage/.code={\renewtcolorbox{tcbposter@coverage}{% + enhanced,frame hidden,sharp corners,boxsep=0pt,boxrule=0pt, + top=4mm,bottom=4mm,left=4mm,right=4mm, + toptitle=2mm,bottomtitle=2mm,colback=white,#1}}, + no coverage/.code={\renewenvironment{tcbposter@coverage}{}{}}, + poster/.code={\tcbset{poster/.cd,poster@poster/.style={#1}}}, + boxes/.code={\tcbset{tcb@poster@style/.style={nobeforeafter,enhanced standard,#1}}}, + fontsize/.code={\tcbset{fit fontsize macros}\tcbsetforeverylayer{fit basedim=#1}\normalsize}, + % + poster,boxes +} + +\tcbset{placeholder/.style={enhanced jigsaw, + size=small,sharp corners,colframe=red!50!black, + interior style={bottom color=red!15!white,top color=blue!15!white}, + opacityback=0.5, + underlay={\draw[red!50!black,line cap=round] (interior.south west)--(interior.north east); + \draw[red!50!black,line cap=round] (interior.south east)--(interior.north west);}, +}}% diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbprocessing.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbprocessing.code.tex new file mode 100644 index 0000000..51976be --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbprocessing.code.tex @@ -0,0 +1,79 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbprocessing.code.tex: Code for conditional processing +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\RequirePackage{pdftexcmds} +\RequirePackage{shellesc} + +\ifdefined\pdf@filemdfivesum\else% XeLaTeX presumed ... + \def\pdf@filemdfivesum#1{\mdfivesum file {#1}}% +\fi +\ifdefined\pdf@filemoddate\else% very poor XeLaTeX bypassing + \def\pdf@filemoddate#1{}% +\fi + +\def\tcbproc@readmdfive#1#2{% + \edef\tcbprocmdfivesum{\pdf@filemdfivesum{#1}}% + \IfFileExists{#2}{\input{#2}}{\def\tcbproclastmdfivesum{}}% +} + +\def\tcbproc@writemdfive#1{% + \immediate\openout\tcb@out=#1% + \immediate\write\tcb@out{\string\def\string\tcbproclastmdfivesum{\tcbprocmdfivesum}\@percentchar}% + \immediate\closeout\tcb@out% +} + +\newrobustcmd{\iftcb@process@on}[3]{% + \tcbproc@readmdfive{#1}{#2}% + \ifdefstrequal{\tcbproclastmdfivesum}{\tcbprocmdfivesum}{}{\tcbproc@writemdfive{#2}}% + \expandafter\@firstoftwo% +} + +\newrobustcmd{\iftcb@process@conditional}[3]{% + \tcbproc@readmdfive{#1}{#2}% + \ifdefstrequal{\tcbproclastmdfivesum}{\tcbprocmdfivesum}{% + \IfFileExists{#3}{% + \ifnum\pdf@strcmp{\pdf@filemoddate{#2}}{\pdf@filemoddate{#3}}>0\relax% + \expandafter\@firstoftwo% + \else% + \expandafter\@secondoftwo% + \fi% + }{\expandafter\@firstoftwo}% + }{% + \tcbproc@writemdfive{#2}% + \expandafter\@firstoftwo% + }% +} + +\newrobustcmd{\iftcb@process@off}[3]{% + \tcbproc@readmdfive{#1}{#2}% + \ifdefstrequal{\tcbproclastmdfivesum}{\tcbprocmdfivesum}{}{\tcbproc@writemdfive{#2}}% + \expandafter\@secondoftwo% +}% + +\newrobustcmd{\tcbiffileprocess}[1]{% + \ifcase\numexpr#1\relax% + \expandafter\iftcb@process@on% + \or% + \expandafter\iftcb@process@conditional% + \else% + \expandafter\iftcb@process@off% + \fi% +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbraster.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbraster.code.tex new file mode 100644 index 0000000..f2b263d --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbraster.code.tex @@ -0,0 +1,230 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\newcounter{tcbrastercolumn} +\newcounter{tcbrasterrow} +\newcounter{tcbraster} + +\newrobustcmd{\thetcbrasternum}{\the\numexpr(\c@tcbrasterrow-1)*\kvtcb@raster@columns+\c@tcbrastercolumn\relax} + +\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}}}, + width=(\tcb@raster@box@width+\kvtcb@raster@xskip)*#1-\kvtcb@raster@xskip}% + \fi% + }, + raster multirow/.code={% + \ifdefined\tcb@raster@box@height% + \tcbset@late@options{% + height=(\tcb@raster@box@height+\kvtcb@raster@yskip)*#1-\kvtcb@raster@yskip}% + \else% + \tcb@warning{'raster multirow' needs a fixed 'raster height'}% + \fi% + }, +} + +\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\kvtcb@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@column{\number\c@tcbrastercolumn}% + \edef\tcb@raster@save@row{\number\c@tcbrasterrow}% + \let\tcb@raster@change@fitbox\@empty% + \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/.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\thetcbrasternum\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 \thetcbrasternum/.try}% + }}% + \tcbset{#1}% + \tcbset@late@options{% + before={\ifhmode\unskip\fi\ifnum\c@tcbrastercolumn>1 \kern\kvtcb@raster@xskip\else% + \ifnum\c@tcbrasterrow>1 \parindent\z@\parskip\z@\par\nointerlineskip\addvspace{\the\dimexpr\kvtcb@raster@yskip\relax}\noindent\fi% + \kern\kvtcb@raster@skip@left\fi}, + after={% + \ifnum\c@tcbrastercolumn=\kvtcb@raster@columns\relax% + \kern\kvtcb@raster@skip@right% + \setcounter{tcbrastercolumn}{1}\addtocounter{tcbrasterrow}{1}% + \else% + \stepcounter{tcbrastercolumn}% + \fi},% + box align=\kvtcb@raster@valign,% + }% + \tcbdimto\tcb@raster@box@width{(\kvtcb@raster@width+\kvtcb@raster@xskip-\kvtcb@raster@skip@left-\kvtcb@raster@skip@right)/\kvtcb@raster@columns-\kvtcb@raster@xskip}% + \tcb@raster@set@size{% + code={\csuse{tcb@raster@change@\kvtcb@capture}}, + width=\tcb@raster@box@width, + }% + \ifdim\dimexpr\kvtcb@raster@height>0pt\relax% + \tcbdimto\tcb@raster@box@height{(\kvtcb@raster@height+\kvtcb@raster@yskip-0.001pt)/\kvtcb@raster@rows-\kvtcb@raster@yskip}% + \tcb@raster@set@size{height=\tcb@raster@box@height}% + \fi% + \let\tcb@end@raster\@empty% + \ifinner\ifhmode% + \color@vbox% + \hsize=\kvtcb@raster@width% + \let\tcb@end@raster\color@endbox% + \fi\fi%& + \if@nobreak% + \iftcb@ignorenobreak% + {\par\nointerlineskip% + \addvspace{\glueexpr\kvtcb@raster@skip@before-\parskip}}% + \fi% + \else% + {\par\nointerlineskip% + \addvspace{\glueexpr\kvtcb@raster@skip@before-\parskip}}% + \fi% + \tcb@parfillskip@check\kvtcb@raster@halign\noindent% +}{% + \ifhmode\unskip\fi% + \ifnum\c@tcbrastercolumn>1 % + \kern\kvtcb@raster@skip@right% + \fi% + \begingroup% + \par\nointerlineskip% + \addvspace{\glueexpr\kvtcb@raster@skip@after-\parskip}% + \endgroup% + \tcb@end@raster% + \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]\tcbraster[#1]}% + {\endtcbraster\endtcolorbox} + +\newenvironment{tcboxeditemize}[2][]{% + \tcolorbox[#2]\tcbitemize[#1]}% + {\endtcbitemize\endtcolorbox} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbskins.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbskins.code.tex new file mode 100644 index 0000000..1df5ec6 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbskins.code.tex @@ -0,0 +1,1894 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbskins.code.tex: Code for colorboxes with different skins +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\RequirePackage{tikz}[2010/10/13] + +\newenvironment{tikzpicture@tcb@hooked}{% + \edef\tcb@tikzpicture@begin{\noexpand\tikzpicture[\expandonce\tcb@tikz@option@hook]}% + \tcb@tikzpicture@begin\tcb@tikz@begin@hook}{\tcb@tikz@end@hook\endtikzpicture} + +\def\tcb@creategeonodes@true{% + \begin{scope}[every node/.style={line width=0mm,inner sep=0mm,outer sep=0mm,draw=none,fill=none,rectangle}] + \node[name=frame,at={(0,0)},above right,minimum width=\tcb@width,minimum height=\tcb@height]{}; + \node[name=interior,at={({\kvtcb@left@rule},{\kvtcb@bottom@rule})},above right,minimum width=\tcb@innerwidth,minimum height=\tcb@innerheight]{}; + \ifnum\tcbsegmentstate=1% + \node[name=segmentation,at={({\kvtcb@left@rule},{\the\dimexpr\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@bottom+\tcb@height@lower\relax})},above right, + minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{}; + \else\iftcb@sidebyside% + \node[name=segmentation,at={({\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper+\tcb@w@upper\relax},{\the\dimexpr\kvtcb@bottom@rule\relax})},above right, + minimum width=\the\dimexpr\kvtcb@sbs@gap\relax,minimum height=\tcb@innerheight]{}; + \fi\fi% + \iftcb@hasTitle% + \node[name=title,at={({\kvtcb@left@rule},{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule\relax})},above right, + minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\tcb@h@title+\kvtcb@toptitle+\kvtcb@bottomtitle+\kvtcb@boxsep*2\relax]{}; + \fi% + \tcb@specialgeonodes@hook% + \end{scope}% +} + +\def\tcbsettowidthofnode#1#2{% + \pgfpointanchor{#2}{east}\unskip% + #1\pgf@x% + \pgfpointanchor{#2}{west}\unskip% + \advance #1 by -\pgf@x\relax% +} + +\def\tcbsetmacrotowidthofnode#1#2{% + \tcbsettowidthofnode\pgf@xa{#2}% + \edef#1{\the\pgf@xa}% +} + +\def\tcbsettoheightofnode#1#2{% + \pgfpointanchor{#2}{north}\unskip% + #1\pgf@y% + \pgfpointanchor{#2}{south}\unskip% + \advance #1 by -\pgf@y\relax% +} + +\def\tcbsetmacrotoheightofnode#1#2{% + \tcbsettoheightofnode\pgf@ya{#2}% + \edef#1{\the\pgf@ya}% +} + +\def\tcb@spec#1{\tikzset{tcb@spec/.style={#1}}} + +\def\tcb@gettikzxy#1#2#3{% + \tikz@scan@one@point\pgfutil@firstofone#1\relax% + \edef#2{\the\pgf@x}% + \edef#3{\the\pgf@y}% +} + +\def\tcb@boundary@tikzbase#1#2#3#4#5#6{% + \tcb@gettikzxy{(#1)}{\tcb@xa}{\tcb@ya}% + \tcb@gettikzxy{(#2)}{\tcb@xb}{\tcb@yb}% + \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + #4\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}% + #5\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + #6\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}% + #3\pgfpathclose% +} + +\def\tcb@pathboundary#1#2{\path[#1]\pgfextra{#2};} + +\def\tcb@pathbase#1#2#3#4#5#6#7{\tcb@pathboundary{#1}{\tcb@boundary@tikzbase{#2}{#3}{#4}{#5}{#6}{#7}}} + +\def\tcb@boundaryframe@pathfirst{% + \tcb@boundary@base{0pt}{0pt}% + {\tcb@width}{\tcb@height}% + {\tcb@arc@zpt}{\tcb@arc@out@NW}{\tcb@arc@out@NE}{\tcb@arc@zpt}% +} + +\def\tcb@boundaryframe@pathmiddle{% + \tcb@boundary@base{0pt}{0pt}% + {\tcb@width}{\tcb@height}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@boundaryframe@pathlast{% + \tcb@boundary@base{0pt}{0pt}% + {\tcb@width}{\tcb@height}% + {\tcb@arc@out@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@out@SE}% +} + +\tikzset{% + tcb fill frame/.style={fill=tcbcol@frame,fill opacity=\kvtcb@opacityframe,tcb@spec,frame@style},% + tcb fill interior/.style={fill=tcbcol@back,fill opacity=\kvtcb@opacityback,tcb@spec,interior@style},% + tcb fill title/.style={fill=tcbcol@backtitle,fill opacity=\kvtcb@opacitybacktitle,tcb@spec,title@style},% +} + +% fill frame +\def\tcb@drawframe@path{\tcb@pathboundary{tcb fill frame}{\tcb@outerboundary}} +\let\tcb@drawframe@pathfirst=\tcb@drawframe@path +\let\tcb@drawframe@pathmiddle=\tcb@drawframe@path +\let\tcb@drawframe@pathlast=\tcb@drawframe@path + + +% fill inner box with title +\def\tcb@drawwithtitle@path{\tcb@pathboundary{tcb fill interior}{\tcb@boundaryinterior@title@standard}} + +\def\tcb@drawwithtitle@pathfirst{% + \tcb@pathbase{tcb fill interior}{interior.west|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\let\tcb@drawwithtitle@pathmiddle=\tcb@drawwithtitle@pathfirst + +\let\tcb@drawwithtitle@pathlast=\tcb@drawwithtitle@path + +% fill inner box without title +\def\tcb@drawwithouttitle@path{\tcb@pathboundary{tcb fill interior}{\tcb@boundaryinterior@notitle@standard}} + +\def\tcb@drawwithouttitle@pathfirst{% + \tcb@pathbase{tcb fill interior}{interior.west|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@ins@NW}{\tcb@arc@ins@NE}{\tcb@arc@zpt}% +} + +\def\tcb@drawwithouttitle@pathmiddle{% + \tcb@pathbase{tcb fill interior}{interior.west|-frame.south}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@drawwithouttitle@pathlast{% + \tcb@pathbase{tcb fill interior}{interior.south west}{interior.east|-frame.north}% + {\tcb@arc@ins@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}% +} + +% draw title box +\def\tcb@drawtitle@path{\tcb@pathboundary{tcb fill title}{\tcb@boundarytitle@standard}} + +\let\tcb@drawtitle@pathfirst=\tcb@drawtitle@path + +\def\tcb@drawtitle@pathmiddle{% + \tcb@pathbase{tcb fill title}{title.south west}{title.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\let\tcb@drawtitle@pathlast=\tcb@drawtitle@pathmiddle + +% draw segmentation line +\def\tcb@drawlower@path{% + \iftcb@sidebyside% + \path[draw=tcbcol@frame,fill opacity=\kvtcb@opacityframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style] + (segmentation.north)--(segmentation.south);% + \else% + \path[draw=tcbcol@frame,fill opacity=\kvtcb@opacityframe,dash pattern=on 1mm off 1mm,dash phase=0.5mm,tcb@spec,segmentation@style] + (segmentation.west)--(segmentation.east);% + \fi% +} + +\def\tcb@draw@pseudo@segmentation#1{% +\begingroup\tcb@shield@externalize\noindent\begin{tikzpicture}% + \path[use as bounding box] (0,{\the\dimexpr-\kvtcb@middle-\kvtcb@boxsep\relax}) + rectangle (\linewidth,{\the\dimexpr\kvtcb@middle+\kvtcb@boxsep\relax}); + \node[line width=0mm,inner sep=0mm,draw=none,fill=none,rectangle, + name=segmentation,at={({\the\dimexpr-\kvtcb@boxsep-(#1)\relax},0)},right,% + minimum width=\tcb@innerwidth,minimum height=\the\dimexpr\kvtcb@middle*2\relax]{}; + \tcb@drawlower@path% +\end{tikzpicture}\endgroup} + +\def\tcbline@star#1{% +{\parskip\z@\par\nointerlineskip}% +\xleaders\vbox{\tcb@draw@pseudo@segmentation{#1}}\vskip\dimexpr(\kvtcb@middle+\kvtcb@boxsep)*2\relax% +{\parskip\z@\par\nointerlineskip}} + +\def\tcbline@#1{% +{\parskip\z@\par\nointerlineskip}% +\tcb@draw@pseudo@segmentation{#1}% +{\parskip\z@\par\nointerlineskip}} + +\def\tcbline{% + \@ifstar{\iftcb@hasLower\tcbline@star{\kvtcb@leftlower}\else\tcbline@star{\kvtcb@leftupper}\fi}% + {\iftcb@hasLower\tcbline@{\kvtcb@leftlower+\@totalleftmargin}\else\tcbline@{\kvtcb@leftupper+\@totalleftmargin}\fi}} + + +% draw special versions +\def\tcb@drawspec@UT{% + \tcb@pathbase{tcb fill interior}{segmentation.west}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@drawspec@UR{% + \tcb@pathbase{tcb fill interior}{segmentation.west}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@ins@NW}{\tcb@arc@ins@NE}{\tcb@arc@zpt}% +} + +\def\tcb@drawspec@US{% + \tcb@pathbase{tcb fill interior}{segmentation.west}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@drawspec@LR#1{% + \tcb@pathbase{#1,segmentation@style}{interior.south west}{[yshift=0.1mm]segmentation.east}% + {\tcb@arc@ins@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}% +} + +\def\tcb@drawspec@LS#1{% + \tcb@pathbase{#1,segmentation@style}{interior.west|-frame.south}{[yshift=0.1mm]segmentation.east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@drawspec@sbs@A#1{% + \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@NE}{\tcb@arc@ins@SE}% +} + +\def\tcb@drawspec@sbs@B#1{% + \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}% +} + +\def\tcb@drawspec@sbs@C#1{% + \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@NE}{\tcb@arc@zpt}% +} + +\def\tcb@drawspec@sbs@D#1{% + \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@drawspec@sbs@E#1{% + \tcb@pathbase{#1,segmentation@style}{segmentation.south|-frame.south}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@drawspec@sbs@F#1{% + \tcb@pathbase{#1,segmentation@style}{segmentation.south}{interior.east|-frame.north}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}% +} + +\def\tcb@drawspec@T{% + \tcb@pathbase{top color=tcbcol@frame,bottom color=tcbcol@back,fill opacity=\kvtcb@opacitybacktitle}{[yshift=-0.01pt]interior.north west}{[yshift=0.01pt]title.south east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@drawframe@freelance{\tcb@frame@code} +\def\tcb@drawwithtitle@freelance{\tcb@interiortitled@code} +\def\tcb@drawwithouttitle@freelance{\tcb@interior@code} +\def\tcb@drawlower@freelance{\tcb@segmentation@code} +\def\tcb@drawtitle@freelance{\tcb@title@code} + + +\def\tcb@drawframe@spartan{% + \begin{pgfscope}% + \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{\tcb@width}{\tcb@height}}% + \pgfsetfillcolor{tcbcol@frame}% + \pgfsetfillopacity{\kvtcb@opacityframe}% + \pgfusepath{fill}% + \end{pgfscope}% +} + +\def\tcb@drawwithtitle@spartan{% + \begin{pgfscope}% + \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}% + {\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}% + \pgfsetfillcolor{tcbcol@back}% + \pgfsetfillopacity{\kvtcb@opacityback}% + \pgfusepath{fill}% + \end{pgfscope}% +} + +\def\tcb@drawwithouttitle@spartan{% + \begin{pgfscope}% + \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}% + {\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\the\dimexpr\tcb@height-\kvtcb@top@rule\relax}}% + \pgfsetfillcolor{tcbcol@back}% + \pgfsetfillopacity{\kvtcb@opacityback}% + \pgfusepath{fill}% + \end{pgfscope}% +} + +\def\tcb@drawtitle@spartan{% + \begin{pgfscope}% + \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule\relax}}% + {\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\the\dimexpr\tcb@height-\kvtcb@top@rule\relax}}% + \pgfsetfillcolor{tcbcol@backtitle}% + \pgfsetfillopacity{\kvtcb@opacitybacktitle}% + \pgfusepath{fill}% + \end{pgfscope}% +} + +\def\tcb@drawlower@spartan{% + \begin{pgfscope}% + \iftcb@sidebyside% + \tcbdimto\tcb@seg@pos{\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper+\tcb@w@upper+\kvtcb@sbs@gap/2}% + \pgfpathmoveto{\pgfqpoint{\tcb@seg@pos}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}% + \pgfpathlineto{\pgfqpoint{\tcb@seg@pos}{\kvtcb@bottom@rule}}% + \else% + \tcbdimto\tcb@seg@pos{\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@middle+\kvtcb@bottom+\tcb@height@lower}% + \pgfpathmoveto{\pgfqpoint{\kvtcb@left@rule}{\tcb@seg@pos}}% + \pgfpathlineto{\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\tcb@seg@pos}}% + \fi% + \pgfsetcolor{tcbcol@frame}% + \pgfsetstrokeopacity{\kvtcb@opacityframe}% + \pgfusepath{stroke}% + \end{pgfscope}% +} + + +\tcbset{% + frame style/.code={\tikzset{frame@style/.style={#1}}},% + frame hidden/.style={frame style={draw=none,fill=none}}, + frame engine/path/.style={frame code=\tcb@drawframe@path}, + frame engine/pathfirst/.style={frame code=\tcb@drawframe@pathfirst}, + frame engine/pathmiddle/.style={frame code=\tcb@drawframe@pathmiddle}, + frame engine/pathlast/.style={frame code=\tcb@drawframe@pathlast}, + frame engine/freelance/.style={frame code=\tcb@drawframe@standard}, + frame engine/spartan/.style={frame code=\tcb@drawframe@spartan}, + frame engine/empty/.style={frame code=}, + % + interior titled engine/path/.style={interior titled code=\tcb@drawwithtitle@path}, + interior titled engine/pathfirst/.style={interior titled code=\tcb@drawwithtitle@pathfirst}, + interior titled engine/pathmiddle/.style={interior titled code=\tcb@drawwithtitle@pathmiddle}, + interior titled engine/pathlast/.style={interior titled code=\tcb@drawwithtitle@pathlast}, + interior titled engine/freelance/.style={interior titled code=\tcb@drawwithtitle@standard}, + interior titled engine/spartan/.style={interior titled code=\tcb@drawwithtitle@spartan}, + interior titled engine/empty/.style={interior titled code=}, + % + interior engine/path/.style={interior code=\tcb@drawwithouttitle@path}, + interior engine/pathfirst/.style={interior code=\tcb@drawwithouttitle@pathfirst}, + interior engine/pathmiddle/.style={interior code=\tcb@drawwithouttitle@pathmiddle}, + interior engine/pathlast/.style={interior code=\tcb@drawwithouttitle@pathlast}, + interior engine/freelance/.style={interior code=\tcb@drawwithouttitle@standard}, + interior engine/spartan/.style={interior code=\tcb@drawwithouttitle@spartan}, + interior engine/empty/.style={interior code=}, + % + segmentation engine/path/.style={segmentation code=\tcb@drawlower@path}, + segmentation engine/freelance/.style={segmentation code=\tcb@drawlower@standard}, + segmentation engine/spartan/.style={segmentation code=\tcb@drawlower@spartan}, + segmentation engine/empty/.style={segmentation code=}, + % + title engine/path/.style={@title code=\tcb@drawtitle@path}, + title engine/pathfirst/.style={@title code=\tcb@drawtitle@pathfirst}, + title engine/pathmiddle/.style={@title code=\tcb@drawtitle@pathmiddle}, + title engine/pathlast/.style={@title code=\tcb@drawtitle@pathlast}, + title engine/freelance/.style={@title code=\tcb@drawtitle@standard}, + title engine/spartan/.style={@title code=\tcb@drawtitle@spartan}, + title engine/empty/.style={@title code=}, + % + interior style/.code={\tikzset{interior@style/.style={#1}}},% + interior hidden/.style={interior style={draw=none,fill=none}}, + segmentation style/.code={\tikzset{segmentation@style/.style={#1}}},% + segmentation hidden/.style={segmentation style={draw=none,fill=none}}, + @title style/.code={\tikzset{title@style/.style={#1}}},% + title style/.style={title filled,@title style={#1}}, + title hidden/.style={title style={draw=none,fill=none}}, + titlerule style/.style={% + underlay={\iftcb@hasTitle% + \path[draw,line width=\kvtcb@title@rule+1000sp,#1] + ([yshift=-\kvtcb@title@rule/2]title.south west)--([yshift=-\kvtcb@title@rule/2]title.south east); + \fi}},% + colbacklower/.colorlet=tcbcol@backlower,% + clear@spec/.code={\tcb@spec{}},% + tikz/.code={\appto\tcb@tikz@option@hook{,#1}},% + tikz reset/.code={\let\tcb@tikz@option@hook\@empty},% + at begin tikz/.code={\appto\tcb@tikz@begin@hook{#1}},% + at begin tikz reset/.code={\let\tcb@tikz@begin@hook\@empty},% + at end tikz/.code={\appto\tcb@tikz@end@hook{#1}},% + at end tikz reset/.code={\let\tcb@tikz@end@hook\@empty},% + rotate/.style={tikz={rotate=#1,transform shape}},% + scale/.style={tikz={scale=#1,transform shape},% + at begin tikz={% + \tcbdimto\kvtcb@arc{#1\dimexpr\kvtcb@arc}% + \tcbdimto\tcb@outer@arc{#1\dimexpr\tcb@outer@arc}% + \def\tcb@shadow@comp@arc{% + \tcbdimto\tcb@shadow@ts{#1\dimexpr\tcb@shadow@ts}% + \ifdim\dimexpr\tcb@outer@arc>\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax% + \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax}% + \else% + \let\tcb@shadow@arc=\tcb@zpt% + \fi% + }% + }},% + remember/.style={tikz={remember picture}},% + remember as/.style={tikz={remember picture},at end tikz={\pgfnodealias{#1}{frame}}},% +} + +\tcbset{% + base@unbroken/.style={% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@standard,% + shape@of@skin=unbroken,% + set@extensions@preframe={\kvtcb@shadow},% + set@extensions@postframe={\tcb@draw@border@unbroken\tcb@apply@underlay\tcb@apply@overlay},% + set@extensions@final={\tcb@apply@finish}% + },% + base@first/.style={% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@pathfirst,% + shape@of@skin=first,% + set@extensions@preframe={\kvtcb@shadow},% + set@extensions@postframe={\tcb@draw@border@first\tcb@apply@underlay\tcb@apply@overlay},% + set@extensions@final={\tcb@apply@finish}% + },% + base@middle/.style={% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@pathmiddle,% + shape@of@skin=middle,% + set@extensions@preframe={\kvtcb@shadow},% + set@extensions@postframe={\tcb@draw@border@middle\tcb@apply@underlay\tcb@apply@overlay},% + set@extensions@final={\tcb@apply@finish}% + },% + base@last/.style={% + clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,% + set@outerboundary=\tcb@boundaryframe@pathlast,% + shape@of@skin=last,% + set@extensions@preframe={\kvtcb@shadow},% + set@extensions@postframe={\tcb@draw@border@last\tcb@apply@underlay\tcb@apply@overlay},% + set@extensions@final={\tcb@apply@finish}% + },% +} + +\tcb@new@skin{enhanced}{base@unbroken,% + frame engine=path,interior titled engine=path,interior engine=path,segmentation engine=path,title engine=path,% + skin first=enhancedfirst,skin middle=enhancedmiddle,skin last=enhancedlast} + +\tcb@new@skin{enhancedfirst}{base@first,% + frame engine=pathfirst,interior titled engine=pathfirst,interior engine=pathfirst,segmentation engine=path,title engine=pathfirst,% + skin first=enhancedfirst,skin middle=enhancedmiddle,skin last=enhancedmiddle} + +\tcb@new@skin{enhancedmiddle}{base@middle,% + frame engine=pathmiddle,interior titled engine=pathmiddle,interior engine=pathmiddle,segmentation engine=path,title engine=pathmiddle,% + skin first=enhancedmiddle,skin middle=enhancedmiddle,skin last=enhancedmiddle} + +\tcb@new@skin{enhancedlast}{base@last,% + frame engine=pathlast,interior titled engine=pathlast,interior engine=pathlast,segmentation engine=path,title engine=pathlast,% + skin first=enhancedmiddle,skin middle=enhancedmiddle,skin last=enhancedlast} + +\tcbset{enhanced/.style={skin=enhanced},% + enhanced standard/.style={skin=enhanced, + skin first=enhanced,skin middle=enhanced,skin last=enhanced},% + blank/.style={enhanced,frame hidden,interior hidden,segmentation hidden,% + arc=0pt,outer arc=0pt,boxsep=0pt,top=0pt,bottom=0pt,left=0pt,right=0pt,boxrule=0pt,% + bottomtitle=6pt,middle=3pt}} + +\tcb@new@skin{empty}{base@unbroken,% + frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=empty,% + skin first=emptyfirst,skin middle=emptymiddle,skin last=emptylast} + +\tcb@new@skin{emptyfirst}{base@first,% + frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=empty,% + skin first=emptyfirst,skin middle=emptymiddle,skin last=emptymiddle} + +\tcb@new@skin{emptymiddle}{base@middle,% + frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=empty,% + skin first=emptymiddle,skin middle=emptymiddle,skin last=emptymiddle} + +\tcb@new@skin{emptylast}{base@last,% + frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=empty,% + skin first=emptymiddle,skin middle=emptymiddle,skin last=emptylast} + +\tcbset{empty/.style={skin=empty},% + blanker/.style={empty,arc=0pt,outer arc=0pt,boxsep=0pt,top=0pt,bottom=0pt,left=0pt,right=0pt,boxrule=0pt,% + bottomtitle=6pt,middle=3pt}, + blankest/.style={blanker,notitle, + no shadow,no underlay,no overlay,no finish,no borderline}, + } + +\tcb@new@skin{freelance}{base@unbroken,% + frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,% + skin first=freelancefirst,skin middle=freelancemiddle,skin last=freelancelast}% + +\tcb@new@skin{freelancefirst}{base@first,% + frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,% + skin first=freelancefirst,skin middle=freelancemiddle,skin last=freelancemiddle}% + +\tcb@new@skin{freelancemiddle}{base@middle,% + frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,% + skin first=freelancemiddle,skin middle=freelancemiddle,skin last=freelancemiddle}% + +\tcb@new@skin{freelancelast}{base@last,% + frame engine=freelance,interior titled engine=freelance,interior engine=freelance,segmentation engine=freelance,title engine=freelance,% + skin first=freelancemiddle,skin middle=freelancemiddle,skin last=freelancelast}% + +\tcbset{freelance/.style={skin=freelance}, + % for backward compatibility: + extend freelance/.style={#1},% + extend freelancefirst/.style={skin first is subskin of={freelancefirst}{#1}},% + extend freelancemiddle/.style={skin middle is subskin of={freelancemiddle}{#1}},% + extend freelancelast/.style={skin last is subskin of={freelancelast}{#1}}} + +\tcb@new@skin{bicolor}{base@unbroken,% + frame engine=path,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=path,% + interior titled code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@path}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@UT% + \else% + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithtitle@path}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@path}% + \fi\tcb@spec{}}, + interior code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@path}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@UR% + \else% + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithouttitle@path}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@path}% + \fi\tcb@spec{}}, + segmentation code={\iftcb@sidebyside% + \iftcb@hasTitle\tcb@drawspec@sbs@B{fill=tcbcol@backlower}\else% + \tcb@drawspec@sbs@A{fill=tcbcol@backlower}\fi\else\tcb@drawspec@LR{fill=tcbcol@backlower}\fi\tcb@spec{}},% + skin first=bicolorfirst,skin middle=bicolormiddle,skin last=bicolorlast} + +\tcbset{bicolor/.style={skin=bicolor}} + +\tcb@new@skin{bicolorfirst}{base@first,% + frame engine=pathfirst,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathfirst,% + interior titled code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@pathfirst}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@UT% + \else% + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithtitle@pathfirst}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@pathfirst}% + \fi\tcb@spec{}}, + interior code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@pathfirst}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@UR% + \else% + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithouttitle@pathfirst}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@pathfirst}% + \fi\tcb@spec{}}, + segmentation code={\iftcb@sidebyside% + \iftcb@hasTitle\tcb@drawspec@sbs@D{fill=tcbcol@backlower}\else% + \tcb@drawspec@sbs@C{fill=tcbcol@backlower}\fi\else\tcb@drawspec@LS{fill=tcbcol@backlower}\fi\tcb@spec{}},% + skin first=bicolorfirst,skin middle=bicolormiddle,skin last=bicolormiddle} + +\tcb@new@skin{bicolormiddle}{base@middle,% + frame engine=pathmiddle,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathmiddle,% + interior titled code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@pathmiddle}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@UT% + \else% + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithtitle@pathmiddle}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@pathmiddle}% + \fi\tcb@spec{}},% + interior code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@pathmiddle}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@US% + \else% + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithouttitle@pathmiddle}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@pathmiddle}% + \fi\tcb@spec{}}, + segmentation code={\iftcb@sidebyside% + \iftcb@hasTitle\tcb@drawspec@sbs@D{fill=tcbcol@backlower}\else% + \tcb@drawspec@sbs@E{fill=tcbcol@backlower}\fi\else\tcb@drawspec@LS{fill=tcbcol@backlower}\fi\tcb@spec{}},% + skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolormiddle} + +\tcb@new@skin{bicolorlast}{base@last,% + frame engine=pathlast,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathlast,% + interior titled code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@pathlast}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@UT% + \else% + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithtitle@pathlast}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithtitle@pathlast}% + \fi\tcb@spec{}}, + interior code={% + \iftcb@lowerseparated% + \ifcase\tcbsegmentstate% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@pathlast}% + \or% + \tcb@spec{fill=tcbcol@back}\tcb@drawspec@US% + \else + {\tcbset{interior style={fill=tcbcol@backlower,segmentation@style}}\tcb@drawwithouttitle@pathlast}% + \fi% + \else% + {\tcb@spec{fill=tcbcol@back}\tcb@drawwithouttitle@pathlast}% + \fi\tcb@spec{}},% + segmentation code={\iftcb@sidebyside% + \iftcb@hasTitle\tcb@drawspec@sbs@B{fill=tcbcol@backlower}\else% + \tcb@drawspec@sbs@F{fill=tcbcol@backlower}\fi\else\tcb@drawspec@LR{fill=tcbcol@backlower}\fi\tcb@spec{}},% + skin first=bicolormiddle,skin middle=bicolormiddle,skin last=bicolorlast} + +\tcb@new@skin{tile}{skin@bicolor,frame engine=empty,% + skin first=tilefirst,skin middle=tilemiddle,skin last=tilelast} + +\tcbset{tile/.style={skin=tile,boxrule=0pt,sharp corners,title filled,fonttitle=\bfseries}} + +\tcb@new@skin{tilefirst}{skin@bicolorfirst,frame engine=empty,% + skin first=tilefirst,skin middle=tilemiddle,skin last=tilemiddle} + +\tcb@new@skin{tilemiddle}{skin@bicolormiddle,frame engine=empty,% + skin first=tilemiddle,skin middle=tilemiddle,skin last=tilemiddle} + +\tcb@new@skin{tilelast}{skin@bicolorlast,frame engine=empty,% + skin first=tilemiddle,skin middle=tilemiddle,skin last=tilelast} + +\tikzset{beamer@color/.style={fill=none,top color=tcbcol@back,bottom color=tcbcol@back!85!black}} + +\tcb@new@skin{beamer}{base@unbroken,% + frame engine=path,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=path,% + interior titled code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1% + \tcb@spec{beamer@color}\tcb@drawspec@UT% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@path}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@path}% + \fi% + \tcb@drawspec@T\tcb@spec{}}, + interior code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1 + \tcb@spec{beamer@color}\tcb@drawspec@UR% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@path}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@path}% + \fi\tcb@spec{}}, + segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LR{beamer@color}\fi\tcb@spec{}},% + skin first=beamerfirst,skin middle=beamermiddle,skin last=beamerlast} + +\tcbset{beamer/.style={skin=beamer,boxrule=0mm,titlerule=1mm,toptitle=0.5mm,arc=2mm,fonttitle=\bfseries,drop fuzzy shadow}} + +\tcb@new@skin{beamerfirst}{base@first,% + frame engine=pathfirst,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathfirst,% + interior titled code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1% + \tcb@spec{beamer@color}\tcb@drawspec@UT% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathfirst}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathfirst}% + \fi% + \tcb@drawspec@T\tcb@spec{}},% + interior code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1 + \tcb@spec{beamer@color}\tcb@drawspec@UR% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathfirst}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathfirst}% + \fi\tcb@spec{}}, + segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LS{beamer@color}\fi\tcb@spec{}},% + skin first=beamerfirst,skin middle=beamermiddle,skin last=beamermiddle} + +\tcb@new@skin{beamermiddle}{base@middle,% + frame engine=pathmiddle,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathmiddle,% + interior titled code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1% + \tcb@spec{beamer@color}\tcb@drawspec@UT% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathmiddle}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathmiddle}% + \fi% + \tcb@drawspec@T\tcb@spec{}},% + interior code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1 + \tcb@spec{beamer@color}\tcb@drawspec@US% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathmiddle}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathmiddle}% + \fi\tcb@spec{}}, + segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LS{beamer@color}\fi\tcb@spec{}},% + skin first=beamermiddle,skin middle=beamermiddle,skin last=beamermiddle} + +\tcb@new@skin{beamerlast}{base@last,% + frame engine=pathlast,interior titled engine=empty,interior engine=empty,segmentation engine=empty,title engine=pathlast,% + interior titled code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1% + \tcb@spec{beamer@color}\tcb@drawspec@UT% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathlast}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithtitle@pathlast}% + \fi% + \tcb@drawspec@T\tcb@spec{}},% + interior code={% + \iftcb@lowerseparated% + \ifnum\tcbsegmentstate=1 + \tcb@spec{beamer@color}\tcb@drawspec@US% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathlast}% + \fi% + \else% + {\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathlast}% + \fi\tcb@spec{}}, + segmentation code={\iftcb@sidebyside\tcb@drawlower@path\else\tcb@drawspec@LR{beamer@color}\fi\tcb@spec{}},% + skin first=beamermiddle,skin middle=beamermiddle,skin last=beamerlast} + +\def\tcb@drawspec@widgetsegment{% + \iftcb@sidebyside% + \tcb@drawlower@path% + \else% + \path[left color=tcbcol@frame!75!white,right color=tcbcol@frame!75!white!25!tcbcol@back,segmentation@style] + ([yshift={-\kvtcb@middle/4}]segmentation.west) rectangle ([yshift={\kvtcb@middle/4}]segmentation.east); + \fi% +} + +\tikzset{widget@color/.style={left color=tcbcol@frame!75!white,right color=tcbcol@frame!75!white!25!tcbcol@back}} + +\tcb@new@skin{widget}{base@unbroken,% + frame engine=path,interior titled engine=path,interior engine=path,segmentation engine=empty,title engine=empty,% + title code={{\tcb@spec{widget@color}\tcb@drawtitle@path}}, + segmentation code={\tcb@drawspec@widgetsegment},% + skin first=widgetfirst,skin middle=widgetmiddle,skin last=widgetlast} + +\tcbset{widget/.style={skin=widget,arc=0.5mm,fonttitle=\bfseries,titlerule=0mm,toprule at break=0mm}} + +\tcb@new@skin{widgetfirst}{base@first,% + frame engine=pathfirst,interior titled engine=pathfirst,interior engine=pathfirst,segmentation engine=empty,title engine=empty,% + title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathfirst}},% + segmentation code={\tcb@drawspec@widgetsegment},% + skin first=widgetfirst,skin middle=widgetmiddle,skin last=widgetmiddle} + +\tcb@new@skin{widgetmiddle}{base@middle,% + frame engine=pathmiddle,interior titled engine=pathmiddle,interior engine=pathmiddle,segmentation engine=empty,title engine=empty,% + title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathmiddle}},% + segmentation code={\tcb@drawspec@widgetsegment},% + skin first=widgetmiddle,skin middle=widgetmiddle,skin last=widgetmiddle} + +\tcb@new@skin{widgetlast}{base@last,% + frame engine=pathlast,interior titled engine=pathlast,interior engine=pathlast,segmentation engine=empty,title engine=empty,% + title code={{\tcb@spec{widget@color}\tcb@drawtitle@pathlast}}, + segmentation code={\tcb@drawspec@widgetsegment},% + skin first=widgetmiddle,skin middle=widgetmiddle,skin last=widgetlast} + +\tcb@new@skin{spartan}{graphical environment=tikzpicture@tcb@hooked,geometry nodes=true,shape@of@skin=unbroken,% + set@extensions@preframe=,set@extensions@postframe={\tcb@apply@underlay},set@extensions@final=,% + frame engine=spartan,interior titled engine=spartan,interior engine=spartan,title engine=spartan,segmentation engine=spartan,% + set@outerboundary=\tcb@boundaryframe@standard,% + skin first=spartan,skin middle=spartan,skin last=spartan} + +\tcbset{spartan/.style={skin=spartan}} + +\tcb@new@skin{draft}{clear@spec,graphical environment=tikzpicture@tcb@hooked,geometry nodes,shape@of@skin=unbroken,% + frame engine=empty,interior titled engine=empty,interior engine=empty,segmentation engine=path,title empty,% + segmentation style={draw=black,dashed}, + set@extensions@postframe=, + set@extensions@final={\tcb@apply@finish},no finish,% + colupper=black!50!white,collower=black!50!white,coltitle=black!50!white, + frame code={% + \path[draw=blue!10!white,double,line width=1pt,dashed] (current bounding box.south west) rectangle (current bounding box.north east); + {\tcb@spec{fill=black!15!white,draw=black}\tcb@drawframe@path}% + \iftcb@hasTitle% + \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc] + ([xshift={\kvtcb@left@rule},yshift={\kvtcb@bottom@rule}]frame.south west) rectangle + (interior.north east); + \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc] + ([yshift={\kvtcb@title@rule}]interior.north west) rectangle + ([xshift={-\kvtcb@right@rule},yshift={-\kvtcb@top@rule}]frame.north east); + \path[fill=white,draw,dotted] + ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep}]title.south west) rectangle + ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep}]title.north east); + \path[fill=green!20!white,draw=green!75!black,dashed] + ([xshift={\kvtcb@boxsep+\kvtcb@lefttitle},yshift={\kvtcb@boxsep+\kvtcb@bottomtitle}]title.south west) + rectangle node[font=\scriptsize] {title: w=\tcb@w@title, h=\tcb@h@title} + +(\tcb@w@title,\tcb@h@title); + \path[draw=red,opacity=0.5] (title.south west) rectangle (title.north east); + \else% + \path[fill=red!10!white,draw,dotted,rounded corners=\kvtcb@arc] + ([xshift={\kvtcb@left@rule},yshift={\kvtcb@bottom@rule}]frame.south west) rectangle + ([xshift={-\kvtcb@right@rule},yshift={-\kvtcb@top@rule}]frame.north east); + \fi% + \ifcase\tcbsegmentstate + \path[fill=white,draw,dotted] + ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle + ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east); + \path[fill=green!20!white,draw=green!75!black,dashed] + ([xshift={\kvtcb@boxsep+\kvtcb@leftupper},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west) + rectangle node[font=\scriptsize] {upper: w=\tcb@w@upper, h=\tcb@height@upper} + +(\tcb@w@upper,\tcb@height@upper); + \iftcb@sidebyside% + \path[fill=green!20!white,draw=green!75!black,dashed] + ([yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]segmentation.south east) + rectangle node[font=\scriptsize] {lower: w=\tcb@w@lower, h=\tcb@height@upper} + +(\tcb@w@lower,\tcb@height@upper); + \fi% + \or% + \ifdim\wd\tcb@upperbox=0pt\relax + \path[fill=white,draw,dotted] + ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle + ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east); + \else + \path[fill=white,draw,dotted] + ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle + ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep}]segmentation.east); + \path[fill=white,draw,dotted] + ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep}]segmentation.west) + rectangle ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east); + \path[fill=green!20!white,draw=green!75!black,dashed] + ([xshift={\kvtcb@boxsep+\kvtcb@leftupper},yshift={\kvtcb@boxsep}]segmentation.north west) + rectangle node[font=\scriptsize] {upper: w=\tcb@w@upper, h=\tcb@height@upper} + +(\tcb@w@upper,\tcb@height@upper); + \fi% + \path[fill=green!20!white,draw=green!75!black,dashed] + ([xshift={\kvtcb@boxsep+\kvtcb@leftlower},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west) + rectangle node[font=\scriptsize] {lower: w=\tcb@w@lower, h=\tcb@height@lower} + +(\tcb@w@lower,\tcb@height@lower); + \path[draw=red,opacity=0.5] (segmentation.south west) rectangle (segmentation.north east); + \else + \path[fill=white,draw,dotted] + ([xshift={\kvtcb@boxsep},yshift={\kvtcb@boxsep+\tcb@break@bottomsep}]interior.south west) rectangle + ([xshift={-\kvtcb@boxsep},yshift={-\kvtcb@boxsep-\tcb@break@topsep}]interior.north east); + \path[fill=green!20!white,draw=green!75!black,dashed] + ([xshift={\kvtcb@boxsep+\kvtcb@leftlower},yshift={\kvtcb@boxsep+\kvtcb@bottom+\tcb@break@bottomsep}]interior.south west) + rectangle node[font=\scriptsize] {lower: w=\tcb@w@lower, h=\tcb@height@lower} + +(\tcb@w@lower,\tcb@height@lower); + \fi% + \path[draw=red,opacity=0.5] (interior.south west) rectangle (interior.north east); + \path[draw=red,opacity=0.5] (frame.south west) rectangle (frame.north east); + \node[above,font=\scriptsize,red!50!black] at (interior.south) {interior: w=\tcb@innerwidth, h=\tcb@innerheight}; + \node[above,font=\scriptsize,red!50!black] at (frame.north) {frame: w=\the\dimexpr\tcb@width\relax, h=\tcb@height}; + \path[draw=blue!10!white,double,line width=1pt,dashed,opacity=0.3] (current bounding box.south west) rectangle (current bounding box.north east); + \pgfsetfillopacity{0.3} + }, + skin first=draft,skin middle=draft,skin last=draft} + +\tcbset{draft/.style={skin=draft}} + +\tikzset{% + tcb@forced@clip/.code={\tikz@addmode{\tikz@mode@cliptrue}\let\tikz@options=\pgfutil@empty},% + tcb@invclip/.style={clip,insert path={{[reset cm]\pgfextra{% + \pgfpathmoveto{\pgfqpoint{-16383.99999pt}{-16383.99999pt}}% + \pgfpathlineto{\pgfqpoint{16383.99999pt}{-16383.99999pt}}% + \pgfpathlineto{\pgfqpoint{16383.99999pt}{16383.99999pt}}% + \pgfpathlineto{\pgfqpoint{-16383.99999pt}{16383.99999pt}}% + \pgfpathclose}}}}% +}% + +\def\tcb@clip@frame{\tcb@pathboundary{clip}{\tcb@outerboundary}} + +\def\tcb@invclip@frame{\tcb@pathboundary{tcb@invclip}{\tcb@outerboundary}} + +\def\tcb@clip@interior{% + \begingroup% + \tcbset{interior hidden}% + \tcb@spec{tcb@forced@clip}% + \def\tcb@spec##1{}% + \iftcb@hasTitle% + \tcb@interiortitled@code% + \else% + \tcb@interior@code% + \fi% + \endgroup% +} + +\def\tcb@clip@title{% + \begingroup% + \tcbset{title hidden}% + \tcb@spec{tcb@forced@clip}% + \def\tcb@spec##1{}% + \iftcb@hasTitle% + \tcb@title@code% + \fi% + \endgroup% +} + +\newenvironment{tcbclipframe}{\begin{scope}\tcb@clip@frame}{\end{scope}} +\newenvironment{tcbinvclipframe}{\begin{scope}\tcb@invclip@frame}{\end{scope}} +\newenvironment{tcbclipinterior}{\begin{scope}\tcb@clip@interior}{\end{scope}} +\newenvironment{tcbcliptitle}{\begin{scope}\tcb@clip@title}{\end{scope}} + +\def\tcb@apply@underlay{\csname tcb@underlay@\tcb@split@state\endcsname}% +\def\tcb@apply@finish{\csname tcb@finish@\tcb@split@state\endcsname}% + +\tcbset{% + underlay unbroken/.code={\appto\tcb@underlay@unbroken{#1}},% + underlay first/.code={\appto\tcb@underlay@first{#1}},% + underlay middle/.code={\appto\tcb@underlay@middle{#1}},% + underlay last/.code={\appto\tcb@underlay@last{#1}},% + underlay boxed title/.code={\appto\tcb@underlay@boxedtitle{#1}},% + underlay/.style={underlay unbroken={#1},underlay first={#1},underlay middle={#1},underlay last={#1}},% + underlay broken/.style={underlay first={#1},underlay middle={#1},underlay last={#1}},% + underlay unbroken and first/.style={underlay unbroken={#1},underlay first={#1}},% + underlay unbroken and last/.style={underlay unbroken={#1},underlay last={#1}},% + underlay middle and last/.style={underlay middle={#1},underlay last={#1}},% + underlay first and middle/.style={underlay first={#1},underlay middle={#1}},% + no underlay unbroken/.code={\let\tcb@underlay@unbroken\@empty},% + no underlay first/.code={\let\tcb@underlay@first\@empty},% + no underlay middle/.code={\let\tcb@underlay@middle\@empty},% + no underlay last/.code={\let\tcb@underlay@last\@empty},% + no underlay boxed title/.code={\let\tcb@underlay@boxedtitle\@empty},% + no underlay/.style={no underlay unbroken,no underlay first,no underlay middle,no underlay last,no underlay boxed title},% + finish unbroken/.code={\appto\tcb@finish@unbroken{#1}},% + finish first/.code={\appto\tcb@finish@first{#1}},% + finish middle/.code={\appto\tcb@finish@middle{#1}},% + finish last/.code={\appto\tcb@finish@last{#1}},% + finish/.style={finish unbroken={#1},finish first={#1},finish middle={#1},finish last={#1}},% + finish broken/.style={finish first={#1},finish middle={#1},finish last={#1}},% + finish unbroken and first/.style={finish unbroken={#1},finish first={#1}},% + finish unbroken and last/.style={finish unbroken={#1},finish last={#1}},% + finish middle and last/.style={finish middle={#1},finish last={#1}},% + finish first and middle/.style={finish first={#1},finish middle={#1}},% + no finish unbroken/.code={\let\tcb@finish@unbroken\@empty},% + no finish first/.code={\let\tcb@finish@first\@empty},% + no finish middle/.code={\let\tcb@finish@middle\@empty},% + no finish last/.code={\let\tcb@finish@last\@empty},% + no finish/.style={no finish unbroken,no finish first,no finish middle,no finish last},% +} + +\def\tcb@trans@set@boxedsize@copy@top{% + \begingroup\edef\x{\endgroup\noexpand\def\noexpand\tcb@trans@boxedsize{% + leftrule=\kvtcb@left@rule,rightrule=\kvtcb@right@rule, + toprule=\kvtcb@top@rule@stand,bottomrule=\kvtcb@title@rule, + boxsep=\kvtcb@boxsep,leftupper=\kvtcb@lefttitle,rightupper=\kvtcb@righttitle, + top=\kvtcb@toptitle,bottom=\kvtcb@bottomtitle,arc=\kvtcb@arc, + sharp corners=south, + }}\x}% +\def\tcb@trans@set@boxedsize@copy@bottom{% + \begingroup\edef\x{\endgroup\noexpand\def\noexpand\tcb@trans@boxedsize{% + leftrule=\kvtcb@left@rule,rightrule=\kvtcb@right@rule, + toprule=\kvtcb@title@rule,bottomrule=\kvtcb@bottom@rule@stand, + boxsep=\kvtcb@boxsep,leftupper=\kvtcb@lefttitle,rightupper=\kvtcb@righttitle, + top=\kvtcb@toptitle,bottom=\kvtcb@bottomtitle,arc=\kvtcb@arc, + sharp corners=north, + }}\x}% + +\tcbset{% + boxed title size/.is choice, + boxed title size/standard/.code={\def\tcb@trans@set@boxedsize##1{\let\tcb@trans@boxedsize\@empty}}, + boxed title size/title/.code={\def\tcb@trans@set@boxedsize##1{\def\tcb@trans@boxedsize{size=title}}}, + boxed title size/copy/.code={\def\tcb@trans@set@boxedsize##1{% + \ifstrequal{##1}{top}{\tcb@trans@set@boxedsize@copy@top}{\tcb@trans@set@boxedsize@copy@bottom}}}, + before@boxed@title/.store in=\kvtcb@before@boxedtitle,% + after@boxed@title/.store in=\kvtcb@after@boxedtitle,% + boxed title style/.code={\appto\kvtcb@style@boxedtitle{,#1}},% + no boxed title style/.code={\let\kvtcb@style@boxedtitle\@empty},% + % + varwidth boxed title/.style={before@boxed@title={\tcbdimto\tcb@w@title{#1}\begin{varwidth}{\tcb@w@title}},after@boxed@title={\end{varwidth}}},% + varwidth boxed title/.default={\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)}, + varwidth boxed title*/.style={varwidth boxed title={\kvtcb@width+#1}}, + varwidth boxed title*/.default={0pt-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)}, + % + minipage boxed title/.style={before@boxed@title={\tcbdimto\tcb@w@title{#1}\begin{minipage}{\tcb@w@title}},after@boxed@title={\end{minipage}}},% + minipage boxed title/.default={\kvtcb@width-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)}, + minipage boxed title*/.style={minipage boxed title={\kvtcb@width+#1}}, + minipage boxed title*/.default={0pt-(\kvtcb@left@rule)-(\kvtcb@right@rule)-(\kvtcb@boxsep)*2-(\kvtcb@lefttitle)-(\kvtcb@righttitle)}, + % + tikznode boxed title/.style={before@boxed@title={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after@boxed@title={\egroup;\end{tikzpicture}}},% + hbox boxed title/.style={before@boxed@title=,after@boxed@title=},% + % + boxtitle/xshift/.dimstore in=\kvtcb@xshift@boxedtitle,% + boxtitle/yshift/.dimstore in=\kvtcb@yshift@boxedtitle,% + boxtitle/yshifttext/.dimstore in=\kvtcb@yinnershift@boxedtitle,% + % + boxtitle/yshift*@top/.style={yshift*/.code={% + \tcbdimto\kvtcb@yshift@boxedtitle{##1}% + \tcbdimto\kvtcb@yinnershift@boxedtitle{\kvtcb@yshift@boxedtitle+\kvtcb@top@rule@stand}% + \ifdim\dimexpr\kvtcb@yinnershift@boxedtitle>0pt\relax\let\kvtcb@yinnershift@boxedtitle\tcb@zpt\fi% + }}, + boxtitle/yshift*@bottom/.style={yshift*/.code={% + \tcbdimto\kvtcb@yshift@boxedtitle{##1}% + \tcbdimto\kvtcb@yinnershift@boxedtitle{\kvtcb@yshift@boxedtitle-\kvtcb@bottom@rule@stand}% + \ifdim\dimexpr\kvtcb@yinnershift@boxedtitle<0pt\relax\let\kvtcb@yinnershift@boxedtitle\tcb@zpt\fi% + }}, + boxtitle/adapt@top/.code={% + \ifdim\dimexpr\tcboxedtitleheight+\kvtcb@yshift@boxedtitle>0pt\relax + \tcbdimto\kvtcb@bbtop@stand{\kvtcb@bbtop@stand+\tcboxedtitleheight+\kvtcb@yshift@boxedtitle}% + \fi% + \tcbdimto\kvtcb@top{\kvtcb@top-\kvtcb@yinnershift@boxedtitle}% + }, + boxtitle/adapt@bottom/.code={% + \ifdim\dimexpr\tcboxedtitleheight-\kvtcb@yshift@boxedtitle>0pt\relax + \tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand+\tcboxedtitleheight-\kvtcb@yshift@boxedtitle}% + \fi% + \tcbdimto\kvtcb@bottom{\kvtcb@bottom+\kvtcb@yinnershift@boxedtitle}% + }, + attach@title@boxed/.style n args={5}{% + detach title, + code={\def\tcb@specialtitle@hook{% + \ifx\tcbtitletext\@empty\else% + \tcb@trans@set@boxedsize{#2}% + \colorlet{tcbtranscol@frame}{tcbcol@frame}% + \colorlet{tcbtranscol@back}{tcbcol@backtitle}% + \let\tcb@trans@skin@current\kvtcb@skin@current% + \let\tcb@trans@boxedstyle\kvtcb@style@boxedtitle% + \setbox\tcb@titlebox\color@hbox\bgroup\color{tcbcol@title}\kvtcb@fonttitle\kvtcb@before@boxedtitle\kvtcb@haligntitle\kvtcb@before@title\tcbtitletext\kvtcb@after@title\kvtcb@after@boxedtitle\egroup\color@endbox% + \setbox\tcb@titlebox\color@hbox\tcbox[skin=\tcb@trans@skin@current,colframe=tcbtranscol@frame,colback=tcbtranscol@back,% + code={\pgfkeysalsofrom\tcb@trans@boxedsize\pgfkeysalsofrom\tcb@trans@boxedstyle}]{\box\tcb@titlebox}\color@endbox% + % + \tcbdimto\tcboxedtitleheight{\ht\tcb@titlebox+\dp\tcb@titlebox}% + \tcbdimto\tcboxedtitlewidth{\wd\tcb@titlebox}% + \tcbset{boxtitle/.cd,xshift=0pt,yshift=0pt,yshifttext=0pt,yshift*@#2,#1,adapt@#2}% + \let\tcb@specialgeonodes@first\relax% + \let\tcb@specialgeonodes@middle\relax% + \let\tcb@specialgeonodes@last\relax% + \def\tcb@specialgeonodes@unbroken{% + \node[#4,name=title,at={([xshift=\kvtcb@xshift@boxedtitle,yshift=\kvtcb@yshift@boxedtitle]frame.#5)}, + minimum width=\tcboxedtitlewidth,minimum height=\tcboxedtitleheight]{};}% + \cslet{tcb@specialgeonodes@#3}{\tcb@specialgeonodes@unbroken}% + \def\tcb@specialgeonodes@hook{\csname tcb@specialgeonodes@\tcb@split@state\endcsname}% + \preto\tcb@underlay@unbroken{\tcb@underlay@boxedtitle\pgftext[at={\pgfpointanchor{title}{center}}]{\box\tcb@titlebox}}% + \cspreto{tcb@underlay@#3}{\tcb@underlay@boxedtitle\pgftext[at={\pgfpointanchor{title}{center}}]{\box\tcb@titlebox}}% + \fi}}% + }, + attach@title@boxed@top/.style n args={3}{attach@title@boxed={#1}{top}{first}{#2}{#3}},% + attach@title@boxed@bottom/.style n args={3}{attach@title@boxed={#1}{bottom}{last}{#2}{#3}},% + % + attach boxed title to top left/.style={attach@title@boxed@top={#1}{above right}{north west}}, + attach boxed title to top center/.style={attach@title@boxed@top={#1}{above}{north}}, + attach boxed title to top right/.style={attach@title@boxed@top={#1}{above left}{north east}}, + attach boxed title to bottom left/.style={attach@title@boxed@bottom={#1}{below right}{south west}}, + attach boxed title to bottom center/.style={attach@title@boxed@bottom={#1}{below}{south}}, + attach boxed title to bottom right/.style={attach@title@boxed@bottom={#1}{below left}{south east}}, + reduce@vertical@rules/.code={% + \ifdim\dimexpr\kvtcb@left@rule<\dimexpr\kvtcb@right@rule\relax% + \tcbdimto\tcb@temp{\kvtcb@left@rule/2}% + \else% + \tcbdimto\tcb@temp{\kvtcb@right@rule/2}% + \fi% + \tcbset{leftrule/.expanded=\the\dimexpr\kvtcb@left@rule-\tcb@temp\relax, + rightrule/.expanded=\the\dimexpr\kvtcb@right@rule-\tcb@temp\relax}% + }, + attach boxed title to bottom/.style={% + attach boxed title to bottom center={yshift*=\tcboxedtitleheight,#1}, + minipage boxed title,boxed title size=copy, + }, + attach boxed title to bottom*/.style={% + attach boxed title to bottom={#1}, + boxed title style={reduce@vertical@rules}, + }, + attach boxed title to top/.style={% + attach boxed title to top center={yshift*=-\tcboxedtitleheight,#1}, + minipage boxed title,boxed title size=copy, + }, + attach boxed title to top*/.style={% + attach boxed title to top={#1}, + boxed title style={reduce@vertical@rules}, + }, + flip title/.style={attach boxed title to bottom, + boxed title style={reduce@vertical@rules,#1}}, +} + + +\newbox\tcb@waterbox + +\def\tcb@setratio#1#2#3{\edef#1{\strip@pt\dimexpr\number\numexpr\number\dimexpr#2\relax*65536/\number\dimexpr#3\relax\relax sp\relax}} + +\def\tcb@setratiorobust#1#2#3{\ifdim\dimexpr#3<1pt\tcb@setratio#1{#2}{1pt}\else\tcb@setratio#1{#2}{#3}\fi} + +\def\tcb@comp@waterbox@stretch#1#2#3{% + \tcb@setratiorobust\tcb@scale@x{#1\dimexpr#2}{\wd\tcb@waterbox}% + \tcb@setratiorobust\tcb@scale@y{#1\dimexpr#3}{\ht\tcb@waterbox+\dp\tcb@waterbox}% +} + +\def\tcb@comp@waterbox@zoom#1#2#3{% + \tcb@comp@waterbox@stretch{#1}{#2}{#3}% + \ifdim\dimexpr\tcb@scale@x pt\relax<\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi% +} + +\def\tcb@comp@waterbox@overzoom#1#2#3{% + \tcb@comp@waterbox@stretch{#1}{#2}{#3}% + \ifdim\dimexpr\tcb@scale@x pt\relax>\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi% +} + +\def\tcb@comp@waterbox@shrink#1#2#3{% + \tcb@comp@waterbox@zoom{#1}{#2}{#3}% + \ifdim\dimexpr\tcb@scale@x pt\relax>1pt\relax% + \edef\tcb@scale@x{1}\edef\tcb@scale@y{1}% + \fi% +} + +\def\tcb@box@scaled@waterbox{\scalebox{\tcb@scale@x}[\tcb@scale@y]{\box\tcb@waterbox}} + +\def\tcb@drawspec@watermark@@noclip{% + \tcb@comp@wm% + \node[opacity=\kvtcb@watermark@opacity,anchor=center] at (interior) {\tcb@box@scaled@waterbox};% +} + +\def\tcb@drawspec@watermark@@clip{% + \begin{tcbclipinterior}% + \tcb@drawspec@watermark@@noclip% + \end{tcbclipinterior}% +} + +\def\tcb@drawspec@watermark@tikz#1{% + \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}[color=\kvtcb@watermark@color]#1\end{tikzpicture}}\endpgfinterruptpicture\color@endbox% + \tcb@drawspec@watermark% +} + +\def\tcb@drawspec@watermark@graphics#1{% + \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\includegraphics{#1}}\endpgfinterruptpicture\color@endbox% + \tcb@drawspec@watermark% +} + +\def\tcb@drawspec@watermark@text#1{% + \tcb@drawspec@watermark@tikz{\node[inner sep=0pt,align=flush center]{#1};}% +} + + +\tcbset{% + watermark opacity/.store in=\kvtcb@watermark@opacity,% + watermark color/.store in=\kvtcb@watermark@color,% +% + watermark stretch/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@stretch{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% + watermark zoom/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@zoom{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% + watermark overzoom/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@overzoom{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% + watermark shrink/.code={\def\tcb@comp@wm{\tcb@comp@waterbox@shrink{#1}{\tcb@innerwidth}{\tcb@innerheight}}},% +% + watermark tikz/.style={overlay={\tcb@drawspec@watermark@tikz{#1}}}, + watermark tikz on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@tikz{#2}}},% + watermark graphics/.style={overlay={\tcb@drawspec@watermark@graphics{#1}}}, + watermark graphics on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@graphics{#2}}}, + watermark text/.style={overlay={\tcb@drawspec@watermark@text{#1}}}, + watermark text on/.style args={#1 is #2}{overlay #1={\tcb@drawspec@watermark@text{#2}}}, + no watermark/.style={no overlay}, + clip watermark/.is choice, + clip watermark/true/.code={\let\tcb@drawspec@watermark=\tcb@drawspec@watermark@@clip}, + clip watermark/false/.code={\let\tcb@drawspec@watermark=\tcb@drawspec@watermark@@noclip}, + clip watermark/.default=true, + show bounding box/.style={border@line app={% + \path[preaction={draw,line width=0.1pt,#1},draw,double=white,line width=1pt,dashed,opacity=0.5,#1] + (current bounding box.south west) rectangle (current bounding box.north east);}},% + show bounding box/.default={red},% +} + +\def\tcb@tdraw@title@clip{% + \begin{tcbcliptitle}% + \tcb@tdraw@title@core% + \end{tcbcliptitle}% +} + +\def\tcb@tdraw@upper@clip{% + \begin{tcbclipinterior}% + \tcb@tdraw@upper@core% + \end{tcbclipinterior}% +} + +\def\tcb@tdraw@lower@clip{% + \begin{tcbclipinterior}% + \tcb@tdraw@lower@core% + \end{tcbclipinterior}% +} + + +\def\tcb@process@ppbb{% + \pgf@process{\pgfpointanchor{path picture bounding box}{south west}}% + \pgf@xa\pgf@x\pgf@ya\pgf@y% + \pgf@process{\pgfpointanchor{path picture bounding box}{north east}}% + \pgf@xb\pgf@x\pgf@yb\pgf@y% + \pgfsetfillopacity{\tcb@tikz@fill@graphics@opacity}% + \pgfsetstrokeopacity{\tcb@tikz@fill@graphics@opacity}% +} + +\def\tcb@process@ppbb@wh{% + \tcb@process@ppbb% + \tcbdimto\tcb@ppbb@width{\pgf@xb-\pgf@xa}% + \tcbdimto\tcb@ppbb@height{\pgf@yb-\pgf@ya}% +} + +\def\tcb@ppbb@textbox#1{\pgftext[x=\the\dimexpr\pgf@xa+\tcb@ppbb@width/2\relax,y=\pgf@ya+\tcb@ppbb@height/2]{#1}} + +\def\tcb@set@waterbox@to@graphics#1{% + \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture% + \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options]}\x{#1}% + \endpgfinterruptpicture\color@endbox% +} + +\def\tcb@set@waterbox@to@picture#1{% + \setbox\tcb@waterbox=\color@hbox\pgfinterruptpicture{\pgfsetbaseline{0pt}\begin{tikzpicture}#1\end{tikzpicture}}\endpgfinterruptpicture\color@endbox% +} + +\tikzset{% + fill image opacity/.store in=\tcb@tikz@fill@graphics@opacity,% + fill image opacity=1,% + fill image scale/.store in=\tcb@tikz@fill@graphics@scale,% + fill image scale=1,% + fill image options/.store in=\tcb@tikz@fill@graphics@options,% + fill image options=,% + fill plain image/.style={path picture={% + \tcb@process@ppbb@wh% + \tcb@ppbb@textbox{\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options]}\x{#1}}% + }}, + fill plain picture/.style={path picture={% + \tcb@process@ppbb@wh% + \tcb@set@waterbox@to@picture{#1}% + \tcb@ppbb@textbox{\box\tcb@waterbox}% + }}, + fill stretch image/.style={path picture={% + \tcb@process@ppbb@wh% + \tcb@ppbb@textbox{\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@tikz@fill@graphics@options,% + width=\the\dimexpr\tcb@tikz@fill@graphics@scale\dimexpr\tcb@ppbb@width\relax,% + height=\the\dimexpr\tcb@tikz@fill@graphics@scale\dimexpr\tcb@ppbb@height\relax]}\x{#1}}% + }}, + fill stretch picture/.style={path picture={% + \tcb@process@ppbb@wh% + \tcb@set@waterbox@to@picture{#1}% + \tcb@comp@waterbox@stretch{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% + \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% + }}, + fill@overzoom/.style={path picture={% + \tcb@process@ppbb@wh% + #1% + \tcb@comp@waterbox@overzoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% + \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% + }}, + fill overzoom image/.style={fill@overzoom={\tcb@set@waterbox@to@graphics{#1}}},% + fill overzoom picture/.style={fill@overzoom={\tcb@set@waterbox@to@picture{#1}}},% + fill@zoom/.style={path picture={% + \tcb@process@ppbb@wh% + #1% + \tcb@comp@waterbox@zoom{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% + \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% + }}, + fill zoom image/.style={fill@zoom={\tcb@set@waterbox@to@graphics{#1}}},% + fill zoom picture/.style={fill@zoom={\tcb@set@waterbox@to@picture{#1}}},% + fill@shrink/.style={path picture={% + \tcb@process@ppbb@wh% + #1% + \tcb@comp@waterbox@shrink{\tcb@tikz@fill@graphics@scale}{\tcb@ppbb@width}{\tcb@ppbb@height}% + \tcb@ppbb@textbox{\tcb@box@scaled@waterbox}% + }}, + fill shrink image/.style={fill@shrink={\tcb@set@waterbox@to@graphics{#1}}},% + fill shrink picture/.style={fill@shrink={\tcb@set@waterbox@to@picture{#1}}},% + fill@tile/.style={path picture={% + \tcb@process@ppbb% + #1% + \tcbdimto\tcb@ppbb@tilew{\wd\tcb@waterbox}% + \tcbdimto\tcb@ppbb@tileh{\ht\tcb@waterbox+\dp\tcb@waterbox}% + \pgf@xc\pgf@xa\pgf@yc\pgf@yb% + \pgfutil@loop% + \pgfutil@loop% + \pgftext[x=\pgf@xc,y=\pgf@yc,left,top]{\copy\tcb@waterbox}% + \ifdim\pgf@xc<\pgf@xb% + \advance\pgf@xc\tcb@ppbb@tilew% + \pgfutil@repeat% + \ifdim\pgf@yc>\pgf@ya% + \advance\pgf@yc-\tcb@ppbb@tileh% + \pgf@xc\pgf@xa% + \pgfutil@repeat% + }},% + fill tile image/.style={fill@tile={\tcb@set@waterbox@to@graphics{#1}}},% + fill tile picture/.style={fill@tile={\tcb@set@waterbox@to@picture{#1}}},% + fill tile picture*/.style 2 args={fill@tile={\tcb@set@waterbox@to@picture{#2}% + \setbox\tcb@waterbox=\color@hbox\scalebox{#1}{\box\tcb@waterbox}\color@endbox}},% + % + fill plain image*/.style 2 args={fill image options={#1},fill plain image={#2}},% + fill stretch image*/.style 2 args={fill image options={#1},fill stretch image={#2}},% + fill overzoom image*/.style 2 args={fill image options={#1},fill overzoom image={#2}},% + fill zoom image*/.style 2 args={fill image options={#1},fill zoom image={#2}},% + fill shrink image*/.style 2 args={fill image options={#1},fill shrink image={#2}},% + fill tile image*/.style 2 args={fill image options={#1},fill tile image={#2}},% +} + +\tcbset{% + frame style image/.style={frame style={fill=none,fill stretch image={#1}}}, + frame style tile/.style 2 args={frame style={fill=none,fill tile image*={#1}{#2}}}, + interior style image/.style={interior style={fill=none,fill stretch image={#1}}}, + interior style tile/.style 2 args={interior style={fill=none,fill tile image*={#1}{#2}}}, + title style image/.style={title style={fill=none,fill stretch image={#1}}}, + title style tile/.style 2 args={title style={fill=none,fill tile image*={#1}{#2}}}, +} + +\tcbset{% + clip title/.is choice, + clip title/true/.code={\let\tcb@tdraw@title=\tcb@tdraw@title@clip}, + clip title/false/.code={\let\tcb@tdraw@title=\tcb@tdraw@title@core}, + clip title/.default=true, + clip upper/.is choice, + clip upper/true/.code={\let\tcb@tdraw@upper=\tcb@tdraw@upper@clip}, + clip upper/false/.code={\let\tcb@tdraw@upper=\tcb@tdraw@upper@core}, + clip upper/.default=true, + clip lower/.is choice, + clip lower/true/.code={\let\tcb@tdraw@lower=\tcb@tdraw@lower@clip}, + clip lower/false/.code={\let\tcb@tdraw@lower=\tcb@tdraw@lower@core}, + clip lower/.default=true, +} + + +\tcbset{marker/.style={% + skin=enhancedmiddle jigsaw, + breakable,parbox=false, + boxrule=0mm,leftrule=5mm,rightrule=5mm,boxsep=0mm, + left=3mm,right=3mm,top=1mm,bottom=1mm, + toptitle=1mm,bottomtitle=1mm,fonttitle=\bfseries, + arc=0mm,outer arc=0mm, + colback=yellow!10!white,colframe=red, + watermark color=yellow!75!red!25!white, + enlarge left by=-8mm, + enlarge right by=-8mm, + enlarge top by=0mm, + enlarge bottom by=0mm, + width=\the\dimexpr\linewidth+1.6cm\relax, + frame style={top color=tcbcol@frame,bottom color=tcbcol@frame,middle color=yellow!75!tcbcol@frame}, + title style={left color=tcbcol@frame,right color=tcbcol@frame,middle color=yellow!75!tcbcol@frame}, + watermark tikz={\draw[line width=2mm] circle (1cm) node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont!};}, + watermark zoom=0.75, +}} + + +\def\tcb@arc@bor{\pgfsetcornersarced{\pgfqpoint{\tcb@border@arc}{\tcb@border@arc}}}% + +\def\tcb@arc@bor@NW{\csname tcb@arc@bor@NW@\tcb@corner@mode@NW\endcsname} +\def\tcb@arc@bor@NE{\csname tcb@arc@bor@NE@\tcb@corner@mode@NE\endcsname} +\def\tcb@arc@bor@SW{\csname tcb@arc@bor@SW@\tcb@corner@mode@SW\endcsname} +\def\tcb@arc@bor@SE{\csname tcb@arc@bor@SE@\tcb@corner@mode@SE\endcsname} + +\let\tcb@arc@bor@NW@sharp\tcb@arc@zpt +\let\tcb@arc@bor@NE@sharp\tcb@arc@zpt +\let\tcb@arc@bor@SW@sharp\tcb@arc@zpt +\let\tcb@arc@bor@SE@sharp\tcb@arc@zpt + +\let\tcb@arc@bor@NW@rounded\tcb@arc@bor +\let\tcb@arc@bor@NE@rounded\tcb@arc@bor +\let\tcb@arc@bor@SW@rounded\tcb@arc@bor +\let\tcb@arc@bor@SE@rounded\tcb@arc@bor + +\def\tcb@border@prepare#1#2{% + \tcbdimto\tcb@border@ts{#2+(#1)/2}% + \ifdim\dimexpr\tcb@outer@arc>\tcb@arc@scale\dimexpr\tcb@border@ts\relax% + \tcbdimto\tcb@border@arc{\tcb@outer@arc-\tcb@arc@scale\dimexpr\tcb@border@ts\relax}% + \else% + \let\tcb@border@arc=\tcb@zpt% + \fi% +} + +\def\tcb@border@unbroken#1#2#3{% + \tcb@border@prepare{#1}{#2}% + \tcb@pathbase{draw,line width=#1,#3}{[xshift=\tcb@border@ts,yshift=\tcb@border@ts]frame.south west}% + {[xshift=-\tcb@border@ts,yshift=-\tcb@border@ts]frame.north east}% + {\tcb@arc@bor@SW}{\tcb@arc@bor@NW}{\tcb@arc@bor@NE}{\tcb@arc@bor@SE}% +} + +\def\tcb@border@first#1#2#3{% + \tcb@border@prepare{#1}{#2}% + \tcb@pathboundary{draw,line width=#1,#3}{% + \tcb@gettikzxy{([xshift=\tcb@border@ts]frame.south west)}{\tcb@xa}{\tcb@ya}% + \tcb@gettikzxy{([xshift=-\tcb@border@ts,yshift=-\tcb@border@ts]frame.north east)}{\tcb@xb}{\tcb@yb}% + \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \tcb@arc@bor@NW\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}% + \tcb@arc@bor@NE\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}% + }% +} + +\def\tcb@border@middle#1#2#3{% + \tcb@border@prepare{#1}{#2}% + \draw[line width=#1,#3] + ([xshift=\tcb@border@ts]frame.north west) -- ([xshift=\tcb@border@ts]frame.south west);% + \draw[line width=#1,#3] + ([xshift=-\tcb@border@ts]frame.north east) -- ([xshift=-\tcb@border@ts]frame.south east);% +} + +\def\tcb@border@last#1#2#3{% + \tcb@border@prepare{#1}{#2}% + \tcb@pathboundary{draw,line width=#1,#3}{% + \tcb@gettikzxy{([xshift=\tcb@border@ts,yshift=\tcb@border@ts]frame.south west)}{\tcb@xa}{\tcb@ya}% + \tcb@gettikzxy{([xshift=-\tcb@border@ts]frame.north east)}{\tcb@xb}{\tcb@yb}% + \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@yb}}% + \tcb@arc@bor@SW\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \tcb@arc@bor@SE\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + }% +} + +\def\tcb@draw@border@unbroken{% + \let\tcb@border=\tcb@border@unbroken% + \kvtcb@borderline% +} + +\def\tcb@draw@border@first{% + \let\tcb@border=\tcb@border@first% + \kvtcb@borderline% +} + +\def\tcb@draw@border@middle{% + \let\tcb@border=\tcb@border@middle% + \kvtcb@borderline% +} + +\def\tcb@draw@border@last{% + \let\tcb@border=\tcb@border@last% + \kvtcb@borderline% +} + +\def\tcb@bordernorth@draw#1#2#3{% + \tcbdimto\tcb@border@ts{#2+(#1)/2}% + \draw[line width=#1,#3] ([yshift=-\tcb@border@ts]frame.north west) -- ([yshift=-\tcb@border@ts]frame.north east);% +} + +\def\tcb@bordernorth#1#2#3{% + \ifdefstring{\tcb@split@state}{unbroken}{\tcb@bordernorth@draw{#1}{#2}{#3}}{% + \ifdefstring{\tcb@split@state}{first}{\tcb@bordernorth@draw{#1}{#2}{#3}}{}}% +} + +\def\tcb@bordersouth@draw#1#2#3{% + \tcbdimto\tcb@border@ts{#2+(#1)/2}% + \draw[line width=#1,#3] ([yshift=\tcb@border@ts]frame.south west) -- ([yshift=\tcb@border@ts]frame.south east);% +} + +\def\tcb@bordersouth#1#2#3{% + \ifdefstring{\tcb@split@state}{unbroken}{\tcb@bordersouth@draw{#1}{#2}{#3}}{% + \ifdefstring{\tcb@split@state}{last}{\tcb@bordersouth@draw{#1}{#2}{#3}}{}}% +} + +\def\tcb@borderwest#1#2#3{% + \tcbdimto\tcb@border@ts{#2+(#1)/2}% + \draw[line width=#1,#3] ([xshift=\tcb@border@ts]frame.north west) -- ([xshift=\tcb@border@ts]frame.south west);% +} + +\def\tcb@bordereast#1#2#3{% + \tcbdimto\tcb@border@ts{#2+(#1)/2}% + \draw[line width=#1,#3] ([xshift=-\tcb@border@ts]frame.north east) -- ([xshift=-\tcb@border@ts]frame.south east);% +} + +\tcbset{% + border@line app/.code={\appto\kvtcb@borderline{#1}},% + borderline/.style args={#1#2#3}{border@line app={\tcb@border{#1}{#2}{#3}}},% + no borderline/.code={\def\kvtcb@borderline{}},% + borderline north/.style args={#1#2#3}{border@line app={\tcb@bordernorth{#1}{#2}{#3}}},% + borderline south/.style args={#1#2#3}{border@line app={\tcb@bordersouth{#1}{#2}{#3}}},% + borderline west/.style args={#1#2#3}{border@line app={\tcb@borderwest{#1}{#2}{#3}}},% + borderline east/.style args={#1#2#3}{border@line app={\tcb@bordereast{#1}{#2}{#3}}},% + borderline horizontal/.style args={#1#2#3}{borderline north={#1}{#2}{#3},borderline south={#1}{#2}{#3}},% + borderline vertical/.style args={#1#2#3}{borderline west={#1}{#2}{#3},borderline east={#1}{#2}{#3}},% +} + + +\def\tcb@shadow@comp@ts@smart#1#2{% + \ifdim#2>0pt\relax\tcbdimto\tcb@shadow@ts{#1-#2/2}%% + \else\tcbdimto\tcb@shadow@ts{#1+#2/2}\fi% +} + +\def\tcb@shadow@comp@ts@copy#1#2{% + \tcbdimto\tcb@shadow@ts{#1}% +} + +\def\tcb@shadow@comp@arc{% + \ifdim\dimexpr\tcb@outer@arc>\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax% + \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@arc@scale\dimexpr\tcb@shadow@ts\relax}% + \else% + \let\tcb@shadow@arc=\tcb@zpt% + \fi% +} + +\def\tcb@arc@sha{\pgfsetcornersarced{\pgfqpoint{\tcb@shadow@arc}{\tcb@shadow@arc}}}% + +\def\tcb@arc@sha@NW{\csname tcb@arc@sha@NW@\tcb@corner@mode@NW\endcsname} +\def\tcb@arc@sha@NE{\csname tcb@arc@sha@NE@\tcb@corner@mode@NE\endcsname} +\def\tcb@arc@sha@SW{\csname tcb@arc@sha@SW@\tcb@corner@mode@SW\endcsname} +\def\tcb@arc@sha@SE{\csname tcb@arc@sha@SE@\tcb@corner@mode@SE\endcsname} + +\let\tcb@arc@sha@NW@sharp\tcb@arc@zpt +\let\tcb@arc@sha@NE@sharp\tcb@arc@zpt +\let\tcb@arc@sha@SW@sharp\tcb@arc@zpt +\let\tcb@arc@sha@SE@sharp\tcb@arc@zpt + +\let\tcb@arc@sha@NW@rounded\tcb@arc@sha +\let\tcb@arc@sha@NE@rounded\tcb@arc@sha +\let\tcb@arc@sha@SW@rounded\tcb@arc@sha +\let\tcb@arc@sha@SE@rounded\tcb@arc@sha + +\def\tcb@shadow@unbroken#1#2#3#4{% + \tcb@shadow@comp@ts{#3}{#1}% + \tcb@shadow@comp@arc% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@sha@SW}{\tcb@arc@sha@NW}{\tcb@arc@sha@NE}{\tcb@arc@sha@SE}% +} + +\def\tcb@shadow@first#1#2#3#4{% + \tcb@shadow@comp@ts{#3}{#1}% + \tcb@shadow@comp@arc% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@zpt}{\tcb@arc@sha@NW}{\tcb@arc@sha@NE}{\tcb@arc@zpt}% +} + +\def\tcb@shadow@middle#1#2#3#4{% + \tcb@shadow@comp@ts{#3}{#1}% + \tcb@shadow@comp@arc% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}% +} + +\def\tcb@shadow@last#1#2#3#4{% + \tcb@shadow@comp@ts{#3}{#1}% + \tcb@shadow@comp@arc% + \tcb@pathbase{fill,#4}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@sha@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@sha@SE}% +} + + +\tcbset{% + shad@w app/.code={\appto\kvtcb@shadow{#1}},% + shadow/.style args={#1#2#3#4}{shad@w app={\csuse{tcb@shadow@\tcb@shapeofskin}{#1}{#2}{#3}{#4}}},% + no shadow/.code={\def\kvtcb@shadow{}},% + fuzzy shadow/.style args={#1#2#3#4#5}{shad@w app={% + \begin{scope}[#5]% + \letcs\tcb@shadow{tcb@shadow@\tcb@shapeofskin}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3-4\dimexpr#4\relax}{opacity=0.01}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3-3\dimexpr#4\relax}{opacity=0.02}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3-2\dimexpr#4\relax}{opacity=0.04}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3-#4\relax}{opacity=0.07}% + \tcb@shadow{#1}{#2}{#3}{opacity=0.11}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3+#4\relax}{opacity=0.11}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3+2\dimexpr#4\relax}{opacity=0.07}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3+3\dimexpr#4\relax}{opacity=0.04}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3+4\dimexpr#4\relax}{opacity=0.02}% + \tcb@shadow{#1}{#2}{\the\dimexpr#3+5\dimexpr#4\relax}{opacity=0.01}% + \end{scope}}},% + % + drop shadow/.style={shadow={0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}}, + drop shadow/.default={black!50!white},% + drop midday shadow/.style={shadow={0mm}{-0.8mm}{-0.4mm}{opacity=0.5,#1}}, + drop midday shadow/.default={black!50!white},% + halo/.style args={#1 with #2}{shadow={0mm}{0mm}{-#1}{opacity=0.5,#2}}, + halo/.default={0.9mm with yellow},% + drop fuzzy shadow/.style={fuzzy shadow={1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow/.default={black!50!white},% + drop fuzzy midday shadow/.style={fuzzy shadow={0mm}{-1.0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy midday shadow/.default={black!50!white},% + fuzzy halo/.style args={#1 with #2}{fuzzy shadow={0mm}{0mm}{-#1}{0.12mm}{#2}}, + fuzzy halo/.default={1.0mm with yellow},% + % + drop shadow southeast/.style={shadow={0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow southeast/.default={black!50!white},% + drop shadow south/.style={shadow={0mm}{-0.8mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow south/.default={black!50!white},% + drop shadow southwest/.style={shadow={-0.9mm}{-0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow southwest/.default={black!50!white},% + drop shadow west/.style={shadow={-0.8mm}{0mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow west/.default={black!50!white},% + drop shadow northwest/.style={shadow={-0.9mm}{0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow northwest/.default={black!50!white},% + drop shadow north/.style={shadow={0mm}{0.8mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow north/.default={black!50!white},% + drop shadow northeast/.style={shadow={0.9mm}{0.9mm}{0mm}{opacity=0.5,#1}},% + drop shadow northeast/.default={black!50!white},% + drop shadow east/.style={shadow={0.8mm}{0mm}{-0.4mm}{opacity=0.5,#1}},% + drop shadow east/.default={black!50!white},% + drop fuzzy shadow southeast/.style={fuzzy shadow={1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow southeast/.default={black!50!white},% + drop fuzzy shadow south/.style={fuzzy shadow={0mm}{-1.0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow south/.default={black!50!white},% + drop fuzzy shadow southwest/.style={fuzzy shadow={-1.0mm}{-1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow southwest/.default={black!50!white},% + drop fuzzy shadow west/.style={fuzzy shadow={-1.0mm}{0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow west/.default={black!50!white},% + drop fuzzy shadow northwest/.style={fuzzy shadow={-1.0mm}{1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow northwest/.default={black!50!white},% + drop fuzzy shadow north/.style={fuzzy shadow={0mm}{1.0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow north/.default={black!50!white},% + drop fuzzy shadow northeast/.style={fuzzy shadow={1.0mm}{1.0mm}{0mm}{0.12mm}{#1}}, + drop fuzzy shadow northeast/.default={black!50!white},% + drop fuzzy shadow east/.style={fuzzy shadow={1.0mm}{0mm}{-0.5mm}{0.12mm}{#1}}, + drop fuzzy shadow east/.default={black!50!white},% + % + smart shadow arc/.is choice, + smart shadow arc/true/.code={\let\tcb@shadow@comp@ts=\tcb@shadow@comp@ts@smart}, + smart shadow arc/false/.code={\let\tcb@shadow@comp@ts=\tcb@shadow@comp@ts@copy}, + smart shadow arc/.default=true, +} + +\def\tcb@boundary@tikzbendedbase#1#2#3#4#5#6#7#8{% + \tcb@gettikzxy{(#1)}{\tcb@xa}{\tcb@ya}% + \tcb@gettikzxy{(#2)}{\tcb@xb}{\tcb@yb}% + \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@yb}}% + #5\pgfpathquadraticcurveto{\pgfqpoint{\dimexpr0.5\dimexpr\tcb@xa+\tcb@xb\relax}{\dimexpr\tcb@yb+#8}}{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + #6\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}% + #3\pgfpathquadraticcurveto{\pgfqpoint{\dimexpr0.5\dimexpr\tcb@xa+\tcb@xb\relax}{\dimexpr\tcb@ya+#7}}{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + #4\pgfpathclose% +} + +\def\tcb@pathbendedbase#1#2#3#4#5#6#7#8#9{\tcb@pathboundary{#1}{\tcb@boundary@tikzbendedbase{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}} + +\def\tcb@shadowbended@prepare#1{% + \tcbdimto\tcb@shadow@arc{\tcb@outer@arc-\tcb@arc@scale\dimexpr#1\relax}% + \ifdim\dimexpr\tcb@shadow@arc<0pt\relax% + \let\tcb@shadow@arc=\tcb@zpt% + \fi% +} + +\def\tcb@shadowlifted@unbroken#1#2#3#4#5{% + \tcb@shadowbended@prepare{#3}% + \tcb@pathbendedbase{fill,#5}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=-#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@sha@SW}{\tcb@arc@sha@NW}{\tcb@arc@sha@NE}{\tcb@arc@sha@SE}{#4}{0pt}% +} + +\def\tcb@shadowlifted@first#1#2#3#4#5{% + \tcb@shadowbended@prepare{#3}% + \tcb@pathbendedbase{fill,#5}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=-#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@zpt}{\tcb@arc@sha@NW}{\tcb@arc@sha@NE}{\tcb@arc@zpt}{#4}{0pt}% +} + +\def\tcb@shadowlifted@middle#1#2#3#4#5{% + \tcb@shadowbended@prepare{#3}% + \tcb@pathbendedbase{fill,#5}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=-#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{#4}{0pt}% +} + +\def\tcb@shadowlifted@last#1#2#3#4#5{% + \tcb@shadowbended@prepare{#3}% + \tcb@pathbendedbase{fill,#5}{[xshift=#1+#3,yshift=#2+#3]frame.south west}{[xshift=-#1-#3,yshift=#2-#3]frame.north east}% + {\tcb@arc@sha@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@sha@SE}{#4}{0pt}% +} + +\tcbset{ + lifted shadow/.style n args={5}{shad@w app={% + \begin{scope}[#5]% + \letcs\tcb@shadowlifted{tcb@shadowlifted@\tcb@shapeofskin}% + \tcb@shadowlifted{#1}{#2}{\dimexpr-4\dimexpr#4}{#3}{opacity=0.01}% + \tcb@shadowlifted{#1}{#2}{\dimexpr-3\dimexpr#4}{#3}{opacity=0.02}% + \tcb@shadowlifted{#1}{#2}{\dimexpr-2\dimexpr#4}{#3}{opacity=0.04}% + \tcb@shadowlifted{#1}{#2}{\dimexpr-#4}{#3}{opacity=0.07}% + \tcb@shadowlifted{#1}{#2}{0pt}{#3}{opacity=0.11}% + \tcb@shadowlifted{#1}{#2}{\dimexpr+#4}{#3}{opacity=0.11}% + \tcb@shadowlifted{#1}{#2}{\dimexpr+2\dimexpr#4}{#3}{opacity=0.07}% + \tcb@shadowlifted{#1}{#2}{\dimexpr+3\dimexpr#4}{#3}{opacity=0.04}% + \tcb@shadowlifted{#1}{#2}{\dimexpr+4\dimexpr#4}{#3}{opacity=0.02}% + \tcb@shadowlifted{#1}{#2}{\dimexpr+5\dimexpr#4}{#3}{opacity=0.01}% + \end{scope}}},% + drop small lifted shadow/.style={lifted shadow={1mm}{-0.75mm}{1.3mm}{0.1mm}{#1}}, + drop small lifted shadow/.default={black!50!white},% + drop lifted shadow/.style={lifted shadow={1.5mm}{-1.5mm}{2.7mm}{0.12mm}{#1}}, + drop lifted shadow/.default={black!50!white},% + drop large lifted shadow/.style={lifted shadow={2mm}{-3mm}{5.7mm}{0.16mm}{#1}}, + drop large lifted shadow/.default={black!50!white},% +} + +\newif\iftcb@isindraft +\def\tcb@draftmode{\tcbset{spartan,spartan@fit}} +\def\tcbstartdraftmode{\let\tcb@afteroptions@hook=\tcb@draftmode\tcb@isindrafttrue} +\def\tcbstopdraftmode{\let\tcb@afteroptions@hook=\@empty\tcb@isindraftfalse} + +\def\tcbinterruptdraftmode{% + \iftcb@isindraft% + \tcbstopdraftmode% + \let\tcbcontinuedraftmode=\tcbstartdraftmode% + \else% + \let\tcbcontinuedraftmode=\@empty% + \fi} + +\tcbset{% + draftmode/.is choice,% + draftmode/.default=true,% + draftmode/true/.code=\tcbstartdraftmode,% + draftmode/false/.code=\tcbstopdraftmode,% +} + + +\def\tcb@include@graphics{% + \let\tcb@graphics@options\kvtcb@graphics@options% + \ifnum\kvtcb@graphics@orientation>-1\relax% + \setbox\tcb@waterbox=\color@hbox\begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options]}\x{\imagepath}\color@endbox% + \ifcase\kvtcb@graphics@orientation\relax% + \ifdim\wd\tcb@waterbox<\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% + \appto\tcb@graphics@options{,angle=90}% + \fi% + \or% + \ifdim\wd\tcb@waterbox<\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% + \appto\tcb@graphics@options{,angle=-90}% + \fi% + \or% + \ifdim\wd\tcb@waterbox>\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% + \appto\tcb@graphics@options{,angle=90}% + \fi% + \or% + \ifdim\wd\tcb@waterbox>\dimexpr\ht\tcb@waterbox+\dp\tcb@waterbox\relax% + \appto\tcb@graphics@options{,angle=-90}% + \fi% + \fi% + \fi% + \ifdefstring{\kvtcb@capture}{hbox}{% + \tcbox{% + \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options]}% + \x{\imagepath}% + }% + }{% + \iftcb@fixedheight% + \begin{tcolorbox}% + \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options,width=\linewidth,height=\tcbtextheight,keepaspectratio]}% + \x{\imagepath}% + \end{tcolorbox}% + \else% + \ifdefempty\tcb@height@adjust{% + \begin{tcolorbox}% + \begingroup\edef\x{\endgroup\noexpand\includegraphics[\tcb@graphics@options,width=\linewidth]}% + \x{\imagepath}% + \end{tcolorbox}% + }{% height fill + \begin{tcolorbox}[underlay={% + \begin{tcbclipinterior}% + \path[fill zoom image*={\tcb@graphics@options}{\imagepath}] + ([xshift=\kvtcb@boxsep+\kvtcb@leftupper,yshift=\kvtcb@boxsep+\kvtcb@bottom]interior.south west) rectangle + ([xshift=-\kvtcb@boxsep-\kvtcb@rightupper,yshift=-\kvtcb@boxsep-\kvtcb@top]interior.north east); + \end{tcbclipinterior}% + }]% + \end{tcolorbox}% + }% + \fi% + }% +} + +\def\tcb@scanfilename#1#2{% + \begingroup% + \everyeof{\noexpand}% + \endlinechar -1% + \catcode`\_=11% + \catcode`\~=11% + \edef\x{\scantokens\expandafter{#2}}% + \expandafter\endgroup% + \expandafter\def\expandafter #1\expandafter{\x}% +}% + + +\def\tcb@include@graphics@preparefile#1{% + \tcb@scanfilename\tcb@temp{#1}% + \filename@parse{\tcb@temp}% + \ifx\filename@ext\relax% + \let\imagename\filename@base% + \else% + \def\imagename{\filename@base\Gin@sepdefault\filename@ext}% + \fi% + \ifdefined\grffile@Ginclude@graphics% + % grffile package loaded + \ifx\kvtcb@graphics@directory\@empty% + \def\imagepath{#1}% + \else% + \def\imagepath{\kvtcb@graphics@directory/#1}% + \fi% + \else% + \ifx\kvtcb@graphics@directory\@empty% + \edef\imagepath{#1}% + \else% + \edef\imagepath{\kvtcb@graphics@directory/#1}% + \fi% + \fi% +} + +\newcommand{\tcbincludegraphics}[2][]{% + \begingroup% + \tcb@layer@pushup% + \tcb@apply@box@options{enhanced,clip upper=true,valign=center,center upper,#1}% + \tcb@include@graphics@preparefile{#2}% + \edef\imagepage{1}% + \tcb@include@graphics% + \endgroup% +} + +\def\tcb@set@pdfpages#1#2{% + \IfFileExists{#2}{% + \ifdef{\pdfximage}{% + \pdfximage{#2}% + \edef#1{\the\pdflastximagepages}% + }{% + \ifdef{\XeTeXpdfpagecount}{% + \edef#1{\the\XeTeXpdfpagecount #2 }% + \ifnum#1=0 % + \edef#1{1}% + \fi% + }{\tcb@error{For PDF support run pdflatex, xelatex, or lualatex}{% + Your compiler seems not to support PDF include files.}}% + }% + }{\tcb@error{PDF file `#2' not found}{The PDF file `#2' was not found}}% + \relax% +} + +\newcommand{\tcbincludepdf}[2][]{% + \begingroup% + \tcb@layer@pushup% + \tcb@apply@box@options{enhanced,clip upper=true,valign=center,center upper,#1}% + \appto\kvtcb@graphics@options{,page=\imagepage}% + \tcb@include@graphics@preparefile{#2}% + \tcb@set@pdfpages\pdfpages{\imagepath}% + \foreach \imagepage in \kvtcb@graphics@pages% + {% + \tcb@include@graphics% + }% + \endgroup% +} + +\tcbset{% + graphics options/.store in=\kvtcb@graphics@options, + graphics pages/.store in=\kvtcb@graphics@pages, + graphics directory/.store in=\kvtcb@graphics@directory, + graphics orientation/.is choice, + graphics orientation/as-is/.code={\def\kvtcb@graphics@orientation{-1}}, + graphics orientation/landscape/.code={\def\kvtcb@graphics@orientation{0}}, + graphics orientation/landscape*/.code={\def\kvtcb@graphics@orientation{1}}, + graphics orientation/portrait/.code={\def\kvtcb@graphics@orientation{2}}, + graphics orientation/portrait*/.code={\def\kvtcb@graphics@orientation{3}}, +} + +\newcommand{\tcbhypernode}[2]{\ifdefined\hypersetup\@ifundefined{pgf@sh@ns@#2}{}{% + \node[inner sep=0pt,outer sep=0pt] at (#2.center){% + \tcbsetmacrotowidthofnode\tcb@w@hn{#2}% + \tcbsetmacrotoheightofnode\tcb@h@hn{#2}% + \hypersetup{pdfborder=0 0 0}% + #1{\vtop to \dimexpr\tcb@h@hn-2bp\relax{\hbox to \dimexpr\tcb@w@hn-2bp\relax{}\vfil}}% + };% +}\fi} + +\tcbset{% + hyperref node/.style 2 args={finish={\tcbhypernode{\hyperref[#1]}{#2}}}, + hyperref/.style={hyperref node={#1}{frame}}, + hyperref interior/.style={hyperref node={#1}{interior}}, + hyperref title/.style={hyperref node={#1}{title}}, + hyperlink node/.style 2 args={finish={\tcbhypernode{\hyperlink{#1}}{#2}}}, + hyperlink/.style={hyperlink node={#1}{frame}}, + hyperlink interior/.style={hyperlink node={#1}{interior}}, + hyperlink title/.style={hyperlink node={#1}{title}}, + hyperurl node/.style 2 args={finish={\tcbhypernode{\href{#1}}{#2}}}, + hyperurl/.style={hyperurl node={#1}{frame}}, + hyperurl interior/.style={hyperurl node={#1}{interior}}, + hyperurl title/.style={hyperurl node={#1}{title}}, + hyperurl* node/.style n args={3}{finish={\tcbhypernode{\href[#1]{#2}}{#3}}}, + hyperurl*/.style 2 args={hyperurl* node={#1}{#2}{frame}}, + hyperurl* interior/.style 2 args={hyperurl* node={#1}{#2}{interior}}, + hyperurl* title/.style 2 args={hyperurl* node={#1}{#2}{title}}, +} + +\tcbset{% + reset@skins/.style={% + frame style=,interior style=,segmentation style=,@title style=,% + colbacklower=black!15!white,% + extend freelance=,extend freelancefirst=,extend freelancemiddle=,extend freelancelast=,% + clear@spec,% + watermark opacity=1.00,watermark color=tcbcol@back!85!tcbcol@frame,% + watermark zoom=0.75,clip watermark,% + clip title=false,clip upper=false,clip lower=false,% + no borderline,smart shadow arc,no shadow,no underlay,no finish,tikz reset,at begin tikz reset,at end tikz reset,% + boxed title size=title,no boxed title style,hbox boxed title,code={\let\tcb@specialgeonodes@hook\relax},% + graphics options=,graphics pages={1,...,\pdfpages},graphics directory=,graphics orientation=as-is,% + }, + initialize@reset=reset@skins, +} + +\tcbuselibrary{skins@jigsaw} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbskinsjigsaw.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbskinsjigsaw.code.tex new file mode 100644 index 0000000..aa22c3c --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbskinsjigsaw.code.tex @@ -0,0 +1,229 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbskinsjigsaw.code.tex: Code for colorboxes with different skins +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\tcbuselibrary{skins} + +\def\tcb@drawframe@pathjigsaw{% + \tcb@pathboundary{tcb fill frame}{\tcb@boundaryframe@standardjigsaw}% +} + +\def\tcb@boundary@pathfirstjigsaw@A{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\tcb@height-\kvtcb@top@rule}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@out@NW\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \tcb@arc@out@NE\pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \tcb@arc@ins@NE\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \tcb@arc@ins@NW\pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@boundary@pathfirstjigsaw@B{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@out@NW\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \tcb@arc@out@NE\pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@drawframe@pathfirstjigsaw{% + \tcb@pathboundary{tcb fill frame}{% + \pgfseteorule% + \iftcb@hasTitle% + \iftcb@titlefilled% + \ifdim\dimexpr\kvtcb@title@rule>0pt\relax% + \tcb@boundary@pathfirstjigsaw@B% + \tcb@boundarytitle@standard% + \else% + \tcb@boundary@pathfirstjigsaw@A% + \fi% + \else% + \tcb@boundary@pathfirstjigsaw@B% + \fi% + \else% + \tcb@boundary@pathfirstjigsaw@A% + \fi% + }% +} + +\def\tcb@boundary@pathmiddlejigsaw@A{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{\kvtcb@left@rule}{\tcb@height}}% + \pgfpathrectangle{\pgfqpoint{\tcb@xa}{0pt}}{\pgfqpoint{\kvtcb@right@rule}{\tcb@height}}% +} + +\def\tcb@boundary@pathmiddlejigsaw@B{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\tcb@height-\kvtcb@top@rule}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@boundary@pathmiddlejigsaw@C{% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{0pt}}% + \pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{0pt}}% + \pgfpathclose% +} + +\def\tcb@drawframe@pathmiddlejigsaw{% + \tcb@pathboundary{tcb fill frame}{% + \pgfseteorule% + \iftcb@hasTitle% + \iftcb@titlefilled% + \ifdim\dimexpr\kvtcb@title@rule>0pt\relax% + \tcb@boundary@pathmiddlejigsaw@C% + \tcb@arc@zpt% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule}% + \tcbdimto\tcb@xb{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@yb{\tcb@height-\kvtcb@top@rule}% + \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + \else% + \tcb@boundary@pathmiddlejigsaw@B% + \fi% + \else% + \tcb@boundary@pathmiddlejigsaw@C% + \fi% + \else% + \tcb@boundary@pathmiddlejigsaw@A% + \fi% + }% +} + +\def\tcb@drawframe@pathlastjigsaw{% + \tcb@pathboundary{tcb fill frame}{% + \pgfseteorule% + \iftcb@hasTitle% + \iftcb@titlefilled% + \ifdim\dimexpr\kvtcb@title@rule>0pt\relax% + \tcb@boundaryframe@pathlast% + \tcb@arc@zpt% + \tcbdimto\tcb@ya{\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule}% + \tcbdimto\tcb@xb{\tcb@width-\kvtcb@right@rule}% + \tcbdimto\tcb@yb{\tcb@height-\kvtcb@top@rule}% + \pgfpathrectanglecorners{\pgfqpoint{\kvtcb@left@rule}{\tcb@ya}}{\pgfqpoint{\tcb@xb}{\tcb@yb}}% + \tcb@boundaryinterior@title@standard% + \else% + \tcb@boundaryframe@pathlast% + \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule}% + {\tcb@width-\kvtcb@right@rule}{\tcb@height-\kvtcb@top@rule}% + {\tcb@arc@ins@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}% + \fi% + \else% + \tcb@boundaryframe@pathlast% + \fi% + \else% + \tcbdimto\tcb@xa{\tcb@width-\kvtcb@right@rule}% + \pgfpathmoveto{\pgfpointorigin}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{0pt}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\tcb@height}}% + \tcb@arc@ins@SW\pgfpathlineto{\pgfqpoint{\kvtcb@left@rule}{\kvtcb@bottom@rule}}% + \tcb@arc@ins@SE\pgfpathlineto{\pgfqpoint{\tcb@xa}{\kvtcb@bottom@rule}}% + \tcb@arc@zpt\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@height}}% + \pgfpathlineto{\pgfqpoint{\tcb@width}{\tcb@height}}% + \tcb@arc@out@SE\pgfpathlineto{\pgfqpoint{\tcb@width}{0pt}}% + \tcb@arc@out@SW\pgfpathclose% + \fi% + }% +} + + +\def\tcb@draw@shadowjigsaw@unbroken{% + \let\tcb@shadow=\tcb@shadow@unbroken% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\def\tcb@draw@shadowjigsaw@first{% + \let\tcb@shadow=\tcb@shadow@first% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\def\tcb@draw@shadowjigsaw@middle{% + \let\tcb@shadow=\tcb@shadow@middle% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\def\tcb@draw@shadowjigsaw@last{% + \let\tcb@shadow=\tcb@shadow@last% + \begin{tcbinvclipframe}% + \kvtcb@shadow% + \end{tcbinvclipframe}% +} + +\tcb@new@skin{enhanced jigsaw}{base@unbroken,% + frame engine=pathjigsaw,interior titled engine=path,interior engine=path,segmentation engine=path,title engine=path,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@unbroken},% + skin first=enhancedfirst jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedlast jigsaw} + +\tcb@new@skin{enhancedfirst jigsaw}{base@first,% + frame engine=pathfirstjigsaw,interior titled engine=pathfirst,interior engine=pathfirst,segmentation engine=path,title engine=pathfirst,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@first},% + skin first=enhancedfirst jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedmiddle jigsaw} + +\tcb@new@skin{enhancedmiddle jigsaw}{base@middle,% + frame engine=pathmiddlejigsaw,interior titled engine=pathmiddle,interior engine=pathmiddle,segmentation engine=path,title engine=pathmiddle,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@middle},% + skin first=enhancedmiddle jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedmiddle jigsaw} + +\tcb@new@skin{enhancedlast jigsaw}{base@last,% + frame engine=pathlastjigsaw,interior titled engine=pathlast,interior engine=pathlast,segmentation engine=path,title engine=pathlast,% + set@extensions@preframe={\tcb@draw@shadowjigsaw@last},% + skin first=enhancedmiddle jigsaw,skin middle=enhancedmiddle jigsaw,skin last=enhancedlast jigsaw} + +\tcbset{% + enhanced jigsaw/.style={skin=enhanced jigsaw},% + enhanced standard jigsaw/.style={skin=enhanced jigsaw, + skin first=enhanced jigsaw,skin middle=enhanced jigsaw,skin last=enhanced jigsaw},% + frame engine/pathjigsaw/.style={frame code=\tcb@drawframe@pathjigsaw}, + frame engine/pathfirstjigsaw/.style={frame code=\tcb@drawframe@pathfirstjigsaw}, + frame engine/pathmiddlejigsaw/.style={frame code=\tcb@drawframe@pathmiddlejigsaw}, + frame engine/pathlastjigsaw/.style={frame code=\tcb@drawframe@pathlastjigsaw}, +} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbtheorems.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbtheorems.code.tex new file mode 100644 index 0000000..6812967 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbtheorems.code.tex @@ -0,0 +1,175 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbtheorems.code.tex: Code for theorems in colorboxes +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +%\makeatletter +\tcb@set@library@version{4.14} + +\RequirePackage{amsmath} + +\def\tcb@hack@amsmath{\tcb@hack@currenvir\vskip-\abovedisplayskip} + +\def\tcb@theo@form@namenumber#1#2{\hbox{#1~#2}} +\def\tcb@theo@form@numbername#1#2{\hbox{#2~#1}} +\def\tcb@theo@form@name#1#2{\hbox{#1}} + +\def\tcb@theo@desc@form@std#1{\tcb@desc@col\kvtcb@desc@font\kvtcb@desc@delim@left#1\kvtcb@desc@delim@right} + +\def\tcb@theo@title#1#2#3{% + \ifdefempty{#2}{\setbox\z@=\color@hbox#1\color@endbox}{\setbox\z@=\tcb@theo@form{#1}{#2}}% + \def\temp@a{#3}% + \ifx\temp@a\@empty\relax% + \unhbox\z@\kvtcb@terminatorsign% + \else% + \setbox\z@=\hbox{\unhbox\z@\kvtcb@separatorsign\ }% + \hangindent\wd\z@% + \hangafter=1% + \mbox{\unhbox\z@}{\tcb@theo@desc@form{#3}}\kvtcb@terminatorsign% + \fi% +} + +\def\tcb@theo@listentry#1#2#3{% + \def\kvtcb@listentry{\protect\numberline{#2}#3}% +} + +\def\tcb@theo@label#1#2{% + \def\temp@a{#2}% + \ifx\temp@a\@empty% + \else% + \tcbset{label={#1\kvtcb@label@sep#2},% + tcb@theo@full@label@supp={#1\kvtcb@label@sep#2},tcb@theo@label@supp={#2}}% + \fi% +} + +\if@fleqn% +\tcbset{% + ams equation upper/.style={before upper=\tcb@hack@amsmath\equation,after upper=\endequation},% + ams equation lower/.style={before lower=\tcb@hack@amsmath\equation,after lower=\endequation},% + ams equation* upper/.style={before upper=\tcb@hack@amsmath\csname equation*\endcsname,after upper=\endequation},% + ams equation* lower/.style={before lower=\tcb@hack@amsmath\csname equation*\endcsname,after lower=\endequation}% +}% +\else% +\tcbset{% + ams equation upper/.style={before upper=\tcb@hack@currenvir\equation,after upper=\endequation},% + ams equation lower/.style={before lower=\tcb@hack@currenvir\equation,after lower=\endequation},% + ams equation* upper/.style={before upper=\tcb@hack@currenvir\csname equation*\endcsname,after upper=\endequation},% + ams equation* lower/.style={before lower=\tcb@hack@currenvir\csname equation*\endcsname,after lower=\endequation},% +}% +\fi + +\tcbset{ + theorem/.style args={#1#2#3#4}{% + step and label={#2}{#4},% + title={\letcs\tcb@temp{the#2}\tcb@theo@title{#1}{\tcb@temp}{#3}}},% + math upper/.style={before upper=$\displaystyle,after upper=$},% + math lower/.style={before lower=$\displaystyle,after lower=$},% + math/.style={math upper,math lower},% + ams equation/.style={ams equation upper,ams equation lower},% + ams equation*/.style={ams equation* upper,ams equation* lower},% + ams align upper/.style={before upper=\tcb@hack@amsmath\align,after upper=\endalign},% + ams align lower/.style={before lower=\tcb@hack@amsmath\align,after lower=\endalign},% + ams align/.style={ams align upper,ams align lower},% + ams align* upper/.style={before upper=\tcb@hack@amsmath\csname align*\endcsname,after upper=\endalign},% + ams align* lower/.style={before lower=\tcb@hack@amsmath\csname align*\endcsname,after lower=\endalign},% + ams align*/.style={ams align* upper,ams align* lower},% + ams gather upper/.style={before upper=\tcb@hack@amsmath\gather,after upper=\endgather},% + ams gather lower/.style={before lower=\tcb@hack@amsmath\gather,after lower=\endgather},% + ams gather/.style={ams gather upper,ams gather lower},% + ams gather* upper/.style={before upper=\tcb@hack@amsmath\csname gather*\endcsname,after upper=\endgather},% + ams gather* lower/.style={before lower=\tcb@hack@amsmath\csname gather*\endcsname,after lower=\endgather},% + ams gather*/.style={ams gather* upper,ams gather* lower},% + ams nodisplayskip upper/.style={before upper=\vskip-\abovedisplayskip},% + ams nodisplayskip lower/.style={before lower=\vskip-\abovedisplayskip},% + ams nodisplayskip/.style={ams nodisplayskip upper,ams nodisplayskip lower},% + highlight math style/.style={highlight math/.style={notitle,nophantom,#1}},% + separator sign/.store in=\kvtcb@separatorsign,% + separator sign colon/.style={separator sign={:}},% + separator sign dash/.style={separator sign={\ --}},% + separator sign none/.style={separator sign=},% + terminator sign/.store in=\kvtcb@terminatorsign,% + terminator sign colon/.style={terminator sign={:}},% + terminator sign dash/.style={terminator sign={\ --}},% + terminator sign none/.style={terminator sign=},% + label separator/.store in=\kvtcb@label@sep,% + description delimiters/.code 2 args={\def\kvtcb@desc@delim@left{#1}\def\kvtcb@desc@delim@right{#2}},% + description delimiters parenthesis/.style={description delimiters=()}, + description delimiters none/.style={description delimiters={}{}}, + description color/.code={\def\temp@a{#1}\ifx\temp@a\@empty\relax% + \def\tcb@desc@col{}\else\def\tcb@desc@col{\color{#1}}\fi},% + description color/.default=, + description font/.store in=\kvtcb@desc@font, + description font/.default=, + description formatter/.code={\let\tcb@theo@desc@form=#1},% + description formatter/.default={\tcb@theo@desc@form@std},% + theorem name and number/.code={\let\tcb@theo@form=\tcb@theo@form@namenumber}, + theorem number and name/.code={\let\tcb@theo@form=\tcb@theo@form@numbername}, + theorem name/.code={\let\tcb@theo@form=\tcb@theo@form@name}, + theorem style/.is choice, + theorem style/standard/.style={separator sign colon,description delimiters none, + terminator sign none,theorem name and number,attach title}, + theorem style/change standard/.style={theorem style=standard,theorem number and name}, + theorem style/plain/.style={separator sign none,description delimiters parenthesis, + terminator sign colon,theorem name and number,attach title to upper={\ }}, + theorem style/plain apart/.style={separator sign none,description delimiters parenthesis, + terminator sign none,theorem name and number,attach title}, + theorem style/break/.style={theorem style=plain,attach title to upper={\par}}, + theorem style/change/.style={theorem style=plain,theorem number and name}, + theorem style/change apart/.style={theorem style=plain apart,theorem number and name}, + theorem style/change break/.style={theorem style=break,theorem number and name}, + theorem style/margin/.style={theorem style=plain,theorem name,before title=\makebox[0pt][r]{\thetcbcounter\ }}, + theorem style/margin apart/.style={theorem style=margin,attach title,terminator sign none}, + theorem style/margin break/.style={theorem style=margin,attach title to upper={\par}}, + theorem label supplement/.style={tcb@theo@label@supp/.style={#1}}, + theorem full label supplement/.style={tcb@theo@full@label@supp/.style={#1}}, +} + +\newcommand{\new@tcbtheorem}[5][]{% + \@@newtcolorbox[auto counter,#1]{#2}[3][]{#4,% + title={\tcb@theo@title{#3}{\thetcbcounter}{##2}},% + list entry={\protect\numberline{\thetcbcounter}##2},% + nameref={##2},% + code={\tcb@theo@label{#5}{##3}},% + ##1}% + \@@newtcolorbox[#1,no counter,list inside=]{#2*}[2][]{#4,% + title={\tcb@theo@title{#3}{\@empty}{##2}},% + ##1}% +} + +\def\newtcbtheorem{\let\@@newtcolorbox\newtcolorbox% + \new@tcbtheorem} + +\def\renewtcbtheorem{\let\@@newtcolorbox\renewtcolorbox% + \new@tcbtheorem} + +\newtcbox{\tcboxmath}[1][]{nobeforeafter,math upper,tcbox raise base,#1} +\newtcbox{\tcbhighmath}[1][]{highlight math,nobeforeafter,math upper,tcbox raise base,#1} + +\tcbset{% + reset@theorems/.style={% + description formatter,description color,description font, + highlight math style={colframe=red,colback=yellow!25!white},% + theorem style=standard,label separator=:,% + theorem label supplement=,theorem full label supplement=,% + }, + initialize@reset=reset@theorems, +} + +% DEPRECATED +\newcommand{\tcbmaketheorem}[5]{% + \newtcolorbox{#1}[3][]{#3,theorem={#2}{#4}{##2}{#5\kvtcb@label@sep##3},##1}% +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbvignette.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbvignette.code.tex new file mode 100644 index 0000000..b8048a4 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbvignette.code.tex @@ -0,0 +1,320 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbvignette.code.tex: Code for ornamental frames +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{4.14} + +\tcbuselibrary{skins} + +\usetikzlibrary{fadings} + +\pgfdeclarehorizontalshading{tcb@fade@east}{100bp} +{color(0bp)=(pgftransparent!50); color(25bp)=(pgftransparent!50); + color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)} + +\pgfdeclarehorizontalshading{tcb@fade@west}{100bp} +{color(0bp)=(pgftransparent!100); color(25bp)=(pgftransparent!100); + color(75bp)=(pgftransparent!50); color(100bp)=(pgftransparent!50)} + +\pgfdeclareverticalshading{tcb@fade@north}{100bp} +{color(0bp)=(pgftransparent!50); color(25bp)=(pgftransparent!50); + color(75bp)=(pgftransparent!100); color(100bp)=(pgftransparent!100)} + +\pgfdeclareverticalshading{tcb@fade@south}{100bp} +{color(0bp)=(pgftransparent!100); color(25bp)=(pgftransparent!100); + color(75bp)=(pgftransparent!50); color(100bp)=(pgftransparent!50)} + +\pgfdeclarefading{semi east}{\pgfuseshading{tcb@fade@east}} +\pgfdeclarefading{semi west}{\pgfuseshading{tcb@fade@west}} +\pgfdeclarefading{semi north}{\pgfuseshading{tcb@fade@north}} +\pgfdeclarefading{semi south}{\pgfuseshading{tcb@fade@south}} + +\def\tcb@vig@draw@north#1{\path[#1]\pgfextra{% + \pgfpathmoveto{\pgfqpoint{\tcb@vig@xA}{\tcb@vig@yB}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xB}{\tcb@vig@yB}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xb}{\tcb@vig@yb}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xa}{\tcb@vig@yb}}% + \pgfpathclose};} + +\def\tcb@vig@draw@east#1{\path[#1]\pgfextra{% + \pgfpathmoveto{\pgfqpoint{\tcb@vig@xB}{\tcb@vig@yB}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xB}{\tcb@vig@yA}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xb}{\tcb@vig@ya}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xb}{\tcb@vig@yb}}% + \pgfpathclose};} + +\def\tcb@vig@draw@south#1{\path[#1]\pgfextra{% + \pgfpathmoveto{\pgfqpoint{\tcb@vig@xB}{\tcb@vig@yA}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xA}{\tcb@vig@yA}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xa}{\tcb@vig@ya}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xb}{\tcb@vig@ya}}% + \pgfpathclose};} + +\def\tcb@vig@draw@west#1{\path[#1]\pgfextra{% + \pgfpathmoveto{\pgfqpoint{\tcb@vig@xA}{\tcb@vig@yA}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xA}{\tcb@vig@yB}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xa}{\tcb@vig@yb}}% + \pgfpathlineto{\pgfqpoint{\tcb@vig@xa}{\tcb@vig@ya}}% + \pgfpathclose};} + +\def\tcb@vig@draw@direct{% + \ifdim\tcb@vig@yB>\tcb@vig@yb\relax% + \begingroup\edef\x{\endgroup\noexpand\tcb@vig@draw@north{fill,draw=none,\expandonce\tcb@vig@style@north}}\x% + \fi% + \ifdim\tcb@vig@xB>\tcb@vig@xb\relax% + \begingroup\edef\x{\endgroup\noexpand\tcb@vig@draw@east{fill,draw=none,\expandonce\tcb@vig@style@east}}\x% + \fi% + \ifdim\tcb@vig@yA<\tcb@vig@ya\relax% + \begingroup\edef\x{\endgroup\noexpand\tcb@vig@draw@south{fill,draw=none,\expandonce\tcb@vig@style@south}}\x% + \fi% + \ifdim\tcb@vig@xA<\tcb@vig@xa\relax% + \begingroup\edef\x{\endgroup\noexpand\tcb@vig@draw@west{fill,draw=none,\expandonce\tcb@vig@style@west}}\x% + \fi% +} + +\def\tcb@vig@draw@clipped{% + \ifdim\tcb@vig@yB>\tcb@vig@yb\relax% + \begin{scope} + \tcb@vig@draw@north{clip}% + \begingroup\edef\x{\endgroup\noexpand\path[fill,\expandonce\tcb@vig@style@north]}% + \x\pgfextra{\pgfpathrectanglecorners{\pgfpoint{\tcb@vig@xA-1mm}{\tcb@vig@yb}}% + {\pgfpoint{\tcb@vig@xB+1mm}{\tcb@vig@yB}}}; + \end{scope} + \fi% + \ifdim\tcb@vig@xB>\tcb@vig@xb\relax% + \begin{scope} + \tcb@vig@draw@east{clip}% + \begingroup\edef\x{\endgroup\noexpand\path[fill,\expandonce\tcb@vig@style@east]}% + \x\pgfextra{\pgfpathrectanglecorners{\pgfpoint{\tcb@vig@xb}{\tcb@vig@yA-1mm}}% + {\pgfpoint{\tcb@vig@xB}{\tcb@vig@yB+1mm}}}; + \end{scope} + \fi% + \ifdim\tcb@vig@yA<\tcb@vig@ya\relax% + \begin{scope} + \tcb@vig@draw@south{clip}% + \begingroup\edef\x{\endgroup\noexpand\path[fill,\expandonce\tcb@vig@style@south]}% + \x\pgfextra{\pgfpathrectanglecorners{\pgfpoint{\tcb@vig@xA-1mm}{\tcb@vig@yA}}% + {\pgfpoint{\tcb@vig@xB+1mm}{\tcb@vig@ya}}}; + \end{scope} + \fi% + \ifdim\tcb@vig@xA<\tcb@vig@xa\relax% + \begin{scope} + \tcb@vig@draw@west{clip}% + \begingroup\edef\x{\endgroup\noexpand\path[fill,\expandonce\tcb@vig@style@west]}% + \x\pgfextra{% + \pgfpathrectanglecorners{\pgfpoint{\tcb@vig@xA}{\tcb@vig@yA-1mm}}% + {\pgfpoint{\tcb@vig@xa}{\tcb@vig@yB+1mm}}}; + \end{scope} + \fi% +} + +\newcommand{\tcbvignette}[1]{% + \ifdefined\pgfpictureid% + \begingroup% + \tcbset{vig/.cd,#1}% + \tcbdimto\tcb@vig@xA{\tcb@vig@xmin}% + \tcbdimto\tcb@vig@xB{\tcb@vig@xmax}% + \tcbdimto\tcb@vig@yA{\tcb@vig@ymin}% + \tcbdimto\tcb@vig@yB{\tcb@vig@ymax}% + \tcbdimto\tcb@vig@xa{\tcb@vig@xA+\tcb@vig@size@west}% + \tcbdimto\tcb@vig@xb{\tcb@vig@xB-(\tcb@vig@size@east)}% + \tcbdimto\tcb@vig@ya{\tcb@vig@yA+\tcb@vig@size@south}% + \tcbdimto\tcb@vig@yb{\tcb@vig@yB-(\tcb@vig@size@north)}% + \begin{scope}[tcb@vig@scope]% + \tcb@vig@draw% + \end{scope} + \endgroup% + \else% + \tcb@warning{'tcbvignette' was found outside a 'tikzpicture' environment and is ignored}% + \fi% +} + +\tcbset{% + vig/.cd, + xmin/.store in=\tcb@vig@xmin, + xmax/.store in=\tcb@vig@xmax, + ymin/.store in=\tcb@vig@ymin, + ymax/.store in=\tcb@vig@ymax, + lower left corner/.code={\tcb@gettikzxy{(#1)}{\tcb@vig@xmin}{\tcb@vig@ymin}}, + upper right corner/.code={\tcb@gettikzxy{(#1)}{\tcb@vig@xmax}{\tcb@vig@ymax}}, + % + inside node/.style={lower left corner={#1.south west},upper right corner={#1.north east}}, + outside node/.style={lower left corner={[xshift=-\tcb@vig@size@west,yshift=-\tcb@vig@size@south]#1.south west}, + upper right corner={[xshift=\tcb@vig@size@east,yshift=\tcb@vig@size@north]#1.north east}}, + % + on node/.style={lower left corner={#1.south west},upper right corner={#1.north east}}, + over node offset/.store in=\tcb@vig@onoffset,% + over node/.style={lower left corner={[xshift=-\tcb@vig@onoffset,yshift=-\tcb@vig@onoffset]#1.south west}, + upper right corner={[xshift=\tcb@vig@onoffset,yshift=\tcb@vig@onoffset]#1.north east}}, + north size/.store in=\tcb@vig@size@north, + south size/.store in=\tcb@vig@size@south, + east size/.store in=\tcb@vig@size@east, + west size/.store in=\tcb@vig@size@west, + vertical size/.style={north size=#1,south size=#1}, + horizontal size/.style={east size=#1,west size=#1}, + size/.style={north size=#1,south size=#1,east size=#1,west size=#1}, + north style/.store in=\tcb@vig@style@north, + south style/.store in=\tcb@vig@style@south, + east style/.store in=\tcb@vig@style@east, + west style/.store in=\tcb@vig@style@west, + scope/.code={\tikzset{tcb@vig@scope/.style={#1}}}, + draw method/.is choice, + draw method/direct/.code={\let\tcb@vig@draw\tcb@vig@draw@direct},% + draw method/clipped/.code={\let\tcb@vig@draw\tcb@vig@draw@clipped},% + base color/.colorlet=tcbcol@vig@base, + raised color/.style={% + base color=#1, + north style={tcbcol@vig@base!50!white}, + east style={tcbcol@vig@base!75!black}, + south style={tcbcol@vig@base!50!black}, + west style={tcbcol@vig@base!75!white}, + }, + lowered color/.style={% + base color=#1, + north style={tcbcol@vig@base!50!black}, + east style={tcbcol@vig@base!75!white}, + south style={tcbcol@vig@base!50!white}, + west style={tcbcol@vig@base!75!black}, + }, + color from/.style args={#1 to #2}{% + north style={bottom color=#1,top color=#2}, + east style={left color=#1,right color=#2}, + south style={top color=#1,bottom color=#2}, + west style={right color=#1,left color=#2}, + }, + fade in/.style={% + north style={#1,path fading=south}, + east style={#1,path fading=west}, + south style={#1,path fading=north}, + west style={#1,path fading=east}, + }, + fade in/.default=white, + fade out/.style={% + north style={#1,path fading=north}, + east style={#1,path fading=east}, + south style={#1,path fading=south}, + west style={#1,path fading=west}, + }, + fade out/.default=white, + semi fade in/.style={% + north style={#1,path fading=semi south}, + east style={#1,path fading=semi west}, + south style={#1,path fading=semi north}, + west style={#1,path fading=semi east}, + }, + semi fade in/.default=white, + semi fade out/.style={% + north style={#1,path fading=semi north}, + east style={#1,path fading=semi east}, + south style={#1,path fading=semi south}, + west style={#1,path fading=semi west}, + }, + semi fade out/.default=white, + % + scope=, + draw method=direct, + xmin=0pt, + xmax=1cm, + ymin=0pt, + ymax=1cm, + size=2mm, + over node offset=0.1mm, + raised color=red, +} + +\tcbset{% + finish@vignette/.style 2 args={finish #1={% + \begin{tcbclipframe}\tcbvignette{% + scope={transparency group,opacity=0.25}, + north style=white, + east style=black!75, + south style=black, + west style=black!25,#2,inside node=frame + }\end{tcbclipframe}}}, + finish vignette/.style={% + finish@vignette={unbroken}{#1},% + finish@vignette={first}{#1,south size=0pt},% + finish@vignette={middle}{#1,north size=0pt,south size=0pt},% + finish@vignette={last}{#1,north size=0pt}% + }, +% + finish@raised@vignette/.style 2 args={finish #1={% + \begin{tcbclipframe}\tcbvignette{% + draw method=clipped, + north style={white,path fading=semi south}, + east style={black!75,path fading=semi west}, + south style={black,path fading=semi north}, + west style={black!25,path fading=semi east},#2,inside node=frame + }\end{tcbclipframe}}}, + finish raised fading vignette/.style={% + finish@raised@vignette={unbroken}{#1},% + finish@raised@vignette={first}{#1,south size=0pt},% + finish@raised@vignette={middle}{#1,north size=0pt,south size=0pt},% + finish@raised@vignette={last}{#1,north size=0pt}% + }, +% + finish@fading@vignette/.style 2 args={finish #1={% + \tcbvignette{% + draw method=clipped,fade in=tcbcol@vig@base,#2,over node=frame}}}, + finish fading vignette/.style={% + finish@fading@vignette={unbroken}{base color=white,#1},% + finish@fading@vignette={first}{base color=white,#1,south size=0pt},% + finish@fading@vignette={middle}{base color=white,#1,north size=0pt,south size=0pt},% + finish@fading@vignette={last}{base color=white,#1,north size=0pt}% + }, +% + underlay@vignette/.style 2 args={underlay #1={% + \begin{tcbclipframe}\tcbvignette{% + raised color=tcbcol@frame, + north size=\kvtcb@top@rule@stand, + south size=\kvtcb@bottom@rule@stand, + west size=\kvtcb@left@rule, + east size=\kvtcb@right@rule,#2,inside node=frame + }\end{tcbclipframe}}}, + underlay vignette/.style={% + underlay@vignette={unbroken}{#1},% + underlay@vignette={first}{#1,south size=0pt},% + underlay@vignette={middle}{#1,north size=0pt,south size=0pt},% + underlay@vignette={last}{#1,north size=0pt}% + }, +% + underlay@fading@vignette/.style 2 args={underlay #1={% + \begin{tcbclipframe}\tcbvignette{% + draw method=clipped, + north style={white,path fading=semi south}, + east style={black!75,path fading=semi west}, + south style={black,path fading=semi north}, + west style={black!25,path fading=semi east},#2,inside node=frame, + }\end{tcbclipframe}}}, + underlay raised fading vignette/.style={% + underlay@fading@vignette={unbroken}{#1},% + underlay@fading@vignette={first}{#1,south size=0pt},% + underlay@fading@vignette={middle}{#1,north size=0pt,south size=0pt},% + underlay@fading@vignette={last}{#1,north size=0pt}% + }, + % + underlay raised shading vignette/.style={% + underlay vignette={draw method=clipped, + north style={bottom color=tcbcol@frame,top color=tcbcol@frame!33!white}, + east style={left color=tcbcol@frame,right color=tcbcol@frame!66!black}, + south style={top color=tcbcol@frame,bottom color=tcbcol@frame!33!black}, + west style={right color=tcbcol@frame,left color=tcbcol@frame!66!white},#1}}, + % + underlay shade in vignette/.style={% + underlay vignette={draw method=clipped,color from=tcbcol@back to tcbcol@frame,#1}}, +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcbxparse.code.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcbxparse.code.tex new file mode 100644 index 0000000..ac97e00 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcbxparse.code.tex @@ -0,0 +1,288 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcbxparse.code.tex: Code for xparse features +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +%\makeatletter +\tcb@set@library@version{4.14} + +\RequirePackage{xparse}[2013/12/31] + +\tcbset{% + IfNoValueTF/.code args={#1#2#3}{\IfNoValueTF{#1}{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}}, + IfValueTF/.code args={#1#2#3}{\IfValueTF{#1}{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}}, + IfBooleanTF/.code args={#1#2#3}{\IfBooleanTF{#1}{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}}, + verbatim/.style={fontupper=\ttfamily,nobeforeafter,tcbox raise base,top=0pt,bottom=0pt,left=1mm,right=1mm,boxrule=0.3mm} +} + +%-- tcolorbox -- +\long\def\tcb@New@TColorBox#1#2#3{% + \tcb@newenvironment{#1}{#2}{\tcolorbox[#3,options@for=#1]}{\endtcolorbox}} + +\def\DeclareTColorBox{% + \let\tcb@newenvironment\DeclareDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TColorBox% + \tcb@process@newenvironment} + +\def\NewTColorBox{% + \let\tcb@newenvironment\NewDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TColorBox% + \tcb@process@newenvironment} + +\def\RenewTColorBox{% + \let\tcb@newenvironment\RenewDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TColorBox% + \tcb@process@newenvironment} + +\def\ProvideTColorBox{% + \let\tcb@newenvironment\ProvideDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TColorBox% + \tcb@process@newenvironment} + +%-- tcolorbox (total) -- +\long\def\tcb@New@TotalTColorBox#1#2#3#4{% + \expandafter\tcb@newcommand\csname#1\endcsname{#2}{\begin{tcolorbox}[#3,options@for=#1]#4\end{tcolorbox}}} + +\def\DeclareTotalTColorBox{% + \let\tcb@newcommand\DeclareDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTColorBox% + \tcb@process@newcommand} + +\def\NewTotalTColorBox{% + \let\tcb@newcommand\NewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTColorBox% + \tcb@process@newcommand} + +\def\RenewTotalTColorBox{% + \let\tcb@newcommand\RenewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTColorBox% + \tcb@process@newcommand} + +\def\ProvideTotalTColorBox{% + \let\tcb@newcommand\ProvideDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTColorBox% + \tcb@process@newcommand} + +%-- tcbox -- +\long\def\tcb@New@TCBox#1#2#3{% + \expandafter\tcb@newcommand\csname#1\endcsname{#2}{\tcbox[#3,options@for=#1]}} + +\def\DeclareTCBox{% + \let\tcb@newcommand\DeclareDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBox% + \tcb@process@newcommand} + +\def\NewTCBox{% + \let\tcb@newcommand\NewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBox% + \tcb@process@newcommand} + +\def\RenewTCBox{% + \let\tcb@newcommand\RenewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBox% + \tcb@process@newcommand} + +\def\ProvideTCBox{% + \let\tcb@newcommand\ProvideDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBox% + \tcb@process@newcommand} + +%-- tcbox (total) -- +\long\def\tcb@New@TotalTCBox#1#2#3#4{% + \expandafter\tcb@newcommand\csname#1\endcsname{#2}{\tcbox[#3,options@for=#1]{#4}}} + +\def\DeclareTotalTCBox{% + \let\tcb@newcommand\DeclareDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBox% + \tcb@process@newcommand} + +\def\NewTotalTCBox{% + \let\tcb@newcommand\NewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBox% + \tcb@process@newcommand} + +\def\RenewTotalTCBox{% + \let\tcb@newcommand\RenewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBox% + \tcb@process@newcommand} + +\def\ProvideTotalTCBox{% + \let\tcb@newcommand\ProvideDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBox% + \tcb@process@newcommand} + +\DeclareTotalTCBox{\tcboxverb}{ O{} v }{verbatim,#1}{#2} + +%-- tcboxfit -- +\long\def\tcb@New@TCBoxFit#1#2#3{% + \expandafter\tcb@newcommand\csname#1\endcsname{#2}{\tcboxfit[#3,options@for=#1]}} + +\def\DeclareTCBoxFit{% + \let\tcb@newcommand\DeclareDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBoxFit% + \tcb@process@newcommand} + +\def\NewTCBoxFit{% + \let\tcb@newcommand\NewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBoxFit% + \tcb@process@newcommand} + +\def\RenewTCBoxFit{% + \let\tcb@newcommand\RenewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBoxFit% + \tcb@process@newcommand} + +\def\ProvideTCBoxFit{% + \let\tcb@newcommand\ProvideDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBoxFit% + \tcb@process@newcommand} + +\long\def\tcb@New@TotalTCBoxFit#1#2#3#4{% + \expandafter\tcb@newcommand\csname#1\endcsname{#2}{\tcboxfit[#3,options@for=#1]{#4}}} + +\def\DeclareTotalTCBoxFit{% + \let\tcb@newcommand\DeclareDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBoxFit% + \tcb@process@newcommand} + +\def\NewTotalTCBoxFit{% + \let\tcb@newcommand\NewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBoxFit% + \tcb@process@newcommand} + +\def\RenewTotalTCBoxFit{% + \let\tcb@newcommand\RenewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBoxFit% + \tcb@process@newcommand} + +\def\ProvideTotalTCBoxFit{% + \let\tcb@newcommand\ProvideDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TotalTCBoxFit% + \tcb@process@newcommand} + + +%-- tcblisting -- +\long\def\tcb@New@TCBListing#1#2#3{% + \tcb@newenvironment{#1}{#2}{\tcblisting{#3,options@for=#1}}{\endtcblisting}} + +\def\DeclareTCBListing{% + \let\tcb@newenvironment\DeclareDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBListing% + \tcb@process@newenvironment} + +\def\NewTCBListing{% + \let\tcb@newenvironment\NewDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBListing% + \tcb@process@newenvironment} + +\def\RenewTCBListing{% + \let\tcb@newenvironment\RenewDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBListing% + \tcb@process@newenvironment} + +\def\ProvideTCBListing{% + \let\tcb@newenvironment\ProvideDocumentEnvironment% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBListing% + \tcb@process@newenvironment} + +%-- tcbinputlisting -- +\long\def\tcb@New@TCBInputListing#1#2#3{% + \expandafter\tcb@newcommand\csname#1\endcsname{#2}{\tcbinputlisting{#3,options@for=#1}}% +} + +\def\DeclareTCBInputListing{% + \let\tcb@newcommand\DeclareDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBInputListing% + \tcb@process@newcommand} + +\def\NewTCBInputListing{% + \let\tcb@newcommand\NewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBInputListing% + \tcb@process@newcommand} + +\def\RenewTCBInputListing{% + \let\tcb@newcommand\RenewDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBInputListing% + \tcb@process@newcommand} + +\def\ProvideTCBInputListing{% + \let\tcb@newcommand\ProvideDocumentCommand% + \let\tcb@process@newtcolorbox@continue\tcb@New@TCBInputListing% + \tcb@process@newcommand} + + +%-- sidebyside -- + +\def\tcb@sbs@content@none{\tcb@sbs@text@left\tcblower\tcb@sbs@text@right} +\def\tcb@sbs@content@left{\box\tcb@upperbox\tcblower\tcb@sbs@text@right} +\def\tcb@sbs@content@right{\tcb@sbs@text@left\tcblower\box\tcb@lowerbox} +\def\tcb@sbs@content@both{\box\tcb@upperbox\tcblower\box\tcb@lowerbox} + +\tcbset{% + sidebyside adapt/.is choice, + sidebyside adapt/none/.style={% + sidebyside@adapt@process/.style={% + code={\let\tcb@sbs@content\tcb@sbs@content@none}, + }% + }, + sidebyside adapt/left/.style={% + sidebyside@adapt@process/.style={% + code={\sbox{\tcb@upperbox}{\tcb@sbs@text@left}\let\tcb@sbs@content\tcb@sbs@content@left}, + lefthand width=\wd\tcb@upperbox, + }% + }, + sidebyside adapt/right/.style={% + sidebyside@adapt@process/.style={% + code={\sbox{\tcb@lowerbox}{\tcb@sbs@text@right}\let\tcb@sbs@content\tcb@sbs@content@right}, + righthand width=\wd\tcb@lowerbox, + }% + }, + sidebyside adapt/both/.style={% + sidebyside@adapt@process/.style={% + code={\sbox{\tcb@upperbox}{\tcb@sbs@text@left}\sbox{\tcb@lowerbox}{\tcb@sbs@text@right}\let\tcb@sbs@content\tcb@sbs@content@both}, + text width=\wd\tcb@upperbox+\kvtcb@sbs@gap+\wd\tcb@lowerbox, + lefthand width=\wd\tcb@upperbox, + }% + }, + % + sidebyside switch/.is choice, + sidebyside switch/true/.style={% + sidebyside@switch/.code={% + \tcb@swap{\tcb@sbs@text@left}{\tcb@sbs@text@right} + }% + }, + sidebyside switch/false/.style={% + sidebyside@switch/.style=% + }, + sidebyside switch/.default=true +} + + +\DeclareTotalTColorBox{\tcbsidebyside}{ +O{} +m +m }{% + code={\long\def\tcb@sbs@text@left{#2}\long\def\tcb@sbs@text@right{#3}},% + #1,% + sidebyside,% + sidebyside@switch,sidebyside@adapt@process% +}{\tcb@sbs@content} + + +\tcbset{% + reset@xparse/.style={% + sidebyside adapt=none,sidebyside switch=false,% + }, + initialize@reset=reset@xparse, +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example-poster.pdf b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example-poster.pdf Binary files differnew file mode 100644 index 0000000..a09e161 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example-poster.pdf diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example-poster.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example-poster.tex new file mode 100644 index 0000000..71d1374 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example-poster.tex @@ -0,0 +1,177 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcolorbox-example-poster.tex: a poster example for tcolorbox +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +% arara: pdflatex: { shell: yes } +% arara: pdflatex: { shell: yes } +\documentclass[12pt]{article} + +\usepackage[a3paper,landscape]{geometry} +\usepackage{lipsum} +\usepackage{lmodern} +\usepackage{enumerate} + +\usepackage[poster]{tcolorbox} +\tcbuselibrary{minted} % <- replace by \tcbuselibrary{listings}, if minted does not work for you + +\pagestyle{empty} + +\begin{document} +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ + See [\ref{litA}]: \lipsum[1] + \begin{center} + \tikz \draw[thick,rounded corners=8pt] + (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0); + \quad by [\ref{litB}] + \end{center} + \lipsum[2-3] + [\ref{litC}] + \lipsum[4] + \begin{center} + \tikz \shadedraw [left color=red,right color=blue] + (0,0) rectangle (2,2); + \end{center} + That's all. +} + +%---- +\posterbox[adjusted title=Central Picture, + interior style={fill overzoom image=blueshade.png}] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm,leftupper=0pt,rightupper=0pt] + {name=algorithm,column=4,between=top and references} +\begin{tcblisting}{blankest,listing only} +\begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} + +\begin{tikzpicture}[very thick,radius=1cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} +\end{tcblisting} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact,fit,fit basedim=12pt] + {name=contact,column*=4,span=1.5,between=process and bottom}{ + \lipsum[2] +} + +\end{tcbposter} +\end{document} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example.pdf b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example.pdf Binary files differnew file mode 100644 index 0000000..b6464bb --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example.pdf diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example.tex new file mode 100644 index 0000000..51a4ddf --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-example.tex @@ -0,0 +1,230 @@ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcolorbox-example.tex: an example for tcolorbox +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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{article} +\usepackage{tikz,lipsum,lmodern} +\usepackage[most]{tcolorbox} + +\begin{document} + +%---------------------------------------------------------- +\section{Colored boxes} + +\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + My box. +\end{tcolorbox} + +\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title=My title] + My box with my title. +\end{tcolorbox} + +\begin{tcolorbox}[colback=green!5!white,colframe=green!75!black] + Upper part of my box. + \tcblower + Lower part of my box. +\end{tcolorbox} + +\begin{tcolorbox}[colback=yellow!5!white,colframe=yellow!50!black, + colbacktitle=yellow!75!black,title=My title] + I can do this also with a title. + \tcblower + Lower part of my box. +\end{tcolorbox} + +\begin{tcolorbox}[colback=yellow!10!white,colframe=red!75!black,lowerbox=invisible, + savelowerto=\jobname_ex.tex] + Now, we play hide and seek. Where is the lower part? + \tcblower + I'm invisible until you find me. +\end{tcolorbox} + +\begin{tcolorbox}[colback=yellow!10!white,colframe=red!75!black,title=Here I am] + \input{\jobname_ex.tex} +\end{tcolorbox} + + +\begin{tcolorbox}[enhanced,sharp corners=uphill, + colback=blue!50!white,colframe=blue!25!black,coltext=yellow, + fontupper=\Large\bfseries,arc=6mm,boxrule=2mm,boxsep=5mm, + borderline={0.3mm}{0.3mm}{white}] + Funny settings. +\end{tcolorbox} + + +\begin{tcolorbox}[enhanced,frame style image=blueshade.png, + opacityback=0.75,opacitybacktitle=0.25, + colback=blue!5!white,colframe=blue!75!black, + title=My title] + This box is filled with an external image.\par + Title and interior are made partly transparent to show the image. +\end{tcolorbox} + + +\begin{tcolorbox}[enhanced,attach boxed title to top center={yshift=-3mm,yshifttext=-1mm}, + colback=blue!5!white,colframe=blue!75!black,colbacktitle=red!80!black, + title=My title,fonttitle=\bfseries, + boxed title style={size=small,colframe=red!50!black} ] + This box uses a \textit{boxed title}. The box of the title can + be formatted independently from the main box. +\end{tcolorbox} + + +\clearpage +%---------------------------------------------------------- +\section{\LaTeX-Examples} + +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black} +This is a \LaTeX\ example: +\begin{equation} +\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}. +\end{equation} +\end{tcblisting} + + +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side text, + title=Side by side,fonttitle=\bfseries} +This is a \LaTeX\ example: +\begin{equation} +\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}. +\end{equation} +\end{tcblisting} + + +%---------------------------------------------------------- +\section{Theorems} + +\newtcbtheorem[auto counter,number within=section]{theo}% + {Theorem}{fonttitle=\bfseries\upshape, fontupper=\slshape, + arc=0mm, colback=blue!5!white,colframe=blue!75!black}{theorem} + +\begin{theo}{Summation of Numbers}{summation} + For all natural number $n$ it holds: + \begin{equation} + \tcbhighmath{\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}.} + \end{equation} +\end{theo} + +We have given Theorem \ref{theorem:summation} on page \pageref{theorem:summation}. + +\newtcbtheorem[use counter from=theo]{antheo}% + {Theorem}{theorem style=change,oversize,enlarge top by=1mm,enlarge bottom by=1mm, + enhanced jigsaw,interior hidden,fuzzy halo=1mm with green, + fonttitle=\bfseries\upshape,fontupper=\slshape, + colframe=green!75!black,coltitle=green!50!blue!75!black}{antheorem} + +\begin{antheo}{Summation of Numbers}{summation} + For all natural number $n$ it holds: + \begin{equation} + \tcbhighmath{\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}.} + \end{equation} +\end{antheo} + +%---------------------------------------------------------- +\section{Watermarks} + +\begin{tcolorbox}[enhanced,watermark graphics=Basilica_5.png, + watermark opacity=0.3,watermark zoom=0.9, + colback=green!5!white,colframe=green!75!black, + fonttitle=\bfseries, title=Box with a watermark picture] + Here, you see my nice box with a picture as a watermark. + This picture is automatically resized to fit the dimensions + of my box. Instead of a picure, some text could be used or + arbitrary graphical code. See the documentation for more options. +\end{tcolorbox} + +%---------------------------------------------------------- +\section{Boxes in boxes} +\begin{tcolorbox}[colback=yellow!10!white,colframe=yellow!50!black, + every box/.style={fonttitle=\bfseries},title=Box] + \begin{tcolorbox}[enhanced,colback=red!10!white,colframe=red!50!black, + colbacktitle=red!85!black, + title=Box inside box,drop fuzzy shadow] + \begin{tcolorbox}[beamer,colframe=blue!50!black,title=Box inside box inside box] + And now for something completely different: Boxes!\par\medskip + \newtcbox{\mybox}[1][]{nobeforeafter,tcbox raise base,colframe=green!50!black,colback=green!10!white, + sharp corners,top=1pt,bottom=1pt,before upper=\strut,#1} + \mybox[rounded corners=west]{This} \mybox{is} \mybox{another} \mybox[rounded corners=east]{box.} + \end{tcolorbox} + \end{tcolorbox} +\end{tcolorbox} + + + +%---------------------------------------------------------- +\section{Breakable Boxes} +\begin{tcolorbox}[enhanced jigsaw,breakable,pad at break*=1mm, + colback=blue!5!white,colframe=blue!75!black,title=Breakable box, + watermark color=white,watermark text=\Roman{tcbbreakpart}] + \lipsum[1-12] +\end{tcolorbox} + +%---------------------------------------------------------- +\clearpage +\section{Fit Boxes} + +\begin{tcolorbox}[enhanced,fit to height=10cm, + colback=green!25!black!10!white,colframe=green!75!black,title=Fit box (10cm), + drop fuzzy shadow,watermark color=white,watermark text=Fit] + \lipsum[1-4] +\end{tcolorbox} + +\begin{tcolorbox}[enhanced,fit to height=5cm, + colback=green!25!black!10!white,colframe=green!75!black,title=Fit box (5cm), + drop fuzzy shadow,watermark color=white,watermark text=Fit] + \lipsum[1-4] +\end{tcolorbox} + +%---------------------------------------------------------- +\begin{tcolorbox}[tile,size=fbox,boxsep=2mm,boxrule=0pt, + colback=blue!20!black,colbacktitle=yellow!40!black, + phantom={\thispagestyle{empty}}, + title=\section{Rasters of Boxes},spread=-1cm] + \begin{tcbitemize}[raster columns=3,raster rows=4,raster equal skip=2mm, + raster height=\tcbtextheight, + title={Box~\thetcbrasternum},fonttitle=\bfseries, + enhanced,colframe=blue!50,colback=blue!5] + \tcbitem A + \tcbitem[flip title={interior hidden}] B + \tcbitem[colbacktitle=blue!40!black] C + \tcbitem[colbacktitle=blue!40!black,flip title] D + \tcbitem[beamer] E + \tcbitem[tile,colbacktitle=red!40!black] F + \tcbitem[tile,colbacktitle=red!40!black,flip title={sharp corners}] G + \tcbitem[blankest] + \begin{tcbitemize}[raster columns=2,raster rows=2,raster height=\tcbtextheight, + tile,halign=center,valign=center,fontupper=\bfseries\Huge,before upper=\strut, + colback=green!20] + \tcbitem a + \tcbitem b + \tcbitem c + \tcbitem d + \end{tcbitemize} + \tcbitem[widget] I + \tcbitem[frame style image=goldshade,opacityback=0.5,colback=white] J + \tcbitem[frame style image=blueshade,opacityback=0.5,colback=white, + center title,flip title={frame hidden,opacityback=0.25,colback=black}] K + \tcbitem[octogon arc,arc is angular,halign=center,valign=center, + detach title,watermark text={\tcbtitletext}] L + \end{tcbitemize} +\end{tcolorbox} + + + +\end{document} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-tutorial-poster.pdf b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-tutorial-poster.pdf Binary files differnew file mode 100644 index 0000000..05ab9ff --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-tutorial-poster.pdf diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-tutorial-poster.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-tutorial-poster.tex new file mode 100644 index 0000000..6207c42 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox-tutorial-poster.tex @@ -0,0 +1,1383 @@ +% \LaTeX-Main\ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcolorbox-tutorial-poster.tex: a tutorial for poster creation with tcolorbox +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +% arara: pdflatex: { shell: yes } +% arara: pdflatex: { shell: yes } +\documentclass[12pt]{article} + +\usepackage[a3paper,landscape]{geometry} +\usepackage{lipsum} +\usepackage{lmodern} +\usepackage{enumerate} + +\usepackage[poster]{tcolorbox} +\tcbuselibrary{minted} % <- replace by \tcbuselibrary{listings}, if minted does not work for you + +\pagestyle{empty} + + +\newtcolorbox[auto counter]{guide}[1][]{enhanced jigsaw,inherit height, + colback=red!5,opacityback=0.9,colframe=red,title=Poster Tutorial \#\thetcbcounter, + grow to left by=8mm,grow to right by=8mm, + arc is angular,arc=3mm, + fonttitle=\bfseries\large, + fuzzy halo=4mm with blue!50!red,#1 +} + +\tcbset{ + mylisting/.style={enhanced jigsaw,size=minimal,toprule=0.5mm,bottomrule=0.5mm,boxsep=2mm,oversize, + colback=white,opacityback=0.75,listing only} +} + +\newtcblisting{guidelisting}[1]{mylisting,#1} + + +\begin{document} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\begin{tcbposter}[ + coverage = {spread}, + poster = {showframe,columns=4,rows=5}, +] + + +\begin{posterboxenv}[blankest]{column=2,span=2,at=middle} +\begin{guide}[toptitle=3mm,before title={\begin{center} +Thomas F.~Sturm\\ +\Large A Tutorial for Poster Creation with Tcolorbox +\end{center}}] +Welcome to the poster tutorial! +\tcbline +We start at the very begin with an empty poster.\par\medskip +In this tutorial, we use A3 sized paper in landscape format which can +be set up with the \texttt{geometry} package. +Naturally, we need the \texttt{tcolorbox} package with at least the +\texttt{poster} library loaded.\par +At begin, we only choose the number of columns (4) and rows (5) and +we display a help grid.\par\medskip + +\begin{guidelisting}{} +\documentclass[12pt]{article} +\usepackage[a3paper,landscape]{geometry} +\usepackage[poster]{tcolorbox} +\pagestyle{empty} + +\begin{document} +\begin{tcbposter}[ + coverage = {spread}, + poster = {showframe,columns=4,rows=5}, +] +% Here, we insert the poster content later +\end{tcbposter} +\end{document} +\end{guidelisting} +\end{guide} +\end{posterboxenv} + +\end{tcbposter} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe,columns=4,rows=5}, +] + +\begin{posterboxenv}[blankest]{column=2,span=2,above=bottom} +\begin{guide} +Now, we put in some fancy settings to the poster \texttt{coverage}.\par +Also, some more packages are loaded for the future poster content. +\par\medskip + +\begin{guidelisting}{} +\documentclass[12pt]{article} +\usepackage[a3paper,landscape]{geometry} +\usepackage{lipsum} +\usepackage{lmodern} +\usepackage{enumerate} +\usepackage[poster]{tcolorbox} +\tcbuselibrary{minted} % <- replace by \tcbuselibrary{listings}, if minted does not work for you +\pagestyle{empty} + +\begin{document} +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe,columns=4,rows=5}, +] +% Here, we insert the poster content later +\end{tcbposter} +\end{document} +\end{guidelisting} +\end{guide} +\end{posterboxenv} + +\end{tcbposter} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe,columns=4,rows=5}, +] + +%---- +\posterbox{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ +} + +%---- +\posterbox[adjusted title=Process]{name=process,column=2,span=2,above=references}{ +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ +} + +%---- +\posterbox[adjusted title=Central Picture] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=3,span=2,at=middle} +\begin{guide} +It is time to fill boxes into the \texttt{poster} environment. +This is the most crucial part of your poster creation, because you have +to decide about the general contents and the base design.\par +But, as you can see in the listing below, the boxes are placed with +relative positions to each other and the sizes are able to change +automatically. +\par\medskip + +\begin{guidelisting}{} +%... +\posterbox{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{} + +\posterbox[adjusted title=Process]{name=process,column=2,span=2,above=references}{} + +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{} + +\posterbox[adjusted title=Central Picture] + {name=picture,column=3,between=title and process}{} + +\posterbox[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references}{} + +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{} +%... +\end{guidelisting} +\medskip +The \texttt{project} box is made breakable. Note the two parts +\texttt{project1} and \texttt{project2} where the second part is +denoted by a placeholder. +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ +} + +%---- +\posterbox[adjusted title=Process]{name=process,column=2,span=2,above=references}{ +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ +} + +%---- +\posterbox[adjusted title=Central Picture] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=3,span=2,at=middle} +\begin{guide} +As next step, we choose some nice settings for all the boxes. These +global settings are applied using the \texttt{boxes} option of +the poster.\par +Also, we do not need the auxiliary frame lines anymore and we set +\texttt{showframe=false}. +\par\medskip + +\begin{guidelisting}{} +%... +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] +%... +\end{guidelisting} +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ +} + +%---- +\posterbox[adjusted title=Process]{name=process,column=2,span=2,above=references}{ +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ +} + +%---- +\posterbox[adjusted title=Central Picture] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=2,span=2,below=title,yshift=-5mm} +\begin{guide}[grow to left by=8mm,grow to right by=8mm,] +We make the \texttt{title} box different from the other boxes by removing +everything except the background. Also, two pictures are added left and +right which should be seen as logos or similar things. +\par\medskip + +\begin{guidelisting}{} +%... +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} +%... +\end{guidelisting} +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process]{name=process,column=2,span=2,above=references}{ +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ +} + +%---- +\posterbox[adjusted title=Central Picture] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=2,span=2,above=references,yshift=5mm} +\begin{guide} +The \texttt{references} box is filled with a simple \texttt{enumerate} list.\par +You may insert a more fancier and \LaTeX ier bibliography for your real project \ldots +\par\medskip + +\begin{guidelisting}{} +%... +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} +%... +\end{guidelisting} +\medskip +Surely, you noted that all boxes adapt to the grown height of our +\texttt{references} box. Maybe, you want to get some pages back to see +how the box placements were done for this example. +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ +} + +%---- +\posterbox[adjusted title=Central Picture] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=2,span=2,above=process,yshift=5mm} +\begin{guide} +We go on with the \texttt{process} which gets some example \texttt{tikzpicture}.\par +Note that you always can insert additional \texttt{tcolorbox} options like +\texttt{halign=center} to a \texttt{posterbox}. +\par\medskip +\begin{guidelisting}{} +%... +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} +%... +\end{guidelisting} +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ + See [\ref{litA}]: \lipsum[1] + \begin{center} + \tikz \draw[thick,rounded corners=8pt] + (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0); + \quad by [\ref{litB}] + \end{center} + \lipsum[2-3] + [\ref{litC}] + \lipsum[4] + \begin{center} + \tikz \shadedraw [left color=red,right color=blue] + (0,0) rectangle (2,2); + \end{center} + That's all. +} + +%---- +\posterbox[adjusted title=Central Picture] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=3,span=2,at=middle} +\begin{guide} +The \texttt{project} is a breakable box with two parts. Nevertheless, +you can fill the box like any other box. The information on how to +break was already given by the placement options. + +\par\medskip +\begin{guidelisting}{} +%... +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ + See [\ref{litA}]: \lipsum[1] + \begin{center} + \tikz \draw[thick,rounded corners=8pt] + (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0); + \quad by [\ref{litB}] + \end{center} + \lipsum[2-3] + [\ref{litC}] + \lipsum[4] + \begin{center} + \tikz \shadedraw [left color=red,right color=blue] + (0,0) rectangle (2,2); + \end{center} + That's all. +} +%... +\end{guidelisting} +\medskip +The two boxes have a \emph{closed} appearance, because we used +\texttt{enhanced standard jigsaw} as global style for all boxes. +For an \emph{open} appearance, just use \texttt{enhanced jigsaw} instead:\par\medskip +\begin{guidelisting}{} +%... +\begin{tcbposter}[ +%... + boxes = { + enhanced jigsaw,% <----------- + sharp corners=downhill,arc=3mm,boxrule=1mm, +%... + } +] +%... +\end{guidelisting} +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ + See [\ref{litA}]: \lipsum[1] + \begin{center} + \tikz \draw[thick,rounded corners=8pt] + (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0); + \quad by [\ref{litB}] + \end{center} + \lipsum[2-3] + [\ref{litC}] + \lipsum[4] + \begin{center} + \tikz \shadedraw [left color=red,right color=blue] + (0,0) rectangle (2,2); + \end{center} + That's all. +} + +%---- +\posterbox[adjusted title=Central Picture, + interior style={fill overzoom image=blueshade.png}] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm] + {name=algorithm,column=4,between=top and references} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=2,span=2,below=picture,yshift=-5mm} +\begin{guide} +In our example, the whole space of the \texttt{picture} box should be +filled with a given picture. This is a piece of cake using a special +\texttt{interior style}: +\par\medskip +\begin{guidelisting}{} +%... +\posterbox[adjusted title=Central Picture, + interior style={fill overzoom image=blueshade.png}] + {name=picture,column=3,between=title and process}{} +%... +\end{guidelisting} +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + +\begin{tcbverbatimwrite}{\jobname.mylist} +%... +\begin{posterboxenv}[adjusted title=Core Algorithm,leftupper=0pt,rightupper=0pt] + {name=algorithm,column=4,between=top and references} +\begin{tcblisting}{blankest,listing only} +\begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} +%... +\end{tikzpicture} +\end{tcblisting} +\end{posterboxenv} +%... +\end{tcbverbatimwrite} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ + See [\ref{litA}]: \lipsum[1] + \begin{center} + \tikz \draw[thick,rounded corners=8pt] + (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0); + \quad by [\ref{litB}] + \end{center} + \lipsum[2-3] + [\ref{litC}] + \lipsum[4] + \begin{center} + \tikz \shadedraw [left color=red,right color=blue] + (0,0) rectangle (2,2); + \end{center} + That's all. +} + +%---- +\posterbox[adjusted title=Central Picture, + interior style={fill overzoom image=blueshade.png}] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm,leftupper=0pt,rightupper=0pt] + {name=algorithm,column=4,between=top and references} +\begin{tcblisting}{blankest,listing only} +\begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} + +\begin{tikzpicture}[very thick,radius=1cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} +\end{tcblisting} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact] + {name=contact,column*=4,span=1.5,between=process and bottom}{ +} + +\begin{posterboxenv}[blankest]{column=2,span=2,below=picture,at=middle} +\begin{guide} +For the Algorithm, we need a \texttt{verbatim} environment. Here, +\texttt{tcblisting} is used.\par +Therefore, we cannot use a \texttt{posterbox} as usual, but we can +a \texttt{posterboxenv} environment instead.\par +Note that you would get some weird errors, if \texttt{posterbox} would have been applied. +\par\medskip +\tcbinputlisting{mylisting,listing file=\jobname.mylist} +\end{guide} +\end{posterboxenv} +\end{tcbposter} + + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ + See [\ref{litA}]: \lipsum[1] + \begin{center} + \tikz \draw[thick,rounded corners=8pt] + (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0); + \quad by [\ref{litB}] + \end{center} + \lipsum[2-3] + [\ref{litC}] + \lipsum[4] + \begin{center} + \tikz \shadedraw [left color=red,right color=blue] + (0,0) rectangle (2,2); + \end{center} + That's all. +} + +%---- +\posterbox[adjusted title=Central Picture, + interior style={fill overzoom image=blueshade.png}] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm,leftupper=0pt,rightupper=0pt] + {name=algorithm,column=4,between=top and references} +\begin{tcblisting}{blankest,listing only} +\begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} + +\begin{tikzpicture}[very thick,radius=1cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} +\end{tcblisting} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact,fit,fit basedim=12pt] + {name=contact,column*=4,span=1.5,between=process and bottom}{ + \lipsum[2] +} + +\begin{posterboxenv}[blankest]{column=2,span=2,above=contact,yshift=5mm} +\begin{guide} +Finally, the \texttt{contact} box is filled. But, in our example case, +there is not much space for a lot of contact text.\par +Therefore, we add \texttt{fit} to fit in the text automatically. +\par\medskip +\begin{guidelisting}{} +%... +\posterbox[adjusted title=Contact,fit,fit basedim=12pt] + {name=contact,column*=4,span=1.5,between=process and bottom}{ + \lipsum[2] +} +%... +\end{guidelisting} +\par\medskip +Our poster is finished now. Just go to the next page to see the final result. +\end{guide} +\end{posterboxenv} + +\end{tcbposter} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=4,rows=5}, + boxes = { + enhanced standard jigsaw,sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,opacityback=0.75,colframe=blue, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\Large\scshape + } +] + +%---- +\posterbox[blankest,interior engine=path,height=3cm, + halign=center,valign=center,fontupper=\bfseries\large,colupper=red!25!black, + underlay={ + \node[right,inner sep=0pt,outer sep=0pt] at (frame.west) {\includegraphics[height=3cm]{pink_marble.png}}; + \node[left,inner sep=0pt,outer sep=0pt] at (frame.east) {\includegraphics[height=3cm]{crinklepaper.png}}; + }, + ]{name=title,column=1,span=3,below=top}{ + \resizebox{18cm}{!}{\bfseries\Huge My Important Project}\\[3mm] + Hans.Mustermann@deepthought.university +} + +%---- +\posterbox[adjusted title=References]{name=references,column=2,span=1.5,above=bottom}{ + \begin{enumerate}[{[1]}] + \item\label{litA} Important Authors, \textit{Important Title} + \item\label{litB} More Important Authors, \textit{More Important Title} + \item\label{litC} Less Important Authors, \textit{Less Important Title} + \end{enumerate} +} + +%---- +\posterbox[adjusted title=Process,halign=center]{name=process,column=2,span=2,above=references}{ + \begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) arc [start angle=0, end angle=240]; + \end{scope} + \end{tikzpicture} +} + +%---- +\posterbox[adjusted title=Project Description]{name=project, + sequence=1 between title and bottom then 2 between title and process}{ + See [\ref{litA}]: \lipsum[1] + \begin{center} + \tikz \draw[thick,rounded corners=8pt] + (0,0)--(0,2)--(1,3.25)--(2,2)--(2,0)--(0,2)--(2,2)--(0,0)--(2,0); + \quad by [\ref{litB}] + \end{center} + \lipsum[2-3] + [\ref{litC}] + \lipsum[4] + \begin{center} + \tikz \shadedraw [left color=red,right color=blue] + (0,0) rectangle (2,2); + \end{center} + That's all. +} + +%---- +\posterbox[adjusted title=Central Picture, + interior style={fill overzoom image=blueshade.png}] + {name=picture,column=3,between=title and process}{} + +%---- +\begin{posterboxenv}[adjusted title=Core Algorithm,leftupper=0pt,rightupper=0pt] + {name=algorithm,column=4,between=top and references} +\begin{tcblisting}{blankest,listing only} +\begin{tikzpicture}[very thick,radius=2cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} + +\begin{tikzpicture}[very thick,radius=1cm] + \begin{scope} + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=30]; + \end{scope} + \begin{scope}[xshift=5cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=70]; + \end{scope} + \begin{scope}[xshift=10cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=110]; + \end{scope} + \begin{scope}[xshift=15cm] + \path[draw=black,fill=white] (0,0) circle; + \path[fill=red] (0,0) -- (2,0) + arc [start angle=0, end angle=240]; + \end{scope} +\end{tikzpicture} +\end{tcblisting} +\end{posterboxenv} + +%---- +\posterbox[adjusted title=Contact,fit,fit basedim=12pt] + {name=contact,column*=4,span=1.5,between=process and bottom}{ + \lipsum[2] +} + +\end{tcbposter} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{tcbposter}[ + coverage = { + spread, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={\LaTeX\ Poster}, + watermark color=yellow, + }, + poster = {showframe=false,columns=3,rows=5}, +] + +%---- +\posterbox[blankest]{name=title,column=1,span=1,below=top}{ + \begin{guide}[grow to left by=0mm,grow to right by=-16mm] + Source code for the example poster + \end{guide} +} +\posterbox[blankest,posterset/fontsize=11pt]{name=source, + sequence=1 between title and bottom then + 2 between top and bottom then + 3 between top and bottom + }{% + \tcbinputlisting{standard jigsaw,size=minimal,toprule=0.5mm,bottomrule=0.5mm,boxsep=2mm, + colback=white,opacityback=0.75,listing only, + enforce breakable,tcb@poster@boxheight,before skip=-\interlineskip,height fixed for=all, + minted options={tabsize=2,fontsize=\small,breaklines,breakafter={,]-}}, + listing file=tcolorbox-example-poster.tex}% + } +\end{tcbposter} + + +\end{document} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.abstract.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.abstract.tex new file mode 100644 index 0000000..ecd45a3 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.abstract.tex @@ -0,0 +1,116 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\begin{tcboutputlisting} +% \usepackage{incgraph} +\begin{inctext} +\begin{tikzpicture} +\definecolorseries{boxcol}{rgb}{last}{blue}{red} +\resetcolorseries[28]{boxcol} +\coordinate (A) at (0,0); \coordinate (B) at (21,29.7); +\path[use as bounding box] (A) rectangle coordinate (C) (B); +\node[transform shape,xslant=0.7,rotate=-10,xshift=0cm] at (C) {% + \begin{tcbraster}[raster columns=4,title=tcolorbox \version, + fonttitle=\small\bfseries,raster width=50cm] + \foreach \b in {1,...,28} {\begin{tcolorbox}[enhanced, + watermark text=\thetcbrasternum, + colframe=boxcol!30!white, + colback=boxcol!25!white!30!white, + colbacktitle=boxcol!!+!50!black!30!white, + colupper=black!30!white]\lipsum[2]\end{tcolorbox}} + \end{tcbraster}% +}; +\node at (C) {% + \begin{tcbitemize}[title=tcolorbox \version,fonttitle=\small\bfseries, + enhanced jigsaw,opacityback=0.5,opacitybacktitle=0.75, + halign=center,valign=center,arc=5mm, + raster width=16cm,raster column skip=8mm,raster halign=center, + raster force size=false, + raster row 1/.style={height=6cm}, + raster row 2/.style={width=6cm,height=4cm}, + raster column 1/.style={flushright title, + frame style={left color=yellow!50!black,right color=green!50!black}, + title style={left color=yellow!50!blue,right color=blue!50!green!50!black}, + interior style={left color=yellow!70,right color=green!70}, + underlay={\draw[line width=6mm,line cap=round,black!60] + ([shift={(0.4,-0.15)}]frame.north east) + --([shift={(0.4,0.15)}]frame.south east); }}, + raster column 2/.style={ + frame style={left color=green!50!black,right color=yellow!50!black}, + title style={left color=blue!50!green!50!black,right color=yellow!50!blue}, + interior style={left color=green!70,right color=yellow!70}}] + \tcbitem[fontupper=\Huge\bfseries,sharp corners=east, + underlay={\draw[line width=6mm,line cap=round,black!60] + ([shift={(0.4,0.30)}]frame.north east)-- coordinate(A) +(0,0.2); + \draw[line width=1mm,line cap=round,black!60](A) -- +(30:1.5cm); + \draw[line width=1mm,line cap=round,black!60](A) -- +(150:1.5cm);}] + tcolorbox + \tcbitem[fontupper=\large\bfseries,sharp corners=west] + Manual for\\ version\\ \version\\(\datum) + \tcbitem[sharp corners=northeast] + \tcbitem[sharp corners=northwest] Thomas F.~Sturm + \end{tcbitemize}% +}; +\end{tikzpicture} +\end{inctext} +\end{tcboutputlisting} +\tcbuselistingtext +\tcbinputlisting{title=Cover code, + base example,coltitle=black,fonttitle=\itshape,titlerule=0pt, + colbacktitle=Navy!15!ExampleBack,top=0mm,before=\par\smallskip,% + listing style=mydocumentation,listing only} + +%\bigskip +%\begin{marker} +%If you have trouble printing this document, the reason is quite likely the +%cover page. Printing the pages starting with page 2 or page 3 should work. +%\end{marker} + +\clearpage +\begin{center} +\begin{tcolorbox}[enhanced,hbox,tikznode,left=8mm,right=8mm,boxrule=0.4pt, + colback=white,colframe=black!50!yellow, + %drop fuzzy midday shadow=black!50!yellow, + drop lifted shadow=black!50!yellow,arc is angular, + before=\par\vspace*{5mm},after=\par\bigskip] +{\bfseries\LARGE The \texttt{tcolorbox} package}\\[3mm] +{\large Manual for version \version\ (\datum)} +\end{tcolorbox} +{\large Thomas F.~Sturm% + \footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik, + Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany; + email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}}\par\medskip +\normalsize\url{http://www.ctan.org/pkg/tcolorbox}\par +\url{https://github.com/T-F-S/tcolorbox}} +\end{center} +\bigskip +\begin{absquote} + \begin{center}\bfseries Abstract\end{center} + |tcolorbox| provides an environment for colored and framed text boxes with a + heading line. Optionally, such a box can be split in an upper and a lower + part. The package |tcolorbox| can be used for the setting of \LaTeX\ examples where + one part of the box displays the source code and the other part shows the + output. Another common use case is the setting of theorems. The package supports + saving and reuse of source code and text parts. +\end{absquote} + +\begin{tcolorbox}[breakable,enhanced jigsaw,title={Contents},fonttitle=\bfseries\Large, + colback=yellow!10!white,colframe=red!50!black,before=\par\bigskip\noindent, + interior style={fill overzoom image=goldshade.png,fill image opacity=0.25}, + colbacktitle=red!50!yellow!75!black, + enlargepage flexible=\baselineskip,pad at break*=3mm, + watermark color=yellow!75!red!25!white, + watermark text={\bfseries\Large Contents}, + attach boxed title to top center={yshift=-0.25mm-\tcboxedtitleheight/2,yshifttext=2mm-\tcboxedtitleheight/2}, + boxed title style={enhanced,boxrule=0.5mm, + frame code={ \path[tcb fill frame] ([xshift=-4mm]frame.west) -- (frame.north west) + -- (frame.north east) -- ([xshift=4mm]frame.east) + -- (frame.south east) -- (frame.south west) -- cycle; }, + interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) + -- (interior.north west) -- (interior.north east) + -- ([xshift=2mm]interior.east) -- (interior.south east) -- (interior.south west) + -- cycle;} }, + drop fuzzy shadow] +\makeatletter +\@starttoc{toc} +\makeatother +\end{tcolorbox} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.bib b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.bib new file mode 100644 index 0000000..7ecc964 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.bib @@ -0,0 +1,194 @@ +@manual{heinz:2015a, + author = {Carsten Heinz and Brooks Moses and Jobst Hoffmann}, + title = {The Listings Package}, + url = {http://mirror.ctan.org/macros/latex/contrib/listings/listings.pdf}, + version = {1.6}, + date = {2015-06-04}, + language = {english} +} + + +@manual{schoepf:2001a, + author = {Rainer Sch{\"o}pf and Bernd Raichle and Chris Rowley}, + title = {A New Implementation of {\LaTeX}'s verbatim and verbatim* Environments}, + url = {http://mirror.ctan.org/macros/latex/required/tools/verbatim.pdf}, + date = {2001-03-12}, +} + +@techreport{sturm:2007b, + author = {Thomas F. Sturm}, + title = {Mathematik 1 (B.Eng.)}, + type = {Vorlesungs-Skriptum}, + institution = {Universit{\"a}t der Bundeswehr M{\"u}nchen}, + address = {Neubiberg}, + url = {http://www.unibw.de/bw/sturm}, + year = 2007, + language = {german} +} + +@techreport{sturm:2008b, + author = {Thomas F. Sturm}, + title = {Mathematik 2 (B.Eng.)}, + type = {Vorlesungs-Skriptum}, + institution = {Universit{\"a}t der Bundeswehr M{\"u}nchen}, + address = {Neubiberg}, + url = {http://www.unibw.de/bw/sturm}, + year = 2008, + language = {german} +} + +@techreport{sturm:2010a, + author = {Thomas F. Sturm}, + title = {H{\"o}here Mathematik: Fortgeschrittene mathematische Methoden (M.Eng.)}, + type = {Vorlesungs-Skriptum}, + institution = {Universit{\"a}t der Bundeswehr M{\"u}nchen}, + address = {Neubiberg}, + url = {http://www.unibw.de/bw/sturm}, + year = 2010, + language = {german} +} + +@book{sturm:2014g, + author = {Thomas F. Sturm}, + title = {{\LaTeX} -- Einf\"uhrung in das Textsatzsystem}, + publisher = {Regionales Rechenzentrum für Niedersachsen (RRZN)}, + address = {Hannover}, + edition = 10, + series = {RRZN-Handb\"ucher}, + url = {http://www.rrzn.uni-hannover.de/buch.html?&titel=latex}, + date = {2014-03}, + language = {german} +} + + +@manual{tantau:2015a, + author = {Till Tantau}, + title = {The TikZ and PGF Packages}, + subtitle = {Manual for version 3.0.1a}, + url = {http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf}, + date = {2015-08-29}, +} + + +@manual{carlisle:2007a, + author = {David Carlisle}, + title = {The file ltxdoc.dtx for use with \LaTeXe}, + url = {http://mirror.ctan.org/macros/latex/base/ltxdoc.dtx}, + date = {2007-11-11} +} + +@manual{carlisle:2014a, + author = {David Carlisle}, + title = {The tabularx package}, + url = {http://mirror.ctan.org/macros/latex/required/tools/tabularx.pdf}, + date = {2014-10-28} +} + + +@manual{mittelbach:2011a, + author = {Frank Mittelbach}, + title = {The doc and shortvrb Packages}, + url = {http://mirror.ctan.org/macros/latex/base/doc.dtx}, + date = {2011-06-30} +} + +@manual{breitenlohner:1998a, + author = {Peter Breitenlohner}, + title = {The $\varepsilon$-\TeX\ manual}, + version = {2}, + url = {http://mirrors.ctan.org/systems/doc/etex/etex_man.pdf}, + date = {1998-02}, +} + +@manual{oberdiek:2011a, + author = {Heiko Oberdiek}, + title = {The listingsutf8 package}, + url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/listingsutf8.pdf}, + date = {2011-11-10}, +} + +@manual{robertson:2014a, + author = {Will Robertson}, + title = {A couple of things involving environments}, + url = {http://mirror.ctan.org/macros/latex/contrib/environ/environ.pdf}, + date = {2014-05-04}, +} + + +@manual{lehmann:2015a, + author = {Philipp Lehman and Joseph Wright}, + title = {The etoolbox Package}, + url = {http://mirror.ctan.org/macros/latex/contrib/etoolbox/etoolbox.pdf}, + date = {2015-08-02}, +} + + +@manual{cubitt:2013a, + author = {Toby Cubitt}, + title = {The cleveref Package}, + url = {http://mirror.ctan.org/macros/latex/contrib/cleveref/cleveref.pdf}, + date = {2013-12-28}, +} + +@manual{rudolph:2011a, + author = {Konrad Rudolph}, + title = {The minted package}, + subtitle = {Highlighted source code in \LaTeX}, + url = {http://mirror.ctan.org/macros/latex/contrib/minted/minted.pdf}, + date = {2011-09-17}, +} + +@manual{poore:2015a, + author = {Geoffrey M. Poore and Konrad Rudolph}, + title = {The minted package}, + subtitle = {Highlighted source code in \LaTeX}, + url = {http://mirror.ctan.org/macros/latex/contrib/minted/minted.pdf}, + date = {2015-09-09}, +} + +@online{pygments:2013, + title = {Pygments}, + subtitle = {Python syntax highlighter}, + date = {2013}, + url = {http://pygments.org/}, +} + +@manual{latexproject:2015a, + author = {The \LaTeX3 Project}, + title = {The xparse Package}, + url = {http://mirror.ctan.org/macros/latex/contrib/l3packages/xparse.pdf}, + date = {2015-10-14}, +} + + +@manual{arseneau:2011a, + author = {Donald Arseneau}, + title = {The varwidth package}, + url = {http://mirrors.ctan.org/macros/latex/contrib/varwidth/varwidth-doc.pdf}, + date = {2011-09-26}, +} + +@manual{mittelbach:2015a, + author = {Frank Mittelbach}, + title = {An environment for multicolumn output}, + url = {http://mirror.ctan.org/macros/latex/required/tools/multicol.pdf}, + date = {2015-09-30}, +} + + +@manual{rahtz:2012a, + author = {Sebastian Rahtz and Heiko Oberdiek}, + title = {Hypertext marks in \LaTeX: a manual for hyperref}, + url = {http://mirrors.ctan.org/macros/latex/contrib/hyperref/doc/manual.pdf}, + date = {2012-11}, + language = {english} +} + + +@manual{oberdiek:2016a, + author = {Heiko Oberdiek}, + title = {The bookmark package}, + url = {http://mirrors.ctan.org/macros/latex/contrib/oberdiek/bookmark.pdf}, + date = {2016-05-17}, + language = {english} +} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.breakable.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.breakable.tex new file mode 100644 index 0000000..6517287 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.breakable.tex @@ -0,0 +1,842 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{breakable}}\label{sec:breakable}% +\tcbset{external/prefix=external/breakable_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{breakable} +\end{dispListing} + +\subsection{Technical Overview} +The library \mylib{breakable} supports the automatic breaking of a |tcolorbox|. +This feature is enabled by \refKey{/tcb/breakable} +and disabled by \refKey{/tcb/unbreakable}. + +{ +\tcbset{colframe=Navy,colback=AliceBlue,fonttitle=\bfseries, + watermark color=AliceBlue!85!Navy,enhanced} +If a |tcolorbox| is set to be \refKey{/tcb/breakable}, then the following +algorithm is executed: +\begin{enumerate} +\item The box content is read to a box register similar but not identical + to the unbreakable case. +\item If the total box fits into the current page, it is shipped out visibly + unbroken and the algorithm stops. + \begin{tcolorbox}[title=Unbroken Box,watermark text=unbroken] + The box. + \end{tcolorbox} +\item Otherwise, it is checked if at least \refKey{/tcb/lines before break} + of the upper box can be placed on the current page. + If not, a page break is inserted and the algorithm goes back to Step 2. +\item Now, the \emph{break sequence} starts. + The upper box part or the lower box part is split such that it fits + into the current page. The fitting part is named \emph{first part} of + the \emph{break sequence} and shipped out. + \begin{tcolorbox}[title=Broken Box,watermark text=first,skin=enhancedfirst] + The box. + \end{tcolorbox} +\item + If the remaining content of the total box + fits into the current page, the algorithm continues with Step 7, else + with Step 6. +\item + The upper box part or the lower box part is split such that it fits + into the current page. The fitting part is named \emph{middle part} of + the \emph{break sequence} and shipped out. + Then, the algorithm goes back to Step 5. + \begin{tcolorbox}[watermark text=middle,skin=enhancedmiddle] + The box. + \end{tcolorbox} +\item + The remaining part is named \emph{last part} of + the \emph{break sequence} and shipped out. The algorithm stops. + \begin{tcolorbox}[watermark text=last,skin=enhancedlast] + The box. + \end{tcolorbox} +\end{enumerate} +} + +The algorithm takes care that the optional segmentation line never appears at +the end of a box. The optional lower box part is also checked to +have at least \refKey{/tcb/lines before break}. + +\clearpage +In principle, all boxes of the \emph{break sequence} share the same geometric +parameters. The differences are: +\begin{itemize} +\item The given \refKey{/tcb/before} and \refKey{/tcb/after} values are + used only before the \emph{first} and after the \emph{last} part + of the \emph{break sequence}. +\item A special behavior between the parts of the \emph{break sequence} can + be given by \refKey{/tcb/toprule at break}, + \refKey{/tcb/bottomrule at break}, + \refKey{/tcb/enlarge top at break by}, and + \refKey{/tcb/enlarge bottom at break by}. +\item The \refKey{/tcb/skin} decides \emph{how} the \emph{first}, \emph{middle}, + and \emph{last} part look like. Actually, every part type has its own + skin given by the options \refKey{/tcb/skin first}, \refKey{/tcb/skin middle}, and + \refKey{/tcb/skin last}. Typically, these options are set automatically by + the main skin, see Subsection \ref{subsec:breaksequence} from + page \pageref{subsec:breaksequence}. +\end{itemize} + + +\subsection{Limitations and Known Bugs} +\begin{itemize} +\item The maximal total height of the upper and of the lower part + of normal breakable |tcolorbox|es is about 65536pt (ca.\,2300cm) + apiece. If such a part gets longer, the output will get buggy + without warning. + For very oversized boxes which are longer than 65536pt, use + the \docValue{unlimited} value for \refKey{/tcb/breakable}. + With the \docValue{unlimited} setting, + the applied algorithm has (virtually) no height limit for boxes, but + very likely the compiler memory will have to be increased for boxes longer + than 300 pages (depending on compiler settings and box content). + But it is recommended to use \docValue{unlimited} for critical large boxes only. + %,since there \emph{may} be a single interline space deviation (lost glue) around + %every 2300cm, e.\,g.\ a \refCom{tcbline*} \emph{may} get lost. +\item You can nest an unbreakable |tcolorbox| inside another |tcolorbox|, + even inside a breakable one. + But you cannot not nest a breakable box inside a breakable box. + The \refKey{/tcb/breakable} key for a nested box is ignored + automatically\footnote{Until |tcolorbox| 3.04, the \refKey{/tcb/breakable} key + was not ignored for nested boxes.}, i.\,e.\ inner + boxes are always unbreakable.\par + After all, in the unlikely case you really want to have the nested box to be breakable, + use \refKey{/tcb/enforce breakable} for the nested + box\footnote{\refKey{/tcb/enforce breakable} acts like \refKey{/tcb/breakable} until |tcolorbox| 3.04.}. + \textbf{But, a breakable box inside a breakable box will usually give a mess.} +\item If your text content contains some text color changing commands, + your color will not survive the break to the next box. + But, with the |fontspec| package and |xelatex| or |lualatex|, + you can use + |\addfontfeatures{Color=mycolor}| + to add a font color which survives the break. +\item\tcbdocmarginnote{\tcbdocnew{2014-10-30}} + The |perpage| option of the |footmisc| package is deliberately deactivated + inside a breakable box since all footnotes are placed at the end + of the box (possibly far away from the reference point). +\item\tcbdocmarginnote{\tcbdocnew{2016-02-15}} + Making a box \refKey{/tcb/breakable} which actually is not broken creates + a box which acts \emph{almost} like an unbreakable box. Visual differences + are kept as indiscernible as possible, but can appear with certain + \refKey{/tcb/before} and \refKey{/tcb/after} settings, especially, if there + is an automatic page break before the box. +\item\tcbdocmarginnote{\tcbdocnew{2016-05-25}} + Lua\TeX\ version 0.95 changes the behaviour of the basic |\vsplit| (a bug?!) + resulting in badly broken boxes. Thanks to Jeremy Engel, + the \mylib{breakable} library contains a patch for this which + also loads the the |ifluatex| package. +\end{itemize} + + +\clearpage +\subsection{Main Option Keys} +\begin{docTcbKey}[][doc updated=2017-02-01]{breakable}{\colOpt{=true\textbar false\textbar unlimited}}{default |true|, initially |false|} + Allows the |tcolorbox| to be breakable. If the box is larger than the + available space at the current page, the box is automatically broken + and continued to the next next page. All sorts of |tcolorbox| can be made + breakable. It depends on the skin how the breaking looks like. + If you do not know better, use \refKey{/tcb/enhanced} for breaking a box. + The parts of the \emph{break sequence} are numbered + by the counter |tcbbreakpart|. + \begin{itemize} + \item\docValue{false}: Sets the |tcolorbox| to be unbreakable. + \item\docValue{true}: Breaks the |tcolorbox| from one page to another. + The maximal total height of the upper and of the lower part is + about 65536pt (ca.\,2300cm or ca.\,90 pages) apiece. + \item\docValue{unlimited}: Experimental code for unlimited total height of + breakable boxes. + %There \emph{may} be a single interline space deviation (lost glue) around every 2300cm. + For boxes longer than 300 pages (or even shorter ones) the + compiler memory will have to be increased. + \end{itemize} + +\begin{dispListing} +% \usepackage{lipsum} % preamble +\tcbset{enhanced jigsaw,colback=red!5!white,colframe=red!75!black, + watermark color=yellow!25!white,watermark text=\arabic{tcbbreakpart}, + fonttitle=\bfseries} + +\begin{tcolorbox}[breakable,title=My breakable box] +\lipsum[1-6] +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} +{\tcbusetemp} + + +\begin{docTcbKey}{unbreakable}{}{no value, initially set} + Sets the |tcolorbox| to be unbreakable. +\end{docTcbKey} + + +\begin{docTcbKey}{enforce breakable}{}{no value} + A |tcolorbox| inside a |tcolorbox| is automatically set to be unbreakable. + Using \refKey{/tcb/breakable} on such an inner box has no effect. + If one \emph{really} wants the inner box to be breakable, use \refKey{/tcb/enforce breakable}. + \textbf{This will usually give a mess of shattered boxes. You are advised to not use this option.}\\ + Note that \refKey{/tcb/enforce breakable} has the functionality + that \refKey{/tcb/breakable} had until package version 3.04 + and exists for backward compatibility. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2018-07-26]{title after break}{=\meta{text}}{no default, initially empty} + The \refKey{/tcb/title} is used only for the \emph{first} part of a + \emph{break sequence}. Use |title after break| to create a heading line + with \meta{text} as content for all following parts. + Also see \refKey{/tcb/extras title after break} for formatting the title text. +\end{docTcbKey} + + +\begin{docTcbKey}{notitle after break}{}{no value, initially set} + Removes the title line or following parts in a \emph{break sequence} if set before. +\end{docTcbKey} + + +\begin{docTcbKey}{adjusted title after break}{=\meta{text}}{style, no default, initially unset} + Works like \refKey{/tcb/adjusted title} but applied to \refKey{/tcb/title after break}. +\end{docTcbKey} + + +\begin{docTcbKey}{lines before break}{=\meta{number}}{no default, initially |2|} + Assures that the given \meta{number} of lines of the upper box part or + the lower box part are placed before a break happens. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc updated=2017-07-05]{break at}{=\meta{length}\colOpt{/\meta{length}/\ldots/\meta{length}}}{no default, initially |0pt|} + Defines break points at the given \meta{length} values. + The first \meta{length} defines the (maximal) height of the first partial box, + the second \meta{length} defines the (maximal) height of the second partial box, + and so on. The last \meta{length} value is applied to all following partial boxes if any. + \begin{itemize} + \item Setting a \meta{length} to |0pt| means that the naturally available + space is used for breaking. + \item Setting a \meta{length} to a negative value means that + the sum of this negative value and the naturally available space is used + for breaking (boxes will shrink in height). + That that before version 4.10 negative values were treated like |0pt|. + \end{itemize} +\begin{dispExample} +% \usepackage{multicol,lipsum} +\begin{multicols}{3}\footnotesize +Breakable boxes inside a |multicols| environment need special attendance. +They are broken by default at |\textheight|. +The |break at| option can be used to insert better break points by hand. +\begin{tcolorbox}[enhanced jigsaw,size=small,vfill before first, + colframe=red,colback=yellow!10!white,before title=\raggedright, + title={Broken box inside a |multicols| environment},fonttitle=\bfseries, + enforce breakable,% use only breakable in the real world! + pad at break=1mm,break at=3cm/6.3cm ] +\lipsum[1] +\end{tcolorbox} +\refKey{/tcb/height fixed for} may also be considered for |multicols| environments. +\end{multicols} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{enlargepage}{=\meta{length}\colOpt{/\meta{length}/\ldots/\meta{length}}}{no default, initially |0pt|} + Inserts a |\enlargethispage|\marg{length} to the pages of the break sequence, + i.\,e.\ allows one to enlarge (or shrink) partial boxes. The first \meta{length} is applied + to the first partial box, the second \meta{length} is applied + to the second partial box, and so on. The last \meta{length} value is applied + to all following partial boxes if any. Note that floating boxes will not be enlarged. +\begin{dispListing} +\begin{tcolorbox}[breakable,enlargepage=0mm/\baselineskip/2\baselineskip/0mm,... +\end{dispListing} + The example code enlarged the second partial box by one line, the third + partial box by two lines, and all following parts are not enlarged. + \begin{marker} + If an automated page break occures before the first partial box, the + page enlargement is applied to the page before the first partial box \emph{and} + again to the page of the first partial box. Insert a manual break to prevent this.\\ + In general, |enlargepage| should be used at the final stage of a document + for fine-tuning only. + \end{marker} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{enlargepage flexible}{=\meta{length}}{no default, initially |0pt|} + This allows an automated page enlargement for up to \meta{length}. + The algorithm can use this to avoid breaking a box, if there is anough room + after enlargement. Also, the \emph{last} partial box of a break sequence + may be enlarged to avoid further breaking.\\ + Note that this potential enlargement is \emph{additive} to settings of + \refKey{/tcb/enlargepage}. + But \refKey{/tcb/enlargepage flexible} overwrites settings of + \refKey{/tcb/pad before break*} or \refKey{/tcb/pad at break*}. +\begin{dispListing} +% The following setting hinders orphan lines for the last partial box +\tcbset{enlargepage flexible=\baselineskip} +\end{dispListing} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-12-15]{compress page}{\colOpt{=\meta{option}}}{default |all|, initially |baselineskip|} + This option controls the space management on the page which contains the + unbroken box or the first part of a \emph{break sequence}. + Feasible \meta{option} values are: + \begin{itemize} + \item\docValue{all} (default value): + All shrinkable glue on the page is potentially used for the + unbroken box or the first part of a \emph{break sequence}. Thus, all + vertical spaces on the page will potentially be reduced to their + minimal values. + \item\docValue{baselineskip} (initial value): + Shrinkable glue up to one |\baselineskip| on the page is potentially used for the + unbroken box or the first part of a \emph{break sequence}. + \item\docValue{none}: + The break algorithm respects the target size of the given glue values + on the page. This was the inital value before version |3.34|. + \end{itemize} + \begin{marker} + Note that the box \emph{content} is not influenced by this option. + \end{marker} +\end{docTcbKey} + + +\begin{docTcbKey}{shrink break goal}{=\meta{length}}{no default, initially |0pt|} + This is an emergency parameter if the break algorithm produces unpleasant + breaks. + It shrinks the goal height of the current box part by \meta{length} + which may result in smaller boxes. Never use negative values. + \emph{Usually, this option will never be needed at all.} +\end{docTcbKey} + + +\clearpage +\subsection{Option Keys for the Break Appearance} + +\begin{docTcbKey}{toprule at break}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the top rule to \meta{length} \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{middle} and \emph{last} parts in a + break sequence. Note that \refKey{/tcb/toprule} overwrites this value + if used afterwards. +\end{docTcbKey} + + +\begin{docTcbKey}{bottomrule at break}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the bottom rule to \meta{length} \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{first} and \emph{middle} parts in a + break sequence. Note that \refKey{/tcb/bottomrule} overwrites this value + if used afterwards. +\end{docTcbKey} + + +\begin{docTcbKey}{topsep at break}{=\meta{length}}{no default, initially \texttt{0mm}} + Additional vertical space of \meta{length} which is added at the top of + \emph{middle} and \emph{last} parts in a break sequence. In general, + it is not advisable to change this value if these parts start with a rule or a title. +\end{docTcbKey} + +\begin{docTcbKey}{bottomsep at break}{=\meta{length}}{no default, initially \texttt{0mm}} + Additional vertical space of \meta{length} which is added at the bottom of + \emph{first} and \emph{middle} parts in a break sequence. + In general, it is not advisable to change this value if these parts end with a rule. +\end{docTcbKey} + +\begin{docTcbKey}{pad before break}{=\meta{length}}{style, no default, initially \texttt{3.5mm}} + Sets the total amount of vertical space after the text content and before the + break point to \meta{length}. This style sets \refKey{/tcb/toprule at break} to |0pt| + and changes \refKey{/tcb/topsep at break} as required. + In general, it is not advisable to change this value if the + \emph{middle} and \emph{last} parts in a break sequence start with a rule or a title. +\end{docTcbKey} + +\begin{docTcbKey}{pad before break*}{=\meta{length}}{style, no default} + Sets \refKey{/tcb/pad before break} to \meta{length} and + \refKey{/tcb/enlargepage flexible} to an appropriate value such that + empty closing frames are avoided. +\end{docTcbKey} + +\begin{docTcbKey}{pad after break}{=\meta{length}}{style, no default, initially \texttt{3.5mm}} + Sets the total amount of vertical space after the break point and before the + text content to \meta{length}. This style sets \refKey{/tcb/bottomrule at break} to |0pt| + and changes \refKey{/tcb/bottomsep at break} as required. + In general, it is not advisable to change this value if the + \emph{first} and \emph{middle} parts in a break sequence end with a rule. +\end{docTcbKey} + +\begin{docTcbKey}{pad at break}{=\meta{length}}{style, no default, initially \texttt{3.5mm}} + Abbreviation for setting \meta{length} to \refKey{/tcb/pad before break} + and \refKey{/tcb/pad after break}. +\end{docTcbKey} + +\begin{docTcbKey}{pad at break*}{=\meta{length}}{style, no default} + Sets \refKey{/tcb/pad at break} to \meta{length} and + \refKey{/tcb/enlargepage flexible} to an appropriate value such that + empty closing frames are avoided. +\end{docTcbKey} + +\begin{dispListing} +% \usepackage{lipsum} % preamble +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced jigsaw,breakable,pad at break*=0mm, + title={For this box, the pad space at the break point is set to 0mm}] + \lipsum[1-2] +\end{tcolorbox} +\end{dispListing} +{\tcbusetemp} + + +\begin{marker} +\refKey{/tcb/pad at break} or \refKey{/tcb/pad at break*} +should be used as very last option in an option list, because +they adapt other settings. +\end{marker} + + +\begin{marker} +Also see \refKey{/tcb/enlarge top at break by} +and \refKey{/tcb/enlarge bottom at break by}. +\end{marker} + + +\begin{docTcbKey}{height fixed for}{=\meta{part}}{no default, initially |none|} + When certain amount of space is available for a partial box of a + break sequence, the partial box typically is smaller than this space + (depending on the box content). For given \meta{part}(s), the height can be + set to all available space. + \begin{itemize} + \item\docValue{none}: Every partial |tcolorbox| is set with its natural height. + \item\docValue{first}: The \emph{first} partial box is set to a height which matches the available space. + \item\docValue{middle}: All \emph{middle} partial boxes are set to a height which matches the available space. + \item\docValue{last}: The \emph{last} partial box is set to a height which matches + the available space. + \item\docValue{first and middle}: The \emph{first} and + all \emph{middle} partial boxes are set to a height which matches the available space. + \item\docValue{middle and last}: All \emph{middle} partial boxes and the \emph{last} partial box + are set to a height which matches the available space. + \item\docValue{all}: All partial boxes are set to a height which matches the available space. + \end{itemize} +\begin{marker} + If the box keeps unbroken, this option is not applied. + See \refKey{/tcb/height} for setting a fixed height for unbroken boxes. + See \refKey{/tcb/height fill} for giving unbroken boxes maximum height. +\end{marker} +\end{docTcbKey} + + +\begin{docTcbKey}{vfill before first}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Inserts a |\vfill| at the begin of the \emph{first} partial box to move this + partial box to the end of the current page. This may be used as an alternative + to \refKey{/tcb/height fixed for}|=|\docValue{first} to get justified + columns or pages. The |\vfill| is not inserted, if the box gets not + actually broken. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-03-20]{segmentation at break}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + If a breakable box contains an \emph{upper part} and a \emph{lower part} and + the break happens at the \emph{segmentation} between both parts, then + \begin{itemize} + \item the segmenation line (or similar) is drawn as first element of the + partial box containing the \emph{lower part}, if \refKey{/tcb/segmentation at break} + is set to be |true|. + \item the segmenation line (or similar) is not drawn at all, if + \refKey{/tcb/segmentation at break} is set to be |false|. + This may be preferable for skins like \refSkin{bicolor}, \refSkin{tile}, + or \refSkin{beamer}. + \end{itemize} +\end{docTcbKey} + + +\clearpage +\subsection{Extra Options for Partial Boxes}\label{subsec:extras} + + +\begin{docTcbKey}[][doc new=2015-07-16]{extras}{=\marg{options}}{no default, initially unset} + Adds |tcolorbox| \meta{options} to every box of a \emph{break sequence} + after skin settings are done. This is quite late in box processing. + Geometry and break settings should \emph{not be used} here, because they + will either be ignored or have unexpected negative results. But it is possible + to change most colors, skin effects, shadows, borders, frame code, etc. + Note that using \refKey{/tcb/extras} for every box is very seldom an + advantage over setting the options directly. Usually, \refKey{/tcb/extras first}, + \refKey{/tcb/extras middle}, etc.\ are sensible to apply. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-07-16]{no extras}{}{style, no default, initially set} + Removes all extras if set before. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-07-16]{extras broken}{=\marg{options}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{options} are added to every box of the \emph{break sequence}. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras unbroken}{=\marg{options}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} but \emph{is not} broken actually + or if the box is set to be \refKey{/tcb/unbreakable}, + then the \meta{options} are added to the box. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{no extras unbroken}{}{style, no default, initially set} + Removes the unbroken extras if set before. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras first}{=\marg{options}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{options} are added to the \emph{first} box of the break sequence. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{no extras first}{}{style, no default, initially set} + Removes the first extras if set before. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras middle}{=\marg{options}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{options} are added to every \emph{middle} box (if any) of the break sequence. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{no extras middle}{}{style, no default, initially set} + Removes the middle extras if set before. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras last}{=\marg{options}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{options} are added to the \emph{last} box of the break sequence. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{no extras last}{}{style, no default, initially set} + Removes the last extras if set before. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras unbroken and first}{=\marg{options}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/extras unbroken} and + \refKey{/tcb/extras first} together. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras middle and last}{=\marg{options}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/extras middle} and + \refKey{/tcb/extras last} together. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\enlargethispage*{1cm} +\begin{docTcbKey}[][doc new=2015-07-16]{extras unbroken and last}{=\marg{options}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/extras unbroken} and + \refKey{/tcb/extras last} together. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-07-16]{extras first and middle}{=\marg{options}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/extras first} and + \refKey{/tcb/extras middle} together. + \refKey{/tcb/extras} overwrites this key. +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}[][doc new=2018-07-26]{extras title after break}{=\marg{options}}{no default, initially unset} + If the box has a \refKey{/tcb/title after break}, then the \meta{options} + are added for all titles after the first break, i.e.\ all middle and last. + The color, font, and alignment of titles after break can be adapted choosing + \meta{options}, e.g.\ by \refKey{/tcb/coltitle}, \refKey{/tcb/fonttitle}, + \refKey{/tcb/halign title}. + Note that \refKey{/tcb/colbacktitle} has to be placed into + \refKey{/tcb/extras middle and last}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2018-07-26]{no extras title after break}{}{style, no default, initially set} + Removes the title after break extras if set before. +\end{docTcbKey} + +\bigskip + +\begin{exdispExample}{extras} +% \usepackage{lipsum,multicol} +% \usetikzlibrary{decorations.pathmorphing} +% \tcbuselibrary{skins} +\newtcolorbox{mybox}[1][]{ + tile, + colback=green!7,coltitle=blue!50!black,colbacktitle=blue!5, + center title, + toprule=1.25mm,bottomrule=1.25mm, + extras unbroken and first={ + borderline north={0.25mm}{0.5mm}{blue,decoration={zigzag,amplitude=0.5mm},decorate}}, + extras unbroken and last={ + borderline south={0.25mm}{0.5mm}{blue,decoration={zigzag,amplitude=0.5mm},decorate}}, + #1 +} + +\begin{mybox}[title=My unbroken box] +\lipsum[1] +\end{mybox} + +\begin{multicols}{3} + \begin{mybox}[title=My broken box, + enforce breakable,% use only breakable in the real world! + break at=4.2cm,pad at break=2mm, + height fixed for=first and middle, ] + \lipsum[2] + \end{mybox} +\end{multicols} +\end{exdispExample} + + + + +\clearpage +\subsection{Breakable boxes and the \texttt{multicol} package}\label{subsec:multicol} +\begin{marker} +With version 4.10, the algorithm for detecting the available height +for a |tcolorbox| inside a |multicol| environment was improved with help +of Frank Mittelbach. This change \emph{may} impact existing user +code which \emph{may} have to be adapted. +\end{marker} + +\begin{multicols}{2} +\begin{tcolorbox}[enhanced jigsaw,size=small,breakable,colback=yellow!10!white, + colframe=red!50!white,break at=3cm,height fixed for=all] +Unbreakable |tcolorbox|es can be used without special care inside a +|multicols| environment from the |multicol| package \cite{mittelbach:2015a}. + +Since version 3.10, a breakable |tcolorbox| detects, if it is used inside +a |multicols| environment. But choosing break points for a breakable box +cannot be done by the balancing routine of |multicols|. By default, boxes +will break at maximum column height. To get pleasant results, use the +\refKey{/tcb/break at} and \refKey{/tcb/height fixed for} options. +\end{tcolorbox} +\end{multicols} + +\enlargethispage{\baselineskip} +\begin{dispListing} +% \usepackage{lipsum,multicol} % preamble +\footnotesize +\begin{multicols}{2} + \lipsum[1] + \begin{tcolorbox}[enhanced jigsaw,breakable,size=title, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + title=My breakable box,pad at break=1mm, break at=-\baselineskip/0pt ] + \lipsum[2-4] + \end{tcolorbox} + \lipsum[4] +\end{multicols} +\end{dispListing} +{\tcbusetemp} + +\clearpage + +\begin{multicols}{2} +\small +This example is already set inside a |multicols| environment. +This time, a \emph{middle} part has full column height (here |\textheight|). +\refKey{/tcb/height fixed for} is used to spread this box part over the full +height to align with neighboring columns. +\begin{dispListing} +% \usepackage{lipsum,multicol} +\lipsum[1] +\begin{tcolorbox}[enhanced jigsaw, + breakable, + size=title, + colback=red!5!white, + colframe=red!75!black, + fonttitle=\bfseries, + title=My breakable box, + pad at break=2mm, + break at=-\baselineskip/0pt, + height fixed for=middle ] +\lipsum[2-7] +\end{tcolorbox} +\lipsum[8] +\end{dispListing} +{\tcbusetemp} +\end{multicols} + + +The following example has a |\tcolorbox| which fills the |\multicols| +environment completely. Here, \refKey{/tcb/height fixed for} is used +to give all three columns the full height. +Note that the appropriate \refKey{/tcb/break at} value is not computed +automatically but set manually. + +\begin{dispListing} +% \usepackage{lipsum,multicol} % preamble +\small +\begin{multicols}{3} + \begin{tcolorbox}[enhanced jigsaw,breakable,size=small, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + title=My breakable box,pad at break=2mm,drop fuzzy shadow, + height fixed for=all, break at=11.4cm ] + \lipsum[1-3] + \end{tcolorbox} +\end{multicols} +\end{dispListing} +{\tcbusetemp} + +\clearpage +\subsection{Break Point Insertion}\label{subsec:breakpoints} + +\begin{docCommand}[doc new=2017-07-05]{tcbbreak}{} + A \emph{breakable} box is not broken, if there is enough + space on the current page or column. + Therefore, typical penalty insertion with + |\break|, |\pagebreak|, |\columnbreak|, \ldots \emph{may} only work as + expected, if the box is broken at least into two parts + \emph{without} inserting the penalties.\par\smallskip + To \emph{force} a page or column break, \refCom{tcbbreak} + starts a new paragraph and inserts an insane tall rule which causes a + break and which is immediately discarded. You may ignore this technical + information and just use it as you would use |\pagebreak|.\par\smallskip + For an \emph{unbreakable box}, \refCom{tcbbreak} is identical to insert |\par|, + i.e.\ it just starts a new paragraph.\par\smallskip + Also see \refKey{/tcb/break at} for defining height dependend breaks. + +\begin{dispListing} +% \usepackage{lipsum,multicol} % preamble +\begin{multicols}{3} + \begin{tcolorbox}[breakable,enhanced jigsaw,size=small, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + title=Break into parts + ] + First part\tcbbreak + Second part\tcbbreak + Third part + \end{tcolorbox} +\end{multicols} + +\begin{multicols}{3} + \begin{tcolorbox}[enhanced jigsaw,size=small, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + title=You shall not break + ] + First part\tcbbreak + Second part\tcbbreak + Third part + \end{tcolorbox} +\end{multicols} + +\end{dispListing} +{\tcbusetemp} + +\end{docCommand} + + + +\clearpage +\subsection{Break Sequence for the Skins}\label{subsec:breaksequence} +The following diagrams document the \emph{break sequence} for different +skins. Depending on the main skin of a |tcolorbox|, the actual skins of +the \emph{break sequence} parts are displayed. + +\def\tcbbreakskininto#1#2#3#4#5{% +\begin{center}\begin{tikzpicture} +\tcbset{width=7cm,colframe=Navy,colback=AliceBlue,fonttitle=\bfseries, + watermark color=AliceBlue!85!Navy,#5 + } +\node[above] (unbroken) at (0,0) {\begin{tcolorbox}[title=Unbroken Box,skin=#1,watermark text=unbroken,height=3.8cm] +\texttt{skin=#1} +\end{tcolorbox}}; +\node[above] (first) at (8.7,2.4) {\begin{tcolorbox}[title=Broken Boxes,skin=#2,watermark text=first,height=1.4cm] +\texttt{skin=#2} +\end{tcolorbox}}; +\node[above] (middle) at (8.7,1.2) {\begin{tcolorbox}[skin=#3,watermark text=middle,height=1cm] +\texttt{skin=#3} +\end{tcolorbox}}; +\node[above] (last) at (8.7,0) {\begin{tcolorbox}[skin=#4,watermark text=last,height=1cm] +\texttt{skin=#4} +\end{tcolorbox}}; +\path[draw=FireBrick,line width=2pt,->] (unbroken) edge (first.west) edge (middle.west) edge (last.west); +\end{tikzpicture}\end{center}} + +\tcbbreakskininto{standard}{standard}{standard}{standard}{watermark text/.style={}} +\tcbbreakskininto{standard jigsaw}{standard jigsaw}{standard jigsaw}{standard jigsaw}{watermark text/.style={}} +\tcbbreakskininto{spartan}{spartan}{spartan}{spartan}{} +\clearpage +\tcbbreakskininto{enhanced}{enhancedfirst}{enhancedmiddle}{enhancedlast}{} +\tcbbreakskininto{enhancedfirst}{enhancedfirst}{enhancedmiddle}{enhancedmiddle}{} +\tcbbreakskininto{enhancedmiddle}{enhancedmiddle}{enhancedmiddle}{enhancedmiddle}{} +\tcbbreakskininto{enhancedlast}{enhancedmiddle}{enhancedmiddle}{enhancedlast}{} +\clearpage +\tcbbreakskininto{enhanced jigsaw}{enhancedfirst jigsaw}{enhancedmiddle jigsaw}{enhancedlast jigsaw}{} +\tcbbreakskininto{enhancedfirst jigsaw}{enhancedfirst jigsaw}{enhancedmiddle jigsaw}{enhancedmiddle jigsaw}{} +\tcbbreakskininto{enhancedmiddle jigsaw}{enhancedmiddle jigsaw}{enhancedmiddle jigsaw}{enhancedmiddle jigsaw}{} +\tcbbreakskininto{enhancedlast jigsaw}{enhancedmiddle jigsaw}{enhancedmiddle jigsaw}{enhancedlast jigsaw}{} +\clearpage +{\tcbset{borderline={2pt}{0pt}{black!10!white}}% +\tcbbreakskininto{empty}{emptyfirst}{emptymiddle}{emptylast}{} +\tcbbreakskininto{emptyfirst}{emptyfirst}{emptymiddle}{emptymiddle}{} +\tcbbreakskininto{emptymiddle}{emptymiddle}{emptymiddle}{emptymiddle}{} +\tcbbreakskininto{emptylast}{emptymiddle}{emptymiddle}{emptylast}{} +} +\clearpage +\tcbbreakskininto{bicolor}{bicolorfirst}{bicolormiddle}{bicolorlast}{bicolor} +\tcbbreakskininto{bicolorfirst}{bicolorfirst}{bicolormiddle}{bicolormiddle}{bicolor} +\tcbbreakskininto{bicolormiddle}{bicolormiddle}{bicolormiddle}{bicolormiddle}{bicolor} +\tcbbreakskininto{bicolorlast}{bicolormiddle}{bicolormiddle}{bicolorlast}{bicolor} +\clearpage +\tcbbreakskininto{tile}{tilefirst}{tilemiddle}{tilelast}{tile,colbacktitle=Navy} +\tcbbreakskininto{tilefirst}{tilefirst}{tilemiddle}{tilemiddle}{tile,colbacktitle=Navy} +\tcbbreakskininto{tilemiddle}{tilemiddle}{tilemiddle}{tilemiddle}{tile,colbacktitle=Navy} +\tcbbreakskininto{tilelast}{tilemiddle}{tilemiddle}{tilelast}{tile,colbacktitle=Navy} +\clearpage +\tcbbreakskininto{beamer}{beamerfirst}{beamermiddle}{beamerlast}{beamer} +\tcbbreakskininto{beamerfirst}{beamerfirst}{beamermiddle}{beamermiddle}{beamer} +\tcbbreakskininto{beamermiddle}{beamermiddle}{beamermiddle}{beamermiddle}{beamer} +\tcbbreakskininto{beamerlast}{beamermiddle}{beamermiddle}{beamerlast}{beamer} +\clearpage +\tcbbreakskininto{widget}{widgetfirst}{widgetmiddle}{widgetlast}{widget} +\tcbbreakskininto{widgetfirst}{widgetfirst}{widgetmiddle}{widgetmiddle}{widget} +\tcbbreakskininto{widgetmiddle}{widgetmiddle}{widgetmiddle}{widgetmiddle}{widget} +\tcbbreakskininto{widgetlast}{widgetmiddle}{widgetmiddle}{widgetlast}{widget} +\tcbbreakskininto{draft}{draft}{draft}{draft}{draft} +\clearpage +\tcbbreakskininto{freelance}{freelancefirst}{freelancemiddle}{freelancelast}{} +\tcbbreakskininto{freelancefirst}{freelancefirst}{freelancemiddle}{freelancemiddle}{} +\tcbbreakskininto{freelancemiddle}{freelancemiddle}{freelancemiddle}{freelancemiddle}{} +\tcbbreakskininto{freelancelast}{freelancemiddle}{freelancemiddle}{freelancelast}{} + + + + +\clearpage +\subsection{Break by Hand (Faked Break)} + +\begin{marker} +See \Vref{subsec:multicol} for \emph{real} column breaks. +\end{marker} + +Since the appearance of broken boxes is done by skins, it is quite easy +to 'fake a break'. For this, you actually don't need the +\mylib{breakable} library at +all. + +\begin{dispExample} +\tcbset{enhanced,equal height group=fakedbreak, + colback=LightGreen,colframe=DarkGreen, + width=(\linewidth-6mm)/3,nobeforeafter, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm} +% +\begin{tcolorbox}[title=My broken box,skin=enhancedfirst] +This is a box which breaks from one column to another +\end{tcolorbox}\hfill +\begin{tcolorbox}[skin=enhancedmiddle] +column. I am sorry to say that this is a trick. +Nevertheless, you may use this trick for your +\end{tcolorbox}\hfill +\begin{tcolorbox}[skin=enhancedlast] +own purposes. +\end{tcolorbox} +\end{dispExample} + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.coremacros.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.coremacros.tex new file mode 100644 index 0000000..795c0ba --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.coremacros.tex @@ -0,0 +1,304 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Macros for Box Creation}% +\tcbset{external/prefix=external/coremacros_}% +\begin{docEnvironment}{tcolorbox}{\oarg{options}} + This is the main environment to create an accentuated colored text box with + rounded corners and, optionally, two parts. The appearance of this box + is controlled by numerous options. + In the most simple case the source code + +\begin{dispListing} +\begin{tcolorbox} +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispListing} + +creates the following compiled text box: +\begin{tcolorbox} +This is a \textbf{tcolorbox}. +\end{tcolorbox} + +The text content of the box can be divided +in an upper and a lower part +by the command \refCom{tcblower}. Visually, both parts are separated by a line. +For example: + +\begin{dispListing} +\begin{tcolorbox} +This is another \textbf{tcolorbox}. +\tcblower +Here, you see the lower part of the box. +\end{tcolorbox} +\end{dispListing} + +This code gives the following box: +\begin{tcolorbox} +This is another \textbf{tcolorbox}. +\tcblower +Here, you see the lower part of the box. +\end{tcolorbox} + +The \meta{options} control the appearance and several functions of the boxes, +see \Vref{sec:optkeys} for the complete list. +A quick example is given here: + +\begin{dispExample} +\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,title=My nice heading] +This is another \textbf{tcolorbox}. +\tcblower +Here, you see the lower part of the box. +\end{tcolorbox} +\end{dispExample} +\end{docEnvironment} + + +\begin{docCommand}{tcblower}{} + Used inside \refEnv{tcolorbox} to separate the upper box part from + the optional lower box part. The upper and the lower part are treated + as separate functional units. If you only want to draw a line, see + \refCom{tcbline}. +\end{docCommand} + + +\clearpage +\begin{docCommand}{tcbset}{\marg{options}} + Sets options for every following \refEnv{tcolorbox} inside the current \TeX\ group. + By default, this does not apply to nested boxes, see \Vref{subsec:everybox}.\par + For example, the colors of the boxes may be defined for the whole document by this: +\begin{dispListing} +\tcbset{colback=red!5!white,colframe=red!75!black} +\end{dispListing} +\end{docCommand} + + +\begin{docCommand}{tcbsetforeverylayer}{\marg{options}} + Sets options for every following \refEnv{tcolorbox} inside the current \TeX\ group. + In contrast to \refCom{tcbset}, this does also + apply to nested boxes, see \Vref{subsec:everybox}. + Technically, the \meta{options} are appended to the default values for every + tcolorbox which are applied by \refKey{/tcb/reset}.\par + You should not use this macro, if you are not completely sure that you + want to have the \meta{options} also for boxes in boxes (in boxes in boxes \ldots). +\begin{dispExample} +\tcbset{colback=green!10!white} +\tcbsetforeverylayer{colframe=red!75!black} + +\begin{tcolorbox}[title=All options for this box] + This is a tcolorbox.\par\medskip + \begin{tcolorbox}[title=Nested box] + Note that this nested box has a red frame but no green background. + \end{tcolorbox} +\end{tcolorbox} +\bigskip + +\begin{tcolorbox}[reset] + Options given with |\tcbsetforeverylayer| survive a |reset|. +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + + +\clearpage +\begin{docCommand}{tcbox}{\oarg{options}\marg{box content}} + Creates a colored box which is fitted to the width of the given + \meta{box content}. In principle, most \meta{options} for a \refEnv{tcolorbox} + can be used for |\tcbox| with some restrictions. A |\tcbox| cannot have + a lower part and cannot be broken. + +\begin{dispExample} +\tcbset{colframe=blue!50!black,colback=white,colupper=red!50!black, + fonttitle=\bfseries,nobeforeafter,center title} + +Text \tcbox[tcbox raise base]{Hello World}\hfill +% +\tcbox[left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=0mm, + toptitle=0.5mm,bottomtitle=0.5mm,title=My table]{% + \arrayrulecolor{blue!50!black}\renewcommand{\arraystretch}{1.2}% + \begin{tabular}{r|c|l} + One & Two & Three \\\hline\hline + Men & Mice & Lions \\\hline + Upper & Middle & Lower + \end{tabular}}\hfill +% +\tcbox[colback=blue!85!black, + left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=0mm,boxrule=0.5pt, + title=My picture]{% + \includegraphics[width=5cm]{Basilica_5.png}} +\end{dispExample} + +\begin{dispExample} +% \usepackage{tikz} +\tcbset{colframe=blue!50!black,colback=white,colupper=red!50!black, + fonttitle=\bfseries,center title} + +% Fixed width box +\begin{tcolorbox}Hello\\World!\end{tcolorbox} + +% Fitted width box (like hbox or makebox) +\tcbox{Hello\\World!} + +% Fitted width box (using a \tikzname\ node) +\tcbox[tikznode]{Hello\\World!} +\end{dispExample} + +\end{docCommand} + +\clearpage +\begin{marker} +See \Vref{subsec:xparse_tcolorbox} and \Vref{subsec:xparse_tcbox} for more +elaborate methods to create new environments and commands. +\end{marker} + +\begin{docCommand}{newtcolorbox}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} + Creates a new environment \meta{name} based on \refEnv{tcolorbox}. + Basically, |\newtcolorbox| operates like |\newenvironment|. This means, + the new environment \meta{name} optionally takes \meta{number} arguments, where + \meta{default} is the default value for the optional first argument. + The \meta{options} are given to the underlying |tcolorbox|. + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically. + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcolorbox{mybox}{colback=red!5!white, + colframe=red!75!black} + +\begin{mybox} +This is my own box. +\end{mybox} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcolorbox{mybox}[1]{colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + title=#1} + +\begin{mybox}{Hello there} +This is my own box with a mandatory title. +\end{mybox} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcolorbox{mybox}[2][]{colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + colbacktitle=red!85!black,enhanced, +attach boxed title to top center={yshift=-2mm}, + title=#2,#1} + +\begin{mybox}[colback=yellow]{Hello there} +This is my own box with a mandatory title +and options. +\end{mybox} +\end{dispExample*} + +\inputpreamblelisting{A} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\begin{pabox}[colback=yellow]{Hello there} +This is my own box with a mandatory +numbered title and options. +\end{pabox} +\end{dispExample*} +\end{docCommand} + + +\begin{docCommand}{renewtcolorbox}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} + Operates like \refCom{newtcolorbox}, but based on |\renewenvironment| instead of |\newenvironment|. + An existing environment is redefined. +\end{docCommand} + + +\clearpage +\begin{docCommand}{newtcbox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\oarg{number}\oarg{default}\marg{options}} + Creates a new macro \texttt{\textbackslash}\meta{name} based on \refCom{tcbox}. + Basically, |\newtcbox| operates like |\newcommand|. + The new macro \texttt{\textbackslash}\meta{name} optionally takes \meta{number}$+1$ arguments, where + \meta{default} is the default value for the optional first argument. + The \meta{options} are given to the underlying |tcbox|. + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcbox{\mybox}{colback=red!5!white, + colframe=red!75!black} + +\mybox{This is my own box.} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcbox{\mybox}[1]{colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + title=#1} + +\mybox{Hello there}{This is my own box.} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcbox{\mybox}[2][]{colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + title=#2,#1} + +\mybox[colback=yellow]{Hello there}% + {This is my own box.} +\end{dispExample*} + +\inputpreamblelisting{B} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\pbbox[colback=yellow]{Hello there}% + {This is my own box.} +\end{dispExample*} + +\begin{dispExample} +\newtcbox{\mybox}[1][red]{on line, + arc=0pt,outer arc=0pt,colback=#1!10!white,colframe=#1!50!black, + boxsep=0pt,left=1pt,right=1pt,top=2pt,bottom=2pt, + boxrule=0pt,bottomrule=1pt,toprule=1pt} +\newtcbox{\xmybox}[1][red]{on line, + arc=7pt,colback=#1!10!white,colframe=#1!50!black, + before upper={\rule[-3pt]{0pt}{10pt}},boxrule=1pt, + boxsep=0pt,left=6pt,right=6pt,top=2pt,bottom=2pt} + +The \mybox[green]{quick} brown \mybox{fox} \mybox[blue]{jumps} over the +\mybox[green]{lazy} \mybox{dog}.\par +The \xmybox[green]{quick} brown \xmybox{fox} \xmybox[blue]{jumps} over the +\xmybox[green]{lazy} \xmybox{dog}. +\end{dispExample} + +\end{docCommand} + + +\enlargethispage*{1cm} +\begin{docCommand}{renewtcbox}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} + Operates like \refCom{newtcbox}, but based on |\renewcommand| instead of |\newcommand|. + An existing macro is redefined. +\end{docCommand} + +\clearpage + +\begin{docCommand}[doc new=2014-10-20]{tcolorboxenvironment}{\marg{name}\marg{options}} + An existing environment \meta{name} is redefined to be boxed inside a + |tcolorbox| with the given \meta{options}. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% tcbuselibrary{skins} +\newenvironment{myitemize}{% + \begin{itemize}}{\end{itemize}} + +\tcolorboxenvironment{myitemize}{blanker, + before skip=6pt,after skip=6pt, + borderline west={3mm}{0pt}{red}} + +Some text. +\begin{myitemize} +\item Alpha +\item Beta +\item Gamma +\end{myitemize} +More text. +\end{dispExample*} + +\medskip +See further examples in \Vref{subsec:theorems_other}. +\end{docCommand} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.coreoptions.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.coreoptions.tex new file mode 100644 index 0000000..9c0f6b9 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.coreoptions.tex @@ -0,0 +1,4336 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Option Keys}\label{sec:optkeys}% +\tcbset{external/prefix=external/coreoptions_}% +For the \meta{options} in \refEnv{tcolorbox} respectively \refCom{tcbset} +the following |pgf| keys can be applied. The key tree path |/tcb/| is not to +be used inside these macros. It is easy to add your own style keys using +the syntax for |pgf| keys, see \cite{tantau:2015a,sturm:2014g} or the examples +starting from page~\pageref{sec:latextutorial}. + + +\subsection{Title} +\begin{docTcbKey}{title}{=\meta{text}}{no default, initially empty} + Creates a heading line with \meta{text} as content. +\begin{exdispExample*}{title}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[title=My heading line] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{notitle}{}{no value, initially set} + Removes the title line if set before. +\end{docTcbKey} + + +\begin{docTcbKey}{adjusted title}{=\meta{text}}{style, no default, initially unset} + Creates a heading line with \meta{text} as content. The minimal height of + this line is adjusted to fit the text given by \refKey{/tcb/adjust text}. + This option makes sense + for single line headings if boxes are set side by side with equal height. + Note that it is very easy to trick this adjustment. +\begin{exdispExample}[runs=2]{adjusted_title} +\tcbset{colback=White,arc=0mm,width=(\linewidth-4pt)/4, +equal height group=AT,before=,after=\hfill,fonttitle=\bfseries} + +The following titles are not adjusted:\\ +\foreach \n in {xxx,ggg,AAA,\"Agypten} +{\begin{tcolorbox}[title=\n,colframe=red!75!black] + Some content.\end{tcolorbox}} +Now, we try again with adjusted titles:\\ +\foreach \n in {xxx,ggg,AAA,\"Agypten} +{\begin{tcolorbox}[adjusted title=\n,colframe=blue!75!black] + Some content.\end{tcolorbox}} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{adjust text}{=\meta{text}}{no default, initially \texttt{\"Apgjy}} + This sets the reference text for \refKey{/tcb/adjusted title}. If your texts + never exceed '\"Apgjy' in depth and height you don't need to care about this option. +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}[][doc new=2014-11-24]{squeezed title}{=\meta{text}}{style, no default, initially unset} + Creates a single heading line with \meta{text} as content. + If the \meta{text} is longer than the available space, the text is + squeezed to fit into the available space. +\begin{exdispExample}{squeezed_title} +% \tcbuselibrary{raster} +\begin{tcbitemize}[raster columns=3,raster equal height, + colframe=red!75!black,colback=red!5!white,fonttitle=\bfseries] +\tcbitem[squeezed title={Short title}] + First box +\tcbitem[squeezed title={This is a very very long title}] + Second box +\tcbitem[squeezed title={This title is clearly to long for this application}] + Third box +\end{tcbitemize} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-24]{squeezed title*}{=\meta{text}}{style, no default, initially unset} + This is a combination of \refKey{/tcb/adjusted title} and \refKey{/tcb/squeezed title}. +\begin{exdispExample}{squeezed_title_2} +% \tcbuselibrary{raster} +\begin{tcbitemize}[raster columns=3,raster equal height, + colframe=red!75!black,colback=red!5!white,fonttitle=\bfseries] +\tcbitem[squeezed title*={Short title}] + First box +\tcbitem[squeezed title*={This is a very very long title}] + Second box +\tcbitem[squeezed title*={This title is clearly to long for this application}] + Third box +\end{tcbitemize} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{detach title}{}{no value} +Detaches the title from its normal position. The text of the title is +stored into \docAuxCommand{tcbtitletext} and the formatted title is +available by \docAuxCommand{tcbtitle}. +The main application is to move the title from its usual place to another one. +\begin{exdispExample}{detach_title} +\newtcolorbox{mybox}[2][]{colbacktitle=red!10!white, + colback=blue!10!white,coltitle=red!70!black, + title={#2},fonttitle=\bfseries,#1} + +\begin{mybox}{My title} + This is a \textbf{tcolorbox}. +\end{mybox} +\begin{mybox}[detach title,before upper={\tcbtitle\quad}]{My title} + This is a \textbf{tcolorbox}. +\end{mybox} +\begin{mybox}[detach title,after upper={\par\hfill\tcbtitle}]{My title} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{attach title}{}{no value} +Attaches the title to its normal position. This option is used to reverse +\refKey{/tcb/detach title}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2015-07-08]{attach title to upper}{\colOpt{=\meta{text}}}{style, default empty, initially unset} +Attaches the title to the begin of the upper part of the box content. +The optional \meta{text} is set between the formatted title and the box content. +\begin{exdispExample}{attach_title_to_upper} +\newtcolorbox{mybox}[2][]{colbacktitle=red!10!white, + colback=blue!10!white,coltitle=red!70!black, + title={#2},fonttitle=\bfseries,#1} + +\begin{mybox}[attach title to upper={\ ---\ }]{My title} + This is a \textbf{tcolorbox}. +\end{mybox} +\begin{mybox}[attach title to upper,after title={:\ }]{My title} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample} +\end{docTcbKey} + + +\bigskip +\begin{marker} +More title options are documented in \Vref{subsec:contentadditions} +and \Vref{subsec:skinboxedtitle}. +\end{marker} + +\clearpage +\subsection{Subtitle} + +Inside the box content, one or more subtitles can be added. +In general, a subtitle is a further \refEnv{tcolorbox} which inherits some +color and geometry options from the enclosing box. It may be customized +just like any other \refEnv{tcolorbox}. + +\begin{docCommand}[doc new=2014-10-10]{tcbsubtitle}{\oarg{options}\marg{text}} + Used inside a \refEnv{tcolorbox} to add a subtitle box with the given \meta{text}. + This is an independent \refEnv{tcolorbox} which is formatted by several + inherited properties of the enclosing box, by further settings from + \refKey{/tcb/subtitle style}, and by the given \meta{options}. +\begin{exdispExample*}{tcbsubtitle_1}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[title=My title, + colback=red!5!white, + colframe=red!75!black, + fonttitle=\bfseries] + This is a \textbf{tcolorbox}. +\tcbsubtitle[before skip=\baselineskip]% + {My subtitle} + Further text. +\end{tcolorbox} +\end{exdispExample*} +\begin{exdispExample*}{tcbsubtitle_2}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[title=My title, + colback=red!5!white, + colframe=red!75!black, + colbacktitle=yellow!50!red, + coltitle=red!25!black, + fonttitle=\bfseries] + This is a \textbf{tcolorbox}. +\tcbsubtitle[before skip=\baselineskip]% + {My subtitle} + Further text. +\end{tcolorbox} +\end{exdispExample*} +\end{docCommand} + +\begin{docTcbKey}[][doc new=2014-10-10]{subtitle style}{=\meta{options}}{no default, initially empty} + Adds |tcolorbox| \meta{options} to the settings for \refCom{tcbsubtitle}. +\begin{exdispExample*}{subtitle_style}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[title=My title, + colback=red!5!white, + colframe=red!75!black, + colbacktitle=yellow!50!red, + coltitle=red!25!black, + fonttitle=\bfseries, + subtitle style={boxrule=0.4pt, + colback=yellow!50!red!25!white} ] + This is a \textbf{tcolorbox}. +\tcbsubtitle{My subtitle} + Further text. +\tcbsubtitle{Second subtitle} + Further text. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\subsection{Upper Part} +The text content of a \refEnv{tcolorbox} may be parted into a mandatory \emph{upper part} +and an optional \emph{lower part}. These parts are separated by +\refCom{tcblower}. If there is no \refCom{tcblower} present, there is no +\emph{lower part} and the \emph{upper part} forms the complete text content. + +\begin{docTcbKey}[][doc new=2015-01-06]{upperbox}{=\meta{mode}}{no default, initially \texttt{visible}} + Controls the treatment of the upper part of the box. If there is no lower part, + this is the complete text content. + Feasible values for \meta{mode} are: + \begin{itemize} + \item\docValue{visible}: usual type setting of the upper part, + \item\docValue{invisible}: empty space instead of the upper part contents. + \end{itemize} +\begin{exdispExample}{upperbox} +\begin{tcolorbox}[upperbox=invisible,colback=white] +This is a \textbf{tcolorbox} (but invisible). +\end{tcolorbox} + +\bigskip + +\begin{tcolorbox}[upperbox=invisible,colback=white] +This is a \textbf{tcolorbox} (but invisible). +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-01-06]{visible}{}{style, no value} + Shortcut for setting \refKey{/tcb/upperbox} and \refKey{/tcb/lowerbox} + to be \docValue{visible}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-01-06]{invisible}{}{style, no value} + Shortcut for setting \refKey{/tcb/upperbox} and \refKey{/tcb/lowerbox} + to be \docValue{invisible}. +\begin{exdispExample}{invisible} +\begin{tcolorbox}[invisible] +This is a \textbf{tcolorbox} (but invisible). +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2015-05-04]{saveto}{=\meta{file name}}{no default, initially empty} + Saves the content of the box into a file for an optional later usage. + This is the counterpart of \refKey{/tcb/savelowerto}, but is saves not + only the upper part but the whole content. If a lower part is present, + it is also saved including \refCom{tcblower}. + \begin{marker} + This option cannot be combined with \refKey{/tcb/savelowerto}. + \end{marker} + +\begin{exdispExample}{saveto_1} +\begin{tcolorbox}[invisible,saveto=\jobname_mysave1.tex,colback=white] +This is a \textbf{tcolorbox} which seems to be empty. +The content is saved for later usage. +\end{tcolorbox} + +Now, we load the saved text:\\ +\input{\jobname_mysave1.tex} +\end{exdispExample} + +\begin{exdispExample}{saveto_2} +\begin{tcolorbox}[saveto=\jobname_mysave2.tex] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} + +Now, we load the saved text: +\begin{tcolorbox}[colframe=red,colback=red!10, + coltitle=black,colbacktitle=red!20,sidebyside, + title=Here we see the saved content including the lower part] +\input{\jobname_mysave2.tex} +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + +\clearpage +\subsection{Lower Part} +\begin{docTcbKey}{lowerbox}{=\meta{mode}}{no default, initially \texttt{visible}} + Controls the treatment of the lower part of the box. + Feasible values for \meta{mode} are: + \begin{itemize} + \item\docValue{visible}: usual type setting of the lower part, + \item\docValue{invisible}: empty space instead of the lower part contents, + \item\docValue{ignored}: the lower part is not used (here). + \end{itemize} + The last two values are usually applied in connection with |savelowerto|. +\begin{exdispExample}{lowerbox} +\begin{tcolorbox}[lowerbox=invisible,colback=white] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part (but invisible). +\end{tcolorbox} + +\begin{tcolorbox}[lowerbox=ignored,colback=white] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part (but ignored). +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2014-11-28]{savelowerto}{=\meta{file name}}{no default, initially empty} + Saves the content of the lower part into a file for an optional later usage. +\begin{exdispExample}{savelowerto} +\begin{tcolorbox}[lowerbox=invisible,savelowerto=\jobname_bspsave.tex,colback=white] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part which may be quite complex: +$\displaystyle f(x)=\frac{1+x^2}{1-x^2}$. +\end{tcolorbox} + +Now, we load the saved text:\\ +\input{\jobname_bspsave.tex} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{lower separated}{\colOpt{=true\textbar false}}{default |true|, initially |true|} +If set to |true|, the lower part is visually separated from the upper part. +It depends on the chosen skin how the visualization of the separation is done. +\enlargethispage*{1cm} +\begin{exdispExample}{lower_separated} +% \tcbuselibrary{skins,raster} +\begin{tcbraster}[colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries,fontlower=\itshape] +% +\begin{tcolorbox}[title=Lower separated] +This is the upper part. +\tcblower +This is the lower part. +\end{tcolorbox} +% +\begin{tcolorbox}[title=Lower not separated,lower separated=false] +This is the upper part. +\tcblower +This is the lower part. +\end{tcolorbox} +% +\begin{tcolorbox}[sidebyside,title=Lower separated] +This is the upper part. +\tcblower +This is the lower part. +\end{tcolorbox} +% +\begin{tcolorbox}[sidebyside,title=Lower not separated,lower separated=false] +This is the upper part. +\tcblower +This is the lower part. +\end{tcolorbox} +% +\begin{tcolorbox}[beamer,title=Lower separated] +This is the upper part. +\tcblower +This is the lower part. +\end{tcolorbox} +% +\begin{tcolorbox}[beamer,title=Lower not separated,lower separated=false] +This is the upper part. +\tcblower +This is the lower part. +\end{tcolorbox} +% +\end{tcbraster} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{savedelimiter}{=\meta{name}}{no default, initially \texttt{tcolorbox}} + Used in connection with new environment definitions which extend + |tcolorbox| and use or allow the option |savelowerto|. + To catch the end of the new box environment \meta{name} has to be the name of + this environment. Additionally, the environment definition has to use + |\tcolorbox| instead of + |\begin{tcolorbox}| and |\endtcolorbox| instead of |\end{tcolorbox}|. +\begin{exdispExample}{savedelimiter1} +\newenvironment{mybox}[1]{% + \tcolorbox[savedelimiter=mybox, + savelowerto=\jobname_bspsave2.tex,lowerbox=ignored, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + title=#1]}% + {\endtcolorbox} + +\begin{mybox}{My Example} +Upper part. +\tcblower +Saved lower part! +\end{mybox} + +Now, the saved part is used: +\begin{tcolorbox}[colback=green!5] +\input{\jobname_bspsave2.tex} +\end{tcolorbox} +\end{exdispExample} + +The |savedelimiter| is used implicitely with \refCom{newtcolorbox} which +allows a more convenient usage: +\begin{exdispExample}{savedelimiter2} +\newtcolorbox{mybox}[1]{% + savelowerto=\jobname_bspsave2.tex,lowerbox=ignored, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + title=#1}% + +\begin{mybox}{My Example} +Upper part. +\tcblower +Saved lower part! +\end{mybox} + +Now, the saved part is used: +\begin{tcolorbox}[colback=green!5] +\input{\jobname_bspsave2.tex} +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + +\clearpage +\subsection{Colors and Fonts} +\begin{docTcbKey}{colframe}{=\meta{color}}{no default, initially \texttt{black!75!white}} + Sets the frame \meta{color} of the box. +\begin{exdispExample*}{colframe}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colframe=red!50!white] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{colback}{=\meta{color}}{no default, initially \texttt{black!5!white}} + Sets the background \meta{color} of the box. +\begin{exdispExample*}{colback}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colback=red!50!white] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{title filled}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Switches the drawing of the title background according to the given value. + This option is set to |true| automatically by \refKey{/tcb/colbacktitle}, + \refKey{/tcb/opacitybacktitle}, and \refKey{/tcb/title style}, + and \refKey{/tcb/title code}. + +\begin{exdispExample*}{title_filled}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[title=My title,title filled] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[title=My title, + title filled=false] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{colbacktitle}{=\meta{color}}{no default, initially \texttt{black!50!white}} + Sets the background \meta{color} of the title area of the box. +\begin{exdispExample*}{colbacktitle}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colbacktitle=red!50!white, + title=My title,coltitle=black, + fonttitle=\bfseries] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + + +\clearpage + +\begin{docTcbKey}{colupper}{=\meta{color}}{no default, initially \texttt{black}} + Sets the text \meta{color} of the upper part. +\begin{exdispExample*}{colupper}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colupper=red!75!black] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{collower}{=\meta{color}}{no default, initially \texttt{black}} + Sets the text \meta{color} of the lower part. +\begin{exdispExample*}{collower}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[collower=red!75!black] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{coltext}{=\meta{color}}{style, no default, initially \texttt{black}} + Sets the text \meta{color} of the box. This is an abbreviation for setting + |colupper| and |collower| to the same value. +\begin{exdispExample*}{coltext}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[coltext=red!75!black] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{coltitle}{=\meta{color}}{no default, initially \texttt{white}} + Sets the title text \meta{color} of the box. +\begin{exdispExample*}{coltitle}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[coltitle=red!75!black, + colbacktitle=black!10!white,title=Test] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}{fontupper}{=\meta{text}}{no default, initially empty} + Sets \meta{text} before the content of the upper part (e.\,g.\ font settings). +\begin{exdispExample}{fontupper} +\begin{tcolorbox}[fontupper=Hello!~\sffamily] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{fontlower}{=\meta{text}}{no default, initially empty} + Sets \meta{text} before the content of the lower part (e.\,g.\ font settings). +\begin{exdispExample}{fontlower} +\begin{tcolorbox}[fontlower=\sffamily\bfseries] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{fonttitle}{=\meta{text}}{no default, initially empty} + Sets \meta{text} before the content of the title text (e.\,g.\ font settings). +\begin{exdispExample}{fonttitle} +\begin{tcolorbox}[fonttitle=\sffamily\bfseries\large,title=Hello] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\bigskip +\begin{marker} + More color options are provided by using skins documented in + Section \ref{sec:skins} from page \pageref{sec:skins}. +\end{marker} + + +\clearpage +\subsection{Text Alignment} + +\begin{docTcbKey}[][doc new=2015-05-07]{halign}{=\meta{alignment}}{no default, initially \texttt{justify}} + If there is no lower part, |halign| determines the horizontal \meta{alignment} + of the text content. + Otherwise, |halign| determines the horizontal \meta{alignment} + of the upper part of the box only. + The feasible values for \meta{alignment} are more or less identical to + the corresponding |/tikz/align| settings, even if the implementation differs. + \begin{itemize} + \item\docValue{justify}: usual left and right justified type setting. + \item\docValue{left}: left border justification in analogy to plain \TeX. + \item\docValue{flush left}: left border justification with |\raggedright| of \LaTeX. + \item\docValue{right}: right border justification in analogy to plain \TeX. + \item\docValue{flush right}: right border justification with |\raggedleft| of \LaTeX. + \item\docValue{center}: centering in analogy to plain \TeX. + \item\docValue{flush center}: centering with |\centering| of \LaTeX. + \end{itemize} + The differences between the flush and non-flush version are explained in + detail in the \tikzname\ manual \cite{tantau:2015a}. The short story is that + the non-flush versions will often look more balanced but with more + hyphenations. + +\begin{exdispExample}{halign} +\tcbset{colback=red!5!white,colframe=red!75!black,size=small, + fonttitle=\bfseries,width=3.5cm,box align=top, + nobeforeafter} + +\begin{tcolorbox}[adjusted title=flush center,halign=flush center] +This is a demonstration text for showing how line breaking works. +\end{tcolorbox} +\begin{tcolorbox}[adjusted title=flush left,halign=flush left] +This is a demonstration text for showing how line breaking works. +\end{tcolorbox} +\begin{tcolorbox}[adjusted title=flush right,halign=flush right] +This is a demonstration text for showing how line breaking works. +\end{tcolorbox} + +\begin{tcolorbox}[adjusted title=center,halign=center] +This is a demonstration text for showing how line breaking works. +\end{tcolorbox} +\begin{tcolorbox}[adjusted title=left,halign=left] +This is a demonstration text for showing how line breaking works. +\end{tcolorbox} +\begin{tcolorbox}[adjusted title=right,halign upper=right] +This is a demonstration text for showing how line breaking works. +\end{tcolorbox} +\end{exdispExample} + +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-05-07]{halign upper}{=\meta{alignment}}{no default, initially \texttt{justify}} + Alias for \refKey{/tcb/halign}. +\end{docTcbKey} + +\newpage +\begin{docTcbKey}[][doc new=2015-05-07]{halign lower}{=\meta{alignment}}{no default, initially \texttt{justify}} + |halign lower| determines the horizontal \meta{alignment} of the lower part of the box. + The feasible values for \meta{alignment} are the same as for \refKey{/tcb/halign}. + +\begin{exdispExample}{halign_lower} +\begin{tcbraster}[raster columns=3,fonttitle=\bfseries, + colback=red!5!white,colframe=red!75!black] + + \begin{tcolorbox}[adjusted title=flush center,halign lower=flush center] + Upper part. \tcblower Lower part. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=flush left,halign lower=flush left] + Upper part. \tcblower Lower part. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=flush right,halign lower=flush right] + Upper part. \tcblower Lower part. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=center,halign lower=center] + Upper part. \tcblower Lower part. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=left,halign lower=left] + Upper part. \tcblower Lower part. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=right,halign lower=right] + Upper part. \tcblower Lower part. + \end{tcolorbox} + +\end{tcbraster} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2015-05-07]{halign title}{=\meta{alignment}}{no default, initially \texttt{justify}} + |halign lower| determines the horizontal \meta{alignment} of the title of the box. + The feasible values for \meta{alignment} are the same as for \refKey{/tcb/halign}. + +\begin{exdispExample}{halign_title} +\begin{tcbraster}[raster columns=3,fonttitle=\bfseries, + colback=red!5!white,colframe=red!75!black] + + \begin{tcolorbox}[adjusted title=flush center,halign title=flush center] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=flush left,halign title=flush left] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=flush right,halign title=flush right] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=center,halign title=center] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=left,halign title=left] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=right,halign title=right] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + +\end{tcbraster} +\end{exdispExample} +\end{docTcbKey} + +\enlargethispage*{1cm} + +\begin{docTcbKey}[][doc updated=2015-05-07]{flushleft upper}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign} to \docValue{flush left}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2015-05-07]{center upper}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign} to \docValue{flush center}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2015-05-07]{flushright upper}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign} to \docValue{flush right}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2015-05-07]{flushleft lower}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign lower} to \docValue{flush left}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2015-05-07]{center lower}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign lower} to \docValue{flush center}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2015-05-07]{flushright lower}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign lower} to \docValue{flush right}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2015-05-07]{flushleft title}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign title} to \docValue{flush left}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2015-05-07]{center title}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign title} to \docValue{flush center}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2015-05-07]{flushright title}{}{style, no value} + Shortcut for setting \refKey{/tcb/halign title} to \docValue{flush right}. +\end{docTcbKey} + +\clearpage + +\begin{marker} +The vertical alignment settings are only relevant for boxes which are larger +than their natural height, see \Fullref{sec:heightcontrol}. +\end{marker} + +\begin{docTcbKey}[][doc updated=2015-07-16]{valign}{=\meta{alignment}}{no default, initially |top|} + If the height of a |tcolorbox| is not the natural height, |valign| + determines the vertical \meta{alignment} of the upper part. + Feasible values are + \begin{itemize} + \item\docValue{top}: Anchor text at top. + \item\docValue{center}: Anchor text at center. + \item\docValue{bottom}: Anchor text at bottom. + \item\docValue{scale}: Scale text vertically to fit into the available space. + This is brutal and may not look very good. Consider \Fullref{sec:fitting} + alternatively. + \item\docValue{scale*}: Like \docValue{scale}, but scaling is bounded by + \refKey{/tcb/valign scale limit}. + \end{itemize} + For a box with natural height, these settings are meaningless. +\begin{exdispExample}{valign} +\tcbset{width=(\linewidth-2mm)/4,before=,after=\hfill, +colframe=blue!75!black,colback=white,height=2cm} + +\foreach \myalign in {top,center,bottom,scale} +{\begin{tcolorbox}[valign=\myalign] + This is a \textbf{tcolorbox}. +\end{tcolorbox}} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-05-07]{valign upper}{=\meta{alignment}}{no default, initially \texttt{top}} + Alias for \refKey{/tcb/valign}. +\end{docTcbKey} + +\begin{docTcbKey}{valign lower}{=\meta{alignment}}{no default, initially |top|} + This key has the same meaning for the lower part as |valign| + for the upper part, i.\,e., it determines + the vertical \meta{alignment} of the lower part with feasible values + |top|, |center|, |bottom|, |scale|, and |scale*|. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{valign scale limit}{=\meta{real number}}{no default, initially \texttt{1.1}} + Sets an upper scale limit for the \docValue{scale*} setting in + \refKey{/tcb/valign} and \refKey{/tcb/valign lower}. + Note that this value is not reset by \refKey{/tcb/reset}. So, changes + also apply to embedded boxes. +\end{docTcbKey} + + +Also see \refKey{/tcb/sidebyside align} for alignment settings when +upper part and lower part are set side-by-side. + +\clearpage +\subsection{Geometry} +\subsubsection{Width} + +\begin{docTcbKey}{width}{=\meta{length}}{no default, initially \cs{linewidth}} + Sets the total width of the colored box to \meta{length}. + See also \refKey{/tcb/height}. +\begin{exdispExample}{width} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[width=\linewidth/2] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-10-31]{text width}{=\meta{length}}{style, no default} + Sets the text width of the upper part to \meta{length}. + See also \refKey{/tcb/text height}. +\begin{exdispExample}{text_width} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[text width=4cm] +This is a \textbf{tcolorbox} where the text has a width of 4cm. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-07]{add to width}{=\meta{length}}{style, no default} + Adds \meta{length} to the current total width of the colored box. +\begin{exdispExample*}{add_to_width}{sbs,lefthand ratio=0.6} +\tcbset{width=4cm,colback=red!5!white, + colframe=red!75!black} + +\begin{tcolorbox} +This is a \textbf{tcolorbox}. +\end{tcolorbox} + +\begin{tcolorbox}[add to width=1cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +See \Fullref{sec:heightcontrol} for setting fixed height values. + + +\clearpage +\subsubsection{Rules} +\begin{docTcbKey}{toprule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the top rule to \meta{length}. +\begin{exdispExample}{toprule} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[toprule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{bottomrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the bottom rule to \meta{length}. +\begin{exdispExample}{bottomrule} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[bottomrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{leftrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the left rule to \meta{length}. +\begin{exdispExample}{leftrule} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[leftrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{rightrule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the right rule to \meta{length}. +\begin{exdispExample}{rightrule} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[rightrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{titlerule}{=\meta{length}}{no default, initially \texttt{0.5mm}} + Sets the line width of the rule below the title to \meta{length}. +\begin{exdispExample}{titlerule} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black, + colbacktitle=red!90!black} + +\begin{tcolorbox}[titlerule=3mm,title=This is the title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{boxrule}{=\meta{length}}{style, no default, initially \texttt{0.5mm}} + Sets all rules of the frame to \meta{length}, i.\,e.\ + \refKey{/tcb/toprule}, \refKey{/tcb/bottomrule}, \refKey{/tcb/leftrule}, + \refKey{/tcb/rightrule}, and \refKey{/tcb/titlerule}. +\begin{exdispExample}{boxrule} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[boxrule=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\bigskip +\begin{marker} + More options for drawing a \refKey{/tcb/borderline} are provided by using skins documented in + Section \ref{sec:skins} from page \pageref{sec:skins}. +\end{marker} + + +\subsubsection{Arcs} +\begin{docTcbKey}{arc}{=\meta{length}}{no default, initially \texttt{1mm}} + Sets the inner radius of the four frame arcs to \meta{length}. +\begin{exdispExample}{arc} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[arc=0mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[arc=3mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2015-05-05]{circular arc}{}{style, no value} + Sets \refKey{/tcb/arc} to match the half of the inner width of the colored box. + If width and height of the box are identical, this gives a circle. + \begin{marker} + If the height of the box is smaller than the width, the result will look + quite ugly. + \end{marker} +\begin{exdispExample*}{circular_arc}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[width=3cm, + colback=red!5!white, + colframe=red!75!black, + halign=center,valign=center, + square,circular arc] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-05-05]{bean arc}{}{style, no value} + Sets \refKey{/tcb/arc} to match the smaller value of the + half of the inner width and of the inner height of the colored box. + \begin{marker} + This only works for a fixed \refKey{/tcb/height}. Also, \refKey{/tcb/bean arc} + must be used \emph{after} width and height are set by option keys. + \end{marker} +\begin{exdispExample*}{bean_arc}{sbs,lefthand ratio=0.6} +\tcbset{size=fbox,boxrule=0.5mm, + colback=red!5!white, + colframe=red!75!black, + halign=center,valign=center} + +\begin{tcolorbox}[width=3cm,height=2cm, + bean arc] +Box A +\end{tcolorbox} + +\begin{tcolorbox}[width=2cm,height=3cm, + bean arc] +Box B +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-05-05]{octogon arc}{}{style, no value} + Sets \refKey{/tcb/arc} to match $\frac{1}{2+\sqrt{2}}$ of the inner width + of the colored box. If width and height of the box are identical, + the interior is a regular octogon. +\begin{exdispExample*}{octogon_arc}{sbs,lefthand ratio=0.8} +\begin{tcolorbox}[enhanced, + size=minimal,auto outer arc, + width=2.1cm,octogon arc, + colback=red,colframe=white,colupper=white, + fontupper=\fontsize{7mm}{7mm}\selectfont\bfseries\sffamily, + halign=center,valign=center, + square,arc is angular, + borderline={0.2mm}{-1mm}{red} ] +STOP +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2015-05-05]{arc is angular}{}{no value, initially unset} + Using this options applies a patch which straightens the corners arcs of + the boxes. The little arcs are replaced by little straight lines. + \begin{marker} + This patch is considered as an experimental feature. + It changes some of the original \tikzname\ code. This change may break + with future updates of \tikzname. + \end{marker} + +\begin{exdispExample*}{arc_is_angular}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black, + arc=3mm} + +\begin{tcolorbox}[arc is angular] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[arc is curved] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-05-05]{arc is curved}{}{no value, initially set} + This option resets the patch from \refKey{/tcb/arc is angular}. The + original \tikzname\ code is activated. +\end{docTcbKey} + + +\begin{docTcbKey}{outer arc}{=\meta{length}}{no default, initially unset} + Sets the outer radius of the four frame arcs to \meta{length}. +\begin{exdispExample}{outer_arc} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[arc=4mm,outer arc=1mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{auto outer arc}{}{no value, initially set} + Sets the outer radius of the four frame arcs automatically in + dependency of the inner radius given by \refKey{/tcb/arc}. +\end{docTcbKey} + + +\clearpage +\subsubsection{Spacing} +\begin{docTcbKey}{boxsep}{=\meta{length}}{no default, initially \texttt{1mm}} + Sets a common padding of \meta{length} between the text content and the + frame of the box. This value is added to the key values of + |left|, |right|, |top|, |bottom|, and |middle| at the appropriate places. +\begin{exdispExample}{boxsep} +\tcbset{colback=red!5!white,colframe=red!75!black,width=(\linewidth-4mm)/2, + before=,after=\hfill} + +\begin{tcolorbox}[boxsep=5mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[boxsep=5mm,draft] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{left}{=\meta{length}}{style, no default, initially \texttt{4mm}} + Sets the left space between all text parts and frame (additional to |boxsep|). + This is an abbreviation for setting + |lefttitle|, |leftupper|, and |leftlower| to the same value. +\begin{exdispExample}{left} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[left=0mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-16]{left*}{=\meta{length}}{style, no default} + Sets \refKey{/tcb/left} such that \meta{length} is the distance between + the left bounding box and the text parts. +\begin{exdispExample}{left_star} +\tcbset{colback=red!5!white,colframe=red!75!black} + +This is some text. +\begin{tcolorbox}[grow to left by=5mm,left*=0mm, + enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{lefttitle}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the left space between title text and frame (additional to |boxsep|). +\begin{exdispExample}{lefttitle} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[lefttitle=3cm,title=My Title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{leftupper}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the left space between upper text and frame (additional to |boxsep|). +\begin{exdispExample}{leftupper} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[leftupper=3cm,title=My Title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{leftlower}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the left space between lower text and frame (additional to |boxsep|). +\begin{exdispExample}{leftlower} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[leftlower=3cm] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{right}{=\meta{length}}{style, no default, initially \texttt{4mm}} + Sets the right space between all text parts and frame (additional to |boxsep|). + This is an abbreviation for setting + |righttitle|, |rightupper|, and |rightlower| to the same value. +\begin{exdispExample}{right} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[width=5cm,right=2cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-16]{right*}{=\meta{length}}{style, no default} + Sets \refKey{/tcb/right} such that \meta{length} is the distance between + the right bounding box and the text parts. +\begin{exdispExample}{right_star} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\flushright This is some text. +\begin{tcolorbox}[grow to right by=5mm,right*=0mm, + halign=right,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{righttitle}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the right space between title text and frame (additional to |boxsep|). +\begin{exdispExample}{righttitle} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[width=5cm,righttitle=2cm,title=My very long title text] +This is a \textbf{tcolorbox} with standard upper box dimensions. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{rightupper}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the right space between upper text and frame (additional to |boxsep|). +\begin{exdispExample}{rightupper} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[width=5cm,rightupper=2cm,title=My very long title text] +This is a \textbf{tcolorbox} with compressed upper box dimensions. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{rightlower}{=\meta{length}}{no default, initially \texttt{4mm}} + Sets the right space between lower text and frame (additional to |boxsep|). +\begin{exdispExample}{rightlower} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[width=5cm,rightlower=2cm] +This is a \textbf{tcolorbox} with standard upper box dimensions. +\tcblower +This is the lower part with large space at right. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{top}{=\meta{length}}{no default, initially \texttt{2mm}} + Sets the top space between text and frame (additional to |boxsep|). +\begin{exdispExample}{top} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[top=0mm] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{toptitle}{=\meta{length}}{no default, initially \texttt{0mm}} + Sets the top space between title and frame (additional to |boxsep|). +\begin{exdispExample}{toptitle} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[toptitle=3mm,title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{bottom}{=\meta{length}}{no default, initially \texttt{2mm}} + Sets the bottom space between text and frame (additional to |boxsep|). +\begin{exdispExample}{bottom} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[bottom=0mm] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{bottomtitle}{=\meta{length}}{no default, initially \texttt{0mm}} + Sets the bottom space between title and frame (additional to |boxsep|). +\begin{exdispExample}{bottomtitle} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[bottomtitle=3mm,title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{middle}{=\meta{length}}{no default, initially \texttt{2mm}} + Sets the space between upper and lower text to the separation line + (additional to |boxsep|). +\begin{exdispExample}{middle} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[middle=0mm,boxsep=0mm] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\subsubsection{Size Shortcuts} +\begin{docTcbKey}{size}{=\meta{name}}{no default, initially \texttt{normal}} + Sets all geometry keys with exception of \refKey{/tcb/width} to + predefined length values. + For \meta{name}, the following values are feasible: + \begin{itemize} + \item\docValue{normal}: normal sized boxes e.g. of width |\linewidth|. + \item\docValue{title}: title line sized boxes. + \item\docValue{small}: small boxes e.g. for keyword highlighting. + \item\docValue{fbox}: identical to the standard |\fbox|. + \item\docValue{tight}: no padding space at all. + \item\docValue{minimal}: no padding space, no box rules. + \end{itemize} + +\begin{exdispExample}{size_1} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\foreach \s in {normal,title,small,fbox,tight,minimal} { + \tcbox[size=\s,on line]{\s} } + +\foreach \s in {normal,title,small,fbox,tight,minimal} { + \tcbox[size=\s,on line,title=Test]{\s} } + +\foreach \s in {normal,title,small,fbox,tight,minimal} { + \begin{tcolorbox}[size=\s,on line,title=Test,width=2.2cm] + \s \tcblower lower\end{tcolorbox} } +\end{exdispExample} + +\bigskip + +\begin{tcolorbox}[tabularx={l|XXXXXX},title=Predefined values, +enhanced,fonttitle=\small\bfseries,fontupper=\small\ttfamily, +colback=yellow!10!white,colframe=red!50!black,colbacktitle=Salmon!30!white, +coltitle=black,center title +] + & normal & title & small & fbox & tight & minimal\\\hline +boxrule & 0.5mm & 0.4mm & 0.3mm & 0.4pt & 0.4pt & 0.0pt \\ +boxsep & 1.0mm & 1.0mm & 1.0mm & 3.0pt & 0.0pt & 0.0pt \\ +left & 4.0mm & 2.0mm & 1.0mm & 0.0pt & 0.0pt & 0.0pt \\ +right & 4.0mm & 2.0mm & 1.0mm & 0.0pt & 0.0pt & 0.0pt \\ +top & 2.0mm & 0.25mm & 0.0mm & 0.0pt & 0.0pt & 0.0pt \\ +bottom & 2.0mm & 0.25mm & 0.0mm & 0.0pt & 0.0pt & 0.0pt \\ +toptitle & 0.0mm & 0.0mm & 0.0mm & 0.0pt & 0.0pt & 0.0pt \\ +bottomtitle & 0.0mm & 0.0mm & 0.0mm & 0.0pt & 0.0pt & 0.0pt \\ +middle & 2.0mm & 0.75mm & 0.5mm & 1.0pt & 0.2pt & 0.0pt \\ +arc & 1.0mm & 0.75mm & 0.5mm & 1.0pt & 0.0pt & 0.0pt \\ +outer arc & auto & auto & auto & auto & 0.0pt & 0.0pt \\ +\end{tcolorbox} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{oversize}{\colOpt{=\meta{length}}}{style, default |0pt|} + Sets the text width of the upper part to the current line width plus an + optional \meta{length}. + This is achieved by changing the keys \refKey{/tcb/width} + \refKey{/tcb/enlarge left by}, and + \refKey{/tcb/enlarge right by} appropriately. + The resulting box is overlapping into the left and right margin of + the page. + Note that this style option has to be given \emph{after} all other + geometry keys! + Also see \refKey{/tcb/grow sidewards by} and \refKey{/tcb/spread sidewards}. +\begin{dispListing} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\textit{Normal text for comparison:}\\ +\lipsum[2] + +\begin{tcolorbox}[oversize,title=Oversized box] +\lipsum[2] +\end{tcolorbox} + +\begin{tcolorbox}[title=Normal box] +\lipsum[2] +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} + +{\tcbusetemp} + + +\clearpage +\subsubsection{Toggle Left and Right} +\begin{docTcbKey}[][doc updated=2017-02-16]{toggle left and right}{=\meta{toggle preset}}{default |evenpage|, initially |none|} + According to the \meta{toggle preset}, the left and the right settings + of the |tcolorbox| are switched or not. Feasible values are: + \begin{itemize} + \item\docValue{none}: no switching. + \item\docValue{forced}: the values of the left and right rules, spaces, and corners are switched. + \item\docValue{evenpage}: if the page is an even page, the values of the left and + right rules, spaces, and corners are switched. This value also sets + \refKey{/tcb/check odd page} to |true|. + \end{itemize} +\begin{marker} +Horizontal bounding box enlargements are not toggled by this option. +They can be toggled independently by \refKey{/tcb/toggle enlargement}. +For example, \refKey{/tcb/oversize} changes the bounding box. +\end{marker} +\begin{dispListing} +% \usepackage{lipsum} +% \usetikzlibrary{patterns} +% \tcbuselibrary{skins,breakable} +\begin{tcolorbox}[enhanced,breakable, + toggle left and right,sharp corners, + boxrule=0mm,top=0mm,bottom=0mm,left=1mm,right=1mm, + rightrule=1cm,colupper=blue!25!black, + interior style={fill overzoom image=lichtspiel.jpg,fill image opacity=0.25}, + frame style={pattern=crosshatch dots light steel blue}, + overlay={% + \begin{tcbclipframe} + \tcbifoddpage{\coordinate (X) at ([xshift=-5mm]frame.east);} + {\coordinate (X) at ([xshift=5mm]frame.west);} + \fill[shading=ball,ball color=blue!50!white,opacity=0.5] (X) circle (4mm); + \end{tcbclipframe}}] +\lipsum[1-6] +\end{tcolorbox} +\end{dispListing} +\medskip + +This example switches a |1cm| thick rule from the left to the right side +depending on the page number. Thereby, the rule is always on the outer side +of the double-sided paper. Additionally, a ball is drawn on the outer side +with help of an overlay. +\bigskip + +\tcbusetemp +\end{docTcbKey} + +\clearpage +\subsection{Corners}\label{subsec:corners} + +The four corners of any |tcolorbox| can be set individually as +\refKey{/tcb/sharp corners} or as \refKey{/tcb/rounded corners}. +These settings are also reflected in the behavior of \refKey{/tcb/borderline} +and \refKey{/tcb/shadow} as one would expect. + +By default, all four corners are \emph{rounded}. So, only the +\refKey{/tcb/sharp corners} option will be necessary for most use cases. +The \refKey{/tcb/rounded corners} option can be used to revert a \refKey{/tcb/sharp corners} +setting. + +\begin{docTcbKey}{sharp corners}{=\meta{position}}{default |all|, initially unset} +The \meta{position} denotes one or more of the four box corners to be set as +\emph{sharp} corners. The not assigned corners will retain their mode. +Feasible values for \meta{position} are: +\begin{itemize} +\foreach \p in {northwest,northeast,southwest,southeast,north,south,east,west,downhill,uphill,all} +{ +\item\tcbox[on line,size=title,arc=2mm,colframe=red!75!black,colback=red!5!white, + enlarge top by=0.5mm,enlarge bottom by=0.5mm,sharp corners=\p]{\docValue{\p}} +} +\end{itemize} +\begin{exdispExample*}{sharp_corners_1}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colback=red!5!white, + colframe=red!75!black, + sharp corners=northwest ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\begin{exdispExample*}{sharp_corners_2}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colback=red!5!white, + colframe=red!75!black, + sharp corners ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{rounded corners}{=\meta{position}}{default |all|, initially |all|} +The \refKey{/tcb/rounded corners} can be used to revert a \refKey{/tcb/sharp corners} +setting. The \meta{position} denotes one or more of the four box corners to be set as +\emph{rounded} corners. The not assigned corners will retain their mode. +Feasible values for \meta{position} are\footnote{The graphical examples assume + that the boxes where set to have sharp corners before.}: +\begin{itemize} +\foreach \p in {northwest,northeast,southwest,southeast,north,south,east,west,downhill,uphill,all} +{ +\item\tcbox[on line,size=title,arc=2mm,colframe=red!75!black,colback=red!5!white, + enlarge top by=0.5mm,enlarge bottom by=0.5mm,sharp corners,rounded corners=\p]{\docValue{\p}} +} +\end{itemize} +\begin{exdispExample*}{rounded_corners}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colback=red!5!white, + colframe=red!75!black,sharp corners, + rounded corners=northwest ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{sharpish corners}{}{style, no value} + Shortcut for setting \refKey{/tcb/arc} and \refKey{/tcb/outer arc} + to |0pt|. With this setting, rounded corners will appear as quasi-sharp, + but e.\,g.\ the shadow will be somewhat rounder than the shadow + of really sharp corners. + \begin{marker} + Corners are still of type \emph{rounded} with this option, but appear + \emph{sharp}. To switch back to rounded corners, one has to adapt + \refKey{/tcb/arc} and \refKey{/tcb/outer arc}. + \end{marker} +\begin{exdispExample*}{sharpish_corners}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[colback=red!5!white, + colframe=red!75!black, + sharpish corners ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage + +The following examples will show the differences between +\refKey{/tcb/rounded corners}, \refKey{/tcb/sharpish corners}, and \refKey{/tcb/sharp corners}. +The later two give the same core box, but \refKey{/tcb/borderline} +and \refKey{/tcb/shadow} settings are slightly different. +The following examples use \refKey{/tcb/drop fuzzy shadow}. + +\begin{extcolorbox}[minipage]{corners_comparison}[blankest] +\foreach \n in {rounded corners,sharpish corners,sharp corners}{ +\begin{tcolorbox}[enhanced jigsaw,frame empty,interior empty,fuzzy halo,halign=center,beforeafter skip=4mm] +\begin{tcolorbox}[enhanced,drop fuzzy shadow,width=\linewidth-1cm, + colback=red!5!white, colframe=red!75!black, fonttitle=\bfseries, + title=My title,\n, + tikz={spy using outlines={circle, magnification=8, size=2cm, connect spies}}, + overlay={\spy [blue, size=4cm] on (frame.south east) + in node at ([xshift=-2.5cm,yshift=-2.5cm]frame.south east); + \node[right] at ([xshift=2cm,yshift=-1cm]frame.south west) {\textbf{\Large\ttfamily\n}}; + }] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{tcolorbox}} +\end{extcolorbox} + +\clearpage +\subsection{Transparency} + +\begin{marker} +Transparency effects are likely to be used in conjunction with \emph{jigsaw} +skin variants, see \Vref{subsec:skinjigsaw}. +\end{marker} + +\begin{docTcbKey}{opacityframe}{=\meta{fraction}}{no default, initially \texttt{1.0}} + Sets the frame opacity of the box to the given \meta{fraction}. +\begin{exdispExample*}{opacityframe}{sbs,lefthand ratio=0.6,segmentation style={pattern=checkerboard light gray}} +\begin{tcolorbox}[opacityframe=0.25, + colframe=red] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{opacityback}{=\meta{fraction}}{no default, initially \texttt{1.0}} + Sets the background opacity of the box to the given \meta{fraction}. +\begin{exdispExample*}{opacityback}{sbs,lefthand ratio=0.6,segmentation style={pattern=checkerboard light gray}} +\begin{tcolorbox}[standard jigsaw,colframe=red, + opacityframe=0.5, opacityback=0.5] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{opacitybacktitle}{=\meta{fraction}}{no default, initially \texttt{1.0}} + Sets the title background opacity of the box to the given \meta{fraction}. +\begin{exdispExample*}{opacitybacktitle}{sbs,lefthand ratio=0.6,segmentation style={pattern=checkerboard light gray}} +\begin{tcolorbox}[standard jigsaw,colframe=red, + opacityframe=0.5, opacitybacktitle=0.5, + title filled, title=This is a title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{opacityfill}{=\meta{fraction}}{style, no default, initially \texttt{1.0}} + Sets the fill opacity for frame, interior and optionally the title background + to the given \meta{fraction}. +\begin{exdispExample*}{opacityfill}{sbs,lefthand ratio=0.6,segmentation style={pattern=checkerboard light gray}} +\begin{tcolorbox}[standard jigsaw,colframe=red, + opacityfill=0.7, title=This is a title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{opacityupper}{=\meta{fraction}}{no default, initially \texttt{1.0}} + Sets the text opacity of the upper box part to the given \meta{fraction}. +\begin{exdispExample*}{opacityupper}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced,opacityupper=0.5, + interior style={pattern=checkerboard light gray}] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{opacitylower}{=\meta{fraction}}{no default, initially \texttt{1.0}} + Sets the text opacity of the lower box part to the given \meta{fraction}. +\begin{exdispExample*}{opacitylower}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced,opacitylower=0.5, + interior style={pattern=checkerboard light gray}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{opacitytext}{=\meta{fraction}}{no default, initially \texttt{1.0}} + Sets the text opacity of the upper and the lower box part to the given \meta{fraction}. +\begin{exdispExample*}{opacitytext}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced,opacitytext=0.5, + interior style={pattern=checkerboard light gray}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{opacitytitle}{=\meta{fraction}}{no default, initially \texttt{1.0}} + Sets the text opacity of the box title to the given \meta{fraction}. +\begin{exdispExample*}{opacitytitle}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced,opacitytitle=0.7, + coltitle=black, + fonttitle=\bfseries,title=This is a title, + title style={pattern=checkerboard light gray}] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{exdispExample*}{opacity_general}{segmentation style={pattern=checkerboard light gray}} +\begin{tcolorbox}[enhanced jigsaw,fonttitle=\bfseries,title=This is a title, + opacityframe=0.5,opacityback=0.25,opacitybacktitle=0.25,opacitytext=0.8, + colback=red!5!white,colframe=red!75!black,colbacktitle=yellow!20!red] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + + + +\clearpage +\subsection{Height Control}\label{sec:heightcontrol} +In a typical usage scenario, the height of a |tcolorbox| is computed automatically +to fit the content. Nevertheless, the height can be set to a fixed value +or to fit commonly for several boxes, e.\,g. if boxes are set side by side. + +\bigskip +\begin{marker} + The height control keys are only applicable to unbreakable boxes. + If a box is set to be \refKey{/tcb/breakable}, the height is always + computed according to the \emph{natural height}. +\end{marker} +\bigskip + + +\begin{docTcbKey}{natural height}{}{no value, initially set} + Sets the total height of the colored box to its natural height depending + on the box content. +\end{docTcbKey} + +\begin{docTcbKey}{height}{=\meta{length}}{no default} + Sets the total height of the colored box to \meta{length} independent + of the box content. \meta{length} is the minimum height of the box, if + \refKey{/tcb/height plus} is larger than zero. +\begin{exdispExample}{height} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill, +colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[height=1cm,valign=center] + This box has a height of 1cm. +\end{tcolorbox} +\begin{tcolorbox}[height=2cm,valign=center] + This box has a height of 2cm. +\end{tcolorbox} +\begin{tcolorbox}[height=3cm,split=0.5,valign=center,valign lower=center] + This box has a height of 3cm. + \tcblower + Lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\enlargethispage*{10mm} +\begin{docTcbKey}{height plus}{=\meta{length}}{no default, initially |0pt|} + The box may extend a given fixed \refKey{/tcb/height} up to the given \meta{length}. +\begin{exdispExample}{height_plus} +\tcbset{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm,bottom=1mm, + right=1mm,boxsep=0mm,width=3cm,nobeforeafter} + +\begin{tcolorbox}[height=1cm] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[height=1cm,height plus=1cm] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[height=1cm,height plus=1cm] +This is a tcolorbox. This is a tcolorbox. This is a tcolorbox. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{height from}{=\meta{min} \texttt{to} \meta{max}}{style, no default} + Sets the box height to a dimension between \meta{min} and \meta{max}. +\begin{exdispExample}{height_from} +% \usepackage{lipsum} +\newtcolorbox{mybox}{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, + bottom=1mm,right=1mm,boxsep=0mm,width=4.5cm,nobeforeafter, + height from=2cm to 8cm} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} +\begin{mybox} +This is a tcolorbox. This is a tcolorbox. This is a tcolorbox. +\end{mybox} +\begin{mybox} +\lipsum[2] +\end{mybox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-10-31]{text height}{=\meta{length}}{style, no default} + Sets the text height to \meta{length}. This is the length from the top + of the upper part to the bottom of the optional lower part. + See also \refKey{/tcb/text width}. +\begin{exdispExample}{text_height} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[text height=2cm] +This is a \textbf{tcolorbox} where the text area has a height of 2cm. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}[][doc new=2014-11-07]{add to height}{=\meta{length}}{style, no default} + Adds \meta{length} to the current height of the colored box. + \refKey{/tcb/height} has to be set before this key is used! + If this option is used several times, then the \refKey{/tcb/height} is + also increased several times. +\begin{exdispExample}{add_to_height} +\tcbset{height=2cm, + valign=center,width=(\linewidth-2mm)/2, + before=,after=\hfill,colframe=blue!75!black,colback=white} + +\begin{tcolorbox} + This box has a height of 2cm. +\end{tcolorbox} +\begin{tcolorbox}[add to height=1cm] + This box has a height of 3cm. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2016-02-16]{add to natural height}{=\meta{length}}{style, no default} + The application of this option generates a box with natural height plus + the given \meta{length}. If this option is used several times, then the + last setting of \meta{length} wins. The resulting box is not considered + a fixed height box and the implementation is quite different to + \refKey{/tcb/add to height}. +\begin{exdispExample}{add_to_natural_height} +\tcbset{valign=center,width=(\linewidth-2mm)/2, + before=,after=\hfill,colframe=blue!75!black,colback=white} + +\begin{tcolorbox} + This box has natural height. +\end{tcolorbox} +\begin{tcolorbox}[add to natural height=1cm] + This box has natural height plus 1 cm. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new and updated={2014-09-22}{2016-02-17}]{height fill}{\colOpt{=true\textbar false\textbar maximum}}{default |true|, initially |false|} +If set to \docValue*{true}, the height of the |tcolorbox| is set to the rest of the +available vertical space of the current page. +If set to \docValue{maximum}, the page is compressed as much as possible. +Note that the |tcolorbox| +is always set as its own paragraph using this option. +Also see \refKey{/tcb/text fill}. +\begin{marker} +Note that the library \mylib{breakable} has to be loaded to use this key! +\end{marker} +This height control key is only applicable to unbreakable boxes, but it +uses code from the library \mylib{breakable}. +The counterpart for breakable boxes is \refKey{/tcb/height fixed for}. + +This option can and should not be used for boxes in boxes, but it can be +used for boxes inside a \refEnv{tcbraster}. + +\begin{dispListing} +% \usepackage{lipsum} +% \tcbuselibrary{breakable} +\begin{tcolorbox}[height fill, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + title=Box which fills the rest of the page] +\lipsum[1] +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} +{\tcbusetemp} + + +\clearpage +\begin{docTcbKey}[][doc new={2017-06-28}]{inherit height}{\colOpt{=fraction}}{default |1|, initially unset} + If this option is used for a |tcolorbox| which is embedded inside + another (outer) |tcolorbox| \emph{and} if this outer |tcolorbox| has + a fixed height, then the given \meta{fraction} of the available text height + of the outer |tcolorbox| is used as \refKey{/tcb/height} for the current + |tcolorbox|. + Otherwise, \refKey{/tcb/natural height} is applied for the current + |tcolorbox|. + +\begin{exdispExample}{inherit_height} +\tcbset{colframe=blue!75!black,colback=white,fonttitle=\bfseries} + +\begin{tcolorbox}[title=Outer box with fixed height 4cm,height=4cm] + \begin{tcolorbox}[title=Inner box,nobeforeafter,inherit height] + This inner box matches the available space. + \end{tcolorbox} +\end{tcolorbox} + +\begin{tcolorbox}[title=Outer box with natural height] + \begin{tcolorbox}[title=Inner box,nobeforeafter,inherit height] + This inner box has its natural height. + \end{tcolorbox} +\end{tcolorbox} + +\begin{tcolorbox}[title=Outer box with fixed height 5cm,height=5cm] + \begin{tcolorbox}[title=Inner box,nobeforeafter,inherit height] + \begin{tcolorbox}[colframe=red,beforeafter skip=0pt,inherit height=0.6] + Deeply nested box using 60 percent of the available space. + \end{tcolorbox} + \begin{tcolorbox}[colframe=red,beforeafter skip=0pt,inherit height=0.4] + Deeply nested box using 40 percent of the available space. + \end{tcolorbox} + \end{tcolorbox} +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage + +\begin{docTcbKey}[][doc new=2015-05-05]{square}{}{style, no value} + Sets \refKey{/tcb/height} to match the width of the colored box. +\begin{exdispExample*}{square}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[width=3cm, + colback=red!5!white, + colframe=red!75!black, + halign=center,valign=center, + square] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + + +\begin{docTcbKey}{space}{=\meta{fraction}}{no default, initially 0} + If the height of a |tcolorbox| is not the natural height, the space + difference between the forced and the natural size is distributed + between the upper and the lower part of the box. This space could also + be negative. + \meta{fraction} with a value between 0 and 1 is the amount of space + which is added to the upper part, the rest is added to the lower part. + If there is no lower part, then all of the space is added to + the upper part always. +\begin{exdispExample}{fraction} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill, +colframe=blue!75!black,colback=white,height=3cm} + +\foreach \f in {0.2,0.4,0.7} +{\begin{tcolorbox}[space=\f] + This is the upper part. + \tcblower + This is the lower part. +\end{tcolorbox}} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{space to upper}{}{style} + This is an abbreviation for |space=1|, i.\,e. all extra space is added + to the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{space to lower}{}{style, initially set} + This is an abbreviation for |space=0|, i.\,e. all extra space is added + to the lower part (if there is any). +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{space to both}{}{style} + This is an abbreviation for |space=0.5|, i.\,e. the extra space + equally distributed between the upper and the lower part. +\begin{exdispExample}{space_to_both} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill, +colframe=blue!75!black,colback=white,height=3cm} + +\foreach \myspace in {space to upper,space to both,space to lower} +{\begin{tcolorbox}[\myspace] + This is the upper part. + \tcblower + This is the lower part. +\end{tcolorbox}} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2015-02-15]{space to}{=\meta{macro}}{no default, initially unset} + If the height of a |tcolorbox| is not the natural height, the space + difference between the forced and the natural size is saved into the + given local \meta{macro}. This \meta{macro} can and should be used inside + the box content to add content which is vertically sized to match \meta{macro}. + \begin{marker} + \begin{itemize} + \item The actual length saved into \meta{macro} is adapted dynamically + during several compilations -- at least two, but maybe more. + \item Due to the adaption algorithm, objects can be sized with + \meta{macro} plus any offset length. + \item Never ever use \meta{macro} multiplied with a factor. The only + exception to this rule is that the space can be split into parts which + sum to \meta{macro}. + \item Never use this in combination with \refKey{/tcb/fit}. + \end{itemize} + \end{marker} +\begin{exdispExample}[runs=3]{space_to_1} +\begin{tcolorbox}[colframe=blue!75!black,colback=white,height=3cm, + space to=\myspace] + This is my box of height 3cm. The space is filled with a picture:\\[2mm] + \includegraphics[width=\linewidth,height=\myspace]{goldshade.png}\\[1mm] + This is some other text. +\end{tcolorbox} +\end{exdispExample} + +\begin{exdispExample}[runs=3]{space_to_2} +\begin{tcolorbox}[colframe=blue!75!black,colback=white,height=3cm, + space to=\myspace] + \includegraphics[width=\linewidth, + height=0.33\dimexpr\myspace]{blueshade.png}\\[1mm] + This is my box of height 3cm.\\[2mm] + \includegraphics[width=\linewidth, + height=0.67\dimexpr\myspace]{goldshade.png} +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + + +\begin{docTcbKey}{split}{=\meta{fraction}}{no default} + If the height of a |tcolorbox| is not the natural height, the + \meta{fraction} with a value between 0 and 1 determines the positioning + of the segmentation between the upper and the lower part. Here, 0 stands + for top and 1 for bottom. Note that the box is split regardless of + the actual dimensions of the text parts! +\begin{exdispExample}{split} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill,height=3cm, +colback=white,colframe=blue!75!black,valign=center,valign lower=center} + +\foreach \f in {0.1,0.5,0.8} +{\begin{tcolorbox}[split=\f] +This is the upper part. +\tcblower +This is the lower part with a lot of text in several lines. +\end{tcolorbox}} +\end{exdispExample} +\end{docTcbKey} + + + + +\clearpage +\begin{docTcbKey}[][doc updated=2014-11-07]{equal height group}{=\meta{id}}{no default} + Boxes which are members of an |equal height group| will all get the + same height, i.\,e. the maximum of all their natural heights. The + \meta{id} serves to distinguish between different height groups. + %This \meta{id} should contain only characters which are feasible + %for \TeX\ macro names, typically alphabetic characters but no numerals + %and spaces. + Note that you have to compile twice to see changes and + that height groups are global definitions. + + +\begin{exdispExample}[runs=2]{equal_height_group} +\tcbset{width=(\linewidth-2mm)/3,before=,after=\hfill,arc=0mm, +colframe=blue!75!black,colback=white,fonttitle=\bfseries} + +\begin{tcolorbox}[equal height group=A,adjusted title={One}] + My smallest box. +\end{tcolorbox}% +\begin{tcolorbox}[equal height group=A,adjusted title={Two}] + This box is also small. + \tcblower + But with a lower part. +\end{tcolorbox}% +\begin{tcolorbox}[equal height group=A,adjusted title={Three}] + This box contains a lot of text just to fill the space + with word flowing and flowing and flowing until the box + is filled with all of it. +\end{tcolorbox}\linebreak +% +\tcbset{width=(\linewidth-1mm)/2,before=,after=\hfill,arc=0mm, +colframe=red!75!black,colback=white} +% +\begin{tcolorbox}[equal height group=B] + Now, we use another equal height group. +\end{tcolorbox}% +\begin{tcolorbox}[equal height group=B,after=] + \begin{equation*} + \int\limits_{0}^{1} x^2 = \frac13. + \end{equation*} +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\medskip +\begin{marker} +See \Vref{sec:raster} for more equal height options. +\end{marker} + +\clearpage +\begin{docTcbKey}{minimum for equal height group}{=\meta{id}:\meta{length}}{no default, initially unset} + Plants a \meta{length} into the equal height group with + the given \meta{id}. This ensures that the height will not drop below + \meta{length}. Note that you cannot reduce a computed height value + by using this key with a small value. + The difference to applying \refKey{/tcb/height} directly is that the boxes + are never too small for their content. + +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white,arc=0mm, + before=,after=\hfill,fonttitle=\bfseries,left=2mm,right=2mm, + width=3.5cm, + equal height group=C, + minimum for equal height group=C:3.5cm} + +\begin{tcolorbox} + My first box. All boxes will get 3.5cm times 3.5cm + if the content height is not too large. +\end{tcolorbox}% +\begin{tcolorbox} + My second box. + \tcblower + This is the lower part. +\end{tcolorbox}% +\begin{tcblisting}{} +\textbf{Mixed} +with a listing. +\end{tcblisting} +\begin{tcolorbox}[title={Fourth box}] + My final box. +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2016-03-24]{minimum for current equal height group}{=\meta{length}}{no default, initially unset} + Sets \refKey{/tcb/minimum for equal height group} for the current equal height + group. Apparently, this only works for an already known equal height group, i.e. + \refKey{/tcb/equal height group} has to be set \emph{before} this option is used. + This option is likely to be used in combination with \refKey{/tcb/raster equal height} + +\begin{exdispExample}[runs=2]{minimum_for_current_equal_height_group} +% \tcbuselibrary{raster} +\begin{tcbitemize}[raster equal height,colframe=blue!75!black,colback=white, + raster every box/.style={minimum for current equal height group=2cm}] + \tcbitem A + \tcbitem B +\end{tcbitemize} +\end{exdispExample} + +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new and updated={2015-11-27}{2016-02-22}]{use height from group}{\colOpt{=\meta{id}}}{style, default current group} + Sets the current box to a fixed \refKey{/tcb/height} which is copied from + an equal height group with the given \meta{id}. If this height is not + available during the current compilation, no fixed height setting is used. + If \meta{id} is omitted, the current equal height group is used which has + to be set before by \refKey{/tcb/equal height group}.\par + Note that the natural height of the current box is not considered for + computation of the group height. The main application for + \refKey{/tcb/use height from group} is that the height can be adapted + further by \refKey{/tcb/add to height}. + +\begin{dispExample} +\begin{tcolorbox}[use height from group=C,add to height=-2cm, + colframe=blue!75!black,colback=white] +Height from group 'C' of the previous example, but reduced by 2cm. +\end{tcolorbox}% +\end{dispExample} + +\begin{exdispExample}[runs=2]{use_height_from_group} +% \tcbuselibrary{raster} +Every line is inside an equal height group: +\begin{tcbraster}[raster equal height=rows, + title=Box \thetcbrasternum, + enhanced,size=small,colframe=red!50!black,colback=red!10!white] + \begin{tcolorbox}First line\\second line\\ + The height of this box rules.\end{tcolorbox} + \begin{tcolorbox}[use height from group]Test\end{tcolorbox} + \begin{tcolorbox}[use height from group] + First line\\second line\end{tcolorbox} + \begin{tcolorbox}The height of this box rules.\end{tcolorbox} +\end{tcbraster} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docCommand}[doc new=2015-11-27]{tcbheightfromgroup}{\marg{macro}\marg{id}} + Saves the height from an equal height group with the given \meta{id} + to a \meta{macro}. If this height is not available during the current compilation, + \meta{macro} is set to |0pt|. +\end{docCommand} + + +\clearpage +\subsection{Box Content Additions}\label{subsec:contentadditions} +The following options introduce some arbitrary \meta{code} to the content +of a |tcolorbox|. These additions can be given at the beginning or at the ending +of the title, the upper part, or the lower part. + +\begin{docTcbKey}{before title}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the color and font settings + and \emph{before} the content of the title. +\begin{exdispExample}{before_title} +\tcbset{before title={\textcolor{yellow}{\large Important:}~}, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{after title}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the content of the title. +\begin{exdispExample}{after_title} +\tcbset{after title={\hfill\colorbox{Navy}{approved}}, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{before upper}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the color and font settings + and \emph{before} the content of the upper part. +\begin{exdispExample}{before_upper} +\tcbset{before upper={\textit{The story:}\par}, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2016-10-21]{after upper}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the content of the upper part. +\begin{exdispExample}{after_upper_1} +\tcbset{after upper={\par\hfill\textit{Read more next week}}, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} + +\begin{exdispExample}{after_upper_2} +\begin{tcolorbox}[before upper=\flqq,after upper=\frqq, + colback=red!5!white,colframe=red!75!black] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} + +\begin{marker} +An |\unskip| is placed in front of the given \meta{code}. +From version 3.80 to 3.94, this |\unskip| was omitted to avoid certain +problems which (hopefully) should not occur with the new improved code. +\end{marker} + +\end{docTcbKey} + +\begin{docTcbKey}[][doc new and updated={2016-10-21}{2016-10-21}]{after upper*}{=\meta{code}}{no default, initially unset} + Alias for \refKey{/tcb/after upper}. + From version 3.80 to 3.94, it prepended an |\unskip| to the given \meta{code}. + Now, this key is considered to be deprecated. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{before lower}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the color and font settings + and \emph{before} the content of the lower part. +\begin{exdispExample}{before_lower} +\tcbset{before lower=\textit{Behold:~},colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox} +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated=2016-10-21]{after lower}{=\meta{code}}{no default, initially unset} + The given \meta{code} is placed \emph{after} the content of the lower part. +\begin{exdispExample}{after_lower_1} +\begin{tcolorbox}[before lower=$,after lower=$, + colback=red!5!white,colframe=red!75!black] +This is a \textbf{tcolorbox}. +\tcblower +\sin^2(x)+\cos^2(x)=1. +\end{tcolorbox} +\end{exdispExample} + +\begin{exdispExample}{after_lower_2} +\begin{tcolorbox}[after lower=\ \textit{This is the end.}, + colback=red!5!white,colframe=red!75!black] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} + +\begin{marker} +An |\unskip| is placed in front of the given \meta{code}. +From version 3.80 to 3.94, this |\unskip| was omitted to avoid certain +problems which (hopefully) should not occur with the new improved code. +\end{marker} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new and updated={2016-10-21}{2016-10-21}]{after lower*}{=\meta{code}}{no default, initially unset} + Alias for \refKey{/tcb/after lower}. + From version 3.80 to 3.94, it prepended an |\unskip| to the given \meta{code}. + Now, this key is considered to be deprecated. +\end{docTcbKey} + + +\clearpage +\begin{marker} +If \refKey{/tcb/text fill} is used, one cannot have a lower part +and the box is unbreakable. +\end{marker} + +\begin{docTcbKey}[][doc new=2015-07-15]{text fill}{}{style, no value} + This style sets \refKey{/tcb/before upper} and \refKey{/tcb/after upper} + to embed the upper part with a minipage. If a fixed height was applied + e.g.\ by \refKey{/tcb/height} or \refKey{/tcb/height fill}, this minipage + gets a matching height. This allows to use vertical glue macros like + |\vfill| to act like expected. If the box has no fixed height, + setting \refKey{/tcb/text fill} has no other effect as making the box + unbreakable. +\begin{exdispExample}{text_fill} +\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + height=8cm,text fill, + title=My filled box] +This is a \textbf{tcolorbox}. +\par\vfill +\begin{center} + My middle text. +\end{center} +\par\vfill +This is the end of my box. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{marker} +If \refKey{/tcb/tabularx} or \refKey{/tcb/tabularx*} are used, one cannot +have a lower part. +\end{marker} + +\begin{docTcbKey}{tabularx}{=\meta{preamble}}{style} + This style sets \refKey{/tcb/before upper} and \refKey{/tcb/after upper} + and several geometry keys to support a |tabularx| with the + given \meta{preamble}. + The packages |tabularx| \cite {carlisle:2014a}, |array|, and |colortbl| + have to be loaded separately. +\begin{exdispExample}{tabularx_1} +% \usepackage{array,tabularx} +% \usepackage{colortbl} - or - \usepackage[table]{xcolor} +\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}% see tabularx +\tcbset{enhanced,fonttitle=\bfseries\large,fontupper=\normalsize\sffamily, + colback=yellow!10!white,colframe=red!50!black,colbacktitle=Salmon!30!white, + coltitle=black,center title} + +\begin{tcolorbox}[tabularx={X||Y|Y|Y|Y||Y},title=My table] +Group & One & Two & Three & Four & Sum\\\hline\hline +Red & 1000.00 & 2000.00 & 3000.00 & 4000.00 & 10000.00\\\hline +Green & 2000.00 & 3000.00 & 4000.00 & 5000.00 & 14000.00\\\hline +Blue & 3000.00 & 4000.00 & 5000.00 & 6000.00 & 18000.00\\\hline\hline +Sum & 6000.00 & 9000.00 & 12000.00 & 15000.00 & 42000.00 +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{tabularx*}{=\marg{code}\marg{preamble}}{style} + This is a variant of \refKey{/tcb/tabularx} which adds some \meta{code} + before the table starts. +\begin{exdispExample}{tabularx_2} +% \usepackage{array,tabularx} +% \usepackage{colortbl} - or - \usepackage[table]{xcolor} +\tcbset{enhanced,fonttitle=\bfseries\large,fontupper=\normalsize\sffamily, + colback=yellow!10!white,colframe=red!50!black,colbacktitle=Salmon!30!white, + coltitle=black,center title} + +\begin{tcolorbox}[tabularx*={\arrayrulewidth0.5mm}{X|X|X},title=My table] +One & Two & Three \\\hline\hline +1000.00 & 2000.00 & 3000.00\\\hline +2000.00 & 3000.00 & 4000.00 +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{tikz upper}{\colOpt{=\meta{options}}}{style} + This style adds a centered |tikzpicture| environment to the start and end + of the upper part. The \meta{options} may be given as \tikzname\ picture options. +\begin{exdispExample}{tikz_upper} +% \usepackage{tikz} + +\begin{tcolorbox}[tikz upper,fonttitle=\bfseries,colback=white,colframe=black, + title=\tikzname\ drawing] + \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm); + \fill[red] (45:5mm) circle (1mm); + \fill[red] (135:5mm) circle (1mm); + \draw[line width=1mm,red] (215:5mm) arc (215:325:5mm); +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{tikz lower}{\colOpt{=\meta{options}}}{style} + This style adds a centered |tikzpicture| environment to the start and end + of the lower part. The \meta{options} may be given as \tikzname\ picture options. +\begin{exdispExample}{tikz_lower} +% \usepackage{tikz} +% \tcbuselibrary{skins,listings} +\tcbset{tikz lower,listing side text,fonttitle=\bfseries, + bicolor,colback=LightBlue!50!white,colbacklower=white,colframe=black, + righthand width=3cm} + +\begin{tcblisting}{title=\tikzname\ drawing} +\path[fill=yellow,draw=yellow!75!red] + (0,0) circle (1cm); +\fill[red] (45:5mm) circle (1mm); +\fill[red] (135:5mm) circle (1mm); +\draw[line width=1mm,red] + (215:5mm) arc (215:325:5mm); +\end{tcblisting} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{tikznode upper}{\colOpt{=\meta{options}}}{style} + This style places the upper part content into a centered + \tikzname\ node. The \meta{options} may be given as \tikzname\ node options. + This style is especially useful for boxes with multiline texts which are + fitted to the text width. +\begin{exdispExample}{tikznode_upper} +% \usepackage{tikz} +\newtcbox{\headline}[1][]{enhanced,center, + ignore nobreak,fontupper=\Large\bfseries, + colframe=red!50!black,colback=red!10!white, + drop fuzzy shadow=yellow,tikznode upper,#1} + +\headline{Important\\Headline} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{tikznode lower}{\colOpt{=\meta{options}}}{style} + This style places the lower part content into a centered + \tikzname\ node. The \meta{options} may be given as \tikzname\ node options. +\begin{exdispExample}{tikznode_lower} +% \usepackage{tikz} +\begin{tcolorbox}[bicolor,colback=LightBlue!50!white,colbacklower=white, + colframe=black,tikznode lower={inner sep=2pt,draw=red,fill=yellow}] +Upper part. +\tcblower +Lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{tikznode}{\colOpt{=\meta{options}}}{style} + Shortcut for setting \refKey{/tcb/tikznode upper} and \refKey{/tcb/tikznode lower} + the same time. +\end{docTcbKey} + + +\begin{docTcbKey}{varwidth upper}{\colOpt{=\meta{length}}}{style, default \refKey{/tcb/width}} + This style places the upper part content into a |varwidth| environment. + This style needs the |varwidth| package \cite{arseneau:2011a} to be loaded manually. + The resulting box has a maximal width of \meta{length}. + This option is only senseful for a \refCom{tcbox}. +\begin{exdispExample*}{varwidth_upper}{sbs,lefthand ratio=0.6} +% \usepackage{varwidth} +\newtcbox{\varbox}{colframe=red!50!black, + colback=red!10!white,varwidth upper} + +\varbox{Short text.} +\varbox{This box contains is a longer text + which is broken.} +\end{exdispExample*} +\end{docTcbKey} + + +\clearpage +\subsection{Overlays}\label{subsec:overlays} +With an overlay, arbitrary \meta{graphical code} can be added to a +|tcolorbox|. This code is executed \emph{after} the frame and interior are +drawn and \emph{before} the text content is drawn. Therefore, you can +decorate the |tcolorbox| with your own extensions. +Common special cases are \emph{watermarks} which are implemented using overlays. +See Subsection \ref{subsec:watermarks} from page \pageref{subsec:watermarks} if +you want to add \emph{watermarks}. +\begin{marker} +If you use the core package only, the \meta{graphical code} has to be |pgf| code +and there is not much assistance for positioning. +Therefore, the usage of the \refKey{/tcb/enhanced} mode from the library skins +is recommended which allows |tikz| code and gives access to +\refKey{/tcb/geometry nodes} for positioning. +\end{marker} + +\begin{docTcbKey}{overlay}{=\meta{graphical code}}{no default, initially unset} + Adds \meta{graphical code} to the box drawing process. This \meta{graphical code} + is drawn \emph{after} the frame and interior and \emph{before} the text content. + +\begin{exdispExample}{overlay_1} +% \tcbuselibrary{skins} % preamble +\tcbset{frogbox/.style={enhanced,colback=green!10,colframe=green!65!black, + enlarge top by=5.5mm, + overlay={\foreach \x in {2cm,3.5cm} { + \begin{scope}[shift={([xshift=\x]frame.north west)}] + \path[draw=green!65!black,fill=green!10,line width=1mm] (0,0) arc (0:180:5mm); + \path[fill=black] (-0.2,0) arc (0:180:1mm); + \end{scope}}}}} + +\begin{tcolorbox}[frogbox,title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} + +\enlargethispage*{5mm} +\begin{exdispExample}{overlay_2} +% \usetikzlibrary{patterns} % preamble +% \tcbuselibrary{skins} % preamble +\tcbset{ribbonbox/.style={enhanced,colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries, + overlay={\path[fill=blue!75!white,draw=blue,double=white!85!blue, + preaction={opacity=0.6,fill=blue!75!white}, + line width=0.1mm,double distance=0.2mm, + pattern=fivepointed stars,pattern color=white!75!blue] + ([xshift=-0.2mm,yshift=-1.02cm]frame.north east) + -- ++(-1,1) -- ++(-0.5,0) -- ++(1.5,-1.5) -- cycle;}}} + +\begin{tcolorbox}[ribbonbox,title=My title] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{no overlay}{}{style, no default, initially set} + Removes the overlay if set before. +\end{docTcbKey} + +\begin{docTcbKey}{overlay broken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} but \emph{is not} broken actually + or if the box is set to be \refKey{/tcb/unbreakable}, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay first}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{first} part of the break sequence. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay middle}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{middle} parts (if any) of the break sequence. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay last}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{last} part of the break sequence. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken and first}{=\meta{graphical code}}{no default, initially unset} + This is an optimized abbreviation for setting + \refKey{/tcb/overlay unbroken} and + \refKey{/tcb/overlay first} together. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay middle and last}{=\meta{graphical code}}{no default, initially unset} + This is an optimized abbreviation for setting + \refKey{/tcb/overlay middle} and + \refKey{/tcb/overlay last} together. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken and last}{=\meta{graphical code}}{no default, initially unset} + This is an optimized abbreviation for setting + \refKey{/tcb/overlay unbroken} and + \refKey{/tcb/overlay last} together. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{overlay first and middle}{=\meta{graphical code}}{no default, initially unset} + This is an optimized abbreviation for setting + \refKey{/tcb/overlay first} and + \refKey{/tcb/overlay middle} together. + \refKey{/tcb/overlay} overwrites this key. +\end{docTcbKey} + + +\begin{dispListing*}{breakable,vfill before first,before upper={This example demonstrates +the application of break sequence specific overlay options. +Here, we define an environment |myexample| based +on |tcolorbox| where the visible drawing is done totally by overlay keys.\par +Here, the first application of |myexample| produces an unbroken |tcolorbox|. +The frame is drawn by the code given with \refKey{/tcb/overlay unbroken}.\par +The second application of |myexample| is broken into several parts which +are drawn by the codes given with +\refKey{/tcb/overlay first}, \refKey{/tcb/overlay middle}, and +\refKey{/tcb/overlay last}. +\par\bigskip +}} +% Preamble: +%\usepackage{tikz,lipsum} +%\tcbuselibrary{skins,breakable} +%\newcounter{example} +\colorlet{colexam}{red!75!black} +\newtcolorbox[use counter=example]{myexample}{% + empty,title={Example \thetcbcounter},attach boxed title to top left, + boxed title style={empty,size=minimal,toprule=2pt,top=4pt, + overlay={\draw[colexam,line width=2pt] + ([yshift=-1pt]frame.north west)--([yshift=-1pt]frame.north east);}}, + coltitle=colexam,fonttitle=\Large\bfseries, + before=\par\medskip\noindent,parbox=false,boxsep=0pt,left=0pt,right=3mm,top=4pt, + breakable,pad at break*=0mm,vfill before first, + overlay unbroken={\draw[colexam,line width=1pt] + ([yshift=-1pt]title.north east)--([xshift=-0.5pt,yshift=-1pt]title.north-|frame.east) + --([xshift=-0.5pt]frame.south east)--(frame.south west); }, + overlay first={\draw[colexam,line width=1pt] + ([yshift=-1pt]title.north east)--([xshift=-0.5pt,yshift=-1pt]title.north-|frame.east) + --([xshift=-0.5pt]frame.south east); }, + overlay middle={\draw[colexam,line width=1pt] ([xshift=-0.5pt]frame.north east) + --([xshift=-0.5pt]frame.south east); }, + overlay last={\draw[colexam,line width=1pt] ([xshift=-0.5pt]frame.north east) + --([xshift=-0.5pt]frame.south east)--(frame.south west);},% +} + +\begin{myexample} +\lipsum[1] +\end{myexample} + +\begin{myexample} +\lipsum[2-11] +\end{myexample} + +\lipsum[12]% following text +\end{dispListing*} +{\tcbusetemp} + + +%\begin{dispExample} +%% \tcbuselibrary{skins} +%% \newcounter{example} +%\newtcolorbox[use counter=example]{FancyTitle}[3][]{% +% enhanced,colback=blue!10!white,colframe=orange,top=4mm, +% enlarge top by=\baselineskip/2+1mm, +% enlarge top at break by=0mm,pad at break=2mm, +% fontupper=\normalsize,label={#3}, +% overlay unbroken and first={% +% \node[rectangle,rounded corners,draw=black,fill=blue!20!white, +% inner sep=1mm,anchor=west,font=\small] +% at ([xshift=4.5mm]frame.north west) +% {\strut\textbf{Example \thetcbcounter: #2}};}, +% #1}% + +%\begin{FancyTitle}{My fancy title}{fancy:title} +% \lipsum[1] +%\end{FancyTitle} +%\end{dispExample} + +\clearpage +\subsection{Floating Objects} +\begin{docTcbKey}{floatplacement}{=\meta{values}}{no default, initially \texttt{htb}} + Sets \meta{values} as default values for the usage of \refKey{/tcb/float} + and \refKey{/tcb/float*}. + Feasible are the usual parameters for floating objects. +\begin{dispListing} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black, + watermark color=red!15!white} + +\begin{tcolorbox}[floatplacement=t,float, + title=Floating box from |floatplacement|, + watermark text={I am floating}] + This floating box is placed at the top of a page. +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} +{\tcbusetemp} + + +\begin{docTcbKey}{float}{\colOpt{=\meta{values}}}{default from \texttt{floatplacement}} + Turns the box to a floating object where \meta{values} are the + usual parameters for such floating objects. + If they are not used, the placement uses the default values given by + |floatplacement|. +\begin{dispListing} +\begin{tcolorbox}[float, title=Floating box from |float|, + enhanced,watermark text={I'm also floating}] + This box floats to a feasible place automatically. You do not have to + use a numbering for this floating object. +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} +{\tcbusetemp} + + +\begin{docTcbKey}{float*}{\colOpt{=\meta{values}}}{default from \texttt{floatplacement}} + Identical to \refKey{/tcb/float}, but for wide boxes spanning the whole page + width of two column documents or in conjunction with the packages + |multicol| or |paracol|. Note that you have to set |width=\textwidth| + additionally, if the box should span the whole page width in these cases! +\begin{dispListing} +\begin{tcolorbox}[float*=b, title=Floating box from |float*|,width=\textwidth, + enhanced,watermark text={I'm also floating}] + In this single column document, you will see no difference to |float|. +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} +{\tcbusetemp} + + +\begin{docTcbKey}{nofloat}{}{style, initially set} + Turns the floating behavior off. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-09-19]{every float}{=\meta{code}}{no default, initially empty} + For floating objects, the \refKey{/tcb/before} and \refKey{/tcb/after} + settings are ignored. Instead, the given \meta{code} is inserted before + a floating box. If the box is \refKey{/tcb/breakable}, the given \meta{code} is + inserted before every part of the break sequence. + The most common use case is |every float=\centering|. + +\begin{dispListing} +\tcbox[float=htb,title={Floating box},every float=\centering, + colback=blue!50!black,colframe=blue!50!white,colbacktitle=blue!10!white, + coltitle=black,center title] + {\includegraphics[height=6cm]{lichtspiel.jpg}} +\end{dispListing} +{\tcbset{reset}\tcbusetemp} + +\end{docTcbKey} + + + +\clearpage +\subsection{Embedding into the Surroundings}\label{subsec:surroundings} +Typically, but not necessarily, a |tcolorbox| is put inside a separate paragraph +and has some vertical space before and after it. +This behavior is controlled by the keys |before| and |after|. + +\begin{docTcbKey}{before}{=\meta{code}}{no default, initially see \refKey{/tcb/autoparskip}} + Sets the \meta{code} which is executed before the colored box. + It is not used for floating boxes. + Also, it is not used, if the box follows a heading immediately + and \refKey{/tcb/ignore nobreak} is set to \docValue{false}. +\end{docTcbKey} + +\begin{docTcbKey}{after}{=\meta{code}}{no default, initially see \refKey{/tcb/autoparskip}} + Sets the \meta{code} which is executed after the colored box. + It is not used for floating boxes. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2017-02-01]{parskip}{}{style, no value} + Sets the keys |before| and |after| to values which are + recommended, if the package |parskip| \emph{is} used and there is no better + idea for |before| and |after|. This is similar to: +\begin{dispListing} +\tcbset{parskip/.style={before={\par\pagebreak[0]\parindent=0pt}, + after={\par}}} +\end{dispListing} +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2017-02-01]{noparskip}{}{style, no value} + Sets the keys |before| and |after| to values which are + recommended, if the package |parskip| is \emph{not} used and there is no better + idea for |before| and |after|. This is similar to: +\begin{dispListing} +\tcbset{noparskip/.style={before={\par\pagebreak[0]\smallskip\parindent=0pt}, + after={\par\smallskip}}} +\end{dispListing} +\end{docTcbKey} + +\begin{docTcbKey}{autoparskip}{}{style, no value, initially set} + Tries to detect the usage of the package |parskip| and sets + the keys |before| and |after| accordingly. Actually, the following is done: + \begin{itemize} + \item If the length of |\parskip| is greater than |0pt| at the beginning of the document, + \refKey{/tcb/parskip} is executed. Here, the usage of package |parskip| is \emph{assumed}. + \item Otherwise, if the length of |\parskip| is not greater than |0pt| at the beginning of the document, + \refKey{/tcb/noparskip} is executed. Here, the absence of package |parskip| is \emph{assumed}. + \end{itemize} + |autoparskip| is the default for the package |tcolorbox|, if |before| or |after| + are not changed otherwise. +\end{docTcbKey} + +\begin{docTcbKey}{nobeforeafter}{}{style, no value} + Abbreviation for clearing the keys |before| and |after|. The colored box + is not put into a paragraph and there is no space before or after the box. +\begin{exdispExample}{nobeforeafter} +\tcbset{myone/.style={colback=LightGreen,colframe=DarkGreen, + equal height group=nobefaf,width=\linewidth/4,nobeforeafter}} +\begin{tcolorbox}[myone,title=Box 1]Box 1\end{tcolorbox}% +\begin{tcolorbox}[myone,title=Box 2]Box 2\end{tcolorbox}% +\begin{tcolorbox}[myone,title=Box 3]Box 3\end{tcolorbox}% +\begin{tcolorbox}[myone,title=Box 4]Box 4\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\enlargethispage*{1cm} +\begin{docTcbKey}{forces nobeforeafter}{}{style, no value} + Forces the setting of \refKey{/tcb/nobeforeafter} even if + \refKey{/tcb/before} and \refKey{/tcb/after} are set to other values + later. Do not use this option globally unless you \emph{really} know what you do. + Note that embedded boxes do not inherit this forced clearance. +\end{docTcbKey} + + +\clearpage + +\begin{docTcbKey}{baseline}{=\meta{length}}{no default, initially |0pt|} + Used to set the |\pgfsetbaseline| value of the resulting |tcolorbox|. +\begin{exdispExample}{baseline} +\tcbset{colframe=red!50!white,width=4cm,nobeforeafter} +Some text\dotfill +\begin{tcolorbox}[baseline=3mm] +One line. +\end{tcolorbox} +\begin{tcolorbox}[baseline=3mm] +First line.\\Second line. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-10-10]{box align}{=\meta{alignment}}{style, no default, initially |bottom|} + Used to set the \refKey{/tcb/baseline} value of the resulting |tcolorbox|. + Feasible values for \meta{alignment} are: + \begin{itemize} + \item\docValue{bottom}: alignment with the box bottom, + \item\docValue{top}: alignment with the box top, + \item\docValue{center}: alignment with the box center, + \item\docValue{base}: alignment with the box content base. This option + is not applicable for a \refEnv{tcolorbox} but for a \refCom{tcbox} only. + It is an alias for \refKey{/tcb/tcbox raise base}. + \end{itemize} + +\begin{exdispExample}{box_align_1} +\tcbset{colframe=red!50!white,width=4cm,nobeforeafter} +Some text\dotfill +\begin{tcolorbox}[box align=bottom] +One line. +\end{tcolorbox} +\begin{tcolorbox}[box align=bottom] +First line.\\Second line. +\end{tcolorbox} +\end{exdispExample} + +\begin{exdispExample}{box_align_2} +\tcbset{colframe=red!50!white,width=4cm,nobeforeafter} +Some text\dotfill +\begin{tcolorbox}[box align=top] +One line. +\end{tcolorbox} +\begin{tcolorbox}[box align=top] +First line.\\Second line. +\end{tcolorbox} +\end{exdispExample} + +\begin{exdispExample}{box_align_3} +\tcbset{colframe=red!50!white,width=4cm,nobeforeafter} +Some text\dotfill +\begin{tcolorbox}[box align=center] +One line. +\end{tcolorbox} +\begin{tcolorbox}[box align=center] +First line.\\Second line. +\end{tcolorbox} +\end{exdispExample} + +\begin{exdispExample}{box_align_4} +\tcbset{colframe=red!50!white,nobeforeafter} +Some text\dotfill +\tcbox[nobeforeafter,box align=base]{One line} +\tcbox[nobeforeafter,box align=base,size=fbox]{Another line} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new and updated={2014-10-10}{2015-03-16}]{before skip}{=\meta{glue}}{style, no default} + Inserts some vertical space of the given \meta{glue} before the colored box. + This style sets \refKey{/tcb/before}. +\begin{exdispExample*}{before_skip}{sbs,lefthand ratio=0.6} +Some text. +\begin{tcolorbox}[before skip=1cm, + colframe=red!50!white] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new and updated={2014-10-10}{2017-02-01}]{after skip}{=\meta{glue}}{style, no default} + Inserts some vertical space of the given \meta{glue} after the colored box. + This style sets \refKey{/tcb/after}. +\begin{exdispExample*}{after_skip}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[after skip=1cm, + colframe=red!50!white] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +Some text. +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-10-10]{beforeafter skip}{=\meta{glue}}{style, no default} + Inserts some vertical space of the given \meta{glue} before \emph{and} after the colored box. + This style sets \refKey{/tcb/before} and \refKey{/tcb/after}. +\begin{exdispExample*}{beforeafter_skip}{sbs,lefthand ratio=0.6} +\tcbset{beforeafter skip=0pt, + colframe=red!50!white} +\begin{tcolorbox} + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox} + Second box. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}[][doc new=2014-11-07]{left skip}{=\meta{length}}{style, no default, initially |0mm|} + Inserts some horizontal space of the given \meta{length} before the colored box. + This style sets \refKey{/tcb/grow to left by} with the negated \meta{length}, + i.e. the bounding box and box width are changed. +\begin{exdispExample*}{left_skip}{sbs,lefthand ratio=0.6} +\noindent\rule{\linewidth}{2pt} + +\begin{tcolorbox}[left skip=1cm, + colframe=red!50!white] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-07]{right skip}{=\meta{length}}{style, no default, initially |0mm|} + Inserts some horizontal space of the given \meta{length} after the colored box. + This style sets \refKey{/tcb/grow to right by} with the negated \meta{length}, + i.e. the bounding box and box width are changed. +\begin{exdispExample*}{right_skip}{sbs,lefthand ratio=0.6} +\noindent\rule{\linewidth}{2pt} + +\begin{tcolorbox}[right skip=1cm, + colframe=red!50!white] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-10-10]{leftright skip}{=\meta{length}}{style, no default} + Inserts some horizontal space of the given \meta{length} before \emph{and} after the colored box. + This style changes the bounding box and the box width. +\begin{exdispExample*}{leftright_skip}{sbs,lefthand ratio=0.6} +\noindent\rule{\linewidth}{2pt} + +\begin{tcolorbox}[leftright skip=1cm, + colframe=red!50!white] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-12-11]{ignore nobreak}{\colOpt{=true\textbar false}}{default |true|, initially |false|} +After a heading, \LaTeX\ tries to avoid a break by setting a |nobreak| boolean value. +Starting from version |3.33|, the \refKey{/tcb/before} respectively \refKey{/tcb/before skip} +settings are not used after a heading if \refKey{/tcb/ignore nobreak} is +set to \docValue{false}. For an unbreakable box, \refKey{/tcb/before nobreak} is used instead. +Further, a \refKey{/tcb/breakable} box will also try to +avoid a break between a heading and a directly following first part of a +break sequence. + +Set \refKey{/tcb/ignore nobreak} to \docValue{true}, if |nobreak| should be +ignored as prior to version |3.33|. Also, such a setting may be used locally to +enforce the \refKey{/tcb/before} setting. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-12-16]{before nobreak}{=\meta{code}}{no default, initially \cs{noindent}} + Sets the \meta{code} which is executed before the colored box if it + is unbreakable, if \refKey{/tcb/ignore nobreak} is not set, and if + the box follows a heading. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-23]{parfillskip restore}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + If this option is set to be |true|, the minimum value of |\parfillskip| is + tested at specific spots, if it is greater than |0pt|. + If so, |\parfillskip| is restored to |\@flushglue| which happens to be + the default value. + + These tests are executed for + \refKey{/tcb/parskip}, + \refKey{/tcb/noparskip}, + \refKey{/tcb/after skip}, + \refKey{/tcb/breakable}, and + \refEnv{tcbraster}. + + This option was created to automatically + avoid overfull box warnings with |\parfillskip| changing packages. +\end{docTcbKey} + + + +\clearpage +\subsection{Bounding Box} +Normally, every |tcolorbox| has a bounding box which fits exactly to the +dimensions of the outer frame. Therefore, \LaTeX\ reserves exactly the space +needed for the box. +This behavior can be changed by enlarging (or shrinking) the bounding box. +If the bounding box is enlarged, the |tcolorbox| will get some clearance +around it. If the bounding box is shrunk, i.\,e.\ enlarged with negative +values, the |tcolorbox| will overlap to other parts of the page. +For example, the |tcolorbox| could be stretched into the page margin. + +\begin{marker} +The following examples use \refKey{/tcb/show bounding box} to display the +actual bounding box. For this, the library \mylib{skins} has to be included and +\refKey{/tcb/enhanced} has to be set. +\end{marker} + +\subsubsection{Shifting Bounding Box Borders} + +\begin{docTcbKey}{enlarge top initially by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the top of the box by \meta{length}. + If the box is \emph{breakable}, only the first box of the break sequence + gets enlarged. \refKey{/tcb/enlarge top by} overwrites this key. +\begin{exdispExample}{enlarge_top_initially_by} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge top initially by=-5mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge top initially by=5mm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{enlarge bottom finally by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the bottom of the box by \meta{length}. + If the box is \emph{breakable}, only the last box of the break sequence + gets enlarged. \refKey{/tcb/enlarge bottom by} overwrites this key. +\begin{exdispExample}{enlarge_bottom_finally_by} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge bottom finally by=5mm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge bottom finally by=-5mm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage + + +\begin{docTcbKey}{enlarge top at break by}{=\meta{length}}{no default, initially \texttt{0mm}} + Enlarges the bounding box distance to the top of the box by \meta{length}, + \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{middle} and \emph{last} parts in a + break sequence. + \refKey{/tcb/enlarge top by} overwrites this key. +\end{docTcbKey} + + +\begin{docTcbKey}{enlarge bottom at break by}{=\meta{length}}{no default, initially \texttt{0mm}} + Enlarges the bounding box distance to the bottom of the box by \meta{length}, + \emph{if} the box is \refKey{/tcb/breakable}. + In this case, it is applied to \emph{first} and \emph{middle} parts in a + break sequence. \refKey{/tcb/enlarge bottom by} overwrites this key. +\end{docTcbKey} + + +\begin{docTcbKey}{enlarge top by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the top of the box by \meta{length}. + \refKey{/tcb/enlarge top initially by} and + \refKey{/tcb/enlarge top at break by} are set to \meta{length}. +\end{docTcbKey} + + +\begin{docTcbKey}{enlarge bottom by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the bottom of the box by \meta{length}. + \refKey{/tcb/enlarge bottom finally by} and + \refKey{/tcb/enlarge bottom at break by} are set to \meta{length}. +\end{docTcbKey} + + +\begin{docTcbKey}{enlarge left by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the left side of the box by \meta{length}. +\begin{exdispExample}[safety=2cm]{enlarge_left_by} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge left by=2cm,width=5cm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge left by=-2cm,width=\linewidth+2cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{enlarge right by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to the right side of the box by \meta{length}. +\begin{exdispExample}[safety=2cm]{enlarge_right_by} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[enlarge right by=-2cm,width=\linewidth+2cm, + enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge right by=2cm,width=\linewidth-2cm] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{enlarge by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the bounding box distance to all sides of the box by \meta{length}. +\begin{exdispExample}{enlarge_by} +\tcbset{colframe=blue!75!black,colback=white,width=5cm,nobeforeafter} + +\begin{tcolorbox} +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[enlarge by=5mm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{grow to left by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the current box width by \meta{length} and + enlarges (shrinks) the bounding box distance to the left side of the box by + $-$\meta{length}. Also see \refKey{/tcb/left skip}. +\begin{exdispExample}[safety=2cm]{grow_to_left_by} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[width=5cm,grow to left by=2cm,enhanced,show bounding box] +This is a \textbf{tcolorbox} with a width of 7cm. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{grow to right by}{=\meta{length}}{no default, initially |0mm|} + Enlarges the current box width by \meta{length} and + enlarges (shrinks) the bounding box distance to the right side of the box by + $-$\meta{length}. Also see \refKey{/tcb/right skip}. +\begin{exdispExample}[safety=2cm]{grow_to_right_by} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[grow to right by=2cm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} + +\bigskip + +\begin{tcolorbox}[grow to right by=2cm,grow to left by=1cm, + enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}[][doc new=2018-03-22]{grow sidewards by}{=\meta{length}}{no default, initially |0mm|} + Shortcut for setting \refKey{/tcb/grow to left by} and \refKey{/tcb/grow to right by} + to \meta{length}. Also see \refKey{/tcb/oversize} and \refKey{/tcb/spread sidewards}. +\begin{exdispExample}[safety=2cm]{grow_sidewards_by} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[grow sidewards by=2cm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\subsubsection{Box Alignment} + +\begin{docTcbKey}[][doc new=2015-11-20]{flush left}{}{style, no value} + Enlarges the bounding box to the right side to fill the line completely. +\begin{exdispExample}{flush_left} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[flush left,width=5cm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-11-20]{flush right}{}{style, no value} + Enlarges the bounding box to the left side to fill the line completely. +\begin{exdispExample}{flush_right} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[flush right,width=5cm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-11-20]{center}{}{style, no value} + Enlarges the bounding box equally to both sides to fill the line completely. +\begin{exdispExample}{center} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[center,width=5cm,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\subsubsection{Toggle Enlargements} + +\begin{docTcbKey}[][doc updated=2015-11-13]{toggle enlargement}{=\meta{toggle preset}}{default |evenpage|, initially |none|} + According to the \meta{toggle preset}, the left and the right enlargements of + the bounding box are switched or not. Feasible values are: + \begin{itemize} + \item\docValue{none}: no switching. + \item\docValue{forced}: the values of the left and right enlargement are switched. + \item\docValue{evenpage}: if the page is an even page, the values of the left and + right enlargement are switched. This value also sets + \refKey{/tcb/check odd page} to |true|. + \end{itemize} +\begin{marker} +See \refKey{/tcb/toggle left and right} to toggle geometry settings. +\end{marker} + +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white, + grow to left by=20mm,grow to right by=-5mm} + +\begin{tcolorbox}[toggle enlargement=none,enhanced,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[toggle enlargement=forced] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\begin{tcolorbox}[toggle enlargement=evenpage] + This page is an \tcbifoddpage{odd}{even} page. + Therefore, the left and right enlargements + \tcbifoddpage{are not}{are} toggled. +\end{tcolorbox} +\end{dispExample} + +\begin{dispListing} +\begin{tcolorbox}[colframe=red!60!black,colback=red!15!white, + fonttitle=\bfseries,title=Floating box from \texttt{toggle enlargement}, + width=\textwidth,grow to right by=2cm,toggle enlargement,float=t] + This page is an \tcbifoddpage{odd}{even} page. + Therefore, the left and right enlargements \tcbifoddpage{are not}{are} toggled. + This box stretches to the right margin on odd pages and to the left + margin on even pages. The current document is one-sided -- this feature makes + sense for two-sided documents only. +\end{tcolorbox} +\end{dispListing} +\tcbusetemp +\end{docTcbKey} + + + +\clearpage +\subsubsection{Spread Box to Page Borders} + +\begin{marker} +The following border options are \emph{not} applicable to nested boxes, boxes insides +tables, etc. +For boxes inside lists, the options \emph{may} work, but not necessarily. +Also, boxes should be set with |\noindent| and full width. +\end{marker} + +\begin{docTcbKey}[][doc new=2017-02-13]{spread inwards}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Enlarges the current box width to match the inner page border (left-handed side for one-sided +documents). If the optional \meta{length} is greater than |0pt|, the box +grows over the border, if \meta{length} is lower than |0pt|, there is a +margin between box and page border. +\refKey{/tcb/toggle enlargement} is set automatically. +\begin{dispListing} +\begin{tcolorbox}[enhanced,spread inwards, + colframe=blue!75!black,colback=white,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispListing} +{\tcbusetemp} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-13]{spread outwards}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Enlarges the current box width to match the outer page border (right-handed side for one-sided +documents). If the optional \meta{length} is greater than |0pt|, the box +grows over the border, if \meta{length} is lower than |0pt|, there is a +margin between box and page border. +\refKey{/tcb/toggle enlargement} is set automatically. +\begin{dispListing} +\begin{tcolorbox}[enhanced,spread outwards, + colframe=blue!75!black,colback=white,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispListing} +{\tcbusetemp} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-13]{move upwards}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Starts a new page with the box at the very top page border. +If the optional \meta{length} is greater than |0pt|, the box +moves over the border, if \meta{length} is lower than |0pt|, there is a +margin between box and page border. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-13]{move upwards*}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Identical to \refKey{/tcb/move upwards}, but without starting a new page. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-13]{fill downwards}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Enlarges the height of the box until the very bottom page border. +The library \mylib{breakable} has to be loaded, and +\refKey{/tcb/height fill} is set automatically. +If the optional \meta{length} is greater than |0pt|, the box +moves over the border, if \meta{length} is lower than |0pt|, there is a +margin between box and page border. +\begin{dispListing} +\begin{tcolorbox}[enhanced,fill downwards, + colframe=blue!75!black,colback=white,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispListing} +{\tcbusetemp} +\end{docTcbKey} + + +\begin{tcolorbox}[enhanced,spread upwards,sharp corners=north,height=3cm, + colframe=blue!75!black,interior style={top color=blue!50,bottom color=white}] +This is an example for 'spread upwards'. +\end{tcolorbox} +\begin{docTcbKey}[][doc new=2017-02-13]{spread upwards}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Combination of +\refKey{/tcb/move upwards}, \refKey{/tcb/spread inwards}, and \refKey{/tcb/spread outwards}. +The optional \meta{length} is used for all these keys. +\begin{dispListing} +\begin{tcolorbox}[enhanced,spread upwards,sharp corners=north,height=3cm, + colframe=blue!75!black,interior style={top color=blue!50,bottom color=white}] +This is an example for 'spread upwards'. +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-13]{spread upwards*}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Identical to \refKey{/tcb/move upwards}, but without starting a new page. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-13]{spread sidewards}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Combination of \refKey{/tcb/spread inwards} and \refKey{/tcb/spread outwards}. +The optional \meta{length} is used for all these keys. +Also see \refKey{/tcb/oversize} and \refKey{/tcb/grow sidewards by}. +\begin{dispListing} +\begin{tcolorbox}[enhanced,spread sidewards, + colframe=blue!75!black,colback=white,show bounding box] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispListing} +{\tcbusetemp} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-13]{spread}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Combination of +\refKey{/tcb/move upwards}, \refKey{/tcb/fill downwards}, \refKey{/tcb/spread inwards}, +and \refKey{/tcb/spread outwards}. +Such, the box fills the whole page. +The optional \meta{length} is used for all these keys. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-13]{spread downwards}{\colOpt{=\meta{length}}}{default |0pt|, initially unset} +Combination of +\refKey{/tcb/fill downwards}, \refKey{/tcb/spread inwards}, and \refKey{/tcb/spread outwards}. +The optional \meta{length} is used for all these keys. +\begin{dispListing} +\begin{tcolorbox}[enhanced,spread downwards,sharp corners=south, + colframe=red!75!black,interior style={top color=white,bottom color=red!50}] +This is an example for 'spread downwards'. +\end{tcolorbox} +\end{dispListing} +\end{docTcbKey} +\begin{tcolorbox}[enhanced,spread downwards,sharp corners=south, + colframe=red!75!black,interior style={top color=white,bottom color=red!50}] +This is an example for 'spread downwards'. +\end{tcolorbox} + + + + +\clearpage +\subsubsection{Box Extrusion} + +\begin{marker} +The following keys should not be used with breakable boxes or boxes with a +lower part. +\end{marker} + +\begin{docTcbKey}{shrink tight}{}{style, no value, initially unset} + The total colored box is shrunk to the dimensions of the upper + part. There should be no lower part and no title. + This style sets the \refKey{/tcb/boxsep} to |0pt| and other geometry keys + to fitting values. This option is likely to be used with the following + extrusion keys. +\begin{exdispExample}{shrink_tight} +\tcbset{colframe=blue!75!black,colback=white,arc=0mm,boxrule=0.4pt, + nobeforeafter,tcbox raise base,shrink tight} + +\begin{tcolorbox} +This is a \textbf{tcolorbox}. +\end{tcolorbox} + +Lorem \tcbox{ipsum} dolor sit amet, consectetuer adipiscing elit. +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2014-09-19]{extrude left by}{=\meta{length}}{style, no default, initially unset} + The (upper part of the) colored box is extruded by the given \meta{length} to the left side. + The inner width and the bounding box is kept unchanged and the operation + is additive! +\begin{exdispExample}{extrude_left_by} +\tcbset{enhanced,colframe=red,colback=yellow!25!white, + frame style={opacity=0.25},interior style={opacity=0.5}, + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, +vestibulum ut, placerat ac, adipiscing vitae, felis. +\tcbox[extrude left by=1cm]{Curabitur} dictum gravida mauris. +Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2014-09-19]{extrude right by}{=\meta{length}}{style, no default, initially unset} + The (upper part of the) colored box is extruded by the given \meta{length} to the right side. + The inner width and the bounding box is kept unchanged and the operation + is additive! +\begin{exdispExample}{extrude_right_by} +\tcbset{enhanced,colframe=red,colback=yellow!25!white, + frame style={opacity=0.25},interior style={opacity=0.5}, + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, +vestibulum ut, placerat ac, adipiscing vitae, felis. +\tcbox[extrude right by=1cm]{Curabitur} dictum gravida mauris. +Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{extrude top by}{=\meta{length}}{style, no default, initially unset} + The (upper part of the) colored box is extruded by the given \meta{length} to the top side. + The inner width and the bounding box is kept unchanged and the operation + is additive! +\begin{exdispExample}{extrude_top_by} +\tcbset{enhanced,colframe=red,colback=yellow!25!white, + frame style={opacity=0.25},interior style={opacity=0.5}, + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, +vestibulum ut, placerat ac, adipiscing vitae, felis. +\tcbox[extrude top by=1cm]{Curabitur} dictum gravida mauris. +Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{extrude bottom by}{=\meta{length}}{style, no default, initially unset} + The (upper part of the) colored box is extruded by the given \meta{length} to the bottom side. + The inner width and the bounding box is kept unchanged and the operation + is additive! +\begin{exdispExample}[safety=1cm]{extrude_bottom_by} +\tcbset{enhanced,colframe=red,colback=yellow!25!white, + frame style={opacity=0.25},interior style={opacity=0.5}, + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, +vestibulum ut, placerat ac, adipiscing vitae, felis. +\tcbox[extrude bottom by=1cm]{Curabitur} dictum gravida mauris. +Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{extrude by}{=\meta{length}}{style, no default, initially unset} + The (upper part of the) colored box is extruded by the given \meta{length} to all sides. + The inner width and the bounding box is kept unchanged and the operation + is additive! +\begin{exdispExample}{extrude_by} +\tcbset{enhanced,colframe=red,colback=yellow!25!white, + frame style={opacity=0.25},interior style={opacity=0.5}, + nobeforeafter,tcbox raise base,shrink tight,extrude by=2mm} + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, +vestibulum ut, placerat ac, adipiscing vitae, felis. \tcbox{Curabitur} dictum +gravida mauris. \tcbox[colframe=Green,interior style={opacity=0.0}]{Nam} +arcu libero, nonummy eget, consectetuer id, \tcbox{vulputate} a, magna. Donec +vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus +et malesuada fames ac turpis egestas. \tcbox{Mauris ut leo.} +\end{exdispExample} +\end{docTcbKey} + +\clearpage +\subsection{Layered Boxes and Every Box Settings}\label{subsec:everybox} +A |tcolorbox| may contain another |tcolorbox| and so on. The package +takes track of the nesting level using a counter |tcblayer|. Counter values +may be used for doing some fancy things, but you should never change +the counter value yourself. + +The package takes special care for the first four layers or nesting levels, +called managed layers. +Here, footnote texts are administrated to find their intended place +and specific layer dependent options may be set by changing +\refKey{/tcb/every box on layer n}. +If needed, the number of managed layers can be increased by setting +\refCom{tcbsetmanagedlayers} to a higher value than~4. + +The following styles have a considerable influence on how layered boxes +are processed. Note especially that nested boxes are getting a +\refKey{/tcb/reset} by default. You can change this, but be prepared for +suprises if you do. + +If the defaults are \emph{not changed}, a |tcolorbox| gets its options +in the following order. Following options overwrite preceding options. +\begin{enumerate} +\item On package load, all options are set to default values. +\item Every \refCom{tcbset} command adds or changes options for the following boxes + inside the current \TeX\ group. +\item While entering a |tcolorbox|, a \refKey{/tcb/every box on layer n} or + \refKey{/tcb/every box on higher layers} option list is applied. + With default settings this means: + \begin{itemize} + \item For layer 1 (lowest layer), the \refKey{/tcb/every box} option list is applied. + Not overwritten options given by a preceding \refCom{tcbset} survive. + \item For layer 2 and above (nested boxes), a \refKey{/tcb/reset} followed by + \refKey{/tcb/every box} option list is applied. + Every resettable options given by a preceding \refCom{tcbset} + and by the sourrounding box(es) are reset. + \end{itemize} +\item The \meta{options} given to the |tcolorbox| are applied. + Or, if the box was generated by \refCom{newtcolorbox} or friends, + the \meta{options} given there are applied. +\item If the box was generated by \refCom{newtcolorbox} or friends, + some automated options are applied. +\end{enumerate} + + +\begin{docTcbKey}{every box}{}{style} +By default, this style is empty. +\begin{dispListing} +% default setting: +\tcbset{every box/.style={}} +\end{dispListing} +It may be changed by redefining this style. +\begin{dispListing} +% setting all boxes to be enhanced: +\tcbset{every box/.style={enhanced}} +\end{dispListing} + +\medskip +\begin{marker} +The alternative for setting something for every box (on every layer) is\\ +\refCom{tcbsetforeverylayer}: +\begin{dispListing} +% setting all boxes to be enhanced: +\tcbsetforeverylayer{enhanced} +\end{dispListing} +\end{marker} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{every box on layer n}{}{style} +Here, |n| has to be replaced by a number ranging from 1 to the highest +managed layer number (4 by default). +\begin{dispListing} +% default settings: +\tcbset{ + every box on layer 1/.style={every box}, + every box on layer 2/.style={reset,every box}, + every box on layer 3/.style={reset,every box}, + every box on layer 4/.style={reset,every box}, + } +\end{dispListing} +\end{docTcbKey} + + +\begin{docTcbKey}{every box on higher layers}{}{style} +Higher layers are layers above the highest +managed layer number (4 by default). +\begin{dispListing} +\tcbset{every box on higher layers/.style={reset,every box}} +\end{dispListing} +\end{docTcbKey} + + +\begin{docCommand}{tcbsetmanagedlayers}{\marg{number}} +Replaces the highest managed layer number by \meta{number} where 4 is +the default. This macro can only be used inside the preamble. +Using a \meta{number} lower than 4 typically makes no sense, but is +not forbidden. +\end{docCommand} + +\begin{tcboutputlisting} +% \usepackage{lipsum} +% \tcbuselibrary{skins,breakable} +\tcbset{colframe=red!75!black,fonttitle=\bfseries, + colback=red!5!white, + every box/.style={enhanced,watermark text=\thetcblayer, + before=\par\smallskip,after=\par\smallskip}, + every box on layer 2/.style={reset,every box,colback=yellow!10!white, + drop fuzzy shadow}} +\begin{tcolorbox}[enhanced jigsaw,breakable,title=Layer 1 Box] +Here comes a footnote\footnote{Footnote from layer 1 box}. +\lipsum[2] + \begin{tcolorbox}[title=Layer 2 Box] + abc\footnote{The footnote of abc} + \end{tcolorbox} + \begin{tcolorbox}[title=Another Box,ams equation] + \tcbhighmath{\sum\limits_{n=1}^{\infty} \frac{1}{n}} = \infty. + \end{tcolorbox} +Some text\footnote{Footnote from some text}. + \begin{tcolorbox}[title=Yet Another Box] + \tcboxfit[height=2cm]{\lipsum[1]} + My text. + \begin{tcolorbox} + Another lipsum text\footnote{A lipsum text}. \lipsum[3] + \begin{tcolorbox}[title=Layer 4,colframe=blue,colback=white] + Layer 4\footnote{Layer 4 footnote} + \end{tcolorbox} + The End\footnote{Last footnote}. + \end{tcolorbox} + \end{tcolorbox} +\end{tcolorbox} +\end{tcboutputlisting} + +\tcbinputlisting{base example,listing only,listing style=mydocumentation} + +{\tcbuselistingtext} + + +\clearpage +\subsection{Capture Mode}\label{subsec:capture} + +\begin{docTcbKey}{capture}{=\meta{mode}}{no default, initially |minipage|} + The capture \meta{mode} defines how the box content is processed. + +Feasible values for \meta{mode} are: +\begin{itemize} +\item\docValue{minipage}:\\ + This is the default \meta{mode} for \refEnv{tcolorbox}. + The content may have an upper and a lower part. Optionally, the box + can be \refKey{/tcb/breakable}. The box content is put into a + minipage or into something similar to a minipage. +\item\docValue{hbox}:\\ + This is the default \meta{mode} for \refCom{tcbox}. The content cannot have + a lower part and cannot be broken. The colored box is sized according + to the dimensions of the content. + A shortcut to set this mode is \refKey{/tcb/hbox}. +\item\docValue{fitbox}: (needs the \mylib{fitting} library)\\ + This is the default \meta{mode} for \refCom{tcboxfit}. The content cannot have + a lower part and cannot be broken. + The content is sized according to the dimensions of the colored box. + A shortcut to set this mode is \refKey{/tcb/fit}. +\end{itemize} + +\begin{exdispExample}{capture} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[capture=minipage] +This is a tcolorbox. +\end{tcolorbox} + +\begin{tcolorbox}[capture=hbox] +This is a tcolorbox. +\end{tcolorbox} + +\begin{tcolorbox}[capture=fitbox,height=9mm]% needs the 'fitting' library +This is a tcolorbox. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{hbox}{}{style, no default} + Shortcut for |capture=hbox|. +\begin{exdispExample}{hbox} +\tcbset{colframe=blue!75!black,colback=white} + +\begin{tcolorbox}[hbox] +This is a tcolorbox. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{minipage}{}{style, no default} + Shortcut for |capture=minipage|. +\end{docTcbKey} + + +\clearpage +\subsection{Text Characteristics} +\begin{docTcbKey}[][doc updated=2015-10-14]{parbox}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + The text inside a |tcolorbox| is formatted using a \LaTeX\ |minipage| + if the box is unbreakable. If breakable, the box tries a mimicry of + a |minipage|. In a |minipage| or |parbox|, paragraphs are formatted slightly different + as the main text. If the key value is set to |false|, the normal main text + behavior is restored. In some situations, this has some unwanted side + effects. It is recommended that you use this experimental setting only + where you really want to have this feature. +\end{docTcbKey} + +\begin{dispListing} +% \usepackage{lipsum} % preamble +\tcbset{width=(\linewidth-2mm)/2,nobeforeafter,arc=1mm, + colframe=blue!75!black,colback=white,fonttitle=\bfseries,fontupper=\small, + left=2mm,right=2mm,top=1mm,bottom=1mm,equal height group=parbox} + +\begin{tcolorbox}[parbox,adjusted title={parbox=true (normal)}] + \lipsum[1-2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[parbox=false,adjusted title={parbox=false}] + \lipsum[1-2] +\end{tcolorbox}% +\end{dispListing} +{\tcbusetemp} + + +\clearpage +\begin{docTcbKey}{hyphenationfix}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Long words at the beginning of paragraphs in very narrow boxes + will not be hyphenated using |pdflatex|. This problem is circumvented by + applying the |hyphenationfix| option. + +\begin{exdispExample*}{hyphenationfix}{sbs,lefthand ratio=0.6} +\tcbset{colframe=blue!75!black, + fontupper=\normalsize, + colback=blue!5!white,width=4cm} + +\begin{tcolorbox} +Rechnungsadjunktentochter.\par +Statthaltereikonzipist. +\end{tcolorbox} + +\begin{tcolorbox}[hyphenationfix] +Rechnungsadjunktentochter.\par +Statthaltereikonzipist. +\end{tcolorbox} +\end{exdispExample*} + +\smallskip +\begin{marker} +|parbox=false| and |hyphenationfix| should not be used together. They are +targeting different box types and they do not blend very well. +\end{marker} +\end{docTcbKey} + + +\subsection{Files} +\begin{docTcbKey}{tempfile}{=\meta{file name}}{no default, initially \cs{jobname.tcbtemp}} + Sets \meta{file name} as name for the temporary file which is used inside + \refEnv{tcbwritetemp} and \refCom{tcbusetemp} implicitely. +\end{docTcbKey} + +\subsection{\texttt{\textbackslash tcbox} Specials} +The following options are applicable for \refCom{tcbox} and \refCom{tcboxmath} +only. + +\begin{docTcbKey}{tcbox raise}{=\meta{length}}{no default, initially \texttt{0pt}} + Raises the \refCom{tcbox} by the given \meta{length}. + % Sets the line width of the right rule to \meta{length}. +\begin{exdispExample}{tcbox_raise} +\tcbset{colframe=blue!50!black,colback=white,colupper=red!50!black, + fonttitle=\bfseries,nobeforeafter,center title} + +Test\dotfill +\tcbox[tcbox raise base]{Hello World 1}\dotfill +\tcbox{Hello World 2}\dotfill +\tcbox[tcbox raise=5mm]{Hello World 3} +\end{exdispExample} +\end{docTcbKey} + +\begin{docTcbKey}{tcbox raise base}{}{style, no value, initially unset} + Raises the \refCom{tcbox} such that the base of its content matches + the base of the environmental line; see example above. +\end{docTcbKey} + +\begin{docTcbKey}{on line}{}{style, no value, initially unset} + Combines \refKey{/tcb/tcbox raise base} with \refKey{/tcb/nobeforeafter}. + The resulting box behaves analogue to |\fbox|. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2015-03-23]{tcbox width}{=\meta{mode}}{no default, initially \texttt{auto}} +Controls how \refCom{tcbox} respects a \refKey{/tcb/width} setting. +Feasible values for \meta{mode} are: +\begin{itemize} +\item\docValue{auto} (initial setting): + ignore \refKey{/tcb/width} and set box width according to its content. +\item\docValue{auto limited}: + Set box width according to its content, if it is smaller than \refKey{/tcb/width}. + Otherwise, the content is set like in a \refEnv{tcolorbox} with line breaks. +\item\docValue{forced center}: + Set box width according to \refKey{/tcb/width}. + The content is centered and may overlap the box borders. +\item\docValue{forced left}: + Set box width according to \refKey{/tcb/width}. + The content is left aligned and may overlap the box borders. +\item\docValue{forced right}: + Set box width according to \refKey{/tcb/width}. + The content is right aligned and may overlap the box borders. +\item\docValue{minimum center}: + Set box width according to \refKey{/tcb/width}, if the content fits into. + The content is centered and the box width may grow beyond \refKey{/tcb/width}. +\item\docValue{minimum left}: + Set box width according to \refKey{/tcb/width}, if the content fits into. + The content is left aligned and the box width may grow beyond \refKey{/tcb/width}. +\item\docValue{minimum right}: + Set box width according to \refKey{/tcb/width}, if the content fits into. + The content is right aligned and the box width may grow beyond \refKey{/tcb/width}. +\end{itemize} + +\enlargethispage*{1cm} + +\begin{exdispExample}{tcbox_width} +\tcbset{size=small,on line,before upper=\strut, + colframe=blue!75!black,colback=blue!5!white, + fontupper=\normalsize,width=4cm} + +\tcbox[tcbox width=auto]{auto}\qquad +\tcbox[tcbox width=auto limited]{auto limited}\qquad +\tcbox[tcbox width=auto limited]{auto limited with long text}\\ +\tcbox[tcbox width=forced center]{forced center}\qquad +\tcbox[tcbox width=forced center]{forced center with long text}\\ +\tcbox[tcbox width=forced left]{forced left}\qquad +\tcbox[tcbox width=forced left]{forced left with long text}\\ +\tcbox[tcbox width=forced right]{forced right}\qquad +\tcbox[tcbox width=forced right]{forced right with long text}\\ +\tcbox[tcbox width=minimum center]{minimum center}\qquad +\tcbox[tcbox width=minimum center]{minimum center with long text}\\ +\tcbox[tcbox width=minimum left]{minimum left}\qquad +\tcbox[tcbox width=minimum left]{minimum left with long text}\\ +\tcbox[tcbox width=minimum right]{minimum right}\qquad +\tcbox[tcbox width=minimum right]{minimum right with long text} +\end{exdispExample} +\end{docTcbKey} + + +%\subsection{Skins} +%There are additional option keys which change the appearance of a |tcolorbox|. +%If only the core package is used, there is only one \emph{skin} and these +%keys are meaningless. +%The library \mylib{skins} adds more skins. The appropriate option keys for skins of +%the core package are therefore described in \Vref{sec:skincorekeys} from +%page \pageref{sec:skincorekeys}. + +\clearpage +\subsection{Counters, Labels, and References} + +\begin{docTcbKey}{phantom}{=\meta{code}}{no default, initially unset} +The \meta{code} is put in a box at the upper left corner of the |tcolorbox|. +If the |tcolorbox| is breakable, the \meta{code} is executed for the first box of +the break sequence only. If there already was some phantom code given, the +new \meta{code} is appended.\par +The \meta{code} is intended to be used for counter stepping, labelling, and +related operations which do not produce visible text. +\begin{itemize} +\item The \meta{code} is executed before the title and box content, i.\,e.\ counter + values are ensured to be increased before usage. +\item Labels are ensured to reference the correct page number. +\item The \meta{code} is executed only once even during fitting operations for + title and box content. +\item In combination with the |hyperref| package, the hyper anchor is set + to the upper left corner of the |tcolorbox|, i.\,e.\ links inside the pdf document + will jump to the box pleasantly. +\item Since the \meta{code} is executed inside a \TeX\ group, only global + operations can survive this group. +\end{itemize} +Examples for the |phantom| usage are given in Section \ref{listing:exercises} +from page \pageref{listing:exercises}, e.\,g.\ +Example \ref{exe:tabular_example} on page \pageref{exe:tabular_example}. +\end{docTcbKey} + +\begin{docTcbKey}{nophantom}{}{no value, initially set} +Removes the phantom code if set before. +\end{docTcbKey} + +\begin{docTcbKey}{label}{=\meta{marker}}{no default, initially unset} +The \meta{marker} is set as label text for a reference with the |\ref| macro. +Typically, this option is used for numbered boxes, see Subsection \ref{sec:numberedboxes} +from page \pageref{sec:numberedboxes}, e.\,g.\ \refKey{/tcb/new/auto counter}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-28]{phantomlabel}{=\meta{marker}}{no default, initially unset} +Equivalent to \refKey{/tcb/label} for an \emph{unnumbered} box. +A |\phantomsection| from the package |hyperref| \cite{rahtz:2012a} is used to set a correct +hyperlink target. This is not needed for a numbered box. +\end{docTcbKey} + + +\begin{docTcbKey}{label type}{=\meta{type}}{no default, initially unset} +This option key can be used only in conjunction with the |cleveref| package +\cite{cubitt:2013a} which has to be loaded separately. +\meta{type} has to be a cross-reference type \emph{known} to |cleveref| +like |theorem|, |algorithm|, |result|, etc. References made with |cleveref| +will use this type. Note that using |label type| will result in compilation +errors, if |cleveref| is not loaded. +For an example, see \Vref{theo:meanvaluetheorem}. +\end{docTcbKey} + +\begin{docTcbKey}{no label type}{}{no value, initially set} +Removes a \refKey{/tcb/label type}, if set before. +\end{docTcbKey} + +\begin{docTcbKey}{step}{=\meta{counter}}{no default, initially unset} +Shortcut for |phantom={\refstepcounter{#1}}|. The given \meta{counter} is +increased and ready for labelling. This option is not needed when +using the convenient automated numbering introduced with version 2.40, +see Subsection \ref{sec:numberedboxes} +from page \pageref{sec:numberedboxes}. +\end{docTcbKey} + +\begin{docTcbKey}{step and label}{=\marg{counter}\marg{marker}}{no default, initially unset} +Shortcut for using \refKey{/tcb/step} and \refKey{/tcb/label}. This option is not needed when +using the convenient automated numbering introduced with version 2.40, +see Subsection \ref{sec:numberedboxes} +from page \pageref{sec:numberedboxes}. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{list entry}{=\meta{text}}{no default, initially unset} +If the \flqq list of tcolorbox(es)\frqq\ feature described in Subsection +\ref{sec:listsof} from page \pageref{sec:listsof} is used, this key +describes the \meta{text} for an entry into the generated list, e.\,g. +\begin{dispListing} +list entry={\protect\numberline{\thetcbcounter}My beautiful Example} +\end{dispListing} +See Section \ref{listing:exercises} from page \pageref{listing:exercises} +for a complete example. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{list text}{=\meta{text}}{style, no default} +This is a shortcut for setting \refKey{/tcb/list entry} to\\ +|\protect\numberline{\thetcbcounter}|\meta{text}. +So, the following settings are identical: +\begin{dispListing} +list text={My beautiful Example}, +list entry={\protect\numberline{\thetcbcounter}My beautiful Example} +\end{dispListing} +See Section \ref{listing:exercises} from page \pageref{listing:exercises} +for a complete example. +\end{docTcbKey} + +\begin{docTcbKey}{add to list}{=\marg{list}\marg{type}}{no default, initially unset} +If the \flqq list of tcolorbox(es)\frqq\ feature described in Subsection +\ref{sec:listsof} from page \pageref{sec:listsof} is used, list entries are +generated automatically. With this key, you can enforce an entry to the +given \meta{list} with the given \meta{type}. +This issues:\\ +|\addcontentsline|\marg{list}\marg{type}\marg{entry text} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new and updated={2016-06-22}{2016-11-18}]{nameref}{=\meta{text}}{no default, initially unset} +If the |nameref| package is loaded, the given \meta{text} is used for +corresponding |\nameref| macros. Typically, the \meta{text} will be chosen +to be identical or nearly identical to the one for \refKey{/tcb/title}. + +\inputpreamblelisting{A} + +\begin{dispExample} +\begin{pabox}[label={mynamelabel},nameref={Title or anything else}]{Title text} +This is a tcolorbox. +\end{pabox} +This box is automatically numbered with \ref{mynamelabel} on page +\pageref{mynamelabel}. + +The box is titled '\nameref{mynamelabel}'. +\end{dispExample} + +\begin{marker} +\refKey{/tcb/nameref} is used automatically inside \refCom{newtcbtheorem}. +\end{marker} + +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2017-02-03]{hypertarget}{=\meta{marker}}{no default, initially unset} +A |\hypertarget| from the package |hyperref| \cite{rahtz:2012a} is used to +create an internal link of an anchor \meta{marker}. +This \meta{marker} can be referenced by |\hyperlink| or +\refKey{/tcb/hyperlink}. + \begin{dispExample*}{sbs,lefthand ratio=0.7} +% \usepackage{hyperref}% +\begin{tcolorbox}[enhanced, + colback=red!10,colframe=red!50!black, + hypertarget=hypertwinA, + hyperlink=hypertwinB, + title=Box A] +Click me to jump to Box B. +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2017-02-10]{bookmark}{=\meta{text}}{no default, initially unset} + Sets a PDF bookmark with the given \meta{text}, if the package |bookmark| \cite{oberdiek:2016a} + is loaded. This bookmark is set with an automated destination (the current box) + and is set one level below the current bookmark level. + \begin{dispExample*}{sbs,lefthand ratio=0.7} +% \usepackage{bookmark}% +\begin{tcolorbox}[colback=blue!10,colframe=blue!50!black, + bookmark=Example for using a bookmark, + title=Example for using a bookmark] +Open the bookmark view of the previewer +to see the bookmark. +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-10]{bookmark*}{=\marg{options}\marg{text}}{no default, initially unset} + Identical to \refKey{/tcb/bookmark}, but additional \meta{options} + from the package |bookmark| \cite{oberdiek:2016a} can be given. + \begin{dispExample*}{sbs,lefthand ratio=0.7} +% \usepackage{bookmark}% +\begin{tcolorbox}[colback=red!10,colframe=red!50!black, + bookmark*={color=red,italic,bold}% + {Another bookmark example}, + title=Red and bold bookmark] +Open the bookmark view of the previewer +to see the bookmark. +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2018-07-26]{index}{=\meta{entry}}{no default, initially unset} + Adds an index \meta{entry} for the box. This is a shortcut for + setting |\index|\marg{entry} to \refKey{/tcb/phantom}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2018-07-26]{index*}{=\marg{name}\marg{entry}}{no default, initially unset} + Adds an \meta{entry} to an index with a specific \meta{name}. + This is a shortcut for + setting |\index|\oarg{name}\marg{entry} to \refKey{/tcb/phantom}. + An index extension package like |imakeidx| has to be loaded to use + this option key. +\end{docTcbKey} + + + + + + + + +\clearpage +\subsection{Even and Odd Pages} + +\begin{marker} +Also see +\refKey{/tcb/toggle left and right} and +\refKey{/tcb/toggle enlargement} +for further even/odd options. +\end{marker} + +\begin{docTcbKey}[][doc updated=2015-11-13]{check odd page}{\colOpt{=true\textbar false}}{default |true|, initially |false|} +If set to |true|, a precise even/odd page testing for the current box +is applied. This is done by using labels. If a box moves to another page, +the document has to be compiled twice for the correct settings. +If set to |false|, even/odd page tests may give wrong results for the first box +of a page. + +\refKey{/tcb/toggle left and right}, +\refKey{/tcb/toggle enlargement}, and +\refKey{/tcb/if odd page} +automatically set |check odd page|, but for +\refCom{tcbifoddpage} this option has to be set explicitely. +\end{docTcbKey} + +\enlargethispage*{1cm} +\begin{docTcbKey}[][doc new=2015-11-13]{if odd page}{=\marg{odd options}\marg{even options}}{style, no default} +If the current box is on an odd page, the \meta{odd options} are applied. +On an even page, the \meta{even options} are applied. +\refKey{/tcb/check odd page} is automatically set for precise even/odd page testing. + +\begin{dispExample} +\begin{tcolorbox}[if odd page={colback=yellow!50}{colback=red!50}] + This box is colored in yellow on an odd page + and is colored in red on an even page. +\end{tcolorbox} +\end{dispExample} + +\begin{marker} +If a box is \refKey{/tcb/breakable}, using \refKey{/tcb/if odd page} +only acts upon the \emph{first} box. If the setting should be +repeated for every partial box of the break sequence, the option should be +packed into \refKey{/tcb/extras}. In this case, \refKey{/tcb/check odd page} +has to be set explicitely! Also see \refKey{/tcb/if odd page*}. +\end{marker} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2016-11-18]{if odd page or oneside}{=\marg{odd options}\marg{even options}}{style, no default} + For onesided documents, the \meta{odd options} are applied always. + For twosided documents, this style is identical to \refKey{/tcb/if odd page}. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2015-11-13]{if odd page*}{=\marg{odd options}\marg{even options}}{style, no default} +\begin{marker} +This option needs the \mylib{breakable} library, see \Fullref{sec:breakable}. +\end{marker} +For breakable boxes, if the current partial box is on an odd page, the \meta{odd options} are applied. +On an even page, the \meta{even options} are applied. +\refKey{/tcb/check odd page} is automatically set for precise even/odd page testing. + +In contrast to \refKey{/tcb/if odd page}, \refKey{/tcb/if odd page*} is used +on \emph{every} partial box of a break sequences and not only on the +\emph{first} box. Another difference is that \refKey{/tcb/if odd page*} +is applied quite \emph{late} during option processing, while +\refKey{/tcb/if odd page} is applied immediately. + +\refKey{/tcb/if odd page*} is implemented as \refKey{/tcb/if odd page} +packed into \refKey{/tcb/extras}. + +\begin{dispExample} +% \tcbuselibrary{breakable} +\begin{tcolorbox}[breakable,if odd page*={colback=yellow!50}{colback=red!50}] + This breakable box is colored in yellow on an odd page + and is colored in red on an even page. For every partial box, the + test is repeated, i.e. this would give a yellow, red, yellow, red, \ldots\ + sequence for a long content. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2016-11-18]{if odd page or oneside*}{=\marg{odd options}\marg{even options}}{style, no default} + For onesided documents, the \meta{odd options} are applied always. + For twosided documents, this style is identical to \refKey{/tcb/if odd page*}. +\end{docTcbKey} + + +\clearpage +\begin{docCommand}[doc new=2015-11-13]{tcbifoddpage}{\marg{odd code}\marg{even code}} +If the current box is on an odd page, the \meta{odd code} is executed. +On an even page, the \meta{even code} is executed. +For precise even/odd page testing, the \refKey{/tcb/check odd page} has to be +set manually inside the box options. + +The macro \refCom{tcbifoddpage} can be used inside underlay, overlay, or watermark code to +test if the box is on an odd page. This will work also for boxes in a break sequence. + +The macro can also be used inside the box \textbf{content text}. For unbreakable boxes, +the correct page test is applied. +But for \refKey{/tcb/breakable} boxes, \refCom{tcbifoddpage} +will always give the result for the page of the \emph{first} box inside +the box \textbf{content text}. If needed, the methods from the packages +|changepage| or |ifoddpage| could be used here. +%To mention it again, for overlays, watermarks, etc, \refCom{tcbifoddpage} gives +%the correct page test. + +\begin{dispExample} +\tcbset{colframe=blue!75!black,colback=white,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,check odd page, + title={Example for a box on an \tcbifoddpage{odd}{even} page}, + watermark text={\tcbifoddpage{Odd}{Even} page!}] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2016-11-18]{tcbifoddpageoroneside}{\marg{odd code}\marg{even code}} + For onesided documents, the \meta{odd code} is executed always. + For twosided documents, this macro is identical to \refCom{tcbifoddpage}. +\end{docCommand} + +\clearpage +\begin{docCommand}[doc new=2015-11-13]{thetcolorboxnumber}{} +This is a unique identifier (arabic number) for a tcolorbox. It is locally +defined inside boxes and has no meaning outside. It is used for +precise even/odd page testing, but may also be valuable for elaborate user +code. + +\begin{dispExample} +\begin{tcolorbox}[colback=yellow!5,title=Box \thetcolorboxnumber] + This box is \thetcolorboxnumber. + \tcbox[on line,size=fbox]{This box is \thetcolorboxnumber} and + \tcbox[on line,size=fbox]{this box is \thetcolorboxnumber}. + This box is \thetcolorboxnumber. +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-11-13]{thetcolorboxpage}{} +This macro contains the expanded arabic page number of the current tcolorbox. +It is locally defined inside boxes and has no meaning outside. +It is precise only, if \refKey{/tcb/check odd page} was set. + +\begin{dispExample} +\begin{tcolorbox}[colback=yellow!5,check odd page, + title=Box on page~\thetcolorboxpage] + This box is located on page~\thetcolorboxpage. +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + + + + + +\clearpage +\subsection{Externalization} +\begin{marker} +See \Fullref{sec:external} for the \mylib{external} library of |tcolorbox|. +\end{marker} + +If the \emph{externalization} library of the \texttt{tikz} package is used +and \refKey{/tcb/graphical environment} is set to |tikzpicture|, +a |tcolorbox| could trigger the externalization process which will arise +a compilation error. + +To avoid this, there are two possible strategies: +\begin{itemize} +\item Ensure, that |\tikzexternaldisable| is set before a |tcolorbox| is used. + If you typically use the pattern |\tikzexternalenable| \textit{some picture} |\tikzexternaldisable|, + there is nothing to care about. +\item If \emph{externalization} is enabled globally, use \refKey{/tcb/shield externalize} to + shield any |tcolorbox|. The preamble code could look like this: +\begin{dispListing} +\usetikzlibrary{external} +\tikzexternalize +\tcbset{shield externalize} +\end{dispListing} +\end{itemize} + +\begin{docTcbKey}{shield externalize}{\colOpt{=true\textbar false}}{default |true|, initially |false|} +If set to |true|, the drawing part of the |tcolorbox| is not being externalized +which is a good thing at the current state of art. Nevertheless, if the +|tcolorbox| contains a |tikzpicture|, this picture is still externalized. +Pictures drawn with help of \refKey{/tcb/tikz upper} or alike are \emph{not} +externalized. +\end{docTcbKey} + +\begin{marker} +If a |tcolorbox| is used inside a node of an encircling |tikzpicture| which is externalized, +do \emph{not} use |\tikzexternaldisable| in front of the |tcolorbox|. +\refKey{/tcb/shield externalize} is deactivated automatically inside a |tikzpicture|. +\end{marker} + +\begin{docTcbKey}{external}{=\meta{file name}}{no default, initially unset} + Convenience option which calls |\tikzsetnextfilename|\marg{file name}. Typically, + it may be used inside the option list of a |tcolorbox| to set the + externalization \meta{file name} for the first |tikzpicture| which is discovered + \emph{inside} the box content. + The package |tikz| \cite{tantau:2015a} or the library \mylib{skins} has to be loaded to use this option. + Additionally, |\usetikzlibrary{external}| has to be used. +\end{docTcbKey} + +\begin{docTcbKey}{remake}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Convenience option which calls |/tikz/external/remake next|. Typically, + it may be used inside the option list of a |tcolorbox| to force the remake + of the first |tikzpicture| which is discovered \emph{inside} the box content. + The package |tikz| \cite{tantau:2015a} or the library \mylib{skins} has to be loaded to use this option. + Additionally, |\usetikzlibrary{external}| has to be used. +\end{docTcbKey} + + +\subsection{Miscellaneous} +\begin{docTcbKey}{reset}{}{no value, initially set} +Sets (nearly) all |tcolorbox| settings (including loaded libraries) back to their default values +\emph{plus} any settings given by \refCom{tcbsetforeverylayer}. +\refKey{/tcb/savedelimiter} and \refKey{/tcb/capture} keep their values. +Also, all raster values (see \Vref{sec:raster}) are not resetted. + +This option is useful for boxes in boxes where the inner box should not inherit +the settings of the outer box. +Note that for boxes inside boxes the |reset| is done automatically, if the +standard settings of the package are used (v2.40 and above), see +Section \ref{subsec:everybox} from page \pageref{subsec:everybox}. +%See \refCom{tcbhighmath} for an example. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2015-01-09]{only}{=\textless\meta{overlay specification}\textgreater\marg{options}}{style, no default, initially unset} +Sets the given |tcolorbox| \meta{options} in dependency of +a |beamer| \meta{overlay specification}. Note that this needs the |beamer| class. +The \meta{options} will only be used on the specified |beamer| frames. + +\begin{dispListing} +\documentclass{beamer} +\usepackage[many]{tcolorbox} +\begin{document} + +\begin{frame} + \begin{tcolorbox}[title=My title,fonttitle=\bfseries, + enhanced,colframe=red!50!black,colback=red!10,colbacktitle=red, + sidebyside,righthand width=3cm, + lowerbox=invisible,lower separated=false, + drop lifted shadow, + only=<1>{colbacktitle=yellow,coltitle=red!50!black,colframe=red}, + only=<3>{colback=yellow!50,watermark text={Attention!}}, + only=<3->{lowerbox=visible} ] + This is a test. + \begin{itemize}[<+->] + \item One + \item Two + \item \alert<3>{Three} + \item Four + \end{itemize} + \tcblower + \begin{equation*} + \int\limits_{1}^{x} \frac{1}{t}~dt = \ln(x). + \end{equation*} + \end{tcolorbox} +\end{frame} + +\end{document} +\end{dispListing} +\end{docTcbKey} + + +\begin{docTcbKey}{code}{=\meta{code}}{no default, initially unset} + The given \meta{code} is executed immediately. This option is useful + to place some arbitrary code into an option list. +\begin{exdispExample}{code} +\tcbset{colback=red!5!white,colframe=red!75!black, + code={Useless at this spot but functional.}, + fonttitle=\bfseries} + +\begin{tcolorbox}[code={\newcommand{\mycommand}{\textit{working}}}, + title=My \mycommand\ title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2016-10-21]{void}{}{no value, initially unset} + Annihilates the current |tcolorbox| as far as possible. + Basically, this comments out the whole |tcolorbox| by using a key. + If the option list of the current |tcolorbox| contains arbitrary code with global + impact (like counter settings), these actions are not undone automatically. + Nevertheless, the effects of \refKey{/tcb/phantom}, \refKey{/tcb/step}, + \refKey{/tcb/new/auto counter}, etc., are removed by \refKey{/tcb/void}. + +\begin{exdispExample}{void} +A% + \begin{tcolorbox}[ + title=This box is completely removed by the following key, + void + ] + This is a \textbf{tcolorbox}. + \end{tcolorbox} +B +\end{exdispExample} + +\begin{marker} + This option key cannot be applied for every situation. + For example, if several box environments with the same environment name + are nested, for the outer environment \refKey{/tcb/void} cannot be used, + since the end of the inner environment will be misinterpreted as + end of the outer environment. +\end{marker} + + + +\end{docTcbKey} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.documentation.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.documentation.tex new file mode 100644 index 0000000..98baf62 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.documentation.tex @@ -0,0 +1,1023 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{documentation}}\label{sec:documentation}% +\tcbset{external/prefix=external/documentation_}% +This library has the single purpose to support \LaTeX\ package documentations +like this one. Actually, the visual nature follows the approach from +Till Tantau's |pgf| \cite{tantau:2015a} documentation. +Typically, this library is assumed to be used in conjunction with the +class |ltxdoc| or alike. + +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} + \tcbuselibrary{documentation} +\end{dispListing} +This also loads the library \mylib{listings}, see \Vref{sec:listings}, +the library \mylib{skins}, see \Vref{sec:skins}, +the library \mylib{xparse}\tcbdocmarginnote{\tcbdocnew{2014-09-19}}, see \Vref{sec:xparse}, +and a bunch of packages, namely +|pifont|, |marvosym|, |makeidx|, |marginnote|, |refcount|, and |hyperref|. + +\begin{marker} +The package |makeidx| is loaded only, if \docAuxCommand*{printindex} is +\emph{not} already defined. Therefore, one can include an alternative to |makeidx| like +|imakeidx| \emph{before} the library |documentation| is used. +\end{marker} +\begin{marker} +The package |marginnote| is loaded only, if \docAuxCommand*{marginnote} is +\emph{not} already defined. +\end{marker} +\begin{marker} +In contrast to other |tcolorbox| options, the option +settings for \mylib{documentation} are typically not +getting reset by \refKey{/tcb/reset}, i.e. they keep their +values for embedded boxes. +\end{marker} +\begin{marker} +In combination with DocStrip, \refKey{/tcb/verbatim ignore percent} may be helpful. +\end{marker} + +For UTF-8 support load (ignore this when using Xe\LaTeX): +\begin{dispListing} + \tcbuselibrary{listingsutf8,documentation} +\end{dispListing} + +For |minted| \cite{poore:2015a} support, load: +\begin{dispListing} + \tcbuselibrary{documentation,minted} + \tcbset{listing engine=minted} +\end{dispListing} + + +\subsection{Macros of the Library} +\enlargethispage*{15mm} +\begin{docEnvironment}[doclang/environment content=command description]{docCommand}{\oarg{options}\marg{name}\marg{parameters}} + Documents a \LaTeX\ macro with given \meta{name} where \meta{name} is + written without backslash. The given \meta{options} are set with \refCom{tcbset}. + This macro takes mandatory or optional \meta{parameters}. + It is automatically indexed and can be referenced with + \refCom{refCom}\marg{name}. +\begin{dispExample} +\begin{docCommand}{foomakedocSubKey}{\marg{name}\marg{key path}} + Creates a new environment \meta{name} based on \refEnv{docKey} for the + documentation of keys with the given \meta{key path}. +\end{docCommand} +\end{dispExample} +\begin{dispExample} +\begin{docCommand}[color definition=blue]{foomakedocSubKey*}% + {\marg{name}\marg{key path}} + Creates a new environment \meta{name} based on \refEnv{docKey} for the + documentation of keys with the given \meta{key path}. +\end{docCommand} +\end{dispExample} +\end{docEnvironment} + + +\begin{docEnvironment}[doclang/environment content=command description]{docCommand*}{\oarg{options}\marg{name}\marg{parameters}} + Identical to \refEnv{docCommand}, but without index entry. +\end{docEnvironment} + + +%\clearpage +{\let\xdocEnvironment\docEnvironment +\let\endxdocEnvironment\enddocEnvironment +\begin{xdocEnvironment}[doclang/environment content=environment description]{docEnvironment}{\oarg{options}\marg{name}\marg{parameters}} + Documents a \LaTeX\ environment with given \meta{name}. + The given \meta{options} are set with \refCom{tcbset}. + This environment takes mandatory or optional \meta{parameters}. + It is automatically indexed and can be referenced with + \refCom{refEnv}\marg{name}. +\begin{dispExample} +\begin{docEnvironment}{foocolorbox}{\oarg{options}} + This is the main environment to create an accentuated colored text box with + rounded corners and, optionally, two parts. +\end{docEnvironment} +\end{dispExample} +\begin{dispExample} +\begin{docEnvironment}% + [doclang/environment content=My content text]% + {foocolorbox*}{\oarg{options}} + This is the main environment to create an accentuated colored text box with + rounded corners and, optionally, two parts. +\end{docEnvironment} +\end{dispExample} +\end{xdocEnvironment}} + +{\let\xdocEnvironment\docEnvironment +\let\endxdocEnvironment\enddocEnvironment +\begin{xdocEnvironment}[doclang/environment content=environment description]{docEnvironment*}{\oarg{options}\marg{name}\marg{parameters}} + Identical to \refEnv{docEnvironment}, but without index entry. +\end{xdocEnvironment}} + +\clearpage +\begin{docEnvironment}[doclang/environment content=key description,doc updated=2014-09-29]{docKey}{\oarg{key path}\oarg{options}\marg{name}\marg{parameters}\marg{description}} + Documents a key with given \meta{name} and an optional \meta{key path}. + The given \meta{options} are set with \refCom{tcbset}. + This key takes mandatory or optional \meta{parameters} as value + with a short \meta{description}. + It is automatically indexed and can be referenced with + \refCom{refKey}\marg{name}. +\begin{dispExample} +\begin{docKey}[foo]{footitle}{=\meta{text}}{no default, initially empty} + Creates a heading line with \meta{text} as content. +\end{docKey} +\end{dispExample} +\end{docEnvironment} + + +\begin{docEnvironment}[doclang/environment content=key description,doc updated=2014-09-29]{docKey*}{\oarg{key path}\oarg{options}\marg{name}\marg{parameters}\marg{description}} + Identical to \refEnv{docKey}, but without index entry. +\end{docEnvironment} + + +\begin{docCommand}{docValue}{\marg{name}} + Documents a value with given \meta{name}. Typically, this is a value for a key. + This value is automatically indexed. +\begin{dispExample} +A feasible value for \refKey{/foo/footitle} is \docValue{foovalue}. +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{docValue*}{\marg{name}} + Identical to \refCom{docValue}, but without index entry. +\end{docCommand} + + +\begin{docCommand}[doc updated=2014-10-09]{docAuxCommand}{\marg{name}} + Documents an auxiliary or minor \LaTeX\ macro with given \meta{name} + where \meta{name} is written without backslash. + This macro is automatically indexed. +\begin{dispExample} +The macro \docAuxCommand{fooaux} holds some interesting data. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}[doc updated=2014-10-09]{docAuxCommand*}{\marg{name}} + Identical to \refCom{docAuxCommand}, but without index entry. +\end{docCommand} + +\begin{docCommand}{docAuxEnvironment}{\marg{name}} + Documents an auxiliary or minor \LaTeX\ environment with given \meta{name}. + This macro is automatically indexed. +\begin{dispExample} +The environment \docAuxEnvironment{fooauxenv} holds some interesting data. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{docAuxEnvironment*}{\oarg{key path}\marg{name}} + Identical to \refCom{docAuxEnvironment}, but without index entry. +\end{docCommand} + +\clearpage + +\begin{docCommand}{docAuxKey}{\oarg{key path}\marg{name}} + Documents an auxiliary key with given \meta{name} and an optional \meta{key path}. + It is automatically indexed. +\begin{dispExample} +The key \docAuxKey[foo]{fooaux} holds some interesting data. +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{docAuxKey*}{\oarg{key path}\marg{name}} + Identical to \refCom{docAuxKey}, but without index entry. +\end{docCommand} + + +\begin{docCommand}[doc new=2015-01-08]{docCounter}{\marg{name}} + Documents a counter with given \meta{name}. The counter is automatically indexed. +\begin{dispExample} +The counter \docCounter{foocounter} can be used for computation. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}[doc new=2015-01-08]{docCounter*}{\marg{name}} + Identical to \refCom{docCounter}, but without index entry. +\end{docCommand} + +\begin{docCommand}[doc new=2015-01-08]{docLength}{\marg{name}} + Documents a counter with given \meta{name}. The counter is automatically indexed. +\begin{dispExample} +The length \docLength{foolength} can be used for computation. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}[doc new=2015-01-08]{docLength*}{\marg{name}} + Identical to \refCom{docLength}, but without index entry. +\end{docCommand} + + +\begin{docCommand}{docColor}{\marg{name}} + Documents a color with given \meta{name}. The color is automatically indexed. +\begin{dispExample} +The color \docColor{foocolor} is available. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{docColor*}{\marg{name}} + Identical to \refCom{docColor}, but without index entry. +\end{docCommand} + + +\clearpage +\begin{docCommand}{cs}{\marg{name}} + Macro from |ltxdoc| \cite{carlisle:2007a} to typeset a command word \meta{name} + where the backslash is prefixed. The library overwrites the original macro. +\begin{dispExample} +This is a \cs{foocommand}. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{meta}{\marg{text}} + Macro from |doc| \cite{mittelbach:2011a} to typeset a meta \meta{text}. + The library overwrites the original macro. +\begin{dispExample} +This is a \meta{text}. +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{marg}{\marg{text}} + Macro from |ltxdoc| \cite{carlisle:2007a} to typeset a \meta{text} with + curly brackets as a mandatory argument. The library overwrites the original macro. +\begin{dispExample} +This is a mandatory \marg{argument}. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{oarg}{\marg{text}} + Macro from |ltxdoc| \cite{carlisle:2007a} to typeset a \meta{text} with + square brackets as an optional argument. The library overwrites the original macro. +\begin{dispExample} +This is an optional \oarg{argument}. +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{brackets}{\marg{text}} + Sets the given \meta{text} with curly brackets. +\begin{dispExample} + Here we use \brackets{some text}. +\end{dispExample} +\end{docCommand} + +\clearpage + +{\let\xdispExample\dispExample + \let\endxdispExample\enddispExample +\begin{docEnvironment}[doc updated=2014-10-10]{dispExample}{} + Creates a colored box based on a \refEnv{tcolorbox}. + It displays the environment content as source code in the upper part + and as compiled text in the lower part of the box. + The appearance is controlled by \refKey{/tcb/documentation listing style} + and the style \refKey{/tcb/docexample}. It may be + changed by redefining this style. +{ +%\tcbset{before lower app={\tcbset{docexample/.style={docexample original}}}} +%\tcbset{docexample/.style={docexample original}}% +\begin{xdispExample} +\begin{dispExample} +This is a \LaTeX\ example. +\end{dispExample} +\end{xdispExample} +} +\end{docEnvironment}} + + +{\let\xdispExample\dispExample + \let\endxdispExample\enddispExample +\begin{docEnvironment}[doc updated=2014-10-10]{dispExample*}{\marg{options}} + The starred version of \refEnv{dispExample} takes \refEnv{tcolorbox} \meta{options} + as parameter. These \meta{options} are executed after \refKey{/tcb/docexample}. +\begin{xdispExample} +\begin{dispExample*}{sidebyside} +This is a \LaTeX\ example. +\end{dispExample*} +\end{xdispExample} +\end{docEnvironment}} + + +\clearpage +\begin{docEnvironment}{dispListing}{} + Creates a colored box based on a \refEnv{tcolorbox}. + It displays the environment content as source code. + The appearance is controlled by \refKey{/tcb/documentation listing style} + and the style \refKey{/tcb/docexample}. It may be + changed by redefining this style. +\begin{dispExample} +\begin{dispListing} +This is a \LaTeX\ example. +\end{dispListing} +\end{dispExample} +\end{docEnvironment} + +\begin{docEnvironment}{dispListing*}{\marg{options}} + The starred version of \refEnv{dispListing} takes \refEnv{tcolorbox} \meta{options} + as parameter. These \meta{options} are executed after \refKey{/tcb/docexample}. +\begin{dispExample} +\begin{dispListing*}{title=My listing} +This is a \LaTeX\ example. +\end{dispListing*} +\end{dispExample} +\end{docEnvironment} + + +\begin{docEnvironment}{absquote}{} + Used to typeset an abstract as quoted and small text. +\begin{dispExample} +\begin{absquote} +|tcolorbox| provides an environment for colored and framed text boxes with a +heading line. Optionally, such a box can be split in an upper and a lower part. +\end{absquote} +\end{dispExample} +\end{docEnvironment} + +\clearpage +\begin{docCommand}{tcbmakedocSubKey}{\marg{name}\marg{key path}} + Creates a new environment \meta{name} based on \refEnv{docKey} for the + documentation of keys with the given \meta{key path} as default. + The new environment \meta{name} takes the same para\-meters as \refEnv{docKey} itself. + A second starred environment \meta{name} is also created, which is identical + to \meta{name} but without index entry. +\begin{dispExample} +\tcbmakedocSubKey{docFooKey}{foo} + +\begin{docFooKey}{foodummy}{=\meta{nothing}}{no default, initially empty} +Some key. +\end{docFooKey} + +\begin{docFooKey*}{foo another dummy}{=\meta{nothing}}{no default, initially empty} +Some key (not indexed). +\end{docFooKey*} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{refCom}{\marg{name}} + References a documented \LaTeX\ macro with given \meta{name} where \meta{name} is + written without backslash. The page reference is suppressed if it links + to the same page. +\begin{dispExample} +We have created \refCom{foomakedocSubKey} as an example. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{refCom*}{\marg{name}} + References a documented \LaTeX\ macro with given \meta{name} where \meta{name} is + written without backslash. There is no page reference. +\begin{dispExample} +We have created \refCom*{foomakedocSubKey} as an example. +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{refEnv}{\marg{name}} + References a documented \LaTeX\ environment with given \meta{name}. + The page reference is suppressed if it links to the same page. +\begin{dispExample} +We have created \refEnv{foocolorbox} as an example. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{refEnv*}{\marg{name}} + References a documented \LaTeX\ environment with given \meta{name}. + There is no page reference. +\begin{dispExample} +We have created \refEnv*{foocolorbox} as an example. +\end{dispExample} +\end{docCommand} + +\clearpage +\begin{docCommand}{refKey}{\marg{name}} + References a documented key with given \meta{name} where \meta{name} + is the full path name of the key. + The page reference is suppressed if it links to the same page. +\begin{dispExample} +We have created \refKey{/foo/footitle} as an example. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{refKey*}{\marg{name}} + References a documented key with given \meta{name} where \meta{name} + is the full path name of the key. + There is no page reference. +\begin{dispExample} +We have created \refKey*{/foo/footitle} as an example. +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{refAux}{\marg{name}} + References some auxiliary environment, key, value, or color. The hyperlink color is + used, but there is no real link. +\begin{dispExample} +Some pages back, one can see \refAux{/foo/footitle} as an example. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{refAuxcs}{\marg{name}} + References some auxiliary macro \meta{name} where \meta{name} is + written without backslash. The hyperlink color is + used, but there is no real link. +\begin{dispExample} +Some pages back, one can see \refAuxcs{fooaux} as an example. +\end{dispExample} +\end{docCommand} + + +% +\begin{docCommand}{colDef}{\marg{text}} +Sets \meta{text} with the command color, see \refKey{/tcb/color command}. +\begin{dispExample} +This is my \colDef{text}. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{colOpt}{\marg{text}} + Sets \meta{text} with the option color, see \refKey{/tcb/color option}. +\begin{dispExample} +This is my \colOpt{text}. +\end{dispExample} +\end{docCommand} + +\clearpage + +\begin{docCommand}[doc new=2014-09-19]{tcbdocmarginnote}{\oarg{options}\marg{text}} + Creates a |tcolorbox| note with the given \meta{text} inside the margin using + the |marginnote| package. The style of the |tcolorbox| is predefined and can be + altered by \refKey{/tcb/doc marginnote} and the given \meta{options}. +\begin{dispExample} +Some text\tcbdocmarginnote{Note A} +which is commented by a note inside the margin. +Alternatively to |\tcbdocmarginnote|, you can always use +|\marginnote| with a |tcolorbox| directly.\par +This is further text% +\tcbdocmarginnote[colframe=blue!50!white,colback=blue!5!white]{Note B} +with another note. +\end{dispExample} +\end{docCommand} + +\begin{docCommand}[doc new=2014-09-19]{tcbdocnew}{\marg{date}} + Auxiliary macro which typesets the \refKey{/tcb/doclang/new} text with + the given \meta{date}. It may be redefined for customization. + \makeatletter\renewcommand*{\tcbdocnew}[1]{\kvtcb@text@new: #1}\makeatother% +\begin{dispExample*}{sidebyside} +\tcbdocnew{1981-10-29}. +% Next one is displayed in the margin: +\tcbdocmarginnote{\tcbdocnew{1978-02-09}} +\end{dispExample*} +\end{docCommand} + +\begin{docCommand}[doc new=2014-09-19]{tcbdocupdated}{\marg{date}} + Auxiliary macro which typesets the \refKey{/tcb/doclang/updated} text with + the given \meta{date}. It may be redefined for customization. + \makeatletter\renewcommand*{\tcbdocupdated}[1]{\kvtcb@text@updated: #1}\makeatother% +\begin{dispExample*}{sidebyside} +\tcbdocupdated{2014-09-19}. +\end{dispExample*} +\end{docCommand} + + +\clearpage +\subsection{Option Keys of the Library} + +\begin{docTcbKey}[][doc updated=2015-03-16]{docexample}{}{style, no value} + Sets the style for \refEnv{dispExample} and \refEnv{dispListing} + with the colors |ExampleBack| and |ExampleFrame|. + To change the appearance of the examples, this style can be + redefined. +\begin{dispListing} +% Predefined style: +\tcbset{ + docexample/.style={colframe=ExampleFrame,colback=ExampleBack, + before skip=\medskipamount,after skip=\medskipamount, + fontlower=\footnotesize} +} +\end{dispListing} +\end{docTcbKey} + +\begin{docTcbKey}{documentation listing options}{=\meta{key list}}{no default,\\\hspace*{\fill} initially |style=tcbdocumentation|} + Sets the options from the package |listings| \cite{heinz:2015a}. + They are used inside \refEnv{dispExample} and \refEnv{dispListing} to typeset + the listings. Note that this is not identical to the key + \refKey{/tcb/listing options} which is used for 'normal' listings.\\ + Used for \refKey{/tcb/listing engine}|=listings| only. +\end{docTcbKey} + +\begin{docTcbKey}{documentation listing style}{=\meta{listing style}}{no default, initially |tcbdocumentation|} + Abbreviation for |documentation listing options={style=...}|. + This key sets a \meta{style} + for the |listings| package, see \cite{heinz:2015a}. + Note that this is not identical to the key + \refKey{/tcb/listing style} which is used for 'normal' listings.\\ + Used for \refKey{/tcb/listing engine}|=listings| only. +\end{docTcbKey} + +\begin{docTcbKey}{documentation minted options}{=\meta{minted style}}{no default,\\\hspace*{\fill} initially |tabsize=2,fontsize=\textbackslash small|} + Sets the options from the package |minted| \cite{poore:2015a} + which are used during typesetting of the listing, if used. + Note that this is not identical to the key + \refKey{/tcb/minted options} which is used for 'normal' listings.\\ + Used for \refKey{/tcb/listing engine}|=minted| only. +\end{docTcbKey} + +\begin{docTcbKey}{documentation minted style}{=\meta{key list}}{no default, initially unset} + Sets a \meta{style} known to |Pygments| \cite{pygments:2013} for + the package |minted| \cite{poore:2015a}, if used. + Note that this is not identical to the key + \refKey{/tcb/minted style} which is used for 'normal' listings.\\ + Used for \refKey{/tcb/listing engine}|=minted| only. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-04-24]{documentation minted language}{=\meta{programming language}}{no default, initially |latex|} + Sets a \meta{programming language} known to |Pygments| \cite{pygments:2013} + for the package |minted| \cite{poore:2015a}, if used. + Note that this is not identical to the key + \refKey{/tcb/minted language} which is used for 'normal' listings.\\ + Used for \refKey{/tcb/listing engine}|=minted| only. +\end{docTcbKey} + + +\begin{marker} +The following two keys are deprecated and without function (v3.50 and above). +Use \refKey{/tcb/before} and \refKey{/tcb/after} with appropriate values +instead. Also see \refKey{/tcb/docexample}. +\end{marker} + +\begin{docTcbKey}[][doc updated=2015-03-16]{before example}{=\meta{macros}}{no default, initially empty} +\smallskip\begin{deprecated} + Sets the \meta{macros} which are executed before \refEnv{dispExample} and \refEnv{dispListing} + additional to \refKey{/tcb/before}. +\end{deprecated} +\end{docTcbKey} + +\begin{docTcbKey}{after example}{=\meta{macros}}{no default, initially empty} +\smallskip\begin{deprecated} + Sets the \meta{macros} which are executed after \refEnv{dispExample} and \refEnv{dispListing} + additional to \refKey{/tcb/after}. +\end{deprecated} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2017-04-25]{keywords bold}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + Keyword used in \refEnv{docEnvironment}, \refEnv{docCommand}, etc. are printed + boldface (or not). Since the typewriter font is used, the effect may be + invisible with Computer Modern fonts or similar which do not + have a bold variant. Note that references to keywords are not printed boldface at all. +\begin{dispExample*}{sidebyside} +\LARGE +\docAuxCommand{fooaux}, \refCom{tcbset} + +\tcbset{keywords bold=false} +\docAuxCommand{fooaux}, \refCom{tcbset} +\end{dispExample*} +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2015-01-09]{index command}{=\meta{macro}}{no default, initially \cs{index}} + Replaces the internally used \cs{index} macro by the given \meta{macro}. + The \meta{macro} has to take one mandatory argument like \cs{index}. + This option is mutually exclusive with \refKey{/tcb/index command name}. +\begin{dispListing} +\tcbset{index command=\myindexcommand} +\end{dispListing} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-01-09]{index command name}{=\meta{name}}{no default, initially unset} + Replaces the internally used \cs{index} macro by + \mbox{\cs{index}\texttt{[\meta{name}]}}, i.e.\ + \mbox{\cs{index}\texttt{\textbraceleft\ldots\textbraceright}} is replaced by + \mbox{\cs{index}\texttt{[\meta{name}]\textbraceleft\ldots\textbraceright}}. + This option is intended to be used with |imakeidx| and is + mutually exclusive with \refKey{/tcb/index command}. +\begin{dispListing} +\tcbset{index command name=mydoc} +\end{dispListing} +\end{docTcbKey} + + + +\begin{docTcbKey}{index format}{=\meta{format}}{no default, initially |pgf|} + Determines the basic \meta{format} of the generated index. + Feasible values are: + \begin{itemize} + \item\docValue{pgfsection}: The index is formatted like in the |pgf| documentation (as a section). + \item\docValue{pgfchapter}: The index is formatted like in the |pgf| documentation (as a chapter). + \item\docValue{pgf}: Alias for |pgfsection|. + \item\docValue{doc}: The index is assumed to be formatted by |doc| or |ltxdoc|. The usage of |makeindex| + with |-s gind.ist| is assumed. The package |hypdoc| has to be loaded + \emph{before} |tcolorbox|. + \item\docValue{off}: The index is not formatted by |tcolorbox|. Use this, if + the index is formatted by other package like |imakeidx|. + \end{itemize} +\end{docTcbKey} + + +\begin{docTcbKey}{index actual}{=\meta{character}}{no default, initially |@|} + Sets the character for 'actual' in automatic indexing. +\end{docTcbKey} + +\begin{docTcbKey}{index quote}{=\meta{character}}{no default, initially |"|} + Sets the character for 'quote' in automatic indexing. +\end{docTcbKey} + +\begin{docTcbKey}{index level}{=\meta{character}}{no default, initially |!|} + Sets the character for 'level' in automatic indexing. +\end{docTcbKey} + +\begin{docTcbKey}{index default settings}{}{style, no value} + Sets the |makeindex| default values for + \refKey{/tcb/index actual}, + \refKey{/tcb/index quote}, and + \refKey{/tcb/index level}. +\end{docTcbKey} + + +\begin{docTcbKey}{index german settings}{}{style, no value} + Sets the |makeindex| values recommended for German language texts. + This is identical to setting the following: +\begin{dispListing} +\tcbset{index actual={=},index quote={!},index level={>}} +\end{dispListing} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}{index annotate}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + If set to |true|, the index entries are annotated with short descriptions + given by \refKey{/tcb/doclang/environment}, \refKey{/tcb/doclang/key}, + and others. +\end{docTcbKey} + +\begin{docTcbKey}{index colorize}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + If set to |true|, the index entries colorized according to the color + settings given by \refKey{/tcb/color environment}, \refKey{/tcb/color key}, + and others. +\end{docTcbKey} + + +\begin{docTcbKey}{color command}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color used by macro definitions. +\end{docTcbKey} + +\begin{docTcbKey}{color environment}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color used by environment definitions. +\end{docTcbKey} + +\begin{docTcbKey}{color key}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color used by key definitions. +\end{docTcbKey} + +\begin{docTcbKey}{color value}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color used by value definitions. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new={2015-01-08}]{color counter}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color used by counter definitions. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new={2015-01-08}]{color length}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color used by length definitions. +\end{docTcbKey} + +\begin{docTcbKey}{color color}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color used by color definitions. +\end{docTcbKey} + +\begin{docTcbKey}{color definition}{=\meta{color}}{no default, initially |Definition|} + Sets the highlight color for \refKey{/tcb/color command}, \refKey{/tcb/color environment}, + \refKey{/tcb/color key}, \refKey{/tcb/color value}, \refKey{/tcb/color counter}, + \refKey{/tcb/color length}, and \refKey{/tcb/color color}. +\end{docTcbKey} + +\begin{docTcbKey}{color option}{=\meta{color}}{no default, initially |Option|} + Sets the color used for optional arguments. +\end{docTcbKey} + +\begin{docTcbKey}{color hyperlink}{=\meta{color}}{no default, initially |Hyperlink|} + Sets the color for all hyper-links, i.\,e. all internal and external links. +\end{docTcbKey} + + +\clearpage +The following keys are provided for language specific settings. +The English language is predefined. + +\begin{docTcbKey}{english language}{}{style, no value} + Sets all language specific settings to English. +\end{docTcbKey} + +\begin{langTcbKey}{color}{=\meta{text}}{no default, initially |color|} + Text used in the index for colors. +\end{langTcbKey} + +\begin{langTcbKey}{colors}{=\meta{text}}{no default, initially |Colors|} + Heading text in the index for colors. +\end{langTcbKey} + +\begin{langTcbKey}[][doc new={2015-01-08}]{counter}{=\meta{text}}{no default, initially |counter|} + Text used in the index for counters. +\end{langTcbKey} + +\begin{langTcbKey}[][doc new={2015-01-08}]{counters}{=\meta{text}}{no default, initially |Counters|} + Heading text in the index for counters. +\end{langTcbKey} + +\begin{langTcbKey}{environment}{=\meta{text}}{no default, initially |environment|} + Text used in the index for environments. +\end{langTcbKey} + +\begin{langTcbKey}{environments}{=\meta{text}}{no default, initially |Environments|} + Heading text in the index for environments. +\end{langTcbKey} + +\begin{langTcbKey}{environment content}{=\meta{text}}{no default, initially |environment content|} + Text used in \refEnv{docEnvironment}. +\end{langTcbKey} + +\begin{langTcbKey}{index}{=\meta{text}}{no default, initially |Index|} + Heading text for the index. +\end{langTcbKey} + +\begin{langTcbKey}{key}{=\meta{text}}{no default, initially |key|} + Text used in the index for keys. +\end{langTcbKey} + +\begin{langTcbKey}{keys}{=\meta{text}}{no default, initially |Keys|} + Heading text used in the index for keys. +\end{langTcbKey} + +\begin{langTcbKey}[][doc new={2015-01-08}]{length}{=\meta{text}}{no default, initially |length|} + Text used in the index for lengths. +\end{langTcbKey} + +\begin{langTcbKey}[][doc new={2015-01-08}]{lengths}{=\meta{text}}{no default, initially |Lengths|} + Heading text in the index for lengths. +\end{langTcbKey} + + +\begin{langTcbKey}[][doc new={2014-09-19}]{new}{=\meta{text}}{no default, initially |New|} + Announcement text for new content. +\end{langTcbKey} + +\begin{langTcbKey}{pageshort}{=\meta{text}}{no default, initially |P.|} + Short text for page references. +\end{langTcbKey} + +\begin{langTcbKey}[][doc new={2014-09-19}]{updated}{=\meta{text}}{no default, initially |Updated|} + Announcement text for updated content. +\end{langTcbKey} + +\begin{langTcbKey}{value}{=\meta{text}}{no default, initially |value|} + Text used in the index for values. +\end{langTcbKey} + +\begin{langTcbKey}{values}{=\meta{text}}{no default, initially |Values|} + Heading text in the index for values. +\end{langTcbKey} + + + +\clearpage +\begin{docTcbKey}{doc left}{=\meta{length}}{no default, initially |2em|} + Sets the left hand offset of the documentation texts from + \refEnv{docCommand}, \refEnv{docEnvironment}, \refEnv{docKey}, etc, to \meta{length}. +\begin{dispExample} +\begin{docCommand*}[doc left=2cm,doc left indent=-2cm]{myCommandA}{\marg{argument}} + This is the documentation of \refCom{myCommandA} which takes one \meta{argument}. + \refCom{myCommandA} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{doc right}{=\meta{length}}{no default, initially |0em|} + Sets the right hand offset of the documentation texts from + \refEnv{docCommand}, \refEnv{docEnvironment}, \refEnv{docKey}, etc, to \meta{length}. +\begin{dispExample} +\begin{docCommand*}[doc right=2cm]{myCommandB}{\marg{argument}} + This is the documentation of \refCom{myCommandB} which takes one \meta{argument}. + \refCom{myCommandB} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{doc left indent}{=\meta{length}}{no default, initially |-2em|} + Sets the left hand indent of documentation heads from + \refEnv{docCommand}, \refEnv{docEnvironment}, \refEnv{docKey}, etc, to \meta{length}. +\begin{dispExample} +\begin{docCommand*}[doc left indent=2cm]{myCommandC}{\marg{argument}} + This is the documentation of \refCom{myCommandC} which takes one \meta{argument}. + \refCom{myCommandC} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\end{docTcbKey} + +\enlargethispage*{10mm} +\begin{docTcbKey}{doc right indent}{=\meta{length}}{no default, initially |0pt|} + Sets the right hand indent of documentation heads from + \refEnv{docCommand}, \refEnv{docEnvironment}, \refEnv{docKey}, etc, to \meta{length}. +\begin{dispExample} +\begin{docCommand*}[doc right indent=-10mm,doc right=10mm, + doc description=test value]{myCommandD}{\marg{argument}} + This is the documentation of \refCom{myCommandD} which takes one \meta{argument}. + \refCom{myCommandD} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\end{docTcbKey} + +\clearpage +The head lines of the main documentation environments \refEnv{docCommand}, +\refEnv{docEnvironment}, \refEnv{docKey}, etc, are set inside |tcolorbox|es. +Options to these |tcolorbox|es can be given using the following keys. + +\begin{docTcbKey}{doc head command}{=\meta{options}}{no default, initially empty} + Sets \meta{options} for the head line of \refEnv{docCommand} and \refEnv{docCommand*}. +\begin{dispExample} +\tcbset{doc head command={interior style={fill,left color=red!20!white, + right color=blue!20!white}}} + +\begin{docCommand*}{myCommandE}{\marg{argument}} + This is the documentation of \refCom{myCommandE} which takes one \meta{argument}. + \refCom{myCommandE} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{doc head environment}{=\meta{options}}{no default, initially empty} + Sets \meta{options} for the head line of \refEnv{docEnvironment} and \refEnv{docEnvironment*}. +\begin{dispExample} +\tcbset{doc head environment={beamer,boxsep=2pt,arc=2pt,colback=green!20!white, + after=\par\smallskip}} + +\begin{docEnvironment*}{myEnvironment}{\marg{argument}} + This is the documentation of \refEnv{myEnvironment} which + takes one \meta{argument}. +\end{docEnvironment*} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{doc head key}{=\meta{options}}{no default, initially empty} + Sets \meta{options} for the head line of \refEnv{docKey} and \refEnv{docKey*}. +\begin{dispExample} +\tcbset{doc head key={boxsep=4pt,arc=4pt,boxrule=0.6pt, + frame style=fill,interior style=fill,colframe=green!50!black}} + +\begin{docKey*}{/foo/myKey}{}{no value} + This is the documentation of \refKey{/foo/myKey}. +\end{docKey*} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{doc head}{=\meta{options}}{no default, initially empty} + Shortcut for setting the same \meta{options} for + \refKey{/tcb/doc head command}, \refKey{/tcb/doc head environment}, + and \refKey{/tcb/doc head key}. +\end{docTcbKey} + +\clearpage +The description texts of the main documentation environments \refEnv{docCommand}, +\refEnv{docEnvironment}, \refEnv{docKey}, etc, are set in a compact form without +indention and |parskip=0pt|. This settings can overruled by using the following +keys to insert code before (or after) the description texts. + +\begin{docTcbKey}[][doc new=2015-10-09]{before doc body command}{=\meta{code}}{no default, initially empty} + Executes \meta{code} before the description texts + of \refEnv{docCommand} and \refEnv{docCommand*}. +\begin{dispExample} +\tcbset{before doc body command={% + \setlength{\parindent}{2.5em}% + \setlength{\parskip}{1ex plus 0.75ex minus 0.25ex}% +}} + +\begin{docCommand*}{myCommandG}{\marg{argument}} + This is the documentation of \refCom{myCommandG} which takes one \meta{argument}. + \refCom{myCommandG} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-10-09]{after doc body command}{=\meta{code}}{no default, initially empty} + Executes \meta{code} after the description texts + of \refEnv{docCommand} and \refEnv{docCommand*}. +\begin{dispExample} +\tcbset{after doc body command={% + \hfill\nolinebreak[1]\hspace*{\fill}\textcolor{red}{$\diamondsuit$}% +}} + +\begin{docCommand*}{myCommandH}{\marg{argument}} + This is the documentation of \refCom{myCommandH} which takes one \meta{argument}. + \refCom{myCommandH} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-10-09]{before doc body environment}{=\meta{code}}{no default, initially empty} + Executes \meta{code} before the description texts + of \refEnv{docEnvironment} and \refEnv{docEnvironment*}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-10-09]{after doc body environment}{=\meta{code}}{no default, initially empty} + Executes \meta{code} after the description texts + of \refEnv{docEnvironment} and \refEnv{docEnvironment*}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-10-09]{before doc body key}{=\meta{code}}{no default, initially empty} + Executes \meta{code} before the description texts + of \refEnv{docKey} and \refEnv{docKey*}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-10-09]{after doc body key}{=\meta{code}}{no default, initially empty} + Executes \meta{code} after the description texts + of \refEnv{docKey} and \refEnv{docKey*}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-10-09]{before doc body}{=\meta{options}}{no default, initially empty} + Shortcut for setting the same \meta{options} for + \refKey{/tcb/before doc body command}, \refKey{/tcb/before doc body environment}, + and \refKey{/tcb/before doc body key}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-10-09]{after doc body}{=\meta{options}}{no default, initially empty} + Shortcut for setting the same \meta{options} for + \refKey{/tcb/after doc body command}, \refKey{/tcb/after doc body environment}, + and \refKey{/tcb/after doc body key}. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{doc description}{=\meta{text}}{no default, initially empty} + Sets a (short!) additional description \meta{text} for + \refEnv{docCommand} or \refEnv{docEnvironment}. Such a description is + mandatory for \refEnv{docKey}. +\begin{dispExample} +\begin{docCommand*}[doc description=my description]{myCommandF}{\marg{argument}} + This is the documentation of \refCom{myCommandF} which takes one \meta{argument}. + \refCom{myCommandF} does some funny things with its \meta{argument}. +\end{docCommand*} +\end{dispExample} +\begin{marker} +Note that the description \meta{text} may overlap with the text on the left +hand side if too long. Linebreaks can be used inside the \meta{text}. +\end{marker} +\end{docTcbKey} + +\begin{docTcbKey}{doc into index}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + If set to |false|, no index entries are written for the main documentation + environments. The same effect is achieved by using e.\,g.\ \refEnv{docCommand*} + instead of \refEnv{docCommand}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{doc marginnote}{=\meta{options}}{no default, initially empty} + Sets style \meta{options} for the displayed box of the \refCom{tcbdocmarginnote} command. +\begin{dispExample} +\tcbset{doc marginnote={colframe=blue!50!white,colback=blue!5!white}}% +This is some text\tcbdocmarginnote{Note A} +which is commented by a note inside the margin. +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{doc new}{=\meta{date}}{style, no default} + Adds a a marginnote with a 'New: \meta{data}' message at the beginning of + the upper box part. The intended use is inside the option list of + \refEnv{docCommand}, \refEnv{docEnvironment}, etc. + \makeatletter\renewcommand*{\tcbdocnew}[1]{\kvtcb@text@new: #1}\makeatother% +\begin{dispExample} +\begin{docCommand}[doc new=2000-01-01]{foosomething}{\marg{text}} +Some command for something. +\end{docCommand} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-09-19]{doc updated}{=\meta{date}}{style, no default} + Adds a marginnote with a 'Updated: \meta{data}' message at the beginning of + the upper box part. See \refKey{/tcb/doc new}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-09-19]{doc new and updated}{=\marg{new date}\marg{update date}}{style, no default} + Adds a marginnote with 'New: \meta{new date}' and 'Updated: \meta{update data}' messages at the beginning of + the upper box part. See \refKey{/tcb/doc new}. +\end{docTcbKey} + + +\subsection{Predefined Colors of the Library} +The following colors are predefined. They are used as default colors +in some library commands. + +\def\dispColor#1{\docColor{#1}~\tikz[baseline=1mm]\path[fill=#1,draw] (0,0) rectangle (0.4,0.4);~} + +\dispColor{Option}, +\dispColor{Definition}, +\dispColor{ExampleFrame}, +\dispColor{ExampleBack}, +\dispColor{Hyperlink}. + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.external.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.external.tex new file mode 100644 index 0000000..8479f88 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.external.tex @@ -0,0 +1,644 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{external}}\label{sec:external}% +\tcbset{external/prefix=external/external_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{external} +\end{dispListing} + +The purpose of this library is to support externalization of document +snippets like graphics or boxes which can be compiled stand-alone. +These snippets are written to external files, compiled and the resulting +pdf files are included to the main document as images. +The whole procedure saves compilation time, if such a snippet is costly to +compile but needs to compile just once or very seldom. + +There are very good alternatives to this library. One should consider +the |standalone| package or the \tikzname\ externalization library instead. +The \mylib{external} library is something in between and can be seen as +poor man variant of the \tikzname\ externalization library. + +The main differences between \tikzname\ externalization and \mylib{external} are: +\begin{itemize} +\item\tikzname\ |external| compiles the whole original document in a sophisticated + way while \mylib{external} uses only the preamble or a part of the preamble + of the original document. +\item\tikzname\ |external| can automatically externalize all |tikzpicture| + environments while \mylib{external} externalizes marked snippets only. +\item Code snippets to be externalized by \mylib{external} are not restricted to + |tikzpicture| environments. But these snippets have to be stand-alone without + dependencies to the rest of the document. +\end{itemize} +Why should somebody use \mylib{external} instead of the more powerful \tikzname\ |external|? +One reason could be compilation speed, but the main reason for creating the +library at all was that \tikzname\ |external| tends to choke on complicated +documents where the sophisticated mechanism stumbles. Since \mylib{external} does +not use the original document body for compilation, this cannot happen. + +\begin{marker} +Source snippets are compiled, if their |md5| checksum has changed. +They are not compiled automatically, if option settings are changed or +anything outside the snippet is changed. +Use \refKey{/tcb/external/force remake} to force compilation in this case +or simply delete the externalized pdf oder md5 files. +\end{marker} + +\begin{marker} +To use the externalization options, the compiler has to be called with the +|-shell-escape| permission to authorize potentially dangerous system calls. +Be warned that this is a security risk. +\end{marker} + + +\clearpage +\subsection{Preparation of a Document for Externalization}\label{subsec:external_preparation} + +The preamble of the main document has to contain the \refCom{tcbEXTERNALIZE} +command. Without this command, no externalization operation will be +executed. + +\begin{docCommand}[doc new=2015-03-11]{tcbEXTERNALIZE}{} + It is mandatory for externalization that this command is used once + in the preamble of the main document. Every setting \emph{before} + \refCom{tcbEXTERNALIZE} will also be used for compiling an external + snippet. Every setting \emph{after} \refCom{tcbEXTERNALIZE} will be + ignored for compiling an external snippet. + Place this command right before |\begin{document}|, if you are not + absolutely sure about another place. + + The main document has to look like the following: + +\begin{dispListing} +\documentclass[a4paper]{book}% for example +\usepackage{...}% anything +% ... +% Tpyically, all or the very most settings for the document. + +\tcbEXTERNALIZE% Typically, just before \begin{document} + +% Additional settings which are ABSOLUTELY irrelevant for the +% stand-alone snippets. +% +\begin{document} + % The document. + % This also contains the marked snippets for externalization. +\end{document} +\end{dispListing} +\end{docCommand} + +During compilation, a \refKey{/tcb/external/runner} file +is dynamically created (several times). This is the actual main file for +compiling an externalized snippet. + +\begin{extTcbKey}[][doc new=2015-03-11]{runner}{=\meta{file name}}{no default, + initially \texttt{\cs{jobname}\detokenize{_run.tex}}} +Sets the \meta{file name} for dynamically created |runner| file. +This is the actual main file for a document snippet. +Typically, the initial setting is not needed to be changed. +\begin{dispListing} +\tcbset{external/runner=myrunner.tex} +\end{dispListing} +\end{extTcbKey} + +\begin{extTcbKey}[][doc new=2015-03-11]{prefix}{=\meta{text}}{no default, + initially \texttt{external/}} +The \meta{text} is prefixed to any \refKey{/tcb/external/name} for an +externalization snippet. The initial setting implies saving all snippets +into an |external/| subdirectory. Depending on the operation system, +the subdirectory may have to be created manually once. +\begin{dispListing} +% Use a 'real' prefix instead of writing into a subdirectory: +\tcbset{external/prefix=ext_} +\end{dispListing} +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-03-11]{externalize}{\colOpt{=true\textbar false}}{default |true|, + initially |true|} +If set to |true|, the marked snippets are compiled if necessary. +If set to |false|, the marked snippets are not compiled but included as text. +\refKey{/tcb/external/externalize} can only be used after \refCom{tcbEXTERNALIZE}. +\end{extTcbKey} + +\begin{extTcbKey}[][doc new=2015-03-11]{force remake}{\colOpt{=true\textbar false}}{default |true|, + initially |false|} +If set to |true|, the marked snippets are always compiled. +If set to |true|, the marked snippets are compiled only if necessary. +The necessity is given, if a compiled pdf file is missing or the +|md5| checksum of the source snippet has changed. +\end{extTcbKey} + +\enlargethispage*{1cm} +\begin{extTcbKey}[][doc new and updated={2015-03-11}{2017-02-24}]{\tcbexclamation}{}{style} + Shortcut for setting \refKey{/tcb/external/force remake} to |true|. +\end{extTcbKey} + +\begin{extTcbKey}[][doc new and updated={2015-06-12}{2017-02-24}]{-}{}{style} + Shortcut for setting \refKey{/tcb/external/externalize} to |false|. +\end{extTcbKey} + + +\subsection{Marking Externalization Snippets}\label{subsec:external_marking} + +\begin{docEnvironment}[doc new=2015-03-11]{tcbexternal}{\oarg{options}\marg{name}} +Marks the environment content as a snippet for externalization. +Typically, the content is a |tikzpicture| or something similar. +It is important to note that the snippet should not have any dependencies +with the rest of the document, e.g. referencing counters or setting counters +is not possible. +The \meta{name} is automatically prefixed with \refKey{/tcb/external/prefix}. +In combination, this has to be a unique file name. It is advised to not +use spaces or umlauts for the name. +The \meta{options} are keys from the |/tcb/external/| key tree. + +\begin{dispExample} +\begin{tcbexternal}{example_tikzpicture} + \begin{tikzpicture} + \path[fill=yellow!50!white] (0,0) circle (11mm); + \path[fill=white] (0,0) circle (9mm); + \foreach \w/\c in {90/red,210/green,330/blue} + {\path[shading=ball,ball color=\c] (\w:1cm) circle (7mm);} + \end{tikzpicture} +\end{tcbexternal} +\end{dispExample} + +\medskip + +If a \refEnv{tcolorbox} is externalized, one should use +\refKey{/tcb/nobeforeafter} for the box. Indention and distances to +the text before and after have to be given separately outside the +\refEnv{tcbexternal} environment. + +\begin{dispExample} +\noindent% +\begin{tcbexternal}[minipage]{example_tcolorbox} + \begin{tcolorbox}[nobeforeafter,enhanced, + fonttitle=\bfseries,title=Externalized Box, + colframe=red!50!black,drop fuzzy shadow, + interior style={fill overzoom image=goldshade.png}] + This complete tcolorbox is externalized. One cannot use numbered + boxes here. Note the \texttt{minipage} option which tells the + current line width to the external snippet. + \end{tcolorbox} +\end{tcbexternal} +\end{dispExample} + +\begin{dispExample} +\begin{tcolorbox}[nobeforeafter,enhanced, + fonttitle=\bfseries,title=Externalized Box, + colframe=blue!50!black, + interior style={fill overzoom image=blueshade.png}] + \begin{tcbexternal}[minipage]{example_tcolorbox2} + \color{white}% + The interior of the tcolorbox is externalized. + One can use numbered boxes without problems. + Note that the text color has to be set for the text manually + since it is converted into an image. + \end{tcbexternal} +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +\begin{tcbexternal}[minipage]{example_tabularx} + \newcolumntype{Y}{>{\raggedleft\arraybackslash}X}% + \begin{tabularx}{\linewidth}{|l||Y|Y|Y|Y||Y|}\hline + Group & One & Two & Three & Four & Sum\\\hline\hline + Red & 1000.00 & 2000.00 & 3000.00 & 4000.00 & 10000.00\\\hline + Green & 2000.00 & 3000.00 & 4000.00 & 5000.00 & 14000.00\\\hline + Blue & 3000.00 & 4000.00 & 5000.00 & 6000.00 & 18000.00\\\hline\hline + Sum & 6000.00 & 9000.00 & 12000.00 & 15000.00 & 42000.00\\\hline + \end{tabularx} +\end{tcbexternal} +\end{dispExample} + + +\end{docEnvironment} + +\begin{extTcbKey}[][doc new=2015-03-11]{name}{=\meta{name}}{no default, + initially \texttt{unnamed}} +The \meta{name} is automatically prefixed with \refKey{/tcb/external/prefix}. +In combination, this has to be a unique file name for externalization. +Typically, this key is not used directly but is set indirectly as +mandatory parameter, see \refEnv{tcbexternal}. +\end{extTcbKey} + + +\clearpage +\begin{docEnvironment}[doc new=2015-03-11]{extcolorbox}{\oarg{options}\marg{name}\oarg{tcolorbox options}} + This is an externalized version of \refEnv{tcolorbox} created + using\\ \refCom{newtcbexternalizetcolorbox}: +\begin{dispListing} +\newtcbexternalizetcolorbox{extcolorbox}{tcolorbox}{}{} +\end{dispListing} + \meta{options} and \meta{name} are given to the underlying \refEnv{tcbexternal} + environment, while \meta{tcolorbox options} are given to \refEnv{tcolorbox}. + + \begin{marker} + Note that you should not redefine \refKey{/tcb/before} and \refKey{/tcb/after} + inside the \meta{tcolorbox options}, since the + externalized version would not be identical to the non-externalized + otherwise. + \end{marker} + +\begin{dispExample} +\begin{extcolorbox}[minipage]{example_extcolorbox} + [ enhanced,colframe=red!50!black,colback=yellow!10, + fonttitle=\bfseries,drop fuzzy shadow, + title=My external box ] + + This box is completely externalized. + + \begin{tcolorbox}[colframe=blue,colback=blue!5,before skip=6pt] + Inner box. + \end{tcolorbox} +\end{extcolorbox} +\end{dispExample} +\end{docEnvironment} + +\begin{marker} +\begin{itemize} +\item\textbf{Never} externalize numbered boxes. +\item\textbf{Never} externalize boxes which contain references to other + things, e.g. using |\ref| or |\cite|. +\item\textbf{Never} externalize breakable boxes. +\end{itemize} +\kern6pt +\end{marker} + +\clearpage +\begin{docEnvironment}[doc new=2015-03-11]{extikzpicture}{\oarg{options}\marg{name}\oarg{tikz options}} + This is an externalized version of |tikzpicture| created + using\\ \refCom{newtcbexternalizeenvironment}: +\begin{dispListing} +\newtcbexternalizeenvironment{extikzpicture}{tikzpicture}{}{}{} +\end{dispListing} + \meta{options} and \meta{name} are given to the underlying \refEnv{tcbexternal} + environment, while \meta{tikz options} are given to |tikzpicture|. + +\tcbset{/tcb/external/externalize}%----- Do externalization even if switched off globally +\begin{dispExample} +\begin{center} +\begin{extikzpicture}[ + preamble={\usepackage{pgfplots}}, % add package for external graph + input source on error=false, % do not load source on error +]{example_pgfplots} + \pgfplotsset{width=12cm} + \begin{axis}[3d box=background,grid=major, + xlabel=$x$, ylabel=$y$, zlabel=$z$, view/h=40, + mesh/interior colormap name=hot, + colormap/blackwhite, + z buffer=sort,domain=0:90,y domain=0:60, + zmin=0,zmax=2,z post scale=1.2, + ] + \addplot3[surf,mesh/interior colormap name=blackwhite, + colormap/hot,] ( {cos(x)},{sin(x)}, {2*sin(y)} ); + \addplot3[surf] ( {2*cos(x)*cos(y)},{2*sin(x)*cos(y)}, {2*sin(y)} ); + \end{axis} +\end{extikzpicture} +\end{center} +\end{dispExample} + +\end{docEnvironment} + + + + +\clearpage +\begin{docTcbKey}[][doc new=2015-03-11]{externalize listing}{=\meta{name}}{style, no default} + The text content of a \refEnv{tcblisting} is externalized with the + given \meta{name}. Note that the listing part is not externalized. +\end{docTcbKey} + + +\begin{dispExample} +\begin{tcblisting}{externalize listing=example_listing, + bicolor,colback=yellow!10,colframe=yellow!50!black, + colbacklower=white,center lower} +\begin{tikzpicture} + \path[fill=yellow!50!white] (0,0) circle (11mm); + \path[fill=white] (0,0) circle (9mm); + \foreach \w/\c in {90/red,210/green,330/blue} + {\path[shading=ball,ball color=\c] (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{tcblisting} +\end{dispExample} + + +\begin{docTcbKey}[][doc new=2015-03-11]{externalize listing\tcbexclamation}{=\meta{name}}{style, no default} +Combination of \refKey{/tcb/externalize listing} and \refKey{/tcb/external/force remake}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-03-11]{externalize example}{=\meta{name}}{style, no default} + The text content of a \refEnv{dispExample*} is externalized with the + given \meta{name}. Note that the listing part is not externalized. + +\begin{dispExample} +\begin{dispExample*}{sidebyside,externalize example=example_example} +\tikz\path[shading=ball, + ball color=red] circle (7mm); +\end{dispExample*} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-03-11]{externalize example\tcbexclamation}{=\meta{name}}{style, no default} +Combination of \refKey{/tcb/externalize example} and \refKey{/tcb/external/force remake}. +\end{docTcbKey} + +\clearpage +\subsection{Customization}\label{subsec:external_custom} + +\begin{extTcbKey}[][doc new=2015-03-11]{safety}{=\meta{length}}{no default, + initially |2mm|} +The snippet box is surrounded with a safety border with a thickness of +\meta{length}. This border is automatically trimmed during picture inclusion. +The reason for this mechanism is to catch box content which +extrudes over the bounding box. For example, shadows of a |tcolorbox| are +painted outside the bounding box and would be lost otherwise. +\end{extTcbKey} + +\begin{extTcbKey}[][doc new=2015-03-11]{environment}{=\meta{env}}{no default, initially unset} +Surrounds the exported snippet text with an environment \meta{env} without +parameters. +Note that this option is ignored for \refKey{/tcb/externalize listing}. +\end{extTcbKey} + +\begin{extTcbKey}[][doc new=2015-05-05]{environment with percent}{\colOpt{=true\textbar false}}{default |true|, + initially |true|} +If set to |true|, the |\begin| and |\end| code of \refKey{/tcb/external/environment} +is appended with a percent sign. For verbatim environments, this option +typically has to be se to |false|. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-03-11]{minipage}{\colOpt{=\meta{length}}}{default \texttt{\cs{linewidth}}, + initially unset} +Surrounds the exported snippet text with a minipage. The optional \meta{length} +parameter sets the width of the minipage. Note that the default width is the +current line width of the main document. +See \refEnv{tcbexternal} for examples. +Note that this option is ignored for \refKey{/tcb/externalize listing}. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-03-11]{plain}{}{no value, initially set} + Removes any text which was set to surround the snippet. + This removes the setting of \refKey{/tcb/external/minipage}, but is + independent of \refKey{/tcb/external/safety}. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-03-11]{compiler}{=\meta{text}}{no default, + initially \texttt{pdflatex}} + Sets the name of the compiler for the snippets. Note that this compiler + has to support the |\pdfmdfivesum| primitive e.g. using the + |pdftexcmds| package. This should work for |xelatex| and |lualatex|. +\end{extTcbKey} + +\begin{extTcbKey}[][doc new=2015-03-11]{runs}{=\meta{number}}{no default, + initially |1|} + Sets the number of compiler runs for the snippet. +\begin{dispExample} +\begin{tcbexternal}[minipage,runs=2]{example_raster} + \begin{tcbitemize}[raster equal height, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem \Huge Two + \tcbitem Three + \tcbitem Four + \end{tcbitemize} +\end{tcbexternal} +\end{dispExample} +\end{extTcbKey} + +\enlargethispage*{1cm} +\begin{extTcbKey}[][doc new=2015-03-11]{input source on error}{\colOpt{=true\textbar false}}{default |true|, + initially |true|} +If set to |true|, the source code of the snippet is loaded instead of +the failed pdf picture. Typically, this will lead to an error stop at the +faulty place of the source and such helps detecting the cause. +If the source input compiles without error, the document setup +may be incorrect, see \Fullref{subsec:external_preparation}. +Maybe, the |external/| subdirectory has to be created manually in this case, +see \refKey{/tcb/external/prefix}.\par +If the option is set to |false|, the compilation stops immediately on an error. +The log file of the external snippet has to be consulted for error messages +in this case. +\end{extTcbKey} + + +\clearpage + +\begin{extTcbKey}[][doc new=2015-05-05]{preclass}{=\meta{code}}{no default, + initially unset} + The given \meta{code} is added before the snippet document. + Typically, this means before |\documentclass|. + This is not used for compilation of the main document. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-05-05]{PassOptionsToPackage}{=\marg{options}\marg{package}}{no default, + initially unset} + The given \meta{options} are passed to the given \meta{package} for + the snippet document. This is a shortcut for using \refKey{/tcb/external/preclass} + with |\PassOptionsToPackage|. + This not used for compilation of the main document. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-05-05]{PassOptionsToClass}{=\marg{options}\marg{class}}{no default, + initially unset} + The given \meta{options} are passed to the given \meta{class} for + the snippet document. This is a shortcut for using \refKey{/tcb/external/preclass} + with |\PassOptionsToClass|. + This not used for compilation of the main document. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-05-05]{clear preclass}{}{no value} + Removes all additional \refKey{/tcb/external/preclass} settings. +\end{extTcbKey} + + + +\begin{extTcbKey}[][doc new=2015-03-11]{preamble}{=\meta{code}}{no default, + initially unset} + The given \meta{code} is added to the preamble of the snippet document. + This is not used for compilation of the main document. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-05-05]{preamble tcbset}{=\meta{options}}{no default, + initially unset} + The given \meta{options} are added as parameter for \refCom{tcbset} + to the preamble of the snippet document. + This are not used for compilation of the main document. +\end{extTcbKey} + + +\begin{extTcbKey}[][doc new=2015-03-16]{clear preamble}{}{no value} + Removes all additional \refKey{/tcb/external/preamble} settings. +\end{extTcbKey} + + + +\begin{docCommand}[doc new=2015-03-11]{tcbifexternal}{\marg{true}\marg{false}} + Expands to \meta{true}, if executed during snippet compilation, + and to \meta{false}, if executed during main document compilation. + This can be used \emph{before} \refCom{tcbEXTERNALIZE} to + give different setting to snippet and main document. +\begin{dispListing} +\tcbifexternal{ + \usepackage{onlyforexternal} +}{ + \usepackage{onlyformain} +} +\end{dispListing} +\end{docCommand} + + + +\clearpage +\begin{docCommand}[doc new=2015-03-11]{newtcbexternalizeenvironment}{\marg{newenv}\marg{env}\marg{options}\marg{begin}\marg{end}} + Creates a new environment \meta{newenv} which is based on + \refEnv{tcbexternal}. This enviroment takes \emph{at least} + one optional parameter and one mandatory parameter. + These two parameters are passed to \refEnv{tcbexternal}. + Further, the given \meta{options} are always added to the option list of \refEnv{tcbexternal}.\par + The environment content is externalized and the external snippet is surrounded + by an environment \meta{env}. All further parameters of \meta{newenv} + are given to \meta{env} as parameters.\par + The included image is prepended by \meta{begin} and appended by \meta{end}.\par + \refEnv{extikzpicture} is an example application + for \refCom{newtcbexternalizeenvironment}. + +\begin{dispExample} +\newtcbexternalizeenvironment{extabular}{tabular}{}{\par\centering}{\par} + +\begin{extabular}{example_tabular}{|l|p{6cm}|r|}\hline +A & B & C\\\hline +a & This table is externalized as snippet. Obviously, + this only makes sense for highly complex tables. +& b\\\hline +\end{extabular} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-03-11]{renewtcbexternalizeenvironment}{\marg{newenv}\marg{env}\marg{options}\marg{begin}\marg{end}} + Identical to \refCom{newtcbexternalizeenvironment}, but the environment \meta{newenv} + is created by |\renewenvironment| instead of |\newenvironment|. +\end{docCommand} + + +\begin{docCommand}[doc new=2015-03-11]{newtcbexternalizetcolorbox}{\marg{newenv}\marg{env}\marg{options}\marg{begin end options}} + Creates a new environment \meta{newenv} which is based on + \refEnv{tcbexternal}. This enviroment takes \emph{at least} + one optional parameter and one mandatory parameter. + These two parameters are passed to \refEnv{tcbexternal}. + Further, the given \meta{options} are always added to the option list of \refEnv{tcbexternal}.\par + The environment content is externalized and the external snippet is surrounded + by an environment \meta{env}. All further parameters of \meta{newenv} + are given to \meta{env} as parameters. + \textbf{In contrast to \refCom{newtcbexternalizeenvironment}, the + environment \meta{env} is intended to be based on \refEnv{tcolorbox} + or \refEnv{tcblisting}.}\par + The \meta{begin end options} are options for settings the space before + and after the included image using \refKey{/tcb/before}, \refKey{/tcb/before skip}, + \refKey{/tcb/after}, or \refKey{/tcb/after skip}. + \begin{marker} + Use the exact identical values for \refKey{/tcb/before} and \refKey{/tcb/after} + inside \meta{begin end options} as they where used for definition of + \meta{env}! Otherwise, externalized and non-externalized version will have + different spacings. + \end{marker} + \refEnv{extcolorbox} is an example application for\refCom{newtcbexternalizetcolorbox}. + + +\inputpreamblelisting{M} + +{ +\tcbset{external/preamble={\input{tcolorbox_preamble_M.tex}}} +\begin{dispExample} +\begin{exmyownlisting}{example_mylisting}% <- name for the external file + {My externalized example box} +This is my \LaTeX\ box. +\end{exmyownlisting} +\end{dispExample} +} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-03-11]{renewtcbexternalizetcolorbox}{\marg{newenv}\marg{env}\marg{options}\marg{begin end options}} + Identical to \refCom{newtcbexternalizetcolorbox}, but the environment \meta{newenv} + is created by |\renewenvironment| instead of |\newenvironment|. +\end{docCommand} + + +\begin{docCommand}[doc new=2016-07-14]{tcbiffileprocess}{\marg{condition}\marg{source}\marg{md5-file}\marg{target}\marg{true}\marg{false}} + This is a low-level macro which is internally used. + The MD5 digest of a \meta{source} file is compared with + a stored MD5 digest from an auxiliary \meta{md5-file}. + If they are not equal, the auxiliary \meta{md5-file} is updated to + store the current MD5 digest. Further, + \begin{itemize} + \item if \meta{condition} equals |0|, \meta{true} is executed. + \item if \meta{condition} equals |1|:\\ + If the current and stored MD5 digests were different, \meta{true} is executed.\\ + Otherwise, if the \meta{target} file is not existing, \meta{true} is executed.\\ + Otherwise, if the \meta{target} file is older than the \meta{md5-file}, \meta{true} is executed.\\ + Otherwise, \meta{false} is executed. + \item if \meta{condition} equals |2|, \meta{false} is executed. + \end{itemize} + The intended processing purpose of the \meta{true} code is to produce a \meta{target} + file from the given \meta{source} file. +\end{docCommand} + + +\clearpage +\subsection{Troubleshooting and FAQ}\label{subsec:external_troubleshooting} + +\begin{itemize} + +\item\textbf{I use the default settings, but the |external| subdirectory is + not created.}\\ + Depending on operating system and compiler, an |external| subdirectory is + automatically created or not. If not, create such a directory manually + or add the following to your document\footnote{The |shellesc| package + is loaded automatically by the library.}: +\begin{dispListing} +\ShellEscape{mkdir external} +\end{dispListing} +or +\begin{dispListing} +\ShellEscape{mkdir -p external} +\end{dispListing} + If the combination of \refKey{/tcb/external/prefix} and chosen snippet + name points to another subdirectory than |external|, this has to be + adapted. + +\item\textbf{I use the |minted| package and I get a cache directory for + every externalized snippet.}\\ + To avoid this problem, there are several ways. + \begin{itemize} + \item If you do not need |minted| inside the snippet code, you may use + |\usepackage{minted}| \emph{after} \refCom{tcbEXTERNALIZE} + or use \refCom{tcbifexternal} to switch |minted| off for the external code. + If |minted| is already included by another package, add the following to + your preamble: +\begin{dispListing} +\tcbset{external/PassOptionsToPackage={draft}{minted}} +\end{dispListing} + \item If |minted| is needed for the snippet code, caching can be switched + off by adding the following to your preamble: +\begin{dispListing} +\tcbset{external/PassOptionsToPackage={cache=false}{minted}} +\end{dispListing} + Alternatively, the |cachedir| option of |minted| may be used to redirect + the cache. + \end{itemize} + + +\end{itemize} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.filling.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.filling.tex new file mode 100644 index 0000000..449807e --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.filling.tex @@ -0,0 +1,522 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{\tikzname\ Image and Picture Fill Extensions; Auxiliary Macros}\label{sec:tikzimagefilling}% +\tcbset{external/prefix=external/filling_}% +The \mylib{skins} library adds some image and picture fill options to the vast option set of +\tikzname\ \cite{tantau:2015a}. These options can be used in any |tikzpicture|. +For the following options, the \mylib{skins} library has to be loaded +by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{skins} +\end{dispListing} + +See \Vref{sec:skins} for the documentation of all other options of the \mylib{skins} library. + +\subsection{Fill Plain} +\begin{docTikzKey}{fill plain image}{=\meta{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The image is put in the center of the path, but it is not resized to fit into + the path area. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill plain image=goldshade.png] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill plain image*}{=\meta{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The image is put in the center of the path, but it is not resized to fit into + the path area. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill plain image*={width=2.5cm}{goldshade.png}] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill plain picture}{=\meta{graphical code}}{no default, initially unset} + Fills the current path with the given \meta{graphical code}. + The result is put in the center of the path, but it is not resized to fit into + the path area. Note that this is almost identical to the standard |path picture| option. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill plain picture={% + \draw[red!50!yellow,line width=2mm] + (0,0) circle (1cm); + \draw[red,line width=5mm] (-1,-1) -- (1,1); + \draw[red,line width=5mm] (-1,1) -- (1,-1); + }] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\clearpage +\subsection{Fill Stretch} +\begin{docTikzKey}{fill stretch image}{=\meta{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The image is stretched to fill the path area. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[fill stretch image=goldshade.png] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill stretch image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. + The image is stretched to fill the path area. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[fill stretch image*= + {angle=90,origin=c}{goldshade.png}] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill stretch picture}{=\meta{graphical code}}{no default, initially unset} + Fills the current path with the given \meta{graphical code}. + The result is stretched to fill the path area. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill stretch picture={% + \draw[red!50!yellow,line width=2mm] + (0,0) circle (1cm); + \draw[red,line width=5mm] (-1,-1) -- (1,1); + \draw[red,line width=5mm] (-1,1) -- (1,-1); + }] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\clearpage +\subsection{Fill Overzoom} +\begin{docTikzKey}{fill overzoom image}{=\meta{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The image is zoomed such that the path area fills the image. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[fill overzoom image=goldshade.png] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill overzoom image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. + The image is zoomed such that the path area fills the image. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[fill overzoom image*= + {angle=90,origin=c}{goldshade.png}] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill overzoom picture}{=\meta{graphical code}}{no default, initially unset} + Fills the current path with the given \meta{graphical code}. + The result is zoomed such that the path area fills the image. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill overzoom picture={% + \draw[red!50!yellow,line width=2mm] + (0,0) circle (1cm); + \draw[red,line width=5mm] (-1,-1) -- (1,1); + \draw[red,line width=5mm] (-1,1) -- (1,-1); + }] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\clearpage +\subsection{Fill Zoom} +\begin{docTikzKey}{fill zoom image}{=\meta{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The image is zoomed such that it fits inside the path area. + Typically, some parts of the path area will stay unfilled. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill zoom image=goldshade.png] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill zoom image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. + The image is zoomed such that it fits inside the path area. + Typically, some parts of the path area will stay unfilled. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill zoom image*= + {angle=90,origin=c}{goldshade.png}] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill zoom picture}{=\meta{graphical code}}{no default, initially unset} + Fills the current path with the given \meta{graphical code}. + The result is zoomed such that it fits inside the path area. + Typically, some parts of the path area will stay unfilled. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill zoom picture={% + \draw[red!50!yellow,line width=2mm] + (0,0) circle (1cm); + \draw[red,line width=5mm] (-1,-1) -- (1,1); + \draw[red,line width=5mm] (-1,1) -- (1,-1); + }] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\clearpage +\subsection{Fill Shrink} +\begin{docTikzKey}{fill shrink image}{=\meta{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The image is zoomed such that it fits inside the path area, but it never + gets enlarged. + Typically, some parts of the path area will stay unfilled. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill shrink image=goldshade.png] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill shrink image*}{=\meta{file name}}{no default, initially unset} + Fills the current path with an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. + The image is zoomed such that it fits inside the path area, but it never + gets enlarged. + Typically, some parts of the path area will stay unfilled. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill shrink image*={width=1.5cm}{goldshade.png}] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill shrink picture}{=\meta{graphical code}}{no default, initially unset} + Fills the current path with the given \meta{graphical code}. + The result is zoomed such that it fits inside the path area, but it never + gets enlarged. + Typically, some parts of the path area will stay unfilled. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill shrink picture={% + \draw[red!50!yellow,line width=2mm] + (0,0) circle (1cm); + \draw[red,line width=5mm] (-1,-1) -- (1,1); + \draw[red,line width=5mm] (-1,1) -- (1,-1); + }] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\clearpage +\subsection{Fill Tile} +\begin{docTikzKey}{fill tile image}{=\meta{file name}}{no default, initially unset} + Fills the current path with a tile pattern using an external image referenced by \meta{file name}. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[fill tile image=pink_marble.png] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill tile image*}{=\marg{graphics options}\marg{file name}}{no default, initially unset} + Fills the current path with a tile pattern using an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[fill tile image*={width=1cm}{pink_marble.png}] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + +\begin{docTikzKey}{fill tile picture}{=\meta{graphical code}}{no default, initially unset} + Fills the current path with a tile pattern using the given \meta{graphical code}. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill tile picture={% + \draw[red!50!yellow,line width=2mm] + (0,0) circle (1cm); + \draw[red,line width=5mm] (-1,-1) -- (1,1); + \draw[red,line width=5mm] (-1,1) -- (1,-1); + }] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{fill tile picture*}{=\marg{fraction}\marg{graphical code}}{no default, initially unset} + Fills the current path with a tile pattern using the given \meta{graphical code}. + The graphic is resized by \meta{fraction}. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[draw,fill tile picture*={0.25}{% + \draw[red!50!yellow,line width=2mm] + (0,0) circle (1cm); + \draw[red,line width=5mm] (-1,-1) -- (1,1); + \draw[red,line width=5mm] (-1,1) -- (1,-1); + }] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\clearpage +\subsection{Filling Options} +\begin{docTikzKey}{fill image opacity}{=\meta{fraction}}{no default, initially |1.0|} + Sets the fill opacity for the image or picture fill options to the given \meta{fraction}. +\begin{dispExample} +\begin{tikzpicture} +\path[fill stretch image=goldshade.png] (0,0) circle (1cm); +\path[fill=red,fill stretch image=goldshade.png,fill image opacity=0.75] + (2,0) circle (1cm); +\path[fill=red,fill stretch image=goldshade.png,fill image opacity=0.5] + (4,0) circle (1cm); +\path[fill=red,fill stretch image=goldshade.png,fill image opacity=0.25] + (6,0) circle (1cm); +\path[fill=red] (8,0) circle (1cm); +\end{tikzpicture} +\end{dispExample} +\end{docTikzKey} + + +\begin{docTikzKey}{fill image scale}{=\meta{fraction}}{no default, initially |1.0|} + Stretches, zooms, overzooms or shrinks the image or picture to the given \meta{fraction} of the + width and height of the current path. +\begin{dispExample} +\begin{tikzpicture} +\path[draw,fill zoom image=goldshade.png] + (0,0) rectangle +(2,2); + +\path[draw,fill zoom image=goldshade.png,fill image scale=0.75] + (3,0) rectangle +(2,2); + +\path[draw,fill zoom image=goldshade.png,fill image scale=1.5] + (6,0) rectangle +(2,2); +\end{tikzpicture} +\end{dispExample} +\end{docTikzKey} + + +\begin{docTikzKey}[][doc updated=2018-03-18]{fill image options}{=\meta{graphics options}}{no default, initially empty} + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command + for the image fill options. This can be just together with + \refKey{/tikz/fill stretch image}, \refKey{/tikz/fill overzoom image}, \refKey{/tikz/fill zoom image}, + and \refKey{/tikz/fill tile image}. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} +\path[fill image options={width=1cm}, + fill tile image=pink_marble.png] + (2.75,-0.75) -- (3,0) -- (2.75,0.75) + \foreach \w in {45,90,...,315} + { -- (\w:1.5cm) } -- cycle; +\end{tikzpicture} +\end{dispExample*} +\end{docTikzKey} + + +\begin{dispExample*}{sbs,lefthand ratio=0.6,center lower,fonttitle=\bfseries, + title=Image blending example} +\begin{tikzpicture}[every node/.style= + {circle,minimum width=2cm}] +\node[fill stretch image=blueshade.png] + (A) at (120:3cm) {A}; +\node[fill stretch image=goldshade.png] + (B) at (60:3cm) {B}; +\node[ + preaction={fill stretch image=blueshade.png}, + fill stretch image=goldshade.png, + fill image opacity=0.5] (C) {C}; +\path (A) -- node{$+$} (B); +\draw[->,very thick] (A)--(C); +\draw[->,very thick] (B)--(C); +\end{tikzpicture} +\end{dispExample*} + + +\subsection{Straightening of the Arcs} + +\begin{marker} +This patch is considered as an experimental feature. +It changes some of the original \tikzname\ code. This change may break +with future updates of \tikzname. +\end{marker} + +\begin{docCommand}[doc new=2014-05-05]{tcbpatcharcangular}{} +The \tikzname\ package provides a nice |rounded corners| option to replace +all corners by little arcs. |\tcbpatcharcangular| is a patch which +straightens the arcs. To say it more prosaic, the little arcs are replaced +by little straight lines. + +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tikzpicture} + \draw[thick,rounded corners=8pt] + (0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) + -- (0,2) -- (2,2) -- (0,0) -- (2,0); + \tcbpatcharcangular + \draw[thick,rounded corners=8pt,xshift=2.5cm] + (0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) + -- (0,2) -- (2,2) -- (0,0) -- (2,0); +\end{tikzpicture} +\end{dispExample*} + +\end{docCommand} + + +\begin{docCommand}[doc new=2014-05-05]{tcbpatcharcround}{} +This macro reverts \refCom{tcbpatcharcangular}, i.e., the patch from +\refCom{tcbpatcharcangular} is replaced by the original code. +\end{docCommand} + + +\clearpage +\subsection{Extracting Node Dimensions} +The following auxiliary macros are defined by the \mylib{skins} library. +They allow to determine the width and height of an arbitrary \tikzname\ node. +To be more specific, they determine the east-to-west and the north-to-south dimensions +which may be not the maximal dimensions for a non-rectangular node. +Note that the following dimensions are measured exactly including the line width +of the border line. If a new rectangle or node with the same dimensions +and a border is to be drawn, this border width has to be substracted. + +\begin{docCommand}[doc new=2014-09-19]{tcbsettowidthofnode}{\marg{register}\marg{node}} + Sets the east-to-west dimension of the given \meta{node} + to the \TeX\ \meta{register}. +\end{docCommand} + +\begin{docCommand}[doc new=2014-09-19]{tcbsetmacrotowidthofnode}{\marg{macro}\marg{node}} + Defines \meta{macro} as the east-to-west dimension of the given \meta{node}. +\end{docCommand} + +\begin{docCommand}[doc new=2014-09-19]{tcbsettoheightofnode}{\marg{register}\marg{node}} + Sets the north-to-south dimension of the given \meta{node} + to the \TeX\ \meta{register}. +\end{docCommand} + +\begin{docCommand}[doc new=2014-09-19]{tcbsetmacrotoheightofnode}{\marg{macro}\marg{node}} + Defines \meta{macro} as the north-to-south dimension of the given \meta{node}. +\end{docCommand} + +\begin{dispExample} +\begin{tikzpicture} + \node[align=center,draw=red,fill=yellow] (A) {This is my\\example node}; + \tcbsetmacrotowidthofnode\mywidth{A} + \tcbsetmacrotoheightofnode\myheight{A} + \path[fill=blue!25!white] % rectangle widthout border + ([xshift=2mm]A.south east) + rectangle node{Copy} +(\mywidth,\myheight); + \node[draw=blue,fill=blue!25!white, % standard border width 0.4pt + minimum width=\mywidth-0.4pt, % minus width of border + minimum height=\myheight-0.4pt % minus height of border + ] + at ([xshift=5cm]A) {Copy 2}; +\end{tikzpicture} +\end{dispExample} + + +\subsection{Hyper Nodes} +The following auxiliary macro is defined by the \mylib{skins} library. +\enlargethispage*{1cm} + +\begin{docCommand}[doc new=2016-02-03]{tcbhypernode}{\marg{macro}\marg{node}} +% Sets the east-to-west dimension of the given \meta{node} +% to the \TeX\ \meta{register}. + Applies a hyperlink creating \meta{macro} from the package |hyperref| \cite{rahtz:2012a} + to an existing |tikz| \meta{node}. \refCom{tcbhypernode} can only + be used inside a |tikzpicture| environment. + The last argument of the \meta{macro} is to be omitted and should stand + for an object (text) which is to be made a hyperlink. + For example, use |\hyperref[name]| instead of |\hyperref[name]{text}|. + +\begin{dispExample} +% \usepackage{hyperref} +\begin{tikzpicture} + \node[align=center,draw=red,fill=red!5] (mybutton) + {Click me to jump to Section~\ref*{sec:tikzimagefilling}}; + \tcbhypernode{\hyperref[sec:tikzimagefilling]}{mybutton} +\end{tikzpicture} +\end{dispExample} + +\end{docCommand} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.fitting.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.fitting.tex new file mode 100644 index 0000000..8ff8fa0 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.fitting.tex @@ -0,0 +1,540 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{fitting}}\label{sec:fitting}% +\tcbset{external/prefix=external/fitting_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{fitting} +\end{dispListing} + +\subsection{Macros of the Library} + +\begin{docCommand}{tcboxfit}{\oarg{options}\marg{box content}} + Creates a colored box where the given \meta{box content} is fitted to + the width and height of the box. A |tcboxfit| has to have a fixed height. + If no fixed height is given, a square box is constructed. + In principle, most \meta{options} for a \refEnv{tcolorbox} + can be used for |\tcboxfit| with some restrictions. A |\tcboxfit| cannot have + a lower part and cannot be broken. + +\enlargethispage*{1cm} +\begin{dispExample} +% \usepackage{lipsum} \tcbuselibrary{raster} +\tcbset{colframe=blue!50!black,colback=red!10!white, + boxsep=0pt,top=1mm,bottom=1mm,left=1mm,right=1mm, + fit algorithm=hybrid*,raster equal skip=1mm} +\begin{tcbraster}[raster columns=3,raster valign=bottom] + \tcboxfit[height=8cm]{\lipsum[1]} + \tcboxfit[height=4cm]{\lipsum[1]} + \tcboxfit[height=2cm]{\lipsum[1]} +\end{tcbraster} +\begin{tcbraster}[colback=green!10!white,boxsep=1mm] + \tcboxfit[height=4cm]{\lipsum[2]} + \tcboxfit[height=4cm,title=With a title]{\lipsum[2]} +\end{tcbraster} +\end{dispExample} +\end{docCommand} + +\clearpage +\begin{marker} +See \Vref{subsec:xparse_tcboxfit} for more +elaborate methods to create new commands. +\end{marker} + +\enlargethispage*{2cm} + +\begin{docCommand}{newtcboxfit}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} + Creates a new macro \texttt{\textbackslash}\meta{name} based on \refCom{tcboxfit}. + Basically, |\newtcboxfit| operates like |\newcommand|. + The new macro \texttt{\textbackslash}\meta{name} optionally takes \meta{number}$+1$ arguments, where + \meta{default} is the default value for the optional first argument. + The \meta{options} are given to the underlying |tcboxfit|. + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\newtcboxfit{\mybox}{colback=red!5!white, + colframe=red!75!black,width=4cm, + height=1.5cm,halign=center} + +\mybox{This is my own box.}\par +\mybox{This is my own box with more text + to be written.} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\newtcboxfit{\mybox}[2]{colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + boxsep=1mm,left=0mm,right=0mm,top=0mm, + bottom=0mm,halign=center,valign=center, + nobeforeafter,width=#1,height=#2} + +\mybox{2.5cm}{1cm}{First box}% +\mybox{2.5cm}{1cm}{Second box with more text}\\ +\mybox{5cm}{2cm}{Third box with text}\\ +\mybox{5cm}{3cm}{\lipsum[1]} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\newtcboxfit{\mybox}[2][]{colback=red!5!white, + colframe=red!75!black, + width=#2,height=#2/3*2,#1} + +\mybox[colback=yellow]{5cm}% + {\lipsum[2]} +\end{dispExample*} +\end{docCommand} + + +\begin{docCommand}{renewtcboxfit}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} + Operates like \refCom{newtcboxfit}, but based on |\renewcommand| instead of |\newcommand|. + An existing macro is redefined. +\end{docCommand} + +\enlargethispage*{1cm} +\begin{docCommand}{tcbfontsize}{\marg{factor}} + Selects a font size inside a tcolorbox which is scaled with the given + \meta{factor} relative to \docAuxCommand{tcbfitdim}.% + %, see Subsection \ref{subsec:fit} from page \pageref{subsec:fit}. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} +\begin{tcolorbox}[fit basedim=10pt] + {\tcbfontsize{0.25} Very tiny,}\\ + {\tcbfontsize{0.5} Small,}\\ + {\tcbfontsize{1} Normal,}\\ + {\tcbfontsize{2} Large,}\\ + {\tcbfontsize{4} Huge.} +\end{tcolorbox} +\end{dispExample*} +\end{docCommand} + + +\clearpage +\subsection{Option Keys of the Library}\label{subsec:fit} + +The font size for the content of a box with fixed width and fixed height +can be adjusted automatically. This is called the \emph{fitbox capture mode}. +Note that the fit control algorithm +constructs a series of versions for the box and selects the 'best'. +Therefore, the compilation time is quite longer than for a normal box. +The algorithm will fail, if a different selected font size does not change the +overall size of the box content. +The \refCom{tcboxfit} macro uses this algorithm by default. + +\medskip +\begin{marker} + The fit control keys are only applicable to unbreakable boxes without + a lower part. + The box content should not change counters. +\end{marker} +\medskip + +\enlargethispage*{5mm} +\begin{docTcbKey}{fit}{}{style, initially unset} + Sets the \refKey{/tcb/capture} mode to |fitbox|, i.\,e.\ enables the + font size adjustment algorithm. Thereby, a \refEnv{tcolorbox} acts + like \refCom{tcboxfit} where the given \meta{box content} is fitted to + the width and height of the box. Therefore, the box has to have a fixed height. + If no fixed height is given, a square box is constructed. + The font dimension \docAuxCommand{tcbfitdim} can also be used to adjust + the margins of the box since a box with a tiny font may not need large + margins. The number of constructed boxes is saved to the macro \docAuxCommand{tcbfitsteps} + for analysis. + +\begin{dispExample} +% \usepackage{lipsum} +% \tcbuselibrary{skins} +\newtcolorbox{fitting}[2][]{fit,height=#2,boxsep=1pt,valign=center,opacityupper=0.5, + top=0.4\tcbfitdim,bottom=0.4\tcbfitdim,left=0.75\tcbfitdim,right=0.75\tcbfitdim, + enhanced,watermark text={\tcbfitsteps},colframe=blue!75!black,colback=white,#1} + +\begin{fitting}{4cm} +\lipsum[1] +\end{fitting} + +\begin{fitting}{2cm} +\lipsum[2] +\end{fitting} + +\begin{fitting}{1cm} +\lipsum[3] +\end{fitting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{fit to}{=\meta{width} and \meta{height}}{style, initially unset} + Shortcut for using \refKey{/tcb/fit} and setting the \meta{width} and \meta{height} values + separately. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[fit to=3cm and 2cm] + This box content is fitted to the given + dimensions. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{fit to height}{=\meta{height}}{style, initially unset} + Shortcut for using \refKey{/tcb/fit} and setting the \meta{height} value separately. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[fit to height=2cm] + This box content is fitted to the given + height. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{fit basedim}{=\meta{length}}{no default, initially |10pt|} + Sets the starting font dimension for the font size adjustment algorithm + to \meta{length}. The algorithm never enlarges this dimension. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[fit to=4cm and 2cm] + Too few words for the box. +\end{tcolorbox} + +\begin{tcolorbox}[fit to=4cm and 2cm, + fit basedim=50pt] + Enough words for the box. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{fit skip}{=\meta{real value}}{no default, initially |1.2|} + Sets the skip value of the selected font to \meta{real value} times \docAuxCommand{tcbfitdim}. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\tcbset{colback=red!5!white, + colframe=red!75!black,left=1mm, + right=1mm,boxsep=0mm} + +\begin{tcolorbox}[fit to=5cm and 4cm, + fit skip=1.0 ] + \lipsum[1] +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{fit fontsize macros}{}{style, initially unset} + Redefines the standard \LaTeX\ font size macros + |\tiny|, |\scriptsize|, |\footnotesize|, |\small|, |\normalsize|, + |\large|, |\Large|, |\LARGE|, |\huge|, and |\Huge|, + to set font sizes relative to + the current \docAuxCommand{tcbfitdim}. Note that the display skip values for + mathematical formulas are respected by the redefined macros. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} +\tcbset{colback=red!5!white, + colframe=red!75!black,left=1mm, + right=1mm,boxsep=0mm} + +\begin{tcolorbox}[fit to height=4cm] + {\Large\bfseries This text is + not adapted:\par} + \lipsum[2] +\end{tcolorbox} + +\begin{tcolorbox}[fit to height=4cm, + fit fontsize macros ] + {\Large\bfseries This text is adapted:\par} + \lipsum[2] +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{colback=red!5!white, + colframe=red!75!black,left=1mm, + right=1mm,boxsep=0mm} + +\let\realHuge=\Huge + +\begin{tcolorbox}[fit basedim=7pt, + fontupper=\normalsize, + fit fontsize macros] +The relative relative font size macros +are also usable without the +\textit{fit} algorithm.\par +{\Huge Adapted Huge} --- +{\realHuge Original Huge} +\end{tcolorbox} + +\end{dispExample*} + + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{size=fbox,colback=red!5!white, + colframe=red!75!black} + +\tcboxfit[height=5cm, + fit fontsize macros, + fonttitle=\normalsize\bfseries, + title=Adapted title] +{\lipsum[2]} + +\end{dispExample*} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{fit height plus}{=\meta{dimension}}{no default, initially |0pt|} + The box is allowed to enlarge the fixed height up to the given \meta{dimension}, + before a font size fit is applied. An optional \refKey{/tcb/fit width plus} + is tried after the height adaption. +\begin{dispExample} +% \usepackage{lipsum} +\tcbset{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm,bottom=1mm, + right=1mm,boxsep=0mm,width=3cm,height=3cm,nobeforeafter} + +\begin{tcolorbox}[fit] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit,fit height plus=1cm] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit] +\lipsum[2] +\end{tcolorbox} +\begin{tcolorbox}[fit,fit height plus=1cm] +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{fit width plus}{=\meta{dimension}}{no default, initially |0pt|} + The box is allowed to enlarge the fixed width up to the given \meta{dimension}, + before a font size fit is applied. An optional \refKey{/tcb/fit height plus} + is tried before the width adaption. + \enlargethispage*{1cm} +\begin{dispExample} +% \usepackage{lipsum} +\tcbset{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm,bottom=1mm, + right=1mm,boxsep=0mm,width=3cm,height=3cm,nobeforeafter} + +\begin{tcolorbox}[fit] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit,fit width plus=1cm] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[fit] +\lipsum[2] +\end{tcolorbox} +\begin{tcolorbox}[fit,fit width plus=1cm] +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{marker} +Typically but not necessarily, the optional title of a |tcolorbox| is not part of the fit operation. +If a \refKey{/tcb/fit width plus} is applied, the title is also adapted to +the new width. If counters are increased inside the title text, they may be +increased more than one time. +To avoid this, you are encouraged to use \refKey{/tcb/phantom} or \refKey{/tcb/step and label} +to set counters or use automatic numbering, see Subsection \ref{sec:numberedboxes} +from page \pageref{sec:numberedboxes}. +\end{marker} + + +\begin{docTcbKey}{fit width from}{=\meta{min} \texttt{to} \meta{max}}{style, no default} + Sets the box width to \meta{min} and allows the width to grow up to \meta{max}. +\begin{dispExample} +% \usepackage{lipsum} +\tcbset{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm,bottom=1mm, + right=1mm,boxsep=0mm,height=4cm} + +\begin{tcolorbox}[fit,width=\linewidth/2] +\lipsum[2] +\end{tcolorbox}\par +\begin{tcolorbox}[fit width from=\linewidth/2 to \linewidth] +\lipsum[2] +\end{tcolorbox}\par +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{fit height from}{=\meta{min} \texttt{to} \meta{max}}{style, no default} + Sets the box height to \meta{min} and allows the height to grow up to \meta{max}. +\begin{dispExample} +% \usepackage{lipsum} +\newtcolorbox{mybox}{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, + bottom=1mm,right=1mm,boxsep=0mm,width=4cm,nobeforeafter, + fit height from=1cm to 8cm} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} +\begin{mybox} +This is a tcolorbox. This is a tcolorbox. This is a tcolorbox. +\end{mybox} +\begin{mybox} +\lipsum[2] +\end{mybox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{fit algorithm}{=\meta{name}}{no default, initially |fontsize|} +Sets the algorithm for the fitting process \emph{after} optionally width and height +are adapted. + Feasible values for \meta{name} are: + \begin{itemize} + \item\docValue{fontsize} (initial): + The algorithm is a bisection method that adapts the font size until + certain stop conditions are fulfilled. This is the most time-consuming + method but it is robust and gives pleasant results. + \begin{marker} + The used font has to be freely scalable for this method! + Other content than text is not scaled down. + The aspect ratio is fully garanteed. + \end{marker} + \item\docValue{fontsize*}:\tcbdocmarginnote{\tcbdocnew{2014-10-29}} + First, the \docValue{fontsize} algorithm is applied. If the font was scaled down + and the resulting height is too small, the box is squeezed to fit the area. + \begin{marker} + The used font has to be freely scalable for this method! + Other content than text may be slightly rescaled. + The aspect ratio cannot be fully garanteed. + \end{marker} + \item\docValue{areasize}: + The algorithm calculates the area size for the text without scaling the font. + The text box is shaped for the needed aspect ratio in one or two + steps. Finally, it is scaled down with a standard |\resizebox| macro. + \begin{marker} + The used font has not to be scalable. Every box content is scaled down. + The aspect ratio cannot be fully garanteed. + \end{marker} + \item\docValue{areasize*}:\tcbdocmarginnote{\tcbdocnew{2014-10-29}} + The \docValue{areasize} algorithm is applied, but if the content was scaled + down and the resulting height is too small, the box is squeezed to fit the area. + \begin{marker} + The used font has not to be scalable. Every box content is scaled down. + The aspect ratio cannot be fully garanteed. + \end{marker} + \item\docValue{hybrid}: + First, this algorithm estimates the needed font size in one or two steps. + Then an \docValue{areasize} fitting as above is a applied. + \begin{marker} + The used font has to be freely scalable for this method! + Other content than text may be slightly rescaled. + The aspect ratio cannot be fully garanteed. + \end{marker} + \item\docValue{hybrid*}:\tcbdocmarginnote{\tcbdocnew{2014-10-29}} + First, this algorithm estimates the needed font size in one or two steps. + Then an \docValue{areasize*} fitting as above is a applied. + \begin{marker} + The used font has to be freely scalable for this method! + Other content than text may be slightly rescaled. + The aspect ratio cannot be fully garanteed. + \end{marker} + \item\docValue{squeeze}: + The text box is brutally scaled down to fit. + \begin{marker} + The aspect ratio is very likely to be horrible. + You should not use this method for final documents. + \end{marker} +\end{itemize} + + +\end{docTcbKey} +\begin{dispExample} +% \usepackage{lipsum} +\newtcboxfit{mybox}[1]{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, + bottom=1mm,right=1mm,boxsep=0mm,width=3.5cm,height=7cm,nobeforeafter, + before upper=\textcolor{blue}{\rule{5mm}{5mm}}\ , + enhanced,watermark text={\tcbfitsteps}, + fonttitle=\bfseries,adjusted title=#1,fit algorithm=#1} + +\mybox{fontsize}{\lipsum[2]}\hfill +\mybox{hybrid}{\lipsum[2]}\hfill +\mybox{areasize}{\lipsum[2]}\hfill +\mybox{squeeze}{\lipsum[2]} + +Quality \dotfill versus \dotfill Speed +\end{dispExample} + + +\begin{dispExample} +% \usepackage{lipsum} +\newtcboxfit{mybox}[2]{colback=red!5!white,colframe=red!75!black,left=1mm,top=1mm, + size=tight,width=7.2cm,height=5cm,nobeforeafter, + before upper=\textcolor{blue}{\rule{5mm}{5mm}}\ , + enhanced,fonttitle=\bfseries,adjusted title=#2,fit algorithm=#1} + +\mybox{hybrid}{hybrid (possible gap at end)}{\lipsum[1]}\hfill +\mybox{hybrid*}{hybrid* (no gap but possibly squeezed)}{\lipsum[1]} +\end{dispExample} + + +\clearpage +\begin{marker} +The following options set control parameters for the fit algorithm. +Mainly, they apply to the |fontsize| variant, see \refKey{/tcb/fit algorithm}. +The options should be seen as experimental and are likely to change in future versions, +if necessary. +\end{marker} + +\begin{docTcbKey}{fit maxstep}{=\meta{number}}{no default, initially |20|} + Sets the maximal step size for the font size adjustment algorithm. + In normal situations, the algorithm stops before reaching the intial value of 20 steps. + If the box content does not shrink, this value prevents an endless loop. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxfontdiff}{=\meta{dimension}}{no default, initially |0.1pt|} + The algorithm stops, if the font size is determined within a deviation of + \meta{dimension}. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxfontdiffgap}{=\meta{dimension}}{no default, initially |1pt|} + The algorithm stops, if the number of lines is determined and the font size is + determined within a deviation of \meta{dimension}. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxwidthdiff}{=\meta{dimension}}{no default, initially |1pt|} + The algorithm stops, if the (optionally) flexible box width + is determined within a deviation of \meta{dimension}. +\end{docTcbKey} + + +\begin{docTcbKey}{fit maxwidthdiffgap}{=\meta{dimension}}{no default, initially |10pt|} + The algorithm stops, if the number of lines is determined and the (optionally) flexible box width + is determined within a deviation of \meta{dimension}. +\end{docTcbKey} + + +\begin{docTcbKey}{fit warning}{=\meta{value}}{no default, initially |off|} + Typically, the fit control algorithm constructs several auxiliary boxes + to determine the optimal one. If not switched off, the construction of + the auxiliary boxes may produce many |hbox| warnings. This option key + changes the |\hbadness| value. + \begin{itemize} + \item\docValue{off}: Most of |'Underfull \hbox'| and |'Overfull \hbox'| warnings are + switched off (including the ones for the finally used box). + \item\docValue{on}: All warnings for all auxiliary boxes are displayed. + \item\docValue{final}: Only warnings for the finally used box are displayed. + Note that an additional box has to be contructed for theses messages. + \end{itemize} +\end{docTcbKey} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.graphics.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.graphics.tex new file mode 100644 index 0000000..e99c827 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.graphics.tex @@ -0,0 +1,198 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Inclusion of Boxed Image Files}\label{sec:includegraphics}% +\tcbset{external/prefix=external/graphics_}% +The \mylib{skins} library adds some commands to conveniently include +boxed image files. +For the following macros and options, the \mylib{skins} library has to be loaded +by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{skins} +\end{dispListing} + +See \Vref{sec:skins} for the documentation of all other options of the \mylib{skins} library. + +\subsection{Macros} + +\begin{docCommand}[doc new and updated={2014-11-14}{2016-07-13}]{tcbincludegraphics}{\oarg{options}\marg{file name}} + In principle, this macro includes an image file denoted by \meta{file name} + using the standard |\includegraphics| and puts it into a \refEnv{tcolorbox}. + The \meta{options} are |tcolorbox| keys to set up the colored box. + Use \refKey{/tcb/graphics options} to specify options for the underlying + |\includegraphics|. + Some |tcolorbox| option keys are automatically set, namely \refKey{/tcb/enhanced} and + options to center the image inside the box. + + The sizing of the included image is done depending on the following: + \begin{itemize} + \item If a \refKey{/tcb/width} is specified, but no fixed \refKey{/tcb/height}, + the image is sized to fill the inner width of the box. The height of the + box adapts to the image. + \item If a fixed \refKey{/tcb/height} is specified, the image is sized to fill + the fixed inner area of the box. + \item If the \refKey{/tcb/capture} mode \refKey{/tcb/hbox} is specified, + the image is sized according to given |\includegraphics| options only. + The box adapts to the image. + \end{itemize} + +\begin{dispExample} +% \tcbuselibrary{raster} +\begin{tcbraster}[raster columns=3,raster force size=false,size=fbox, + colframe=red!50!black,colback=red!20!black, + fonttitle=\bfseries,center title,drop fuzzy shadow] + \tcbincludegraphics[title=Normal]{goldshade.png} + \tcbincludegraphics[title=Fixed height,height=3cm]{goldshade.png} + \tcbincludegraphics[title=hbox mode,hbox,graphics options={width=3cm}] + {goldshade.png} +\end{tcbraster} +\end{dispExample} + +\clearpage +The auxiliary macro \docAuxCommand{imagename} may be used inside +\refCom{tcbincludegraphics} to display the name of the file. +\docAuxCommand{imagename} is already partially detokenized and is allowed to +contain special characters like the underscore. Note that an appropriate +font is required to display such characters. +%\docAuxCommand{imagepath}% + +\begin{dispExample} +% \tcbuselibrary{raster} +\begin{tcbraster}[size=fbox, + colframe=red!50!black,colback=red!20!black, + fonttitle=\bfseries\ttfamily,center title,drop fuzzy shadow] + \tcbincludegraphics[title=\imagename]{goldshade.png} + \tcbincludegraphics[finish={ + \node[fill=white,fill opacity=0.5,text opacity=1] + at (frame.center) {\bfseries\ttfamily\imagename};}]{blueshade.png} +\end{tcbraster} +\end{dispExample} +\end{docCommand} + +\clearpage +\begin{docCommand}[doc new=2014-11-14]{tcbincludepdf}{\oarg{options}\marg{file name}} +This is a generalized version of \refCom{tcbincludegraphics} which allows +to include a complete PDF file denoted by \meta{file name}. +Every page is boxed into an own \refEnv{tcolorbox} customized by the +given \meta{options}. It is reasonable to put such a series of boxes +inside a \refEnv{tcbraster} for alignment. + +Use \refKey{/tcb/graphics pages} to use a selection of pages instead of +using the whole file. + +The auxiliary macro \docAuxCommand{imagepage} may be used inside +\refCom{tcbincludepdf} to display the current page number. +\end{docCommand} + + +\begin{dispListing} +% \tcbuselibrary{raster} +\begin{tcbraster}[raster columns=3,colframe=blue,colback=white, + colbacktitle=blue!50!white,fonttitle=\small\bfseries\ttfamily, + left=0pt,right=0pt,top=0pt,bottom=0pt,boxsep=0pt,boxrule=0.6pt, + toptitle=1mm,bottomtitle=1mm,drop lifted shadow,center title, + graphics pages={1,...,6},title={\imagename\ [\imagepage]}] +\tcbincludepdf{tcolorbox-example.pdf} +\end{tcbraster} +\end{dispListing} +{\tcbusetemp} + + +\clearpage +\subsection{Option Keys} + +\begin{docTcbKey}[][doc new and updated={2014-11-14}{2018-03-18}]{graphics options}{=\meta{options}}{no default, initially empty} +Used for \refCom{tcbincludegraphics} and \refCom{tcbincludepdf} to +specify |\includegraphics| \meta{options}. + +\begin{dispExample} +% \tcbuselibrary{raster} +\begin{tcbraster}[raster columns=3,size=fbox,raster equal height, + colframe=red!50!black,colback=red!20!black,drop fuzzy shadow] + \tcbincludegraphics{goldshade.png} + \newcommand{\myangle}{angle=20}% + \tcbincludegraphics[graphics options=\myangle]{goldshade.png} + \tcbincludegraphics[graphics options={viewport=0cm 0cm 8cm 4cm,clip}] + {goldshade.png} +\end{tcbraster} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-14]{graphics directory}{=\meta{directory}}{no default, initially empty} +Used for \refCom{tcbincludegraphics} and \refCom{tcbincludepdf} to +specify a file system \meta{directory} where the image files are located. +\begin{dispListing} +\tcbset{ + graphics directory={.}, + graphics directory={examples}, + graphics directory={../../pictures}, +} +\end{dispListing} +\smallskip +\begin{marker} +The |\graphicspath| macro from the |graphics| package is superior to this option. +\refKey{/tcb/graphics directory} may be used especially for +\refCom{tcbincludepdf}. +\end{marker} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{graphics pages}{=\meta{selection}}{no default, initially |1,...,|\cs{pdfpages}} +Used for \refCom{tcbincludepdf} to specify a \meta{selection} of pages to be included. +The largest page number is accessible by \docAuxCommand{pdfpages}. +The \meta{selection} has to be given using the |\foreach| syntax of \tikzname. +\begin{dispListing} +\tcbset{ + graphics pages={1,3,7}, + graphics pages={1,...,10}, + graphics pages={1,3,...,18}, + graphics pages={100,...,\pdfpages}, +} +\end{dispListing} +\end{docTcbKey} + +\clearpage + + +\begin{docTcbKey}[][doc new=2018-03-21]{graphics orientation}{=\meta{orientation}}{no default, initially |as-is|} + Used for \refCom{tcbincludegraphics} and \refCom{tcbincludepdf} to + guarantee a certain \meta{orientation} of the included image. + After all other options for the image are processed, the result is possibly + rotated to be in landscape or portrait mode. + + Feasible values for \meta{orientation} are: + \begin{itemize} + \item\docValue{as-is}: no rotation of the processed image. + \item\docValue{landscape}: + the processed image is possibly rotated by 90 degrees + to ensure that the final width is not smaller than the final height. + \item\docValue{landscape*}: + the processed image is possibly rotated by -90 degrees + to ensure that the final width is not smaller than the final height. + \item\docValue{portrait}: + the processed image is possibly rotated by 90 degrees + to ensure that the final height is not smaller than the final width. + \item\docValue{portrait*}: + the processed image is possibly rotated by -90 degrees + to ensure that the final height is not smaller than the final width. + \end{itemize} + +\begin{dispExample} +% \tcbuselibrary{raster} +\begin{tcbraster}[raster columns=6,size=fbox,raster equal height, + colframe=red!50!black,colback=red!20!black,drop fuzzy shadow] + \tcbincludegraphics{Basilica_5.png} + \tcbincludegraphics[graphics orientation=landscape]{Basilica_5.png} + \tcbincludegraphics[graphics orientation=portrait]{Basilica_5.png} + \tcbincludegraphics[graphics orientation=portrait*]{Basilica_5.png} + \tcbincludegraphics[graphics options={viewport=0cm 0cm 2cm 3cm,clip}] + {goldshade.png} + \tcbincludegraphics[graphics options={viewport=0cm 0cm 2cm 3cm,clip}, + graphics orientation=landscape]{goldshade.png} +\end{tcbraster} +\end{dispExample} + + +\end{docTcbKey} + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.hooks.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.hooks.tex new file mode 100644 index 0000000..47684bf --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.hooks.tex @@ -0,0 +1,577 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{hooks}}\label{sec:hooks}% +\tcbset{external/prefix=external/hooks_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{hooks} +\end{dispListing} + +For the skin related options, the library \mylib{skins} has to be loaded +separately. + + +\subsection{Concept of Hooks} +A hook is a placeholder in some \LaTeX\ code where additional code +can be added. For example, the \LaTeX\ macro |\AtBeginDocument| adds code to a +hook which is placed at the beginning of every document. + +Several option keys of |tcolorbox| allow providing some code which is +added to specific places of a colored box. For example, \refKey{/tcb/before upper} +places code before the content of the upper part. A following usage of this +key overwrites any prior settings. + +The library \mylib{hooks} extends \refKey{/tcb/before upper} and several more +existing keys to 'hookable' versions, e.\,g.\ +\refKey{/tcb/before upper app} and \refKey{/tcb/before upper pre}. +The 'hookable' keys don't overwrite prior settings but either \emph{app}end +or \emph{pre}pend the newly given code to the existing code. + +The general naming convention (with some small exceptions) is: +\begin{itemize} +\item \meta{option key} |app|: works like \meta{option key} but + \emph{app}ends its code to the existing code. +\item \meta{option key} |pre|: works like \meta{option key} but + \emph{pre}pends its code to the existing code. +\end{itemize} +If the original \meta{option key} is used (again), all code will be overwritten. +Therefore, the order of the option key usage is crucial. + + + +\begin{dispExample} +% \usepackage{array,tabularx} +\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}% see tabularx +\tcbset{enhanced,fonttitle=\bfseries\large,fontupper=\normalsize\sffamily, + colback=yellow!10!white,colframe=red!50!black,colbacktitle=Salmon!30!white, + coltitle=black,center title, + tabularx={X||Y|Y|Y|Y||Y},% this sets 'before upper' and 'after upper' + before upper app={Group & One & Two & Three & Four & Sum\\\hline\hline} } + +\begin{tcolorbox}[title=My table] +Red & 1000.00 & 2000.00 & 3000.00 & 4000.00 & 10000.00\\\hline +Green & 2000.00 & 3000.00 & 4000.00 & 5000.00 & 14000.00\\\hline +Blue & 3000.00 & 4000.00 & 5000.00 & 6000.00 & 18000.00\\\hline\hline +Sum & 6000.00 & 9000.00 & 12000.00 & 15000.00 & 42000.00 +\end{tcolorbox} +\end{dispExample} + + + +\clearpage +\subsection{Box Content Additions}\label{subsec:hookscontentadditions} +The following option keys extend the options given in Subsection \ref{subsec:contentadditions} +from page \pageref{subsec:contentadditions}. + +\begin{docTcbKey}{before title app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/before title} \emph{after} the color and font settings + and \emph{before} the content of the title. +\end{docTcbKey} + +\begin{docTcbKey}{before title pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/before title} \emph{after} the color and font settings + and \emph{before} the content of the title. +\end{docTcbKey} + +\begin{docTcbKey}{after title app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/after title} \emph{after} the content of the title. +\end{docTcbKey} + +\begin{docTcbKey}{after title pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/after title} \emph{after} the content of the title. +\end{docTcbKey} + +\begin{docTcbKey}{before upper app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/before upper} \emph{after} the color and font settings + and \emph{before} the content of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{before upper pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/before upper} \emph{after} the color and font settings + and \emph{before} the content of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{after upper app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/after upper} \emph{after} the content of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{after upper pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/after upper} \emph{after} the content of the upper part. +\begin{dispExample} +% \tcbuselibrary{theorems} +\tcbset{ams align,% this sets 'before upper' and 'after upper' + colback=yellow!10!white,colframe=red!50!black, + before upper app={\frac{2}{\sqrt{2}}&=\sqrt{2}.\\}, + after upper pre={\\\sin\left(\frac{\pi}{2}\right)&=1.}, +} + +\begin{tcolorbox} + \sum\limits_{n=1}^{\infty} \frac{1}{n} &= \infty.\\ + \int x^2 ~\text{d}x &= \frac13 x^3 + c. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{before lower app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/before lower} \emph{after} the color and font settings + and \emph{before} the content of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}{before lower pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/before lower} \emph{after} the color and font settings + and \emph{before} the content of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}{after lower app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/after lower} \emph{after} the content of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}{after lower pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/after lower} \emph{after} the content of the lower part. +\end{docTcbKey} + + +\subsection{Embedding into the Surroundings} +The following option keys extend the options given in Subsection \ref{subsec:surroundings} +from page \pageref{subsec:surroundings}. + +\begin{marker} +The 'hookable' versions are usable inside the document. +In the preamble, they can only be used after explicit setting of +\refKey{/tcb/before} and \refKey{/tcb/after} or by e.\,g.\ \refKey{/tcb/parskip}. +\end{marker} + +\begin{docTcbKey}{before app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/before} before the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{before pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/before} before the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{after app}{=\meta{code}}{no default} + Appends the given \meta{code} to \refKey{/tcb/after} after the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{after pre}{=\meta{code}}{no default} + Prepends the given \meta{code} to \refKey{/tcb/after} after the colored box. +\end{docTcbKey} + +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title,before app={The box follows:\\[4pt]}, + after app={This is the end.}] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample} + + +\clearpage +\subsection{Overlays} +The following option keys extend the options given in Subsection \ref{subsec:overlays} +from page \pageref{subsec:overlays}. + +\begin{docTcbKey}{overlay app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay}. + + +\begin{dispExample} +% \usetikzlibrary{patterns} % preamble +% \tcbuselibrary{skins} % preamble +\tcbset{frogbox/.style={enhanced,colback=green!10,colframe=green!65!black, + enlarge top by=5.5mm, + overlay={\foreach \x in {2cm,3.5cm} { + \begin{scope}[shift={([xshift=\x]frame.north west)}] + \path[draw=green!65!black,fill=green!10,line width=1mm] (0,0) arc (0:180:5mm); + \path[fill=black] (-0.2,0) arc (0:180:1mm); + \end{scope}}}]}} +\tcbset{ribbon/.style={overlay app={% + \path[fill=blue!75!white,draw=blue,double=white!85!blue, + preaction={opacity=0.6,fill=blue!75!white}, + line width=0.1mm,double distance=0.2mm, + pattern=fivepointed stars,pattern color=white!75!blue] + ([xshift=-0.2mm,yshift=-1.02cm]frame.north east) + -- ++(-1,1) -- ++(-0.5,0) -- ++(1.5,-1.5) -- cycle;}}} + +\begin{tcolorbox}[frogbox,title=My title] +This is a \textbf{tcolorbox}. +\end{tcolorbox} + +\begin{tcolorbox}[frogbox,ribbon,title=My title] +This is a \textbf{tcolorbox}.\par +Here, we apply a second overlay. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{overlay pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay unbroken}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay unbroken}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay first app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay first}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay first pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay first}. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{overlay middle app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay middle}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay middle pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay middle}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay last app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay last}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay last}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay broken app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay broken}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay broken pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay broken}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken and first app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay unbroken and first}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken and first pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay unbroken and first}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay middle and last app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay middle and last}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay middle and last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay middle and last}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken and last app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay unbroken and last}. +\end{docTcbKey} + +\begin{docTcbKey}{overlay unbroken and last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay unbroken and last}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{overlay first and middle app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/overlay first and middle}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{overlay first and middle pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/overlay first and middle}. +\end{docTcbKey} + + +\clearpage +\subsection{Watermarks} +The following option keys extend the options given in Subsection \ref{subsec:watermarks} +from page \pageref{subsec:watermarks}. + +\begin{marker} +Watermarks are special overlays. The \mylib{hooks} library allows the combination +of several watermarks and overlays. +\end{marker} + +\begin{docTcbKey}{watermark text app}{=\meta{text}}{no default} + Appends a \refKey{/tcb/watermark text} to the colored box. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,watermark graphics=Basilica_5.png, + watermark opacity=0.25, + watermark text app=Basilica,watermark color=Navy + ] +\lipsum[1-2] +\tcblower +This example uses a public domain picture from\\ +\url{http://commons.wikimedia.org/wiki/File:Basilica_5.png} +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{watermark text pre}{=\meta{text}}{no default} + Prepends a \refKey{/tcb/watermark text} to the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{watermark text app on}{=\meta{part} is \meta{text}}{no default} + Appends a \refKey{/tcb/watermark text on} the named \meta{part} of a break sequence. +\end{docTcbKey} + +\begin{docTcbKey}{watermark text pre on}{=\meta{part} is \meta{text}}{no default} + Prepends a \refKey{/tcb/watermark text on} the named \meta{part} of a break sequence. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{watermark graphics app}{=\meta{file name}}{no default} + Appends a \refKey{/tcb/watermark graphics} referenced by \meta{file name} to the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{watermark graphics pre}{=\meta{file name}}{no default} + Prepends a \refKey{/tcb/watermark graphics} referenced by \meta{file name} to the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{watermark graphics app on}{=\meta{part} is \meta{file name}}{no default} + Appends a \refKey{/tcb/watermark graphics on} the named \meta{part} of a break sequence. + The picture is referenced by \meta{file name}. +\end{docTcbKey} + + +\begin{docTcbKey}{watermark graphics pre on}{=\meta{part} is \meta{file name}}{no default} + Prepends a \refKey{/tcb/watermark graphics on} the named \meta{part} of a break sequence. + The picture is referenced by \meta{file name}. +\end{docTcbKey} + + +\begin{docTcbKey}{watermark tikz app}{=\meta{graphical code}}{no default} + Appends a \refKey{/tcb/watermark tikz} with the given |tikz| \meta{graphical code} to the colored box. +\end{docTcbKey} + +\begin{docTcbKey}{watermark tikz pre}{=\meta{graphical code}}{no default} + Prepends a \refKey{/tcb/watermark tikz} with the given |tikz| \meta{graphical code} to the colored box. + +\begin{dispExample} +% \usepackage{tikz} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + watermark color=Navy,watermark opacity=0.25, + smiley/.style={watermark tikz pre={% + \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm); + \fill[red] (45:5mm) circle (1mm); + \fill[red] (135:5mm) circle (1mm); + \draw[line width=1mm,red] (215:5mm) arc (215:325:5mm);}}} + +\begin{tcolorbox}[enhanced,title=My title, watermark text=Watermark, + smiley] +\lipsum[1-2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{watermark tikz app on}{=\meta{part} is \meta{graphical code}}{no default} + Appends a \refKey{/tcb/watermark tikz on} the named \meta{part} of a break sequence. +\end{docTcbKey} + +\begin{docTcbKey}{watermark tikz pre on}{=\meta{part} is \meta{graphical code}}{no default} + Prepends a \refKey{/tcb/watermark tikz on} the named \meta{part} of a break sequence. +\end{docTcbKey} + + +\clearpage +\subsection{Underlays} +The following option keys extend the options given in \Vref{subsec:skinunderlay}. +There are no |app| type keys since underlays are stackable by default. + +\begin{docTcbKey}{underlay pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay unbroken pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay unbroken}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay first pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay first}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay middle pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay middle}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay last}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay boxed title pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay boxed title}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay broken pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay broken}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay unbroken and first pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay unbroken and first}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay middle and last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay middle and last}. +\end{docTcbKey} + +\begin{docTcbKey}{underlay unbroken and last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay unbroken and last}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{underlay first and middle pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/underlay first and middle}. +\end{docTcbKey} + + +\clearpage +\subsection{Finishes} +The following option keys extend the options given in \Vref{subsec:skinfinish}. +There are no |app| type keys since finishes are stackable by default. + +\begin{docTcbKey}{finish pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish}. +\end{docTcbKey} + +\begin{docTcbKey}{finish unbroken pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish unbroken}. +\end{docTcbKey} + +\begin{docTcbKey}{finish first pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish first}. +\end{docTcbKey} + +\begin{docTcbKey}{finish middle pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish middle}. +\end{docTcbKey} + +\begin{docTcbKey}{finish last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish last}. +\end{docTcbKey} + +\begin{docTcbKey}{finish broken pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish broken}. +\end{docTcbKey} + +\begin{docTcbKey}{finish unbroken and first pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish unbroken and first}. +\end{docTcbKey} + +\begin{docTcbKey}{finish middle and last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish middle and last}. +\end{docTcbKey} + +\begin{docTcbKey}{finish unbroken and last pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish unbroken and last}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{finish first and middle pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/finish first and middle}. +\end{docTcbKey} + + +\subsection{Skin Code} +The following option keys extend the options given in Subsection \ref{subsec:addcodeoptions} +from page \pageref{subsec:addcodeoptions}. + +\begin{docTcbKey}{frame code app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/frame code}. +\end{docTcbKey} + +\begin{docTcbKey}{frame code pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/frame code}. +\end{docTcbKey} + +\begin{docTcbKey}{interior titled code app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/interior titled code}. +\begin{dispExample} +\begin{tcolorbox}[title=My title,enhanced,colframe=Navy, + frame code app={\draw[yellow,line width=1cm] ( + frame.south west)--(frame.north east);}, + interior titled code app={\draw[red,line width=1cm] + (frame.north west)--(frame.south east);}, + ] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{interior titled code pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/interior titled code}. +\end{docTcbKey} + +\begin{docTcbKey}{interior code app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/interior code}. +\end{docTcbKey} + +\begin{docTcbKey}{interior code pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/interior code}. +\end{docTcbKey} + +\begin{docTcbKey}{segmentation code app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/segmentation code}. +\end{docTcbKey} + +\begin{docTcbKey}{segmentation code pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/segmentation code}. +\end{docTcbKey} + + +\begin{docTcbKey}{title code app}{=\meta{graphical code}}{no default} + Appends the given \meta{graphical code} to \refKey{/tcb/title code}. +\end{docTcbKey} + +\begin{docTcbKey}{title code pre}{=\meta{graphical code}}{no default} + Prepends the given \meta{graphical code} to \refKey{/tcb/title code}. +\end{docTcbKey} + + +\clearpage +\subsection{Extras} +The following option keys extend the options given in \Vref{subsec:extras}. +There are no |app| type keys since extras are stackable by default. + +\begin{docTcbKey}[][doc new=2015-07-16]{extras pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras unbroken pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras unbroken}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras first pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras first}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras middle pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras middle}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras last pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras last}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras broken pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras broken}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras unbroken and first pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras unbroken and first}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras middle and last pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras middle and last}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras unbroken and last pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras unbroken and last}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2015-07-16]{extras first and middle pre}{=\marg{options}}{no default} + Prepends the given \meta{options} to \refKey{/tcb/extras first and middle}. +\end{docTcbKey} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.index.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.index.tex new file mode 100644 index 0000000..8348f4a --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.index.tex @@ -0,0 +1,3 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\printindex diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.initoptions.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.initoptions.tex new file mode 100644 index 0000000..b11f076 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.initoptions.tex @@ -0,0 +1,345 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Initialization Option Keys}\label{sec:initkeys}% +\tcbset{external/prefix=external/initoptions_}% +The \emph{initialization} options are only applicable for the generation +of new environments and commands based on |tcolorbox| and friends. +Particularly, they can be used for +\begin{itemize} +\item\refCom{newtcolorbox}, +\item\refCom{newtcbox}, +\item\refCom{newtcblisting}, +\item\refCom{newtcbinputlisting}, +\item\refCom{newtcbtheorem}, and +\item\refCom{newtcboxfit}. +\end{itemize} + +\bigskip +\begin{marker} +Typically, these options may generate counters and alike. +It is \textbf{strongly} recommended that you use initialization options inside +the preamble only. Otherwise, you may get trouble when using \LaTeX's |\include| features. +\end{marker} + + +\subsection{Numbered Boxes}\label{sec:numberedboxes} +Counters assigned using the initialization options are administrated +automatically. Especially, they are increased for each new box. +Independent from the real counter name, the counter value can be +referenced by \docAuxCommand{thetcbcounter}, e.\,g.\ inside the title of +the box. The real counter name is stored inside \docAuxCommand{tcbcounter}. + +\begin{newTcbKey}{auto counter}{}{no value, initially unset} +Creates a new counter automatically. +With \refKey{/tcb/new/number format} and +\refKey{/tcb/new/number within}, the appearance and behavior of the counter +can be changed. The counter value is referenced by \docAuxCommand{thetcbcounter}. + +\inputpreamblelisting{A} + +\begin{dispExample} +\begin{pabox}[label={myautocounter}]{Title with number} +This box is automatically numbered with \ref{myautocounter} on page +\pageref{myautocounter}. Inside the box, the \thetcbcounter\ can +also be referenced by |\thetcbcounter|. +The real counter name is \texttt{\tcbcounter}. +\end{pabox} +\end{dispExample} +\end{newTcbKey} + +\clearpage +\begin{newTcbKey}{use counter from}{=\meta{tcolorbox}}{no default, initially unset} +Here, a counter from another \meta{tcolorbox} is reused. +Note that the settings for \refKey{/tcb/new/number format} and +\refKey{/tcb/new/number within} are inherited and cannot be changed. +The counter value is referenced by \docAuxCommand{thetcbcounter}. + +\begin{dispExample} +\newtcolorbox[use counter from=pabox]{mybox}[2][]{% +colback=blue!5!white,colframe=blue!75!black,fonttitle=\bfseries, +title=Some Box \thetcbcounter: #2,#1} + +\begin{mybox}[label={myusecounterfrom}]{Title with continued number} +This box is automatically numbered with \ref{myusecounterfrom} on page +\pageref{myusecounterfrom}. Inside the box, the \thetcbcounter\ can +also be referenced by |\thetcbcounter|. +The real counter name is \texttt{\tcbcounter}. +\end{mybox} +\end{dispExample} +\end{newTcbKey} + + +\begin{newTcbKey}{use counter}{=\meta{counter}}{no default, initially unset} +Here, an ordinary existing \LaTeX\ \meta{counter} is used for numbering. +With \refKey{/tcb/new/number format} and +\refKey{/tcb/new/number within}, the appearance and behavior of the counter +can be changed. The counter value is referenced by \docAuxCommand{thetcbcounter}. + +\begin{dispExample} +% \newcounter{myexample}% preamble +\newtcolorbox[use counter=myexample,number format=\Alph]{mybox}[2][]{% +colback=green!5!white,colframe=green!55!black,fonttitle=\bfseries, +title=Some Box \thetcbcounter: #2,#1} + +\begin{mybox}[label={myusecounter}]{Title with \LaTeX\ number} +This box is automatically numbered with \ref{myusecounter} on page +\pageref{myusecounter}. Inside the box, the \thetcbcounter\ can +also be referenced by |\thetcbcounter|. +The real counter name is \texttt{\tcbcounter}. +\end{mybox} +\end{dispExample} +\end{newTcbKey} + + +\begin{newTcbKey}[][doc new=2014-09-19]{use counter*}{=\meta{counter}}{no default, initially unset} +An existing \LaTeX\ \meta{counter} is used for numbering. In contrast to +\refKey{/tcb/new/use counter}, the options \refKey{/tcb/new/number format} and +\refKey{/tcb/new/number within} are ignored. Use this for counters which +are already configured outside the |tcolorbox| package, e.\,g.\ the standard +|figure| counter. +\end{newTcbKey} + + +\begin{newTcbKey}{no counter}{}{no value, initially set} +The created boxes are not numbered. This is the default. The option may +be used to overrule a previous option. +\end{newTcbKey} + +\clearpage +\begin{newTcbKey}{number within}{=\meta{counter}}{no default, initially unset} +The automatic counter is set to zero, if \meta{counter} is increased. +Additionally, during output, the value of \meta{counter} is prepended to the value of +the automatic counter.\par +To prepend the automatic counter with the chapter number and to reset it +with every new chapter, use: +\begin{dispListing} +number within=chapter +\end{dispListing} +See \refKey{/tcb/new/use counter} for a complete example. +\end{newTcbKey} + + +\begin{newTcbKey}{number format}{=\meta{format macro}}{no default, initially \texttt{\textbackslash arabic}} +Declares the format of the automatic counter. The \meta{format macro} can be +any valid \LaTeX\ number formatting macro like |\arabic|, |\roman|, etc.\par +To display the counter value in large roman numbers, use: +\begin{dispListing} +number format=\Roman +\end{dispListing} +See \refKey{/tcb/new/auto counter} for a complete example. +\end{newTcbKey} + + +\begin{newTcbKey}{number freestyle}{=\meta{code}}{no default, initially unset} +Allows advanced control over the complete number format. This option overrules +the format given by \refKey{/tcb/new/number within} and \refKey{/tcb/new/number format}. +Nevertheless, you can combine it with \refKey{/tcb/new/number within} to +get the desired reset property.\par +The \meta{code} is some formatting code which should contain |\tcbcounter| to +reference the automated counter. Since this \meta{code} is expanded, you have +to secure each macro with |\noexpand| with \emph{exception} of |\tcbcounter|. + +\inputpreamblelisting{H} + +\begin{dispExample} +\begin{phbox}[label={myfreestyle}]{Title with freestyle number} +This box is automatically numbered with \ref{myfreestyle} on page +\pageref{myfreestyle}. Inside the box, the \thetcbcounter\ can +also be referenced by |\thetcbcounter|. +The real counter name is \texttt{\tcbcounter}. +\end{phbox} +\end{dispExample} +\end{newTcbKey} + +\clearpage +\begin{marker} +The following options \refKey{/tcb/new/crefname} and \refKey{/tcb/new/Crefname} +need to be set inside the preamble. +\end{marker} + +\begin{newTcbKey}[][doc updated=2014-12-01]{crefname}{=\marg{singular}\marg{plural}}{no default, initially unset} + This option key can be used only in conjunction with the |cleveref| package + \cite{cubitt:2013a} which has to be loaded separately. + It creates a cross-reference type for the new |tcolorbox|'es, where the + lowercase \meta{singular} and \meta{plural} forms of the cross-reference are given. + This type is the environment or macro name and \refKey{/tcb/label type} is set automatically. + See \refKey{/tcb/label type} and \cite{cubitt:2013a} for more information. +\end{newTcbKey} + + +\begin{newTcbKey}[][doc updated=2014-12-01]{Crefname}{=\marg{singular}\marg{plural}}{no default, initially unset} + This option key can be used only in conjunction with the |cleveref| package + \cite{cubitt:2013a} which has to be loaded separately. + It creates a cross-reference type for the new |tcolorbox|'es, where the + uppercase \meta{singular} and \meta{plural} forms of the cross-reference are given. + This type is the environment or macro name and \refKey{/tcb/label type} is set automatically. + See \refKey{/tcb/label type} and \cite{cubitt:2013a} for more information. +\end{newTcbKey} + +\inputpreamblelisting{I} +\begin{dispExample} +% \usepackage{varioref} +% \usepackage{cleveref} +\begin{mybluebox}[label={myreference}]{My title} +This is an example. +\end{mybluebox} + +\Cref{myreference}, \cref{myreference}.\\ +\Cpageref{myreference}, \cpageref{myreference}.\\ +\nameCref{myreference}, \namecref{myreference}.\\ +\labelcref{myreference}, \labelcpageref{myreference}.\\ +With \texttt{varioref}:\\ +\Vref{myreference}, \vref{myreference}.\\ +\Vref*{myreference}, \vref*{myreference}. +\end{dispExample} + +\clearpage + +\begin{newTcbKey}[][doc new=2014-09-19]{blend into}{=\meta{name}}{style, no default, initially unset} +Used to comfortably blend into an existing schema of naming and numbering for +some selected cases. For example, a |tcolorbox| can be used to display +and entitle an image pretending to be a standard |figure| environment. +Here, \refKey{/tcb/title} is used instead of the standard |\caption| +and \refKey{/tcb/list text} can be used instead of the optional parameter +of the standard |\caption|. + +Feasible values for \meta{name} are: +\begin{itemize} +\item\docValue{figures}: blend into the standard |figure| environment. +\item\docValue{tables}: blend into the standard |table| environment. +\item\docValue{listings}: blend into the standard |lstlisting| environment + of the package |listings| \cite{heinz:2015a}. + \begin{marker} + Note that |blend into=listings| can only be used in the document content + or, preferably, inside a |\AtBeginDocument| clause! Using it without + |\AtBeginDocument| inside the preamble does not work since the |listings| + packages initializes its counter also inside |\AtBeginDocument|. + \end{marker} +\end{itemize} +\end{newTcbKey} + +\enlargethispage*{5cm} +\begin{dispListing} +\begin{figure}[htb] + \centering\includegraphics[height=4cm]{lichtspiel.jpg} + \caption{A standard figure} +\end{figure} + +\newtcolorbox[blend into=figures]{myfigure}[2][]{float=htb,capture=hbox, + title={#2},every float=\centering,#1} + +\begin{myfigure}{A tcolorbox figure} + \includegraphics[height=4cm]{lichtspiel.jpg} +\end{myfigure} +\end{dispListing} +{\tcbusetemp} + + + +\clearpage +\begin{docTcbKey}[][doc new=2015-03-13]{blend before title}{=\meta{value}}{no default, initially \docValue{colon}} + This option formats the title output of \refKey{/tcb/new/blend into}. + Note that this is a common |tcolorbox| option which should be set + globally or in the normal option part of \refCom{newtcolorbox}. + +Feasible values for \meta{value} are: +\begin{itemize} +\item\docValue{colon}: use name/number plus colon. +\item\docValue{dash}: use name/number plus dash. +\item\docValue{colon hang}: use name/number plus colon with hanging indent. +\item\docValue{dash hang}: use name/number plus dash with hanging indent. +\end{itemize} + +\begin{dispListing} +\newtcolorbox[blend into=figures]{myfigure}[2][]{float=htb,capture=hbox, + blend before title=dash hang,title={#2},every float=\centering,#1} + +\begin{myfigure}{A tcolorbox figure with quite a long title} + \includegraphics[height=5cm]{lichtspiel.jpg} +\end{myfigure} +\end{dispListing} +{\tcbusetemp} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2015-03-13]{blend before title code}{=\meta{code}}{no default} + This option formats the title output of \refKey{/tcb/new/blend into}. + The \meta{code} takes one parameter, the name/number. + Use this, if \refKey{/tcb/blend before title} is not flexible enough. + +\begin{dispListing} +\newtcolorbox[blend into=figures]{myfigure}[2][]{float=htb,capture=hbox, + blend before title code={\fbox{##1}\ },title={#2},every float=\centering,#1} + +\begin{myfigure}{A tcolorbox figure} + \includegraphics[height=6cm]{lichtspiel.jpg} +\end{myfigure} +\end{dispListing} +{\tcbusetemp} +\end{docTcbKey} + + + +\clearpage +\subsection{Lists of \texttt{tcolorbox}es}\label{sec:listsof} +For figures and tables, \LaTeX\ provides the |\listoffigures| and +|\listoftables| commands to create lists of these numbered entities. +Also, a |tcolorbox| can be part of such a kind of list. +\begin{enumerate} +\item Assign a list \meta{name} by the \emph{initialization} option + \refKey{/tcb/new/list inside}. +\item Optionally, a new \meta{type} for list entries may be assigned + by the \emph{initialization} option \refKey{/tcb/new/list type}. +\item List entries a generated automatically within each new |tcolorbox| + using the above initialization. + \begin{itemize} + \item If \refKey{/tcb/list entry} is set, the entry is generated with it. + \item Otherwise, if \refKey{/tcb/title} is set, the entry is generated with it. + \item Otherwise, the entry is generated with the current number and the environment name. + \end{itemize} +\item The generated list is displayed by \refCom{tcblistof}. +\end{enumerate} + +\begin{newTcbKey}{list inside}{=\meta{name}}{no default, initially unset} +Assigns a list or contents file to the generated |tcolorbox|es. +Entries to this list are saved to a file which gets the \meta{name} as +file name extension. The list is referenced by this name in +\refCom{tcblistof}. +For example: +\begin{dispListing} +list inside=exam +\end{dispListing} +See Section \ref{listing:exercises} from page \pageref{listing:exercises} +for a complete example. +\end{newTcbKey} + + +\begin{newTcbKey}{list type}{=\meta{type}}{no default, initially |tcolorbox|} +Optionally, some \meta{type} can be assigned to the list entries. +For a new \meta{type}, a macro |\l@|\meta{type} has to exist which controls +the format of the list entry. The default type is defined by +\begin{dispListing} +\newcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{2.3em}} +\end{dispListing} +This is identical to the |\l@section| setting of \LaTeX. |\l@tcolorbox| can +be redefined or a new \meta{type} can be assigned. +\end{newTcbKey} + + +\begin{docCommand}{tcblistof}{\oarg{macro}\marg{name}\marg{title text}} +Displays the generated list of |tcolorbox|es with the given \meta{name}. +The heading is generated by \meta{macro}\marg{title text} where \texttt{\textbackslash section} +is the default setting for \meta{macro}.\par +To display the list inside a subsection, use for example: +\begin{dispListing} +\tcblistof[\subsection]{exam}{List of Exercises} +\end{dispListing} +The result of the example is found as Subsection \ref{listofexercises} on +page \pageref{listofexercises}. +\begin{marker} +The core of the list is generated by |\@starttoc|\marg{name} which +can be wrapped into an own macro. +\end{marker} +\end{docCommand} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.intro.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.intro.tex new file mode 100644 index 0000000..32a2884 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.intro.tex @@ -0,0 +1,225 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Introduction}% +\tcbset{external/prefix=external/intro_}% +The package originates from the first edition of my book +\flqq{\citetitle{sturm:2014g}\frqq~\cite{sturm:2014g} +in about 2006. +For the \LaTeX\ examples and tutorials given there, I wanted to have +accentuated and colored boxes to display source code and +compiled text in combination. +Since, in my opinion, this type of boxes is also quite useful to highlight definitions +and theorems, I applied them for my lecture notes in +mathematics \cite{sturm:2007b,sturm:2008b,sturm:2010a} +as well. +With this package, you are invited to apply these boxes for similar projects. + +Starting with version 2.00, for all internal calculations +$\varepsilon$-\TeX\ \cite{breitenlohner:1998a} expressions are used +in replacement of the package |calc|. +The breaking news for version 2.00 is the support for breakable boxes. +This new feature allows new applications of the package without +affecting the core package too much if you do not need boxes to break automatically. +With version 2.20, the often requested 'side by side' mode for listings has been added. +With version 3.00, boxed titles are introduced together with improved +customization options for overlays, underlays, finishes, and own code extensions. + +\begin{tcolorbox}[enhanced,boxrule=0mm,boxsep=0mm,frame hidden,interior hidden, + left=0mm,right=0mm,top=0mm,bottom=0mm,watermark opacity=0.25,watermark zoom=1.2,before=\par\smallskip, + clip watermark=false, + watermark tikz={% + \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm); + \fill[red] (45:5mm) circle (1mm); + \fill[red] (135:5mm) circle (1mm); + \draw[line width=1mm,red] (215:5mm) arc (215:325:5mm);}] +Since the first public release in 2011, I received a lot of feedback from all over the world. +I want to thank all who wrote me for supporting this package by sending bug reports +and ideas for new or better features. +\end{tcolorbox} + + +\subsection{Installation} +Typically, |tcolorbox| will be installed as part of a major \LaTeX\ distribution +and there is nothing special to do for a user. + +If you intend to make a local +installation \emph{by hand}, see the |README| file of the |tcolorbox| package +for some hints. The short story is: you have to install not only +|tcolorbox.sty|, but also all |*.code.tex| files in the local |texmf| tree. + + +\subsection{Loading the Package} +The base package |tcolorbox| loads the packages +|pgf| \cite{tantau:2015a}, |verbatim| \cite{schoepf:2001a}, +|etoolbox| \cite{lehmann:2015a}, +and |environ| \cite{robertson:2014a}. +|tcolorbox| itself is loaded in the usual manner in the preamble: +\begin{dispListing} +\usepackage{tcolorbox} +\end{dispListing} +The package takes option keys in the key-value syntax. +Alternatively, you may use these keys later in the preamble with +\refCom{tcbuselibrary} (see there). +For example, the key to typeset listings is: +\begin{dispListing} +\usepackage[listings]{tcolorbox} +\end{dispListing} + + +\clearpage +\subsection{Libraries}\label{sec:bibliothek} +The base package |tcolorbox| is extendable by program libraries. +This is done by using option keys while loading the package or inside +the preamble by applying the following macro with the same set of keys. + +\begin{docCommand}{tcbuselibrary}{\marg{key list}} + Loads the libraries given by the \meta{key list}. +\begin{dispListing} +\tcbuselibrary{listings,theorems} +\end{dispListing} +\end{docCommand} + +The following keys are used inside |\tcbuselibrary| respectively +|\usepackage| without the key tree path |/tcb/library/|. + +\begin{docTcbKey}[library]{skins}{}{\mylib{skins}} + Loads the package |tikz| \cite{tantau:2015a} and provides additional + styles (skins) for the appearance of the colored boxes; see + Section~\ref{sec:skins} from page~\pageref{sec:skins}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{vignette}{}{\mylib{vignette}} + Provides code for more ornamental; see + Section~\ref{sec:vignette} from page~\pageref{sec:vignette}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{raster}{}{\mylib{raster}} + Provides additional macros and options for typesetting multiple + boxes arranged in a kind of raster; + see Section~\ref{sec:raster} from page~\pageref{sec:raster}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{listings}{}{\mylib{listings}} + Loads the package |listings| \cite{heinz:2015a} and provides additional + macros for typesetting listings which are described in Section~\ref{sec:listings} + from page~\pageref{sec:listings}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{listingsutf8}{}{\mylib{listingsutf8}} + Loads the packages |listings| \cite{heinz:2015a} and + |listingsutf8| \cite{oberdiek:2011a} for UTF-8 support. + This is a variant of the library \mylib{listings} + and is described in Section \ref{sec:listings} + from page~\pageref{sec:listings}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{minted}{}{\mylib{minted}} + Loads the package |minted| \cite{poore:2015a} to + typeset listings with the |Pygments| \cite{pygments:2013} tool, + also see \Vref{sec:listings}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{theorems}{}{\mylib{theorems}} + Provides additional + macros for typesetting theorems which are described in Section~\ref{sec:theorems} + from page~\pageref{sec:theorems}. +\end{docTcbKey} + + +\begin{docTcbKey}[library]{breakable}{}{\mylib{breakable}} + Provides support for automatic box breaking from one page to another; + see \Fullref{sec:breakable}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{magazine}{}{\mylib{magazine}} + Provides support for storing broken box parts to be used later or + in interchanged order, \Fullref{sec:magazine}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{poster}{}{\mylib{poster}} + Provides support for creating posters, \Fullref{sec:poster}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{fitting}{}{\mylib{fitting}} + Provides support for font size adaption of the box content to + the box dimensions; + see Section~\ref{sec:fitting} from page~\pageref{sec:fitting}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{hooks}{}{\mylib{hooks}} + Extends several option keys to 'hookable' keys; + see Section~\ref{sec:hooks} from page~\pageref{sec:hooks}. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[library]{xparse}{}{\mylib{xparse}} + Provides document command production with |xparse| for |tcolorbox|; + see Section~\ref{sec:xparse} from page~\pageref{sec:xparse}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{external}{}{\mylib{external}} + Provides externalization support for stand-alone document snippets, + see \Fullref{sec:external}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{documentation}{}{\mylib{documentation}} + Provides additional + macros for typesetting \LaTeX\ documentations + which are described in Section~\ref{sec:documentation} + from page~\pageref{sec:documentation}. +\end{docTcbKey} + +\begin{docTcbKey}[library]{many}{}{style, no value} + Loads the libraries \mylib{skins}, \mylib{breakable}, \mylib{raster}, \mylib{hooks}, + \mylib{theorems}, \mylib{fitting}, and \mylib{xparse}. + Use this shortcut, if you want to use all features of |tcolorbox| + with exception of typesetting listings and using + the specialized \mylib{documentation} library. +\end{docTcbKey} + +\begin{docTcbKey}[library]{most}{}{style, no value} + Loads all libraries except \mylib{minted} and \mylib{documentation}. + Use this shortcut, if you want to use all features of |tcolorbox| + with exception of using the |minted| package and using + the specialized \mylib{documentation} library. +\end{docTcbKey} + +\begin{docTcbKey}[library]{all}{}{style, no value} + Loads all libraries. Use this shortcut only, if you indend to use the + \mylib{documentation} library. +\end{docTcbKey} + + +\begin{extcolorbox}[runs=2]{intro_packageoverview} + [title={Package \texttt{tcolorbox}},center title,fonttitle=\bfseries,arc=0pt, + colback=red!10!white, + interior style={fill tile image*={width=2cm}{pink_marble.png},fill image opacity=0.5}, + colframe=red!50!black] + \begin{tcolorbox}[beamer,adjusted title=Basic Features,colframe=blue!50!black,colback=blue!10!white] + Base package + \end{tcolorbox} + \begin{tcbitemize}[raster columns=3,raster before skip=2mm,raster after skip=0pt, + raster equal height,beamer,colframe=blue!50!black,colback=blue!10!white] + \tcbitem[adjusted title=Advanced Features] + \mylib{breakable}\\ + \mylib{external}\\ + \mylib{fitting}\\ + \mylib{hooks}\\ + \mylib{magazine}\\ + \mylib{poster}\\ + \mylib{raster}\\ + \mylib{skins}\\ + \mylib{theorems}\\ + \mylib{vignette}\\ + \mylib{xparse} + \tcbitem[adjusted title=Advanced Listings] + \mylib{listings}\\ + \mylib{listingsutf8} + \tcblower + \mylib{minted} + \tcbitem[adjusted title=Documentation] + \mylib{documentation} + \end{tcbitemize} +\end{extcolorbox} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.listings.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.listings.tex new file mode 100644 index 0000000..4595965 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.listings.tex @@ -0,0 +1,1565 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Libraries + \mylib{listings}, + \mylib{listingsutf8}, and + \mylib{minted}}\label{sec:listings}% +\tcbset{external/prefix=external/listings_}% + +\subsection{Loading the Libraries} +In contrast to other |tcolorbox| libraries, the libraries +\mylib{listings}, \mylib{listingsutf8}, and \mylib{minted} are concurrent in the sense that +they all do the same thing, i.\,e.\ displaying listings with or without typesetting +the listing in \LaTeX\ parallel. +The difference is the underlying \LaTeX\ package which does the core job for +displaying a listing. So, typically, you need just \emph{one} of these +libraries. If you do not have a clue, which one of them you should use, +you should take \mylib{listingsutf8}. + +\begin{marker} +The order in which the libraries are included influences the default settings and +the \refKey{/tcb/reset} behavior. The settings of a later loaded library overwrite +the settings of a previous loaded library. A library is never loaded twice. +\end{marker} + + +\subsubsection{Loading \mylib{listings}} +This library uses the package |listings| \cite{heinz:2015a} to typeset +listings. It is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{listings} +\end{dispListing} +This also loads the package |listings| \cite{heinz:2015a}. + +The \refKey{/tcb/listing engine} is set to |listings| by the library. +To reactivate this setting, if overwritten by other libraries, use +\begin{dispListing} +\tcbset{listing engine=listings} +\end{dispListing} + +\subsubsection{Loading \mylib{listingsutf8}} +\begin{marker} +This library is not needed (and troublesome) when using Xe\LaTeX. +\end{marker} +To extend |listings| for UTF-8 encoded sources, you can use the support from +the package |listingsutf8| \cite{oberdiek:2011a} by loading the library +variant \mylib{listingsutf8}. +\begin{dispListing} +\tcbuselibrary{listingsutf8} +\tcbset{listing utf8=latin1}% optional; 'latin1' is the default. +\end{dispListing} +This also loads the library \mylib{listings} +and the packages |listings| \cite{heinz:2015a} +and |listingsutf8| \cite{oberdiek:2011a}. + +The \refKey{/tcb/listing engine} is set to |listings| by the library. +To reactivate this setting, if overwritten by other libraries, use +\begin{dispListing} +\tcbset{listing engine=listings} +\end{dispListing} + + +\clearpage +\subsubsection{Loading \mylib{minted}} +This library uses the package |minted| \cite{poore:2015a} to typeset +listings. It is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{minted} +\end{dispListing} +This also loads the package |minted| \cite{poore:2015a}. + +\begin{marker} +The |minted| package uses the external tool |Pygments| \cite{pygments:2013} +to apply syntax highlighting. It has to be installed and set up, before the +library can be used, see \cite{poore:2015a} and \cite{pygments:2013}. +The |tcolorbox| library \mylib{minted} does not work, if the package +|minted| \cite{poore:2015a} does not work. +\end{marker} + +The \refKey{/tcb/listing engine} is set to |minted| by the library. +To reactivate this setting, if overwritten by other libraries, use +\begin{dispListing} +\tcbset{listing engine=minted} +\end{dispListing} + + +\subsection{Common Macros of the Libraries} + +\begin{docEnvironment}{tcblisting}{\marg{options}} + Creates a colored box based on a \refEnv{tcolorbox}. + Controlled by the given \meta{options}, the + environment content is typeset normally and/or as a listing. + Furthermore, the \meta{options} control appearance and functions of + the |tcolorbox|. + By default, the listing is interpreted as a \LaTeX\ listing. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black} +This is a \LaTeX\ example which displays the text as source code +and in compiled form. +\end{tcblisting} +\end{dispExample} + +\clearpage + +\begin{dispExample} +% \tcbuselibrary{listings} /or/ \tcbuselibrary{listingsutf8} +\begin{tcblisting}{colback=yellow!5,colframe=yellow!50!black,listing only, + title=This is source code in another language (XML), fonttitle=\bfseries, + listing options={language=XML,columns=fullflexible,keywordstyle=\color{red}}} +<?xml version="1.0"?> +<project name="Package tcolorbox" default="documentation" basedir="."> + <description> + Apache Ant build file (http://ant.apache.org/) + </description> +</project> +\end{tcblisting} +\end{dispExample} + +\enlargethispage*{10mm} + +\begin{dispExample} +% \tcbuselibrary{minted} +\begin{tcblisting}{colback=yellow!5,colframe=yellow!50!black,listing only, + title=This is source code in another language (XML), fonttitle=\bfseries, + listing engine=minted,minted language=xml} +<?xml version="1.0"?> +<project name="Package tcolorbox" default="documentation" basedir="."> + <description> + Apache Ant build file (http://ant.apache.org/) + </description> +</project> +\end{tcblisting} +\end{dispExample} + + + +\begin{dispExample} +% This box is as wide as needed (listing only !!) +% \tcbuselibrary{skins} +\begin{tcblisting}{colback=green!5!white,colframe=green!50!black,listing only, + hbox,enhanced,drop fuzzy shadow,before=\begin{center},after=\end{center}} +\begin{tikzpicture} +\fill[red] (0,0) rectangle (1,1); +\end{tikzpicture} +\end{tcblisting} +\end{dispExample} +\end{docEnvironment} + + +\clearpage +\begin{docEnvironment}{tcboutputlisting}{} + Saves the environment content to a file which is named by the key value of + |listing file|. Later, this file can be loaded by + |\tcbinputlisting| or |\tcbuselistingtext| or |\tcbuselistinglisting|. +\begin{dispListing} +\begin{tcboutputlisting} +This \textbf{text} is written to a standardized file for later usage. +\end{tcboutputlisting} +\end{dispListing} +\end{docEnvironment} + + +\begin{docCommand}{tcbinputlisting}{\marg{options}} + Creates a colored boxed based on a |tcolorbox|. The text content is read + from a file named by the key value of |listing file|. Apart from that, + the function is equal to that of \refEnv{tcblisting}. +\begin{dispExample} +\tcbinputlisting{colback=red!5!white,colframe=red!75!black,text only} +\tcbinputlisting{colback=green!5,colframe=green!75!black,listing only} +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{tcbuselistingtext}{} + Loads text from a file named by the key value of |listing file|. +\begin{dispExample} +\tcbuselistingtext +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{tcbuselistinglisting}{} + Typesets text as listing from a file named by the key value of |listing file|. +\begin{dispExample} +\tcbuselistinglisting +\end{dispExample} +\end{docCommand} + +%\enlargethispage*{5mm} +\begin{docCommand}{tcbusetemplisting}{} + Typesets text as listing from a temporary file which was written by + \refEnv{tcbwritetemp}. +\end{docCommand} + + +\clearpage +\begin{marker} +See \Vref{subsec:xparse_listing} and \Vref{subsec:xparse_inputlisting} for more +elaborate methods to create new environments and commands. +\end{marker} +\begin{marker} +If a new sort of |tcblisting| environments should be created with +one optional argument only, one is highly recommended to use +\refCom{DeclareTCBListing} or \refCom{NewTCBListing} +instead of \refCom{newtcblisting} to +avoid content scanning problems. +\end{marker} + +\begin{docCommand}{newtcblisting}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} + Creates a new environment \meta{name} based on \refEnv{tcblisting}. + Basically, |\newtcblisting| operates like |\newenvironment|. This means, + the new environment \meta{name} optionally takes \meta{number} arguments, where + \meta{default} is the default value for the optional first argument. + The \meta{options} are given to the underlying |tcblisting|. + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically. + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. +\begin{dispExample*}{sbs,lefthand ratio=0.5} +\newtcblisting{mybox}{% + colback=red!5!white, + colframe=red!75!black} + +\begin{mybox} +This is my \LaTeX\ box. +\end{mybox} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.5} +\newtcblisting{mybox}[1]{% + colback=red!5!white, + colframe=red!75!black, + fonttitle=\bfseries, + title=#1} + +\begin{mybox}{Listing Box} +This is my \LaTeX\ box. +\end{mybox} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.5} +\newtcblisting{mybox}[2][]{% + colback=red!5!white, + colframe=red!75!black, + fonttitle=\bfseries, + title=#2,#1} + +\begin{mybox}[listing only] + {Listing Box} +This is my \LaTeX\ box. +\end{mybox} +\bigskip + +\begin{mybox}[listing side text] + {Listing Box} +This is my +\LaTeX\ box. +\end{mybox} +\end{dispExample*} + +\clearpage +\inputpreamblelisting{C} + +\begin{dispExample*}{sbs,lefthand ratio=0.5} +\begin{mycbox}{Listing Box} +This is my \LaTeX\ box. +\end{mycbox} +\end{dispExample*} +\end{docCommand} + + +%\enlargethispage*{1cm} +\begin{docCommand}{renewtcblisting}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} + Operates like \refCom{newtcblisting}, but based on |\renewenvironment| instead of |\newenvironment|. + An existing environment is redefined. +\end{docCommand} + + +\clearpage +\begin{docCommand}{newtcbinputlisting}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} + Creates a new macro \texttt{\textbackslash}\meta{name} based on \refCom{tcbinputlisting}. + Basically, |\newtcbinputlisting| operates like |\newcommand|. + The new macro \texttt{\textbackslash}\meta{name} optionally takes \meta{number} arguments, where + \meta{default} is the default value for the optional first argument. + The \meta{options} are given to the underlying |tcbinputlisting|. + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}. + +\begin{dispExample} +\newtcbinputlisting[use counter from=mycbox]{\mylisting}[2][]{% + listing file={#2}, + title=Listing (\thetcbcounter) of \texttt{#2}, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + listing only,breakable,#1} + +\mylisting[before upper=\textit{This is the included file content:}] + {\jobname.tcbtemp} +\end{dispExample} + +\begin{dispExample} +\newtcbinputlisting[use counter from=mycbox]{\mylisting}[2][]{% + listing engine=minted,minted language=latex,minted style=colorful, + listing file={#2}, + title=Listing (\thetcbcounter) of \texttt{#2}, + colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + listing only,breakable,#1} + +\mylisting[before upper=\textit{This is the included file content:}] + {\jobname.tcbtemp} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}{renewtcbinputlisting}{\oarg{init options}\brackets{\texttt{\textbackslash}\rmfamily\meta{name}}\oarg{number}\oarg{default}\marg{options}} + Operates like \refCom{newtcbinputlisting}, but based on |\renewcommand| instead of |\newcommand|. + An existing macro is redefined. +\end{docCommand} + + +\clearpage +\subsection{Option Keys of the \mylib{listings} Library}\label{sec:speclistingkeys} + +\begin{docTcbKey}{listing options}{=\meta{key list}}{no default, initially |style=tcblatex|} + Sets the options from the package |listings| \cite{heinz:2015a} + which are used during typesetting of the listing. + For \LaTeX\ listings, there is a predefined |listings| style named |tcblatex| + which can be used. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!25,left=6mm, +listing options={style=tcblatex,numbers=left,numberstyle=\tiny\color{red!75!black}}} +This is a \LaTeX\ example which displays the text as source code +and in compiled form. Additionally, we use line numbers here. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{no listing options}{}{no value, initially unset} + Abbreviation for |listing options={}|. + This removes all options for the |listings| package. + This includes the |tcblisting| standard style |tcblatex| and the encoding presets. + Use this option, if you want to set the |listings| options outside of |tcblisting|, e.\,g.\ globally in + the preamble. +\begin{dispExample} +\begin{tcblisting}{no listing options} +All \textit{listings} options removed. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{listing style}{=\meta{style}}{no default, initially |tcblatex|} + Abbreviation for |listing options={style=...}|. This key sets a \meta{style} + for the |listings| package, see \cite{heinz:2015a}. + For \LaTeX, there is a predefined style named |tcblatex|. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black, +listing style=tcblatex} +Here, we use the predefined style. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{listing inputencoding}{=\meta{encoding}}{no default, initially \texttt{\cs inputencodingname}} + Sets the input encoding value for the predefined listing style |tcblatex| + and |tcbdocumentation| from the library \mylib{documentation}. + The initial value is derived from the package |inputenc| if used. +\end{docTcbKey} + +\begin{docTcbKey}{listing remove caption}{\colOpt{=true\textbar false}}{default |true|, initially |true|} +If set to |true|, some part of the caption building code of the |listings| package +is silenced to prevent some unwanted interaction with the |hyperref| package resulting +in additional vertical space. +If set to |false|, the |listings| package code is kept unchanged. +Note that listings outside \refEnv{tcblisting} and +\refCom{tcbinputlisting} are always processed normally. +Typically, a user is not expected to use this key at all. +\end{docTcbKey} + +\begin{docTcbKey}{every listing line}{=\meta{text}}{no default, initially unset/empty} +Inserts some \meta{text} to the begin of every line of a listing. +Note that this a hack of the |listings| package code. This may become unusable +or superfluous in the future. +\begin{dispExample} +\newtcblisting{commandshell}{colback=black,colupper=white,colframe=yellow!75!black, + listing only,listing options={style=tcblatex,language=sh}, + every listing line={\textcolor{red}{\small\ttfamily\bfseries root \$> }}} + +\begin{commandshell} +ls -al +cd /usr/lib +\end{commandshell} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{every listing line*}{=\meta{text}}{no default, initially unset/empty} +Identical to \refKey{/tcb/every listing line} plus additional enlargement +of \refKey{/tcb/rightupper} by the width of \meta{text}. Therefore, this +option has to be used after the geometry settings are done. +This option is intended to be used in conjunction with \refKey{/tcb/hbox}. + +\begin{dispExample} +\newtcblisting{commandshell}{colback=black,colupper=white,colframe=yellow!75!black, + listing only,listing options={style=tcblatex,language=sh},hbox, + every listing line*={\textcolor{red}{\small\ttfamily\bfseries root \$> }}} + +\begin{commandshell} +ls -al +cd /usr/lib +\end{commandshell} +\end{dispExample} +\end{docTcbKey} + +See further options in \Vref{sec:commonlistingkeys}. + +\begin{marker} +For an combined example of using |\lstinline| inside a |tcolorbox|, see +\refCom{DeclareTotalTCBox}. +\end{marker} + +\clearpage +\subsection{Option Keys of the \mylib{listingsutf8} Library} +\begin{marker} +The \mylib{listingsutf8} library is not needed (and troublesome) when using Xe\LaTeX. +\end{marker} + +The \mylib{listingsutf8} library is an extension of the +\mylib{listings} library, so +all options from \Vref{sec:speclistingkeys} are applicable. + +\begin{docTcbKey}{listing utf8}{=\meta{one-byte-encoding}}{style, no default, initially |latin1|} + Abbreviation for using \refKey{/tcb/listing inputencoding} + together with UTF-8 support from the package |listingsutf8| \cite{oberdiek:2011a}. + This option is available only for the library variant \mylib{listingsutf8}. + The \meta{one-byte-encoding} is one of + the applicable encodings from \cite{oberdiek:2011a}, e.\,g.\ |latin1| + which is the default.\par + Be aware that this means restriction to this specific \meta{one-byte-encoding}: + e.\,g.\ |latin1| comprises umlauts and other accented characters, but not + the Euro sign. If you want to use the |listings| package \emph{and} \flqq real\frqq\ + UTF-8 source code, then do \emph{not} use \mylib{listingsutf8} but \mylib{listings} + with + \refKey{/tcb/listing inputencoding}|=utf8| + \emph{and} with specific manual hacks for specific UTF-8-encoded characters. + +\end{docTcbKey} + +See further options in \Vref{sec:commonlistingkeys}. + +\clearpage +\subsection{Option Keys of the \mylib{minted} Library} + +\begin{docTcbKey}{minted language}{=\meta{programming language}}{no default, initially |latex|} +Sets a \meta{programming language} known to |Pygments| \cite{pygments:2013}. +\begin{dispExample} +\begin{tcblisting}{listing engine=minted,minted style=trac, + minted language=java, + colback=red!5!white,colframe=red!75!black,listing only} + public class HelloWorld { + // A 'Hello World' in Java + public static void main(String[] args) { + System.out.println("Hello World!"); + } + } +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc updated={2017-07-05}]{minted options}{=\meta{key list}}{no default, initially + |tabsize=2,fontsize=\textbackslash small,|\linebreak|breaklines,autogobble|} + Sets the options from the package |minted| \cite{poore:2015a} + which are used during typesetting of the listing. +\begin{dispExample} +% \tcbuselibrary{skins} +\newtcblisting{myjava}{listing engine=minted, + minted style=colorful, + minted language=java, + minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=3mm}, + colback=blue!5!white,colframe=blue!75!black,listing only, + left=5mm,enhanced, + overlay={\begin{tcbclipinterior}\fill[red!20!blue!20!white] (frame.south west) + rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}}} + +\begin{myjava} + public class HelloWorld { + // A 'Hello World' in Java + public static void main(String[] args) { + System.out.println("Hello World!"); + } + } +\end{myjava} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{minted style}{=\meta{style}}{no default, initially unset} +Sets a \meta{style} known to |Pygments| \cite{pygments:2013}. This is +independent from \refKey{/tcb/minted options}. Note that styles are always +applied globally; all following examples will be set in the given \meta{style} +until a new style is set. Also note that +setting |\usemintedstyle|\marg{style} only once per document is more economic, if +all styles in a document are the same. +For examples of different styles, see +\refKey{/tcb/minted language} and \refKey{/tcb/minted options}. +\end{docTcbKey} + +See further options in \Vref{sec:commonlistingkeys}. + + +\clearpage +\subsection{Common Option Keys of all Libraries}\label{sec:commonlistingkeys} +For the \meta{options} in \refEnv{tcblisting} respectively \refCom{tcbinputlisting} +the following |pgf| keys can be applied. The key tree path |/tcb/| is not to +be used inside these macros. + +\begin{docTcbKey}{listing engine}{=\meta{engine}}{no default} + Sets the \meta{engine} which typesets the listings. Feasible values are + \begin{itemize} + \item\docValue{listings}, if library \mylib{listings} or + \mylib{listingsutf8} is loaded. + \item\docValue{minted}, if library \mylib{minted} is loaded. + \end{itemize} +\end{docTcbKey} + +\begin{docTcbKey}{listing file}{=\meta{file name}}{no default, initially \cs{jobname.listing}} + Sets the \meta{file name} of the file which is used to save listings. +\end{docTcbKey} + + +\begin{docTcbKey}{listing and text}{}{no value, initially set} + Typesets the environment content as listing in the upper part and + as compiled text in the lower part. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing and text} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{text and listing}{}{no value} + Typesets the environment content as compiled text in the upper part and + as listing in the lower part. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text and listing} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{listing only}{}{no value} + Typesets the environment content as listing. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing only} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{text only}{}{no value} + Typesets the environment content as compiled text. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text only} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{comment}{=\meta{text}}{no default, initially empty} + Records a comment with \meta{text} as content. The comment is displayed + e.\,g.\ in conjunction with \refKey{/tcb/listing and comment} + and \refKey{/tcb/comment and listing}. +\begin{dispExample} +\begin{tcblisting}{comment={This comment is really only a comment}, + colback=red!5!white,colframe=red!75!black} +This is a \textbf{tcolorbox}. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-17]{comment only}{}{no value} + Typesets the environment content with the comment text. +\begin{dispExample} +\begin{tcblisting}{comment only, + comment={This is a comment.}, + colback=red!5!white,colframe=red!75!black} +This is a \textbf{tcolorbox}. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{image comment}{=\marg{options}\marg{filename}}{style, no default, initially unset} + Uses an image denoted by \meta{filename} as \textit{comment} for the listing. + The image is included by the standard |\includegraphics| macro with + given \meta{options}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side comment, + image comment={width=2.5cm}{example-image-a.pdf},center lower} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2014-11-14]{tcbimage comment}{=\meta{filename}}{style, no default, initially unset} + Uses an image denoted by \meta{filename} as \textit{comment} for the listing. + The image is included by the \refCom{tcbincludegraphics} macro. + The inclusion can be customized by \refKey{/tcb/comment style}. + \begin{marker} + The library \mylib{skins} is needed to apply this option. + \end{marker} + \medskip +\begin{dispExample} +% \tcbuselibrary{skins} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side comment, + righthand width=3cm,lower separated=false, + tcbimage comment={example-image-a.pdf}, + comment style={size=fbox,colframe=blue,colback=blue!50,sharp corners, + drop fuzzy shadow}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + +%\enlargethispage*{1cm} + +\begin{docTcbKey}[][doc new=2014-11-14]{pdf comment}{\colOpt{=\meta{filename}}}{style, default listing file, initially unset} + Uses a PDF file denoted by \meta{filename} as \textit{comment} for the listing. + The image is included by \refCom{tcbincludepdf} inside a \refEnv{tcbraster}. + The inclusion can be customized by \refKey{/tcb/comment style}. + \begin{marker} + The libraries \mylib{skins} and \mylib{raster} are needed to apply this option. + \end{marker} + \medskip +\begin{dispExample} +% \tcbuselibrary{skins,raster} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing and comment, + righthand width=3cm,lower separated=false,middle=1mm, + pdf comment={tcolorbox-example.pdf}, + comment style={raster columns=3,graphics pages={1,2,3}, + colframe=blue,drop fuzzy shadow}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + +\clearpage + + +\begin{docTcbKey}[][doc new=2014-11-14]{pdf extension}{=\meta{extension}}{no default, initially |pdf|} + Sets the PDF file name extension for \refKey{/tcb/pdf comment} to \meta{extension}. + Note that \meta{extension} always overwrites any actual extension given + inside \refKey{/tcb/pdf comment}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-14]{comment style}{=\meta{options}}{no default, initially empty} + Sets the \meta{options} for \refKey{/tcb/tcbimage comment} and \refKey{/tcb/pdf comment}. + These are |tcolorbox| options to customize the colored box drawn around the + image(s), also image options encapsulated by \refKey{/tcb/graphics options}, + and \refEnv{tcbraster} options for \refKey{/tcb/pdf comment}. +\end{docTcbKey} + + +\begin{docTcbKey}{listing and comment}{}{no value} + Typesets the environment content as listing in the upper part and + a given comment in the lower part. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing and comment, + comment={This is my comment. It may contain line breaks.\par + It can even use the environment content + \flqq\ignorespaces\tcbuselistingtext\unskip\frqq}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + +\enlargethispage*{10mm} +\begin{docTcbKey}{comment and listing}{}{no value} + Typesets a given comment in the upper part and + the environment content as listing in the lower part. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment and listing, +comment={This is my comment.}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{listing side text}{}{style, no value} +Typesets the environment content side by side as listing in the left (upper) +part and as compiled text in the right (lower) part. +This is a shortcut for setting \refKey{/tcb/listing and text} and \refKey{/tcb/sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side text} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\begin{marker} +Note that |sidebyside=false| has to be added, if the setting of +\refKey{/tcb/listing side text} is to be annihilated. +\end{marker} +\end{docTcbKey} + + +\begin{docTcbKey}{text side listing}{}{style, no value} +Typesets the environment content side by side as compiled text in the left (upper) +part and as listing in the right (lower) part. +This is a shortcut for setting \refKey{/tcb/text and listing} and \refKey{/tcb/sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text side listing} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{listing outside text}{}{no value} +Typesets the environment content side by side as listing in a |tcolorbox| +and as compiled text outside the box in the right part of the page. +Nevertheless, the outside text is treated as \emph{lower} part of the +|tcolorbox| and can be formatted with all lower part options. +The space partitioning is done with the side by side options from +\Fullref{sec:sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing outside text} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{text outside listing}{}{no value} +Typesets the environment content side by side as listing in a |tcolorbox| +and as compiled text outside the box in the left part of the page. +Nevertheless, the outside text is treated as \emph{lower} part of the +|tcolorbox| and can be formatted with all lower part options. +The space partitioning is done with the side by side options from +\Fullref{sec:sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text outside listing} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{listing side comment}{}{style, no value} +Typesets the environment content side by side as listing in the left (upper) +part and a given comment in the right (lower) part. +This is a shortcut for setting \refKey{/tcb/listing and comment} and \refKey{/tcb/sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side comment, + righthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{comment side listing}{}{style, no value} +Typesets the environment content side by side with a given comment in the left (upper) +part and as listing in the right (lower) part. +This is a shortcut for setting \refKey{/tcb/comment and listing} and \refKey{/tcb/sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment side listing, + lefthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\enlargethispage*{2cm} +\begin{docTcbKey}{listing outside comment}{}{no value} +Typesets the environment content side by side as listing in a |tcolorbox| +and a given comment outside the box in the right part of the page. +Nevertheless, the outside text is treated as \emph{lower} part of the +|tcolorbox| and can be formatted with all lower part options. +The space partitioning is done with the side by side options from +\Fullref{sec:sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing outside comment, + righthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{comment outside listing}{}{no value} +Typesets the environment content side by side as listing in a |tcolorbox| +and a given comment outside the box in the left part of the page. +Nevertheless, the outside text is treated as \emph{lower} part of the +|tcolorbox| and can be formatted with all lower part options. +The space partitioning is done with the side by side options from +\Fullref{sec:sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment outside listing, + lefthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{listing above text}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and as compiled text outside and below the box. + The outside text is treated as \emph{lower} part of the + |tcolorbox| and can be formatted with all lower part options. + The distance between box and text is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing above text} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-07]{listing above* text}{}{no value} + Widely equal to \refKey{/tcb/listing above text}, but the outside text is + not formatted with the lower part options. + Also, it is not put into a minipage and it may span several pages. + The distance between box and text is controlled by \refKey{/tcb/after}. +\end{docTcbKey} + + +\begin{docTcbKey}{text above listing}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and as compiled text outside and above the box. + The outside text is treated as \emph{lower} part of the + |tcolorbox| and can be formatted with all lower part options. + The distance between box and text is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text above listing} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-07]{text above* listing}{}{no value} + Widely equal to \refKey{/tcb/text above listing}, but the outside text is + not formatted with the lower part options. + Also, it is not put into a minipage and it may span several pages. + The distance between box and text is controlled by \refKey{/tcb/before}. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{listing above comment}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and a given comment outside and below the box. + The outside text is treated as \emph{lower} part of the + |tcolorbox| and can be formatted with all lower part options. + The distance between box and comment is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing above comment, + center lower,image comment={width=3cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-07]{listing above* comment}{}{no value} + Widely equal to \refKey{/tcb/listing above comment}, but the outside comment is + not formatted with the lower part options. + Also, it is not put into a minipage and it may span several pages. + The distance between box and comment is controlled by \refKey{/tcb/after}. +\end{docTcbKey} + + +\begin{docTcbKey}{comment above listing}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and a given comment outside and above the box. + The outside text is treated as \emph{lower} part of the + |tcolorbox| and can be formatted with all lower part options. + The distance between box and comment is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment above listing, + center lower,image comment={width=3cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-07]{comment above* listing}{}{no value} + Widely equal to \refKey{/tcb/comment above listing}, but the outside comment is + not formatted with the lower part options. + Also, it is not put into a minipage and it may span several pages. + The distance between box and comment is controlled by \refKey{/tcb/before}. +\end{docTcbKey} + + +\clearpage +\subsection{Option Keys for Processing and Full Document Examples}\label{sec:proclistingkeys} +A complete \LaTeX\ document including |\documentclass|, |\begin{document}| +and |\end{document}| cannot be processed directly by |tcolorbox|. +It always has to be compiled separately. There are two methods supported +by the package to process and display such a full document example: +\begin{itemize} +\item Prepare and compile the example document independent from your main + document. The source file and the resulting PDF file can be included + into the main document afterwards. This is the most economic way since + the example document can be left untouched after the example is complete. +\item The other possibility is to compile the example on the fly while + the main document is compiled. This way has some charm, because the + example can be edited inside the main document. But be aware that the + compilation of the example is issued on every run of the main document. + Also, there are fewer degrees of freedom how the example is compiled. +\end{itemize} + +For both methods, the resulting example PDF file can be included +as a \refKey{/tcb/pdf comment}. + +The following example shows how to apply the first method. +There already is a file |tcolorbox-example.tex| and a PDF file +|tcolorbox-example.pdf|. Both of them are input partly by the following: + +\begin{dispListing} +% \tcbuselibrary{breakable,skins,raster} +\tcbinputlisting{ + enhanced jigsaw,breakable,pad at break*=2mm,height fixed for=first and middle, + lower separated=false, + leftlower=0pt,rightlower=0pt,middle=0pt, + colframe=red!50!black,colback=yellow!10!white, + listing and comment, + listing file={tcolorbox-example}, + listing options= + {style=tcblatex,texcsstyle=*\color{red!70!black},firstline=20,lastline=85}, + after upper={\par\bigskip\texttt{\ldots}\par}, + pdf comment, + comment style={drop lifted shadow,graphics pages={1,...,4}}, +} +\end{dispListing} +{\tcbusetemp} + + +\clearpage + + +\begin{docTcbKey}[][doc new=2014-11-14]{no process}{}{no default} + Removes all processing commands if set before. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{process code}{=\meta{code}}{no default, initially empty} + Adds \meta{code} which is executed during \refCom{tcbinputlisting} + and \refEnv{tcblisting}. At the time of executing the given \meta{code}, + the listing is already written to \refKey{/tcb/listing file}, but + the colored box is not constructed yet. + Its intended use is to process the listing somehow before displaying. + The processing result can be used inside a \refKey{/tcb/comment}. + Several \refKey{/tcb/process code} options can be given which are + processed in the given order. + Typically, \meta{code} is added by using the following styles + \refKey{/tcb/run system command}, \refKey{/tcb/run pdflatex}, etc. +\end{docTcbKey} + +\begin{marker} +To use the further options, the compiler has to be called with the +|-shell-escape| permission to authorize potentially dangerous system calls. +Be warned that this is a security risk. Anyway, it's more economic to +compile examples independent from the main document and to include them as +shown in the previous pages. +\end{marker} + +\begin{docTcbKey}[][doc new=2014-11-14]{run system command}{=\meta{system command}}{style, no default, initially unset} +Runs a \meta{system command}, if the document is compiled with the +|-shell-escape| permission. +The current listing file can be accessed as |\filename@area\filename@base\filename@ext|. +This \meta{system command} is added to \refKey{/tcb/process code}. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new and updated={2014-11-14}{2016-05-27}]{compilable listing}{}{style, no default} + Sets \refKey{/tcb/listing file} to |\jobname|\texttt{-listing-}\meta{counter}. + \begin{marker} + The default \refKey{/tcb/listing file} setting cannot be used to compile + a listing, since the base name equals the |\jobname| and the included PDF + files should be unique. + Therefore, to use \refKey{/tcb/run pdflatex} etc., the \refKey{/tcb/listing file} + has to be set to a unique value. + One may use \refKey{/tcb/compilable listing} for this purpose. + \end{marker} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-14]{run pdflatex}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |pdflatex| compilation of the listing with the given \meta{arguments}. +\begin{itemize} +\item The main document has to be compiled with the |-shell-escape| permission. +\item The \refKey{/tcb/listing file} has to be unique for the listing. +\item If the listing has to be compiled twice, add |run pdflatex| two times to + the option list. +\end{itemize} + +\begin{dispListing*}{breakable,enhanced,pad at break*=2mm,before upper=,after skip=3mm} +\begin{tcblisting}{enhanced jigsaw,lower separated=false, + leftlower=0pt,rightlower=0pt, + colframe=red!50!black,colback=yellow!10!white, + listing options={style=tcblatex,texcsstyle=*\color{red!70!black}}, + listing and comment, + pdf comment,freeze pdf, + compilable listing, + run pdflatex +} +\documentclass{beamer} +\usetheme{Warsaw} +\begin{document} +\begin{frame}{Beamer example} + \begin{block}{Hello World} + \begin{itemize}[<+->] + \item One + \item Two + \end{itemize} + \end{block} + + \begin{alertblock}{Integral} + \begin{equation} + \visible<3->{\int\limits_1^x \frac{1}{t}~dt} + \visible<4->{ = \ln(x).} + \end{equation} + \end{alertblock} +\end{frame} +\end{document} +\end{tcblisting} +\end{dispListing*} +{\tcbusetemp} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2014-11-14]{run xelatex}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |xelatex| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{run lualatex}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |lualatex| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{run makeindex}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |makeindex| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{run bibtex}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |bibtex| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{run biber}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |biber| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{run arara}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues an |arara| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{run latex}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |latex| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-14]{run dvips}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |dvips| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\enlargethispage*{1cm} +\begin{docTcbKey}[][doc new=2014-11-14]{run ps2pdf}{\colOpt{=\meta{arguments}}}{style, no default, initially unset} +Issues a |ps2pdf| compilation of the listing with the given \meta{arguments}. +\end{docTcbKey} + +\begin{dispListing*}{breakable,enhanced,pad at break*=2mm,before upper=,after skip=3mm} +\begin{tcblisting}{enhanced jigsaw, + title={PSTricks with pdflatex},fonttitle=\bfseries, + colframe=red!50!black,colback=yellow!10!white, + listing options={style=tcblatex,texcsstyle=*\color{red!70!black}}, + lower separated=false,middle=0pt, + listing side comment,righthand width=4cm, + compilable listing, + run latex,run dvips,run ps2pdf, + pdf comment,freeze pdf, + comment style={raster columns=1, + graphics options={viewport=0.5in 7.7in 3.5in 10.5in,clip}}, +} +\documentclass{article} +\usepackage{pstricks,multido} +\begin{document} +\psset{unit=3}% +\multido{\nHue=0.01+0.01}{100}{% +\definecolor{MyColor}{hsb}{\nHue,1,1}% +\pscircle[linewidth=0.01,linecolor=MyColor]{\nHue}} +\end{document} +\end{tcblisting} +\end{dispListing*} +{\tcbusetemp} + +\clearpage + +\begin{marker} + For most applications, you will like to add \refKey{/tcb/freeze pdf} as option, + since the included |pdf| file is only refreshed, if the source for this file + has changed. +\end{marker} + +\begin{docTcbKey}[][doc new=2016-07-14]{freeze file}{=\meta{file}}{no default, initially unset} + Observes some \meta{file}, usually the final file produced by \refKey{/tcb/process code}, + \refKey{/tcb/run system command}, \refKey{/tcb/run pdflatex}, etc. + If the MD5 checksum of the current \refKey{/tcb/listing file} is unchanged + and \meta{file} exists, the processing is skipped and + the \meta{file} is kept (frozen). + Typically, the style \refKey{/tcb/freeze pdf} can be used for + convenience. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-07-14]{freeze none}{}{no default, initially set} + Freeze no file and always execute the given process commands. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-07-14]{freeze extension}{=\meta{text}}{style, no default} + Calls \refKey{/tcb/freeze file} with the current \refKey{/tcb/listing file} + stripped with its extension plus \meta{text} as new extension. +\begin{dispListing} + ... + listing file=myfile.tex, + freeze extension=-modified.pdf, % -> myfile-modified.pdf is observed + ... +\end{dispListing} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-07-14]{freeze pdf}{}{no value} + Calls \refKey{/tcb/freeze file} with the current \refKey{/tcb/listing file} + stripped with its extension plus |.pdf| as new extension. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-07-14]{freeze png}{}{no value} + Calls \refKey{/tcb/freeze file} with the current \refKey{/tcb/listing file} + stripped with its extension plus |.png| as new extension. + See the examples for \refKey{/tcb/run pdflatex} and \refKey{/tcb/run ps2pdf}. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-07-14]{freeze jpg}{}{no value} + Calls \refKey{/tcb/freeze file} with the current \refKey{/tcb/listing file} + stripped with its extension plus |.jpg| as new extension. +\end{docTcbKey} + + + + +\clearpage +\subsection{Creation of \LaTeX\ Tutorials}\label{sec:latextutorial} +The following source code gives a guideline for the creation of \LaTeX\ tutorials. +In the next section, a framework for \LaTeX\ exercises is described. +All examples shall be numbered optionally. + +Firstly, some additional |tcb| keys are defined for the appearance. +For the examples, three environments |texexp|, |texexptitled|, +and |texexptitledspec| are defined with automatic numbering. + +\begin{itemize} +\item |texexp| is used for untitled examles, +\item |texexptitled| is used for titled examles, +\item |texexptitledspec| is used for titled examles with special treatment. +\end{itemize} + +\inputpreamblelisting{D} + +\begin{dispExample} +\begin{tcblisting}{texexp} +This is a \LaTeX\ example which displays the text as source code +and in compiled form. +\end{tcblisting} +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitled}{First example with a title line}{firstExample} +Here, we use Example \ref{firstExample} with a title line. +\end{texexptitled} +\end{dispExample} + + +\begin{dispExample} +\begin{texexp}{} +This is a \LaTeX\ example which displays the text as source code +and in compiled form. +\end{texexp} +\end{dispExample} + + +\begin{dispExample} +\begin{texexp}{text and listing} +This is a \LaTeX\ example which displays the text as source code +and in compiled form. +\end{texexp} +\end{dispExample} + + +\begin{dispExample} +\begin{texexp}{listing only} +This is a \LaTeX\ example which displays the text as source code only. +\end{texexp} +\end{dispExample} + + +\begin{dispExample} +\begin{texexp}{text only} +This is a \LaTeX\ example which displays the text in compiled form only. +\end{texexp} +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitled}{An Example with a Heading}{heading1} +This is a \LaTeX\ example with a numbered heading line +which can be referred to. +\end{texexptitled} +Here, we see Example \ref{heading1}. +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitled}[listing only]{Another Example with a Heading}{heading2} +The keys can be used in combination. Here, an example with a heading line +and source code only is given. +\end{texexptitled} +Here, we see Example \ref{heading2}. +\end{dispExample} + + +\begin{dispListing} +\begin{texexptitled}[float]{A floating Example with a Heading}{heading3} +This is another \LaTeX\ example with numbered heading line. +But now, the box is a floating object. +\end{texexptitled} +\end{dispListing} +\tcbusetemp + +\begin{dispExample} +The floating box of the last example is seen as Example \ref{heading3} +on page \pageref{heading3}. +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitledspec}{Special application}{texexpbox1} +\begin{lstlisting}[style=tcblatex] +Some \LaTeX\ source code. +\end{lstlisting} +\tcblower +For special cases, the environment |texexptitledspec| with style +|example| can be used directly. As one can see, the upper and the lower +part of the box can be used uncoupled also. +\end{texexptitledspec} +\end{dispExample} + + +The following series of examples demonstrate the application of +\refEnv{tcolorbox} options for diversification. + +\begin{dispExample} +\begin{texexptitled}{How to use options (1):\par The basic example}{options1} +\begin{tikzpicture} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{texexptitled} +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitled}[center lower,enhanced,segmentation hidden,middle=0mm] + {How to use options (2):\par The text output is centered and the + segmentation line has vanished.}{options2} +\begin{tikzpicture} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{texexptitled} +\end{dispExample} + +\begin{dispExample} +\begin{texexptitled}[tikz lower,bicolor,colbacklower=white] + {How to use options (3):\par Here, the |tikzpicture| is totally hidden. + The |bicolor| skin highlights the output.}{options3} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] (\w:1cm) circle (7mm);} +\end{texexptitled} +\end{dispExample} + +\begin{dispExample} +\begin{texexptitled}[center lower,listing side text,righthand width=3.5cm, + bicolor,colbacklower=white] + {How to use options (4):\par The |bicolor| skin also works with side + by side mode}{options4} +\begin{tikzpicture} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] + (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{texexptitled} +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitled}[center lower,listing outside text,righthand width=3.5cm] + {How to use options (5):\par Putting our picture outside is just + a matter of one word.}{options5} +\begin{tikzpicture} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] + (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{texexptitled} +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitled}[center lower,text above listing] + {How to use options (6):\par The picture may also be put above + the listing box.}{options6} +\begin{tikzpicture} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] + (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{texexptitled} +\end{dispExample} + + +\begin{dispExample} +\begin{texexptitled}[beamer,center lower,text outside listing,lefthand width=3.5cm] + {How to use options (7):\par Our style is easily transformed into + a beamerish one.}{options7} +\begin{tikzpicture} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] + (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{texexptitled} +\end{dispExample} + + +\clearpage +\subsection{Creation of \LaTeX\ Exercises}\label{listing:exercises} +In the following, a guideline is given for the creation of \LaTeX\ exercises +with solutions. These solutions are saved to disk for application at a place of +choice. +Therefore, all used exercises are logged to a file |\jobname.records| for automatic +processing. The solution contents themselves are saved to a subdirectory named +|solutions|. Also see \Vref{sec:recording}. + +\begin{itemize} +\item Before the first exercise is given, + \refCom{tcbstartrecording} has to be called to start recording. +\item The solution is given as content of a \refEnv{tcboutputlisting} + environment. Note, that you can use this content also inside the + exercise with \refCom{tcbuselistingtext} in compiled form. +\item After the last exercise is given (and before using the solutions), + \refCom{tcbstoprecording} has to be called to stop recording. +\item The solutions are loaded by \refCom{tcbinputrecords}. +\end{itemize} + +Inside the exercise text, there may be text parts which are needed as +\LaTeX\ source code and as compiled text as well. These parts can be +saved by \refEnv{tcbwritetemp} and used in compiled form by \refCom{tcbusetemp} +or as source code by \refCom{tcbusetemplisting}. + +At first, we generate some a common style for the exercises and the +solutions. Further, since exercises and solutions should +be numbered, we force to use a label \meta{marker}. +Automatically, the label |exe:|\meta{marker} is used to mark the exercise +and the label |sol:|\meta{marker} is used to mark the solution. + +\begin{dispListing} +\tcbset{texercisestyle/.style={arc=0.5mm, colframe=blue!25!yellow!90!white, + colback=blue!25!yellow!5!white, coltitle=blue!25!yellow!40!black, + fonttitle=\small\sffamily\bfseries, fontupper=\small, fontlower=\small, + listing options={style=tcblatex,texcsstyle=*\color{red!40!black}}, +}} +\end{dispListing} +\tcbusetemp + +With these preparations, the kernel environment |texercise| for our +exercises is created quickly: + +\inputpreamblelisting{E} + +\clearpage +The following examples demonstrate the application. + +\begin{dispListing} +\tcbstartrecording +\end{dispListing} +\tcbusetemp + + +\begin{dispExample} +\begin{texercise}{tabular_example} +\textit{Create the following table:}\par\smallskip% +\begin{tcboutputlisting} +\begin{tabular}{|p{3cm}|p{3cm}|p{3cm}|p{3cm}|}\hline +\multicolumn{4}{|c|}{\bfseries\itshape Das alte Italien}\\\hline +\multicolumn{2}{|c|}{\bfseries Antike} & +\multicolumn{2}{c|}{\bfseries Mittelalter}\\\hline +\multicolumn{1}{|c|}{\itshape Republik}& +\multicolumn{1}{c|}{\itshape Kaiserreich}& +\multicolumn{1}{c|}{\itshape Franken}& +\multicolumn{1}{c|}{\itshape Teilstaaten}\\\hline +In den Zeiten der r\"{o}mischen Republik standen dem Staat jeweils zwei +Konsuln vor, deren Machtbefugnisse identisch waren. & +Das r\"{o}mische Kaiserreich wurde von einem Alleinherrscher, dem Kaiser, +regiert. +& In der V\"{o}lkerwanderungszeit \"{u}bernahmen die Goten und sp\"{a}ter die +Franken die Vorherrschaft. +& Im sp\"{a}teren Mittelalter regierten F\"{u}rsten einen Fleckenteppich +von Einzelstaaten.\\\hline +\end{tabular} +\end{tcboutputlisting} +\tcbuselistingtext% +\end{texercise} +\end{dispExample} + + +\begin{dispExample} +\begin{texercise}{macro_oneparam} +\begin{tcboutputlisting} +\newcommand{\headingline}[1]{% + \begin{center}\Large\bfseries #1\end{center}} +\end{tcboutputlisting} +\tcbuselistingtext% + +Create a new macro \verb+\headingline+ which produces the +following output:\par\smallskip +\begin{tcbwritetemp} +\headingline{Very important heading} +\end{tcbwritetemp} +\tcbusetemplisting\tcbusetemp% +\end{texercise} +\end{dispExample} + + + +\begin{dispExample} +\begin{texercise}{macro_twoparam} +\begin{tcboutputlisting} +\newcommand{\minitable}[2]{% + \begin{center}\begin{tabular}{p{10cm}}\hline% + \multicolumn{1}{c}{\bfseries#1}\\\hline% + #2\\\hline% + \end{tabular}\end{center}} +\end{tcboutputlisting} +\tcbuselistingtext% +Create a new macro \verb+\minitable+ which produces the +following output:\par\smallskip +\begin{tcbwritetemp} +\minitable{My heading}{In this tiny tabular, there is only a heading + and some text below which has a width of ten centimeters.} +\end{tcbwritetemp} +\tcbusetemplisting\par\smallskip\tcbusetemp% +\end{texercise} +\end{dispExample} + + +\begin{dispExample} +\begin{texercise}{macro_threeparam} +\begin{tcboutputlisting} +\newcommand{\synop}[3]{% + \begin{tabular}{@{}p{(\linewidth-\tabcolsep*2-\arrayrulewidth)/2}|% + p{(\linewidth-\tabcolsep*2-\arrayrulewidth)/2}@{}}\hline + \multicolumn{2}{c}{\bfseries #1}\\\hline + \multicolumn{1}{c|}{\itshape English}& + \multicolumn{1}{c}{\itshape German}\\\hline + #2 & #3 + \end{tabular}} +\end{tcboutputlisting} +\tcbuselistingtext% +Create a new macro \verb+\synop+ which typesets a synoptic text according +to the following example. Base your macro on a tabular which takes the +total line width.\par\smallskip +\begin{tcbwritetemp} +\synop{Neil Armstrong}% +{That's one small step for a man, one giant leap for mankind.}% +{Das ist ein kleiner Schritt f\"{u}r einen Mann, + ein riesiger Sprung f\"{u}r die Menschheit.} +\end{tcbwritetemp} +\tcbusetemplisting\par\smallskip\tcbusetemp% +\end{texercise} +\end{dispExample} +%\closeoutsol + +\begin{dispListing} +\tcbstoprecording +\end{dispListing} +\tcbusetemp + +\bigskip + +Now, we give a list of all exercises with: + +\begin{dispListing} +\tcblistof[\subsection]{exam}{List of Exercises% + \label{listofexercises}} +\end{dispListing} +\tcbusetemp + +\clearpage +\subsection{Solutions for the given \LaTeX\ Exercises} + +For all solutions, a macro |\processsol| was written to the file |\jobname.records|. +Now, we need a definition for this macro to use the solutions. + +\begin{dispListing} +% \usepackage{hyperref} % for phantomlabel +\newtcbinputlisting{\processsol}[2]{% + texercisestyle, + listing only, + listing file={#1}, + phantomlabel={sol:#2},% + title={Solution for Exercise \ref{exe:#2} on page \pageref{exe:#2}}, +} +\end{dispListing} +\tcbusetemp + +The loading of all solutions is done by: + +\begin{dispListing} +\tcbinputrecords +\end{dispListing} + +With this, we get: + +\tcbusetemp + + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.magazine.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.magazine.tex new file mode 100644 index 0000000..bf9c106 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.magazine.tex @@ -0,0 +1,516 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{magazine}}\label{sec:magazine}% +\tcbset{external/prefix=external/magazine_}% +\newboxarray{myarticle} + +\begin{tcolorbox}[ + enhanced jigsaw, + size=small,width=6cm, + title=Example Article, + fonttitle=\bfseries,center title, + fontupper=\small, + %height fixed for=first and middle, + watermark text=\arabic{tcbbreakpart}, + breakable, + break at=8.5\baselineskip/9\baselineskip, + reset and store to box array=myarticle, + colframe=green!50!black, + colback=green!10, + pad at break=5mm, + ] +This is an example for an article which starts right here and +is continued to the following pages. +The body text for the article is written inside a single +|tcolorbox|. This box is split into parts using the tools from +this section, namely \refKey{/tcb/reset and store to box array} +with a new box array |myarticle| which was created by +|\newboxarray{myarticle}|. + +The resulting parts are distributed throughout this +\Fullref{sec:magazine} using \refCom{consumetcboxarray} +at the appropriate places you see. +The linking texts like \emph{continued on page x} are created +by \refKey{/tcb/finish} commands for the embedding \refCom{tcbox}. +To label the box parts, \refKey{/tcb/phantomlabel} is used. + +These quite small partial boxes are for demonstration purposes. +With the tools of this section, a magazine type document could be +created, but this still needs a lot of manual control. +\end{tcolorbox} + +\newtcolorbox{articleside}[1][]{blanker,sidebyside,sidebyside gap=5mm,sidebyside align=top seam, + parbox=false,righthand width=6cm, + goto/.style={finish={\node[above=-2pt,color=green!50!black] at (frame.south) + {\slshape\scriptsize --- continued on page~\hypersetup{linkcolor=green!50!black}\pageref{myarticle-##1}\ \textcolor{green!50!black}{---}};}}, + from/.style={finish={\node[below=-1pt,color=green!50!black] at (frame.north) + {\slshape\scriptsize --- continued from page~\hypersetup{linkcolor=green!50!black}\pageref{myarticle-##1}\ \textcolor{green!50!black}{---}};}}, + #1} + +\begin{articleside}[after skip=6pt] +The main purpose of this library is to store a |tcolorbox| into an array +of box registers for later usage. + +If the |tcolorbox| is not breakable, there is not much add-on +compared to usual \TeX/\LaTeX\ box storage and usage (and you do not really need this +library for that use case). +For a breakable |tcolorbox|, this library allows to capture all partial boxes +into a sequence of registers. The partial boxes can be used anywhere in +arbitrary order. +\tcblower\consumetcboxarray[myarticle]{1}{blanker,nobeforeafter,phantomlabel=myarticle-one,goto=two} +\end{articleside} + +The name of this library indicates \emph{magazine} in the sense of storage, +but also in the sense of a journal where an article often is \emph{continued on page x}. +An example for this kind of application is given throughout this section starting +on the right hand side. The creation of this library was motivated by +Ulrike Fischer and Steven B.~Segletes. + +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} + \tcbuselibrary{magazine} +\end{dispListing} +This also loads the library \mylib{breakable}, see \Fullref{sec:breakable}. + +\begin{marker} +The box register operations of this library are global. \TeX\ grouping will +not clear the registers when leaving the current group. Also be aware that +extensive use of large box arrays may eat up \TeX's available memory and +registers. +\end{marker} + +\subsection{Creation and Resetting of Box Arrays}\label{subsec:magazine_creation} + +\begin{docCommand}[doc new=2015-07-13]{newboxarray}{\marg{name}} + This creates a new box array called \meta{name}. There already is a + box array available with name |default| which can be used directly. + Note that the creation is a global operation. +\begin{dispListing} +\newboxarray{myarray} +\end{dispListing} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-07-13]{boxarrayreset}{\oarg{name}} + Resets the size counter of a box array \meta{name} to zero. + If \meta{name} is not provided, |default| is used as name. + Use this or \refKey{/tcb/reset box array} before + you apply \refKey{/tcb/store to box array}. Otherwise, all boxes would + be appended to the already existing boxes. + This command does not clear box registers. +\begin{dispListing} +\boxarrayreset % resets 'default' +\boxarrayreset{myarray} % resets 'myarray' +\end{dispListing} +\end{docCommand} + +\enlargethispage*{20mm} + +\begin{docTcbKey}[][doc new=2015-07-13]{reset box array}{\colOpt{=\meta{name}}}{default |default|, initially unset} + Resets the size counter of a box array \meta{name} to zero. + Use this or \refCom{boxarrayreset} (which does the same) before + you apply \refKey{/tcb/store to box array}. +\begin{dispListing} +\tcbset{ + reset box array, % resets 'default' + reset box array=myarray, % resets 'myarray' +} +\end{dispListing} +\end{docTcbKey} + +\clearpage +\begin{docCommand}[doc new=2015-07-13]{boxarrayclear}{\oarg{name}} + Works like \refCom{boxarrayreset} to reset the size counter of a + box array \meta{name} to zero. Additionally, all allocated box registers + of the box array are cleared of their content. + Note that the allocated box registers stay allocated. So, this may be + useful to clear memory, but not to free registers for other applications. + If \refCom{consumeboxarray} or \refCom{consumetcboxarray} was used to + apply the stored boxes, there is no advantage in using \refCom{boxarrayclear}. +\begin{dispListing} +\boxarrayclear % clears 'default' +\boxarrayclear{myarray} % clears 'myarray' +\end{dispListing} +\end{docCommand} + + + +\subsection{Storing Content}\label{subsec:magazine_storing} + +\begin{docTcbKey}[][doc new=2015-07-13]{store to box array}{\colOpt{=\meta{name}}}{default |default|, initially unset} +Stores a |tcolorbox| or all parts of a break sequence of a |tcolorbox| into +a box array \meta{name}. If no \meta{name} is given, the already existing |default| +box array is used. Otherwise, the box array has to be created beforehand +with \refCom{newboxarray}. Note that the box has to be \refKey{/tcb/breakable}, +if the box shall break into several parts. +Typically, manual break points are additionally defined by \refKey{/tcb/break at}. +Otherwise, the box parts will have a length of about |\textheight|. +For most use cases, a \refKey{/tcb/reset box array} should be applied +to reset the box array counter.\enlargethispage*{2cm} + +\begin{exdispExample}{storetoboxarray_1} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced jigsaw,size=fbox,width=4cm, + colback=yellow!10,colframe=yellow!10!black, + enforce breakable,% use only breakable in the real world! + break at=7cm/4cm, + height fixed for=all, + watermark text=\arabic{tcbbreakpart}, + reset box array, + store to box array + ] +\lipsum[1] +\end{tcolorbox} + +\useboxarray{1}\hfill +\begin{tabular}[b]{cc} +\multicolumn{2}{c}{\includegraphics[width=7cm]{Basilica_5.png}}\\ +\useboxarray{2} & \useboxarray{3} +\end{tabular} +\end{exdispExample} + +\clearpage +If the first box part should fill the rest of the available space of +the current page, you can use |\pagegoal-\pagetotal| minus some distance for +the first element of \refKey{/tcb/break at}. You may want to have some +additional distance to the preceeding text. + +\begin{dispListing} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced,breakable, + reset box array, + store to box array, + break at=\pagegoal-\pagetotal-5mm/0pt, + height fixed for=first and middle] +\lipsum[1-15] +\end{tcolorbox}% +% +\consumetcboxarray{1}{blanker,before=\par\vfill\noindent} +\end{dispListing} + + +\begin{exdispExample}{storetoboxarray_2} +\begin{tcolorbox}[blanker,width=4cm, + fontupper=\footnotesize, + enforce breakable,% use only breakable in the real world! + break at=4cm, + height fixed for=all, + watermark text=\arabic{tcbbreakpart}, + reset box array, + store to box array + ] +\includegraphics[width=\linewidth]{Basilica_5.png}\par +\lipsum[1-2] +\end{tcolorbox} + +\begin{tcbitemize}[raster columns=3,raster equal height, + size=small,halign=center,sharp corners,colback=blue!5] +\tcbitem\consumeboxarray{5} +\tcbitem\consumeboxarray{6} +\tcbitem\consumeboxarray{1} +\tcbitem\consumeboxarray{2} +\tcbitem\consumeboxarray{3} +\tcbitem\consumeboxarray{4} +\end{tcbitemize} +\end{exdispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-07-13]{reset and store to box array}{\colOpt{=\meta{name}}}{style, default |default|, initially unset} + Combination of \refKey{/tcb/reset box array} and \refKey{/tcb/store to box array}. +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2015-07-13]{do not store to box array}{}{style, no default, initially set} +Disables the \refKey{/tcb/store to box array} option, if set before. +\end{docTcbKey} + + +\begin{docEnvironment}[doc new=2015-07-13]{boxarraystore}{\marg{name}} + Stores the environment content into a box array \meta{name}. + This corresponds to the standard \LaTeX\ environment |lrbox|, but + the storage operation is global. As long as \refCom{boxarrayreset} is + not used, every new \refEnv{boxarraystore} adds a further box to + the array. + +\begin{dispExample} +\boxarrayreset +\begin{boxarraystore}{default}\fbox{Mary}\end{boxarraystore} +\begin{boxarraystore}{default}\fbox{Had}\end{boxarraystore} +\begin{boxarraystore}{default}\fbox{a}\end{boxarraystore} +\begin{boxarraystore}{default}\fbox{Little}\end{boxarraystore} +\begin{boxarraystore}{default}\fbox{Lamb}\end{boxarraystore} +\useboxarray{5}\useboxarray{4}\useboxarray{3}\useboxarray{2}\useboxarray{1}\hfill +\useboxarray{1}\useboxarray{5} +\end{dispExample} +\end{docEnvironment} + +\subsection{Retrieving Content}\label{subsec:magazine_retrieve} + +\begin{docCommand}[doc new=2015-07-13]{boxarraygetsize}{\oarg{name}\marg{macro}} +\begin{articleside}[before skip=5pt] + Stores the current size of a box array \meta{name} into a given \meta{macro}. + If no \meta{name} is given, the already existing |default| box array is used. +\begin{dispExample} +\boxarraygetsize{\mysize} +Current size of the default box array: +\mysize. +\end{dispExample} +\tcblower\consumetcboxarray[myarticle]{2}{blanker,nobeforeafter,phantomlabel=myarticle-two,from=one,goto=three} +\end{articleside} +\end{docCommand} + +\begin{docCommand}[doc new=2015-07-13]{useboxarray}{\oarg{name}\marg{index}} + Typesets the box with the given \meta{index} number from the box array \meta{name}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + It is silently ignored, if the \meta{index} is out of range. + Note that \refCom{useboxarray} corresponds to the standard |\usebox| macro, + respectively, |\copy|. +\begin{dispExample} +\boxarraygetsize{\mysize} +\foreach \n in {1,...,\mysize} { \useboxarray{\n} } +\end{dispExample} +\end{docCommand} + +\clearpage +\begin{docCommand}[doc new=2015-07-13]{usetcboxarray}{\oarg{name}\marg{index}\marg{options}} + Typesets the box with the given \meta{index} number from the box array \meta{name} + using \refCom{useboxarray} as content of a \refCom{tcbox}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + It is silently ignored, if the \meta{index} is out of range. + The \refCom{tcbox} can be customized by |tcolorbox| \meta{options}. +\begin{dispExample} +\boxarraygetsize{\mysize} +\foreach \n in {1,...,\mysize} { \usetcboxarray{\n}{on line,colframe=yellow, + colback=yellow!10} } +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-07-13]{consumeboxarray}{\oarg{name}\marg{index}} + Typesets the box with the given \meta{index} number from the box array \meta{name}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + It is silently ignored, if the \meta{index} is out of range. + In contrast to \refCom{useboxarray}, + \refCom{consumeboxarray} corresponds to the standard |\box| macro, i.e. + after typesetting the box register is cleared and cannot be used again. +\begin{dispExample} +\boxarraygetsize{\mysize} +First run: \foreach \n in {1,...,\mysize} { \consumeboxarray{\n} } +\par +Second run: \foreach \n in {1,...,\mysize} { \consumeboxarray{\n} } +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-07-13]{consumetcboxarray}{\oarg{name}\marg{index}\marg{options}} +\begin{articleside}[before skip=5pt] + Typesets the box with the given \meta{index} number from the box array \meta{name} + using \refCom{consumeboxarray} as content of a \refCom{tcbox}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + It is silently ignored, if the \meta{index} is out of range. + The \refCom{tcbox} can be customized by |tcolorbox| \meta{options}. + After typesetting the box register is cleared and cannot be used again. +\tcblower\consumetcboxarray[myarticle]{3}{blanker,nobeforeafter,phantomlabel=myarticle-three,,from=two,goto=four} +\end{articleside} +\begin{exdispExample}{consumetcboxarray} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced jigsaw,size=fbox,width=6cm, + colback=yellow!10,colframe=yellow!10!black, + enforce breakable,% use only breakable in the real world! + break at=5cm, + watermark text=\arabic{tcbbreakpart}, + reset and store to box array + ] +\lipsum[1] +\end{tcolorbox} + +\consumeboxarray{2} \hfill \consumeboxarray{1} \hfill \consumeboxarray{1} +\end{exdispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-07-13]{boxarraygetbox}{\oarg{name}\marg{macro}\marg{index}} + Assigns the box with the given \meta{index} number from the box array \meta{name} + to a \meta{macro}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + If the \meta{index} is out of range, the \meta{macro} will be undefined. +\begin{exdispExample}{boxarraygetbox} +\tcbox[size=small,colframe=blue!20,colback=yellow!5,on line, + reset and store to box array]{Test} + +\boxarraygetsize{\mysize} Array size: \mysize + +\boxarraygetbox{\mybox}{1} +Box width: \the\wd\mybox +\quad\usebox{\mybox} +\end{exdispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2017-06-27]{ifboxarrayempty}{\oarg{name}\marg{index}\marg{true}\marg{false}} + Tests the box with the given \meta{index} number from the box array \meta{name} + for emptiness be empty and executes \meta{true} if it is empty, and \meta{false} otherwise. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. +\begin{exdispExample}{ifboxarrayempty} +\tcbox[size=small,colframe=blue!20,colback=yellow!5,on line, + reset and store to box array]{Test} + +\ifboxarrayempty{1}{no Box~1}{Box~1: \useboxarray{1}}, +\ifboxarrayempty{2}{no Box~2}{Box~2: \useboxarray{2}} +\end{exdispExample} +\end{docCommand} + + +\clearpage +\subsection{Box Dimensions}\label{subsec:magazine_dimensions} + +\begin{docCommand}[doc new=2015-07-13]{boxarraygetwidth}{\oarg{name}\marg{macro}\marg{index}} + Assigns the width of the box with the given \meta{index} number from the box array \meta{name} + to a \meta{macro}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + If the \meta{index} is out of range, the \meta{macro} will be set to |0pt|. +\begin{exdispExample}{boxarraygetwidth} +\tcbox[size=small,colframe=blue!20,colback=yellow!5,on line, + reset and store to box array]{Test} + +\begin{tabular}{ll} +\useboxarray{1} & width of box 1: \boxarraygetwidth{\mylen}{1} \mylen\\ +\useboxarray{2} & width of box 2: \boxarraygetwidth{\mylen}{2} \mylen +\end{tabular} +\end{exdispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-07-13]{boxarraygetheight}{\oarg{name}\marg{macro}\marg{index}} + Assigns the height of the box with the given \meta{index} number from the box array \meta{name} + to a \meta{macro}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + If the \meta{index} is out of range, the \meta{macro} will be set to |0pt|. +\begin{exdispExample}{boxarraygetheight} +\tcbox[size=small,colframe=blue!20,colback=yellow!5,on line, + reset and store to box array]{Test} + +\begin{tabular}{ll} +\useboxarray{1} & height of box 1: \boxarraygetheight{\mylen}{1} \mylen\\ +\useboxarray{2} & height of box 2: \boxarraygetheight{\mylen}{2} \mylen +\end{tabular} +\end{exdispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2015-07-13]{boxarraygetdepth}{\oarg{name}\marg{macro}\marg{index}} + Assigns the depth of the box with the given \meta{index} number from the box array \meta{name} + to a \meta{macro}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + If the \meta{index} is out of range, the \meta{macro} will be set to |0pt|. +\begin{exdispExample}{boxarraygetdepth} +\tcbox[size=small,colframe=blue!20,colback=yellow!5,on line, + reset and store to box array]{Test} + +\begin{tabular}{ll} +\useboxarray{1} & depth of box 1: \boxarraygetdepth{\mylen}{1} \mylen\\ +\useboxarray{2} & depth of box 2: \boxarraygetdepth{\mylen}{2} \mylen +\end{tabular} +\end{exdispExample} +\end{docCommand} + + +\clearpage +\begin{docCommand}[doc new=2015-07-13]{boxarraygettotalheight}{\oarg{name}\marg{macro}\marg{index}} +\begin{articleside}[before skip=5pt] + Assigns the total height of the box with the given \meta{index} number from the box array \meta{name} + to a \meta{macro}. + If no \meta{name} is given, the already existing |default| box array is used. + It is considered an error, if a not existing box array \meta{name} is used. + If the \meta{index} is out of range, the \meta{macro} will be set to |0pt|. +\tcblower\consumetcboxarray[myarticle]{4}{blanker,nobeforeafter,phantomlabel=myarticle-four,from=three} +\end{articleside} +\begin{exdispExample}{boxarraygettotalheight} +\boxarrayreset +\tcbox[size=small,colframe=blue!20,colback=yellow!5,on line, + store to box array]{Test} + +\begin{tabular}{ll} +\useboxarray{1} & total height of box 1: \boxarraygettotalheight{\mylen}{1} \mylen\\ +\useboxarray{2} & total height of box 2: \boxarraygettotalheight{\mylen}{2} \mylen +\end{tabular} +\end{exdispExample} +\end{docCommand} + +\clearpage +\subsection{Leaflet Example} +The following full application example can be used to create leaflets. +Obviously, the code can be adapted and customized in many ways. + +\begin{tcblisting}{ + enhanced jigsaw,lower separated=false,breakable, + listing style=mydocumentation,base example, + listing and comment, + pdf comment,freeze pdf, + comment style={raster columns=1}, + compilable listing, + run pdflatex} +\documentclass[a4paper,landscape]{article} +\usepackage[noheadfoot,margin=0pt]{geometry} +\usepackage[skins,raster,magazine]{tcolorbox} +\usepackage{lipsum} + +\newenvironment{leaflet}[1][]{% + \begin{tcolorbox}[nobeforeafter,empty,colback=white, + sharp corners,size=minimal,left=10mm,right=10mm,top=10mm,bottom=10mm, + width=\textwidth/3, + breakable, + break at=\textheight, + height fixed for=all, + reset box array, + store to box array,#1]} + {\end{tcolorbox}% + \begin{tcbitemize}[raster columns=3,raster equal skip=0pt,blankest] + \tcbitem\consumeboxarray{5} + \tcbitem\consumeboxarray{6} + \tcbitem\consumeboxarray{1} + \tcbitem\consumeboxarray{2} + \tcbitem\consumeboxarray{3} + \tcbitem\consumeboxarray{4} + \end{tcbitemize}% + } + +\pagestyle{empty} +\begin{document} + +\begin{leaflet}[underlay={\node[above=5mm,font=\footnotesize] + at (frame.south) {- \arabic{tcbbreakpart} -};}] + \includegraphics[width=\linewidth]{Basilica_5.png} + \begin{center} + \bfseries\LARGE Example + \end{center} + + \section{Introduction} + \lipsum[1] + + \section{Main Part A} + \lipsum[2-8] + + \section{Main Part B} + \lipsum[9-15] + + \section{Conclusion} + \lipsum[16-18] +\end{leaflet} + +\end{document} +\end{tcblisting} + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.picturecredits.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.picturecredits.tex new file mode 100644 index 0000000..0b9db2b --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.picturecredits.tex @@ -0,0 +1,33 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Picture Credits}% +\tcbset{external/prefix=external/picturecredits_}% +The following pictures were used inside this documentation. + +\DeclareTotalTColorBox{\diabox}{ O{} v m } + { bicolor,fonttitle=\bfseries\ttfamily,adjusted title={#2},center title, + colframe=blue!20!black,leftupper=0mm,rightupper=0mm,colback=black!75!white, + finish vignette={size=1.5mm},#1} + { \tikz\path[fill zoom image={#2}] (0,0) rectangle (\linewidth,4cm);% + \tcblower#3} + +\begin{tcbraster}[raster equal height] +\diabox{Basilica_5.png}{ + \url{http://commons.wikimedia.org/wiki/File:Basilica_5.png}} +\diabox{lichtspiel.jpg}{ + Photograph taken by Thomas F.~Sturm.} +\diabox{crinklepaper.png}{% + Created with |GIMP|.\\ + \url{http://www.gimp.org}} +\diabox{pink_marble.png}{% + Created with |GIMP|.\\ + \url{http://www.gimp.org}} +\diabox{blueshade.png}{% + Created with |GIMP|.\\ + \url{http://www.gimp.org}} +\diabox{goldshade.png}{% + Created with |GIMP|.\\ + \url{http://www.gimp.org}} +\end{tcbraster} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.poster.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.poster.tex new file mode 100644 index 0000000..3be23c7 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.poster.tex @@ -0,0 +1,608 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{poster}}\label{sec:poster}% +\tcbset{external/prefix=external/poster_}% + +The main purpose of this library is to support creation of single page posters +with |tcolorbox|es. + +A \refEnv{tcbposter} is a |tikzpicture| where |tcolorbox|es can be +placed in a column oriented manner using \refCom{posterbox} commands. +This base concept is more or less copied from the great |baposter| package. + +The \mylib{raster} library, see \Fullref{sec:raster}, can produce +similar looking results and may be more appropriate +depending on the actual project. +\begin{itemize} +\item The \mylib{raster} library has a flow oriented concept, just like a + convential text flow. The text flow (box flow) is a merely endless ribbon + which gets broken into lines (and paragraphs) and the lines are broken + into pages. \mylib{raster} shapes the boxes to convenient sizes to fill + lines and pages in a pleasant way. +\item The \mylib{tcbposter} library supports a quite free placement of + boxes inside a page. + Basically, boxes are placed like |node|s are placed inside a |tikzpicture|. + In contrast to \mylib{raster}, this is a \emph{single} page + and not a flow of pages. + The poster is divided into columns and rows. + There is a more or less gentle force to use the columns (or spans of columns) + for positioning and sizing while the row placement is completely optional. +\end{itemize} +The creation of this library was motivated by Ignasi. + +\begin{marker} +Inside a |tikzpicture| there should be no embedded |tikzpicture|s. +This rule is violated by the \mylib{poster} library. Be aware that there +may be some unwanted interactions between the main |tikzpicture| and +the embedded ones inside the |tcolorbox|es. +\end{marker} + +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{poster} +\end{dispListing} +This also loads the libraries +\mylib{skins}, see \Fullref{sec:skins}, +\mylib{breakable}, see \Fullref{sec:breakable}, +\mylib{magazine}, see \Fullref{sec:magazine}, and +\mylib{fitting}, see \Fullref{sec:fitting}. + + +%-------------------------- +\subsection{Overview}\label{subsec:poster_overview} + + +\begin{tcolorbox}[base example,hyperurl={tcolorbox-tutorial-poster.pdf},title=Click me to see the tutorial] +You get the best overview of the \mylib{poster} library and its facilities, +if you look at the \textbf{Poster Tutorial} which is part of the |tcolorbox| +documentation:\par +\texttt{tcolorbox-tutorial-poster.pdf} +\end{tcolorbox} + + + +\clearpage +%-------------------------- +\subsection{Main Poster Environment}\label{subsec:poster_environment} + +\begin{docEnvironment}[doc new=2017-07-03]{tcbposter}{\oarg{options}} + This creates a |tikzpicture| environment with suitable additional + settings defined by the given \meta{options}. + Basically, \refCom{posterbox} and \refEnv{posterboxenv} are + used to place |tcolorboxes| as nodes into the environment, + but additional \tikzname\ code can also be used. + As \meta{options} all |/tcb/posterset/| keys may be applied, namely: +\begin{itemize} +\item\refKey{/tcb/posterset/poster}: poster settings like columns, rows, sizes\ldots +\item\refKey{/tcb/posterset/coverage} and \refKey{/tcb/posterset/no coverage}: + settings for a surrounding |tcolorbox| for background and margins. +\item\refKey{/tcb/posterset/boxes}: style of the |tcolorbox|es used for the poster. +\item\refKey{/tcb/posterset/fontsize}: scaling of used fonts. +\end{itemize} + +\begin{exdispExample}{tcbposter} + \begin{tcbposter}[ + poster = {showframe,height=10cm,spacing=2mm}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, + ] + \posterbox{name=A,column=3,row=2}{My first box} + \posterbox[adjusted title=Second box] + {name=B,column=2,span=2,below=A}{My second box} + \posterbox[adjusted title=Third box] + {name=C,column=2,between=B and bottom}{My third box} + \end{tcbposter} +\end{exdispExample} +\end{docEnvironment} + +\clearpage + Inside \refEnv{tcbposter}, there are several predefined \tikzname\ nodes. + These nodes share a common \refKey{/tcb/poster/prefix} which is + |TCBPOSTER@| by default. This prefix is used to discriminate the + poster nodes from local nodes of any embedded |tikzpicture| environment. + You will never need this prefix using \refCom{posterbox} and its + placement options, but if you want to refer to a predefined node using + pure \tikzname\ code. + The predefined nodes (shown without prefix) are: + \begin{itemize} + \item|poster|: defines the bounding box of the poster (without the coverage). + \item|top|: top position plus row spacing + \item|bottom|: bottom position minus row spacing + \item|middle|: vertical middle position + \item|col1|, |col2|, \ldots: bounding box of column~1, column~2, \ldots + \item|row1|, |row2|, \ldots: bounding box of row~1, row~2, \ldots + \end{itemize} + Further nodes are defined using the \refKey{/tcb/posterloc/name} option. + + \begin{marker} + Never use a \refEnv{tcbposter} inside a \refEnv{tcbposter}. + But, if you do anyway, use a different \refKey{/tcb/poster/prefix} for + the embedded poster or you surely get a total mess. + \end{marker} + + There are several properties inside a \refEnv{tcbposter} which may be useful + for advanced code (skip the following on first reading): + \begin{itemize} + \item\docAuxCommand{tcbposterwidth}: Width of the poster (without margins). + \item\docAuxCommand{tcbposterheight}: Height of the poster (without margins). + \item\docAuxCommand{tcbpostercolspacing}: Column distance. + \item\docAuxCommand{tcbposterrowspacing}: Row distance. + \item\docAuxCommand{tcbpostercolumns}: Column quantity. + \item\docAuxCommand{tcbposterrows}: Row quantity. + \item\docAuxCommand{tcbpostercolwidth}: Width of a column. + \item\docAuxCommand{tcbposterrowheight}: Height of a row. + \end{itemize} + +\medskip +\begin{docCommand}[doc new=2017-07-03]{tcbposterset}{\marg{options}} + Sets options for every following \refEnv{tcbposter} inside the current \TeX\ group. + For example, the numbers for rows and columns may be defined for the whole document by this: +\begin{dispListing} +\tcbposterset{poster={columns=2,rows=3}} +\end{dispListing} + See \refEnv{tcbposter} for all feasible options. +\end{docCommand} + + +\clearpage +%-------------------------- +\subsection{Poster Settings}\label{subsec:poster_settings} + +\begin{postersetTcbKey}[][doc new=2017-07-03]{poster}{=\marg{option list}}{style, no default} + This option can be applied inside \refEnv{tcbposter} and \refCom{tcbposterset} + to set the given poster \meta{option list}, e.g. +\begin{dispListing} +\tcbposterset{poster={width=20cm,height=15cm}} +\end{dispListing} + For the \meta{option list}, see the following keys. +\end{postersetTcbKey} + + +\begin{posterTcbKey}[][doc new=2017-07-03]{columns}{=\meta{number}}{no default, initially |3|} + Sets the \meta{number} of columns for a |tcbposter|. +\begin{exdispExample}{columns} + \begin{tcbposter}[ + poster = {showframe,columns=5,rows=2,spacing=1mm,height=4cm}, + ] + \end{tcbposter} +\end{exdispExample} +\end{posterTcbKey} + +\begin{posterTcbKey}[][doc new=2017-07-03]{rows}{=\meta{number}}{no default, initially |4|} + Sets the \meta{number} of rows for a |tcbposter|. +\end{posterTcbKey} + + +\begin{posterTcbKey}[][doc new=2017-07-03]{colspacing}{=\meta{length}}{no default, initially |4mm|} + Sets \meta{length} as distance between columns. +\end{posterTcbKey} + +\begin{posterTcbKey}[][doc new=2017-07-03]{rowspacing}{=\meta{length}}{no default, initially |4mm|} + Sets \meta{length} as distance between rows. +\end{posterTcbKey} + +\begin{posterTcbKey}[][doc new=2017-07-03]{spacing}{=\meta{length}}{style, no default, initially |4mm|} + Sets \meta{length} as distance between columns and rows. +\end{posterTcbKey} + + +\begin{posterTcbKey}[][doc new=2017-07-03]{showframe}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Displays a red auxiliary mesh as optical support during poster creation. + Also, every \refKey{/tcb/posterloc/name} is displayed. +\end{posterTcbKey} + + +\begin{posterTcbKey}[][doc new=2017-07-03]{width}{=\meta{length}}{no default, initially \cs{linewidth}} + Sets \meta{length} as width of the poster. For a typical poster, this has not + to be set manually. +\end{posterTcbKey} + +\begin{posterTcbKey}[][doc new=2017-07-03]{height}{=\meta{length}}{no default, initially unset} + Sets \meta{length} as height of the poster. For a typical poster, this has not + to be set manually, but is set automatically to an appropriate value. +\end{posterTcbKey} + + +\begin{posterTcbKey}[][doc new=2017-07-03]{prefix}{=\meta{name}}{no default, initially |TCBPOSTER@|} + \meta{name} is set as prefix for any \tikzname\ node which is generated + automatically by the \mylib{poster} library. This encompasses predefined + nodes like |top|, |bottom|, \ldots, and nodes defined by using + \refKey{/tcb/posterloc/name}. Also, see~\Fullref{subsec:poster_environment}. + For a typical poster, this value can stay as it is. +\end{posterTcbKey} + + +%-------------------------- +\subsection{Coverage}\label{subsec:poster_coverage} + +\begin{postersetTcbKey}[][doc new=2017-07-03]{coverage}{=\marg{option list}}{style, no default} + This option can be applied inside \refEnv{tcbposter} and \refCom{tcbposterset} + and it adds an optional coverage for the poster which is a surrounding |tcolorbox| + with the given \meta{option list}. Here, margins and background settings + for the poster can be given. + The \emph{coverage} has several default |tcolorbox| settings + suitable for the purpose: +\begin{dispListing} +enhanced, frame hidden, sharp corners, boxsep=0pt, boxrule=0pt, +top=4mm, bottom=4mm, left=4mm, right=4mm, +toptitle=2mm, bottomtitle=2mm, colback=white +\end{dispListing} + +The \meta{option list} can contain any |tcolorbox| option. + +\begin{exdispExample}{coverage} +\begin{tcbposter}[ + poster = {showframe,spacing=1mm}, + coverage = {height=5cm, + interior style={top color=yellow,bottom color=yellow!50!red}, + watermark text={My Poster},watermark color=white, + }, +] +\end{tcbposter} +\end{exdispExample} + +\begin{itemize} +\item For a typical poster, the option \refKey{/tcb/spread} will use the + whole page for the poster coverage. +\item Poster margins can be adapted by \refKey{/tcb/left}, \refKey{/tcb/right}, + \refKey{/tcb/top}, \refKey{/tcb/bottom}. +\item Poster background can be changed by \refKey{/tcb/colback}, + \refKey{/tcb/interior style}, \refKey{/tcb/interior style image}, etc. +\end{itemize} +\end{postersetTcbKey} + + +\begin{postersetTcbKey}[][doc new=2017-07-03]{no coverage}{}{style, no value, initially set} + Removes the surrounding |tcolorbox| completely. +\end{postersetTcbKey} + +\clearpage +%-------------------------- +\subsection{Common Box Settings}\label{subsec:poster_boxsettings} + + +\begin{postersetTcbKey}[][doc new=2017-07-03]{boxes}{=\marg{option list}}{style, no default} + This option can be applied inside \refEnv{tcbposter} and \refCom{tcbposterset} + and it is used to set up the style of the |tcolorbox|es inside the poster. + The \meta{option list} can contain any |tcolorbox| option, but box size + options are not assumed to be useful here, because the size will be + determined by the placement options. + +\begin{exdispExample}{boxes} +\begin{tcbposter}[ + poster = {spacing=2mm,columns=3,rows=2}, + coverage = {height=5cm, + interior style={top color=yellow,bottom color=yellow!50!red}, + }, + boxes = {sharp corners=downhill,arc=3mm,boxrule=1mm, + colback=white,colframe=cyan, + title style={left color=black,right color=cyan}, + fonttitle=\bfseries\scshape} +] + \posterbox[adjusted title=First]{column=1,row=1,span=2}{First box} + \posterbox[adjusted title=Second]{column=1,row=2,span=2}{Second box} + \posterbox[adjusted title=Third]{column=3,row=1,rowspan=2}{Third box} +\end{tcbposter} +\end{exdispExample} + +\end{postersetTcbKey} + + +%-------------------------- +\subsection{Font Scaling}\label{subsec:poster_fontsize} + +\begin{postersetTcbKey}[][doc new=2017-07-03]{fontsize}{=\meta{length}}{style, no default, initially unset} + This option can be applied inside \refEnv{tcbposter} and \refCom{tcbposterset}. + It uses \refKey{/tcb/fit basedim} and \refKey{/tcb/fit fontsize macros} + to redefine |\normalsize| to \meta{length} and all other standard + font size macros like |\small| and |\large| accordingly.\par + This needs a freely scalable font family like |lmodern| to work. + If \refKey{/tcb/posterset/fontsize} is not applied, there standard + font size macros are not changed in any way. + +\begin{dispListing} +\begin{tcbposter}[ + poster = {spacing=2mm,columns=3,rows=2}, + coverage = {height=5cm, + interior style={top color=yellow,bottom color=yellow!50!red}, + }, + fontsize = 15pt, % <--- \normalsize is now 15pt +] +... +\end{dispListing} +\end{postersetTcbKey} + + +\clearpage +%-------------------------- +\subsection{Box Placement}\label{subsec:poster_boxplacement} + +\begin{docCommand}[doc new=2017-07-03]{posterbox}{\oarg{options}\marg{placement}\marg{box content}} + Inside a \refEnv{tcbposter} environment, this places a |tcolorbox| with + additional |tcolorbox| \meta{options} and the given \meta{box content} + at a place determined by \meta{placement}. + All \meta{placement} options are described in the following. + Note that \meta{box content} cannot contain \emph{verbatim} material, + see \refEnv{posterboxenv}. +\begin{exdispExample}{posterbox} +\begin{tcbposter}[ + poster = {showframe,height=4cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox[title=My title]{name=A,column=2,row=2}{My first box} +\end{tcbposter} +\end{exdispExample} +\end{docCommand} + +\begin{docEnvironment}[doc new=2017-07-03]{posterboxenv}{\oarg{options}\marg{placement}} + This is the environment version of \refCom{posterbox}, i.e.\ inside a + \refEnv{tcbposter} environment, this places a |tcolorbox| with + additional |tcolorbox| \meta{options} and the given \meta{environment content} + at a place determined by \meta{placement}. + In contrast to \refCom{posterbox}, the \meta{environment content} is + allowed to contain \emph{verbatim} material. Note that the implementation + of \refCom{posterbox} is more efficient than the implementation of \refEnv{posterboxenv}. + +\enlargethispage*{1cm} +\begin{exdispExample}{posterboxenv} +\begin{tcbposter}[ + poster = {showframe,height=4cm,spacing=2mm,rows=2}, + boxes = {size=small,beamer, + colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\begin{posterboxenv}[title=My title]{name=A,column=2,between=top and bottom} + My first box. + \begin{tcblisting}{size=small,colback=yellow!10} +My \textbf{first} +poster listing. + \end{tcblisting} +\end{posterboxenv} +\end{tcbposter} +\end{exdispExample} + +\end{docEnvironment} + + +\clearpage +\begin{posterlocTcbKey}[][doc new=2017-07-03]{name}{=\meta{name}}{no default, initially |@|} + Sets \meta{name} as reference for the current \refCom{posterbox} or + \refEnv{posterboxenv}. + A \tikzname\ shape name is constructed automatically as combination + of \refKey{/tcb/poster/prefix} and \meta{name}. +\begin{exdispExample}{name} +\begin{tcbposter}[ + poster = {showframe,height=2.5cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=2,row=2}{My first box} +\node[below right=4mm,fill=yellow] (X) at (TCBPOSTER@poster.north west) {Example A}; +\draw[blue,very thick,->] (X) |- (TCBPOSTER@A); +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + + +\begin{posterlocTcbKey}[][doc new=2017-07-03]{column}{=\meta{number}}{no default, initially |1|} + Places the box at the column denoted by \meta{number}. If \refKey{/tcb/posterloc/span} + is not |1|, the box is aligned to the left side of column \meta{number}. +\begin{exdispExample}{column} +\begin{tcbposter}[ + poster = {showframe,height=2.5cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{row=1,column=2,span=2}{First box} +\posterbox{row=2,column=2,span=0.8}{Second box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + +\enlargethispage*{1cm} +\begin{posterlocTcbKey}[][doc new=2017-07-03]{column*}{=\meta{number}}{no default, initially unset} + Places the box at the column denoted by \meta{number}. If \refKey{/tcb/posterloc/span} + is not |1|, the box is aligned to the right side of column \meta{number}. +\begin{exdispExample}{columnstar} +\begin{tcbposter}[ + poster = {showframe,height=2.5cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{row=1,column*=2,span=2}{First box} +\posterbox{row=2,column*=2,span=0.8}{Second box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + + +\clearpage +\begin{posterlocTcbKey}[][doc new=2017-07-03]{span}{=\meta{number}}{no default, initially |1|} + Sets the width of the current box to span \meta{number} columns. + \meta{number} is also allowed to be a real number like |0.5| or |1.7|. + See \refKey{/tcb/posterloc/column} and \refKey{/tcb/posterloc/column*} + for examples. +\end{posterlocTcbKey} + +\begin{posterlocTcbKey}[][doc new=2017-07-03]{row}{=\meta{number}}{no default, initially unset} + If this option is applied, the box is placed at the row denoted by \meta{number}. + Also, the height is set as fixed according to \refKey{/tcb/posterloc/rowspan}. +\begin{exdispExample}{row} +\begin{tcbposter}[ + poster = {showframe,height=2.5cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{row=1,column=1}{First box} +\posterbox{row=1,column=2,rowspan=2}{Second box} +\posterbox[natural height]{row=1,column=3}{Third box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + +\begin{posterlocTcbKey}[][doc new=2017-07-03]{rowspan}{=\meta{number}}{no default, initially |1|} + Sets the height of the current box to span \meta{number} rows. + \meta{number} is also allowed to be a real number like |0.5| or |1.7|. +\begin{exdispExample}{rowspan} +\begin{tcbposter}[ + poster = {showframe,height=2.5cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{row=1,column=1,rowspan=0.9}{First box} +\posterbox{row=1,column=2,rowspan=1.5}{Second box} +\posterbox{row=1,column=3,rowspan=2}{Third box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + +\begin{posterlocTcbKey}[][doc new=2017-07-03]{fixed height}{}{no value, initially |0pt|} + Sets the height of the current box span rows as denoted by + \refKey{/tcb/posterloc/rowspan}. + This can be used, if not \refKey{/tcb/posterloc/row}, but another + height placement option is applied. +\end{posterlocTcbKey} + + +\clearpage +\begin{posterlocTcbKey}[][doc new=2017-07-03]{below}{=\meta{name}}{no default, initially |top|} + The box is placed below another box with the given \meta{name}. Also, + \meta{name} can be a predefined node, see \Fullref{subsec:poster_environment}. +\begin{exdispExample}{below} +\begin{tcbposter}[ + poster = {showframe,height=3cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=1,below=top}{First box} +\posterbox{name=B,column=1,below=A}{Second box} +\posterbox{name=C,column=2,below=B}{Third box} +\posterbox{name=D,column=3,below=row1}{Fourth box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + + +\begin{posterlocTcbKey}[][doc new=2017-07-03]{above}{=\meta{name}}{no default, initially unset} + The box is placed above another box with the given \meta{name}. Also, + \meta{name} can be a predefined node, see \Fullref{subsec:poster_environment}. +\begin{exdispExample}{above} +\begin{tcbposter}[ + poster = {showframe,height=3cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=1,above=bottom}{First box} +\posterbox{name=B,column=1,above=A}{Second box} +\posterbox{name=C,column=2,above=B}{Third box} +\posterbox{name=D,column=3,above=row2}{Fourth box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + + +\clearpage +\begin{posterlocTcbKey}[][doc new=2017-07-03]{at}{=\meta{name}}{no default, initially unset} + The box is placed at the position with the given \meta{name}. This is + quite likely a predefined node, see \Fullref{subsec:poster_environment}. +\begin{exdispExample}{at} +\begin{tcbposter}[ + poster = {showframe,height=3cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=1,at=middle}{First box} +\posterbox{name=B,column=2,at=row1}{Second box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + + +\begin{posterlocTcbKey}[][doc new=2017-07-03]{between}{=\meta{name1} and \meta{name2}}{no default, initially unset} + The box is placed below a box \meta{name1} and above another box \meta{name2}. Also, + \meta{name1} and \meta{name2} can be predefined nodes, see \Fullref{subsec:poster_environment}. +\begin{exdispExample}{between} +\begin{tcbposter}[ + poster = {showframe,height=3cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=1,below=top}{First box} +\posterbox{name=B,column=1,between=A and bottom}{Second box} +\posterbox{name=C,column=2,above=bottom}{Third box} +\posterbox{name=D,column=2,between=top and C,span=2}{Fourth box} +\posterbox{name=E,column=3,between=D and bottom}{Fifth box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + + +\clearpage +\begin{posterlocTcbKey}[][doc new=2017-07-03]{sequence}{=\meta{sequence}}{no default, initially unset} + The box is broken into partial boxes. These partial boxes are placed + following the given \meta{sequence} of placements. + The feasible syntax for the \meta{sequence} is:\par\medskip + \meta{column a} |between| \meta{name a1} |and| \meta{name a2} |then|\\ + \meta{column b} |between| \meta{name b1} |and| \meta{name b2} |then|\\ + \meta{column c} |between| \meta{name c1} |and| \meta{name c2} |then|\ldots\par\medskip + Obviously, this places the first part box at \meta{column a} between + \meta{name a2} and \meta{name a2}. The second box part is placed + at \meta{column b} between + \meta{name b2} and \meta{name b2}, and so on. + +\begin{exdispExample}{sequence} +\begin{tcbposter}[ + poster = {showframe,height=6cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox[adjusted title=A]{name=A,column=1,below=top,span=2}{First box} +\posterbox{name=B,column=2,above=bottom,span=2}{Second box} +\posterbox[adjusted title=C,colframe=red!50!black,colback=red!50]{ + name=C, sequence=1 between A and bottom then + 2 between A and B then + 3 between top and B + }{\lipsum[2]} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + +\enlargethispage*{2cm} +\begin{docTcbKey}[][doc new=2017-07-03]{placeholder}{}{style, no value} + If the box content of a \refKey{/tcb/posterloc/sequence} is too short + to fill all reserved box parts, the empty boxes are drawn with + the \refKey{/tcb/placeholder} style. This style can be redefined, e.g. + to \refKey{/tcb/blankest}, if nothing should be drawn for empty boxes. +\begin{exdispExample}{placeholder} +\begin{tcbposter}[ + poster = {showframe,height=2.5cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=1,below=top,span=2}{First box} +\posterbox[colframe=red!50!black,colback=red!50]{ + name=B, sequence=1 between A and bottom then + 2 between A and bottom then + 3 between top and bottom + }{Second box followed by placeholder boxes} +\end{tcbposter} +\end{exdispExample} +\end{docTcbKey} + + +\clearpage +\begin{posterlocTcbKey}[][doc new=2017-07-03]{xshift}{=\meta{length}}{no default, initially |0pt|} + Horizontal shift of a box by \meta{length}. +\begin{exdispExample}{xshift} +\begin{tcbposter}[ + poster = {showframe,height=3cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=1,row=1,xshift=6mm}{First box} +\posterbox{name=B,column=2,row=2,xshift=-6mm}{Second box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + + +\begin{posterlocTcbKey}[][doc new=2017-07-03]{yshift}{=\meta{length}}{no default, initially |0pt|} + Vertical shift of a box by \meta{length}. +\begin{exdispExample}{yshift} +\begin{tcbposter}[ + poster = {showframe,height=3cm,spacing=2mm,rows=2}, + boxes = {beamer,colframe=blue!50!black,colback=blue!50,colupper=yellow!50}, +] +\posterbox{name=A,column=1,row=1,yshift=-4mm}{First box} +\posterbox{name=B,column=2,row=2,yshift=4mm}{Second box} +\end{tcbposter} +\end{exdispExample} +\end{posterlocTcbKey} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.quickref.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.quickref.tex new file mode 100644 index 0000000..f9162de --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.quickref.tex @@ -0,0 +1,118 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Quick Reference}\label{sec:quickref}% +\tcbset{external/prefix=external/quickref_}% + +\makeatletter +\begin{tcolorbox}[enhanced,title={tcolorbox}, + enlarge top initially by=1cm,enlarge bottom finally by=1cm,left skip=1cm,right skip=1cm, + colframe=red!50!black!30!white,colback=red!10!white!40!white, + colbacktitle=red!30!white,colupper=black!20!white, + code={\appto\kvtcb@shadow{% + \path[fill=yellow!20!white,draw=yellow!50!black,dashed,line width=0.4pt] + ([xshift=-1cm,yshift=-1cm]frame.south west) rectangle + ([xshift=1cm,yshift=1cm]frame.north east); + }}, + finish={ + \draw[thick,<->] ([yshift=-1.3cm]frame.north west)-- node[below]{\refKey{/tcb/width}} + ([yshift=-1.3cm]frame.north east); + \draw[thick,<->] ([xshift=-15mm]frame.north east)-- node[left,pos=0.35]{\refKey{/tcb/height}} + ([xshift=-15mm]frame.south east); + \draw[thick,<->] (frame.north)-- node[right]{\refKey{/tcb/before}, \refKey{/tcb/before skip}} +(0,1); + \draw[thick,<->] (frame.south)-- node[right]{\refKey{/tcb/after}, \refKey{/tcb/after skip}} +(0,-1); + \draw[thick,<->] (frame.west)-- node[below right,align=center]{\refKey{/tcb/left skip}\\\refKey{/tcb/grow to left by}}+(-1,0); + \draw[thick,<->] (frame.east)-- node[below left,align=center]{\refKey{/tcb/right skip}\\\refKey{/tcb/grow to right by}}+(1,0); + } + ] + \lipsum[1] +\end{tcolorbox} +\makeatother + +\bigskip +\bigskip + +\begin{tcolorbox}[enhanced,title={tcolorbox},before skip=5mm,after skip=5mm, + colframe=red!50!black!30!white,colback=red!10!white!40!white, + colbacktitle=red!30!white,coltext=black!20!white, + toptitle=1mm,bottomtitle=1mm, + overlay={\begin{tcbclipinterior}% + \path[fill=red!10!white!40!yellow!20!white,draw=yellow!50!black,dotted] + ([xshift=1mm,yshift=1mm]interior.south west) + rectangle ([xshift=-1mm,yshift=-1mm]interior.north east); + \path[fill=red!10!white!40!white,draw=yellow!50!black,dotted] ( + [xshift=5mm,yshift=3mm]interior.south west) + rectangle ([xshift=-5mm,yshift=-3mm]interior.north east); + \path[fill=red!10!white!40!yellow!20!white,draw=yellow!50!black,dotted] + ([xshift=5mm,yshift=-1mm]segmentation.south west) + rectangle ([xshift=-5mm,yshift=1mm]segmentation.north east); + \path[fill=red!10!white!40!white,draw=yellow!50!black,dotted] + ([xshift=5mm,yshift=1mm]segmentation.south west) + rectangle ([xshift=-5mm,yshift=-1mm]segmentation.north east); + \path[dashed,draw=red!50!black!30!white] (segmentation.west) -- (segmentation.east); + \end{tcbclipinterior}% + \begin{tcbcliptitle} + \path[fill=red!30!white!70!yellow,draw=yellow!50!black,dotted] + ([xshift=1mm,yshift=1mm]title.south west) + rectangle ([xshift=-1mm,yshift=-1mm]title.north east); + \path[fill=red!30!white,draw=yellow!50!black,dotted] + ([xshift=5mm,yshift=2mm]title.south west) + rectangle ([xshift=-5mm,yshift=-2mm]title.north east); + \end{tcbcliptitle}}, + finish={ + \coordinate (A) at ([yshift=-0.25mm]frame.north); + \draw[thick,<-] (A) -- +(-1,0.3) node[left]{\refKey{/tcb/toprule}}; + \coordinate (A) at ([yshift=-0.75mm]A); + \draw[thick,<-] (A) -- +(1,0) node[right]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([yshift=-1mm]A); + \draw[thick,<-] (A) -- +(-1,0) node[left]{\refKey{/tcb/toptitle}}; + % + \coordinate (A) at ([yshift=1.00mm]interior.north); + \draw[thick,<-] (A) -- +(1,0) node[right]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([yshift=1mm]A); + \draw[thick,<-] (A) -- +(-1,0) node[left]{\refKey{/tcb/bottomtitle}}; + \coordinate (A) at ([yshift=0.25mm]interior.north); + \draw[thick,<-] (A) -- +(-1,-0.4) node[left]{\refKey{/tcb/titlerule}}; + \coordinate (A) at ([yshift=-0.5mm]interior.north); + \draw[thick,<-] (A) -- +(1,-0.2) node[right]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([yshift=-1.5mm]A); + \draw[thick,<-] (A) -- +(-1,-0.6) node[left]{\refKey{/tcb/top}}; + % + \coordinate (A) at ([yshift=2.0mm]segmentation); + \draw[thick,<-] (A) -- +(-1,0) node[left]{\refKey{/tcb/middle}}; + \coordinate (A) at ([yshift=0.5mm]segmentation); + \draw[thick,<-] (A) -- +(1,0.2) node[right]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([yshift=-0.5mm]segmentation); + \draw[thick,<-] (A) -- +(1,-0.2) node[right]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([yshift=-2.0mm]segmentation); + \draw[thick,<-] (A) -- +(-1,0) node[left]{\refKey{/tcb/middle}}; + % + \coordinate (A) at ([yshift=0.25mm]frame.south); + \draw[thick,<-] (A) -- +(-1,-0.3) node[left]{\refKey{/tcb/bottomrule}}; + \coordinate (A) at ([yshift=0.75mm]A); + \draw[thick,<-] (A) -- +(1,0) node[right]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([yshift=1.5mm]A); + \draw[thick,<-] (A) -- +(-1,0) node[left]{\refKey{/tcb/bottom}}; + % + \coordinate (A) at ([xshift=0.25mm]frame.west); + \draw[thick,<-] (A) -- +(-0.3,-1) node[below]{\refKey{/tcb/leftrule}}; + \coordinate (A) at ([xshift=0.75mm]A); + \draw[thick,<-] (A) -- +(0,1) node[above]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([xshift=2.5mm]A); + \draw[thick,<-] (A) -- +(0.7,0.5) node[above right]{\refKey{/tcb/left}}; + % + \coordinate (A) at ([xshift=-0.25mm]frame.east); + \draw[thick,<-] (A) -- +(0.3,-1) node[below]{\refKey{/tcb/rightrule}}; + \coordinate (A) at ([xshift=-0.75mm]A); + \draw[thick,<-] (A) -- +(0,1) node[above]{\refKey{/tcb/boxsep}}; + \coordinate (A) at ([xshift=-2.5mm]A); + \draw[thick,<-] (A) -- +(-0.7,0.5) node[above left]{\refKey{/tcb/right}}; + } + ] + \lipsum[1] + \tcblower + \lipsum[2] +\end{tcolorbox} + + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.raster.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.raster.tex new file mode 100644 index 0000000..33a8941 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.raster.tex @@ -0,0 +1,892 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{raster}}\label{sec:raster}% +\tcbset{external/prefix=external/raster_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{raster} +\end{dispListing} +%This also loads the package |xparse| \cite{latexproject:2015a}. + +%The purpose of this library is to give comfortable access to the +%powerful document command production with |xparse| for |tcolorbox|. +%See the |xparse| package documentation \cite{latexproject:2015a} +%for details about the argument \meta{specification} used in this section. + +\subsection{Concept of Rasters}\label{subsec:raster_overview} + +A \emph{raster} is used to align several colored boxes in a regular way. +It can be seen as a far related counterpart to the |matrix| construct +of \tikzname, but it differs in many aspects. + +In principle, |tcolorbox|es are arranged in rows and columns when put +inside a \refEnv{tcbraster} environment. The boxes are fluently added to the +raster like adding text to a paragraph. +Especially, line/row breaks are done +automatically and one cannot end a line/row ahead of schedule. +Further, a \emph{raster} is not restricted to a single page but may +break into an arbitrary series of pages. + +\bigskip +\begin{tcolorbox}[enhanced,size=tight,boxrule=0pt,frame hidden, + top=5mm,bottom=5mm,colback=yellow!20!white, + borderline={0.4pt}{0pt}{dashed,yellow!50!black}, + finish={ + \draw[thick,<->] ([yshift=-1.3cm]frame.north west)-- node[below]{\refKey{/tcb/raster width}} + ([yshift=-1.3cm]frame.north east); + \draw[thick,<->] ([xshift=5mm,yshift=-5mm]frame.north east)-- node[left,pos=.75]{\refKey{/tcb/raster height}} + ([xshift=5mm,yshift=5mm]frame.south east); + }] + \begin{tcbitemize}[enhanced,fontupper=\tiny, + title={Box \#\thetcbrasternum}, + colframe=red!50!black!30!white,colback=red!10!white!40!white, + colupper=black!20!white, + raster equal height=rows, + raster left skip=5mm,raster right skip=5mm, + raster before skip=5mm,raster after skip=5mm, + raster row skip=3mm,raster column skip=3mm, + ] + \tcbitem[finish={% + \draw[thick,<->] (frame.west)-- node[below right]{\refKey{/tcb/raster left skip}}+(-0.5,0); + \draw[thick,<->] (frame.north)-- node[right]{\refKey{/tcb/raster before skip}} +(0,0.5); + \draw[thick,<->] (frame.south)-- node[above]{\refKey{/tcb/raster row skip}} +(0,-0.3); + }] \lipsum[1] + \tcbitem[finish={ + \draw[thick,<->] (frame.east)-- node[below left]{\refKey{/tcb/raster right skip}}+(0.5,0); + \draw[thick,<->] ([yshift=5mm]frame.south west)-- node[above]{\refKey{/tcb/raster column skip}}+(-0.3,0); + }] \lipsum[2] + \tcbitem[finish={% + \draw[thick,<->] (frame.south)-- node[right]{\refKey{/tcb/raster after skip}} +(0,-0.5); + }] \lipsum[3] + \tcbitem \lipsum[4] + \end{tcbitemize} +\end{tcolorbox} + +\clearpage +\begin{tcboutputlisting} +\begin{tcbraster}[raster columns=3,raster rows=3,raster height=\linewidth, + enhanced,size=small,sharp corners,arc=8mm,colframe=red!50!black, + colback=yellow!10!white,watermark overzoom=1.0,fit algorithm=hybrid* ] + \begin{tcolorbox}[rounded corners=northwest,boxrule=0pt, + watermark graphics=lichtspiel.jpg]\end{tcolorbox} + \tcboxfit{\lipsum[1]} + \begin{tcolorbox}[rounded corners=northeast,boxrule=0pt, + watermark graphics=goldshade.png]\end{tcolorbox} + \tcboxfit{\lipsum[2]} + \begin{tcolorbox}[valign=center,halign=center]Nine Boxes.\end{tcolorbox} + \tcboxfit{\lipsum[3]} + \begin{tcolorbox}[rounded corners=southwest,boxrule=0pt, + watermark graphics=goldshade.png]\end{tcolorbox} + \tcboxfit{\lipsum[4]} + \begin{tcolorbox}[rounded corners=southeast,boxrule=0pt, + watermark graphics=lichtspiel.jpg]\end{tcolorbox} +\end{tcbraster} +\end{tcboutputlisting} + +\tcbinputlisting{base example,listing only,listing style=mydocumentation} + +\bigskip +{\tcbuselistingtext} + +\clearpage +\subsection{Macros of the Library}\label{subsec:raster_macros} + +\begin{docEnvironment}[doc new and updated={2014-11-10}{2017-02-01}]{tcbraster}{\oarg{options}} +A raster arranges enclosed boxes in a regular way, mainly into rows and +columns. The \meta{options} are used to control the raster +parameters and to set the properties for the enclosed boxes. +\begin{itemize} +\item The \emph{raster} is only allowed to contain a series of + \refEnv{tcolorbox} environments or derived constructs. + With some small restrictions, boxes created with \refCom{tcboxfit} can also be added. + Boxes created with \refCom{tcbox} are not reasonable here, but may be + used to a certain degree. +\item Do not add anything else between the boxes inside the raster with + exception of white\-space. Especially, do not use |\\| or |\par| to end + a row; row breaks are done automatically. +\item The boxes inside a raster are numbered automatically. + \docAuxCommand{thetcbrasternum} may be used inside a box to access + this number. +\end{itemize} + +\begin{dispExample} +\begin{tcbraster}[raster columns=3, raster equal height, + size=small,colframe=red!50!black,colback=red!10!white,colbacktitle=red!50!white, + title={Box \# \thetcbrasternum}] + \begin{tcolorbox}First box\end{tcolorbox} + \begin{tcolorbox}Second box\end{tcolorbox} + \begin{tcolorbox}This is a box\\with a second line\end{tcolorbox} + \begin{tcolorbox}Another box\end{tcolorbox} + \begin{tcolorbox}A box again\end{tcolorbox} +\end{tcbraster} +\end{dispExample} + +\begin{dispExample} +\begin{tcbraster}[raster columns=2, raster equal height=rows, + size=small,colframe=red!50!black,colback=red!10!white,colbacktitle=red!50!white, + title={Box \# \thetcbrasternum}] + \begin{tcolorbox}First box\end{tcolorbox} + \begin{tcolorbox}Second box\end{tcolorbox} + \begin{tcolorbox}This is a box\\with a second line\end{tcolorbox} + \begin{tcolorbox}Another box\end{tcolorbox} + \begin{tcolorbox}A box again\end{tcolorbox} +\end{tcbraster} +\end{dispExample} +\end{docEnvironment} + + +\clearpage + +\begin{docEnvironment}[doc new=2014-11-10]{tcbitemize}{\oarg{options}} +This is a special case of a \refEnv{tcbraster} with the given \meta{options}. +\begin{itemize} +\item Here, the enclosed boxes are created using \refCom{tcbitem}. +\item There has to be at least one \refCom{tcbitem}. +\item One cannot use anything else than \refCom{tcbitem} to add something + to the \emph{raster}. +\end{itemize} +This leads to a very compact syntax. + +\begin{dispExample} +\begin{tcbitemize}[raster columns=2, raster equal height=rows, + size=small,colframe=red!50!black,colback=red!10!white,colbacktitle=red!50!white, + title={Box \# \thetcbrasternum}] + \tcbitem First box + \tcbitem Second box + \tcbitem This is a box\\with a second line + \tcbitem[colback=yellow,colbacktitle=yellow!50!black] Another box + \tcbitem A box again +\end{tcbitemize} +\end{dispExample} + +\begin{marker} +\refEnv{tcbitemize} has more restrictions than \refEnv{tcbraster}. +Especially, the \refKey{/tcb/capture} mode has to be \docValue{minipage}. +For example, \refKey{/tcb/fit} cannot be used safely. +If \refKey{/tcb/fit} should be used, turn over to \refEnv{tcbraster}. +\end{marker} +\end{docEnvironment} + + +\begin{docCommand}[doc new=2014-11-10]{tcbitem}{\oarg{options}} + Used inside \refEnv{tcbitemize} to create a new \refEnv{tcolorbox} + with the given \meta{options}. +\end{docCommand} + + +\clearpage +\begin{docEnvironment}[doc new=2016-02-19]{tcboxedraster}{\oarg{raster options}\marg{box options}} + This is a convenience environment which combines a \refEnv{tcolorbox} with + an embedded \refEnv{tcbraster}. The \meta{box options} are given to the + outer \refEnv{tcolorbox}, while the \meta{raster options} are given to the + embedded \refEnv{tcbraster}. + This environment is especially useful for rasters inside rasters. + +\begin{dispExample} +\begin{tcboxedraster}[raster columns=3, raster equal height, + size=small,colframe=red!50!black,colback=red!10!white,colbacktitle=red!50!white, + title={Box \# \thetcbrasternum}] + {colback=yellow!10,fonttitle=\bfseries,title=Boxed Raster} + \begin{tcolorbox}First box\end{tcolorbox} + \begin{tcolorbox}Second box\end{tcolorbox} + \begin{tcolorbox}This is a box\\with a second line\end{tcolorbox} + \begin{tcolorbox}Another box\end{tcolorbox} + \begin{tcolorbox}A box again\end{tcolorbox} +\end{tcboxedraster} +\end{dispExample} + +\begin{dispExample} +% \tcbuselibrary{skins} +\begin{tcbraster}[raster columns=2, raster equal height, + raster every box/.style={size=small,colframe=red!50!black,colback=red!10!white, + valign=center,halign=center}] + \begin{tcolorbox}One\end{tcolorbox} + \begin{tcolorbox}Two\end{tcolorbox} + \begin{tcboxedraster}{blankest} + \begin{tcolorbox}Three\end{tcolorbox} + \begin{tcolorbox}Four\end{tcolorbox} + \begin{tcolorbox}Five\end{tcolorbox} + \begin{tcolorbox}Six\end{tcolorbox} + \end{tcboxedraster} + \begin{tcolorbox}Seven\end{tcolorbox} +\end{tcbraster} +\end{dispExample} +\end{docEnvironment} + + +\clearpage +\begin{docEnvironment}[doc new=2016-04-27]{tcboxeditemize}{\oarg{raster options}\marg{box options}} + This is a convenience environment which combines a \refEnv{tcolorbox} with + an embedded \refEnv{tcbitemize}. The \meta{box options} are given to the + outer \refEnv{tcolorbox}, while the \meta{raster options} are given to the + embedded \refEnv{tcbitemize}. + This environment is especially useful for rasters inside rasters. + +\begin{dispExample} +\begin{tcboxeditemize}[raster columns=3, raster equal height, + size=small,colframe=red!50!black,colback=red!10!white,colbacktitle=red!50!white, + title={Box \# \thetcbrasternum}] + {colback=yellow!10,fonttitle=\bfseries,title=Boxed Itemize} + \tcbitem First box + \tcbitem Second box + \tcbitem This is a box\\with a second line + \tcbitem Another box + \tcbitem A box again +\end{tcboxeditemize} +\end{dispExample} +\end{docEnvironment} + + +\clearpage +\subsection{Option Keys of the Library}\label{subsec:raster_options} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster columns}{=\meta{number}}{no default, initially |2|} + Sets the \meta{number} of columns for a \emph{raster}. +\begin{dispExample} +\begin{tcbitemize}[raster columns=3, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\begin{tcbitemize}[raster columns=4, + size=small,colframe=blue!50!black,colback=blue!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster rows}{=\meta{number}}{no default, initially |2|} + Sets the \meta{number} of rows for a \emph{raster}. + Note that this is only relevant in connection with setting \refKey{/tcb/raster height} + to a value greater than |0pt|. Then, it defines the number of rows \emph{per} given + height. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster width}{=\meta{length}}{no default, initially \cs{linewidth}} + Sets the total raster width to the given \meta{length}. + \refKey{/tcb/raster left skip} and \refKey{/tcb/raster right skip} are part + of the total width. +\begin{dispExample} +\begin{tcbitemize}[raster width=\linewidth/2, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2014-11-10]{raster height}{=\meta{length}}{no default, initially |0pt|} + Sets the raster height \emph{per} \refKey{/tcb/raster rows} to the given \meta{length}. + This forces an appropriate height for the enclosed boxes. + \refKey{/tcb/raster before skip} and \refKey{/tcb/raster after skip} + are not part of this calculation. + If the \meta{length} is set to |0pt|, this feature is deactivated. +\begin{dispExample} +\begin{tcbitemize}[raster height=4cm, raster rows=2, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem[enhanced, + finish={\draw[blue,very thick,<->] (frame.south) + -- node[right,pos=.75]{4cm} +(0,4); }] + Three + \tcbitem Four + \tcbitem Five +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new and updated={2014-11-10}{2014-12-16}]{raster before skip}{=\meta{glue}}{no default, initially |2mm|} + Space of the given \meta{glue} is inserted vertically before the \emph{raster}. + This space is discardable. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new and updated={2014-11-10}{2014-12-16}]{raster after skip}{=\meta{glue}}{no default, initially |2mm|} + Space of the given \meta{glue} is inserted vertically after the \emph{raster}. + This space is discardable. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2015-01-08]{raster equal skip}{=\meta{length}}{style, no default} + Shortcut to set + \refKey{/tcb/raster before skip}, + \refKey{/tcb/raster after skip}, + \refKey{/tcb/raster column skip}, and + \refKey{/tcb/raster row skip} + to the same \meta{length} value. +\begin{dispExample} +\begin{tcbitemize}[raster equal skip=4mm, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\clearpage + +\begin{docTcbKey}[][doc new=2014-11-10]{raster left skip}{=\meta{length}}{no default, initially |0pt|} + Space of the given \meta{length} is inserted horizontally left of the \emph{raster}. +\begin{dispExample} +\begin{tcbitemize}[raster left skip=2cm, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster right skip}{=\meta{length}}{no default, initially |0pt|} + Space of the given \meta{length} is inserted horizontally right of the \emph{raster}. +\begin{dispExample} +\begin{tcbitemize}[raster right skip=2cm, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + +\enlargethispage*{1cm} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster column skip}{=\meta{length}}{no default, initially |2mm|} + Space of the given \meta{length} is inserted horizontally between the columns. +\begin{dispExample} +\begin{tcbitemize}[raster column skip=2cm, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster row skip}{=\meta{length}}{no default, initially |2mm|} + Space of the given \meta{length} is inserted vertically between the rows. +\begin{dispExample} +\begin{tcbitemize}[raster row skip=0pt, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}[][doc new=2014-11-10]{raster halign}{=\meta{alignment}}{no default, initially \docValue{left}} + Defines the horizontal alignment for the boxes of the rows of a \emph{raster}, + if these rows are not completely filled (mainly: the last one). + + Feasible values for \meta{alignment} are: + \begin{itemize} + \item\docValue{left}: align to the left side, + \item\docValue{center}: align to the center, + \item\docValue{right}: align to the right side. + \end{itemize} + +\begin{dispExample} +\begin{tcbitemize}[raster halign=center, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem Three +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster valign}{=\meta{alignment}}{no default, initially \docValue{center}} + Defines the vertical alignment for the boxes of a row, + if the boxes do not have equal height. This sets the + \refKey{/tcb/box align} option. + + Feasible values for \meta{alignment} are: + \begin{itemize} + \item\docValue{top}: align to the top side, + \item\docValue{center}: align to the center, + \item\docValue{bottom}: align to the bottom side. + \end{itemize} + +\begin{dispExample} +\begin{tcbitemize}[raster valign=top, raster columns=3, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem \Huge One + \tcbitem \Large Two + \tcbitem Three +\end{tcbitemize} +\begin{tcbitemize}[raster valign=center, raster columns=3, + size=small,colframe=blue!50!black,colback=blue!10!white] + \tcbitem \Huge One + \tcbitem \Large Two + \tcbitem Three +\end{tcbitemize} +\begin{tcbitemize}[raster valign=bottom, raster columns=3, + size=small,colframe=green!50!black,colback=green!10!white] + \tcbitem \Huge One + \tcbitem \Large Two + \tcbitem Three +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new and updated={2014-11-10}{2017-02-28}]{raster equal height}{=\meta{type}}{default \docValue{all}, initially \docValue{none}} + Puts the enclosed boxes into a common \refKey{/tcb/equal height group}. + The \meta{id} of the equal height group is chosen automatically, but + it may be set manually by \refKey{/tcb/raster equal height group}. + Also see \refKey{/tcb/minimum for current equal height group}. + + Feasible values for \meta{type} are: + \begin{itemize} + \item\docValue{none}: no equal height setting, + \item\docValue{rows}: all boxes in a row are set to equal height, + \item\docValue{all}: all boxes in the raster are set to equal height. + \end{itemize} + Note that you have to compile twice to see changes. + +\begin{dispExample} +\begin{tcbitemize}[raster equal height=rows, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem \Huge Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\begin{dispExample} +\begin{tcbitemize}[raster equal height, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem \Huge Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster equal height group}{=\meta{id}}{no default} + Overwrites the automatically chosen id with the given \meta{id}. + If this is used to share a common height between the \emph{raster} and + another raster or box, the \refKey{/tcb/raster equal height} option + should be set to \docValue{all}. +\begin{dispExample} +\tcbset{size=small,colframe=red!50!black,colback=red!10!white} +\begin{tcolorbox}[equal height group=raster-manual-id] + A single box +\end{tcolorbox} +\begin{tcbitemize}[raster equal height,raster equal height group=raster-manual-id] + \tcbitem One + \tcbitem \Huge Two +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\clearpage + +\begin{docTcbKey}[][doc new=2014-11-10]{raster force size}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + Enforces the raster size computations onto the enclosed boxes. + If set to \docValue{false}, individual settings can be used (for the better or worse). +\begin{dispExample} +\begin{tcbitemize}[raster force size=false, raster halign=center, + size=small,colframe=red!50!black,colback=red!10!white] + \tcbitem One + \tcbitem Two + \tcbitem[add to width=-3cm] Three + \tcbitem[add to width=-3cm] Four + \tcbitem[add to width=-3cm] Five + \tcbitem[add to width=3cm] Six +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster reset}{}{no value} + Sets all raster settings back to their default values. + Note that \refKey{/tcb/reset} does not execute this option. + Style settings like \refKey{/tcb/raster odd column} etc. are not + touched by \refKey{/tcb/raster reset}. +\end{docTcbKey} + + + +\subsection{Adding Styles for Specific Boxes}\label{subsec:raster_styles} + +The following styles can be defined to address certain boxes inside +a \emph{raster}. Note that such style definitions are not removed by +\refKey{/tcb/reset} or \refKey{/tcb/raster reset}. +The style definitions are used in the order given below. + +\begin{docTcbKey}[][doc new=2014-11-24]{raster every box}{}{style} +This style is used for every box. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster odd column}{}{style} +This style is used for every box in an odd column. +\begin{dispExample} +\begin{tcbitemize}[size=small,colframe=red!50!black,colback=red!10!white, + raster odd column/.style={colframe=blue!50!black,colback=blue!10!white}] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster even column}{}{style} +This style is used for every box in an even column. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster column n}{}{style} +This style is used for every box in the |n|-th column. +|n| has to be replaced by a number. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster odd row}{}{style} +This style is used for every box in an odd row. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster even row}{}{style} +This style is used for every box in an even row. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster row m}{}{style} +This style is used for every box in the |m|-th row. +|m| has to be replaced by a number. +\begin{dispExample} +\begin{tcbitemize}[size=small,colframe=red!50!black,colback=red!10!white, + raster row 2/.style={colframe=blue!50!black,colback=blue!10!white}] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster odd number}{}{style} +This style is used for every box with an odd number. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-10]{raster even number}{}{style} +This style is used for every box with an even number. +\begin{dispExample} +\begin{tcbitemize}[size=small,colframe=red!50!black,colback=red!10!white, + raster columns=3, + raster even number/.style={colframe=blue!50!black,colback=blue!10!white}] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four + \tcbitem Five + \tcbitem Six +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster row m column n}{}{style} +This style is used for the box in the +|m|-th row and |n|-th column. +|m| and |n| have to be replaced by numbers. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-11-10]{raster number n}{}{style} +This style is used for the box with number |n|. +|n| has to be replaced by a number. +\begin{dispExample} +\begin{tcbitemize}[size=small,colframe=red!50!black,colback=red!10!white, + raster number 4/.style={colframe=blue!50!black,colback=blue!10!white}] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\subsection{Combining Columns or Rows}\label{subsec:raster_multicolrow} + +\begin{docTcbKey}[][doc new=2016-02-19]{raster multicolumn}{=\meta{number}}{no default, initially unset} + This option has to be set inside the option list of a \refEnv{tcolorbox} + inside a \refEnv{tcbraster} or inside \refCom{tcbitem} inside \refEnv{tcbitemize}. + It merges the given \meta{number} of boxes into one single box + on the same line. The resulting box gets the \docAuxCommand{thetcbrasternum} + of the first box. + If there are not enough boxes available on the current line, this option + is ignored and a warning is given. + +\begin{dispExample} +\begin{tcbitemize}[raster equal height=rows,raster columns=3, + title=\thetcbrasternum,colframe=red!50!black,colback=red!10!white] +\tcbitem[colframe=blue!50!black,colback=blue!10!white,raster multicolumn=1] + multicolumn=1 +\tcbitem +\tcbitem +\tcbitem[colframe=blue!50!black,colback=blue!10!white,raster multicolumn=2] + multicolumn=2 +\tcbitem +\tcbitem[colframe=blue!50!black,colback=blue!10!white,raster multicolumn=3] + multicolumn=3 +\tcbitem +\tcbitem[colframe=blue!50!black,colback=blue!10!white,raster multicolumn=2] + multicolumn=2 +\end{tcbitemize} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2016-02-19]{raster multirow}{=\meta{number}}{no default, initially unset} + This option has to be set inside the option list of a \refEnv{tcolorbox} + inside a \refEnv{tcbraster} or inside \refCom{tcbitem} inside \refEnv{tcbitemize}. + This option not really merges boxes, but simply sizes the current box to fit + the space of \meta{number} rows. + + \begin{marker} + \refKey{/tcb/raster multirow} needs \refKey{/tcb/raster height} to be set. + How to achieve a similar result for boxes without fixed \refKey{/tcb/raster height} + is shown afterwards. + \end{marker} + +\begin{dispExample} +\begin{tcbitemize}[raster rows=3,raster columns=3,raster height=6cm, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] +\tcbitem +\tcbitem +\tcbitem +\tcbitem[colframe=blue!50!black,colback=blue!10!white,raster multirow=2] + multirow=2 +\tcbitem[raster multicolumn=2,raster multirow=2,blankest] + \begin{tcbitemize}[raster rows=2,raster columns=2,raster height=\tcbtextheight] + \tcbitem + \tcbitem + \tcbitem + \tcbitem + \end{tcbitemize} +\end{tcbitemize} +\end{dispExample} + + +\clearpage +For rasters without fixed \refKey{/tcb/raster height}, \refKey{/tcb/raster multirow} +cannot be used. Note that \refCom{tcbtextheight} also cannot be used like +in the previous example. + +But, with combination of \refKey{/tcb/raster equal height} and +\refKey{/tcb/space to}, a similar effect can be created: + +\begin{dispExample} +\begin{tcbitemize}[raster columns=3,raster equal height=rows, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] +\tcbitem +\tcbitem +\tcbitem +\tcbitem[colframe=blue!50!black,colback=blue!10!white] + \lipsum[2] +\tcbitem[raster multicolumn=2,blankest,space to=\myspace] + \begin{tcbitemize}[raster columns=2] + \tcbitem This is a box of the inner raster. + \tcbitem + \tcbitem[height=\myspace] + \tcbitem[height=\myspace] + \end{tcbitemize} +\end{tcbitemize} +\end{dispExample} + +\end{docTcbKey} + + + +\clearpage +\subsection{Rasters inside Rasters}\label{subsec:raster_insideraster} + +A \emph{raster} inside a \emph{raster} cannot be used directly, because +a \emph{raster} can only contain a \emph{tcolorbox} or something +derived from a \emph{tcolorbox}. So, a \emph{raster} can be put inside +a \emph{tcolorbox} inside a \emph{raster}. + +Some examples for such constructions can be found at \refEnv{tcboxedraster}, +\refKey{/tcb/raster multicolumn}, +\refKey{/tcb/raster multirow}. + + +\subsubsection{Raster Setup} +The intermediating \refEnv{tcolorbox} can be made invisible by using +\refKey{/tcb/blankest}. + +\begin{dispExample} +\begin{tcbraster}[raster equal height=rows, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] + \begin{tcolorbox}[blankest] + \begin{tcbraster}[raster columns=1] + \begin{tcolorbox}One\end{tcolorbox} + \begin{tcolorbox}Two\end{tcolorbox} + \end{tcbraster} + \end{tcolorbox} + \begin{tcolorbox}raster+tcolorbox+raster\end{tcolorbox} +\end{tcbraster} +\end{dispExample} + +\enlargethispage*{1cm} +\begin{dispExample} +\begin{tcbraster}[raster equal height=rows, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] + \begin{tcboxedraster}[raster columns=1]{blankest} + \begin{tcolorbox}One\end{tcolorbox} + \begin{tcolorbox}Two\end{tcolorbox} + \end{tcboxedraster} + \begin{tcolorbox}raster+tcboxedraster\end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\begin{dispExample} +\begin{tcbitemize}[raster equal height=rows, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] + \tcbitem[blankest] + \begin{tcbitemize}[raster columns=1] + \tcbitem One + \tcbitem Two + \end{tcbitemize} + \tcbitem tcbitemize+tcbitem+tcbitemize +\end{tcbitemize} +\end{dispExample} + + +\subsubsection{Placing Spaces} +If the heights of boxes inside staggered rasters should be matched, the +space has to be distributed accordingly. + +\begin{itemize} +\item For fixed height boxes/rasters using \refKey{/tcb/raster height}, + the height of boxes is available by \refCom{tcbtextheight}. This can be + used to size deeper layered boxes/rasters. +\item For boxes/rasters layed out using \refKey{/tcb/raster equal height}, + space can be distributed by \refKey{/tcb/space to}. + It can take several compilations until all spaces are distributed correctly. +\end{itemize} + + +\begin{dispExample} +\begin{tcbitemize}[raster rows=2,raster height=6cm, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] + \tcbitem[blankest] + \begin{tcbitemize}[raster columns=1,raster rows=2,raster height=\tcbtextheight] + \tcbitem One + \tcbitem Two + \end{tcbitemize} + \tcbitem This is a fixed height box. + \tcbitem Three + \tcbitem Four +\end{tcbitemize} +\end{dispExample} + + +\begin{dispExample} +\begin{tcbitemize}[raster columns=4,raster rows=4,raster height=0.8\linewidth, + raster every box/.style={size=small,beamer, + colframe=blue!75!yellow,colback=red!75!yellow!20, + center title,title=Box}] + \tcbitem One + \tcbitem Two + \tcbitem Three + \tcbitem Four + \tcbitem[raster multirow=2,blankest] + \begin{tcbitemize}[raster columns=1,raster rows=2,raster height=\tcbtextheight] + \tcbitem Twelve + \tcbitem Eleven + \end{tcbitemize} + \tcbitem[raster multirow=2,raster multicolumn=2, + colframe=red!75!yellow,colback=blue!75!yellow!20] + This is an example with fixed height boxes. + \tcbitem[raster multirow=2,blankest] + \begin{tcbitemize}[raster columns=1,raster rows=2,raster height=\tcbtextheight] + \tcbitem Five + \tcbitem Six + \end{tcbitemize} + \tcbitem Ten + \tcbitem Nine + \tcbitem Eight + \tcbitem Seven +\end{tcbitemize} +\end{dispExample} + + +\begin{dispExample} +\begin{tcbitemize}[raster equal height=rows, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] + \tcbitem[blankest,space to=\myspace] + \begin{tcbitemize}[raster columns=1] + \tcbitem One + \tcbitem[add to natural height=\myspace] + This box will adapt its height. + \end{tcbitemize} + \tcbitem This is a flexible height box. + \tcbitem \lipsum[4] + \tcbitem[blankest,space to=\myspace] + \begin{tcbitemize}[raster columns=1] + \tcbitem One + \tcbitem[add to natural height=\myspace] + This box will adapt its height. + \end{tcbitemize} +\end{tcbitemize} +\end{dispExample} + + + +\begin{dispExample} +\begin{tcbitemize}[raster equal height=rows, + raster every box/.style={colframe=red!50!black,colback=red!10!white}] + \tcbitem[blankest,space to=\myspace] + \begin{tcbitemize}[raster columns=1] + \tcbitem One + \tcbitem[add to natural height=\myspace] + This box will adapt its height. + \tcbitem \lipsum[4] + \end{tcbitemize} + \tcbitem[blankest,space to=\myspace] + \begin{tcbitemize}[raster columns=1] + \tcbitem[blankest]\includegraphics[width=\linewidth]{goldshade.png} + \tcbitem[add to natural height=\myspace] + This box will adapt its height. + \end{tcbitemize} +\end{tcbitemize} +\end{dispExample} + + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.recording.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.recording.tex new file mode 100644 index 0000000..75c016f --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.recording.tex @@ -0,0 +1,187 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Recording}\label{sec:recording}% +\tcbset{external/prefix=external/recording_}% +The package provides some macros and options to take \emph{records} during +compilation. This is done by \LaTeX\ file operations to save some data +to a file for later usage. The main application scenario is depicted in +\Vref{sec:recording-exercises} where +information about example solutions is recorded and read again +in \Vref{sec:recording-solutions}. + +\subsection{Macros}\label{sec:recording-makros} +\begin{docCommand}[doc new=2014-11-28]{tcbstartrecording}{\oarg{file name}} + Opens a file denoted by \meta{file name} for writing the records. + The default file name is |\jobname.records|. + See \Vref{sec:recording-exercises} for an example application. +\end{docCommand} + +\begin{docCommand}[doc new=2014-11-28]{tcbrecord}{\marg{content}} + Records any \meta{content} to the record file. + \refCom{tcbrecord} is implemented as |\immediate\write|. + \refCom{tcbstartrecording} has to be called before; otherwise, \refCom{tcbrecord} + is silently ignored. +\begin{dispListing} +\tcbrecord{\string\solution{\thetcbcounter}{solutions/exercise-\thetcbcounter.tex}} +\end{dispListing} +\end{docCommand} + +\begin{docCommand}[doc new=2014-11-28]{tcbstoprecording}{} + Closes the current record file which was opened by \refCom{tcbstartrecording} + before. +\end{docCommand} + +\begin{docCommand}[doc new=2014-11-28]{tcbinputrecords}{\oarg{file name}} + Opens a file denoted by \meta{file name} for reading the records via |\input|. + The default file name is the name of the last used record file for saving. + \refCom{tcbstoprecording} has to be called before. +\end{docCommand} + + +\subsection{Options}\label{sec:recording-options} +\begin{docTcbKey}[][doc new=2014-11-28]{record}{=\meta{content}}{style, no default} + Records any \meta{content} to the record file, see \refCom{tcbrecord}. + This key can be used several times to write several lines. + \begin{dispListing} + record={\string\solution{\thetcbcounter}{solutions/exercise-\thetcbcounter.tex}} + \end{dispListing} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-11-28]{no recording}{}{} + Disables \refCom{tcbrecord} and \refKey{/tcb/record} inside the current + group. +\end{docTcbKey} + + +\clearpage +\subsection{Example: Exercises}\label{sec:recording-exercises} +The following application example creates exercises and their corresponding +solutions. Each pair is generated inside a single |tcolorbox| where the +solution is given below \refCom{tcblower}. For every example, the solution part +is saved by \refKey{/tcb/savelowerto} to a file. The saving is recorded using +\refKey{/tcb/record}. To enlighten the possibilities, the second exercise +has no solution. Finally, the solutions are input in \Vref{sec:recording-solutions}. + +\inputpreamblelisting{L} + +\begin{dispListing*}{breakable,before upper=} +\tcbstartrecording + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x)=\sin((\sin x)^2) + \end{equation*} +\tcblower + The derivative is: + \begin{align*} + f'(x) &= \left( \sin((\sin x)^2) \right)' + =\cos((\sin x)^2) 2\sin x \cos x. + \end{align*} +\end{exercise} + +\begin{exercise}[no solution] + It holds: + \begin{equation*} + \frac{d}{dx}\left(\ln|x|\right) = \frac{1}{x}. + \end{equation*} +\end{exercise} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x)=(\sin(\sin x))^2 + \end{equation*} +\tcblower + The derivative is: + \begin{align*} + f'(x) &= \left( (\sin(\sin x))^2 \right)' + =2\sin(\sin x)\cos(\sin x)\cos x. + \end{align*} +\end{exercise} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x)=\sqrt{x^3-6x^2+2x} + \end{equation*} +\tcblower + The derivative is: + \begin{align*} + f'(x) &= \left( \sqrt{x^3-6x^2+2x} \right)' + = \frac{3x^2-12x+2}{2\sqrt{x^3-6x^2+2x}}. + \end{align*} +\end{exercise} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x)=\left(\frac{2+3x}{1-2x}\right)^3 + \end{equation*} +\tcblower + The derivative is: + \begin{align*} + f'(x) &= \left( \left(\frac{2+3x}{1-2x}\right)^3 \right)' + = 3 \left(\frac{2+3x}{1-2x}\right)^2 \frac{(1-2x)3-(2+3x)(-2)}{(1-2x)^2} + = \frac{21(2+3x)^2}{(1-2x)^4}. + \end{align*} +\end{exercise} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x)=\frac{\cos x}{(\tan 2x)^2} + \end{equation*} +\tcblower + The derivative is: + \begin{align*} + f'(x) &= \left( \frac{\cos x}{(\tan 2x)^2} \right)' + = \left( \frac{\cos x (\cos 2x)^2}{(\sin 2x)^2} \right)'\\ + &= \frac{(\sin 2x)^2 [(-\sin x)(\cos 2x)^2+(\cos x)4\cos 2x (-\sin 2x)] + - \cos x (\cos 2x)^2 4\sin 2x \cos 2x}{(\sin 2x)^4}\\ + &= -\frac{\cos(2x) [\sin x \sin 2x \cos 2x+ 4\cos x(\sin 2x)^2 + + 4 \cos x (\cos 2x)^2]}{(\sin 2x)^3}\\ + &= -\frac{\cos(2x) [\sin x \sin 2x \cos 2x+ 4\cos x]}{(\sin 2x)^3}. + \end{align*} +\end{exercise} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x)=\cos((2x^2+3)^3) + \end{equation*} +\tcblower + The derivative is: + \begin{align*} + f'(x) &= \left( \cos((2x^2+3)^3) \right)' + =-\sin((2x^2+3)^3) 3(2x^2+3)^2 2\cdot 2x\\ + &=-12x(2x^2+3)^2\sin((2x^2+3)^3). + \end{align*} +\end{exercise} + +\begin{exercise} + Compute the derivative of the following function: + \begin{equation*} + f(x)=(x^2+1)\sqrt{x^4+1} + \end{equation*} +\tcblower + The derivative is: + \begin{align*} + f'(x) &= \left( (x^2+1)\sqrt{x^4+1} \right)' + = 2x\sqrt{x^4+1} + \frac{2x^3(x^2+1)}{\sqrt{x^4+1}}. + \end{align*} +\end{exercise} + +\tcbstoprecording +\end{dispListing*} +\tcbusetemp + +\subsection{Example: Solutions}\label{sec:recording-solutions} +This concludes the example given in \Vref{sec:recording-exercises}. +Now, the saved and recorded solutions are included. + +\begin{dispListing*}{breakable,before upper=} +\tcbinputrecords +\end{dispListing*} +\tcbusetemp diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.references.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.references.tex new file mode 100644 index 0000000..8cfebb8 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.references.tex @@ -0,0 +1,4 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\printbibliography[heading=bibintoc] diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.s_main.sty b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.s_main.sty new file mode 100644 index 0000000..7307f88 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.s_main.sty @@ -0,0 +1,261 @@ +% !TeX root = tcolorbox.tex +% include file (style) of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.7em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{4.2em}{3.2em}} + +\RequirePackage[T1]{fontenc} +\RequirePackage[latin1]{inputenc} +\RequirePackage[english]{babel} +\RequirePackage{lmodern,parskip,array,ifthen,calc} +\RequirePackage{amsmath,amssymb} +\RequirePackage[svgnames,table,hyperref]{xcolor} +\RequirePackage{tikz} +\RequirePackage{varioref} +\RequirePackage[makeindex]{imakeidx} +\RequirePackage[pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref} +\RequirePackage{bookmark,varwidth,cleveref,incgraph} + +\RequirePackage[a4paper,left=2.5cm,right=2.5cm,top=1.5cm,bottom=1.5cm, + marginparsep=3mm,marginparwidth=18mm, + headheight=0mm,headsep=0cm, + footskip=1.5cm,includeheadfoot%,showframe + ]{geometry} +\RequirePackage{fancyhdr} +\fancyhf{} +\fancyfoot[C]{\thepage}% +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +\pagestyle{fancy} +\tolerance=2000% +\setlength{\emergencystretch}{20pt}% + + +\usetikzlibrary{shadings,shadows} +\usetikzlibrary{decorations.pathmorphing} +\usetikzlibrary{patterns} +\usetikzlibrary{spy} +\usetikzlibrary{arrows.meta} + +\RequirePackage{array,tabularx} +\RequirePackage{amsmath} +\RequirePackage{lipsum} +\RequirePackage{empheq} +\RequirePackage[extendedchars,encoding,filenameencoding=utf-8]{grffile} + +\providecommand{\tcbpkgprefix}{} +\RequirePackage{\tcbpkgprefix tcolorbox} + +\tcbuselibrary{most,documentation} +\tcbifexternal{}{% + \tcbuselibrary{minted}% + \tcbset{listing engine=listings,initialize@reset={listing engine=listings}}% +} + +\tcbset{skin=enhanced, + doc head={colback=yellow!10!white,interior style=fill}, + doc head key={colback=magenta!5!white,interior style=fill}, + color key=DarkViolet, + color value=Teal, + color color=Teal, + color counter=Orange!85!black, + color length=Orange!85!black, + index colorize, + index annotate, +} +\urlstyle{sf} + +\tcbmakedocSubKey{docTcbKey}{tcb} +\tcbmakedocSubKey{langTcbKey}{tcb/doclang} +\tcbmakedocSubKey{newTcbKey}{tcb/new} +\tcbmakedocSubKey{boxTcbKey}{tcb/boxtitle} +\tcbmakedocSubKey{extTcbKey}{tcb/external} +\tcbmakedocSubKey{vigTcbKey}{tcb/vig} +\tcbmakedocSubKey{posterTcbKey}{tcb/poster} +\tcbmakedocSubKey{posterlocTcbKey}{tcb/posterloc} +\tcbmakedocSubKey{postersetTcbKey}{tcb/posterset} +\tcbmakedocSubKey{docTikzKey}{tikz} + +\def\tikzname{Ti\emph{k}Z} + +\newrobustcmd{\tcbIndexPrintSkinCA}[1]{\tcb@Index@Print@CA{#1}{\kvtcb@col@key}{Skin}} +\newrobustcmd{\tcbIndexPrintSkinC}[1]{\tcb@Index@Print@C{#1}{\kvtcb@col@key}} +\def\tcb@index@Skin#1{\iftcb@doc@toindex\index{#1\idx@actual\tcbIndexPrintSkinCA{#1}}\index{Skins\idx@level#1\idx@actual\tcbIndexPrintSkinC{#1}}\fi}% + +\newenvironment{docSkin}[2][]{\begin{tcb@manual@entry}% + \begin{tcb@doc@head}{colback=magenta!5!white,interior style=fill,#1}% + \hypertarget{skin:#2}{\tcb@Print@Key{/tcb/skin=}\tcb@Print@Val{#2}\tcb@index@Skin{#2}\protected@edef\@currentlabel{#2}\label{skin:#2}\hfill(skin)}% + \end{tcb@doc@head}}% + {\end{tcb@manual@entry}} +\def\refSkin{\tcb@ref@doc{skin}} + +\newrobustcmd{\tcbIndexPrintFadCA}[1]{\tcb@Index@Print@CA{#1}{\kvtcb@col@value}{fading}} +\newrobustcmd{\tcbIndexPrintFadC}[1]{\tcb@Index@Print@C{#1}{\kvtcb@col@value}} +\def\tcb@Print@Fad#1{\textcolor{\kvtcb@col@value}{\bfseries\tcb@scantokens{#1}}} +\def\tcb@index@Fad#1{\iftcb@doc@toindex\kvtcb@index@command{#1\idx@actual\tcbIndexPrintFadCA{#1}}\kvtcb@index@command{Fadings\idx@level#1\idx@actual\tcbIndexPrintFadC{#1}}\fi} + +\DeclareDocumentCommand\docFading{sm}{% + \tcb@Print@Fad{#2}% + \IfBooleanTF{#1}{}{\tcb@index@Fad{#2}}% +} + +\newtcolorbox{marker}[1][]{enhanced, + before skip=2mm,after skip=3mm, + boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm, + colback=yellow!50, + colframe=yellow!20!black, + sharp corners,rounded corners=southeast,arc is angular,arc=3mm, + underlay={% + \path[fill=tcbcol@back!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); + \path[draw=tcbcol@frame,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2); + \path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west); + }, + drop fuzzy shadow,#1} + + +\renewcommand*{\tcbdocnew}[1]{\textcolor{green!50!black}{\sffamily\bfseries N} #1} +\renewcommand*{\tcbdocupdated}[1]{\textcolor{blue!75!black}{\sffamily\bfseries U} #1} + +\newcounter{texexp} +\newcounter{texercise} +\newcounter{mytheorem}[section] + +\newcounter{myexample} + +\newcounter{example} +\newlength{\examlen} +\newsavebox\mysavebox + +\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,tcbtitle,tcbtitletext, + tcblower,tcbox,tcboxfit,tcbset,tcbuselibrary,tcolorbox,tcbverbatimwrite,tcbsetforeverylayer,tcbsubtitle, + tcolorboxenvironment,tcblistof,tcbstartrecording,tcbrecord,tcbstoprecording,tcbinputrecords, + tcbpatcharcangular,tcbpatcharcround,tcbifoddpage,thetcolorboxnumber,thetcolorboxpage, + tcbheightfromgroup,tcbheightspace,tcbtextwidth,tcbtextheight, + % listings + endtcblisting,newtcblisting,newtcbinputlisting, + tcblisting,tcbinputlisting,tcbuselistingtext,tcbuselistinglisting,tcbusetemplisting, + tcbfitdim,tcbfitsteps, + % raster + thetcbrasternum,tcbitem, + % breakable + tcbbreak, + % theorems + tcbmaketheorem,tcboxmath,tcbhighmath,thetcbcounter,newtcbtheorem, + % documentation + brackets, + colDef,colOpt,cs, + docAuxCommand,docColor,docAuxEnvironment,docAuxKey, + docCounter,docLength, + meta,marg, + oarg, + refCom,refEnv,refKey, + tcbmakedocSubKey,tcbdocmarginnote,tcbdocnew,tcbdocupdated, + % skins + tcbincludegraphics,tcbincludepdf,pdfpages,imagepage,imagepath,imagename, + tcbline,tcboxedtitleheight,tcboxedtitlewidth, + tcbsettowidthofnode,tcbsetmacrotowidthofnode,tcbsettoheightofnode,tcbsetmacrotoheightofnode, + tcbhypernode, + % vignette + tcbvignette, + % xparse + DeclareTColorBox,NewTColorBox,RenewTColorBox,ProvideTColorBox, + DeclareTotalTColorBox,NewTotalTColorBox,RenewTotalTColorBox,ProvideTotalTColorBox, + DeclareTCBox,NewTCBox,RenewTCBox,ProvideTCBox, + DeclareTotalTCBox,NewTotalTCBox,RenewTotalTCBox,ProvideTotalTCBox, + DeclareTCBListing,NewTCBListing,RenewTCBListing,ProvideTCBListing, + DeclareTCBInputListing,NewTCBInputListing,RenewTCBInputListing,ProvideTCBInputListing, + DeclareTCBoxFit,NewTCBoxFit,RenewTCBoxFit,ProvideTCBoxFit, + DeclareTotalTCBoxFit,NewTotalTCBoxFit,RenewTotalTCBoxFit,ProvideTotalTCBoxFit, + tcbsidebyside,tcboxverb, + % externalization + tcbEXTERNALIZE,tcbifexternal,newtcbexternalizeenvironment, + renewtcbexternalizeenvironment,extcolorbox,extikzpicture, + newtcbexternalizetcolorbox,renewtcbexternalizetcolorbox, + tcbiffileprocess, + % box array + newboxarray,boxarraygetsize,boxarrayreset,boxarrayclear, + boxarraygetbox,boxarraygetwidth,boxarraygetheight,boxarraygetdepth, + boxarraygettotalheight,useboxarray,usetcboxarray, + consumeboxarray,consumetcboxarray,ifboxarrayempty, + % poster + posterbox,tcbposterwidth,tcbposterheight,tcbpostercolspacing, + tcbposterrowspacing,tcbpostercolumns,tcbposterrows,tcbpostercolwidth, + tcbposterrowheight,tcbposterset, + }, + texcsstyle=*\color{Definition}\bfseries, + classoffset=0% restore default + } + +\definecolor{Green_Dark}{rgb}{0.078431,0.407843,0.176471} +\definecolor{Blue_Dark}{rgb}{0.090196,0.211765,0.364706} +\definecolor{Blue_Bright}{rgb}{0.858824,0.898039,0.945098} + +\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},% + }, + beforeafter example/.style={ + before skip=4pt plus 2pt minus 1pt, + after skip=8pt plus 4pt minus 2pt + }, + base example/.style={bicolor, + beforeafter example,arc is angular,fonttitle=\bfseries, + fontlower=\footnotesize, + colframe=Blue_Dark, + colback=Blue_Bright, + colbacklower=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, + before skip=\medskipamount,after skip=\medskipamount,frame style={}}, +} + +\newtcbexternalizetcolorbox{exdispExample}{dispExample}{environment with percent=false,minipage}{beforeafter example} + +\newtcbexternalizetcolorbox{exdispExample*}{dispExample*}{environment with percent=false,minipage}{beforeafter example} + +\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} + +\pdfstringdefDisableCommands{% + \def\mylib#1{'#1'}% +} + +\newrobustcmd*{\tcbexclamation}{!} + +\newtcbox{\section@box}{tile,before=\clearpage\noindent,after=, + fontupper=\normalfont\Large\bfseries,capture=minipage,colback=blue!80,coltext=white, + boxsep=0mm,top=4mm,bottom=4mm,left=\oddsidemargin+1in,right=\oddsidemargin+1in, + spread sidewards,fuzzy halo=1mm with blue!50!gray} + +\renewcommand\section{\@startsection{section}{1}{\z@}{\z@}{5mm}{\section@box}} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.s_snippet.sty b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.s_snippet.sty new file mode 100644 index 0000000..c33f924 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.s_snippet.sty @@ -0,0 +1,183 @@ +% !TeX root = tcolorbox.tex +% include file (style) of tcolorbox.tex (manual of the LaTeX package tcolorbox) + +\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={solutions/texercise\thetcbcounter.tex}, + label={exe:#2}, + record={\string\processsol{solutions/texercise\thetcbcounter.tex}{#2}}, + title={Exercise \thetcbcounter\hfill\mdseries Solution on page \pageref{sol:#2}}, + list text={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} +% \usepackage{cleveref} +\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,crefname={definition}{definitions}]% + {Definition}{Definition}{defstyle}{def} +\newtcbtheorem[use counter from=Definition,crefname={theorem}{theorems}]% + {Theorem}{Theorem}{theostyle}{theo} +\newtcbtheorem[use counter from=Definition,crefname={corollary}{corollaries}]% + {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} + + +\begin{tcbverbatimwrite}{\jobname_preamble_I.tex} +% \usepackage{cleveref} +\newtcolorbox[auto counter,number within=section, + crefname={bluebox}{blueboxes}]% + {mybluebox}[2][]{colback=blue!5!white,colframe=blue!75!black,fonttitle=\bfseries, + title=Bluebox \thetcbcounter: #2,#1} +\end{tcbverbatimwrite} +\input{\jobname_preamble_I.tex} + + +\begin{tcbverbatimwrite}{\jobname_preamble_J.tex} +\newtcbtheorem[use counter from=mytheo]{theorem}{Theorem}{% + fonttitle=\bfseries\upshape,fontupper=\itshape, + colframe=green!50!black,colback=green!10!white, + colbacktitle=green!20!white,coltitle=blue!75!black}{theo} +\end{tcbverbatimwrite} +\input{\jobname_preamble_J.tex} + + +\begin{tcbverbatimwrite}{\jobname_preamble_K.tex} +\usepackage{amsthm} + +\theoremstyle{plain}% from 'amsthm' +\newtheorem{lem}{Lemma}% from 'amsthm' + +\tcolorboxenvironment{lem}{ + enhanced jigsaw,colframe=cyan,interior hidden, + breakable,before skip=10pt,after skip=10pt } + +\tcolorboxenvironment{proof}{% 'proof' from 'amsthm' + blanker,breakable,left=5mm, + before skip=10pt,after skip=10pt, + borderline west={1mm}{0pt}{red}} +\end{tcbverbatimwrite} +\input{\jobname_preamble_K.tex} + + +\begin{tcbverbatimwrite}{\jobname_preamble_L.tex} +% \tcbuselibrary{skins,xparse} + +\NewTColorBox[auto counter,number within=section]{exercise}{+!O{}}{% + enhanced,colframe=green!20!black,colback=yellow!10!white,coltitle=green!40!black, + fonttitle=\bfseries, + underlay={\begin{tcbclipinterior} + \shade[inner color=green!80!yellow,outer color=yellow!10!white] + (interior.north west) circle (2cm); + \draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}] + (interior.south west) grid (interior.north east); + \end{tcbclipinterior}}, + title={Exercise~\thetcbcounter:}, + label={exercise@\thetcbcounter}, + attach title to upper=\quad, + after upper={\par\hfill\textcolor{green!40!black}% + {\itshape Solution on page~\pageref{solution@\thetcbcounter}}}, + lowerbox=ignored, + savelowerto=solutions/exercise-\thetcbcounter.tex, + record={\string\solution{\thetcbcounter}{solutions/exercise-\thetcbcounter.tex}}, + #1 +} + +\NewTotalTColorBox{\solution}{mm}{% + enhanced,colframe=red!20!black,colback=yellow!10!white,coltitle=red!40!black, + fonttitle=\bfseries, + underlay={\begin{tcbclipinterior} + \shade[inner color=red!50!yellow,outer color=yellow!10!white] + (interior.north west) circle (2cm); + \draw[help lines,step=5mm,yellow!80!black,shift={(interior.north west)}] + (interior.south west) grid (interior.north east); + \end{tcbclipinterior}}, + title={Solution of Exercise~\ref{exercise@#1} on page~\pageref{exercise@#1}:}, + phantomlabel={solution@#1}, + attach title to upper=\par, +}{\input{#2}} + +\tcbset{no solution/.style={no recording,after upper=}} +\end{tcbverbatimwrite} +\input{\jobname_preamble_L.tex} + + +\begin{tcbverbatimwrite}{\jobname_preamble_M.tex} +\newtcblisting{myownlisting}[2][]{ + enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + colbacktitle=red!50!yellow,before skip=6pt,after skip=6pt, + title={#2},#1} + +\newtcbexternalizetcolorbox{exmyownlisting}{myownlisting}{minipage}% + {before skip=6pt,after skip=6pt}% same values as for mylisting +\end{tcbverbatimwrite} +\input{\jobname_preamble_M.tex} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.sidebyside.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.sidebyside.tex new file mode 100644 index 0000000..b01c299 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.sidebyside.tex @@ -0,0 +1,408 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Side by Side}\label{sec:sidebyside}% +\tcbset{external/prefix=external/sidebyside_}% + +A \emph{side by side} box is a special \refEnv{tcolorbox} where +the upper and lower part of the box are set side by side. +All boxes of this kind are unbreakable. + +\begin{marker} + Further side by side options for code examples are + \refKey{/tcb/listing side text}, + \refKey{/tcb/text side listing}, + \refKey{/tcb/listing outside text}, and + \refKey{/tcb/text outside listing}. +\end{marker} + +\subsection{Basic Settings}\label{subsec:sidebyside_basic} + +\begin{docTcbKey}{sidebyside}{\colOpt{=true\textbar false}}{default |true|, initially |false|} +Normally, the upper part and the lower part of the box have their positions +as their names suggest. If |sidebyside| is set to |true|, the upper part +is drawn \emph{left-handed} and the lower part is drawn \emph{right-handed}. +Both parts are drawn together with the geometry settings of the upper part but the +space is divided horizontally according to the following options. +Colors, fonts, and box content additions are used individually. +The resulting box is unbreakable. + +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title,sidebyside] + This is the upper (\textit{left-handed}) part. +\tcblower + This is the lower (\textit{right-handed}) part. +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +% \usepackage{lipsum} +% \tcbuselibrary{skins} +\begin{tcolorbox}[bicolor,sidebyside,righthand width=3cm, + sharp corners,boxrule=.4pt,colback=green!5,colbacklower=green!50!black!50] + \lipsum[2] +\tcblower + \includegraphics[width=\linewidth]{goldshade}% +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}[][doc updated=2015-02-06]{sidebyside align}{=\meta{alignment}}{no default, initially |center|} + Sets the vertical \meta{alignment} for the left-handed and right-handed part. + + Feasible values for \meta{alignment} are: + \begin{itemize} + \item\docValue{center}: identical to |minipage| option |c|. + \item\docValue{top}: identical to |minipage| option |t| (aligns the top + lines of the left-handed and right-handed side according to their baselines). + \item\docValue{bottom}: identical to |minipage| option |b| (aligns the bottom + lines of the left-handed and right-handed side according to their baselines). + \item\docValue{center seam}: aligns the center of the left-handed and right-handed side. + \item\docValue{top seam}: aligns the very top seam of the left-handed and right-handed side. + \item\docValue{bottom seam}: aligns the very bottom seam of the left-handed and right-handed side. + \end{itemize} + +\begin{exdispExample}{sidebyside_align} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,nobeforeafter, + left=2mm,right=2mm,sidebyside,sidebyside gap=6mm,width=(\linewidth-2mm)/3} + +\begin{tcolorbox}[adjusted title=center,sidebyside align=center] +This is a text which is too long for one line. +\tcblower +This is a short text. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=top,sidebyside align=top] +This is a text which is too long for one line. +\tcblower +This is a short text. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=bottom,sidebyside align=bottom] +This is a text which is too long for one line. +\tcblower +This is a short text. +\end{tcolorbox} +\end{exdispExample} + + +\docValue{center}, \docValue{top}, and \docValue{bottom} are identical +to the known corresponding |minipage| options. +While this is the preferred approach for text content, the result for +boxed content like tables or images may not be as expected. + +For such content, one may use \docValue{center seam}, \docValue{top seam}, +and \docValue{bottom seam}. For example, \docValue{top seam} aligns +the very top seam of the left-handed and right-handed side. + + +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + size=small,righthand width=4cm,sidebyside,sidebyside gap=6mm,lower separated=false} + +\begin{tcolorbox}[adjusted title=center seam,sidebyside align=center seam] + This is my description text for the pictures displayed on the right-handed side. + \tcblower + \includegraphics[width=\linewidth/2]{goldshade}% + \includegraphics[width=\linewidth/2]{blueshade} +\end{tcolorbox} + +\begin{tcolorbox}[adjusted title=top seam,sidebyside align=top seam] + This is my description text for the pictures displayed on the right-handed side. + \tcblower + \includegraphics[width=\linewidth/2]{goldshade}% + \includegraphics[width=\linewidth/2]{blueshade} +\end{tcolorbox} + +\begin{tcolorbox}[adjusted title=bottom seam,sidebyside align=bottom seam] + This is my description text for the pictures displayed on the right-handed side. + \tcblower + \includegraphics[width=\linewidth/2]{goldshade}% + \includegraphics[width=\linewidth/2]{blueshade} +\end{tcolorbox} +\end{dispExample} + + + +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{sidebyside gap}{=\meta{length}}{no default, initially |10mm|} +Sets the horizontal distance between the left-handed and right-handed part to +\meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,nobeforeafter, + sidebyside,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[adjusted title=Wide gap,sidebyside gap=30mm] +This is a text which is too long for one line. +\tcblower +This is a short text. +\end{tcolorbox}\hfill +\begin{tcolorbox}[adjusted title=Narrow gap,sidebyside gap=1mm] +This is a text which is too long for one line. +\tcblower +This is a short text. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{lefthand width}{=\meta{length}}{no default, initially unset} +Sets the width of the left-handed part to the given \meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title,sidebyside,lefthand width=3cm] +This is the upper (\textit{left-handed}) part. +\tcblower +This is the lower (\textit{right-handed}) part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\enlargethispage*{1cm} +\begin{docTcbKey}{righthand width}{=\meta{length}}{no default, initially unset} +Sets the width of the right-handed part to the given \meta{length}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title,sidebyside,righthand width=3cm] +This is the upper (\textit{left-handed}) part. +\tcblower +This is the lower (\textit{right-handed}) part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{lefthand ratio}{=\meta{fraction}}{no default, initially |0.5|} +Sets the width of the left-handed part to the given \meta{fraction} of +the available space. \meta{fraction} is a value between |0| and |1|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title,sidebyside,lefthand ratio=0.25] +This is the upper (\textit{left-handed}) part. +\tcblower +This is the lower (\textit{right-handed}) part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{righthand ratio}{=\meta{fraction}}{no default, initially |0.5|} +Sets the width of the right-handed part to the given \meta{fraction} of +the available space. \meta{fraction} is a value between |0| and |1|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title,sidebyside,righthand ratio=0.25] +This is the upper (\textit{left-handed}) part. +\tcblower +This is the lower (\textit{right-handed}) part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +If one side of a side-by-side box should be adapted to the width of +its content, this width has to be computed beforehand. +The following example uses a savebox |\mysavebox| to store the picture to determine +its width. A more convenient way to handle this task is to use the +methods from \Fullref{subsec:sidebyside_xparse}. + +\begin{dispExample} +% \tcbuselibrary{skins,xparse} +% \usepackage{lipsum} +% \newsavebox\mysavebox % preamble +\DeclareTotalTColorBox{\mysidebox}{ O{} +m +m }{ + bicolor,colback=white,colbacklower=yellow!10, + fonttitle=\bfseries,center title, + sidebyside, + code={\sbox{\mysavebox}{#2}}, + lefthand width=\wd\mysavebox, + drop lifted shadow, + #1 +} +{\usebox{\mysavebox}\tcblower#3} + +\mysidebox[title=The Triangle]{% + \begin{tikzpicture} + \path[fill=red!20,draw=red!50!black] + (0,0) node[below]{A} -- (3,1) node[right]{B} + -- (1,4) node[above]{C} -- cycle; + \end{tikzpicture}% +}{% + \lipsum[1] +} +\end{dispExample} + + +\clearpage +\subsection{Advanced Settings from the \mylib{xparse} Library}\label{subsec:sidebyside_xparse} + +\begin{marker} +All following macros and options need the \mylib{xparse} library to be +loaded, see \Fullref{sec:xparse}. +\end{marker} + + +\begin{docCommand}[doc new=2015-11-20]{tcbsidebyside}{\oarg{options}\marg{left-handed content}\marg{right-handed content}} +Creates a colored box using more or less arbitrary \meta{options} for a \refEnv{tcolorbox}. +The \refKey{/tcb/sidebyside} option is set to |true| and the +\meta{left-handed content} and \meta{right-handed content} +is filled into the box appropriately. +The resulting box is unbreakable. + +\refCom{tcbsidebyside} is not only a shortcut for using +a normal \refEnv{tcolorbox} with \refKey{/tcb/sidebyside}, but allows +setting further options like \refKey{/tcb/sidebyside adapt} +and \refKey{/tcb/sidebyside switch}. + + +\begin{dispExample} +% \tcbuselibrary{skins,xparse} +% \usepackage{lipsum} +\tcbsidebyside[title=The Triangle, + sidebyside adapt=left, + bicolor,colback=white,colbacklower=yellow!10, + fonttitle=\bfseries,center title,drop lifted shadow, +]{% + \begin{tikzpicture} + \path[fill=red!20,draw=red!50!black] + (0,0) node[below]{A} -- (3,1) node[right]{B} + -- (1,4) node[above]{C} -- cycle; + \end{tikzpicture}% +}{% + \lipsum[1] +} +\end{dispExample} +\end{docCommand} + + +\clearpage +\begin{docTcbKey}[][doc new=2015-11-20]{sidebyside adapt}{=\meta{side(s)}}{no default, initially |none|} +The option allows the left-handed and/or right-handed side to determine the +dimensions of the box. This option is only valid inside \refCom{tcbsidebyside}. + +Feasible values for \meta{side(s)} are: +\begin{itemize} +\item\docValue{none}: no measurement of left-handed and right-handed side. +\item\docValue{left}: + the actual width of the left-handed content is used to set \refKey{/tcb/lefthand width}. +\item\docValue{right}: + the actual width of the right-handed content is used to set \refKey{/tcb/righthand width}. +\item\docValue{both}: + the actual width of the left-handed and right-handed content is used to set + \refKey{/tcb/lefthand width}, \refKey{/tcb/righthand width}, and + the overall \refKey{/tcb/width}. +\end{itemize} + +\begin{dispExample} +% \tcbuselibrary{skins,xparse} +\tcbsidebyside[sidebyside adapt=left, + title=Very important table, + beamer,colframe=blue!50!black,colback=blue!10, + lower separated=false,sidebyside gap=5mm +]{% + \begin{tabular}{|l|c|r|}\hline + left & center & right\\\hline + A & B & C\\\hline + D & E & F\\\hline + \end{tabular} +}{% + This table contains the most important figures for + all future actions. You may notice that B follows A, + C follows B, and so on. +} +\end{dispExample} + + + +\begin{dispExample} +% \tcbuselibrary{skins,xparse} +\tcbsidebyside[sidebyside adapt=right, + blanker,sidebyside gap=5mm +]{% + \lipsum[2] +}{% +\begin{tikzpicture} + \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm); + \fill[red] (45:5mm) circle (1mm); + \fill[red] (135:5mm) circle (1mm); + \draw[line width=1mm,red] (215:5mm) arc (215:325:5mm); +\end{tikzpicture} +} +\end{dispExample} + + +\begin{dispExample} +% \tcbuselibrary{skins,xparse} +\tcbsidebyside[sidebyside adapt=both, + enhanced,center, + title=Both sides adapted, + attach boxed title to top center={yshift=-2mm}, + coltitle=black,boxed title style={colback=red!25}, + segmentation style=solid,colback=red!5,colframe=red!50 +]{% + \begin{tabular}{|l|c|r|}\hline + left & center & right\\\hline + A & B & C\\\hline + D & E & F\\\hline + \end{tabular} +}{% +\begin{tikzpicture} + \path[fill=yellow,draw=yellow!75!red] (0,0) circle (1cm); + \fill[red] (45:5mm) circle (1mm); + \fill[red] (135:5mm) circle (1mm); + \draw[line width=1mm,red] (215:5mm) arc (215:325:5mm); +\end{tikzpicture} +} +\end{dispExample} + +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2015-11-20]{sidebyside switch}{\colOpt{=true\textbar false}}{default |true|, initially |false|} +If set to |true|, the +\meta{left-handed content} and \meta{right-handed content} +of \refCom{tcbsidebyside} are switched. +Obviously, this option is only valid inside \refCom{tcbsidebyside}. + +The side switching can be made even/odd page sensitive, if used inside +\refKey{/tcb/if odd page}. + +\begin{dispExample} +% \tcbuselibrary{skins,xparse} +\tcbsidebyside{Left}{Right} + +\tcbsidebyside[sidebyside switch]{Left}{Right} + +\tcbsidebyside[title=Very important table, + if odd page={sidebyside switch,sidebyside adapt=right,flushright title}% + {sidebyside adapt=left}, + beamer,colframe=blue!50!black,colback=blue!10, + lower separated=false,sidebyside gap=5mm +]{% + \begin{tabular}{|l|c|r|}\hline + left & center & right\\\hline + A & B & C\\\hline + D & E & F\\\hline + \end{tabular} +}{% + This table contains the most important figures for + all future actions. You may notice that B follows A, + C follows B, and so on. +} +\end{dispExample} + + +\end{docTcbKey} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.skins.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.skins.tex new file mode 100644 index 0000000..473f429 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.skins.tex @@ -0,0 +1,4936 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{skins}}\label{sec:skins}% +\tcbset{external/prefix=external/skins_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{skins} +\end{dispListing} +This also loads the package |tikz| \cite{tantau:2015a}. Typically but not necessarily, +the following skins use |tikz| instead of |pgf|. + +\subsection{Style Option Keys}\label{subsec:addstyleoptions} +The following style options are applicable for all skins which +use engines of type |path|, |pathfirst|, |pathmiddle|, or |pathlast|. +Especially, the skin \refSkin{enhanced} supports \emph{all} of them +and \refSkin{standard} \emph{none}. + +\begin{docTcbKey}{frame style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{frame} of the box.\\ + This option is available if the \refKey{/tcb/frame engine} is set to + |path|, |pathfirst|, |pathmiddle|, or |pathlast|. + It is \emph{not} available for |standard|. +\begin{exdispExample*}{frame_style}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + frame style={left color=red!75!black, + right color=blue!75!black}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{frame style image}{=\meta{file name}}{no default, initially unset} + Fills the frame with an external image referenced by \meta{file name}. + For advanced features like blending of a picture with the background, + use \refKey{/tcb/frame style} together with \refKey{/tikz/fill stretch image}. +\begin{exdispExample*}{frame_style_image}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + frame style image=blueshade.png] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{frame style tile}{=\marg{graphics options}\marg{file name}}{no default, initially unset} + Fills the frame with a tile pattern based on an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. + For advanced features like blending of a picture with the background, + use \refKey{/tcb/frame style} together with \refKey{/tikz/fill tile image}. +\begin{exdispExample*}{frame_style_tile}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,coltitle=red!30!black, + opacityback=0.75,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + frame style tile={width=1cm}{pink_marble.png}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{frame hidden}{}{style, no value} + This is a shortcut for |frame style={draw=none,fill=none}|. + Depending on the skin, this option switches off the drawing of the + frame. + Alternatively, use \refKey{/tcb/frame empty}. +\begin{exdispExample*}{frame_hidden}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries,coltitle=black} + +\begin{tcolorbox}[enhanced,title=My title, + frame hidden] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{interior style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{interior} of the box. They are used for the titled + and for the untitled version as well.\\ + This option is available if the \refKey{/tcb/interior titled engine} + or \refKey{/tcb/interior engine} is set to + |path|, |pathfirst|, |pathmiddle|, or |pathlast|. + It is \emph{not} available for |standard|. +\begin{exdispExample*}{interior_style}{sbs,lefthand ratio=0.66} +\tcbset{colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + interior style={left color=red!20!white, + right color=yellow!50!white}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{interior style image}{=\meta{file name}}{no default, initially unset} + Fills the interior with an external image referenced by \meta{file name}. + For advanced features like blending of a picture with the background, + use \refKey{/tcb/interior style} together with \refKey{/tikz/fill stretch image}. +\begin{exdispExample*}{interior_style_image}{sbs,lefthand ratio=0.66} +\tcbset{colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + interior style image=goldshade.png] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{interior style tile}{=\marg{graphics options}\marg{file name}}{no default, initially unset} + Fills the interior with a tile pattern based on an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. + For advanced features like blending of a picture with the background, + use \refKey{/tcb/interior style} together with \refKey{/tikz/fill tile image}. + +\begin{exdispExample*}{interior_style_tile}{sbs,lefthand ratio=0.66} +\tcbset{colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + interior style tile={width=2cm}{crinklepaper.png}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{interior hidden}{}{style, no value} + This is a shortcut for |interior style={draw=none,fill=none}|. + Depending on the skin, this option switches off the drawing of the + interior. + Alternatively, use \refKey{/tcb/interior empty} and/or \refKey{/tcb/interior titled empty}. +\begin{exdispExample*}{interior_hidden}{sbs,lefthand ratio=0.66} +\tcbset{frame style={top color=red!20!white, + bottom color=red!20!white!75!black}, + fonttitle=\bfseries,coltitle=black} + +\begin{tcolorbox}[enhanced,title=My title, + interior hidden] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{segmentation style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{segmentation} line of the box.\\ + This option is available if the \refKey{/tcb/segmentation engine} + is set to |path|. + It is \emph{not} available for |standard|. +\begin{exdispExample*}{segmentation_style}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + segmentation style={double=white,draw=blue, + double distance=1pt,solid}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{segmentation hidden}{}{style, no value} + This is a shortcut for |segmentation style={draw=none,fill=none}|. + Depending on the skin, this option switches off the drawing of the + segmentation line. See also \refKey{/tcb/lower separated} which + has the same effect for most skins. + Alternatively, use \refKey{/tcb/segmentation empty}. +\begin{exdispExample*}{segmentation_hidden}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title, + enhanced,segmentation hidden] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{title style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used inside the |tikz| path command + for drawing the \emph{title area} of the box.\\ + This option is available if the \refKey{/tcb/title engine} is set to + |path|, |pathfirst|, |pathmiddle|, or |pathlast|. + It is \emph{not} available for |standard|. +\begin{exdispExample*}{title_style}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,colframe=red!75!black, + coltitle=blue!50!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + title style={left color=blue!15!yellow, + right color=red!85!black}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{title style image}{=\meta{file name}}{no default, initially unset} + Fills the title area with an external image referenced by \meta{file name}. + For advanced features like blending of a picture with the background, + use \refKey{/tcb/title style} together with \refKey{/tikz/fill stretch image}. + +\begin{exdispExample*}{title_style_image}{sbs,lefthand ratio=0.66} +\tcbset{colback=blue!5!white,colframe=blue!75!black, + fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + title style image=blueshade.png] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{title style tile}{=\marg{graphics options}\marg{file name}}{no default, initially unset} + Fills the title area with a tile pattern based on an external image referenced by \meta{file name}. + The \meta{graphics options} are given to the underlying \docAuxCommand*{includegraphics} command. + For advanced features like blending of a picture with the background, + use \refKey{/tcb/title style} together with \refKey{/tikz/fill tile image}. + +\begin{exdispExample*}{title_style_tile}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,colframe=red!75!black, + coltitle=blue!50!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + title style tile={width=1cm}{pink_marble.png}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{title hidden}{}{style, no value} + This is a shortcut for |title style={draw=none,fill=none}|. + Depending on the skin, this option switches off the drawing of the + title background. See also \refKey{/tcb/title filled} for a similar effect. + Alternatively, use \refKey{/tcb/title empty}. +\begin{exdispExample*}{title_hidden}{sbs,lefthand ratio=0.66} +\tcbset{colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries} + +\begin{tcolorbox}[title=My title, + enhanced,title hidden] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\clearpage + + +\begin{docTcbKey}[][doc new=2015-01-14]{titlerule style}{=\meta{\texttt{\upshape tikz} keys}}{style, no default} + The \meta{\texttt{\upshape tikz} keys} are used to draw a title rule, + i.e.\ a rule below the optional title. The width of the rule is controlled + by \refKey{/tcb/titlerule}. It may be set directly to a smaller width + to create mixed effects with the standard rule. + This option is implemented as an \refKey{/tcb/underlay}. Thus, it is not + available for \refSkin{standard} and \refSkin{standard jigsaw}, but for + all other skins, e.g.\ \refSkin{enhanced}. + As an underlay, this option can be used multiple times and is removed + by \refKey{/tcb/no underlay}. +\begin{exdispExample*}{titlerule_style_1}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced, + colback=red!5!white,colframe=red!75!black, + colbacktitle=red!50!yellow,fonttitle=\bfseries, + title=My title, + titlerule=1mm, + titlerule style=yellow ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + +\begin{exdispExample*}{titlerule_style_2}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced, + colback=red!5!white,colframe=red!75!black, + colbacktitle=red!50!yellow,fonttitle=\bfseries, + title=My title, + titlerule=1mm, + titlerule style={yellow,line width=0.5mm} ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + +\begin{exdispExample*}{titlerule_style_3}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced, + colback=red!10!white,colframe=red!75!black, + colbacktitle=red!50!yellow,fonttitle=\bfseries, + frame hidden, + title=My title, + boxrule=0pt,titlerule=1mm, + titlerule style=red!50!black ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + +\begin{exdispExample*}{titlerule_style_4}{sbs,lefthand ratio=0.66} +%\usetikzlibrary{arrows.meta} +\begin{tcolorbox}[empty, + coltitle=red!75!black,fonttitle=\bfseries, + borderline horizontal={0.5mm}{0pt}{red!50!white}, + title=My title, + titlerule style={red, + arrows = {Hooks[arc=270]-Hooks[arc=270]}} ] +This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\clearpage + +The combined \tikzname\ style applied to frame, interior, and title +background can used by authors in customizing code. + +\begin{docTikzKey}{tcb fill frame}{}{style, no value} +This is a \tikzname\ style which is finally applied to the \emph{frame} +of the box. + +\begin{exdispExample*}{tcb_fill_frame}{sbs,lefthand ratio=0.66} +% \tcbuselibrary{hooks} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + frame code app={\path[tcb fill frame] + ([yshift=-2mm]frame.north) + circle (8mm); } } + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{tcb fill interior}{}{style, no value} +This is a \tikzname\ style which is finally applied to the \emph{interior} +of the box. + +\begin{exdispExample*}{tcb_fill_interior}{sbs,lefthand ratio=0.66} +% \tcbuselibrary{hooks} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + interior titled code app={\path[tcb fill interior] + ([yshift=-0.1pt]interior.north east) + --([yshift=3pt]interior.north) + --([yshift=-0.1pt]interior.north west) + --cycle;} } + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTikzKey} + + +\begin{docTikzKey}{tcb fill title}{}{style, no value} +This is a \tikzname\ style which is finally applied to the \emph{title area} +of the box. + +\begin{exdispExample*}{tcb_fill_title}{sbs,lefthand ratio=0.66} +% \tcbuselibrary{hooks} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + colbacktitle=blue!75!black, + title code app={\path[tcb fill title] + (title) circle (5mm); } } + +\begin{tcolorbox}[title=My title] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{exdispExample*} +\end{docTikzKey} + + +\clearpage +\subsection{Boxed Title Option Keys}\label{subsec:skinboxedtitle} + +\subsubsection{Boxed Title Placement} +The following options place the title text into an own \refCom{tcbox}. +This boxed title can be customized independently from the main box using +\refKey{/tcb/boxed title style}. +The placement can be influenced by \meta{boxtitle options}. + +\begin{docTcbKey}{attach boxed title to top left}{\colOpt{=\marg{boxtitle options}}}{style, default empty} +The title is boxed with a \refCom{tcbox} and attached to +the top left corner of the main box. +\begin{exdispExample*}{attach_boxed_title_to_top_left}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top left] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{attach boxed title to top center}{\colOpt{=\marg{boxtitle options}}}{style, default empty} +The title is boxed with a \refCom{tcbox} and attached to +the top of the main box. +\begin{exdispExample*}{attach_boxed_title_to_top_center}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top center] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{attach boxed title to top right}{\colOpt{=\marg{boxtitle options}}}{style, default empty} +The title is boxed with a \refCom{tcbox} and attached to +the top right corner of the main box. +\begin{exdispExample*}{attach_boxed_title_to_top_right}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top right] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{attach boxed title to bottom left}{\colOpt{=\marg{boxtitle options}}}{style, default empty} +The title is boxed with a \refCom{tcbox} and attached to +the bottom left corner of the main box. +\begin{exdispExample*}{attach_boxed_title_to_bottom_left}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to bottom left] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{attach boxed title to bottom center}{\colOpt{=\marg{boxtitle options}}}{style, default empty} +The title is boxed with a \refCom{tcbox} and attached to +the bottom of the main box. +\begin{exdispExample*}{attach_boxed_title_to_bottom_center}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to bottom center] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{attach boxed title to bottom right}{\colOpt{=\marg{boxtitle options}}}{style, default empty} +The title is boxed with a \refCom{tcbox} and attached to +the bottom right corner of the main box. +\begin{exdispExample*}{attach_boxed_title_to_bottom_right}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to bottom right] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2016-02-26]{attach boxed title to top}{\colOpt{=\marg{boxtitle options}}}{style, default empty} + This is a convenient style to mimic a standard title. + It uses \refKey{/tcb/attach boxed title to top center}, + \refKey{/tcb/minipage boxed title}, and sizes the boxed title to match + the base box. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top, + boxed title style={colframe=red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-02-26]{attach boxed title to top*}{\colOpt{=\marg{boxtitle options}}}{style, default empty} + In contrast to \refKey{/tcb/attach boxed title to top}, this style + uses smaller left and right rules to avoid previewer glitches. + Typically, one would not use different colors for the frame as in the + example below. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top*, + boxed title style={colframe=red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-02-26]{attach boxed title to bottom}{\colOpt{=\marg{boxtitle options}}}{style, default empty} + This is a convenient style to produce a standard-like title at the bottom + of the box. + It uses \refKey{/tcb/attach boxed title to bottom center}, + \refKey{/tcb/minipage boxed title}, and sizes the boxed title to match + the base box. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to bottom, + boxed title style={colframe=red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-02-26]{attach boxed title to bottom*}{\colOpt{=\marg{boxtitle options}}}{style, default empty} + In contrast to \refKey{/tcb/attach boxed title to top}, this style + uses smaller left and right rules to avoid previewer glitches. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to bottom*] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-02-26]{flip title}{\colOpt{=\marg{options}}}{style, default empty} + This style combines \refKey{/tcb/attach boxed title to bottom*} + with \refKey{/tcb/boxed title style}. The \meta{options} are given to + \refKey{/tcb/boxed title style}. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[tile,flip title={sharp corners}, + title=My title,colback=red!10, + colbacktitle=red!75!black] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\clearpage + +\subsubsection{Options for the Boxed Title Placement} +The \meta{boxtitle options} of the keys described above are shift values. +The dimensions of the boxed title are stored into two macros +\docAuxCommand{tcboxedtitleheight} and +\docAuxCommand{tcboxedtitlewidth}. These macros can be used inside the +following \meta{boxtitle options}: + +\begin{boxTcbKey}{xshift}{=\meta{length}}{no default, initially |0pt|} +The boxed title is shifted by \meta{length} in the horizontal direction. +\begin{exdispExample*}{xshift}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top left={xshift=-2mm}, + boxed title style={size=small,colback=blue}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{boxTcbKey} + +\begin{boxTcbKey}{yshift}{=\meta{length}}{no default, initially |0pt|} +The boxed title is shifted by \meta{length} in the vertical direction. +\begin{exdispExample*}{yshift}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top center= + {yshift=-\tcboxedtitleheight/2}, + boxed title style={size=small,colback=blue}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{boxTcbKey} + +\begin{boxTcbKey}{yshifttext}{=\meta{length}}{no default, initially |0pt|} +The text inside the main box by \meta{length} to give room for e.\,g.\ a sunken title. +\begin{exdispExample*}{yshifttext}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top center= + {yshift=-3mm,yshifttext=-1mm}, + boxed title style={size=small,colback=blue}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{boxTcbKey} + +\begin{boxTcbKey}{yshift*}{=\meta{length}}{no default, initially |0pt|} +Sets \refKey{/tcb/boxtitle/yshift} and \refKey{/tcb/boxtitle/yshifttext} +the same time.\\ +\refKey{/tcb/boxtitle/yshifttext} is only set if necessary. +\begin{exdispExample*}{yshiftstar}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top center={yshift*=-3mm}, + boxed title style={size=small,colback=blue}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} +\end{boxTcbKey} + +\begin{marker} +The bounding box of the resulting total |tcolorbox| is adapted automatically to the +\emph{vertical} dimensions of the boxed title. Possible horizontal enlargements +are \emph{not} automatically computed. +\end{marker} + + +\begin{exdispExample*}{boxed_title_example_1}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + attach boxed title to top left= + {xshift=-2mm,yshift=-2mm}, + boxed title style={size=small,colback=blue}, + show bounding box] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + + +\clearpage +\subsubsection{Options for the Boxed Title Box} +\begin{marker} + The boxed title options are implemented as an underlay, see \Vref{subsec:skinunderlay}. + Therefore, a boxed title is not drawn, if a skin does not support underlays + like \refSkin{standard}. Still, the room for the boxed + titles gets reserved in these cases. +\end{marker} + +\begin{marker} + A \tikzname\ node |title| is produced by a boxed title which can be used + inside \refKey{/tcb/frame code}, \refKey{/tcb/interior code}, + underlays, overlays, and finishes. +\end{marker} + +\begin{marker} + A boxed title is almost always the first underlay. The only exceptions are + underlays defined by \refKey{/tcb/underlay boxed title} which are drawn + before. Additionally, underlays defined by \refKey{/tcb/underlay boxed title} + are only drawn, if a boxed title is actually set. They are ignored, if + there is no boxed title. +\end{marker} + + + +\begin{docTcbKey}[][doc new=2016-02-26]{boxed title size}{=\meta{size}}{no default, initially |title|} + This setting defines the basic size for the title box. Further settings + can be applied using \refKey{/tcb/boxed title style}. + Feasible values for \meta{size} are: + \begin{itemize} + \item\docValue{title}: Sets the size according to \refKey{/tcb/size}|=|\docValue{title}. + \item\docValue{standard}: No size setting. Typically, this is identical to + \refKey{/tcb/size}|=|\docValue{normal}. + \item\docValue{copy}: The size values for a title of the base box are copied + for the title box. + \end{itemize} + +\begin{dispExample} +% \tcbuselibrary{raster} +\begin{tcbraster}[raster columns=3,enhanced,boxrule=0.4pt, + title=My title,attach boxed title to top center] + \begin{tcolorbox}[boxed title size=title] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + \begin{tcolorbox}[boxed title size=standard] + This is a \textbf{tcolorbox}. + \end{tcolorbox} + \begin{tcolorbox}[boxed title size=copy] + This is a \textbf{tcolorbox}. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc updated=2016-02-26]{boxed title style}{=\meta{options}}{style, initially empty} +By default, a boxed title is dimensioned with \refKey{/tcb/size}|=|\docValue*{title} +and inherits the \refKey{/tcb/skin} and \refKey{/tcb/colframe} of the main box. +Also, the \refKey{/tcb/colback} is inherited from the main \refKey{/tcb/colbacktitle}. +Font and color of the title text are set as usual. +All other \meta{options} are set by the \refKey{/tcb/boxed title style} key. +Since a boxed title is set by \refCom{tcbox}, all |tcolorbox| options are +applicable here. If \refKey{/tcb/boxed title style} is used several times, +the \meta{options} are is appended. + +\begin{exdispExample*}{boxed_title_style_1}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + fonttitle=\bfseries,coltitle=green!25!black, + attach boxed title to top center= + {yshift=-2mm,yshifttext=-1mm}, + boxed title style={colframe=green!75!black, + colback=yellow!50!green}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + + +\begin{exdispExample*}{boxed_title_style_2}{sbs,lefthand ratio=0.66} +\begin{tcolorbox}[enhanced,title=My title, + colframe=red!50!black,colback=red!10!white, + arc=1mm,colbacktitle=red!10!white, + fonttitle=\bfseries,coltitle=red!50!black, + attach boxed title to top left= + {xshift=3.2mm,yshift=-0.50mm}, + boxed title style={skin=enhancedfirst jigsaw, + size=small,arc=1mm,bottom=-1mm, + interior style={fill=none, + top color=red!30!white, + bottom color=red!20!white}}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{exdispExample*} + +\begin{exdispExample}{boxed_title_style_3} +\begin{tcolorbox}[enhanced,title=My title, + colframe=blue!50!black,colback=blue!10!white,colbacktitle=blue!5!yellow!10!white, + fonttitle=\bfseries,coltitle=black,attach boxed title to top center= + {yshift=-0.25mm-\tcboxedtitleheight/2,yshifttext=2mm-\tcboxedtitleheight/2}, + boxed title style={boxrule=0.5mm, + frame code={ \path[tcb fill frame] ([xshift=-4mm]frame.west) + -- (frame.north west) -- (frame.north east) -- ([xshift=4mm]frame.east) + -- (frame.south east) -- (frame.south west) -- cycle; }, + interior code={ \path[tcb fill interior] ([xshift=-2mm]interior.west) + -- (interior.north west) -- (interior.north east) + -- ([xshift=2mm]interior.east) -- (interior.south east) -- (interior.south west) + -- cycle;} }] + \lipsum[2] +\end{tcolorbox} +\end{exdispExample} + + +\begin{exdispExample}{boxed_title_style_4} +% \usepackage{varwidth} +\newtcolorbox{mybox}[2][]{enhanced,skin=enhancedlast jigsaw, + attach boxed title to top left={xshift=-4mm,yshift=-0.5mm}, + fonttitle=\bfseries\sffamily,varwidth boxed title=0.7\linewidth, + colbacktitle=blue!45!white,colframe=red!50!black, + interior style={top color=blue!10!white,bottom color=red!10!white}, + boxed title style={empty,arc=0pt,outer arc=0pt,boxrule=0pt}, + underlay boxed title={ + \fill[blue!45!white] (title.north west) -- (title.north east) + -- +(\tcboxedtitleheight-1mm,-\tcboxedtitleheight+1mm) + -- ([xshift=4mm,yshift=0.5mm]frame.north east) -- +(0mm,-1mm) + -- (title.south west) -- cycle; + \fill[blue!45!white!50!black] ([yshift=-0.5mm]frame.north west) + -- +(-0.4,0) -- +(0,-0.3) -- cycle; + \fill[blue!45!white!50!black] ([yshift=-0.5mm]frame.north east) + -- +(0,-0.3) -- +(0.4,0) -- cycle; }, + title={#2},#1} + +\begin{mybox}{My title} + \lipsum[2] +\end{mybox} +\end{exdispExample} + + +\begin{exdispExample}{boxed_title_style_5} +% \usepackage{varwidth} +\newtcolorbox{mybox}[2][]{enhanced, + attach boxed title to top left={xshift=1cm,yshift=-2mm}, + fonttitle=\bfseries,varwidth boxed title=0.7\linewidth, + colbacktitle=green!45!white,coltitle=green!10!black,colframe=green!50!black, + interior style={top color=yellow!10!white,bottom color=green!10!white}, + boxed title style={boxrule=0.75mm,colframe=white, + borderline={0.1mm}{0mm}{green!50!black}, + borderline={0.1mm}{0.75mm}{green!50!black}, + interior style={top color=green!10!white,bottom color=green!10!white, + middle color=green!50!white}, + drop fuzzy shadow}, + title={#2},#1} + +\begin{mybox}{My title} + \lipsum[2] +\end{mybox} +\end{exdispExample} + + +\begin{exdispExample}{boxed_title_style_6} +\newtcolorbox{flipbox}[2][]{ + enhanced,colframe=blue!50!black,colback=yellow!5,fonttitle=\bfseries, + flip title={interior hidden},title={#2},#1} + +\begin{flipbox}{My title} +\lipsum[2] +\end{flipbox} +\end{exdispExample} + + +\begin{exdispExample}{boxed_title_style_7} +% \usepackage{varwidth} +\newtcolorbox{mybox}[2][]{skin=enhancedlast jigsaw,interior hidden, + boxsep=0pt,top=0pt,colframe=red,coltitle=red!50!black, + fonttitle=\bfseries\sffamily, + attach boxed title to bottom center, + boxed title style={empty,boxrule=0.5mm}, + varwidth boxed title=0.5\linewidth, + underlay boxed title={ + \draw[white,line width=0.5mm] + ([xshift=0.3mm-\tcboxedtitleheight*2,yshift=0.3mm]title.north west) + --([xshift=-0.3mm+\tcboxedtitleheight*2,yshift=0.3mm]title.north east); + \path[draw=red,top color=white,bottom color=red!50!white,line width=0.5mm] + ([xshift=0.25mm-\tcboxedtitleheight*2,yshift=0.25mm]title.north west) + cos +(\tcboxedtitleheight,-\tcboxedtitleheight/2) + sin +(\tcboxedtitleheight,-\tcboxedtitleheight/2) + -- ([xshift=0.25mm,yshift=0.25mm]title.south west) + -- ([yshift=0.25mm]title.south east) + cos +(\tcboxedtitleheight,\tcboxedtitleheight/2) + sin +(\tcboxedtitleheight,\tcboxedtitleheight/2); }, + title={#2},#1} + +\begin{mybox}{My title} + \lipsum[2] +\end{mybox} +\end{exdispExample} + + +\begin{exdispExample}{boxed_title_style_8} +% \usepackage{varwidth} +\newtcolorbox{mybox}[2][]{enhanced, + before skip=2mm,after skip=2mm, + colback=black!5,colframe=black!50,boxrule=0.2mm, + attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, + varwidth boxed title*=-3cm, + boxed title style={frame code={ + \path[fill=tcbcol@back!30!black] + ([yshift=-1mm,xshift=-1mm]frame.north west) + arc[start angle=0,end angle=180,radius=1mm] + ([yshift=-1mm,xshift=1mm]frame.north east) + arc[start angle=180,end angle=0,radius=1mm]; + \path[left color=tcbcol@back!60!black,right color=tcbcol@back!60!black, + middle color=tcbcol@back!80!black] + ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east) + [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east) + -- (frame.south east) -- (frame.south west) + -- ([xshift=-1mm,yshift=-1mm]frame.north west) + [sharp corners]-- cycle; + },interior engine=empty, + }, + fonttitle=\bfseries, + title={#2},#1} + +\begin{mybox}[colbacktitle=green]{My title} +\lipsum[2] +\end{mybox} +\begin{mybox}[colbacktitle=red]{My title} +\lipsum[3] +\end{mybox} +\end{exdispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2016-02-26]{no boxed title style}{}{style, initially set} + Removes all options which were set by \refKey{/tcb/boxed title style}. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{hbox boxed title}{}{no value, initially set} +The title text content is captured with a horizontal box. +Especially, there are no linebreak possible. +\begin{exdispExample*}{hbox_boxed_title}{sbs,lefthand ratio=0.66} +\newtcolorbox{mybox}[1]{hbox boxed title, + enhanced,attach boxed title to top center= + {yshift=-3mm,yshifttext=-1mm}, + boxed title style={size=small,colback=red}, + title={#1}} + +\begin{mybox}{Short title} + This is a \textbf{tcolorbox}. +\end{mybox}\bigskip + +\begin{mybox}{This title is not really very short} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{minipage boxed title}{\colOpt{=\meta{length}}}{initially unset} +The title text content is captured with a minipage with a width of \meta{length}. +By default, the resulting boxed title is somewhat smaller than the main box. +\begin{exdispExample*}{minipage_boxed_title}{sbs,lefthand ratio=0.66} +\newtcolorbox{mybox}[1]{minipage boxed title, + enhanced,attach boxed title to top center= + {yshift=-3mm,yshifttext=-1mm}, + boxed title style={size=small,colback=red}, + center title,title={#1}} + +\begin{mybox}{Short title} + This is a \textbf{tcolorbox}. +\end{mybox}\bigskip + +\begin{mybox}{This title is not really very short} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{minipage boxed title*}{\colOpt{=\meta{length}}}{initially unset} +The title text content is captured with a minipage with a width of main box width plus \meta{length}. +By default, the resulting boxed title is somewhat smaller than the main box. +\begin{exdispExample*}{minipage_boxed_title_star}{sbs,lefthand ratio=0.66} +\newtcolorbox{mybox}[1]{minipage boxed title*=-2cm, + enhanced,attach boxed title to top center= + {yshift=-3mm,yshifttext=-1mm}, + boxed title style={size=small,colback=red}, + center title,title={#1}} + +\begin{mybox}{Short title} + This is a \textbf{tcolorbox}. +\end{mybox}\bigskip + +\begin{mybox}{This title is not really very short} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample*} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{tikznode boxed title}{=\meta{options}}{initially unset} +The title text content is captured with a \tikzname\ node with given \tikzname\ \meta{options}. +The text is centered by default +\begin{exdispExample*}{tikznode_boxed_title}{sbs,lefthand ratio=0.66} +\newtcolorbox{mybox}[1]{tikznode boxed title, + enhanced,attach boxed title to top center= + {yshift=-3mm,yshifttext=-1mm}, + boxed title style={size=small,colback=red}, + title={#1}} + +\begin{mybox}{Short title} + This is a \textbf{tcolorbox}. +\end{mybox}\bigskip + +\begin{mybox}{This title\\is not really\\very short} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{varwidth boxed title}{\colOpt{=\meta{length}}}{initially unset} +The title text content is captured with a |varwidth| environment with a width of \meta{length}. +This style needs the |varwidth| package \cite{arseneau:2011a} to be loaded manually. +By default, the resulting boxed title is somewhat smaller than the main box. +\begin{exdispExample*}{varwidth_boxed_title}{sbs,lefthand ratio=0.66} +% \usepackage{varwidth} +\newtcolorbox{mybox}[1]{varwidth boxed title, + enhanced,attach boxed title to top center= + {yshift=-3mm,yshifttext=-1mm}, + boxed title style={size=small,colback=red}, + center title,title={#1}} + +\begin{mybox}{Short title} + This is a \textbf{tcolorbox}. +\end{mybox}\bigskip + +\begin{mybox}{This title is not really very short} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{varwidth boxed title*}{\colOpt{=\meta{length}}}{initially unset} +The title text content is captured with a |varwidth| environment with a width of main box width plus \meta{length}. +This style needs the |varwidth| package \cite{arseneau:2011a} to be loaded manually. +By default, the resulting boxed title is somewhat smaller than the main box. +\begin{exdispExample*}{varwidth_boxed_title_star}{sbs,lefthand ratio=0.66} +% \usepackage{varwidth} +\newtcolorbox{mybox}[1]{varwidth boxed title*=-2cm, + enhanced,attach boxed title to top center= + {yshift=-3mm,yshifttext=-1mm}, + boxed title style={size=small,colback=red}, + center title,title={#1}} + +\begin{mybox}{Short title} + This is a \textbf{tcolorbox}. +\end{mybox}\bigskip + +\begin{mybox}{This title is not really very short} + This is a \textbf{tcolorbox}. +\end{mybox} +\end{exdispExample*} +\end{docTcbKey} + + +\clearpage +\subsection{Watermark Option Keys}\label{subsec:watermarks} +The following watermark options are applicable for all skins which +use |tikzpicture| as \refKey{/tcb/graphical environment}. +Therefore, the skin \refSkin{standard} does not support these watermarks, +but all other skins, e.\,g.\ \refSkin{enhanced}. + +\begin{marker} +The watermark options rely on the more general overlay options described in +Section \ref{subsec:overlays} from page \pageref{subsec:overlays}. +Therefore, \emph{watermarks} and \emph{overlays} cannot be used mixed. +But a mixture is possible with the \mylib{hooks} library, see Section \ref{sec:hooks}. +\end{marker} + + +\begin{docTcbKey}{watermark text}{=\meta{text}}{no default, initially unset} + Writes some \meta{text} in the center of the interior region of a |tcolorbox|. + This \meta{text} is written \emph{after} the + frame and interior are drawn and \emph{before} the text content is drawn. + It is zoomed or stretched according the values of + \refKey{/tcb/watermark zoom} or \refKey{/tcb/watermark stretch}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,watermark text=My Watermark] +\lipsum[1] +\tcblower +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\enlargethispage*{1cm} + +\begin{docTcbKey}{watermark text on}{=\meta{part} is \meta{text}}{no default, initially unset} + This option writes some \meta{text} in the center of the interior region of a |tcolorbox| + as described for \refKey{/tcb/watermark text}. + But this is done only for boxes named \meta{part} of a break sequence, see + \refKey{/tcb/breakable}.\\ + Feasible values for \meta{part} are: + \begin{itemize} + \item\docValue{broken}: all broken box parts, + \item\docValue{unbroken}: unbroken boxes only, + \item\docValue{first}: first parts of a break sequence, + \item\docValue{middle}: middle parts of a break sequence, + \item\docValue{last}: last parts of a break sequence, + \item\docValue{unbroken and first}: unbroken boxes and first parts of a break sequence, + \item\docValue{middle and last}: middle and last parts of a break sequence. + \item\docValue{first and middle}: first and middle parts of a break sequence. + \end{itemize} +\end{docTcbKey} + + +\clearpage + + +\begin{docTcbKey}{watermark graphics}{=\meta{file name}}{no default, initially unset} + Draws an external picture referenced by \meta{file name} + in the center of the interior region of a |tcolorbox|. + The picture is drawn \emph{after} the + frame and interior are drawn and \emph{before} the text content is drawn. + It is zoomed or stretched according the values of + \refKey{/tcb/watermark zoom} or \refKey{/tcb/watermark stretch}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,watermark graphics=Basilica_5.png, + watermark opacity=0.15] +\lipsum[1-2] +\tcblower +This example uses a public domain picture from\\ +\url{http://commons.wikimedia.org/wiki/File:Basilica_5.png} +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{watermark graphics on}{=\meta{part} is \meta{file name}}{no default, initially unset} + This option draws a picture referenced by \meta{file name} in the center of the interior region of a |tcolorbox| + as described for \refKey{/tcb/watermark graphics}. + But this is done only for boxes named \meta{part} of a break sequence, see + \refKey{/tcb/breakable}.\\ + Feasible values for \meta{part} are: + \begin{itemize} + \item\docValue{broken}: all broken box parts, + \item\docValue{unbroken}: unbroken boxes only, + \item\docValue{first}: first parts of a break sequence, + \item\docValue{middle}: middle parts of a break sequence, + \item\docValue{last}: last parts of a break sequence, + \item\docValue{unbroken and first}: unbroken boxes and first parts of a break sequence, + \item\docValue{middle and last}: middle and last parts of a break sequence. + \end{itemize} +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{watermark tikz}{=\meta{graphical code}}{no default, initially unset} + Draws the given |tikz| \meta{graphical code} + in the center of the interior region of a |tcolorbox|. + The code is executed \emph{after} the + frame and interior are drawn and \emph{before} the text content is drawn. + The result is zoomed or stretched according the values of + \refKey{/tcb/watermark zoom} or \refKey{/tcb/watermark stretch}. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title, + watermark tikz={\draw[line width=2mm] circle (1cm) + node{\fontfamily{ptm}\fontseries{b}\fontsize{20mm}{20mm}\selectfont ?};}] +\lipsum[1] +\tcblower +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + +\begin{docTcbKey}{watermark tikz on}{=\meta{part} is \meta{graphical code}}{no default, initially unset} + This option draws the given |tikz| \meta{graphical code} in the center of the interior region of a |tcolorbox| + as described for \refKey{/tcb/watermark tikz}. + But this is done only for boxes named \meta{part} of a break sequence, see + \refKey{/tcb/breakable}.\\ + Feasible values for \meta{part} are: + \begin{itemize} + \item\docValue{broken}: all broken box parts, + \item\docValue{unbroken}: unbroken boxes only, + \item\docValue{first}: first parts of a break sequence, + \item\docValue{middle}: middle parts of a break sequence, + \item\docValue{last}: last parts of a break sequence, + \item\docValue{unbroken and first}: unbroken boxes and first parts of a break sequence, + \item\docValue{middle and last}: middle and last parts of a break sequence. + \end{itemize} +\end{docTcbKey} + + +\begin{docTcbKey}{no watermark}{}{style, no default, initially set} + Removes the watermark if set before. This is an alias for + \refKey{/tcb/no overlay}. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{watermark opacity}{=\meta{fraction}}{no default, initially |1.00|} + Sets the opacity value $\in[0,1]$ for a watermark. +\begin{dispExample} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + watermark text=Watermark,nobeforeafter,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Opacity 1.00,watermark opacity=1.00] +\lipsum[2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Opacity 0.50,watermark opacity=0.50] +\lipsum[2] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\enlargethispage{5mm} +\begin{docTcbKey}{watermark zoom}{=\meta{fraction}}{no default, initially |0.75|} + Sets the zoom value for a watermark. The zoom respects the aspect ratio. + The value $1.0$ means to fill the whole box until the watermark touches the frame. +\begin{dispExample} +\tcbset{enhanced,colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + watermark text=Watermark,nobeforeafter,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Zoom 1.0,watermark zoom=1.0] +\lipsum[2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Zoom 0.5,watermark zoom=0.5] +\lipsum[2] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}{watermark shrink}{=\meta{fraction}}{no default, initially unset} + Identically to \refKey{/tcb/watermark zoom}, but the watermark + never gets enlarged. Thus, the watermark keeps its original size or is shrunk. +\end{docTcbKey} + + +\begin{docTcbKey}{watermark overzoom}{=\meta{fraction}}{no default, initially unset} + Sets the overzoom value for a watermark. The overzoom respects the aspect ratio. + The value $1.0$ means to fill the whole box until the watermark touches + all four sides of the frame. +\begin{dispExample} +\tcbset{enhanced,colback=white,colframe=blue!50!black,fonttitle=\bfseries, + watermark opacity=0.5, + watermark graphics=lichtspiel.jpg,nobeforeafter,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Zoom 1.0,watermark zoom=1.0] +\lipsum[1] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Overzoom 1.0,watermark overzoom=1.0] +\lipsum[1] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\begin{marker} +If a \refKey{/tcb/watermark overzoom} value of |1.0| is used in connection +with invisible top and bottom rules which still have a thickness greater than |0pt|, +the space of these invisible rules may not be covered by the watermark. +For example, this situation may occur during the breaking of \refKey{/tcb/enhanced} boxes. +To avoid this optical glitch, just set \refKey{/tcb/pad at break} to any desired value. +\end{marker} + +\clearpage +\begin{docTcbKey}{watermark stretch}{=\meta{fraction}}{no default, initially unset} + Sets the stretch value for a watermark. The stretch value is applied to width + and height in relation to the box dimensions. It does not respect the aspect ratio. + The value $1.0$ means to fill the whole box. +\begin{dispExample} +\tcbset{enhanced,colback=white,colframe=blue!50!black,fonttitle=\bfseries, + watermark graphics=lichtspiel.jpg,watermark opacity=0.5, + nobeforeafter,width=(\linewidth-2mm)/2} + +\begin{tcolorbox}[title=Stretch 1.00,watermark stretch=1.00] +\lipsum[2] +\end{tcolorbox}\hfill% +\begin{tcolorbox}[title=Stretch 0.50,watermark stretch=0.50] +\lipsum[2] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{watermark color}{=\meta{color}}{no default, initially mixed background and frame color} + Sets the color for the watermark. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,watermark text=My Watermark, + watermark color=yellow!50!red] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage + +\begin{docTcbKey}{clip watermark}{\colOpt{=true\textbar false}}{default |true|, initially |true|} + Sets the watermark to be clipped to the interior area. +\begin{dispExample} +\tcbset{enhanced,colback=white,colframe=blue!50!white,fonttitle=\bfseries, + watermark opacity=0.5,watermark stretch=1.00,arc=3mm, + watermark graphics=lichtspiel.jpg} + +\begin{tcolorbox}[title=Clip (default),clip watermark] +\lipsum[1] +\end{tcolorbox} + +\begin{tcolorbox}[title=No clip,clip watermark=false] +\lipsum[1] +\end{tcolorbox}% +\end{dispExample} +\end{docTcbKey} + + + +\clearpage +\subsection{Clip Environments}\label{subsec:clipping} +The following clip environments are applicable for all skins which +use engines of type |path|, |pathfirst|, |pathmiddle|, or |pathlast|. +Especially, the skin \refSkin{enhanced} supports \emph{all} of them +and \refSkin{standard} \emph{none}. The typical area of application +is inside overlay code, see Section \ref{subsec:overlays} from +page \pageref{subsec:overlays}. + + +\begin{docEnvironment}{tcbclipframe}{} +Defines a |Tikz| scope which clips to the frame area path. +\begin{dispExample} +\makeatletter +\newtcolorbox{picturebox}[2][]{% + enhanced,frame hidden,interior hidden,fonttitle=\bfseries, + overlay={\begin{tcbclipframe}\node at (frame) + {\includegraphics[width=\tcb@width,height=\tcb@height]{#2}};\end{tcbclipframe}% + \begin{tcbclipinterior}\fill[white,opacity=0.75] + (frame.south west) rectangle (frame.north east);\end{tcbclipinterior}},#1} +\makeatother + +\begin{picturebox}[title=My Picture Box]{lichtspiel.jpg} +\lipsum[1] +\end{picturebox} +\end{dispExample} +\end{docEnvironment} + +\clearpage +\begin{docEnvironment}{tcbinvclipframe}{} +Defines a |Tikz| scope which clips to the \emph{outside} of the frame area path. + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\tcbset{enhanced jigsaw,fonttitle=\bfseries,opacityback=0.35,colback=blue!5!white, + frame style={left color=red!75!black,right color=red!10!yellow}} + +\begin{tikzpicture}% draw two balls + \path[use as bounding box] (0,0.8) rectangle +(0.1,0.1); + \shadedraw [shading=ball] (0,0) circle (1cm); + \shadedraw [ball color=red] (3,-2.2) circle (1cm); +\end{tikzpicture} + +\begin{tcolorbox}[title=A translucent box, + overlay={\begin{tcbinvclipframe} + \draw[red,line width=1cm] ([xshift=-2mm,yshift=2mm]frame.north west) + --([xshift=2mm,yshift=-2mm]frame.south east); + \draw[red,line width=1cm] ([xshift=-2mm,yshift=-2mm]frame.south west) + --([xshift=2mm,yshift=2mm]frame.north east); + \end{tcbinvclipframe}}] + \lipsum[2] +\end{tcolorbox} +\end{dispExample*} +\end{docEnvironment} + +\clearpage +\begin{docEnvironment}{tcbclipinterior}{} +Defines a |Tikz| scope which clips to the interior area path. +\begin{dispExample} +\begin{tcolorbox}[enhanced,title=My Title, + overlay={\begin{tcbclipinterior} + \draw[red,line width=1cm] (interior.north west)--(interior.south east); + \draw[red,line width=1cm] (interior.south west)--(interior.north east); + \end{tcbclipinterior}}] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docEnvironment} + +\begin{docEnvironment}{tcbcliptitle}{} +Defines a |Tikz| scope which clips to the title area path. +\begin{dispExample} +\begin{tcolorbox}[enhanced,title=My Title,colframe=blue,colback=yellow!10!white, + overlay={\begin{tcbcliptitle}\node at (title) + {\includegraphics[width=\linewidth]{lichtspiel.jpg}};\end{tcbcliptitle}}] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docEnvironment} + +\clearpage +\begin{docTcbKey}{clip title}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Sets the title to be clipped to the title area. +\begin{dispExample} +\tcbset{enhanced,width=5cm,colframe=red!50!white,coltitle=black, + colbacktitle=yellow!50!white} + +\begin{tcolorbox}[title=\mbox{This is a title which is unbreakable and far too long}] +This is a tcolorbox. +\end{tcolorbox} + +\begin{tcolorbox}[title=\mbox{This is a title which is unbreakable and far too long}, + clip title] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{clip upper}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Sets the upper part to be clipped to the interior area. +\begin{dispExample} +\newcommand{\mygraphics}[2][]{% + \tcbox[enhanced,boxsep=0pt,top=0pt,bottom=0pt,left=0pt, + right=0pt,boxrule=0.4pt,drop fuzzy shadow,clip upper, + colback=black!75!white,toptitle=2pt,bottomtitle=2pt,nobeforeafter, + center title,fonttitle=\small\sffamily,title=\detokenize{#2}] + {\includegraphics[width=\the\dimexpr(\linewidth-4mm)/2\relax]{#2}}} + +\mygraphics{lichtspiel.jpg}\hfill +\mygraphics{Basilica_5.png} +\end{dispExample} +\end{docTcbKey} + +\clearpage +The example for \refKey{/tcb/clip upper} sizes the box according to +the dimensions of the picture. To do it the other way around, the watermark +options provide an easy solution. +\begin{dispExample} +\newcommand{\mygraphics}[2][]{% + \tcbox[enhanced,capture=minipage,boxsep=0pt,top=0pt,bottom=0pt,left=0pt, + right=0pt,boxrule=0.4pt,drop fuzzy shadow,nobeforeafter, + colback=black!75!white,toptitle=2pt,bottomtitle=2pt, + center title,fonttitle=\small\sffamily,title=\detokenize{#2}, + width=(\linewidth-4mm)/2,height=6cm,colbacktitle={black}, + watermark zoom=1.0,watermark graphics={#2}]{}} + +\mygraphics{lichtspiel.jpg}\hfill +\mygraphics{Basilica_5.png} +\end{dispExample} + + +\begin{docTcbKey}{clip lower}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + Sets the lower part to be clipped to the interior area. +\begin{dispExample} +\tcbset{enhanced,width=5cm,colframe=red!50!black,text and listing} + +\begin{tcblisting}{} +Donau\-dampf\-schiff\-fahrts\-ka\-pi\-t\"ans\-m\"ut\-zen\-fran\-sen +\end{tcblisting} + +\begin{tcblisting}{clip lower} +Donau\-dampf\-schiff\-fahrts\-ka\-pi\-t\"ans\-m\"ut\-zen\-fran\-sen +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\subsection{Border Line Option Keys}\label{subsec:borderline} +The following borderline options are applicable for most skins which +use |tikzpicture| as \refKey{/tcb/graphical environment}. +Therefore, the skin \refSkin{standard} does not support these border lines, +but most other skins, e.\,g.\ \refSkin{enhanced}. + +The borderlines are independent from the normal |tcolorbox| rules. +They may be used with or without the \refKey{/tcb/segmentation engine}. + +The borderlines are stackable, i.\,e.\ several different border lines can be +used on the same |tcolorbox|. They are drawn \emph{after} the box frame and box +interior and \emph{before} overlays or watermarks. + +\begin{marker} +Technically, the normal |tcolorbox| rules result from a \tikzname\ \emph{filling} +process. The border lines are created by a \tikzname\ \emph{drawing} process. +This can be used to apply different effects. +\end{marker} + + +\begin{docTcbKey}{borderline}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new borderline to the stack of border lines. + This border line is drawn with the given \meta{width} and gets an + \meta{offset} computed from the frame outline. A positive \meta{offset} value + moves the borderline inside the |tcolorbox| and a negative \meta{offset} value + moves it outside without changing the bounding box.\\ + The border line is drawn along a \tikzname\ path with the given \tikzname\ \meta{options}. + Note that the \tikzname\ |line width| option should not be used here.\\ + The border lines adapt to the rounded corners of the |tcolorbox|. An inside + borderline will switch to sharp corners if necessary, an outside borderline will + always be rounded except for \refKey{/tcb/sharp corners}. +\begin{dispExample} +\begin{tcolorbox}[enhanced,title=Rounded corners,fonttitle=\bfseries,boxsep=5pt, + arc=8pt, + borderline={0.5pt}{0pt}{red}, + borderline={0.5pt}{5pt}{blue,dotted}, + borderline={0.5pt}{-5pt}{green} ] +This is a tcolorbox. +\end{tcolorbox} +\bigskip +\begin{tcolorbox}[enhanced,title=Sharp corners,fonttitle=\bfseries,boxsep=5pt, + arc=8pt,sharp corners=downhill, + borderline={0.5pt}{0pt}{red}, + borderline={0.5pt}{5pt}{blue,dotted}, + borderline={0.5pt}{-5pt}{green} ] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm,boxsep=1.5mm, + colback=yellow!20!white, + colframe=blue, + borderline={1mm}{1mm}{white}, + borderline={1mm}{2mm}{red} ] + \lipsum[1] +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm, + frame hidden,colback=blue!10!white, + borderline={1mm}{0mm}{blue,dotted} ] + \lipsum[2] +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +% \usepackage{lipsum} +\begin{tcolorbox}[enhanced,skin=enhancedmiddle, + frame hidden,interior hidden,top=0mm,bottom=0mm,boxsep=0mm, + borderline={0.75mm}{0mm}{red}, + borderline={0.75mm}{0.75mm}{red!50!yellow}, + borderline={0.75mm}{1.5mm}{yellow}, ] + \lipsum[3] +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +% \usepackage{lipsum} +\newtcolorbox{mygreenbox}[2][]{% + enhanced,width=\linewidth-6pt, + enlarge top by=3pt,enlarge bottom by=3pt, + enlarge left by=3pt,enlarge right by=3pt, + title={#2},frame hidden,boxrule=0pt,top=1mm,bottom=1mm, + colframe=green!30!black, colbacktitle=green!50!yellow, + coltitle=black, colback=green!25!white, + borderline={0.5pt}{-0.5pt}{green!75!blue}, + borderline={1pt}{-3pt}{green!50!blue},#1} + +\begin{mygreenbox}{My title} + \lipsum[4] +\end{mygreenbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{no borderline}{}{no default, initially set} + Removes all borderlines if set before. +\end{docTcbKey} + + +\begin{docTcbKey}{show bounding box}{\colOpt{=\meta{color}}}{default |red|, initially unset} + Displays the bounding box borderline of a |tcolorbox|. + Its intended use is debugging and fine tuning. + It should not be part of a final document. + The optional \meta{color} is the base color for the bounding box + borderline. +\begin{dispExample} +\tcbset{enhanced,nobeforeafter,width=4cm,fonttitle=\bfseries} + +\begin{tcolorbox}[show bounding box,title=Normal] +This is a tcolorbox. +\end{tcolorbox}% +\begin{tcolorbox}[show bounding box=blue,title=Shadow,drop fuzzy shadow] +This is a tcolorbox. +\end{tcolorbox}% +\begin{tcolorbox}[show bounding box=green,title=Enlarged,drop fuzzy shadow, + enlarge by=2mm] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage + +\begin{marker} +The following \emph{partial} borderlines act slightly different from the +complete borderlines described before. They ignore rounded corner settings, +their length is not modified by their \meta{offset}, they ignore skin settings +but adapt to breakable boxes. +\end{marker} + +\begin{docTcbKey}[][doc new=2014-10-20]{borderline north}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new borderline with the given \meta{width} to the + north of the |tcolorbox|. + A positive \meta{offset} value + moves the borderline inside the |tcolorbox| and a negative \meta{offset} value + moves it outside without changing the bounding box. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced, + borderline north={2pt}{-2pt}{red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-10-20]{borderline south}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new borderline with the given \meta{width} to the + south of the |tcolorbox|. + A positive \meta{offset} value + moves the borderline inside the |tcolorbox| and a negative \meta{offset} value + moves it outside without changing the bounding box. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced, + borderline south={2pt}{-2pt}{red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-10-20]{borderline east}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new borderline with the given \meta{width} to the + east of the |tcolorbox|. + A positive \meta{offset} value + moves the borderline inside the |tcolorbox| and a negative \meta{offset} value + moves it outside without changing the bounding box. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced, + borderline east={2pt}{-2pt}{red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-10-20]{borderline west}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new borderline with the given \meta{width} to the + west of the |tcolorbox|. + A positive \meta{offset} value + moves the borderline inside the |tcolorbox| and a negative \meta{offset} value + moves it outside without changing the bounding box. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[enhanced, + borderline west={2pt}{-2pt}{red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2014-10-20]{borderline horizontal}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new borderline with the given \meta{width} to the + north and south of the |tcolorbox|. + A positive \meta{offset} value + moves the borderlines inside the |tcolorbox| and a negative \meta{offset} value + moves them outside without changing the bounding box. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[blanker,top=3mm,bottom=3mm, + borderline horizontal={2pt}{0pt}{red}] + This is a \textbf{tcolorbox}. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-10-20]{borderline vertical}{=\marg{width}\marg{offset}\marg{options}}{no default, initially unset} + Adds a new borderline with the given \meta{width} to the + east and west of the |tcolorbox|. + A positive \meta{offset} value + moves the borderlines inside the |tcolorbox| and a negative \meta{offset} value + moves them outside without changing the bounding box. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\begin{tcolorbox}[blanker,left=3mm,right=3mm, + borderline vertical={2pt}{0pt}{red}] + This is a \textbf{tcolorbox}.\\ + My second line. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{dispExample} +\begin{tcolorbox}[enhanced,colback=yellow!10!white,boxrule=0pt,frame hidden, + borderline north={1mm}{-2mm}{red}, + borderline south={1mm}{-2mm}{blue}, + borderline west={1mm}{-2mm}{green}, + borderline east={1mm}{-2mm}{yellow}] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} + +\clearpage +\subsection{Shadow Option Keys}\label{subsec:shadows} +The following shadow options are applicable for most skins which +use |tikzpicture| as \refKey{/tcb/graphical environment}. +Therefore, the skin \refSkin{standard} does not support these shadows, +but most other skins, e.\,g.\ \refSkin{enhanced}. + +The shadows are stackable, i.\,e.\ several different shadows can be +used on the same |tcolorbox|. They are drawn \emph{before} the box frame is drawn. + +\begin{docTcbKey}{no shadow}{}{no default} + Removes all shadows if set before. +\end{docTcbKey} + +\subsubsection{Common Shadows and Halos} + +\begin{docTcbKey}{drop shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[drop shadow] +This is a tcolorbox. +\end{tcolorbox}\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{drop fuzzy shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[drop fuzzy shadow] +This is a tcolorbox. +\end{tcolorbox}\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop fuzzy shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{drop midday shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[drop midday shadow] +This is a tcolorbox. +\end{tcolorbox}\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop midday shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +%\enlargethispage*{2cm} +\begin{docTcbKey}{drop fuzzy midday shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[drop fuzzy midday shadow] +This is a tcolorbox. +\end{tcolorbox}\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop fuzzy midday shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{halo}{\colOpt{=\meta{size} \texttt{with} \meta{color}}}{style, default |0.9mm with yellow|} + Adds a new halo shadow with the given \meta{color} + which overlaps the colorbox an all sides by \meta{size}. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own halo,halo] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Another halo, + halo=2mm with green] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\enlargethispage*{2cm} +\begin{docTcbKey}{fuzzy halo}{\colOpt{=\meta{size} \texttt{with} \meta{color}}}{style, default |0.9mm with yellow|} + Adds a new fuzzy halo shadow with the given \meta{color} + which overlaps the colorbox an all sides by \meta{size} plus |0.48mm|. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own halo,fuzzy halo] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Another halo, + fuzzy halo=2mm with green] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample} +\begin{tcolorbox}[blank,enhanced jigsaw,boxsep=2pt,arc=2pt, + fuzzy halo=2mm with red!50!white, + fuzzy halo=1mm with white] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +For all following shadows, the optionally given \meta{color} for the shadow can be changed +equivalent to the preceding examples. + +\begin{docTcbKey}{drop shadow southeast}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. + This shadow is identical to \refKey{/tcb/drop shadow}. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow southeast, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop shadow south}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. + This shadow is identical to \refKey{/tcb/drop midday shadow}. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow south, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop shadow southwest}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow southwest, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop shadow west}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow west, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop shadow northwest}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow northwest, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop shadow north}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow north, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\clearpage +\begin{docTcbKey}{drop shadow northeast}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow northeast, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop shadow east}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop shadow east, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + + +\begin{docTcbKey}{drop fuzzy shadow southeast}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. + This shadow is identical to \refKey{/tcb/drop fuzzy shadow}. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow southeast, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop fuzzy shadow south}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. + This shadow is identical to \refKey{/tcb/drop fuzzy midday shadow}. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow south, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop fuzzy shadow southwest}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow southwest, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop fuzzy shadow west}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow west, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\clearpage +\begin{docTcbKey}{drop fuzzy shadow northwest}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow northwest, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop fuzzy shadow north}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow north, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop fuzzy shadow northeast}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow northeast, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + +\begin{docTcbKey}{drop fuzzy shadow east}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new fuzzy shadow with standard dimensions to the stack of shadows. +\begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[drop fuzzy shadow east, + enhanced,colback=red!5!white,colframe=red!75!black] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey}% + + +\clearpage +\subsubsection{Lifted Shadows} + +\begin{docTcbKey}{drop lifted shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new lifted shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + boxrule=0.4pt,sharp corners, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[drop lifted shadow] +This is a tcolorbox. +\end{tcolorbox}\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop lifted shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{drop small lifted shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new small lifted shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + boxrule=0.4pt,sharp corners, + colframe=red!75!black,fonttitle=\bfseries} + +\tcbox[drop small lifted shadow,size=fbox] + {This is a tcolorbox.} +\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop small lifted shadow=black] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{drop large lifted shadow}{\colOpt{=\meta{color}}}{style, default |black!50!white|} + Adds a new large lifted shadow with standard dimensions to the stack of shadows. + Optionally, the \meta{color} for the shadow can be changed. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[drop large lifted shadow] +This is a tcolorbox. +\end{tcolorbox}\par\bigskip +\begin{tcolorbox}[title=Another shadow, + drop large lifted shadow=blue] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\clearpage + +\subsubsection{Generic Shadows} +\begin{docTcbKey}{shadow}{=\marg{xshift}\marg{yshift}\marg{offset}\marg{options}}{no default} + Adds a new shadow to the stack of shadows. + This shadow follows the outline of the |tcolorbox| but is shifted by + \meta{xshift} and \meta{yshift}. The \meta{offset} value is a distance value + from the frame outline. A positive \meta{offset} value shrinks the shadow + and a negative \meta{offset} value enlarges the shadow. + The shadow is filled along a \tikzname\ path with the given \tikzname\ \meta{options}.\\ + The shadows adapt to the rounded corners of the |tcolorbox|. An shrinked shadow + will switch to sharp corners if necessary, an enlarged shadow may become + more rounded depending on several factors. But \refKey{/tcb/sharp corners} + have sharp shadows. + \begin{marker} + Shadows are not considered for the bounding box computation by default. + Large shadows may be overlaped by the following content. But, the + bounding box can be adapted if necessary. + \end{marker} + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own shadow, + shadow={2mm}{-1mm}{0mm}{black!50!white}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Another shadow, + shadow={-1mm}{-2mm}{0mm}{fill=blue, + opacity=0.5}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Double shadow, + shadow={-1.5mm}{-1.5mm}{0mm}{fill=blue, + opacity=0.25}, + shadow={1.5mm}{-1.5mm}{0mm}{fill=red, + opacity=0.25}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Far shadow, + shadow={5.5mm}{-3.5mm}{2mm}{fill=black, + opacity=0.25}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Halo shadow, + shadow={0mm}{0mm}{-1.5mm}% + {fill=yellow!75!red,opacity=0.5}] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{fuzzy shadow}{=\marg{xshift}\marg{yshift}\marg{offset}\marg{step}\marg{options}}{no default} + Adds a new fuzzy shadow to the stack of shadows. Actually, this option + adds several shadows which appear like a shadow with a fuzzy border. + This fuzzy shadow follows the outline of the |tcolorbox| but is shifted by + \meta{xshift} and \meta{yshift}. The \meta{offset} value is a distance value + from the frame outline. A positive \meta{offset} value shrinks the shadow + and a negative \meta{offset} value enlarges the shadow. + The \marg{step} value describes a shrink + offset used for the combination of the partial shadows. + The shadow is filled along a \tikzname\ path with the given \tikzname\ \meta{options} but + any |opacity| value will be ignored. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own shadow, + fuzzy shadow={2mm}{-1mm}{0mm}{0.1mm}% + {black!50!white}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Another shadow, + fuzzy shadow={-1mm}{-2mm}{0mm}{0.2mm}% + {fill=blue}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Double shadow, + fuzzy shadow={-1.5mm}{-1.5mm}{0mm}{0.1mm}% + {blue}, + fuzzy shadow={1.5mm}{-1.5mm}{0mm}{0.1mm}% + {red}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip +\begin{tcolorbox}[title=Far shadow, + fuzzy shadow={5.5mm}{-3.5mm}{0mm}{0.3mm}% + {black}] +This is a tcolorbox. +\end{tcolorbox} +\par\bigskip\bigskip +\begin{tcolorbox}[title=Glow shadow, + fuzzy shadow={0mm}{0mm}{-1.5mm}{0.15mm}% + {yellow!75!red}] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample} +\newtcolorbox{mybox}[1][]{enhanced, + fuzzy shadow={1.0mm}{-1.0mm}{0.12mm}{0mm}{blue!50!white}, + fuzzy shadow={-1.0mm}{-1.0mm}{0.12mm}{0mm}{red!50!white}, + fuzzy shadow={-1.0mm}{1.0mm}{0.12mm}{0mm}{green!50!white}, + fuzzy shadow={1.0mm}{1.0mm}{0.12mm}{0mm}{yellow!50!white},#1 +} + +\begin{mybox}[title=A multi shadow box] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2015-05-05]{smart shadow arc}{\colOpt{=true\textbar false}}{default |true|, + initially |true|} +If set to |true|, the shadow drawing algorithm tries to do a somewhat +smart calculation of the arc for the shadow. The result is pleasing for typical boxes +with rounded corners, but gives strange results for circular boxes. + +\begin{dispExample} +\tcbset{enhanced,nobeforeafter,colback=red!5!white, + colframe=red!75!black,width=3cm,square,halign=center,valign=center + } + +\begin{tcolorbox}[drop shadow] +Smart shadow arc (arguably better than normal) +\end{tcolorbox} +\hfill +\begin{tcolorbox}[smart shadow arc=false, drop shadow] +Normal shadow arc +\end{tcolorbox} +\hfill +\begin{tcolorbox}[circular arc, drop shadow] +Smart shadow arc (worse than normal) +\end{tcolorbox} +\hfill +\begin{tcolorbox}[circular arc, smart shadow arc=false, drop shadow] +Normal shadow arc +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{lifted shadow}{=\marg{xshift}\marg{yshift}\marg{bend}\marg{step}\marg{options}}{no default} + Adds a new lifted shadow to the stack of shadows. Actually, this option + adds several shadows which appear like a shadow with a fuzzy border. + This lifted shadow follows the outline of the |tcolorbox| but is shifted by + \meta{xshift} and \meta{yshift} on the lower left corner and by + $-$\meta{xshift} and \meta{yshift} on the lower right corner. + Additionally, there is a \meta{bend} in the middle. + The \marg{step} value describes a shrink + offset used for the combination of the partial shadows. + The shadow is filled along a \tikzname\ path with the given \tikzname\ \meta{options} but + any |opacity| value will be ignored. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\tcbset{enhanced,colback=red!5!white, + boxrule=0.1pt, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=My own shadow, + lifted shadow={1mm}{-2mm}{3mm}{0.1mm}% + {black!50!white}] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\clearpage +\subsubsection{\tikzname\ Shadows} +Alternativ to the package shadow options described before, shadows from +the \flqq Shadows Library\frqq\ of \tikzname\ can be used. +Such shadows can be added directly to the frame path using \refKey{/tcb/frame style}. + +\begin{exdispExample*}{tikz_shadow_1}{sbs,lefthand ratio=0.7} +% \usetikzlibrary{shadows} +\begin{tcolorbox}[enhanced, + colback=red!5!white,colframe=red!75!black, + frame style={drop shadow} ] + This is a tcolorbox. +\end{tcolorbox} +\end{exdispExample*} + +\begin{exdispExample*}{tikz_shadow_2}{sbs,lefthand ratio=0.7} +% \usetikzlibrary{shadows} +\begin{tcolorbox}[enhanced,height=3cm, + colback=red!5!white,colframe=red!75!black, + halign=center,valign=center, + frame style={circular drop shadow} ] + This is a tcolorbox. +\end{tcolorbox} +\end{exdispExample*} + +\begin{exdispExample*}{tikz_shadow_3}{sbs,lefthand ratio=0.7} +% \usetikzlibrary{shadows} +\begin{tcolorbox}[enhanced,width=2.5cm, + square,circular arc, + halign=center,valign=center, + colback=red!5!white,colframe=red!75!black, + frame style={circular glow={fill=red}} ] + tcolorbox +\end{tcolorbox} +\end{exdispExample*} + + +\clearpage +\subsection{\tikzname\ Picture Option Keys}\label{subsec:tikzpicture} +The following general options are applicable for skins which +use |tikzpicture| as \refKey{/tcb/graphical environment}. +Therefore, the skin \refSkin{standard} does not support these options, +but most other skins, e.\,g.\ \refSkin{enhanced}. + + +\begin{docTcbKey}{tikz}{=\meta{tikz option list}}{no default, initially empty} + Adds the given \meta{tikz option list} to the main |tikzpicture| environment + used to draw the color box, see \cite{tantau:2015a}. If this option is + applied a second time, the new \meta{tikz option list} is appended to the + current option list. +\begin{dispExample*}{sbs,lefthand ratio=0.66, + segmentation style={pattern=checkerboard light gray}} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=Transparent box, + tikz={opacity=0.5,transparency group}] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries, + fontupper=\bfseries\Huge, + halign title=center,halign=center} + +\begin{tcolorbox}[title=Rotated box, + tikz={rotate=30}] +Sold! +\end{tcolorbox} +\end{dispExample*} + +\end{docTcbKey} + + +\begin{docTcbKey}{tikz reset}{}{initially set} + Removes all options given by \refKey{/tcb/tikz}. +\end{docTcbKey} + + +\begin{docTcbKey}{at begin tikz}{=\meta{tikz code}}{no default, initially empty} + The given \meta{tikz code} is executed at the beginning of the |tikzpicture| environment + after the \tikzname\ option |execute at begin picture| was applied. + If this option is applied a second time, the new \meta{tikz code} is appended to the current code. +\end{docTcbKey} + + +\begin{docTcbKey}{at begin tikz reset}{}{initially set} + Removes all code given by \refKey{/tcb/at begin tikz}. +\end{docTcbKey} + + +\begin{docTcbKey}{at end tikz}{=\meta{tikz code}}{no default, initially empty} + The given \meta{tikz code} is executed at the ending of the |tikzpicture| environment + before the \tikzname\ option |execute at end picture| was applied. + If this option is applied a second time, the new \meta{tikz code} is appended to the current code. +\end{docTcbKey} + + +\begin{docTcbKey}{at end tikz reset}{}{initially set} + Removes all code given by \refKey{/tcb/at end tikz}. +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{rotate}{=\meta{angle}}{no default, initially unset} + Rotates the |tcolorbox| by the given \meta{angle}. Note that this is + a \tikzname\ coordinate transformation i.e. not all graphical elements like shadings + will really be rotated. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=Rotated box,rotate=30] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}{scale}{=\meta{fraction}}{no default, initially unset} + Scales the |tcolorbox| by the given \meta{fraction}. Note that this is + a \tikzname\ coordinate transformation i.e. not all graphical elements like line widths + will really be scaled. +\begin{dispExample*}{sbs,lefthand ratio=0.66} +\tcbset{enhanced,colback=red!5!white, + colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[title=Scaled box,scale=0.5] +This is a tcolorbox. +\end{tcolorbox} +\begin{tcolorbox}[title=Scaled box,scale=1.25] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{remember}{}{style, initially unset} + Shortcut for |tikz={remember picture}|. This allows one to reference nodes + in other \tikzname\ pictures. +\begin{dispExample} +\begin{tcolorbox}[enhanced,remember,colback=red!5!white,colframe=red!75!black, + fonttitle=\bfseries,title=The four corners of a paper, + overlay={\draw[red!50!white,line width=1mm,opacity=0.5,shorten >=3mm] + (frame.north west) edge[->] (current page.north west) + (frame.north east) edge[->] (current page.north east) + (frame.south west) edge[->] (current page.south west) + (frame.south east) edge[->] (current page.south east);}] +This is a tcolorbox. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\tcbinterruptdraftmode% +\begin{docTcbKey}{remember as}{=\meta{name}}{style, no default, initially unset} + The |frame| node will be remembered by the given \meta{name} to be referenced + in other \tikzname\ pictures. +\begin{dispExample} +% \usepackage{lipsum} +\newtcolorbox{mybox}[1][]{enhanced,colframe=blue!75!black,colback=blue!10!white, + fonttitle=\bfseries,#1} + +\begin{mybox}[title=First Box,nobeforeafter,width=\linewidth/4,remember as=one] +This is a test. +\end{mybox} +\hfill +\begin{mybox}[title=Second Box,nobeforeafter,width=\linewidth/4,remember as=two] +This is a test. +\end{mybox} +\hfill +\begin{mybox}[title=Third Box,nobeforeafter,width=\linewidth/4,remember as=three] +This is a test. +\end{mybox} + +\lipsum[2] + +\begin{mybox}[title=Fourth Box,remember as=four] +This is a test. +\end{mybox} + +\begin{tikzpicture}[overlay,remember picture,line width=1mm,draw=red!75!black] + \draw[->] (one.east) to[bend right] node[above] {A} (two.west); + \draw[->] (two.east) to[bend left] node[above] {B} (three.west); + \draw[->] (three.east) to[bend left=90] node[right] {C} (four.east); + \draw[->] (four.west) to[bend left=90] node[left] {D} (one.west); +\end{tikzpicture} +\end{dispExample} +\end{docTcbKey} +\tcbcontinuedraftmode% + + +\clearpage +\subsection{Underlay Option Keys}\label{subsec:skinunderlay} + +Underlays are quite similar to overlays described in \Vref{subsec:overlays}. +Underlays are drawn \emph{after} the frame and interior are +drawn and \emph{before} overlays and the text content is drawn; see +\Vref{subsec:tcolorboxdrawing} for the general drawing scheme. + +The differences between underlays and overlays are: +\begin{itemize} +\item Underlays are not applicable for the skins + \refSkin{standard} and + \refSkin{standard jigsaw}, + whereas overlays are applicable also for these skins. + The skin \refSkin{spartan} supports underlays but no overlays. + \begin{marker} + If an underlay is used with the \refSkin{standard} skin, it is silently ignored. + \end{marker} +\item Underlays are stackable, i.\,e.\ several different underlays can be + used on the same |tcolorbox|. Overlays are not stackable by default (but with + some help of the library \mylib{hooks}). +\item Boxed titles are implemented with underlays (\Vref{subsec:skinboxedtitle}), + watermarks are implemented with overlays (\Vref{subsec:watermarks}). +\end{itemize} + + +\begin{docTcbKey}{underlay}{=\meta{graphical code}}{no default, initially unset} + Adds \meta{graphical code} to the box drawing process. This \meta{graphical code} + is drawn \emph{after} the frame and interior and \emph{before} the text content. +\begin{dispExample} +\newtcolorbox{mybox}[1][]{enhanced,colback=red!5!white, + colbacktitle=red!85!black!50!white, + colframe=red!75!black,fonttitle=\bfseries,watermark color=yellow!50!white, + underlay={\begin{tcbclipinterior} + \draw[red!40!white,line width=1cm] (interior.south west)--(interior.north east); + \end{tcbclipinterior}}, + attach boxed title to top center={yshift=-2mm},#1} + +\begin{mybox}[title=My box,watermark text=My Watermark] +\lipsum[2] +\end{mybox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{no underlay}{}{style, no default, initially set} + Removes the underlay if set before. +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{underlay broken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{underlay unbroken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} but \emph{is not} broken actually + or if the box is set to be \refKey{/tcb/unbreakable}, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no underlay unbroken}{}{style, no default, initially set} + Removes the unbroken underlay if set before. +\end{docTcbKey} + +\begin{docTcbKey}{underlay first}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{first} part of the break sequence. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no underlay first}{}{style, no default, initially set} + Removes the first underlay if set before. +\end{docTcbKey} + +\begin{docTcbKey}{underlay middle}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{middle} parts (if any) of the break sequence. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no underlay middle}{}{style, no default, initially set} + Removes the middle underlay if set before. +\end{docTcbKey} + +\begin{docTcbKey}{underlay last}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{last} part of the break sequence. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no underlay last}{}{style, no default, initially set} + Removes the last underlay if set before. +\end{docTcbKey} + +\begin{docTcbKey}{underlay boxed title}{=\meta{graphical code}}{no default, initially unset} + If the box has a \emph{boxed title}, see \Vref{subsec:skinboxedtitle}, + then the \meta{graphical code} is added to the box drawing process + \emph{before} the boxed title is drawn. +\end{docTcbKey} + +\begin{docTcbKey}{no underlay boxed title}{}{style, no default, initially set} + Removes the boxed title underlay if set before. +\end{docTcbKey} + +\begin{docTcbKey}{underlay unbroken and first}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/underlay unbroken} and + \refKey{/tcb/underlay first} together. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{underlay middle and last}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/underlay middle} and + \refKey{/tcb/underlay last} together. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{underlay unbroken and last}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/underlay unbroken} and + \refKey{/tcb/underlay last} together. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2014-09-19]{underlay first and middle}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/underlay first} and + \refKey{/tcb/underlay middle} together. + \refKey{/tcb/underlay} overwrites this key. +\end{docTcbKey} + + +\clearpage +\subsection{Finish Option Keys}\label{subsec:skinfinish} + +Finishes are quite similar to underlays described in \Vref{subsec:skinunderlay} +and overlays described in \Vref{subsec:overlays}. +Finishes are drawn \emph{after} the text content is drawn; see +\Vref{subsec:tcolorboxdrawing} for the general drawing scheme. +Therefore, a finish will reduce the readability of the text content. + +Finishes are intended for special effects like highlights or glosses or text over text. + +\begin{itemize} +\item Finishes are only applicable for the skins + \refSkin{enhanced}, + \refSkin{empty}, + \refSkin{freelance}, + \refSkin{bicolor}, + \refSkin{beamer}, and + \refSkin{widget}. + \begin{marker} + If a finish is used with the \refSkin{standard} skin, it is silently ignored. + \end{marker} +\item Finishes are stackable, i.\,e.\ several different finishes can be + used on the same |tcolorbox|. +\end{itemize} + +\enlargethispage*{2cm} +\begin{docTcbKey}{finish}{=\meta{graphical code}}{no default, initially unset} + Adds \meta{graphical code} to the box drawing process. This \meta{graphical code} + is drawn \emph{after} the text content. +\begin{dispExample} +\newtcolorbox{mybox}[1][]{enhanced,colback=red!5!white, + colbacktitle=red!85!black!50!white,colframe=red!75!black,fonttitle=\bfseries, + finish={\begin{tcbclipframe} + \path[bottom color=black,top color=black!50!white,opacity=0.1] + (frame.south west) -- (frame.south east) -- (frame.north east) -- cycle; + \path[top color=white,bottom color=black!50!white,opacity=0.1] + (frame.south west) -- (frame.north east) -- (frame.north west) -- cycle; + \end{tcbclipframe}},#1} + +\begin{mybox}[title=My box] +\lipsum[2] +\end{mybox} +\end{dispExample} +\begin{dispExample} +\newtcolorbox{mybox}[1][]{enhanced,colback=red!5!white, + colbacktitle=red!85!black!50!white,colframe=red!75!black,fonttitle=\bfseries, + finish={\node[draw,fill=white,fill opacity=0.85,inner sep=5mm, + rounded corners] at (frame.center) {\Huge\bfseries Finish!};},#1} + +\begin{mybox}[title=My box] +\lipsum[2] +\end{mybox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{no finish}{}{style, no default, initially set} + Removes the finish if set before. +\end{docTcbKey} + + +\begin{docTcbKey}{finish broken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{finish unbroken}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} but \emph{is not} broken actually + or if the box is set to be \refKey{/tcb/unbreakable}, + then the \meta{graphical code} is added to the box drawing process. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no finish unbroken}{}{style, no default, initially set} + Removes the unbroken finish if set before. +\end{docTcbKey} + +\begin{docTcbKey}{finish first}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{first} part of the break sequence. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no finish first}{}{style, no default, initially set} + Removes the first finish if set before. +\end{docTcbKey} + +\begin{docTcbKey}{finish middle}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{middle} parts (if any) of the break sequence. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no finish middle}{}{style, no default, initially set} + Removes the middle finish if set before. +\end{docTcbKey} + +\begin{docTcbKey}{finish last}{=\meta{graphical code}}{no default, initially unset} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the \meta{graphical code} is added to the box drawing process for + the \emph{last} part of the break sequence. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{no finish last}{}{style, no default, initially set} + Removes the last finish if set before. +\end{docTcbKey} + +\begin{docTcbKey}{finish unbroken and first}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/finish unbroken} and + \refKey{/tcb/finish first} together. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{finish middle and last}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/finish middle} and + \refKey{/tcb/finish last} together. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\begin{docTcbKey}{finish unbroken and last}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/finish unbroken} and + \refKey{/tcb/finish last} together. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2014-09-19]{finish first and middle}{=\meta{graphical code}}{no default, initially unset} + This is an abbreviation for setting + \refKey{/tcb/finish first} and + \refKey{/tcb/finish middle} together. + \refKey{/tcb/finish} overwrites this key. +\end{docTcbKey} + +\clearpage +\subsection{Hyper Option Keys}\label{subsec:hyper} +All options of this section need the package |hyperref| \cite{rahtz:2012a} +to be loaded separately. All these options are implemented as +\refKey{/tcb/finish} and can be disabled by \refKey{/tcb/no finish}. + +\begin{marker} +If the package |hyperref| \cite{rahtz:2012a} is not loaded or if +the \refSkin{standard} skin is used, all hyper option are silently ignored. +\end{marker} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperref}{=\meta{marker}}{no default, initially unset} + The whole \textit{frame} of a |tcolorbox| is make an active hyperlink for a + \meta{marker} which was given by |\label| or \refKey{/tcb/label} or \refKey{/tcb/phantomlabel}. + Such, the |tcolorbox| is made a clickable button (depending on the previewer). + \begin{dispExample*}{sbs,lefthand ratio=0.7} +% \section{Library skins}\label{sec:skins}% +\begin{tcolorbox}[beamer,colback=red!50, + hyperref=sec:skins] +Jump to the heading of Section~\ref*{sec:skins}. +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperref interior}{=\meta{marker}}{no default, initially unset} + Identical to \refKey{/tcb/hyperref}, but only the \textit{interior} of a + |tcolorbox| is made a hyperlink (without frame and title). +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperref title}{=\meta{marker}}{no default, initially unset} + Identical to \refKey{/tcb/hyperref}, but only the \textit{title} of a + |tcolorbox| is made a hyperlink. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperref node}{=\marg{marker}\marg{node}}{no default, initially unset} + Identical to \refKey{/tcb/hyperref}, but only the given \tikzname\ \meta{node} + is made a hyperlink. This \meta{node} may be |frame|, |interior|, |title|, or + any other named node used for drawing the |tcolorbox|. + The \meta{node} may be defined inside + \refKey{/tcb/underlay}, \refKey{/tcb/overlay} or \refKey{/tcb/finish}. + If the later is used, define the node \emph{before} \refKey{/tcb/hyperref node} + is applied. + \begin{dispExample*}{sbs,lefthand ratio=0.7} +% \section{Library skins}\label{sec:skins}% +\begin{tcolorbox}[enhanced,colback=yellow!10, + underlay={\node[red,fill=red!30,inner sep=3mm] + (click) at (frame.center) {X};}, + hyperref node={sec:skins}{click}] +Jump to the heading of Section~\ref*{sec:skins} +(X marks the click point). +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperlink}{=\meta{marker}}{no default, initially unset} + The whole \textit{frame} of a |tcolorbox| is make an active hyperlink for a + \meta{marker} which was given by |\hypertarget| or \refKey{/tcb/hypertarget}. + Such, the |tcolorbox| is made a clickable button (depending on the previewer). + \begin{dispExample*}{sbs,lefthand ratio=0.7} +% \usepackage{hyperref}% +\begin{tcolorbox}[enhanced, + colback=blue!10,colframe=blue!50!black, + hypertarget=hypertwinB, + hyperlink=hypertwinA, + title=Box B] +Click me to jump to Box A. +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}[][doc new=2017-02-03]{hyperlink interior}{=\meta{marker}}{no default, initially unset} + Identical to \refKey{/tcb/hyperlink}, but only the \textit{interior} of a + |tcolorbox| is made a hyperlink (without frame and title). +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperlink title}{=\meta{marker}}{no default, initially unset} + Identical to \refKey{/tcb/hyperlink}, but only the \textit{title} of a + |tcolorbox| is made a hyperlink. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperlink node}{=\marg{marker}\marg{node}}{no default, initially unset} + Identical to \refKey{/tcb/hyperlink}, but only the given \tikzname\ \meta{node} + is made a hyperlink. This \meta{node} may be |frame|, |interior|, |title|, or + any other named node used for drawing the |tcolorbox|. + The \meta{node} may be defined inside + \refKey{/tcb/underlay}, \refKey{/tcb/overlay} or \refKey{/tcb/finish}. + If the later is used, define the node \emph{before} \refKey{/tcb/hyperlink node} + is applied. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl}{=\meta{url}}{no default, initially unset} + The whole \textit{frame} of a |tcolorbox| is make an active hyperlink for an + \meta{url} in the same manner as using |\href| or |\url|. + Such, the |tcolorbox| is made a clickable button (depending on the previewer). + \begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[enhanced,colback=red!50, + hyperurl=http://www.ctan.org/pkg/tcolorbox] +View CTAN with a browser. +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl interior}{=\meta{url}}{no default, initially unset} + Identical to \refKey{/tcb/hyperurl}, but only the \textit{interior} of a + |tcolorbox| is made a hyperlink (without frame and title). +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl title}{=\meta{url}}{no default, initially unset} + Identical to \refKey{/tcb/hyperurl}, but only the \textit{title} of a + |tcolorbox| is made a hyperlink. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl node}{=\marg{url}\marg{node}}{no default, initially unset} + Identical to \refKey{/tcb/hyperurl}, but only the given \tikzname\ \meta{node} + is made a hyperlink. This \meta{node} may be |frame|, |interior|, |title|, or + any other named node used for drawing the |tcolorbox|. + The \meta{node} may be defined inside + \refKey{/tcb/underlay}, \refKey{/tcb/overlay} or \refKey{/tcb/finish}. + If the later is used, define the node \emph{before} \refKey{/tcb/hyperurl node} + is applied. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl*}{=\marg{options}\marg{url}}{no default, initially unset} + Identical to \refKey{/tcb/hyperurl}, but additional |hyperref| \cite{rahtz:2012a} + \meta{options} are applied. + \begin{dispExample*}{sbs,lefthand ratio=0.7} +\begin{tcolorbox}[enhanced,colback=green!50, + hyperurl*={page=3,pdfnewwindow=true}% + {tcolorbox-example.pdf}] +Open example file on Page~3. +\end{tcolorbox} + \end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl* interior}{=\marg{options}\marg{url}}{no default, initially unset} + Identical to \refKey{/tcb/hyperurl interior}, but additional |hyperref| \cite{rahtz:2012a} + \meta{options} are applied. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl* title}{=\marg{options}\marg{url}}{no default, initially unset} + Identical to \refKey{/tcb/hyperurl title}, but additional |hyperref| \cite{rahtz:2012a} + \meta{options} are applied. +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2017-02-03]{hyperurl* node}{=\marg{options}\marg{url}\marg{node}}{no default, initially unset} + Identical to \refKey{/tcb/hyperurl node}, but additional |hyperref| \cite{rahtz:2012a} + \meta{options} are applied. +\end{docTcbKey} + + + +\clearpage +\subsection{Jigsaw Skin Variants}\label{subsec:skinjigsaw} +As described in \Vref{sec:skincorekeys}, a |tcolorbox| is drawn by up to +four \emph{engines}. Typically, the \emph{frame} engine fills the complete box area +with color and the other engines fill certain areas with other colors. +Finally, only the area which you see as \emph{frame} of the box will display +the frame color. For most applications, this is a good approach. + +For certain boxes, a more delicate procedure is needed. E.g., if the box should +be translucent, an already painted area cannot be made unpainted. Therefore, +more elaborate frame engines saw holes into the frame where the interior area and +optionally the title area will be painted. +The resulting skins are called \emph{jigsaw} skins. For \refSkin{standard} +and \refSkin{enhanced}, there are variants called \refSkin{standard jigsaw} +and \refSkin{enhanced jigsaw}. + + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\newcommand{\ballexample}{\begin{tikzpicture} + \path[use as bounding box] (0,0.8) rectangle +(0.1,0.1); + \shadedraw [shading=ball] (0,0) circle (1cm); + \shadedraw [ball color=red] (3,-2.2) circle (1cm); +\end{tikzpicture}} + +\tcbset{enhanced,colback=blue!5!white, + frame style={left color=red!75!black,right color=red!10!yellow}, + fonttitle=\bfseries } + +\ballexample + +\begin{tcolorbox}[title=A normal box] + \lipsum[2] +\end{tcolorbox} + +\ballexample + +\begin{tcolorbox}[title=A translucent jigsaw box, + enhanced jigsaw,opacityback=0.35] + \lipsum[2] +\end{tcolorbox} +\end{dispExample*} + + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\tcbset{enhanced,colback=red!10!white,coltitle=black, + frame style={left color=red!75!black,right color=red!10!yellow}, + fonttitle=\bfseries,interior hidden,title hidden} + +\begin{tcolorbox}[title=A normal box with hidden interior and title] + This is a tcolorbox. +\end{tcolorbox} + +\begin{tcolorbox}[enhanced jigsaw, + title=A jigsaw box with hidden interior and title] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\newtcolorbox{mybox}{skin=enhancedmiddle jigsaw,leftrule=5mm,rightrule=5mm, + boxsep=0mm,top=0mm,bottom=0mm, + frame style={top color=blue,bottom color=red},interior hidden} + +\begin{mybox} + \lipsum[2] +\end{mybox} +\end{dispExample*} + + +\clearpage +\subsection{Draft Mode}\label{subsec:draftmode} +To reduce the compiliation time while drafting a document, the \emph{draft mode} +can be applied. Basically, it changes all skins to \refSkin{spartan} and +sets the \refKey{/tcb/fit algorithm} to |squeeze|. Especially, +when fuzzy shadows are used, the speedup will be considerable high. + +\begin{marker} +It is strongly recommended that the draft mode is \emph{not} used for the final document. +Use \refSkin{spartan} directly, if you want to stay with it. The draft mode +implementation may change in future. +\end{marker} + +\begin{marker} +Normally, switching to the draft mode should not alter the geometry of +your document. Since overlays are deactivated, any code placed there +(e.g. counter changes) is not executed anymore! Also, \refKey{/tcb/remember as} +will not have any effect. You may exclude critical code with +\refCom{tcbinterruptdraftmode} / \refCom{tcbcontinuedraftmode} +from converting to draft mode. +\end{marker} + + +\begin{docCommand}{tcbstartdraftmode}{} + Any following |tcolorbox| code is put into \emph{draft mode}. All skin + settings are overruled with \refSkin{spartan}. Overlays, watermarks, + shadows, borderlines, and rounded corners are deactivated for all |tcolorbox| + layers. +\end{docCommand} + +\begin{docCommand}{tcbstopdraftmode}{} + The \emph{draft mode} is deactivated for the following code. +\end{docCommand} + +\begin{docCommand}{tcbinterruptdraftmode}{} + If the compilation is in \emph{draft mode}, the \emph{draft mode} is deactivated + until a following \refCom{tcbcontinuedraftmode} is detected.\par + If the compilation is not in \emph{draft mode}, nothing happens and a following + \refCom{tcbcontinuedraftmode} will not start the \emph{draft mode}. + \begin{marker} + The pair |\tcbinterruptdraftmode| and |\tcbcontinuedraftmode| cannot + be used nested. + \end{marker} +\end{docCommand} + +\begin{docCommand}{tcbcontinuedraftmode}{} + Continues the \emph{draft mode} which was suspended by a preceding + \refCom{tcbinterruptdraftmode}. Nothing happens, if there was no draft + mode before \refCom{tcbinterruptdraftmode}. + \begin{marker} + Code, which is place between \refCom{tcbinterruptdraftmode} and + \refCom{tcbcontinuedraftmode} is shielded from \emph{draft mode}. + \end{marker} +\end{docCommand} + +\enlargethispage*{2cm} +\begin{docTcbKey}{draftmode}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + If set to |true|, the \emph{draft mode} is started. + If set to |false|, the \emph{draft mode} is stopped. + +\begin{dispExample*}{} +\newtcolorbox{mybeamer}[2][]{beamer,colback=Salmon!50!white, + colframe=FireBrick!75!black,adjusted title={#2},#1} + +\begin{mybeamer}{Beamer box} +This box looks like a box provided by the \texttt{beamer} class. +\end{mybeamer}\par\medskip +\begin{mybeamer}[draftmode]{Beamer box} +This box looks like a box provided by the \texttt{beamer} class. +\end{mybeamer} +\end{dispExample*} +\end{docTcbKey} + + + +\clearpage +\tcbset{skintable/.style={colframe=red!50!yellow!50!black, + colback=red!50!yellow!5!white,coltitle=red!50!yellow!3!white, + fonttitle=\bfseries,before=\par\smallskip, + title=Environment and engines for the skin '\texttt{#1}'}} + +\subsection{Skin Family 'standard'}\label{subsec:skinstandard} +\begin{marker}Note that the option keys \refKey{/tcb/frame style}, + \refKey{/tcb/interior style}, + \refKey{/tcb/segmentation style}, and + \refKey{/tcb/title style} are not be applicable to the standard skin. + Also, watermarks (see Subsection \ref{subsec:watermarks}) + are not usable with the standard skin. +\end{marker} + +\begin{docSkin}{standard} + This is the standard skin from the core package. All drawing engines + are set to type |standard|. The drawing is based on |pgf| commands and + does not need the |tikz| package. +\begin{tcolorbox}[skintable=standard] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |pgfpicture|\\ + \refKey{/tcb/frame engine}: \> |standard|\\ + \refKey{/tcb/interior titled engine}: \> |standard|\\ + \refKey{/tcb/interior engine}: \> |standard|\\ + \refKey{/tcb/segmentation engine}: \> |standard|\\ + \refKey{/tcb/title engine}: \> |standard| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{docTcbKey}{standard}{}{style, no value} + This is an abbreviation for setting |skin=standard|. +\end{docTcbKey} + +\begin{dispExample} +\begin{tcbraster}[standard,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage + +\begin{docSkin}{standard jigsaw} + This is the standard jigsaw skin from the core package. It differs from + the skin \refSkin{standard} by its frame engine, see \Vref{subsec:skinjigsaw}. +\begin{tcolorbox}[skintable=standard jigsaw] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |pgfpicture|\\ + \refKey{/tcb/frame engine}: \> |standardjigsaw|\\ + \refKey{/tcb/interior titled engine}: \> |standard|\\ + \refKey{/tcb/interior engine}: \> |standard|\\ + \refKey{/tcb/segmentation engine}: \> |standard|\\ + \refKey{/tcb/title engine}: \> |standard| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{docTcbKey}{standard jigsaw}{}{style, no value} + This is an abbreviation for setting |skin=standard jigsaw|. +\end{docTcbKey} + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\begin{tcbraster}[standard jigsaw,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + opacityframe=0.5,opacityback=0.5,opacitybacktitle=0.5, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample*} + + +\clearpage +\subsection{Skin Family 'enhanced'} +\begin{marker} +If you like the standard appearance of a |tcolorbox| but you want to +have some 'enhanced' features, the |enhanced| skin is what you are looking for. +\end{marker} + +\begin{docSkin}{enhanced} + This skin translates the drawing commands of the core package into |tikz| + path commands. Therefore, it allows all |tikz| high level options for + these paths and has more flexibility compared to the \refSkin{standard} skin. + You pay for this with some prolonged compilation time. + The |tikz| path options can + be given with the option keys + \refKey{/tcb/frame style}, + \refKey{/tcb/interior style}, + \refKey{/tcb/segmentation style}, and + \refKey{/tcb/title style}. +\begin{tcolorbox}[skintable=enhanced] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> |path|\\ + \refKey{/tcb/interior engine}: \> |path|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{docTcbKey}{enhanced}{}{style, no value} + This is an abbreviation for setting |skin=enhanced|. +\end{docTcbKey} + +\begin{dispExample} +\begin{tcbraster}[enhanced,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + +\begin{dispExample} +% \usetikzlibrary{shadings} % preamble +\tcbset{skin=enhanced,fonttitle=\bfseries, + frame style={upper left=blue,upper right=red,lower left=yellow,lower right=green}, + interior style={white,opacity=0.5}, + segmentation style={black,solid,opacity=0.2,line width=1pt}} + +\begin{tcolorbox}[title=Nice box in rainbow colors] + With the 'enhanced' skin, it is quite easy to produce fancy looking effects. + \tcblower + Note that this is still a \texttt{tcolorbox}. +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +% \usetikzlibrary{decorations.pathmorphing} % preamble +\tcbset{skin=enhanced,fonttitle=\bfseries,boxrule=1mm, + frame style={draw=FireBrick,fill=Salmon},drop fuzzy shadow, + interior style={draw=FireBrick,top color=Salmon!10,bottom color=Salmon!20}, + segmentation style={draw=FireBrick,solid,decorate, + decoration={coil,aspect=0,segment length=10.1mm}}} + +\begin{tcblisting}{title=A listing box with shadow and some specials} +Of course, skins can be used for listings also. +\begin{equation} + \int\limits_1^2 \frac{1}{x}~dx = \ln(2). +\end{equation} +\end{tcblisting} +\end{dispExample} + + +\clearpage + + +\begin{docTcbKey}{enhanced standard}{}{style, no value} + For unbreakable boxes, this is identical to using \refKey{/tcb/enhanced}. + But, for breakable boxes, the \emph{break sequence} is identical to the \refSkin{standard} skin, + see Section \ref{subsec:breaksequence} from page \pageref{subsec:breaksequence}. +\end{docTcbKey} + + +\begin{docTcbKey}{blank}{}{style, initially unset} + This style relies on the skin \refSkin{enhanced}. All drawing operations + are hidden and all margins are set to |0pt|. See \refKey{/tcb/blanker} + for switching off the drawing engines. +\begin{dispExample} +\begin{tcolorbox}[blank,watermark text=A blank box] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docCommand}{tcbline}{} + Sometimes, a line is only a line. With \refCom{tcblower} you separate + the box content into two functional units. |\tcbline| draws only a line + which looks like the segmentation line between upper and lower part. + Furthermore, you can use |\tcbline| more than just once. + |\tcbline| always uses the |path| drawing engine. Therefore, + the \refKey{/tcb/segmentation style} can be applied. + +\begin{dispExample} +\tcbset{enhanced,colframe=blue!50!black,colback=white} + +\begin{tcolorbox}[colupper=red!50!black,collower=green!50!black] +\lipsum[1] +\tcbline +\lipsum[2] +\tcblower +\lipsum[3] +\tcbline +\lipsum[4] +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{tcbline*}{} + Equivalent to \refCom{tcbline}, but in a breakable box, \refCom{tcbline*} + is removed if at a page/box break. Also, it is removed at the end + of a box. +\end{docCommand} + +\clearpage +\begin{docSkin}{enhancedfirst} +This is a flavor of \refSkin{enhanced} which is used as a \emph{first} part +in a break sequence for \refSkin{enhanced}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=enhancedfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> |pathfirst|\\ + \refKey{/tcb/interior engine}: \> |pathfirst|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[skin=enhancedfirst,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + + +\clearpage +\begin{docSkin}{enhancedmiddle} +This is a flavor of \refSkin{enhanced} which is used as a \emph{middle} part +in a break sequence for \refSkin{enhanced}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=enhancedmiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior engine}: \> |pathmiddle|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[skin=enhancedmiddle,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + + + +\clearpage +\begin{docSkin}{enhancedlast} +This is a flavor of \refSkin{enhanced} which is used as a \emph{last} part +in a break sequence for \refSkin{enhanced}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=enhancedlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> |pathlast|\\ + \refKey{/tcb/interior engine}: \> |pathlast|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\begin{tcbraster}[skin=enhancedlast,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}{enhanced jigsaw} + This is the jigsaw variant of skin \refSkin{enhanced}. + It differs by its frame engine, see \Vref{subsec:skinjigsaw}. +\begin{tcolorbox}[skintable=enhanced jigsaw] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathjigsaw|\\ + \refKey{/tcb/interior titled engine}: \> |path|\\ + \refKey{/tcb/interior engine}: \> |path|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{docTcbKey}{enhanced jigsaw}{}{style, no value} + This is an abbreviation for setting |skin=enhanced jigsaw|. +\end{docTcbKey} + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\begin{tcbraster}[enhanced jigsaw,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + opacityframe=0.5,opacityback=0.5,opacitybacktitle=0.5, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample*} + + +\begin{docTcbKey}[][doc new=2017-07-01]{enhanced standard jigsaw}{}{style, no value} + For unbreakable boxes, this is identical to using \refKey{/tcb/enhanced jigsaw}. + But, for breakable boxes, the \emph{break sequence} is identical to the \refSkin{standard jigsaw} skin, + see Section \ref{subsec:breaksequence} from page \pageref{subsec:breaksequence}. +\end{docTcbKey} + + +\clearpage +\begin{docSkin}{enhancedfirst jigsaw} + This is the jigsaw variant of skin \refSkin{enhancedfirst}. + It differs by its frame engine, see \Vref{subsec:skinjigsaw}. +\begin{tcolorbox}[skintable=enhancedfirst jigsaw] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirstjigsaw|\\ + \refKey{/tcb/interior titled engine}: \> |pathfirst|\\ + \refKey{/tcb/interior engine}: \> |pathfirst|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\begin{tcbraster}[skin=enhancedfirst jigsaw,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + opacityframe=0.5,opacityback=0.5,opacitybacktitle=0.5, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample*} + + +\clearpage +\begin{docSkin}{enhancedmiddle jigsaw} + This is the jigsaw variant of skin \refSkin{enhancedmiddle}. + It differs by its frame engine, see \Vref{subsec:skinjigsaw}. +\begin{tcolorbox}[skintable=enhancedmiddle jigsaw] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddlejigsaw|\\ + \refKey{/tcb/interior titled engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior engine}: \> |pathmiddle|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\begin{tcbraster}[skin=enhancedmiddle jigsaw,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + opacityframe=0.5,opacityback=0.5,opacitybacktitle=0.5, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample*} + + +\begin{docTcbKey}{marker}{}{style, no value} + This styles relies on the skin \refSkin{enhancedmiddle jigsaw}. It is + intended to be used as an optical marker like a highlighter pen. +\begin{dispExample} +\begin{tcolorbox}[marker] +\lipsum[2] +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage + +\begin{dispListing*}{before upper={This examples demonstrates the creation of several + \emph{text marker} environments based on \refSkin{enhancedmiddle}.\par\medskip}} +\tcbset{textmarker/.style={% + skin=enhancedmiddle jigsaw,breakable,parbox=false, + boxrule=0mm,leftrule=5mm,rightrule=5mm,boxsep=0mm,arc=0mm,outer arc=0mm, + left=3mm,right=3mm,top=1mm,bottom=1mm,toptitle=1mm,bottomtitle=1mm,oversize}} + +\newtcolorbox{yellow}{textmarker,colback=yellow!5!white,colframe=yellow} +\newtcolorbox{orange}{textmarker,colback=DarkOrange!5!white, + colframe=DarkOrange!75!yellow} +\newtcolorbox{red}{textmarker,colback=red!5!white,colframe=red} +\newtcolorbox{blue}{textmarker,colback=DeepSkyBlue!5!white,colframe=DeepSkyBlue} +\newtcolorbox{green}{textmarker,colback=Chartreuse!5!white,colframe=Chartreuse} +\newtcolorbox{rainbow}{textmarker,interior hidden, + frame style={top color=blue,bottom color=red,middle color=green}} + +\begin{yellow} + \lipsum[1-3] +\end{yellow} + +\begin{orange} + \lipsum[4] +\end{orange} + +\begin{red} + \lipsum[5] +\end{red} + +\begin{green} + \lipsum[6] +\end{green} + +\begin{blue} + \lipsum[7] +\end{blue} + +\begin{rainbow} + \lipsum[8] +\end{rainbow} +\end{dispListing*} +{\tcbusetemp} + + +\clearpage +\begin{docSkin}{enhancedlast jigsaw} + This is the jigsaw variant of skin \refSkin{enhancedlast}. + It differs by its frame engine, see \Vref{subsec:skinjigsaw}. +\begin{tcolorbox}[skintable=enhancedlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlastjigsaw|\\ + \refKey{/tcb/interior titled engine}: \> |pathlast|\\ + \refKey{/tcb/interior engine}: \> |pathlast|\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample*}{segmentation style={pattern=checkerboard light gray}} +\begin{tcbraster}[skin=enhancedlast jigsaw,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + opacityframe=0.5,opacityback=0.5,opacitybacktitle=0.5, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample*} + + + +\clearpage +\subsection{Skin Family 'bicolor'} +\begin{docSkin}{bicolor} + This skin is quite similar to the \refSkin{standard} and \refSkin{enhanced} skin. + But instead of a segmentation line, the optional lower part of the box is filled with a + different color or drawn with a different style. +\begin{tcolorbox}[skintable=bicolor] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} + \begin{itemize} + \item The most basic usage of this skin is to set the background color of + the lower part by \refKey{/tcb/colbacklower} and all other options like for + the \refSkin{standard} skin. +\begin{dispExample} +\begin{tcolorbox}[skin=bicolor,title=The title, + colframe=FireBrick!75!black,colback=Salmon!50!white,colbacklower=Salmon] + The upper part. + \tcblower + The lower part. +\end{tcolorbox} +\end{dispExample} + \item The more advanced usage of this skin is to apply the \refKey{/tcb/frame style} + and the \refKey{/tcb/interior style} like for + the \refSkin{enhanced} skin. Also, the \refKey{/tcb/segmentation style} can be + used, but it is applied to the whole lower part. +\begin{dispExample} +\begin{tcolorbox}[skin=bicolor,title=The title, + frame style={top color=FireBrick, + bottom color=FireBrick!15!white,draw=black}, + interior style={left color=Salmon,right color=Salmon!50!white}, + segmentation style={right color=Salmon,left color=Salmon!50!white}] + The upper part. + \tcblower + The lower part. +\end{tcolorbox} +\end{dispExample} + \end{itemize} +\end{docSkin} + +\begin{docTcbKey}{bicolor}{}{style, no value} + This is an abbreviation for setting |skin=bicolor|. +\end{docTcbKey} + + +\begin{dispExample} +\begin{tcbraster}[bicolor,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + +\begin{docTcbKey}{colbacklower}{=\meta{color}}{no default, initially \texttt{black!15!white}} + Sets the background \meta{color} of the lower part. It depends on the skin, + if this value is used. +\end{docTcbKey} + +\begin{dispExample} +\tcbset{gitexample/.style={listing and comment,comment={#1}, + skin=bicolor,boxrule=1mm,fonttitle=\bfseries,coltitle=black, + frame style={draw=black,left color=Gold,right color=Goldenrod!50!Gold}, + colback=black,colbacklower=Goldenrod!75!Gold, + colupper=white,collower=black, + listing options={language={bash},aboveskip=0pt,belowskip=0pt,nolol, + basicstyle=\ttfamily\bfseries,extendedchars=true}}} + +\begin{tcblisting}{title={Snapshot of the staging area}, + gitexample={The option '-a' automatically stages all tracked and modified + files before the commit.\par + This can be combined with the message option '-m' + as seen in the third line.}} +git commit +git commit -a +git commit -am 'changes to my example' +\end{tcblisting} +\end{dispExample} + + +\clearpage + + +\begin{docSkin}{bicolorfirst} +This is a flavor of \refSkin{bicolor} which is used as a \emph{first} part +in a break sequence for \refSkin{bicolor}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=bicolorfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\begin{tcbraster}[skin=bicolorfirst,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}{bicolormiddle} +This is a flavor of \refSkin{bicolor} which is used as a \emph{middle} part +in a break sequence for \refSkin{bicolor}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=bicolormiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[skin=bicolormiddle,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}{bicolorlast} +This is a flavor of \refSkin{bicolor} which is used as a \emph{last} part +in a break sequence for \refSkin{bicolor}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=bicolorlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[skin=bicolorlast,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + + +\clearpage +\subsection{Skin Family 'tile'} +\begin{docSkin}[doc new=2016-02-25]{tile} + This skin is a variant of skin \refSkin{bicolor}. Especially, the + optional lower part of the box is colored by \refKey{/tcb/colbacklower}. + The main difference to \refSkin{bicolor} is that \refSkin{tile} has no + frame. +\begin{tcolorbox}[skintable=tile] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{docTcbKey}[][doc new=2016-02-25]{tile}{}{style, no value} + This is an abbreviation for setting |skin=tile|. + \begin{marker}It also changes the geometry and some style options.\end{marker} +\end{docTcbKey} + + +\begin{dispExample} +\begin{tcbraster}[tile,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}[doc new=2016-02-25]{tilefirst} +This is a flavor of \refSkin{tile} which is used as a \emph{first} part +in a break sequence for \refSkin{tile}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=tilefirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\begin{tcbraster}[skin=tilefirst,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm,boxrule=0pt] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}[doc new=2016-02-25]{tilemiddle} +This is a flavor of \refSkin{tile} which is used as a \emph{middle} part +in a break sequence for \refSkin{tile}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=tilemiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[skin=tilemiddle,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm,boxrule=0pt] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}[doc new=2016-02-25]{tilelast} +This is a flavor of \refSkin{tile} which is used as a \emph{last} part +in a break sequence for \refSkin{tile}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=tilelast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[skin=tilelast,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacklower=LimeGreen!75!LightGreen, + colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm,boxrule=0pt] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + + +\clearpage +\subsection{Skin Family 'beamer'} + +\begin{docSkin}{beamer} + This skin resembles boxes known from the |beamer| class and therefore is + called 'beamer'. It uses the normal colors from the core package but shades + them a little bit. To use this skin, the |tikz| library |shadings| + has to be included in the preamble by: +\begin{dispListing} +\usetikzlibrary{shadings} +\end{dispListing} +\begin{tcolorbox}[skintable=beamer] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + + +\begin{docTcbKey}{beamer}{}{style, no value} + This is an abbreviation for setting |skin=beamer|. + \begin{marker}It also changes the geometry and some style options.\end{marker} +\end{docTcbKey} + + + +\begin{dispExample} +\begin{tcbraster}[beamer,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + + +\begin{dispExample} +\begin{tcolorbox}[beamer,colback=Salmon!50!white,colframe=FireBrick!75!black, + adjusted title=A colored box with the 'beamer' skin] +This box looks like a box provided by the \texttt{beamer} class. +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +\begin{tcolorbox}[beamer,colframe=blue,colback=black, + watermark graphics=lichtspiel.jpg, + coltext=white,watermark opacity=0.75,watermark stretch=1.0, + title=Beamer Box with background picture] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} + + +\begin{dispExample} +\newtcolorbox{myblock}[2][]{% + beamer,breakable,colback=LightBlue,colframe=DarkBlue,#1,title=#2}% + +\begin{myblock}{Beamerish \texttt{block}: \texttt{myblock}} +\lipsum[1] +\end{myblock} +\end{dispExample} + + +\clearpage +\begin{docSkin}{beamerfirst} +This is a flavor of \refSkin{beamer} which is used as a \emph{first} part +in a break sequence for \refSkin{beamer}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=beamerfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathfirst| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[beamer,skin=beamerfirst,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage + +\begin{docSkin}{beamermiddle} +This is a flavor of \refSkin{beamer} which is used as a \emph{middle} part +in a break sequence for \refSkin{beamer}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=beamermiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathmiddle| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[beamer,skin=beamermiddle,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}{beamerlast} +This is a flavor of \refSkin{beamer} which is used as a \emph{last} part +in a break sequence for \refSkin{beamer}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=beamerlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> |pathlast| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\begin{tcbraster}[beamer,skin=beamerlast,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + + +\clearpage +\subsection{Skin Family 'widget'} +\begin{docSkin}{widget} + This skin uses the normal colors from the core package but shades + them a little bit. To use this skin, the |tikz| library |shadings| + has to be included in the preamble by: +\begin{dispListing} +\usetikzlibrary{shadings} +\end{dispListing} +The appearance of the skin can be controlled by \refKey{/tcb/frame style}, +\refKey{/tcb/interior style}, and \refKey{/tcb/segmentation style}, +if needed. +\begin{tcolorbox}[skintable=widget] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |path|\\ + \refKey{/tcb/interior titled engine}: \> |path|\\ + \refKey{/tcb/interior engine}: \> |path|\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> \emph{special} + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{docTcbKey}{widget}{}{style, no value} + This is an abbreviation for setting |skin=widget|. + \begin{marker}It also changes the geometry and some style options.\end{marker} +\end{docTcbKey} + + +\begin{dispExample} +\begin{tcbraster}[widget,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\begin{dispExample} +\begin{tcolorbox}[widget,colback=Salmon!50!white,colframe=FireBrick!75!black, + adjusted title=A colored box with the 'widget' skin] +This is my content. +\end{tcolorbox} +\end{dispExample} + + + +\begin{docSkin}{widgetfirst} +This is a flavor of \refSkin{widget} which is used as a \emph{first} part +in a break sequence for \refSkin{widget}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=widgetfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathfirst|\\ + \refKey{/tcb/interior titled engine}: \> |pathfirst|\\ + \refKey{/tcb/interior engine}: \> |pathfirst|\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> \emph{special} + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[widget,skin=widgetfirst,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + +\clearpage + +\begin{docSkin}{widgetmiddle} +This is a flavor of \refSkin{widget} which is used as a \emph{middle} part +in a break sequence for \refSkin{widget}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=widgetmiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior titled engine}: \> |pathmiddle|\\ + \refKey{/tcb/interior engine}: \> |pathmiddle|\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> \emph{special} + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\begin{tcbraster}[widget,skin=widgetmiddle,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}{widgetlast} +This is a flavor of \refSkin{widget} which is used as a \emph{last} part +in a break sequence for \refSkin{widget}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=widgetlast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |pathlast|\\ + \refKey{/tcb/interior titled engine}: \> |pathlast|\\ + \refKey{/tcb/interior engine}: \> |pathlast|\\ + \refKey{/tcb/segmentation engine}: \> \emph{special}\\ + \refKey{/tcb/title engine}: \> \emph{special} + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[widget,skin=widgetlast,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + + + +\clearpage +\subsection{Skin Family 'empty'} + +\begin{docSkin}{empty} + This skin sets all engines to |empty|, i.\,e.\ nothing is drawn at all. + Therefore, this skin is a good starting point to create a complete + new style by yourself. +\begin{tcolorbox}[skintable=empty] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> |empty|\\ + \refKey{/tcb/interior engine}: \> |empty|\\ + \refKey{/tcb/segmentation engine}: \> |empty|\\ + \refKey{/tcb/title engine}: \> |empty| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{docTcbKey}{empty}{}{style, no value} + This is an abbreviation for setting |skin=empty|. +\end{docTcbKey} + +\begin{dispExample} +\begin{tcbraster}[empty,raster equal height,raster columns=4, + coltitle=Navy,borderline={2pt}{0pt}{black!10!white}, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docTcbKey}{blanker}{}{style, initially unset} + This style relies on the skin \refSkin{empty}. All engines + are set to empty and all margins are set to |0pt|. + In contrast to \refKey{/tcb/blank}, the graphical paths are + not constructed with exception of the geometry nodes. +\begin{dispExample} +\begin{tcolorbox}[blanker,watermark text=A blank box] +\lipsum[1] +\end{tcolorbox} +\end{dispExample} + +\begin{dispExample} +% \tcbuselibrary{fitting} +\newtcboxfit{\mybox}[1]{blanker,width=4cm,height=7cm,top=4pt, + watermark text=#1} + +\begin{tabular}{|c|c|c|}\hline +A & B & C\\\hline +\mybox{A}{\lipsum[1]} & \mybox{B}{\lipsum[2]} & \mybox{C}{\lipsum[3]}\\\hline +\end{tabular} +\end{dispExample} +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{blankest}{}{style, initially unset} + This style extends \refKey{/tcb/blanker}. + All engines are set to empty and all margins are set to |0pt|. + In contrast to \refKey{/tcb/blanker}, also title, shadow, underlay, + overlay, finish and borderline are removed. + +\begin{dispExample} +% \tcbuselibrary{raster} +\begin{tcbraster}[raster columns=3,raster equal height, + title=Box \thetcbrasternum, + enhanced,size=small,colframe=red!50!black,colback=red!10!white, + coltitle=yellow!85!black, + drop fuzzy shadow,watermark text={Box \thetcbrasternum}, + borderline={.25mm}{-0.5mm}{green!40!black}, + finish={\begin{tcbclipframe}\draw[blue,opacity=0.1,line width=1cm] + (frame.south west) -- (frame.north east);\end{tcbclipframe}}, + ] + \begin{tcolorbox}\lipsum[4]\end{tcolorbox} + \begin{tcolorbox}[blanker]\lipsum[4]\end{tcolorbox} + \begin{tcolorbox}[blankest]\lipsum[4]\end{tcolorbox} +\end{tcbraster} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docSkin}{emptyfirst} +This is a flavor of \refSkin{empty} which is used as a \emph{first} part +in a break sequence for \refSkin{empty}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=emptyfirst] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> |empty|\\ + \refKey{/tcb/interior engine}: \> |empty|\\ + \refKey{/tcb/segmentation engine}: \> |empty|\\ + \refKey{/tcb/title engine}: \> |empty| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[empty,skin=emptyfirst,raster equal height,raster columns=4, + coltitle=Navy,borderline={2pt}{0pt}{black!10!white}, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage + +\begin{docSkin}{emptymiddle} +This is a flavor of \refSkin{empty} which is used as a \emph{middle} part +in a break sequence for \refSkin{empty}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=emptymiddle] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> |empty|\\ + \refKey{/tcb/interior engine}: \> |empty|\\ + \refKey{/tcb/segmentation engine}: \> |empty|\\ + \refKey{/tcb/title engine}: \> |empty| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{dispExample} +\begin{tcbraster}[empty,skin=emptymiddle,raster equal height,raster columns=4, + coltitle=Navy,borderline={2pt}{0pt}{black!10!white}, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage +\begin{docSkin}{emptylast} +This is a flavor of \refSkin{empty} which is used as a \emph{last} part +in a break sequence for \refSkin{empty}. +Nevertheless, this skin can be applied independently. +\begin{tcolorbox}[skintable=emptylast] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |empty|\\ + \refKey{/tcb/interior titled engine}: \> |empty|\\ + \refKey{/tcb/interior engine}: \> |empty|\\ + \refKey{/tcb/segmentation engine}: \> |empty|\\ + \refKey{/tcb/title engine}: \> |empty| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{dispExample} +\begin{tcbraster}[empty,skin=emptylast,raster equal height,raster columns=4, + coltitle=Navy,borderline={2pt}{0pt}{black!10!white}, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + +\clearpage +\begin{dispListing*}{breakable,phantomlabel=freeboxexample,before upper={This example demonstrates +a breakable customized box. Here, we define an environment |freebox|. +The first application of |freebox| produces an unbroken |tcolorbox|. +The box is drawn by the code given by \refKey{/tcb/frame code} +and \refKey{/tcb/interior code}.\par +The second application of |freebox| is broken into several parts which +are drawn by the codes given by +\refKey{/tcb/skin first is subskin of}, +\refKey{/tcb/skin middle is subskin of}, and +\refKey{/tcb/skin last is subskin of}. +\par\bigskip +}} +% Preamble: +%\usepackage{tikz,lipsum} +%\tcbuselibrary{skins,breakable} +\tikzset{coltria/.style={fill=red!15!white}} + +\newtcolorbox{freebox}[1][]{empty,breakable,leftrule=5mm,left=2mm, + frame style={fill,top color=red!75!black,bottom color=red!75!black,middle color=red}, + colback=yellow!50!white, + watermark color=red!50!yellow!75!white, + watermark text on=unbroken is unbroken box, + watermark text on=first is first part, + watermark text on=middle is middle part, + watermark text on=last is last part, + % code for unbroken boxes: + frame code={\path[tcb fill frame] (frame.south west)--(frame.north west) + --([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east) + --([yshift=5mm]frame.south east)--([xshift=-5mm]frame.south east)--cycle; }, + interior code={\path[tcb fill interior] (interior.south west)--(interior.north west) + --([xshift=-4.8mm]interior.north east)--([yshift=-4.8mm]interior.north east) + --([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east) + --cycle; }, + % code for the first part of a break sequence: + skin first is subskin of={emptyfirst}{% + frame code={\path[tcb fill frame] (frame.south west)--(frame.north west) + --([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east) + --(frame.south east)--cycle; + \path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm) + -- +(60:2mm)-- cycle; }, + interior code={\path[tcb fill interior] (interior.south west|-frame.south) + --(interior.north west)--([xshift=-4.8mm]interior.north east) + --([yshift=-4.8mm]interior.north east)--(interior.south east|-frame.south) + --cycle; }, + },% + % code for the middle part of a break sequence: + skin middle is subskin of={emptymiddle}{% + frame code={\path[tcb fill frame] (frame.south west)--(frame.north west) + --(frame.north east)--(frame.south east)--cycle; + \path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm) + -- +(300:2mm) -- cycle; + \path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm) + -- +(60:2mm) -- cycle; + }, + interior code={\path[tcb fill interior] (interior.south west|-frame.south) + --(interior.north west|-frame.north)--(interior.north east|-frame.north) + --(interior.south east|-frame.south)--cycle; }, + }, + % code for the last part of a break sequence: + skin last is subskin of={emptylast}{% + frame code={\path[tcb fill frame] (frame.south west)--(frame.north west) + --(frame.north east)--([yshift=5mm]frame.south east) + --([xshift=-5mm]frame.south east)--cycle; + \path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm) + -- +(300:2mm) -- cycle; + }, + interior code={\path[tcb fill interior] (interior.south west) + --(interior.north west|-frame.north)--(interior.north east|-frame.north) + --([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east) + --cycle; }, + }, + #1} + +\begin{freebox} +\lipsum[1] +\end{freebox} + +\begin{freebox} +\lipsum[1-12] +\end{freebox} +\end{dispListing*} +{\tcbusetemp} + + +\clearpage + +\subsection{Skin 'spartan'}\label{subsec:spartan} + +\begin{docSkin}{spartan} + This skin is quite \ldots\ spartan. + It supports no rounded corners, no overlays, no shadows, no borderlines, + and no finishes. The only exception are underlays. + One cannot do very fancy things with this skin, but it compiles very fast. + Therefore, the |spartan| skin is + used for the draft mode, see \Vref{subsec:draftmode}. + Nevertheless, it can be used as a normal skin. + +\begin{tcolorbox}[skintable=spartan] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |spartan|\\ + \refKey{/tcb/interior titled engine}: \> |spartan|\\ + \refKey{/tcb/interior engine}: \> |spartan|\\ + \refKey{/tcb/segmentation engine}: \> |spartan|\\ + \refKey{/tcb/title engine}: \> |spartan| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + + +\begin{docTcbKey}{spartan}{}{style, no value} + This is an abbreviation for setting |skin=spartan|. +\end{docTcbKey} + + +\begin{dispExample} +\begin{tcbraster}[spartan,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\clearpage + +\subsection{Skin 'draft'}\label{subsec:draft} + +\begin{docSkin}{draft} + This skin is intended to be used while drafting new geometric settings + for a |tcolorbox|. +\begin{tcolorbox}[skintable=draft] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> \emph{special}\\ + \refKey{/tcb/interior titled engine}: \> \emph{special}\\ + \refKey{/tcb/interior engine}: \> \emph{special}\\ + \refKey{/tcb/segmentation engine}: \> |path|\\ + \refKey{/tcb/title engine}: \> |path| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{docTcbKey}{draft}{}{style, no value} + This is an abbreviation for setting |skin=draft|. +\end{docTcbKey} + + +\begin{dispExample} +\begin{tcbraster}[draft,raster equal height,raster columns=4, + colback=LightGreen,colframe=DarkGreen,colbacktitle=LimeGreen!75!DarkGreen, + left=1mm,right=1mm,top=1mm,bottom=1mm,middle=1mm] + \begin{tcolorbox} + This is my content. + \end{tcolorbox} + \begin{tcolorbox} + This is my content. + \tcblower + More content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \end{tcolorbox} + \begin{tcolorbox}[adjusted title=My title] + This is my content. + \tcblower + More content. + \end{tcolorbox} +\end{tcbraster} +\end{dispExample} + + +\begin{dispExample} +\vspace*{3mm} +\begin{tcolorbox}[draft,title=A colored box with the 'draft' skin] +\lipsum[1-3] +\tcblower +\lipsum[4-6] +\end{tcolorbox} +\end{dispExample} + + + +\clearpage +\subsection{Skin Family 'freelance'} +\begin{marker} +This skin family 'freelance' is deprecated with |tcolorbox| 3.00. +It is not longer needed, because +\refKey{/tcb/frame code}, +\refKey{/tcb/interior code}, +\refKey{/tcb/interior titled code}, and +\refKey{/tcb/title code} +can be applied to every skin now. In this sense, everything has become +\emph{freelance} now.\par +For users of \refKey{/tcb/freelance}: Old code should continue to work. There may be +exceptions for breakable freelance boxes under certain circumstances. +For new code, use \refKey{/tcb/empty} or \refKey{/tcb/enhanced} where +you would have used \refKey{/tcb/freelance} before. +\end{marker} + +\begin{docSkin}{freelance} + This skin gives full freedom for the appearance of the |tcolorbox|. + All drawing engines are set to type |freelance|; they use the |tikz| package + and compute the \refKey{/tcb/geometry nodes}. + %This skin is useful for boxes which should differ much from the normal + %appearance. Note that this difference has to be programmed by the user. + %The drawing code can be given + %with the following option keys. As default value, the code from the |standard| + %skin is set. +\begin{tcolorbox}[skintable=freelance] + \begin{tabbing} + \refKey{/tcb/interior titled engine}: \=\kill + \refKey{/tcb/graphical environment}: \> |tikzpicture|\\ + \refKey{/tcb/frame engine}: \> |freelance|\\ + \refKey{/tcb/interior titled engine}: \> |freelance|\\ + \refKey{/tcb/interior engine}: \> |freelance|\\ + \refKey{/tcb/segmentation engine}: \> |freelance|\\ + \refKey{/tcb/title engine}: \> |freelance| + \end{tabbing} +\end{tcolorbox} +\end{docSkin} + +\begin{docTcbKey}{freelance}{}{style, no value} + This is an abbreviation for setting |skin=freelance|. +\end{docTcbKey} + +\begin{docSkin}{freelancefirst} + This skin equals \refSkin{freelance} with exception of the break sequence, + see \Vref{subsec:breaksequence}. + %It is used as first part of the + %break sequence of \refSkin{freelance}. \refKey{/tcb/extend freelancefirst} + %can be used to customize this part. +\end{docSkin} + +\begin{docSkin}{freelancemiddle} + This skin equals \refSkin{freelance} with exception of the break sequence, + see \Vref{subsec:breaksequence}. + %It is used as middle part of the + %break sequence of \refSkin{freelance}. \refKey{/tcb/extend freelancemiddle} + %can be used to customize this part. +\end{docSkin} + +\begin{docSkin}{freelancelast} + This skin equals \refSkin{freelance} with exception of the break sequence, + see \Vref{subsec:breaksequence}. + %It is used as last part of the + %break sequence of \refSkin{freelance}. \refKey{/tcb/extend freelancelast} + %can be used to customize this part. +\end{docSkin} + + +\begin{docTcbKey}{extend freelance}{=\meta{options}}{no default, initially empty} +The \meta{options} are added to the skin definition of \refSkin{freelance}. +\end{docTcbKey} + +\begin{docTcbKey}{extend freelancefirst}{=\meta{options}}{no default, initially empty} +The \meta{options} are added to the skin definition of \refSkin{freelancefirst} which +is used as first part of the break sequence of \refSkin{freelance}. +See \refKey{/tcb/skin first is subskin of} for a substitute of this key. +\end{docTcbKey} + +\begin{docTcbKey}{extend freelancemiddle}{=\meta{options}}{no default, initially empty} +The \meta{options} are added to the skin definition of \refSkin{freelancemiddle} which +is used as middle part of the break sequence of \refSkin{freelance}. +See \refKey{/tcb/skin middle is subskin of} for a substitute of this key. +\end{docTcbKey} + +\begin{docTcbKey}{extend freelancelast}{=\meta{options}}{no default, initially empty} +The \meta{options} are added to the skin definition of \refSkin{freelancelast} which +is used as last part of the break sequence of \refSkin{freelance}. +See \refKey{/tcb/skin last is subskin of} for a substitute of this key. +\end{docTcbKey} + + + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.technical.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.technical.tex new file mode 100644 index 0000000..566a4f5 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.technical.tex @@ -0,0 +1,735 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Technical Overview and Customization}\label{sec:technical}% +\tcbset{external/prefix=external/technical_}% +This section provides a technical overview of the skin concept of |tcolorbox|. +For most applications of |tcolorbox|, one will not need to know the bells and +whistles described herein. +You may proceed to \Vref{sec:skins} where the customization options +for most users are documented. + +The following explanations also cover options and settings from the \mylib{skins} library, +see \Vref{sec:skins}. + +\subsection{Skins and Drawing Engines}\label{sec:skincorekeys} +From a technical point of view, a \emph{skin} is a style definition for the +appearance of a |tcolorbox|. The core package provides some additional +option keys for skins but only two skins called \refSkin{standard} +and \refSkin{standard jigsaw}. +The \mylib{skins} library adds several more skins. To change to a skin, only one +option from the core package has to be set. + +\begin{docTcbKey}{skin}{=\meta{name}}{style, no default, initially \texttt{standard}} + Sets the current skin to \meta{name}. This is a style definition which sets all the following + keys, i.\,e.\ for many use cases there is nothing more to do. +\begin{dispExample} +\tcbset{colback=Salmon!50!white,colframe=FireBrick!75!black, + width=(\linewidth-8mm)/2,before=,after=\hfill,equal height group=ske} + +\begin{tcolorbox}[adjusted title=My title] + This is my content. +\end{tcolorbox} +\begin{tcolorbox}[skin=beamer,beamer,adjusted title=My title] + This is my content. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{skin first}{=\meta{name}}{style, no default, initially \texttt{standard}} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the skin for the \emph{first} part of the break sequence + is set to \meta{name}, see Subsection \ref{subsec:breaksequence} on page \pageref{subsec:breaksequence}. + Typically, this key is set by a \refKey{/tcb/skin}. +\end{docTcbKey} + + +\begin{docTcbKey}{skin middle}{=\meta{name}}{style, no default, initially \texttt{standard}} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the skin for the \emph{middle} parts (if any) of the break sequence + is set to \meta{name}, see Subsection \ref{subsec:breaksequence} on page \pageref{subsec:breaksequence}. + Typically, this key is set by a \refKey{/tcb/skin}. +\end{docTcbKey} + + +\begin{docTcbKey}{skin last}{=\meta{name}}{style, no default, initially \texttt{standard}} + If the box is set to be \refKey{/tcb/breakable} and \emph{is} broken actually, + then the skin for the \emph{last} part of the break sequence + is set to \meta{name}, see Subsection \ref{subsec:breaksequence} on page \pageref{subsec:breaksequence}. + Typically, this key is set by a \refKey{/tcb/skin}. +\end{docTcbKey} + + +\clearpage + +\begin{docTcbKey}{graphical environment}{=\meta{name}}{no default, initially \texttt{pgfpicture}} + Sets the graphical environment for the |tcolorbox| to \meta{name}. + Feasible values are |pgfpicture| and |tikzpicture| or environments which + inherit from one of these two. This key is set by a \refKey{/tcb/skin} and + may seldom be used directly. +\end{docTcbKey} + +The skin of a |tcolorbox| is drawn by up to four \emph{engines}. +Afterwards, the text content is drawn which is not part of a skin. +The four steps are: +\begin{enumerate} +\item The \emph{frame} of the box, drawn by \refKey{/tcb/frame engine}. +\item The \emph{interior} of the box. The interior of a box with title is + drawn differently from a box without title. + \refKey{/tcb/interior titled engine} or \refKey{/tcb/interior engine} + is used to draw the interior. +\item The \emph{segmentation} (line) of the box, if there is a lower part; + drawn by \refKey{/tcb/segmentation engine}. +\item The \emph{title area} of the box, if there is a title and + \refKey{/tcb/title filled} is set to |true|; drawn + by \refKey{/tcb/title engine}. +\end{enumerate} + +%Every engine for the up to four steps can be set to one of the following types: +%\begin{enumerate} +%\item\docValue{standard}: the original code from the core package. +%\item\docValue{path}: a |tikz| path which can be controlled by options. +%\item\docValue{pathfirst}: a |tikz| path which can be controlled by options. +%\item\docValue{pathmiddle}: a |tikz| path which can be controlled by options. +%\item\docValue{pathlast}: a |tikz| path which can be controlled by options. +%\item\docValue{freelance}: arbitrary user code. +%\item\docValue{spartan}: a quite spartan code. +%\end{enumerate} +%\clearpage + +\begin{docTcbKey}{frame engine}{=\meta{name}}{no default, initially \texttt{standard}} + Sets the \emph{frame} drawing engine for a box to \meta{name}. + Typically, this key is set by a \refKey{/tcb/skin}. + Feasible values for \meta{name} are: + \begin{itemize} + \item\docValue{standard}: the original code from the core package, + \item\docValue{path}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{pathjigsaw}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{pathfirst}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{pathfirstjigsaw}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{pathmiddle}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{pathmiddlejigsaw}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{pathlast}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{pathlastjigsaw}: a |tikz| path which is controlled by \refKey{/tcb/frame style}, + \item\docValue{freelance}: deprecated. + \item\docValue{spartan}: a quite spartan code. + \item\docValue{empty}: draw nothing. +\end{itemize} +\end{docTcbKey} + +\begin{docTcbKey}{interior titled engine}{=\meta{name}}{no default, initially \texttt{standard}} + Sets the \emph{interior} drawing engine for a titled box to \meta{name}. + Typically, this key is set by a \refKey{/tcb/skin}. + Feasible values for \meta{name} are: + \begin{itemize} + \item\docValue{standard}: the original code from the core package, + \item\docValue{path}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{pathfirst}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{pathmiddle}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{pathlast}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{freelance}: deprecated. + \item\docValue{spartan}: a quite spartan code. + \item\docValue{empty}: draw nothing. + \end{itemize} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{interior engine}{=\meta{name}}{no default, initially \texttt{standard}} + Sets the \emph{interior} drawing engine for an untitled box to \meta{name}. + Typically, this key is set by a \refKey{/tcb/skin}. + Feasible values for \meta{name} are: + \begin{itemize} + \item\docValue{standard}: the original code from the core package, + \item\docValue{path}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{pathfirst}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{pathmiddle}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{pathlast}: a |tikz| path which is controlled by \refKey{/tcb/interior style}, + \item\docValue{freelance}: deprecated. + \item\docValue{spartan}: a quite spartan code. + \item\docValue{empty}: draw nothing. + \end{itemize} +\end{docTcbKey} + +\begin{docTcbKey}{segmentation engine}{=\meta{name}}{no default, initially \texttt{standard}} + Sets the \emph{segmentation} (line) drawing engine for a box to \meta{name}. + Typically, this key is set by a \refKey{/tcb/skin}. + Feasible values for \meta{name} are: + \begin{itemize} + \item\docValue{standard}: the original code from the core package, + \item\docValue{path}: a |tikz| path which is controlled by \refKey{/tcb/segmentation style}, + \item\docValue{freelance}: deprecated. + \item\docValue{spartan}: a quite spartan code. + \item\docValue{empty}: draw nothing. + \end{itemize} +\end{docTcbKey} + +\begin{docTcbKey}{title engine}{=\meta{name}}{no default, initially \texttt{standard}} + Sets the \emph{title area} drawing engine for a titled box to \meta{name}. + Typically, this key is set by a \refKey{/tcb/skin}. + Feasible values for \meta{name} are: + \begin{itemize} + \item\docValue{standard}: the original code from the core package, + \item\docValue{path}: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item\docValue{pathfirst}: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item\docValue{pathmiddle}: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item\docValue{pathlast}: a |tikz| path which is controlled by \refKey{/tcb/title style}, + \item\docValue{freelance}: deprecated. + \item\docValue{spartan}: a quite spartan code. + \item\docValue{empty}: draw nothing. + \end{itemize} +\end{docTcbKey} + +\begin{marker} +After an engine is set to an initializing value, the resulting graphical +code can be changed using code option keys, see \Vref{subsec:addcodeoptions}. +\end{marker} + +\clearpage +\begin{docTcbKey}{geometry nodes}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + If set to |true|, up to four |tikz| nodes are defined for a |tcolorbox| + which are named |frame|, |interior|, |segmentation|, and |title|. These nodes + describe the boundaries of the equally named parts of a |tcolorbox|. + They are used by most engines based on \tikzname. + Typically, this key is set automatically by a \refKey{/tcb/skin}. +\begin{dispExample} +\tcbset{colback=Salmon!50!white,colframe=FireBrick!75!black, + width=(\linewidth-8mm)/2,before=,after=\hfill,equal height group=geon} + +\begin{tcolorbox}[adjusted title=The title] + The upper part.\tcblower The lower part. +\end{tcolorbox} +\begin{tcolorbox}[enhanced,adjusted title=The title, + frame code={\path[draw=red,fill=red!25] + (frame.south west) rectangle (frame.north east);}, + interior titled code={\path[draw=blue,fill=blue!25] + (interior.south west) rectangle (interior.north east);}, + segmentation code={\path[draw=green,fill=green!25] + (segmentation.south west) rectangle (segmentation.north east);}, + title code={\path[draw=black,fill=brown!75!black] + (title.south west) rectangle (title.north east);}] + The upper part.\tcblower The lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + + + + + +\clearpage +\subsection{Code Option Keys}\label{subsec:addcodeoptions} +The following code options are applicable for all skins. +%which +%use engines of type |freelance|. +%Especially, the skin \refSkin{freelance} supports \emph{all} of them, +%\refSkin{standard} and \refSkin{enhanced} \emph{none} of them. +The used \meta{graphical code} can be any |pgf| code. For all skins +with exception of \refSkin{standard} +and \refSkin{standard jigsaw}, the \meta{graphical code} can also +be any \tikzname\ code. + + +\begin{docTcbKey}{frame code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used for drawing the \emph{frame} of the box. + %This option is available only if the \refKey{/tcb/frame engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[enhanced,frame code={ + \foreach \n in {north east,north west,south east,south west} + {\path [fill=red!75!black] (interior.\n) circle (3mm); }; }] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{frame empty}{}{style, no value} + This is a shortcut for setting \refKey{/tcb/frame code} to empty. + This option removes the drawing of the frame. + Alternatively, use \refKey{/tcb/frame hidden}. +\end{docTcbKey} + + +\begin{docTcbKey}{interior titled code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used + for drawing the \emph{interior} of the box, if the box comes with a title. + %This option is available only if the \refKey{/tcb/interior titled engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,interior titled code={ + \path[draw=red!5!white,line width=5mm,line cap=round] + ([xshift=3mm,yshift=-3mm]interior.north west) + --([xshift=-3mm,yshift=3mm]interior.south east) + ([xshift=3mm,yshift=3mm]interior.south west) + --([xshift=-3mm,yshift=-3mm]interior.north east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{interior titled empty}{}{style, no value} + This is a shortcut for setting \refKey{/tcb/interior titled code} to empty. + This option removes the drawing of the untitled interior. + Alternatively, use \refKey{/tcb/interior hidden}. +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{interior code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used + for drawing the \emph{interior} of the box, if the box is without a title.%\\ + %This option is available only if the \refKey{/tcb/interior engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black} + +\begin{tcolorbox}[enhanced,interior code={ + \path[draw=red!5!white,line width=5mm,line cap=round] + ([xshift=3mm,yshift=-3mm]interior.north west) + --([xshift=-3mm,yshift=3mm]interior.south east) + ([xshift=3mm,yshift=3mm]interior.south west) + --([xshift=-3mm,yshift=-3mm]interior.north east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{interior empty}{}{style, no value} + This is a shortcut for setting \refKey{/tcb/interior code} to empty. + This option removes the drawing of the interior. + Alternatively, use \refKey{/tcb/interior hidden}. +\end{docTcbKey} + + +\begin{docTcbKey}{segmentation code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used for drawing the + \emph{segmentation} area of the box.%\\ + %This option is available only if the \refKey{/tcb/segmentation engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries} + +\begin{tcolorbox}[enhanced,title=My title,segmentation code={ + \path[top color=red!5!white,bottom color=red!5!white,middle color=blue] + (segmentation.south west) rectangle (segmentation.north east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{segmentation empty}{}{style, no value} + This is a shortcut for setting \refKey{/tcb/segmentation code} to empty. + This option removes the drawing of the segmentation line. + Alternatively, use \refKey{/tcb/segmentation hidden}. +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{title code}{\colOpt{=\meta{graphical code}}}{code, default from |standard|} + The given \meta{graphical code} is used for drawing the + \emph{title} area of the box. + %\\ + %This option is available only if the \refKey{/tcb/title engine} is set to |freelance|. +\begin{dispExample} +\tcbset{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries, + coltitle=black} + +\begin{tcolorbox}[enhanced,title=My title,title code={ + \path[draw=yellow,solid,decorate,line width=2mm, + decoration={coil,aspect=0,segment length=10.1mm}] + ([xshift=1mm]title.west) -- ([xshift=-1mm]title.east);}] +This is a \textbf{tcolorbox}. +\tcblower +This is the lower part. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{title empty}{}{style, no value} + This is a shortcut for setting \refKey{/tcb/title code} to empty. + This option removes the drawing of the title area. + Alternatively, use \refKey{/tcb/title hidden}. +\end{docTcbKey} + +\clearpage +\subsection{Subskins}\label{subsec:subskins} +A subskin is a new \refKey{/tcb/skin} based on an existing skin which +is extended or changed. + +\begin{marker} +Never use geometry settings or bounding box options inside a subskin definition! +If one skin is replaced by another skin, the overall bounding box should stay +constant. Especially, if a skin is used for a breakable box, unpredictable +and unpleasant results could arise otherwise. If you want to change the +geometry also, use an additional style. See the skin \refSkin{beamer} and +the style \refKey{/tcb/beamer} as pattern. +\end{marker} + +\begin{docCommand}{tcbsubskin}{\marg{name}\marg{base skin}\marg{options}} + Creates a new skin \meta{name} which inherits all properties of an + existing \meta{base skin} plus the given \meta{options}. + The new skin \meta{name} can be used as value for the keys + \refKey{/tcb/skin}, + \refKey{/tcb/skin first}, + \refKey{/tcb/skin middle}, and + \refKey{/tcb/skin last}. + As \meta{base skin}, one can take \refSkin{standard}, \refSkin{empty}, + \refSkin{enhanced}, or any skin from the \mylib{skins} library, + see \Vref{sec:skins}. + +\begin{dispExample} +% \tcbuselibrary{skins} +\tcbsubskin{mycross}{empty}{frame code={% + \draw[red,line width=5pt] (frame.south west)--(frame.north east); + \draw[red,line width=5pt] (frame.north west)--(frame.south east);}, + skin first=mycross,skin middle=mycross,skin last=mycross } + +\begin{tcolorbox}[skin=mycross] + This is my content. +\end{tcolorbox} +\end{dispExample} + +\end{docCommand} + + +\begin{docTcbKey}{skin first is subskin of}{=\marg{base skin}\marg{options}}{no default, initially unset} + Creates a new unnamed skin which inherits all properties of an + existing \meta{base skin} plus the given \meta{options}. + This skin is set as \refKey{/tcb/skin first}.\\ + See a detailed example on page~\pageref{freeboxexample}. +\end{docTcbKey} + + +\begin{docTcbKey}{skin middle is subskin of}{=\marg{base skin}\marg{options}}{no default, initially unset} + Creates a new unnamed skin which inherits all properties of an + existing \meta{base skin} plus the given \meta{options}. + This skin is set as \refKey{/tcb/skin middle}.\\ + See a detailed example on page~\pageref{freeboxexample}. +\end{docTcbKey} + + +\begin{docTcbKey}{skin last is subskin of}{=\marg{base skin}\marg{options}}{no default, initially unset} + Creates a new unnamed skin which inherits all properties of an + existing \meta{base skin} plus the given \meta{options}. + This skin is set as \refKey{/tcb/skin last}.\\ + See a detailed example on page~\pageref{freeboxexample}. +\end{docTcbKey} + + +\clearpage +\subsection{Drawing Scheme}\label{subsec:tcolorboxdrawing} + +\bgroup + +Depending on the complexity of a |tcolorbox| definition, the resulting box +is drawn in a more or less complex series of steps. + +To document and demonstrate these drawing steps, we consider the +following box definition: + +\begin{dispListing} +\newtcolorbox{testbox}[1][]{enhanced,title=Test Box, + boxrule=1mm,titlerule=0.5mm,colframe=blue!50!black, + interior style={top color=blue!20!green!50!white,bottom color=blue!20!yellow!50!white}, + colbacktitle=blue!50!green!90!white,segmentation style={solid}, + fonttitle=\bfseries,drop fuzzy shadow,borderline={0.3mm}{0.35mm}{yellow!50!white}, + underlay={\path[fill image opacity=0.15,fill image scale=0.9, + fill stretch picture={\draw[blue,line width=2mm] circle (1);}] + (interior.south west) rectangle (interior.north east);}, + watermark text={Watermark},watermark color={green!20!white}, + finish={\begin{tcbclipframe} + \path[bottom color=black,top color=black!50!white,opacity=0.1] + (frame.south west) -- (frame.south east) -- (frame.north east) -- cycle; + \path[top color=white,bottom color=black!50!white,opacity=0.1] + (frame.south west) -- (frame.north east) -- (frame.north west) -- cycle; + \end{tcbclipframe}},#1} +\end{dispListing} +\tcbusetemp + +For this definition, we get the maximal number of drawing steps: + +\newtcolorbox{itembox}{oversize,enhanced,frame empty,segmentation empty,colback=white,middle=2mm,boxsep=0pt, + fuzzy halo=0.5mm with blue!15!white, + before lower=\raggedright\begin{itemize},after lower=\end{itemize}} + +\tcbset{finishcomment/.style={ + finish={\node[fill=white,draw=black!50!white,rounded corners] at (frame.center) {#1};} +}} + + +\begin{itembox} +\begin{testbox}[frame empty,interior titled empty,title empty,segmentation empty, + no shadow,no borderline,no underlay,no overlay,no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + drop fuzzy shadow=red!75!white, + finishcomment={1.~shadow}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item Section~\ref{subsec:shadows} on page \pageref{subsec:shadows}. +\end{itembox} + +\begin{itembox} +\begin{testbox}[interior titled empty,title empty,segmentation empty, + no borderline,no underlay,no overlay,no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + colframe=red!75!white, + finishcomment={2.~frame}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\refKey{/tcb/colframe}, \refKey{/tcb/opacityframe} +\item\refKey{/tcb/frame code} +\item\refKey{/tcb/frame style} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[title empty,segmentation empty, + no borderline,no underlay,no overlay,no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + colback=red!75!white, + finishcomment={3.~interior}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\refKey{/tcb/colback}, \refKey{/tcb/opacityback} +\item\refKey{/tcb/interior code}, \refKey{/tcb/interior titled code} +\item\refKey{/tcb/interior style} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[segmentation empty, + no borderline,no underlay,no overlay,no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + colbacktitle=red!75!white, + finishcomment={4.~title area}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\refKey{/tcb/colbacktitle}, \refKey{/tcb/opacitybacktitle} +\item\refKey{/tcb/title code} +\item\refKey{/tcb/title style} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[ + no borderline,no underlay,no overlay,no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + segmentation style={solid,red!75!white}, + finishcomment={5.~segmentation}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\refKey{/tcb/lower separated} +\item\refKey{/tcb/segmentation code} +\item\refKey{/tcb/segmentation style} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[ + no borderline,no underlay,no overlay,no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + borderline={0.3mm}{0.35mm}{red!75!white}, + finishcomment={6.~border line}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\Vref{subsec:borderline} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[ + no underlay,no overlay,no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + underlay={\path[opacity=0.15,fill image scale=0.9, + fill stretch picture={\draw[red,line width=2mm] circle (1);}] + (interior.south west) rectangle (interior.north east);}, + finishcomment={7.~underlay}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\Vref{subsec:skinboxedtitle} +\item\Vref{subsec:skinunderlay} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[ + no finish,opacityupper=0,opacitylower=0,opacitytitle=0, + watermark color={red!75!white}, + finishcomment={8.~overlay}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\Vref{subsec:overlays} +\item\Vref{subsec:watermarks} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[ + no finish, + colupper=red!75!white,coltitle=red!75!white,collower=red!75!white, + finishcomment={9.~text content}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\refKey{/tcb/colupper}, \refKey{/tcb/collower}, \refKey{/tcb/coltitle} +\item\refKey{/tcb/fontupper}, \refKey{/tcb/fontlower}, \refKey{/tcb/fonttitle} +\item\refKey{/tcb/opacityupper}, \refKey{/tcb/opacitylower}, \refKey{/tcb/opacitytitle} +\end{itembox} + + +\begin{itembox} +\begin{testbox}[ + finishcomment={10.~finish}] +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\tcblower +\item\Vref{subsec:skinfinish} +\end{itembox} + +All together, the box is drawn: +\begin{dispExample} +% \usepackage{lipsum} +\begin{testbox} +\lipsum[2] +\tcblower +Lower part +\end{testbox} +\end{dispExample} + +\egroup + +\clearpage +\subsection{Useful Properties}\label{subsec:tech_properties} + +The following macros describe certain \textit{properties} which may be +used for the drawing scheme, see \Fullref{subsec:tcolorboxdrawing}. +Sometimes, they are even available inside the box content. All of them are +considered to be \textit{read-only} and should never be redefined by the user. + +\begin{docCommand}[doc new=2016-02-16]{tcbheightspace}{} + If the height of a |tcolorbox| is not the natural height, the space + difference between the forced and the natural size is hold by + \refCom{tcbheightspace}. + This macro is not usable inside the box content, but for skins or + inside \refKey{/tcb/underlay}, \refKey{/tcb/overlay}, etc. + + If such a space information is needed inside the box content, see + \refKey{/tcb/space to} instead. +\begin{dispExample} +% \tcbuselibrary{skins} +\newtcolorbox{testbox}[2][]{enhanced,size=fbox, + colframe=blue!75!black,colback=white,height=#2, + underlay={\node[above,inner sep=3pt] at (interior.south){% + \includegraphics[width=\tcbtextwidth,height=\tcbheightspace-3pt]{goldshade.png}}; + }, + #1} +\begin{testbox}{3cm} + This is my box. The space is filled with a picture. +\end{testbox} +\begin{testbox}{2cm} + This is my box. The space is filled with a picture. +\end{testbox} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2016-02-16]{tcbtextwidth}{} + This property describes the box content width. + \begin{itemize} + \item If there also is a lower part, it describes the width of the upper part. + \item For \refKey{/tcb/sidebyside} boxes, it describes the combined text + width plus segmentation. + \item This property can be used inside the box content text with exception + of \refKey{/tcb/fit} boxes. + \item \refCom{tcbtextwidth} can be used for all box types for skins or + inside \refKey{/tcb/underlay}, \refKey{/tcb/overlay}, etc. + \end{itemize} +\begin{dispExample} +\begin{tcolorbox}[colframe=blue!75!black] + Inside a box: \tcbtextwidth\ (=\the\linewidth). +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + +\pagebreak +\begin{docCommand}[doc new=2016-02-16]{tcbtextheight}{} + This property describes the designated box content height. If the + box is larger than the natural height, the actual content will be smaller + than \refCom{tcbtextheight}. + \begin{itemize} + \item For boxes with a fixed \refKey{/tcb/height}, this property can + be used inside the box content text. For other boxes, it denotes |0pt| + inside the box content. + \item \refCom{tcbtextheight} can be used for all box types for skins or + inside \refKey{/tcb/underlay}, \refKey{/tcb/overlay}, etc. + \end{itemize} + +\begin{dispExample} +% \tcbuselibrary{skins} +\begin{tcolorbox}[enhanced,colframe=blue!75!black, + underlay={\node[left,red] at (frame.east) {Here: \tcbtextheight};}] + Inside a box with natural height: \tcbtextheight. +\end{tcolorbox} +\begin{tcolorbox}[enhanced,colframe=blue!75!black,height=1cm, + underlay={\node[left,red] at (frame.east) {Here: \tcbtextheight};}] + Inside a box with fixed height: \tcbtextheight. +\end{tcolorbox} +\end{dispExample} +\end{docCommand} + + +\begin{docCommand}[doc new=2017-04-25]{tcbsegmentstate}{} + This macro contains |0|, |1|, or |2|. Itis set for every unbroken box and every broken partial box + with the following meaning: + \begin{itemize} + \item\docValue{0}: The current (partial) box contains only an upper part. + \item\docValue{1}: The current (partial) box contains an upper and a lower part. + The segmentation node can be used for positioning. + \item\docValue{2}: The current (partial) box contains only a lower part. + This can only be true for parts of breakable boxes. + \end{itemize} + Skins like \refSkin{bicolor} use this property to paint the (partial) boxes. +\begin{dispExample} +% \tcbuselibrary{skins,raster} +\begin{tcbraster}[raster equal height,enhanced, + watermark text=\tcbsegmentstate] + \begin{tcolorbox}Upper part\end{tcolorbox} + \begin{tcolorbox}Upper part\tcblower Lower part\end{tcolorbox} +\end{tcbraster} +\end{dispExample} +\end{docCommand} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.theorems.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.theorems.tex new file mode 100644 index 0000000..ad0bc34 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.theorems.tex @@ -0,0 +1,1065 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{theorems}}\label{sec:theorems}% +\tcbset{external/prefix=external/theorems_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{theorems} +\end{dispListing} +This also loads the package |amsmath|. + +\subsection{Macros of the Library} + +\begin{docCommand}[doc updated=2016-06-22]{newtcbtheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}} + Creates new environments \meta{name} and \meta{name}|*| based on |tcolorbox| to frame a + (mathematical) theorem. The \meta{display name} is used in the title line + with a number, e.\,g. \mbox{\flqq Theorem 5.1\frqq}. + The \meta{options} are given to the underlying |tcolorbox| to control + the appearance. + %The \meta{counter} is used for automatic numbering. + The \meta{init options} allow setting up automatic numbering, + see \Vref{sec:initkeys}.\par + The new environment \meta{name} takes one optional and two mandatory + parameters. The optional parameter supplements the options and should be + used only in rare cases. + The first mandatory parameter is the title text for the theorem and + is also set as \refKey{/tcb/nameref} identifier. + The second mandatory parameter is a \meta{marker}. The theorem is + automatically labeled with \meta{prefix}\meta{separator}\meta{marker} + where \meta{separator} is predefined as '|:|', see \refKey{/tcb/label separator}.\par + The new environment \meta{name}|*| takes one optional and one mandatory + parameter and represents an unnumbered variant of the environment \meta{name}. + This variant is not labeled and not listed in lists of theorems. +\enlargethispage*{20mm} +\inputpreamblelisting{F} +\begin{dispExample} +% usage of '\nameref' needs 'nameref' or 'hyperref' to be loaded +\begin{mytheo}{This is my title}{theoexample} + This is the text of the theorem. The counter is automatically assigned and, + in this example, prefixed with the section number. This theorem is numbered with + \ref{th:theoexample}, it is given on page~\pageref{th:theoexample}, + and it is titled \flqq\nameref{th:theoexample}\frqq. +\end{mytheo} +\end{dispExample} + +\begin{dispExample} +\begin{mytheo}[label=myownlabel]{This is my title}{} + The label parameter can be left empty without \LaTeX\ error. + Or you may use an own label to reference Theorem \ref{myownlabel}. +\end{mytheo} +\end{dispExample} + +\begin{dispExample} +\begin{mytheo}{}{} + The title can also be left empty without problem. Note that the ':' + vanished magically. +\end{mytheo} +\end{dispExample} + +\begin{dispExample} +\begin{mytheo*}{Unnumbered Theorem} + This theorem is not numbered. +\end{mytheo*} +\end{dispExample} + +\begin{dispExample} +\begin{mytheo*}{} + This theorem has no number and no title. +\end{mytheo*} +\end{dispExample} + +\begin{marker} +To switch off the \texttt{nameref} feature permanently, add +\mbox{\texttt{nameref/.style=\{\}}} inside the \meta{options} list. +\end{marker} + +\end{docCommand} + + +\begin{docCommand}{renewtcbtheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}} + Operates like \refCom{newtcbtheorem}, but based on |\renewenvironment| instead of |\newenvironment|. + An existing environment is redefined. +\end{docCommand} + + +\begin{docCommand}{tcbmaketheorem}{\marg{name}\marg{display name}\marg{options}\marg{counter}\marg{prefix}} +\smallskip\begin{marker} +\refCom{newtcbtheorem} supersedes this macro. +\end{marker} +\begin{deprecated} + Creates a new environment \meta{name} based on |tcolorbox| to frame a + (mathematical) theorem. The \meta{display name} is used in the title line + with a number, e.\,g. \mbox{\flqq Theorem 5.1\frqq}. + The \meta{options} are given to the underlying |tcolorbox| to control + the appearance. + The \meta{counter} is used for automatic numbering. + The new environment \meta{name} takes one optional and two mandatory + parameters. The optional parameter supplements the options and should be + used only in rare cases. + The first mandatory parameter is the title text for the theorem and + the second mandatory parameter is a \meta{marker}. The theorem is + automatically labeled with \meta{prefix}\meta{separator}\meta{marker} + where \meta{separator} is predefined as '|:|', see \refKey{/tcb/label separator}. +\end{deprecated} +\end{docCommand} + +\clearpage +\begin{docCommand}{tcboxmath}{\oarg{options}\marg{mathematical box content}} + Creates a \refEnv{tcolorbox} which is fitted to the width of the given + \meta{mathematical box content}. This box is intended to be applied as + part of a larger formula and may be used as replacement for the |\boxed| + macro of |amsmath|. + +\begin{dispExample} +\begin{equation} +\tcbset{fonttitle=\scriptsize} +\tcboxmath[colback=LightBlue!25!white,colframe=blue]{ a^2 = 16 } +\quad \Rightarrow \quad +\tcboxmath[colback=Salmon!25!white,colframe=red,title=Implication]% + { a = 4 ~\vee~ a=-4. } +\end{equation} +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{tcbhighmath}{\oarg{options}\marg{mathematical box content}} + This is a special case of the \refCom{tcboxmath} macro which uses + the style \refKey{/tcb/highlight math}. + It is intended to provide context sensitive highlighting of formula parts. + The color settings via \refKey{/tcb/highlight math style} may be different + inside theorems or other colored areas and outside. + +\begin{dispExample} +\tcbset{myformula/.style={colback=yellow!10!white,colframe=red!50!black, + every box/.style={highlight math style={colback=LightBlue!50!white,colframe=Navy}} + }} + +\begin{align} + \tcbhighmath{\sum\limits_{n=1}^{\infty} \frac{1}{n}} &= \infty.\\ + \int x^2 ~\text{d}x &= \frac13 x^3 + c. +\end{align} + +\begin{tcolorbox}[ams align,myformula] + \tcbhighmath{\sum\limits_{n=1}^{\infty} \frac{1}{n}} &= \infty.\\ + \int x^2 ~\text{d}x &= \frac13 x^3 + c. +\end{tcolorbox} +\end{dispExample} + +\clearpage +\refCom{tcbhighmath} can be used in symbiosis with the |empheq| package +which allows to specify own boxing commands to mark multiline formulas. + +\begin{dispExample} +% \usepackage{empheq} +\begin{empheq}[box=\tcbhighmath]{align} +a&=\sin(z)\\ +E&=mc^2 + \int_a^b x\, dx +\end{empheq} + +\tcbset{highlight math style={enhanced, + colframe=red!60!black,colback=yellow!50!white,arc=4pt,boxrule=1pt, + drop fuzzy shadow}} + +\begin{empheq}[box=\tcbhighmath]{align} +a&=\sin(z)\\ +E&=mc^2 + \int_a^b x\, dx +\end{empheq} +\end{dispExample} + +Besides \refCom{tcbhighmath}, one can easily define an independent new box +based on \refCom{tcbox} which acts like \refCom{tcbhighmath}: + +\begin{dispExample} +% \usepackage{empheq} +\newtcbox{\otherbox}[1][]{nobeforeafter,math upper,tcbox raise base, + enhanced,frame hidden,boxrule=0pt,interior style={top color=green!10!white, + bottom color=green!10!white,middle color=green!50!yellow}, + fuzzy halo=1pt with green,#1} + +\begin{empheq}[box=\otherbox]{align} +a&=\sin(z)\\ +E&=mc^2 + \int_a^b x\, dx +\end{empheq} + +\begin{equation} +\tcbhighmath{E} = \otherbox{mc^2} +\end{equation} +\end{dispExample} +\end{docCommand} + + +\clearpage +\subsection{Option Keys of the Library} + + +\begin{docTcbKey}{separator sign}{=\meta{sign}}{no default, initially |:|} + The given \meta{sign} is used inside the title text of a theorem + as separater between display name combined with number and + the specific title text. It is omitted, if there is no specific title text. + +\begin{dispExample} +% \usepackage{amssymb} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + separator sign={\ $\blacktriangleright$}}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{separator sign colon}{}{style, no value, initially set} +Sets \refKey{/tcb/separator sign} to the default colon |:| sign. +\end{docTcbKey} + +\begin{docTcbKey}{separator sign dash}{}{style, no value} +Sets \refKey{/tcb/separator sign} to an en-dash sign. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + separator sign dash}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{separator sign none}{}{style, no value} +Sets \refKey{/tcb/separator sign} to empty. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + separator sign none}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{description delimiters}{=\marg{left}\marg{right}}{no default, initially empty} + The given \meta{left} and \meta{right} delimiter signs are used to frame + the descriptive title text of a theorem. + +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + description delimiters={\flqq}{\frqq}}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{description delimiters parenthesis}{}{style, no value} +Sets \refKey{/tcb/description delimiters} to |(| and |)|. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + description delimiters parenthesis}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{description delimiters none}{}{style, no value, initially set} +Sets \refKey{/tcb/description delimiters} to the default empty texts. +\end{docTcbKey} + + +\begin{docTcbKey}{description color}{\colOpt{=\meta{color}}}{default empty, initially empty} + Sets the \meta{color} of the descriptive title text deviating from \refKey{/tcb/coltitle}. + The color is reset to \refKey{/tcb/coltitle}, if |description color| is used without value. + +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + description color=red!25!yellow}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{description font}{\colOpt{=\meta{text}}}{default empty, initially empty} + Sets \meta{text} (e.\,g.\ font settings) before the descriptive title text deviating from \refKey{/tcb/fonttitle}. + The \meta{text} is removed, if |description font| is used without value. + +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + description delimiters={\glqq}{\grqq}, + description font=\mdseries\itshape}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{description formatter}{\colOpt{=\meta{macro}}}{default empty, initially empty} + Sets \meta{macro} as formatter for the descriptive title text. The \meta{macro} + has to take one mandatory argument (the description text).\\ + Note that \refKey{/tcb/description delimiters}, \refKey{/tcb/description color}, + and \refKey{/tcb/description font} are ignored, if this option is used.\\ + If |description formatter| is used without value, the formatter is reset + to its standard behavior. + +\begin{dispExample} +\newtcbox{\formbox}{enhanced,frame empty,size=minimal,boxsep=2pt,arc=1pt, + on line,interior style image=goldshade.png} + +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + description formatter=\formbox}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{terminator sign}{=\meta{sign}}{no default, initially empty} + The given \meta{sign} is used as terminator at the end of the title text of a theorem. + +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + terminator sign={.}}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{terminator sign colon}{}{style, no value, initially set} +Sets \refKey{/tcb/terminator sign} to the colon |:| sign. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + separator sign dash,terminator sign colon}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{terminator sign dash}{}{style, no value} +Sets \refKey{/tcb/terminator sign} to an en-dash sign. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + terminator sign dash}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{terminator sign none}{}{style, no value} +Sets \refKey{/tcb/terminator sign} to the default empty text. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2016-04-19]{label separator}{=\meta{separator}}{no default, initially |:|} + The given \meta{separator} is used for labels created with environments which + are defined themselves by \refCom{newtcbtheorem}. This \meta{separator} is + put between \meta{prefix} (defined by \refCom{newtcbtheorem}) + and \meta{marker} (defined by an actual theorem environment). +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + label separator=*}{theo} +\begin{sometheorem}{My example}{myex} +My theorem text. +\end{sometheorem} +See Example~\ref{theo*myex}. +\end{dispExample} +\end{docTcbKey} + + +\clearpage + +\begin{docTcbKey}[][doc new=2018-01-12]{theorem full label supplement}{=\marg{style}}{no default, initially empty} + The given \meta{style} is used in connection with labels created with environments which + are defined themselves by \refCom{newtcbtheorem}. + This \meta{style} uses one argument which is automatically set to the + full label marker of the environment, i.e. a text consisting of + \meta{prefix} (defined by \refCom{newtcbtheorem}), + \refKey{/tcb/label separator}, + and \meta{marker} (defined by an actual theorem environment). + +\begin{dispExample} +% The following adds a hyper target to all environments +% created with \newtcbtheorem +\tcbset{theorem full label supplement={hypertarget={#1}}} + +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries}{theo} +\begin{sometheorem}{My example}{myex2} +My theorem text. +\end{sometheorem} +This automated \hyperlink{theo:myex2}{hyper target can be linked to with a + hyper link}. +\end{dispExample} + +A second usage of \refKey{/tcb/theorem full label supplement} overwrites +the first setting. +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2018-01-12]{theorem label supplement}{=\marg{style}}{no default, initially empty} + The given \meta{style} is used in connection with labels created with environments which + are defined themselves by \refCom{newtcbtheorem}. + This \meta{style} uses one argument which is automatically set to the + label \meta{marker} defined by an actual theorem environment.\par + A second usage of \refKey{/tcb/theorem label supplement} overwrites + the first setting, but + \refKey{/tcb/theorem full label supplement} + and \refKey{/tcb/theorem label supplement} can be used independently. + +\begin{dispExample} +% 'marginnote' has to be loaded +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + theorem label supplement={hypertarget={XYZ-##1}}, + theorem full label supplement={code={\marginnote{##1}}} + }{theo} +\begin{sometheorem}{My example}{myex3} +My theorem text. +\end{sometheorem} +This automated \hyperlink{XYZ-myex3}{hyper target can be linked to with a + hyper link}. +\end{dispExample} +\end{docTcbKey} + + + +\clearpage +\begin{docTcbKey}{theorem name and number}{}{style, no value, initially set} +Prints theorem name followed by theorem number inside the title. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + theorem name and number}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{theorem number and name}{}{style, no value} +Prints theorem number followed by theorem name inside the title. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + theorem number and name}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{theorem name}{}{style, no value} +Prints theorem name without number inside the title. +\begin{dispExample} +\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}% + {colback=white,colframe=red!50!black,fonttitle=\bfseries, + theorem name,enhanced,watermark text={\thetcbcounter}}{theo} +\begin{sometheorem}{My example}{} +My theorem text. +\end{sometheorem} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{theorem}{=\marg{display name}\marg{counter}\marg{title}\marg{marker}}{no default} + This key is internally used by \refCom{tcbmaketheorem}, but can be used + directly in a |tcolorbox| for a more flexible approach. + The \meta{display name} is used together with the increased \meta{counter} value + and the \meta{title} for the title line of the box. Additionally, a + |\label| with the given \meta{marker} is created. +\begin{dispExample} +% \newcounter{texercise}% preamble +\begin{tcolorbox}[colback=green!10,colframe=green!50!black,arc=4mm, + theorem={Test}{texercise}{Direct usage}{myMarker}] +Here, we see the test \ref{myMarker}. +\end{tcolorbox} +\end{dispExample} +For a common appearance inside the document, the key |theorem| should not be +used directly as in the example above, but as part of a new environment +created by hand or using \refCom{tcbmaketheorem} or using its successor +\refCom{newtcbtheorem}. +\end{docTcbKey} + + +\begin{docTcbKey}{highlight math}{}{style, no value} + Predefined style which is used for \refCom{tcbhighmath}. + It can be changed comfortable with \refKey{/tcb/highlight math style}. +\end{docTcbKey} + + +\begin{docTcbKey}{highlight math style}{=\meta{style definition}}{style, no default} + Changes the definition for \refKey{/tcb/highlight math} to the given + \meta{style definition}. See \refCom{tcbhighmath} for another example. +\begin{dispExample} +% \tcbuselibrary{skins} +\tcbset{highlight math style={enhanced,%<-- needed for the 'remember' options + colframe=red,colback=red!10!white,boxsep=0pt}} +\begin{align*} +\tcbhighmath[remember as=fx]{f(x)} + &= \int\limits_{1}^{x} \frac{1}{t^2}~dt + = \left[ -\frac{1}{t} \right]_{1}^{x}\\ + &= -\frac{1}{x} + \frac{1}{1}\\ + &= +\tcbhighmath[remember,overlay={% + \draw[blue,very thick,->] (fx.south) to[bend right] ([yshift=2mm]frame.west);}] + {1-\frac{1}{x}.} +\end{align*} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{math upper}{}{style, no value} + Sets the upper part to mathematical mode with font |\displaystyle|. +\end{docTcbKey} + +\begin{docTcbKey}{math lower}{}{style, no value} + Sets the lower part to mathematical mode with font |\displaystyle|. +\end{docTcbKey} + +\begin{docTcbKey}{math}{}{style, no value} + Sets the upper part \emph{and} lower part to mathematical mode with font |\displaystyle|. +\begin{dispExample} +\begin{tcolorbox}[math,colback=yellow!10!white,colframe=red!50!black] + \sum\limits_{n=1}^{\infty} \frac{1}{n} = \infty. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\begin{marker} + The following styles are only tested to work with the original |amsmath| environments. + If e.g. the |equation| environment is redefined as |gather|, then + \refKey{/tcb/ams equation} should / could not be used. Obviously, you are encouraged + to use \refKey{/tcb/ams gather} in this case. +\end{marker} + +\begin{docTcbKey}[][doc updated=2014-10-30]{ams equation upper}{}{style, no value} + Adds an |amsmath| |equation| environment to the start and end + of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2014-10-30]{ams equation lower}{}{style, no value} + Adds an |amsmath| |equation| environment to the start and end + of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2014-10-30]{ams equation}{}{style, no value} + Adds an |amsmath| |equation| environment to the start and end + of the upper \emph{and} lower part. +\begin{dispExample} +\begin{tcolorbox}[ams equation,colback=yellow!10!white,colframe=red!50!black] + \sum\limits_{n=1}^{\infty} \frac{1}{n} = \infty. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2014-10-30]{ams equation* upper}{}{style, no value} + Adds an |amsmath| |equation*| environment to the start and end + of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}[][doc updated=2014-10-30]{ams equation* lower}{}{style, no value} + Adds an |amsmath| |equation*| environment to the start and end + of the lower part. +\end{docTcbKey} + +\enlargethispage*{1cm} +\begin{docTcbKey}[][doc updated=2014-10-30]{ams equation*}{}{style, no value} + Adds an |amsmath| |equation*| environment to the start and end + of the upper \emph{and} lower part. +\begin{dispExample} +\begin{tcolorbox}[ams equation*,colback=yellow!10!white,colframe=red!50!black] + \sum\limits_{n=1}^{\infty} \frac{1}{n} = \infty. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{ams align upper}{}{style, no value} + Adds an |amsmath| |align| environment to the start and end + of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{ams align lower}{}{style, no value} + Adds an |amsmath| |align| environment to the start and end + of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}{ams align}{}{style, no value} + Adds an |amsmath| |align| environment to the start and end + of the upper \emph{and} lower part. +\begin{dispExample} +\begin{tcolorbox}[ams align,colback=yellow!10!white,colframe=red!50!black] + \sum\limits_{n=1}^{\infty} \frac{1}{n} &= \infty.\\ + \int x^2 ~\text{d}x &= \frac13 x^3 + c. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{ams align* upper}{}{style, no value} + Adds an |amsmath| |align*| environment to the start and end + of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{ams align* lower}{}{style, no value} + Adds an |amsmath| |align*| environment to the start and end + of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}{ams align*}{}{style, no value} + Adds an |amsmath| |align*| environment to the start and end + of the upper \emph{and} lower part. +\begin{dispExample} +\begin{tcolorbox}[ams align*,colback=yellow!10!white,colframe=red!50!black] + \sum\limits_{n=1}^{\infty} \frac{1}{n} &= \infty.\\ + \int x^2 ~\text{d}x &= \frac13 x^3 + c. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{ams gather upper}{}{style, no value} + Adds an |amsmath| |gather| environment to the start and end + of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{ams gather lower}{}{style, no value} + Adds an |amsmath| |gather| environment to the start and end + of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}{ams gather}{}{style, no value} + Adds an |amsmath| |gather| environment to the start and end + of the upper \emph{and} lower part. +\begin{dispExample} +\begin{tcolorbox}[ams gather,colback=yellow!10!white,colframe=red!50!black] + \sum\limits_{n=1}^{\infty} \frac{1}{n} = \infty.\\ + \int x^2 ~\text{d}x = \frac13 x^3 + c. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{ams gather* upper}{}{style, no value} + Adds an |amsmath| |gather*| environment to the start and end + of the upper part. +\end{docTcbKey} + +\begin{docTcbKey}{ams gather* lower}{}{style, no value} + Adds an |amsmath| |gather*| environment to the start and end + of the lower part. +\end{docTcbKey} + +\begin{docTcbKey}{ams gather*}{}{style, no value} + Adds an |amsmath| |gather*| environment to the start and end + of the upper \emph{and} lower part. +\begin{dispExample} +\begin{tcolorbox}[ams gather*,colback=yellow!10!white,colframe=red!50!black] + \sum\limits_{n=1}^{\infty} \frac{1}{n} = \infty.\\ + \int x^2 ~\text{d}x = \frac13 x^3 + c. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}{ams nodisplayskip upper}{}{style, no value} + Neutralizes the |\abovedisplayskip| of a following |align| or |gather| + environment for the upper part. Note that the text content has to + start with such a formula. +\end{docTcbKey} + + +\begin{docTcbKey}{ams nodisplayskip lower}{}{style, no value} + Neutralizes the |\abovedisplayskip| of a following |align| or |gather| + environment for the lower part. Note that the text content has to + start with such a formula. +\end{docTcbKey} + + +\begin{docTcbKey}{ams nodisplayskip}{}{style, no value} + Neutralizes the |\abovedisplayskip| of a following |align| or |gather| + environment for the upper part \emph{and} lower part. + Note that the text content has to start with such a formula. +\begin{dispExample} +\begin{tcolorbox}[ams nodisplayskip,colback=yellow!10!white,colframe=red!50!black] + \begin{gather} + \sum\limits_{n=1}^{\infty} \frac{1}{n} = \infty.\\ + \int x^2 ~\text{d}x = \frac13 x^3 + c. + \end{gather} + And now for something completely different. +\end{tcolorbox} +\end{dispExample} +\end{docTcbKey} + +\bigskip +New colored mathematical environments are easily created using +\refCom{newtcolorbox}: + +\begin{dispExample} +\newtcolorbox{mymath}{ams gather*,colback=yellow!10!white,colframe=red!50!black} + +\begin{mymath} + \sum\limits_{n=1}^{\infty} \frac{1}{n} = \infty.\\ + \int x^2 ~\text{d}x = \frac13 x^3 + c. +\end{mymath} +\end{dispExample} + +\bigskip +\begin{marker} + All described options like \refKey{/tcb/ams gather upper}, \refKey{/tcb/ams gather lower}, + \refKey{/tcb/ams gather} are (partially) setting (overwritting) the + keys \refKey{/tcb/before upper}, \refKey{/tcb/after upper}, + \refKey{/tcb/before lower}, \refKey{/tcb/after lower}.\par + Therefore, e.\,g.\ |\tcbset{ams gather,before upper={\text{Pythagoras:}}}| + produces an invalid result. For this case, you are invited to use\\ + |\tcbset{ams gather,before upper app={\text{Pythagoras:}}}|,\\ + see \refKey{/tcb/before upper app}. +\end{marker} + + +\clearpage +\begin{docTcbKey}{theorem style}{=\meta{name}}{no default, initially |standard|} +Applies a predefined style \meta{name} to the theorem environment. Some of +the feasible \meta{name} values resemble style names from the packages |theorem| +and |ntheorem| to give convenient access to known patterns. +\begin{marker} +The styles alter \refKey{/tcb/separator sign}, \refKey{/tcb/description delimiters}, +\refKey{/tcb/terminator sign}, and more. Therefore, one should apply such +keys \emph{after} a theorem style. +\end{marker} + +For the following examples, we use: +\inputpreamblelisting{J} + +The predefined styles are: +\begin{itemize} +% +\item\docValue{standard}: This is the initial value. +\begin{dispExample} +\begin{theorem}[theorem style=standard]{standard}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{change standard} +\begin{dispExample} +\begin{theorem}[theorem style=change standard]{change standard}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{plain} +\begin{dispExample} +\begin{theorem}[theorem style=plain]{plain}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\clearpage +\item\docValue{break} +\begin{dispExample} +\begin{theorem}[theorem style=break]{break}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{plain apart} +\begin{dispExample} +\begin{theorem}[theorem style=plain apart]{plain apart}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{change} +\begin{dispExample} +\begin{theorem}[theorem style=change]{change}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{change break} +\begin{dispExample} +\begin{theorem}[theorem style=change break]{change break}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{change apart} +\begin{dispExample} +\begin{theorem}[theorem style=change apart]{change apart}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\clearpage +\item\docValue{margin} +\begin{dispExample} +\begin{theorem}[theorem style=margin,left=10mm]{margin}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\begin{theorem}[theorem style=margin,left=10mm,oversize]{margin}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{margin break} +\begin{dispExample} +\begin{theorem}[theorem style=margin break,left=10mm]{margin break}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\begin{theorem}[theorem style=margin break,left=10mm,oversize]{margin break}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\item\docValue{margin apart} +\begin{dispExample} +\begin{theorem}[theorem style=margin apart,left=10mm]{margin apart}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\begin{theorem}[theorem style=margin apart,left=10mm,oversize]{margin apart}{} +This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*} +\end{theorem} +\end{dispExample} +% +\end{itemize} +\end{docTcbKey} + + +% +\clearpage +\subsection{Examples for Definitions and Theorems} +In the following, the application of \refCom{tcbmaketheorem} +to highlight mathematical definitions, theorems, or the like is demonstrated. + +At first, additional |tcb| keys are created for the appearance of +the colored boxes. It is assumed that theorems and corollaries should be +identically colored. +All following environments are numbered with a common counter, but this +can be changed easily. Here, the counter output is supplemented by +the subsection number. +Further, the |cleveref| package \cite{cubitt:2013a} is used for clever +references. + +\inputpreamblelisting{G} + +By \refCom{newtcbtheorem}, commonly numbered theorem environments are +created now. |defstyle| and |theostyle| are used for the appearance. + +Now, everything is prepared for the following examples. + +\begin{dispExample} +The following theorem is numbered as \Cref{theo:diffbarstetig} and +referenced with the marker \texttt{theo:diffbarstetig}.\bigskip + +\begin{Theorem}{Differenzierbarkeit bedingt Stetigkeit, wobei diese Benennung + zu Testzwecken ungew\"{o}hnlich lang ist}{diffbarstetig}% + Eine Funktion $f:I\to\mathbb{R}$ ist in $x_0\in I$ stetig, wenn $f$ in + $x_0$ differenzierbar ist. +\end{Theorem} +\end{dispExample} + + +\begin{dispExample} +The following definition is numbered as \Cref{def:diffbarkeit} and +referenced with the marker \texttt{def:diffbarkeit}.\bigskip + +\begin{Definition}{Differenzierbarkeit}{diffbarkeit} + Eine Funktion $f:~I\to\mathbb{R}$ auf einem Intervall $I$ hei\ss{}t in + $x_0\in I$ differenzierbar oder linear approximierbar, + wenn der Grenzwert + \begin{equation*} + \lim\limits_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}= + \lim\limits_{h\to 0}\frac{f(x_0+h)-f(x_0)}{h} + \end{equation*} + existiert. Bei Existenz hei\ss{}t dieser Grenzwert Ableitung + oder Differentialquotient von $f$ in $x_0$ und man + schreibt f\"{u}r ihn + \begin{equation*} + f'(x_0)\quad\text{oder}\quad\frac{df}{dx}(x_0). + \end{equation*} +\end{Definition} +\end{dispExample} + + +\begin{dispExample} +The following corollary is numbered as \Cref{cor:nullstellen} and +referenced with the marker \texttt{cor:nullstellen}.\bigskip + +\begin{Corollary}{Nullstellenexistenz}{nullstellen} + Ist $f:[a,b]\to\mathbb{R}$ stetig und haben $f(a)$ und $f(b)$ entgegengesetzte + Vorzeichen, also $f(a)f(b)<0$, so besitzt $f$ eine Nullstelle $x_0\in]a,b[$, + also $f(x_0)=0$. +\end{Corollary} +\end{dispExample} + + +\begin{dispExample} +\begin{Theorem}[boxrule=2mm,toptitle=-1.5mm,bottomtitle=-1.5mm]{% + Hinreichende Bedingung f\"{u}r Wendepunkte}{wendehinreichend}% + $f$ sei eine auf einem Intervall $]a,b[$ dreimal stetig differenzierbare Funktion. + Ist $f''(x_0)=0$ in $x_0\in]a,b[$ und $f'''(x_0)\ne 0$, so ist + $(x_0,f(x_0))$ ein Wendepunkt von $f$. +\end{Theorem} +\end{dispExample} + +\begin{dispExample} +% \usepackage{varioref} +% \usepackage{cleveref} +% \tcbuselibrary{skins} +\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}% + {theorem style=plain apart,label type=theorem,enhanced,frame hidden, + boxrule=2mm,titlerule=0mm,toptitle=1mm,bottomtitle=1mm, + fonttitle=\bfseries\large,fontupper=\normalsize, + coltitle=green!35!black,colbacktitle=green!15!white, + colback=green!50!yellow!15!white,borderline={1pt}{0pt}{green!25!blue}, + }{theo} + +\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{meanvaluetheorem}% + Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und + $f\in C^{1}(D,\mathbb{R})$. Dann gibt es auf jeder Strecke + $[x_0,x]\subset D$ einen Punkt $\xi\in[x_0,x]$, so dass gilt + \begin{equation*} + f(x)-f(x_0) = \operatorname{grad} f(\xi)^{\top}(x-x_0) + \end{equation*} +\end{YetAnotherTheorem} + +\medskip +Here, |cleveref| support is used to reference \Cref{theo:meanvaluetheorem} +on \Cpageref{theo:meanvaluetheorem}. This \namecref{theo:meanvaluetheorem} +can also be referenced by |\Vref| resulting in \Vref{theo:meanvaluetheorem}. +\end{dispExample} + +\begin{marker} +Note that \refKey{/tcb/label type} was used in the example above to feed +|cleveref| \cite{cubitt:2013a} with the needed name information. +\end{marker} + +\clearpage + +\begin{dispExample} +Here, using |\Vref| resulting in \Vref{theo:meanvaluetheorem} is more interesting\ldots +\end{dispExample} + + +\begin{dispExample} +% \tcbuselibrary{skins} +\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}% + {theorem style=change apart,enhanced,arc=0mm,outer arc=0mm, + boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm, + titlerule=0mm,toptitle=0mm,bottomtitle=1mm,top=0mm, + colframe=red!50!black,colback=red!5!white,coltitle=red!50!black, + title style={top color=yellow!50!white,bottom color=red!5!white, + middle color=yellow!50!white}, + fonttitle=\bfseries\sffamily\normalsize,fontupper=\normalsize\itshape, + }{theo} + +\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n2}% + Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und + $f\in C^{1}(D,\mathbb{R})$. Dann gibt es auf jeder Strecke + $[x_0,x]\subset D$ einen Punkt $\xi\in[x_0,x]$, so dass gilt + \begin{equation*} + f(x)-f(x_0) = \operatorname{grad} f(\xi)^{\top}(x-x_0) + \end{equation*} +\end{YetAnotherTheorem} +\end{dispExample} + + +\begin{dispExample} +% \usepackage{varwidth} \tcbuselibrary{skins} +\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}% +{enhanced,frame empty,interior empty,colframe=ForestGreen!50!white, + coltitle=ForestGreen!50!black,fonttitle=\bfseries,colbacktitle=ForestGreen!15!white, + borderline={0.5mm}{0mm}{ForestGreen!15!white}, + borderline={0.5mm}{0mm}{ForestGreen!50!white,dashed}, + attach boxed title to top center={yshift=-2mm}, + boxed title style={boxrule=0.4pt},varwidth boxed title}{theo} + +\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n3}% + Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und + $f\in C^{1}(D,\mathbb{R})$. Dann gibt es auf jeder Strecke + $[x_0,x]\subset D$ einen Punkt $\xi\in[x_0,x]$, so dass gilt + \begin{equation*} + f(x)-f(x_0) = \operatorname{grad} f(\xi)^{\top}(x-x_0) + \end{equation*} +\end{YetAnotherTheorem} +\end{dispExample} + + +\clearpage +You need more attention for your theorems? Here, you are \ldots + +\begin{dispExample} +% tcbuselibrary{skins} % preamble +\begin{Theorem}[enhanced, + fuzzy halo=3mm with yellow, + fuzzy halo=2mm with red, + fuzzy halo=1mm with yellow, + watermark color=red!35!white, + watermark text={Overacting\\Fundamental Theorem}]% + {Fundamental Theorem of Theorems}{fundamental}% + \lipsum[1-2] +\end{Theorem} +\end{dispExample} + +Let's try a more conservative approach: + +\begin{dispExample} +% \tcbuselibrary{skins} +\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}% + {theorem style=plain,enhanced,colframe=blue!50!black,colback=yellow!20!white, + coltitle=red!50!black,fonttitle=\upshape\bfseries,fontupper=\itshape, + drop fuzzy shadow=blue!50!black!50!white,boxrule=0.4pt}{theo} + +\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n4}% + Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und + $f\in C^{1}(D,\mathbb{R})$. Dann gibt es auf jeder Strecke + $[x_0,x]\subset D$ einen Punkt $\xi\in[x_0,x]$, so dass gilt + \begin{equation*} + f(x)-f(x_0) = \operatorname{grad} f(\xi)^{\top}(x-x_0) + \end{equation*} +\end{YetAnotherTheorem} +\end{dispExample} + + +\clearpage +\subsection{Using other theorem environments with \texttt{tcolorbox}}\label{subsec:theorems_other} + +Instead of creating theorem environments with the methods described before, +environments from other packages can be boxed with a |tcolorbox|. + +Environments may be created e.g. by methods from the |theorem| package or +the |amsthm| package. \refCom{tcolorboxenvironment} can be used to put a box +around these environments. + +\inputpreamblelisting{K} + +\begin{dispExample} +\begin{lem} + \lipsum[2] +\end{lem} + +\lipsum[3] + +\begin{proof} + \lipsum*[4] +\end{proof} +\end{dispExample} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.verbatim.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.verbatim.tex new file mode 100644 index 0000000..de7d56a --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.verbatim.tex @@ -0,0 +1,117 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Saving and Loading of Verbatim Texts}% +\tcbset{external/prefix=external/verbatim_}% +The following macros are slightly modified versions of the original macros +from the known packages |moreverb| and |verbatim|. +They are used implicitly inside of a |tcolorbox| environment, +but they can be used outside also. +\enlargethispage*{1.5cm} + +\begin{docEnvironment}{tcbverbatimwrite}{\marg{file name}} + Saves the \meta{environment content} to a file named by \meta{file name}. + \TeX\ macros inside the environment are not expanded. +\begin{dispExample} +\begin{tcbverbatimwrite}{\jobname_verbexp.tex} + This text is saved \textit{as is}. +\end{tcbverbatimwrite} + +Now, we are using the file:\par +\input{\jobname_verbexp.tex} +\end{dispExample} + +This environment may be used inside an own environment. Note, that inside +the environment definition |\tcbverbatimwrite| has to be used instead of +|\begin{tcbverbatimwrite}| and |\endtcbverbatimwrite| instead of |\end{tcbverbatimwrite}|. +\begin{dispExample} +\newenvironment{myverbatim}{% + \begingroup\tcbverbatimwrite{\jobname_myverb.tex}}% + {\endtcbverbatimwrite\endgroup} + +\begin{myverbatim} + This is the text which is saved by my own environment. +\end{myverbatim} + +Now, we are using the file:\par +\input{\jobname_myverb.tex} +\end{dispExample} +\end{docEnvironment} + +\begin{docEnvironment}{tcbwritetemp}{} + Has the same function as \refEnv{tcbverbatimwrite}, but uses the key value + of |tempfile| for the file name. +\begin{dispExample} +\begin{tcbwritetemp} + This text is saved \textit{as is}. +\end{tcbwritetemp} + +Now, we are using the file:\par +\tcbusetemp +\end{dispExample} +\end{docEnvironment} + + +\begin{docCommand}{tcbusetemp}{} + Loads the current temporary file which was saved by \refEnv{tcbwritetemp}. +\end{docCommand} + +\clearpage + +\begin{docTcbKey}[][doc new=2017-07-05]{verbatim ignore percent}{\colOpt{=true\textbar false}}{default |true|, initially |false|} + If this option is set to be |true|, the percent sign \% is silently + ignored for \refEnv{tcbverbatimwrite} and all macros and environments + which are built using \refEnv{tcbverbatimwrite}, e.g.\ + \refEnv{tcbwritetemp}, \refEnv{tcblisting}, or \refEnv{dispExample}.\par + This option may be useful for creating some special effects, but mainly + it is intended to be applied for documentation with DocStrip. + The creation of this option was motivated by Yudai Nakata. + Note that this option is not getting reset by \refKey{/tcb/reset}. +\begin{dispExample*}{sidebyside} +Normal usage: +\begin{tcbwritetemp} +%\begin{center}\bfseries +This is my text. +%\end{center} +\end{tcbwritetemp} + +\tcbusetemp + +\tcbset{verbatim ignore percent} +\bigskip Option applied: +\begin{tcbwritetemp} +%\begin{center}\bfseries +This is my text. +%\end{center} +\end{tcbwritetemp} + +\tcbusetemp +\end{dispExample*} + +\begin{marker} +Note that \emph{every} percent sign is removed, also escaped ones. +\end{marker} + +\begin{dispExample*}{sidebyside} +% \tcbuselibrary{listings} +\def\percent{\%} + +\begin{tcblisting}{title=Normal} +%\begin{center}\bfseries +This is my 5\percent\ text +and this is my 10\% text. +%\end{center} +\end{tcblisting} + +\begin{tcblisting}{ + title=Option applied, + verbatim ignore percent} +%\begin{center}\bfseries +This is my 5\percent\ text +and this is my 10\% text. +%\end{center} +\end{tcblisting} +\end{dispExample*} + +\end{docTcbKey} + diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.vignette.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.vignette.tex new file mode 100644 index 0000000..d43c429 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.vignette.tex @@ -0,0 +1,760 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{vignette}}\label{sec:vignette}% +\tcbset{external/prefix=external/vignette_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{vignette} +\end{dispListing} +This also loads the \mylib{skins} library, see \Fullref{sec:skins}, +and the |fadings| library of |tikz| \cite{tantau:2015a}. + + +\subsection{Vignette Drawing}\label{subsec:vignettedrawing} + +\begin{docCommand}[doc new=2016-04-22]{tcbvignette}{\marg{options}} + In this context, a \emph{vignette} is a four part rectangular frame. + It is constructed as several \tikzname\ paths and, therefore, can only be + used inside a |tikzpicture| environment or inside \refEnv{tcolorbox} options. + + The \meta{options} control position, size and style settings of the vignette. + Theses options have the common key path |/tcb/vig/| and are described in + the following. + + The next examples show direct \refCom{tcbvignette} usage without + a \refEnv{tcolorbox}. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{} +\end{tikzpicture} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \node[draw,fill=blue!15!white] (A) {Test}; + \tcbvignette{outside node=A,raised color=blue} +\end{tikzpicture} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \node[draw,fill=blue!15!white] (A) {Another Test}; + \tcbvignette{size=3mm,outside node=A, + north style=red,east style=yellow, + south style=blue,west style=green} +\end{tikzpicture} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \node[inner sep=3mm,fill=red!75] (A) {Test}; + \tcbvignette{over node=A,fade in} +\end{tikzpicture} +\end{dispExample*} + +\refCom{tcbvignette} can be used directly inside appropriate options keys +for \refEnv{tcolorbox}. Note that options like \refKey{/tcb/underlay} need +\refKey{/tcb/enhanced} or similar settings. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small,sharp corners, + colback=green!10,colframe=green!50!black, + boxrule=1mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + underlay={\tcbvignette{size=1mm,inside node=frame, + raised color=green!50!black}}] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +Mostly, convenient short cuts like \refKey{/tcb/underlay vignette} can +be used to add a \emph{vignette} to a \refEnv{tcolorbox}. Here, \refCom{tcbvignette} +is used internally. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small,sharp corners, + colback=green!10,colframe=green!50!black, + boxrule=1mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + underlay vignette] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\end{docCommand} + + + +\subsection{Generic Geometry Settings}\label{subsec:vignettegeometry} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{xmin}{=\meta{length}}{no default, initially |0pt|} + Sets the lower horizontal limit of a \refCom{tcbvignette}. +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{xmax}{=\meta{length}}{no default, initially |1cm|} + Sets the upper horizontal limit of a \refCom{tcbvignette}. +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{ymin}{=\meta{length}}{no default, initially |0pt|} + Sets the lower vertical limit of a \refCom{tcbvignette}. +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{ymax}{=\meta{length}}{no default, initially |1cm|} + Sets the upper vertical limit of a \refCom{tcbvignette}. +\end{vigTcbKey} + + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \fill [black!20] (0,0) rectangle (3,2); + \path [pattern=checkerboard,pattern color=black!30] + (0,0) rectangle (3,2); + \tcbvignette{xmin=1cm,xmax=2.5cm,ymin=0.5cm,ymax=1.75cm} +\end{tikzpicture} +\end{dispExample*} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{lower left corner}{=\meta{coordinates}}{style, initially |0,0|} + Sets the lower left corner of a \refCom{tcbvignette}. + This style sets \refKey{/tcb/vig/xmin} and \refKey{/tcb/vig/ymin}. +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{upper right corner}{=\meta{coordinates}}{style, initially |1,1|} + Sets the upper right corner of a \refCom{tcbvignette}. + This style sets \refKey{/tcb/vig/xmax} and \refKey{/tcb/vig/ymax}. +\end{vigTcbKey} + + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \fill [black!20] (0,0) rectangle (3,2); + \path [pattern=checkerboard,pattern color=black!30] + (0,0) rectangle (3,2); + \tcbvignette{lower left corner={1,0.5}, + upper right corner={2.5,1.75}} +\end{tikzpicture} +\end{dispExample*} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{inside node}{=\meta{name}}{style, initally unset} + Places the \refCom{tcbvignette} inside the node with the given \meta{name}. + The outer limits of the \emph{vignette} are adapted to the node geometry. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \node[minimum width=2cm,minimum height=1cm] (A) {Node A}; + \tcbvignette{inside node=A} + \draw[very thick] (A.south west) rectangle (A.north east); +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{outside node}{=\meta{name}}{style, initally unset} + Places the \refCom{tcbvignette} outside the node with the given \meta{name}. + The inner limits of the \emph{vignette} are adapted to the node geometry. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \node[minimum width=2cm,minimum height=1cm] (A) {Node A}; + \tcbvignette{outside node=A} + \draw[very thick] (A.south west) rectangle (A.north east); +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{over node}{=\meta{name}}{style, initally unset} + Places the \refCom{tcbvignette} over the node with the given \meta{name}. + The outer limits of the \emph{vignette} are adapted to the node geometry, but + are shifted to the outside by \refKey{/tcb/vig/over node offset}. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \node[minimum width=2cm,minimum height=1cm] (A) {Node A}; + \tcbvignette{over node offset=1mm,over node=A} + \draw[very thick] (A.south west) rectangle (A.north east); +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{over node offset}{=\meta{length}}{no default, initially |0.1mm|} + Determines the shift value for \refKey{/tcb/vig/over node}. + Note that \refKey{/tcb/vig/over node offset} has to be set \emph{before} + \refKey{/tcb/vig/over node} is used. +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{north size}{=\meta{length}}{no default, initially |2mm|} + Sets the thickness of the north \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{north size=4mm} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{south size}{=\meta{length}}{no default, initially |2mm|} + Sets the thickness of the south \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{south size=4mm} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{east size}{=\meta{length}}{no default, initially |2mm|} + Sets the thickness of the east \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{east size=4mm} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{west size}{=\meta{length}}{no default, initially |2mm|} + Sets the thickness of the west \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{west size=4mm} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{vertical size}{=\meta{length}}{style, initially |2mm|} + Sets \refKey{/tcb/vig/north size} and \refKey{/tcb/vig/south size}, + to the given \meta{length}. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{vertical size=4mm} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{horizontal size}{=\meta{length}}{style, initially |2mm|} + Sets \refKey{/tcb/vig/east size} and \refKey{/tcb/vig/west size}, + to the given \meta{length}. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{horizontal size=4mm} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{size}{=\meta{length}}{style, initially |2mm|} + Sets \refKey{/tcb/vig/north size}, \refKey{/tcb/vig/south size}, + \refKey{/tcb/vig/east size}, and \refKey{/tcb/vig/west size} to the given \meta{length}. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{size=4mm} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{marker} +\refKey{/tcb/vig/north size}, \refKey{/tcb/vig/south size}, etc. have to +be set \emph{before} \refKey{/tcb/vig/outside node} is used. +\end{marker} + + + +\subsection{Generic Color and Style Settings}\label{subsec:vignettestyle} + +\begin{vigTcbKey}[][doc new=2016-04-22]{north style}{=\marg{style}}{no default, initially |red!50!white|} + Sets \tikzname\ \meta{style} options for the north \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{north style=blue} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\begin{vigTcbKey}[][doc new=2016-04-22]{south style}{=\marg{style}}{no default, initially |red!50!black|} + Sets \tikzname\ \meta{style} options for the south \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{south style={draw=blue,fill=yellow}} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + +\clearpage + +\begin{vigTcbKey}[][doc new=2016-04-22]{east style}{=\marg{style}}{no default, initially |red!75!black|} + Sets \tikzname\ \meta{style} options for the east \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{east style={left color=yellow!75!black, + right color=blue!75!black}} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{west style}{=\marg{style}}{no default, initially |red!75!white|} + Sets \tikzname\ \meta{style} options for the west \emph{vignette} part. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{west style={preaction={fill=black!20}, + pattern=checkerboard, + pattern color=black!30}} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-05-24]{scope}{=\marg{style}}{no default, initially empty} + The four \emph{vignette} parts are drawn inside a \tikzname\ |scope| + environment which takes the given \meta{style} as option. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{scope={transparency group,opacity=0.25}} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + + +\begin{vigTcbKey}[][doc new=2016-04-22]{raised color}{=\meta{color}}{no default} + Creates a raised frame impression by setting the four style options + \refKey{/tcb/vig/north style}, + \refKey{/tcb/vig/south style}, + \refKey{/tcb/vig/east style}, and + \refKey{/tcb/vig/west style} + to darkened and lightened variations of the given \meta{color}. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{raised color=blue} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{lowered color}{=\meta{color}}{no default} + Creates a lowered frame impression by setting the four style options + \refKey{/tcb/vig/north style}, + \refKey{/tcb/vig/south style}, + \refKey{/tcb/vig/east style}, and + \refKey{/tcb/vig/west style} + to darkened and lightened variations of the given \meta{color}. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{lowered color=green!75!black} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{color from}{=\meta{inner} |to| \meta{outer}}{no default} + Sets the four style options + \refKey{/tcb/vig/north style}, + \refKey{/tcb/vig/south style}, + \refKey{/tcb/vig/east style}, and + \refKey{/tcb/vig/west style} + such that the color shades from the + \meta{inner} color to the \meta{outer} color. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{color from=red to blue!50} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{base color}{=\meta{color}}{no default} + Sets the base color for \refKey{/tcb/vig/raised color}, + \refKey{/tcb/vig/lowered color}, \refKey{/tcb/finish fading vignette}. + Typically, this value has not to be set directly. +\end{vigTcbKey} + + +\clearpage +\begin{vigTcbKey}[][doc new=2016-04-22]{draw method}{=\docValue{direct}\textbar\docValue{clipped}}{no default, initially |direct|} + Especially, if shadings or fadings are used, the drawn \emph{vignette} + graphs are displayed sometimes not as perfect as expected. Glitches and + imperfections are very dependent on the previewer software. + The \refKey{/tcb/vig/draw method} intends to give a choice of alternative + drawing methods. + \begin{itemize} + \item\docValue{direct}: The \emph{vignette} parts are drawn/filled + by using a single \tikzname\ graph. This is the preferred (and default) + method for solid color graphs. + \item\docValue{clipped}: The \emph{vignette} parts are drawn somewhat + oversized and are clipped to the intended region. + In combination with shadings and fadings this seems to give a + better/different optical result (depends on the previewer). + \end{itemize} +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{color from=red to yellow} +\end{tikzpicture} +\end{dispExample*} +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \tcbvignette{color from=red to yellow,draw method=clipped} +\end{tikzpicture} +\end{dispExample*} + +\begin{marker} +This option is a stopgap and may be changed or preferably removed in +future. +\end{marker} +\end{vigTcbKey} + + + +\subsection{Generic Fading Settings}\label{subsec:vignettefading} + +The |fadings| library of |tikz| \cite{tantau:2015a} is loaded +automatically by the \mylib{vignette} library. +Amongst others, the fadings +\docFading{west}, +\docFading{east}, +\docFading{north}, and +\docFading{south} are defined inside the |fadings| library. + +The \mylib{vignette} library adds some more fadings called +\docFading{semi west}, +\docFading{semi east}, +\docFading{semi north}, and +\docFading{semi south}. +These fadings are much \emph{weaker} than the normal fadings. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \fill [black!20] (0,0) rectangle (1,1); + \path [pattern=checkerboard,pattern color=black!30] + (0,0) rectangle (1,1); + \fill [path fading=semi west,blue] (0,0) rectangle (1,1); +\end{tikzpicture} +\end{dispExample*} + + + +\begin{tcboxedraster}{base example,title=Comparison of the Fadings} + \def\doShadingExample#1{% + \begin{tcolorbox}[sbs,size=fbox,colback=white,lower separated=false, + righthand width=2cm,left=5mm] + \docFading{#1}\tcblower + \begin{tikzpicture} + \fill [black!20] (0,0) rectangle (1,1); + \path [pattern=checkerboard,pattern color=black!30] (0,0) rectangle (1,1); + \fill [path fading=#1,blue] (0,0) rectangle (1,1); + \end{tikzpicture} + \end{tcolorbox}}% + \doShadingExample{west} + \doShadingExample{east} + \doShadingExample{north} + \doShadingExample{south} + \doShadingExample{semi west} + \doShadingExample{semi east} + \doShadingExample{semi north} + \doShadingExample{semi south} +\end{tcboxedraster} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{fade in}{\colOpt{=\marg{style}}}{style, default |white|} + Sets the four style options + \refKey{/tcb/vig/north style}, + \refKey{/tcb/vig/south style}, + \refKey{/tcb/vig/east style}, and + \refKey{/tcb/vig/west style} + such that the paths fade from outside to inside. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5); + \path [pattern=checkerboard,pattern color=black!30] + (-0.5,-0.5) rectangle (1.5,1.5); + \tcbvignette{fade in=blue} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{fade out}{\colOpt{=\marg{style}}}{style, default |white|} + Sets the four style options + \refKey{/tcb/vig/north style}, + \refKey{/tcb/vig/south style}, + \refKey{/tcb/vig/east style}, and + \refKey{/tcb/vig/west style} + such that the paths fade from inside to outside. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5); + \path [pattern=checkerboard,pattern color=black!30] + (-0.5,-0.5) rectangle (1.5,1.5); + \tcbvignette{fade out=blue} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{semi fade in}{\colOpt{=\marg{style}}}{style, default |white|} + Sets the four style options + \refKey{/tcb/vig/north style}, + \refKey{/tcb/vig/south style}, + \refKey{/tcb/vig/east style}, and + \refKey{/tcb/vig/west style} + such that the paths fade weak from outside to inside. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5); + \path [pattern=checkerboard,pattern color=black!30] + (-0.5,-0.5) rectangle (1.5,1.5); + \tcbvignette{semi fade in=blue} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + +\begin{vigTcbKey}[][doc new=2016-04-22]{semi fade out}{\colOpt{=\marg{style}}}{style, default |white|} + Sets the four style options + \refKey{/tcb/vig/north style}, + \refKey{/tcb/vig/south style}, + \refKey{/tcb/vig/east style}, and + \refKey{/tcb/vig/west style} + such that the paths fade weak from inside to outside. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tikzpicture} + \fill [black!20] (-0.5,-0.5) rectangle (1.5,1.5); + \path [pattern=checkerboard,pattern color=black!30] + (-0.5,-0.5) rectangle (1.5,1.5); + \tcbvignette{semi fade out=blue} +\end{tikzpicture} +\end{dispExample*} +\end{vigTcbKey} + + + + +\clearpage +\subsection{Vignette as Underlay}\label{subsec:vignetteunderlay} + +\begin{docTcbKey}[][doc new=2016-04-22]{underlay vignette}{\colOpt{=\marg{options}}}{style, no default} + This puts a \refCom{tcbvignette} with the given \meta{options} + as \refKey{/tcb/underlay} to a \refEnv{tcolorbox}. + The dimensions of the \emph{vignette} are matched to the dimensions of + the \refEnv{tcolorbox}. For example, \refKey{/tcb/leftrule} is used as + \refKey{/tcb/vig/west size}. Also, \refKey{/tcb/colframe} is used as + \refKey{/tcb/vig/raised color}. + + For a \refKey{/tcb/breakable} tcolorbox, the \emph{vignette} is also + been broken. + Alternatively, \refCom{tcbvignette} could be used directly inside + an \refKey{/tcb/underlay} with appropriate settings. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small,sharp corners, + colback=green!10,colframe=green!50!black, + boxrule=2mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + underlay vignette] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small,arc=0pt, + colback=blue!10,colframe=blue,boxrule=2mm, + underlay vignette={size=1.5mm}] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small,sharp corners, + colframe=red,interior hidden,boxrule=2mm, + colupper=white,center upper,fontupper=\bfseries, + underlay vignette] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small,sharp corners, + colback=red!50!yellow,frame hidden,boxrule=2mm, + underlay vignette={color from=red!50!yellow to white, + draw method=clipped,size=2.1mm}] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\tcbox[enhanced,sharp corners,colback=red!10,colframe=red] + {Test} + +\tcbox[enhanced,sharp corners,colback=red!10,colframe=red, + underlay vignette]{Test} +\end{dispExample*} + +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2016-04-22]{underlay raised shading vignette}{\colOpt{=\marg{options}}}{style, no default} + This is a special style derived from \refKey{/tcb/underlay vignette}, + where the frame color is shaded to create a soft raised frame impression. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,sharp corners, + colback=green!10, + colframe=green!50!black, + size=small,boxrule=2mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + underlay raised shading vignette] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + + +\begin{docTcbKey}[][doc new=2016-04-22]{underlay raised fading vignette}{\colOpt{=\marg{options}}}{style, no default} + This style gives a similar effect as \refKey{/tcb/underlay raised shading vignette}, + but a path fading is used here. Different optical impression are very + previewer-dependent. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,sharp corners, + colback=green!10, + colframe=green!50!black, + size=small,boxrule=2mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + underlay raised fading vignette] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + +\begin{docTcbKey}[][doc new=2016-04-22]{underlay shade in vignette}{\colOpt{=\marg{options}}}{style, no default} + This is a special style derived from \refKey{/tcb/underlay vignette}, + where the frame color is shaded into the interior color. +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,sharp corners,frame hidden, + colback=green!10, + colframe=green!50!black, + size=small,boxrule=2mm,titlerule=0mm, + underlay shade in vignette] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} +\end{docTcbKey} + + +\clearpage +\subsection{Vignette as Finish}\label{subsec:vignettefinish} + + +\begin{docTcbKey}[][doc new=2016-04-22]{finish vignette}{\colOpt{=\marg{options}}}{style, no default} + This puts a \refCom{tcbvignette} with the given \meta{options} + as \refKey{/tcb/finish} to a \refEnv{tcolorbox}. + The default style settings create a raised frame impression by + drawing black and white color parts with reduced opacity. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small, + colback=green!10,colframe=green!50!black, + boxrule=0.5mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + finish vignette={size=1mm}] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\tcbincludegraphics[blankest,width=3cm, + finish vignette={size=3mm}]{pink_marble.png} +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}[][doc new=2016-04-22]{finish raised fading vignette}{\colOpt{=\marg{options}}}{style, no default} + This puts a \refCom{tcbvignette} with the given \meta{options} + as \refKey{/tcb/finish} to a \refEnv{tcolorbox}. + The default style settings create a soft raised frame impression by + drawing fading black and white color parts. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small, + colback=green!10,colframe=green!50!black, + boxrule=0.5mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + finish raised fading vignette={size=1mm}] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\tcbincludegraphics[blankest,width=3cm, + finish raised fading vignette={size=3mm}]{pink_marble.png} +\end{dispExample*} + +\end{docTcbKey} + + +\clearpage +\begin{docTcbKey}[][doc new=2016-04-22]{finish fading vignette}{\colOpt{=\marg{options}}}{style, no default} + This puts a \refCom{tcbvignette} with the given \meta{options} + as \refKey{/tcb/finish} to a \refEnv{tcolorbox}. + The default style settings fade the box into white from inside to outside. + Note that \refKey{/tcb/vig/over node} is used here. + \refKey{/tcb/vig/over node offset} can be adapted to overlap the box + more or less. The fade color can be set using + \refKey{/tcb/vig/base color}. + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[enhanced,size=small, + colback=green!10,colframe=green!50!black, + boxrule=0.5mm,titlerule=0mm, + title=My title,center title,fonttitle=\bfseries, + finish fading vignette={size=2mm}] + This is a tcolorbox. +\end{tcolorbox} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\tcbincludegraphics[blankest,width=3cm, + finish fading vignette={size=3mm}]{pink_marble.png} +\end{dispExample*} + +\begin{dispExample*}{sbs,righthand width=3cm,center lower} +\begin{tcolorbox}[colback=blue!50!black,size=small, + title=Example] +\tcbincludegraphics[blankest, + finish fading vignette={base color=blue!50!black,size=3mm, + over node offset=0.2mm}]{pink_marble.png} +\end{tcolorbox} +\end{dispExample*} + +\end{docTcbKey} + + +\begin{dispExample*}{} +\begin{tcbitemize}[raster columns=3,bicolor, + raster equal height,sharp corners,boxrule=2mm, + colframe=red,colback=yellow!5,colbacklower=yellow!25!red!20] +\tcbitem A +\tcbitem[underlay vignette] B +\tcbitem[underlay={\tcbvignette{inside node=interior, + lowered color=red,size=1mm}}] C +\tcbitem[underlay vignette, + underlay={\tcbvignette{inside node=interior, + lowered color=red,size=1mm}}] D +\tcbitem[boxrule=3mm,underlay vignette={size=2mm}, + underlay={\tcbvignette{inside node=interior, + lowered color=red,size=1mm}}] E +\tcbitem[underlay raised shading vignette] F +\tcbitem[underlay raised shading vignette, + underlay={\tcbvignette{inside node=interior, + lowered color=red,size=1mm}}] G +\tcbitem[title=H1,underlay={\tcbvignette{inside node=interior, + lowered color=red,size=1mm}},finish vignette] H2 +\tcbitem[boxrule=0.25mm,colback=red!30,finish vignette] I1 \tcblower I2 +\tcbitem[tile,colback=red!30,finish raised fading vignette] J1 \tcblower J2 +\tcbitem[boxrule=1mm,underlay={\tcbvignette{inside node=interior, + raised color=red,size=1mm}}] K +\tcbitem[boxrule=1mm,title=L1,underlay={\tcbvignette{inside node=title, + lowered color=red,size=0.5mm}}] L2 +\end{tcbitemize} +\end{dispExample*} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.xparse.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.xparse.tex new file mode 100644 index 0000000..24a1cf8 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.doc.xparse.tex @@ -0,0 +1,591 @@ +% !TeX root = tcolorbox.tex +% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox) +\clearpage +\section{Library \mylib{xparse}}\label{sec:xparse}% +\tcbset{external/prefix=external/xparse_}% +The library is loaded by a package option or inside the preamble by: +\begin{dispListing} +\tcbuselibrary{xparse} +\end{dispListing} +This also loads the package |xparse| \cite{latexproject:2015a}. + +The purpose of this library is to give comfortable access to the +powerful document command production with |xparse| for |tcolorbox|. +See the |xparse| package documentation \cite{latexproject:2015a} +for details about the argument \meta{specification} used in this section. + +%\subsection{Producing Document Commands With \texttt{xparse}} + + +\subsection{Option Keys}\label{subsec:xparse_options} + +\begin{docTcbKey}{verbatim}{}{style, no value} + Sets options for a \textit{verbatim} style \refCom{tcbox}. + Since the indented boxes may contain only very few words, the + dimensions are made smaller and \refKey{/tcb/nobeforeafter} + and \refKey{/tcb/tcbox raise base} are set. +\begin{dispExample*}{sbs,lefthand ratio=0.6} +\DeclareTotalTCBox{\myverb}{ v }{verbatim, + colframe=red!75!black,colupper=blue}{#1} + +\myverb{\textbf} is a \myverb{\LaTeX} command. +\end{dispExample*} +\end{docTcbKey} + + +\begin{docTcbKey}{IfNoValueTF}{=\marg{argument}\marg{true options}\marg{false options}}{no default} + Wraps the |\IfNoValueTF| command of |xparse| for option setting. + If the \meta{argument} has no value, the \meta{true options} are set. + Otherwise, the \meta{false options} are set. +\begin{dispExample} +\DeclareTColorBox{mybox}{ o }{colframe=red!75!black, + IfNoValueTF={#1}{colback=red!5!white}{enhanced,interior style image=#1}} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[goldshade.png] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKey} + +\clearpage +\begin{docTcbKey}{IfValueTF}{=\marg{argument}\marg{true options}\marg{false options}}{no default} + Wraps the |\IfValueTF| command of |xparse| for option setting. + If the \meta{argument} has a value, the \meta{true options} are set. + Otherwise, the \meta{false options} are set. +\begin{dispExample} +\DeclareTColorBox{mybox}{ o }{colframe=red!75!black,colback=red!5!white, + IfValueTF={#1}{title={\flqq #1\frqq},fonttitle=\bfseries}{}} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[My title] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKey} + +\begin{docTcbKey}{IfBooleanTF}{=\marg{argument}\marg{true options}\marg{false options}}{no default} + Wraps the |\IfBooleanTF| command of |xparse| for option setting. + If the \meta{argument} is |\BooleanTue|, the \meta{true options} are set. + If the \meta{argument} is |\BooleanFalse|, the \meta{false options} are set. + +\begin{dispExample} +\DeclareTColorBox{mybox}{ s }{colframe=red!75!black, + IfBooleanTF={#1}{colback=yellow!50!red}{colback=red!5!white}} + +\begin{mybox} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}* +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docTcbKey} + + + +\clearpage +\subsection{Producing \texttt{tcolorbox} Environments and Commands}\label{subsec:xparse_tcolorbox} + +\begin{docCommand}{DeclareTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Creates a new environment \meta{name} based on \refEnv{tcolorbox}.\\ + Basically, |\DeclareTColorBox| operates like |\DeclareDocumentEnvironment|. This means, + the new environment \meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refEnv{tcolorbox}.\\ + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new environment is always created, irrespective of an already existing + environment with the same name. + +\begin{dispExample} +% counter from previous example +\DeclareTColorBox[use counter from=pabox]{mybox}{ O{red} m d"" !O{} } + {enhanced,colframe=#1!75!black,colback=#1!5!white, + fonttitle=\bfseries,title={\thetcbcounter~#2}, + IfValueTF={#3}{watermark text={#3}}{},#4} + +\begin{mybox}{My title} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[blue]{My title} +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[green]{My title}"My Watermark" +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[yellow]{My title}[colbacktitle=yellow!50!white,coltitle=black] +This is a tcolorbox. +\end{mybox} + +\begin{mybox}[purple]{My title}"All together"[coltitle=yellow] +This is a tcolorbox. +\end{mybox} +\end{dispExample} +\end{docCommand} + +\clearpage +\begin{docCommand}{NewTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTColorBox}, but based on |\NewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + An error is issued if \meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTColorBox}, but based on |\RenewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + An existing environment is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTColorBox}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTColorBox}, but based on |\ProvideDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + The environment \meta{name} is only created if it is not already defined. +\end{docCommand} + + +\clearpage + +\begin{docCommand}{DeclareTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Creates a new command \texttt{\textbackslash}\meta{name} based on \refEnv{tcolorbox}. + In contrast to \refCom{DeclareTColorBox}, also the \meta{content} of the |tcolorbox| is specified.\\ + Basically, |\DeclareTotalTColorBox| operates like |\DeclareDocumentCommand|. This means, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refEnv{tcolorbox} which is filled with + the specified \meta{content}.\\ + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new command is always created, irrespective of an already existing + command with the same name. + +\begin{dispExample} +\DeclareTotalTColorBox{\diabox}{ O{} v m } + { bicolor,nobeforeafter,equal height group=diabox,width=5.7cm, + fonttitle=\bfseries\ttfamily,adjusted title={#2},center title, + colframe=blue!20!black,leftupper=0mm,rightupper=0mm,colback=black!75!white,#1} + { \tikz\path[fill zoom image={#2}] (0,0) rectangle (\linewidth,4cm);% + \tcblower#3} + +\diabox{blueshade.png}{Created with |GIMP|.\\\url{http://www.gimp.org}} +\diabox{goldshade.png}{Created with |GIMP|.\\\url{http://www.gimp.org}} + +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{NewTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTColorBox}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTColorBox}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + An existing command is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTotalTColorBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTColorBox}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + + +\clearpage +\subsection{Producing \texttt{tcbox} Commands}\label{subsec:xparse_tcbox} + + +\begin{docCommand}{DeclareTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcbox}. + Basically, |\DeclareTCBox| operates like |\DeclareDocumentCommand|. This means, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refCom{tcbox}.\\ + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new command is always created, irrespective of an already existing + command with the same name. + +\begin{dispExample} +% counter from previous example +\DeclareTCBox[use counter from=pabox]{\mybox}{ s m s } +{ nobeforeafter,colback=red!5!white,colframe=red!75!black, + title={#2 (Box \thetcbcounter)},fonttitle=\bfseries, + IfBooleanTF={#1}{enhanced,drop shadow}{}, + IfBooleanTF={#3}{colbacktitle=red!50!white}{} } + +\mybox{Bird}{This is my first box.} + \hfill +\mybox*{Tree}{This is my second box.} + \par\bigskip +\mybox{Bike}*{This is my third box.} + \hfill +\mybox*{City}*{This is my fourth box.} +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{NewTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBox}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBox}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + An existing command is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBox}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + + + +\clearpage + +\begin{docCommand}{DeclareTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcbox}. + In contrast to \refCom{DeclareTCBox}, also the \meta{content} of the |tcbox| is specified.\\ + Basically, |\DeclareTotalTCBox| operates like |\DeclareDocumentCommand|. This means, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refCom{tcbox} which is filled with + the specified \meta{content}.\\ + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new command is always created, irrespective of an already existing + command with the same name. + +\begin{dispExample} +\DeclareTotalTCBox{\myverb}{ O{red} v !O{} } +{ fontupper=\ttfamily,nobeforeafter,tcbox raise base,arc=0pt,outer arc=0pt, + top=0pt,bottom=0pt,left=0mm,right=0mm, + leftrule=0pt,rightrule=0pt,toprule=0.3mm,bottomrule=0.3mm,boxsep=0.5mm, + colback=#1!10!white,colframe=#1!50!black,#3}{#2} + +To set a word \textbf{bold} in \myverb{\LaTeX}, use +\myverb[green]{\textbf{bold}}. Alternatively, write +\myverb[yellow]{{\bfseries bold}}. +In \myverb[blue]{\LaTeX}[enhanced,fuzzy halo], other font settings are +done in the same way, e.\,g. \myverb{\textit}, \myverb{\itshape}\\ +or \myverb[brown]{\texttt}, \myverb[brown]{\ttfamily}. +\end{dispExample} + +The next example uses |\lstinline| from the |listings| package to +typeset the verbatim content. + +\begin{dispExample} +% \usepackage{listings} or \tcbuselibrary{listings} +\DeclareTotalTCBox{\commandbox}{ s v } +{verbatim,colupper=white,colback=black!75!white,colframe=black} +{\IfBooleanTF{#1}{\textcolor{red}{\ttfamily\bfseries > }}{}% + \lstinline[language=command.com,keywordstyle=\color{blue!35!white}\bfseries]^#2^} + +\commandbox*{cd "My Documents"} changes to directory \commandbox{My Documents}. + +\commandbox*{dir /A} lists the directory content. + +\commandbox*{copy example.txt d:\target} copies \commandbox{example.txt} to + \commandbox{d:\target}. +\end{dispExample} +\end{docCommand} + +\clearpage +\begin{docCommand}{NewTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTCBox}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTCBox}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + An existing command is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTotalTCBox}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTCBox}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + + +\begin{docCommand}{tcboxverb}{\oarg{options}\marg{verbatim box content}} + Creates a colored box based on \refCom{tcbox} which is fitted to the width of the given + \meta{verbatim box content}. + The underlying \refCom{tcbox} is styled with + \refKey{/tcb/verbatim} plus the given \meta{options}. + The difference to \refCom{tcbox} is that the \meta{verbatim box content} is + interpreted \textit{verbatim}. Therefore, |\tcboxverb| acts similar to |\verb|. + +\begin{dispExample} +\tcboxverb{\LaTeX}, \tcboxverb[colback=blue!10!white,colupper=blue]{\LaTeX}, +\tcboxverb[blank,fuzzy halo]{\LaTeX}, \tcboxverb[beamer]{\LaTeX}, +\tcboxverb[enhanced,skin=enhancedmiddle jigsaw,colframe=red]{\LaTeX}. +\end{dispExample} +\end{docCommand} + + + + +\clearpage +\subsection{Producing \texttt{tcblisting} Environments}\label{subsec:xparse_listing} +\begin{marker} +Besides \mylib{xparse}, the following commands also need the \mylib{listings} library to be included. +\end{marker} + +\begin{docCommand}{DeclareTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Creates a new environment \meta{name} based on \refEnv{tcblisting}.\\ + Basically, |\DeclareTCBListing| operates like |\DeclareDocumentEnvironment|. This means, + the new environment \meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refEnv{tcblisting}.\\ + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new environment is always created, irrespective of an already existing + environment with the same name. + +\begin{dispExample*}{sbs,lefthand ratio=0.5} +\DeclareTCBListing{mybox}{ s O{} m }{% + colback=red!5!white, + colframe=red!75!black, + fonttitle=\bfseries, + IfBooleanTF={#1} + {listing side text} + {text side listing}, + title=#3,#2} + +\begin{mybox}{Listing Box} +This is my +\LaTeX\ box. +\end{mybox} +\bigskip + +\begin{mybox}*{Listing Box} +This is my +\LaTeX\ box. +\end{mybox} +\bigskip + +\begin{mybox}[colback=yellow] + {Listing Box} +This is my +\LaTeX\ box. +\end{mybox} +\end{dispExample*} +\end{docCommand} + + + +\begin{docCommand}{NewTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBListing}, but based on |\NewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + An error is issued if \meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBListing}, but based on |\RenewDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + An existing environment is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTCBListing}{\oarg{init options}\marg{name}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBListing}, but based on |\ProvideDocumentEnvironment| instead of |\DeclareDocumentEnvironment|. + The environment \meta{name} is only created if it is not already defined. +\end{docCommand} + +\clearpage + + +\begin{marker} +With date of 2018-05-12, the |xparse| \cite{latexproject:2015a} package +changed the argument collection process. +Now, spaces are ignored which leads to a serious change for listing environments +ending with an optional argument like \verb+O{}+. +The former behaviour of respecting spaces can be preserved by adding a \flqq\verb+!+\frqq. +Note that the following code uses \verb+!O{}+ now. +\begin{itemize} +\item For older |xparse| versions, the following code is correct when using \verb+O{}+. +\item For |xparse| of 2018-05-12, only the first two examples of + the following code using \verb+O{}+ are really \flqq good\frqq\ -- all others do not work. +\item For |xparse| of 2018-05-12, the following code is correct when using \verb+!O{}+. +\item In the future, |xparse| \emph{may} return to the old behaviour for + environments. +\end{itemize} +\end{marker} + + + + + +\begin{dispListing*}{title={Caveats of using an environment ending with an + optional argument},fonttitle=\bfseries} +\DeclareTCBListing{mybox}{ !O{} }{listing only,#1} + +\begin{mybox}[colframe=red] +\good +\end{mybox} + +\begin{mybox}[colframe=red]\good\end{mybox} + +\begin{mybox} +\good +\end{mybox} + +\begin{mybox} \good\end{mybox} + +\begin{mybox}\bad!\end{mybox} + +\begin{mybox} +[\good] +\end{mybox} + +\begin{mybox} [\good]\end{mybox} + +\begin{mybox}[\bad!]\end{mybox} +\end{dispListing*} + +\clearpage +\subsection{Producing \texttt{tcbinputlisting} Commands}\label{subsec:xparse_inputlisting} +\begin{marker} +The following commands need the \mylib{listings} library to be included. +\end{marker} + + +\begin{docCommand}{DeclareTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcbinputlisting}. + Basically, |\DeclareTCBInputListing| operates like |\DeclareDocumentCommand|. This means, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refCom{tcbinputlisting}.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new command is always created, irrespective of an already existing + command with the same name. + +\begin{dispExample} +% counter from previous example +\DeclareTCBInputListing[use counter from=pabox]{\mylisting}{ O{} O{red} m }{% + listing file={#3},title=Listing~\thetcbcounter, + colback=#2!5!white,colframe=#2!50!black,colbacktitle=#2!75!black, + fonttitle=\bfseries,listing only,#1} + +\mylisting[before upper=\textit{This is the included file content:}] + [blue]{\jobname.tcbtemp} +\end{dispExample} + \end{docCommand} + +\begin{docCommand}{NewTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBInputListing}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBInputListing}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + An existing command is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTCBInputListing}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBInputListing}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + + +\clearpage +\subsection{Producing \texttt{tboxfit} Commands}\label{subsec:xparse_tcboxfit} +\begin{marker} +The following commands need the \mylib{fitting} library to be included. +\end{marker} + +\begin{docCommand}{DeclareTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcboxfit}. + Basically, |\DeclareTCBoxFit| operates like |\DeclareDocumentCommand|. This means, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refCom{tcboxfit}.\\ + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new command is always created, irrespective of an already existing + command with the same name. + +\begin{dispExample*}{sbs,lefthand ratio=0.6} +% \usepackage{lipsum} + +\DeclareTCBoxFit{\mybox}{ O{} m !o } + {colback=red!5!white, + colframe=red!75!black, + width=#2,height=#2/3*2, + IfValueTF={#3}{height=#3}{}, + #1} + +\mybox[colback=yellow]{5cm}% + {\lipsum[2]} + +\mybox[colback=yellow]{5cm}[4cm]{\lipsum[2]} +\end{dispExample*} +\end{docCommand} + +\begin{docCommand}{NewTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBoxFit}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBoxFit}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + An existing command is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}} + Operates like \refCom{DeclareTCBoxFit}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} + +\clearpage + +\begin{docCommand}{DeclareTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Creates a new command \texttt{\textbackslash}\meta{name} based on \refCom{tcboxfit}. + In contrast to \refCom{DeclareTCBoxFit}, also the \meta{content} of the |tcboxfit| is specified.\\ + Basically, |\DeclareTotalTCBoxFit| operates like |\DeclareDocumentCommand|. This means, + the new command \texttt{\textbackslash}\meta{name} is constructed with the given argument \meta{specification}. + The \meta{options} are given to the underlying \refCom{tcboxfit} which is filled with + the specified \meta{content}.\\ + Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name} + automatically.\\ + The \meta{init options} allow setting up automatic numbering, + see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\\ + The new command is always created, irrespective of an already existing + command with the same name. + +\begin{dispExample} +% \usepackage{lipsum} + +\DeclareTotalTCBoxFit{\multibox}{ O{} m O{10} m } + {nobeforeafter,colback=red!5!white,colframe=red!75!black,width=#2,height=#2/3*2, + valign=center,#1} + { \foreach \n in {1,...,#3} { #4} } + +\multibox{5cm}{I shall not repeat.} +\multibox[colframe=blue!75!white]{5cm}[20]{I shall not repeat.}\\ +\multibox[colback=yellow,height=5cm]{14cm}[100]{I shall not repeat.} +\end{dispExample} +\end{docCommand} + +\begin{docCommand}{NewTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTCBoxFit}, but based on |\NewDocumentCommand| instead of |\DeclareDocumentCommand|. + An error is issued if \texttt{\textbackslash}\meta{name} has already been defined. +\end{docCommand} + +\begin{docCommand}{RenewTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTCBoxFit}, but based on |\RenewDocumentCommand| instead of |\DeclareDocumentCommand|. + An existing command is redefined. +\end{docCommand} + +\begin{docCommand}{ProvideTotalTCBoxFit}{\oarg{init options}\brackets{\texttt{\textbackslash}\meta{name}}\marg{specification}\marg{options}\marg{content}} + Operates like \refCom{DeclareTotalTCBoxFit}, but based on |\ProvideDocumentCommand| instead of |\DeclareDocumentCommand|. + The command \texttt{\textbackslash}\meta{name} is only created if it is not already defined. +\end{docCommand} diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.pdf b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.pdf Binary files differnew file mode 100644 index 0000000..9a6ee77 --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.pdf diff --git a/tex/.texmf/tex/latex/misc/tcolorbox.sty b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.sty index daf0c19..aa02a3c 100644 --- a/tex/.texmf/tex/latex/misc/tcolorbox.sty +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.sty @@ -1,8 +1,8 @@ -%% The LaTeX package tcolorbox - version 3.96 (2016/11/18) +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) %% tcolorbox.sty: Text color boxes %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2006-2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> +%% Copyright (c) 2006-2018 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -18,8 +18,8 @@ %% This work consists of all files listed in README %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tcolorbox}[2016/11/18 version 3.96 text color boxes] -\def\tcb@version{3.96} +\ProvidesPackage{tcolorbox}[2018/07/26 version 4.14 text color boxes] +\def\tcb@version{4.14} \RequirePackage{pgf}[2008/01/15] \RequirePackage{verbatim}[2003/08/22] @@ -157,6 +157,8 @@ \fi% } +\def\tcb@parfillskip@restore{\ifdim\parfillskip>0pt\relax\parfillskip\@flushglue\fi} + % analog to plain.tex \def\tcb@raggedright@plain{\raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax} \def\tcb@raggedleft@plain{\raggedleft\leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \hbadness=10000\relax} @@ -229,15 +231,17 @@ \def\tcb@arc@scale{0.58578644}% \let\tcb@apply@graph@patches=\tcbpatcharcangular% }, - sharpish corners/.style={arc=0pt,outer arc=0pt}, + sharpish corners/.style={arc=\z@,outer arc=\z@}, lefttitle/.store in=\kvtcb@lefttitle, leftupper/.store in=\kvtcb@leftupper, leftlower/.store in=\kvtcb@leftlower, left/.style={lefttitle=#1,leftupper=#1,leftlower=#1}, + left*/.style={left={#1-(\kvtcb@left@rule)-(\kvtcb@boxsep)-(\kvtcb@bbleft)}}, righttitle/.store in=\kvtcb@righttitle, rightupper/.store in=\kvtcb@rightupper, rightlower/.store in=\kvtcb@rightlower, right/.style={righttitle=#1,rightupper=#1,rightlower=#1}, + right*/.style={right={#1-(\kvtcb@right@rule)-(\kvtcb@boxsep)-(\kvtcb@bbright)}}, top/.store in=\kvtcb@top, toptitle/.store in=\kvtcb@toptitle, bottom/.store in=\kvtcb@bottom, @@ -263,19 +267,23 @@ float*/.default=\kvtcb@floatplacement, every float/.store in=\kvtcb@everyfloat,% nofloat/.style={float=}, + parfillskip restore/.is choice,% + parfillskip restore/.default=true,% + parfillskip restore/true/.code={\let\tcb@parfillskip@check=\tcb@parfillskip@restore},% + parfillskip restore/false/.code={\let\tcb@parfillskip@check=\@empty},% before/.code={\def\kvtcb@beforebox{#1}\let\tcb@undo@before=\@empty\let\tcb@use@autoparskip=\relax}, after/.code={\def\kvtcb@afterbox{#1}\let\tcb@use@autoparskip=\relax}, autoparskip/.code={\let\tcb@use@autoparskip=\tcb@use@auto@parskip}, parskip/.style={before={\ifnum\lastnodetype=-1\relax\else\par% \ifvmode\edef\tcb@prevdepth{\the\glueexpr\prevdepth+\lineskip+\parskip}% \def\tcb@undo@before{\addvspace{-\glueexpr\tcb@prevdepth}}% - \pagebreak[0]\fi\fi\parindent=0pt}, - after={\par}}, + \pagebreak[0]\fi\fi\parindent\z@}, + after={\tcb@parfillskip@check\par}}, noparskip/.style={before={\ifnum\lastnodetype=-1\relax\else\par% \ifvmode\edef\tcb@prevdepth{\the\glueexpr\prevdepth+\lineskip}% \def\tcb@undo@before{\addvspace{-\glueexpr\smallskipamount+\tcb@prevdepth}}% - \pagebreak[0]\smallskip\fi\fi\parindent=0pt}, - after={\par\smallskip}}, + \pagebreak[0]\smallskip\fi\fi\parindent\z@}, + after={\tcb@parfillskip@check\par\smallskip}}, nobeforeafter/.style={before=,after=}, force nobeforeafter/.code={\tcbset@late@options{nobeforeafter}}, before skip/.style={before={% @@ -287,10 +295,10 @@ \def\tcb@undo@before{\addvspace{-\glueexpr#1+\tcb@prevdepth}}% \fi% \fi% - \lineskip=0pt\noindent% + \lineskip\z@skip\noindent% }}, after skip/.style={after={% - \par\ifvmode\nointerlineskip% + \tcb@parfillskip@check\par\ifvmode\nointerlineskip% \addvspace{\glueexpr#1-\parskip}\fi% }}, beforeafter skip/.style={before skip={#1},after skip={#1}}, @@ -307,6 +315,14 @@ natural height/.code={\tcb@fixedheightfalse\tcb@@ch@@operation{\tcb@ch@natural}}, height/.code={\tcb@fixedheighttrue\tcb@dim@to\kvtcb@height@fixed{#1}\tcb@@ch@@operation{\tcb@ch@fixed}}, text height/.code={\tcb@fixedheighttrue\tcb@dim@to\kvtcb@height@fixed{#1}\tcb@@ch@@operation{\tcb@ch@innerfixed}}, + inherit height/.code={% + \ifdim\dimexpr\tcb@outer@textheight>\z@\relax% + \tcbdimto\tcb@inherited@height{#1\dimexpr\tcb@outer@textheight}% + \tcbset{height=\tcb@inherited@height}% + \else% + \tcbset{natural height}% + \fi}, + inherit height/.default=1, add to height/.code={\iftcb@fixedheight\tcbdimto\kvtcb@height@fixed{\kvtcb@height@fixed+(#1)}\fi}, add to natural height/.code={\tcb@fixedheightfalse\def\kvtcb@height@natural@plus{#1}\tcb@@ch@@operation{\tcb@ch@natural@plus}}, height plus/.dimstore in=\kvtcb@height@fixed@plus,% @@ -398,9 +414,41 @@ grow to right by/.code={% \tcbdimto\kvtcb@width{\kvtcb@width+#1}% \pgfkeysalso{enlarge right by={-\the\dimexpr#1\relax}}},% + grow sidewards by/.style={grow to left by={#1},grow to right by={#1}},% left skip/.style={grow to left by={-\dimexpr#1\relax}}, right skip/.style={grow to right by={-\dimexpr#1\relax}}, leftright skip/.style={left skip={#1},right skip={#1}}, + spread inwards/.style={grow to left by=1in+\hoffset+\oddsidemargin+\@totalleftmargin+(#1),code={\if@twoside\tcbset{toggle enlargement}\fi}}, + spread inwards/.default=\z@, + spread outwards/.style={grow to right by=\paperwidth-\textwidth-1in-\hoffset-\oddsidemargin+(#1),code={\if@twoside\tcbset{toggle enlargement}\fi}}, + spread outwards/.default=\z@, + move upwards/.style={before={\clearpage% + \lineskip\z@skip% + \hrule\@height\z@% + \nobreak% + \vskip\glueexpr-1in-\voffset-\topmargin-\headheight-\headsep-\topskip-\parskip-(#1)\relax% + \noindent}}, + move upwards/.default=\z@, + move upwards*/.style={before={% + \lineskip\z@skip% + \hrule\@height\z@% + \vskip\z@% + \bgroup\@nobreakfalse\addpenalty\z@\egroup% + \vskip\glueexpr-1in-\voffset-\topmargin-\headheight-\headsep-\parskip+\pagegoal-\textheight-\pagetotal-(#1)\relax% + \noindent}}, + move upwards*/.default=\z@, + fill downwards/.style={height fill,enlarge bottom by={\dimexpr-\paperheight+\textheight+1in+\voffset+\topmargin+\headheight+\headsep-(#1)\relax}}, + fill downwards/.default=\z@, + spread sidewards/.style={spread inwards=#1,spread outwards=#1}, + spread sidewards/.default=\z@, + spread upwards/.style={move upwards=#1,spread inwards=#1,spread outwards=#1}, + spread upwards/.default=\z@, + spread upwards*/.style={move upwards*=#1,spread inwards=#1,spread outwards=#1}, + spread upwards*/.default=\z@, + spread downwards/.style={fill downwards=#1,spread inwards=#1,spread outwards=#1}, + spread downwards/.default=\z@, + spread/.style={move upwards=#1,fill downwards=#1,spread inwards=#1,spread outwards=#1}, + spread/.default=\z@, toggle enlargement/.is choice, toggle enlargement/none/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@none}, toggle enlargement/evenpage/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@evenpage\tcbset{check odd page}}, @@ -511,22 +559,22 @@ flushright upper/.style={halign upper=flush right},% flushright lower/.style={halign lower=flush right},% tabularx*/.style 2 args={% - boxsep=0pt,top=0pt,bottom=0pt,leftupper=0pt,rightupper=0pt, + boxsep=\z@,top=\z@,bottom=\z@,leftupper=\z@,rightupper=\z@, toptitle=1mm,bottomtitle=1mm,boxrule=0.5mm, before upper={\arrayrulecolor{tcbcol@frame}\def\arraystretch{1.1}#1% \tcb@hack@currenvir\tabularx{\linewidth}{#2}}, after upper=\endtabularx\arrayrulecolor{black}}, tabularx/.style={tabularx*={}{#1}}, - tikz upper/.style={before upper=\centering\tcb@shield@externalize\begin{tikzpicture}[#1],after upper=\end{tikzpicture}},% - tikz lower/.style={before lower=\centering\tcb@shield@externalize\begin{tikzpicture}[#1],after lower=\end{tikzpicture}},% - tikznode upper/.style={before upper={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after upper={\egroup;\end{tikzpicture}}},% - tikznode lower/.style={before lower={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after lower={\egroup;\end{tikzpicture}}},% + tikz upper/.style={before upper=\centering\tcb@shield@externalize\begin{tikzpicture}[{#1}],after upper=\end{tikzpicture}},% + tikz lower/.style={before lower=\centering\tcb@shield@externalize\begin{tikzpicture}[{#1}],after lower=\end{tikzpicture}},% + tikznode upper/.style={before upper={\centering\tcb@shield@externalize\begin{tikzpicture}\node[{align=center,inner sep=\z@,outer sep=\z@,#1}]\bgroup},after upper={\egroup;\end{tikzpicture}}},% + tikznode lower/.style={before lower={\centering\tcb@shield@externalize\begin{tikzpicture}\node[{align=center,inner sep=\z@,outer sep=\z@,#1}]\bgroup},after lower={\egroup;\end{tikzpicture}}},% tikznode/.style={tikznode upper={#1},tikznode lower={#1}},% varwidth upper/.style={before upper={\tcbdimto\tcb@w@upper{#1-(\kvtcb@left@rule+\kvtcb@right@rule+(\kvtcb@boxsep)*2+\kvtcb@leftupper+\kvtcb@rightupper)}% \begin{varwidth}{\tcb@w@upper}},after upper={\end{varwidth}}},% varwidth upper/.default=\kvtcb@width, text fill/.style={before upper={% - \ifdim\dimexpr\tcbtextheight>0pt\relax% + \ifdim\dimexpr\tcbtextheight>\z@\relax% \edef\tcb@temp{\noexpand\minipage[c][\tcbtextheight]}% \else% \let\tcb@temp\minipage% @@ -537,7 +585,7 @@ width=\the\dimexpr\dimexpr\linewidth+#1+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule\relax,% enlarge left by=-\the\dimexpr\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep+(#1)/2\relax,% enlarge right by=-\the\dimexpr\kvtcb@boxsep+\kvtcb@rightupper+\kvtcb@right@rule+(#1)/2\relax},% - oversize/.default=0pt,% + oversize/.default=\z@,% flush right/.style={enlarge left by=\linewidth-(\kvtcb@width)}, flush left/.style={enlarge right by=\linewidth-(\kvtcb@width)}, center/.style={enlarge left by=(\linewidth-(\kvtcb@width))/2,enlarge right by=\kvtcb@bbleft}, @@ -545,7 +593,7 @@ tcbox raise/.style={baseline=-\the\dimexpr#1\relax},% tcbox raise base/.style={baseline=\tcb@val@raisebase},% box align/.is choice,% - box align/bottom/.style={baseline=0pt},% + box align/bottom/.style={baseline=\z@},% box align/top/.style={baseline=\tcb@height},% box align/center/.style={baseline=\tcb@height/2},% box align/base/.style={baseline=\tcb@val@raisebase},% @@ -593,6 +641,14 @@ step/.style={phantom={\refstepcounter{#1}}},% label/.style={phantom={\tcb@set@label{#1}}},% phantomlabel/.style={phantom={\ifdefined\phantomsection\phantomsection\fi\tcb@set@label{#1}}},% + hypertarget/.style={phantom={\ifdefined\hypertarget\Hy@raisedlink{\hypertarget{#1}{}}\fi}}, + bookmark*/.style 2 args={phantom={\ifdefined\bookmark% + \Hy@raisedlink{\hypertarget{tcb@\thetcolorboxnumber}{}}% + \bookmark[dest=tcb@\thetcolorboxnumber,rellevel=1,keeplevel,#1]{#2}% + \fi}}, + bookmark/.style={bookmark*={}{#1}}, + index/.style={phantom={\index{#1}}},% + index*/.style 2 args={phantom={\index[#1]{#2}}},% nameref/.code={\tcb@gettitle{#1}},% label type/.store in=\kvtcb@label@type,% no label type/.style={label type=},% @@ -655,7 +711,11 @@ \setbox\z@=\color@hbox##1\color@endbox\ifdim\wd\z@<\tcb@w@upper\relax\makebox[\tcb@w@upper][l]{\box\z@}\else\box\z@\fi}}, tcbox width/minimum right/.code={\tcb@set@embed@tcbox{% \setbox\z@=\color@hbox##1\color@endbox\ifdim\wd\z@<\tcb@w@upper\relax\makebox[\tcb@w@upper][r]{\box\z@}\else\box\z@\fi}}, - } + verbatim ignore percent/.is choice, + verbatim ignore percent/true/.code={\def\tcb@verbatim@change@percent{\catcode`\^^e=9}}, + verbatim ignore percent/false/.code={\let\tcb@verbatim@change@percent\@empty}, + verbatim ignore percent/.default=true, +} \def\kvtcb@beforebox{} \def\kvtcb@afterbox{} @@ -697,7 +757,7 @@ \def\tcb@minipage@top{\minipage[t]} \let\tcb@minipage@center=\minipage \def\tcb@minipage@bottom{\minipage[b]} -\let\tcb@minipage=\tcb@minipage@center +\let\tcb@minipage=\tcb@minipage@bottom % lrbox with integrated minipage \def\tcb@lrbox#1#2{% @@ -709,6 +769,7 @@ \def\noexpand\@currenvline{\on@line}}% \reserved@a \@endpefalse + \let\tcbbreak\par% \csname tcb@parbox@use@\kvtcb@parbox\endcsname% \tcb@minipage#2\tcb@hyph@fix\ignorespaces} \let\endtcb@lrbox=\endminipage @@ -730,7 +791,7 @@ {\edef\ftype@tcbfloat{\the\c@float@type}% \addtocounter{float@type}{\value{float@type}}}% \def\c@tcbfloat{\c@float@type}% tricking the caption package -\ifdim\parskip>0pt% +\ifdim\parskip>\z@% \tcbset{autoparskip/.style=parskip}% \else% \tcbset{autoparskip/.style=noparskip}% @@ -814,13 +875,13 @@ } \def\tcb@set@color#1{% - \letcs{\current@color}{\string\color@#1}% + \edef\current@color{\@nameuse{\string\color@#1}}% \colorlet{.}{#1}% } \def\tcb@reset@color{% \colorlet{.}{tcbcol@origin}% - \letcs{\current@color}{\string\color@tcbcol@origin}% + \edef\current@color{\@nameuse{\string\color@tcbcol@origin}}% } \def\tcb@set@@upper@and@lower{% @@ -903,7 +964,7 @@ \def\tcolorbox@label{\@newl@bel{tcolorboxpage}}% -\write\@auxout{\string\providecommand\string\tcolorbox@label[2]{}}% +%\write\@auxout{\string\providecommand\string\tcolorbox@label[2]{}}% \def\tcolorbox@savepage#1{% \@bsphack% @@ -1003,8 +1064,11 @@ \addtocounter{tcblayer}{-1}% } +\let\tcbtextheight\tcb@zpt% + \long\def\tcb@apply@box@options#1{% \let\tcb@space\tcb@zpt% + \let\tcb@outer@textheight\tcbtextheight% \let\tcbtextheight\tcb@zpt% \let\tcbtextwidth\tcb@zpt% \tcbset{#1}\tcb@lateoptions@hook\tcb@afteroptions@hook% @@ -1295,7 +1359,7 @@ } \def\tcb@boundaryframe@standard{% - \tcb@boundary@base{0pt}{0pt}% + \tcb@boundary@base{\z@}{\z@}% {\tcb@width}{\tcb@height}% {\tcb@arc@out@SW}{\tcb@arc@out@NW}{\tcb@arc@out@NE}{\tcb@arc@out@SE}% } @@ -1401,12 +1465,12 @@ } \def\tcb@setbb@toggle@none{% - \pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr0pt-\kvtcb@bbleft\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}% + \pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr\z@-\kvtcb@bbleft\relax}{\the\dimexpr\z@-\kvtcb@bbbottom\relax}}% {\pgfqpoint{\the\dimexpr\tcb@width+\kvtcb@bbright\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}% } \def\tcb@setbb@toggle@forced{% - \pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr0pt-\kvtcb@bbright\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}% + \pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr\z@-\kvtcb@bbright\relax}{\the\dimexpr\z@-\kvtcb@bbbottom\relax}}% {\pgfqpoint{\the\dimexpr\tcb@width+\kvtcb@bbleft\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}% } @@ -1429,6 +1493,8 @@ \tcb@swap{\kvtcb@lefttitle}{\kvtcb@righttitle}% \tcb@swap{\kvtcb@leftupper}{\kvtcb@rightupper}% \tcb@swap{\kvtcb@leftlower}{\kvtcb@rightlower}% + \tcb@swap{\tcb@corner@mode@NW}{\tcb@corner@mode@NE}% + \tcb@swap{\tcb@corner@mode@SW}{\tcb@corner@mode@SE}% } \def\tcb@lrtoggle@evenpage{% @@ -1440,7 +1506,7 @@ \tcb@setbb@toggle% \pgfusepath{use as bounding box}% \iftcb@hasPhantom% - \pgftext[x=0pt,y=\tcb@height-\baselineskip,left,top]{\box\tcb@phantombox}% + \pgftext[x=\z@,y=\tcb@height-\baselineskip,left,top]{\box\tcb@phantombox}% \tcb@hasPhantomfalse% \fi% \csname tcb@creategeonodes@\kvtcb@geonodes\endcsname% @@ -1503,13 +1569,13 @@ \else% \tcbdimto{\tcb@temp@wd}{\tcb@w@upper+\kvtcb@sbs@gap}% \noindent\kern\tcb@temp@wd% - \rule[-\dp\tcb@upperbox]{0pt}{\the\dimexpr\ht\tcb@upperbox+\dp\tcb@upperbox\relax}% + \rule[-\dp\tcb@upperbox]{\z@}{\the\dimexpr\ht\tcb@upperbox+\dp\tcb@upperbox\relax}% \fi% \iftcb@hasLower% \tcb@box@align{\tcb@lowerbox}% \iftcb@lowervisible\leavevmode\color{tcbcol@lower}\unhbox\tcb@lowerbox% \else% - \iftcb@lowerignored\else\rule[-\dp\tcb@lowerbox]{0pt}{\the\dimexpr\ht\tcb@lowerbox+\dp\tcb@lowerbox\relax}\fi% + \iftcb@lowerignored\else\rule[-\dp\tcb@lowerbox]{\z@}{\the\dimexpr\ht\tcb@lowerbox+\dp\tcb@lowerbox\relax}\fi% \fi% \fi% \end{tcb@savebox}% @@ -1612,9 +1678,9 @@ \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\tcb@h@upper}% \iftcb@lowerspace% \tcbdimto\tcb@natheight{\tcb@natheight+\tcb@h@segment+\tcb@h@lower}% - \def\tcb@segment@state{1}% + \def\tcbsegmentstate{1}% \else% - \def\tcb@segment@state{0}% + \def\tcbsegmentstate{0}% \fi% \tcb@ch% \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}% @@ -1713,7 +1779,7 @@ colupper=tcbtranscol@upper,fontupper=\tcb@trans@fontupper, boxsep=\tcb@trans@boxsep,left=\tcb@trans@left,right=\tcb@trans@right, top=\tcb@trans@top,bottom=\tcb@trans@bottom, - boxrule=\tcb@trans@rule,leftrule=0pt,rightrule=0pt,oversize, + boxrule=\tcb@trans@rule,leftrule=\z@,rightrule=\z@,oversize, code={\pgfkeysalsofrom\tcb@trans@style},#1]% #2% \end{tcolorbox}% @@ -1918,6 +1984,9 @@ \newcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand{\tcblistof}[3][\section]{% + \ifnum\c@tocdepth<1\relax% + \tcb@warning{'tocdepth' value lower than 1 for 'tcblistof'}% + \fi% #1{#3}% \@starttoc{#2}% } @@ -1930,13 +1999,14 @@ \let\tcb@verbatim@begin@hook\@empty \let\tcb@verbatim@end@hook\@empty +\let\tcb@verbatim@change@percent\@empty \def\tcbverbatimwrite#1{% \@bsphack \immediate\openout\tcb@out #1 \tcb@verbatim@begin@hook% \let\do\@makeother\dospecials - \catcode`\^^M\active \catcode`\^^I=12 + \tcb@verbatim@change@percent\catcode`\^^M\active \catcode`\^^I=12 \def\verbatim@processline{% \immediate\write\tcb@out {\the\verbatim@line}}% @@ -2039,7 +2109,7 @@ \let\tcb@lateoptions@hook\@empty}, width=\linewidth,autoparskip,arc is curved, natural height,height plus=0pt,space to lower,valign=top,valign lower=top, - size=normal,rounded corners, + size=normal,rounded corners,parfillskip restore, enlarge top by=0mm,enlarge bottom by=0mm,enlarge left by=0mm,enlarge right by=0mm, toggle enlargement=none,toggle left and right=none, baseline=0pt,adjust text={\"Apgjy},upperbox=visible,lowerbox=visible,lower separated, @@ -2121,10 +2191,11 @@ \tcb@add@library{xparse}{tcbxparse.code.tex} \tcb@add@library{external}{tcbexternal.code.tex} \tcb@add@library{vignette}{tcbvignette.code.tex} +\tcb@add@library{poster}{tcbposter.code.tex} \tcb@add@library@style{many}{raster,skins,breakable,hooks,theorems,fitting,xparse} -\tcb@add@library@style{most}{many,listingsutf8,external,magazine,vignette} -\tcb@add@library@style{all}{many,minted,listingsutf8,external,magazine,vignette,documentation} +\tcb@add@library@style{most}{many,listingsutf8,external,magazine,vignette,poster} +\tcb@add@library@style{all}{many,minted,listingsutf8,external,magazine,vignette,poster,documentation} \ProcessOptions* \begingroup\edef\x{\endgroup\noexpand\tcbuselibrary{\tcb@optionlist}}\x diff --git a/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.tex b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.tex new file mode 100644 index 0000000..4a9894e --- /dev/null +++ b/tex/.texmf/tex/latex/misc/tcolorbox/tcolorbox.tex @@ -0,0 +1,94 @@ +% \LaTeX-Main\ +%% The LaTeX package tcolorbox - version 4.14 (2018/07/26) +%% tcolorbox.tex: Manual +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2006-2018 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 +%% +% arara: pdflatex: { shell: yes } +% arara: biber +% arara: pdflatex: { shell: yes } +% arara: pdflatex: { shell: yes } +% arara: pdflatex: { shell: yes, synctex: yes } +% arara: pdflatex: { shell: yes, synctex: yes } +% +\documentclass[a4paper,11pt]{ltxdoc} + +\usepackage{tcolorbox.doc.s_main} +\tcbEXTERNALIZE +\usepackage{tcolorbox.doc.s_snippet} +%\tcbset{external/PassOptionsToPackage={cache=false}{minted}} +\ShellEscape{mkdir external} +\ShellEscape{mkdir solutions} + +\RequirePackage{csquotes} +\RequirePackage[style=numeric-comp,sorting=nyt, + maxnames=8,minnames=8,abbreviate=false,backend=biber, + bibencoding=latin1,texencoding=ascii]{biblatex} +\DeclareFieldFormat{url}{\newline\url{#1}}% +\DeclareListFormat{language}{}% +\setlength{\bibitemsep}{\smallskipamount} +\addbibresource{tcolorbox.doc.bib} + +\def\version{4.14}% +\def\datum{2018/07/26}% +\makeindex + +\hypersetup{ + pdftitle={Manual for the tcolorbox package}, + pdfauthor={Thomas F. Sturm}, + pdfsubject={colored boxes}, + pdfkeywords={colored boxes, LaTeX examples, theorems} +} + +\usepackage{pgfplots} + +%\tcbset{draftmode} +\tcbset{/tcb/external/-}% for final run +%\includeonly{tcolorbox.doc.listings} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} +\include{tcolorbox.doc.abstract} +\include{tcolorbox.doc.intro} +\include{tcolorbox.doc.quickref} +\include{tcolorbox.doc.coremacros} +\include{tcolorbox.doc.coreoptions} +\include{tcolorbox.doc.initoptions} +\include{tcolorbox.doc.sidebyside} +\include{tcolorbox.doc.verbatim} +\include{tcolorbox.doc.recording} +\include{tcolorbox.doc.technical} +\include{tcolorbox.doc.skins} +\include{tcolorbox.doc.graphics} +\include{tcolorbox.doc.filling} +\include{tcolorbox.doc.vignette} +\include{tcolorbox.doc.raster} +\include{tcolorbox.doc.listings} +\include{tcolorbox.doc.theorems} +\include{tcolorbox.doc.breakable} +\include{tcolorbox.doc.magazine} +\include{tcolorbox.doc.poster} +\include{tcolorbox.doc.fitting} +\include{tcolorbox.doc.hooks} +\include{tcolorbox.doc.xparse} +\include{tcolorbox.doc.external} +\include{tcolorbox.doc.documentation} +\appendix +\include{tcolorbox.doc.picturecredits} +\include{tcolorbox.doc.references} +\include{tcolorbox.doc.index} +\end{document} |