diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty | 57 |
1 files changed, 34 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty b/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty index 3d5aaf5e93e..751c2754b42 100644 --- a/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty +++ b/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty @@ -12,7 +12,7 @@ % See http://www.latex-project.org/lppl.txt % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ProvidesPackage{beamerinnerthemetcolorbox}[2022/08/27 version v0.2 Beamer blocks with tcolorboxes] +\ProvidesPackage{beamerinnerthemetcolorbox}[2022/08/29 version v0.3 Beamer blocks with tcolorboxes] \RequirePackage{tcolorbox} \tcbuselibrary{skins,hooks} @@ -24,17 +24,21 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newif\ifbeamer@tcb@rounded \newif\ifbeamer@tcb@shadow +\newif\ifbeamer@tcb@shaded \def\beamer@tcb@true{true} \DeclareOptionBeamer{shadow}[true]{\csname beamer@tcb@shadow#1\endcsname} -\DeclareOptionBeamer{rounded}[true]{\csname beamer@tcb@rounded#1\endcsname} +\DeclareOptionBeamer{rounded}[true]{\csname beamer@tcb@rounded#1\endcsname\csname beamer@tcb@shaded#1\endcsname} +\DeclareOptionBeamer{shaded}[true]{\csname beamer@tcb@shaded#1\endcsname} \ExecuteOptionsBeamer{shadow=false} \ExecuteOptionsBeamer{rounded=false} +\ExecuteOptionsBeamer{shaded=false} % check options from other themes \ifdefined\beamer@themerounded@shadow \beamer@tcb@roundedtrue + \beamer@tcb@shadedtrue \ifx\beamer@themerounded@shadow\beamer@tcb@true \beamer@tcb@shadowtrue \fi @@ -49,14 +53,13 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\beamer@tcb@colini}[1][]{ - \usebeamercolor[bg]{block body#1} + \usebeamercolor{block body#1} \colorlet{beamer@tcb@bodybg}{block body#1.bg} - \usebeamercolor[fg]{block body#1} \colorlet{beamer@tcb@bodyfg}{block body#1.fg} - \usebeamercolor[bg]{block title#1} + \usebeamercolor{block title#1} \colorlet{beamer@tcb@titlebg}{block title#1.bg} - \usebeamercolor[fg]{block title#1} - \colorlet{beamer@tcb@titlefg}{block title#1.fg} + \colorlet{beamer@tcb@titlefg}{block title#1.fg} + \usebeamercolor{normal text} } \beamer@tcb@colini @@ -66,7 +69,10 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \tcbset{ - oversize=0mm, + oversize=0mm +} + +\tcbsetforeverylayer{ left=0.05cm, right=0.05cm, enhanced, @@ -82,21 +88,26 @@ % optional settings \ifbeamer@tcb@rounded - \tcbset{ + \tcbsetforeverylayer{ arc=1.3mm, top=0.8mm, toptitle=0.2mm, bottom=0mm, + } +\else + \tcbsetforeverylayer{sharpish corners} +\fi + +\ifbeamer@tcb@shaded + \tcbsetforeverylayer{ title code app={ \shade[top color=beamer@tcb@titlebg,bottom color=beamer@tcb@bodybg] (title.south west) rectangle ([yshift=-0.5mm]title.south east); - } + } } -\else - \tcbset{sharpish corners} \fi \ifbeamer@tcb@shadow - \tcbset{drop fuzzy shadow=black!90} + \tcbsetforeverylayer{drop fuzzy shadow=black!90} \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -110,10 +121,10 @@ \setbeamertemplate{block begin}{% \beamer@tcb@colini \unless\ifbeamer@tcb@rounded - \tcbset{title={\insertblocktitle}} + \tcbsetforeverylayer{title={\insertblocktitle}} \fi \ifx\insertblocktitle\@empty\else - \tcbset{title={\insertblocktitle}} + \tcbsetforeverylayer{title={\insertblocktitle}} \fi \begin{tcolorbox}[ colback=beamer@tcb@bodybg, @@ -121,7 +132,7 @@ coltext=beamer@tcb@bodyfg, coltitle=beamer@tcb@titlefg, before title={\usebeamerfont{block title}}, - before upper={\usebeamerfont{block body}}, + before upper={\usebeamercolor{block body}\usebeamerfont{block body}}, ] } \setbeamertemplate{block end}{\end{tcolorbox}} @@ -130,10 +141,10 @@ \setbeamertemplate{block alerted begin}{% \beamer@tcb@colini[ alerted] \unless\ifbeamer@tcb@rounded - \tcbset{title={\insertblocktitle}} + \tcbsetforeverylayer{title={\insertblocktitle}} \fi \ifx\insertblocktitle\@empty\else - \tcbset{title={\insertblocktitle}} + \tcbsetforeverylayer{title={\insertblocktitle}} \fi \begin{tcolorbox}[ colback=beamer@tcb@bodybg, @@ -141,19 +152,19 @@ coltext=beamer@tcb@bodyfg, coltitle=beamer@tcb@titlefg, before title={\usebeamerfont{block title alerted}}, - before upper={\usebeamerfont{block body alerted}}, + before upper={\usebeamercolor{block body alerted}\usebeamerfont{block body alerted}}, ] } \setbeamertemplate{block alerted end}{\end{tcolorbox}} % example block \setbeamertemplate{block example begin}{% -\beamer@tcb@colini[ example] + \beamer@tcb@colini[ example] \unless\ifbeamer@tcb@rounded - \tcbset{title={\insertblocktitle}} + \tcbsetforeverylayer{title={\insertblocktitle}} \fi \ifx\insertblocktitle\@empty\else - \tcbset{title={\insertblocktitle}} + \tcbsetforeverylayer{title={\insertblocktitle}} \fi \begin{tcolorbox}[ colback=beamer@tcb@bodybg, @@ -161,7 +172,7 @@ coltext=beamer@tcb@bodyfg, coltitle=beamer@tcb@titlefg, before title={\usebeamerfont{block title example}}, - before upper={\usebeamerfont{block body example}}, + before upper={\usebeamercolor{block body example}\usebeamerfont{block body example}}, ] } \setbeamertemplate{block example end}{\end{tcolorbox}} |