diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex | 68 |
1 files changed, 43 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex index 1afd53b3596..ac7c378897b 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.skins.tex @@ -514,12 +514,21 @@ are \emph{not} automatically computed. \end{marker} \begin{marker} - A \tikzname\ node |title| is produced by a boxed title. This node is accessible - insided underlays, overlays and finishes, but \emph{not} inside - \refKey{/tcb/frame code} or \refKey{/tcb/interior code}. + 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}{boxed title style}{=\meta{options}}{style, initially empty} By default, a boxed title is dimensioned with \refKey{/tcb/size}|=|\docValue*{title} and inherits \refKey{/tcb/colframe} of the main box. @@ -540,7 +549,7 @@ applicable here. \end{tcolorbox} \end{dispExample*} -\enlargethispage*{2cm} + \begin{dispExample*}{sbs,lefthand ratio=0.66} \begin{tcolorbox}[enhanced,title=My title, colframe=red!50!black,colback=red!10!white, @@ -563,8 +572,8 @@ applicable here. fonttitle=\bfseries,coltitle=black,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 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) @@ -577,17 +586,17 @@ applicable here. \begin{dispExample} % \usepackage{varwidth} -\newtcolorbox{mybox}[2][]{enhanced,skin=enhancedlast, +\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={arc=0pt,outer arc=0pt,boxrule=0pt}, - underlay unbroken and first={ - \fill[blue!45!white] ([xshift=-0.1mm]title.north east) -- (title.north east) + 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) - -- ([xshift=-0.1mm]title.south east) -- cycle; + -- (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) @@ -623,25 +632,24 @@ applicable here. \begin{dispExample} % \usepackage{varwidth} -\newtcolorbox{mybox}[2][]{empty,boxsep=0pt,top=0pt, - attach boxed title to bottom center={}, - fonttitle=\bfseries\sffamily,varwidth boxed title=0.5\linewidth, - coltitle=red!50!black, - interior style={top color=yellow!10!white,bottom color=green!10!white}, - boxed title style={enhanced,skin=enhancedlast,boxrule=0.5mm,arc=0pt,outer arc=0pt, - frame empty,interior style={top color=white,bottom color=red!50!white}}, - underlay unbroken and last={ - \draw[red,line width=0.5mm] ([xshift=.25mm]frame.north west) - -- ([xshift=.25mm,yshift=0.25mm]frame.south west) - -- ([xshift=0.25mm-\tcboxedtitleheight*2,yshift=0.25mm]title.north west) +\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) - -- ([xshift=-.25mm,yshift=0.25mm]frame.south east) - -- ([xshift=-.25mm]frame.north east); }, + sin +(\tcboxedtitleheight,\tcboxedtitleheight/2); }, title={#2},#1} \begin{mybox}{My title} @@ -2002,6 +2010,16 @@ The differences between underlays and overlays are: 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 |