texlive[64387] Master/texmf-dist: beamertheme-tcolorbox (14sep22)

commits+karl at tug.org commits+karl at tug.org
Wed Sep 14 22:03:13 CEST 2022


Revision: 64387
          http://tug.org/svn/texlive?view=revision&revision=64387
Author:   karl
Date:     2022-09-14 22:03:12 +0200 (Wed, 14 Sep 2022)
Log Message:
-----------
beamertheme-tcolorbox (14sep22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/README.md
    trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.pdf
    trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex
    trunk/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/README.md	2022-09-14 20:02:59 UTC (rev 64386)
+++ trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/README.md	2022-09-14 20:03:12 UTC (rev 64387)
@@ -2,7 +2,7 @@
 
 A beamer inner theme which reproduces standard beamer blocks using tcolorboxes
 
-Current version: 2022/09/06 version v0.4
+Current version: 2022/09/14 version v0.5
 
 This project is licensed under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
 

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex	2022-09-14 20:02:59 UTC (rev 64386)
+++ trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex	2022-09-14 20:03:12 UTC (rev 64387)
@@ -68,6 +68,15 @@
 
 \lstset{style=tcolorboxstyle}
 
+%\makeatletter
+\newcommand{\prefix}{./build}
+\tcbset{
+  compilable listing/.style={listing file={\prefix/\jobname-listing-\thetcblistingcount.tex}},
+  run pdflatex/.style={run at system@command={cd\space \prefix;\space pdflatex}{\jobname-listing-\thetcblistingcount.tex}},%
+}
+%\makeatother
+
+
 % meta %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \title{The tcolorbox beamer inner theme}
 \subtitle{A beamer inner theme to reproduce standard beamer blocks using tcolorboxes}
@@ -77,7 +86,7 @@
 		\url{https://github.com/samcarter/beamertheme-tcolorbox}\\
 		\url{https://www.ctan.org/pkg/beamertheme-tcolorbox}
 	}{samcarter}}
-\date{Version v0.4 \textendash{} 2022/09/06}
+\date{Version v0.5 \textendash{} 2022/09/14}
 
 \begin{document}
 \maketitle
@@ -89,9 +98,7 @@
 
 For all these cases, there is now an alternative to the default beamer blocks: The tcolorbox inner beamer theme will replace the usual beamer mechanism to draw blocks with tcolorboxes. The tcolorboxes will automatically adopt the look and feel (round vs.\ sharp corners and shadows) as well as the colours of the normal beamer blocks.
 
-The package is included in \TeX{}Live 
-%and MiK\TeX\ 
-and available from \textsc{CTAN} (\url{https://www.ctan.org/pkg/beamertheme-tcolorbox}). 
+The package is included in \TeX{}Live and MiK\TeX\ and available from \textsc{CTAN} (\url{https://www.ctan.org/pkg/beamertheme-tcolorbox}). 
 The development version of this package is located at \url{https://github.com/samcarter/beamertheme-tcolorbox}. If you have any problems, ideas or other feedback, please make constructive use of the issue tracker.
 
 Copyright \raisebox{0.2em}{\tiny\fontfamily{cmr}\selectfont\textcopyright} \texttt{samcarter}. Permission is granted to copy, distribute and\slash or modify this software under the terms of the LaTeX project public licence, version 1.3c or later \url{http://www.latex-project.org/lppl.txt}.
@@ -137,28 +144,19 @@
 
 \section{Options}
 
-In addition to automatically adopting settings from the other themes, one can also influence the look and feel via these options:
+In addition to automatically adopting settings from other themes, one can also explicitly influence the look and feel via these options:
 \begin{description}
-\item[inmargin] controls if the block titles are placed in the left sidebar instead of the top of the block, e.g. for themes like \lstinline|Bergen| (default: \lstinline|false|)
-\item[rounded] controls if corners are rounded or sharp (default: \lstinline|false|)
-\item[shadow] controls if the block has a shadow (default: \lstinline|false|)
-\item[shaded] controls if there is a short colour gradient between the title and the body or if there is a sharp border between the colours (Default: \lstinline|false|; if rounded corners are activated, it is \lstinline|true|)
+\item[blocks] controls if tcolorboxes should be used for beamer blocks (default: \lstinline|true|)
+\item[inmargin] controls if the block titles are placed in the left sidebar instead of the top of the block, e.g. for themes like \lstinline|Bergen| (default: \lstinline|false|, but set to \lstinline|true| if the \lstinline|inmargin| inner theme is detected)
+\item[rounded] controls if corners are rounded or sharp (default: \lstinline|false|, but set to \lstinline|true| if the \lstinline|rounded| inner theme is detected)
+\item[shaded] controls if there is a short colour gradient between the title and the body (default: \lstinline|false|, but set to \lstinline|true| if the block corners are rounded)
+\item[shadow] controls if the block has a shadow (default: \lstinline|false|, but set to \lstinline|true| if the \lstinline|shadow| outer theme is detected)
+\item[showtitle] controls if a small coloured stripe is shown for blocks with empty title (default: \lstinline|true|, but set to \lstinline|false| if the block has rounded corners)
+\item[titlepage] controls if tcolorboxes should be used for the title page, section page etc. (default: \lstinline|true|)
 \end{description}
 These options can be set to \lstinline|true| or \lstinline|false| (calling either option without explicit \lstinline|true| or \lstinline|false| will set it to \lstinline|true|).
 
-\begin{tcolorbox}[title={}]
-\begin{lstlisting}
-\useinnertheme[
-  rounded,
-  shadow=false,
-  shaded,
-  inmargin=false
-]{tcolorbox}
-\end{lstlisting}
-\end{tcolorbox}
-
-If one for example likes the Antibes theme, but prefers the blocks to have shadows, they can now easily be added:
-
+If one for example likes the Antibes theme, but prefers the blocks to have shadows, they can now easily be added: \nopagebreak
 \begin{tcblisting}{
   listing and comment,
   pdf comment,
@@ -217,10 +215,4 @@
 \end{document}
 \end{tcblisting}
 
-\section{Caveats and known issues}
-
-\begin{itemize}
-\item at the moment, this theme only applies to blocks. Things like the title page, which directly use beamercolorboxes, won't be replaced by tcolorboxes
-\end{itemize}
-
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty	2022-09-14 20:02:59 UTC (rev 64386)
+++ trunk/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty	2022-09-14 20:03:12 UTC (rev 64387)
@@ -12,40 +12,76 @@
 % See http://www.latex-project.org/lppl.txt
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{beamerinnerthemetcolorbox}[2022/09/06 version v0.4 Beamer blocks with tcolorboxes]
+\ProvidesPackage{beamerinnerthemetcolorbox}[2022/09/14 version v0.5 Beamer blocks with tcolorboxes]
 
 \RequirePackage{tcolorbox}
 \tcbuselibrary{skins,hooks}
 
+\providecommand\@secondofthree[3]{#2}
+
 \tcbset{
-  beamer at tcb@iftitle/.code n args={1}{
-    \ifbeamer at tcb@title
-      \pgfkeysalso{#1}
-    \fi
+  beamer at tcb@if/.code n args = {3}{%  
+    \csname #1\endcsname\expandafter\@secondofthree\fi  
+    \@secondoftwo{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
   }
 }
+\newif\ifbeamer at tcb@rounded
+\newif\ifbeamer at tcb@shadow
+\newif\ifbeamer at tcb@shaded
+\newif\ifbeamer at tcb@showtitle
+\newif\ifbeamer at tcb@inmargin
+\newif\ifbeamer at tcb@color
+\newif\ifbeamer at tcb@left
+\newif\ifbeamer at tcb@right
+\newif\ifbeamer at tcb@center
+\newif\ifbeamer at tcb@titlepage
+\newif\ifbeamer at tcb@blocks
+\beamer at tcb@colortrue
+\def\beamer at tcb@true{true}
 
+\tikzset{
+  /beamer at tcb/.cd,
+  wd/.store in = \beamer at tcb@wd,
+  wd = \textwidth,
+  dp/.code = \relax,
+  ht/.code = \relax,
+  left/.code = \beamer at tcb@lefttrue,
+  right/.code = \beamet at tcb@righttrue,
+  center/.code = \beamer at tcb@centertrue,
+  leftskip/.store in = \beamer at tcb@leftskip,
+  leftskip = 0.05cm,
+  rightskip/.store in = \beamer at tcb@rightskip,
+  rightskip = 0.05cm,
+  sep/.store in = \beamer at tcb@sep,
+  sep = 1mm,
+  colsep/.code = \relax,
+  colsep*/.code = \relax,
+  shadow/.code = \relax,
+  rounded/.code = \relax,
+  ignorebg/.code = \relax,
+  vmode/.code = \relax,
+}
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 % Theme Options
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newif\ifbeamer at tcb@rounded
-\newif\ifbeamer at tcb@shadow
-\newif\ifbeamer at tcb@shaded
-\newif\ifbeamer at tcb@title
-\newif\ifbeamer at tcb@inmargin
-\def\beamer at tcb@true{true}
-
 \DeclareOptionBeamer{shadow}[true]{\csname beamer at tcb@shadow#1\endcsname}
-\DeclareOptionBeamer{rounded}[true]{\csname beamer at tcb@rounded#1\endcsname\csname beamer at tcb@shaded#1\endcsname}
+\DeclareOptionBeamer{rounded}[true]{\csname beamer at tcb@rounded#1\endcsname\csname beamer at tcb@shaded#1\endcsname\csname beamer at tcb@showtitlefalse\endcsname}
 \DeclareOptionBeamer{shaded}[true]{\csname beamer at tcb@shaded#1\endcsname}
 \DeclareOptionBeamer{inmargin}[true]{\csname beamer at tcb@inmargin#1\endcsname}
+\DeclareOptionBeamer{showtitle}[true]{\csname beamer at tcb@showtitle#1\endcsname}
+\DeclareOptionBeamer{titlepage}[true]{\csname beamer at tcb@titlepage#1\endcsname}
+\DeclareOptionBeamer{blocks}[true]{\csname beamer at tcb@blocks#1\endcsname}
 
 \ExecuteOptionsBeamer{shadow=false}
 \ExecuteOptionsBeamer{rounded=false}
 \ExecuteOptionsBeamer{shaded=false}
 \ExecuteOptionsBeamer{inmargin=false}
+\ExecuteOptionsBeamer{showtitle=true}
+\ExecuteOptionsBeamer{titlepage=true}
+\ExecuteOptionsBeamer{blocks=true}
 
 % check options from other themes
 \ifdefined\beamer at themerounded@shadow
@@ -54,6 +90,7 @@
   \ifx\beamer at themerounded@shadow\beamer at tcb@true
     \beamer at tcb@shadowtrue
   \fi
+  \beamer at tcb@showtitlefalse
 \fi
 
 \ifdefined\beamer at putleft
@@ -112,7 +149,6 @@
   }
 \else
   \tcbsetforeverylayer{sharpish corners}
-  \beamer at tcb@titletrue
 \fi
 
 \ifbeamer at tcb@shaded
@@ -143,58 +179,63 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \mode<presentation>
 
-% normal block
-\setbeamertemplate{block begin}{%
-  \beamer at tcb@colini
-  \ifx\insertblocktitle\@empty\else
-    \beamer at tcb@titletrue
-  \fi
-  \begin{tcolorbox}[
-    colback=beamer at tcb@bodybg,
-    colbacktitle=beamer at tcb@titlebg,
-    coltext=beamer at tcb@bodyfg,
-    coltitle=beamer at tcb@titlefg,
-    before title={\usebeamerfont{block title}},
-    before upper={\usebeamercolor{block body}\usebeamerfont{block body}},
-    beamer at tcb@iftitle={title={\insertblocktitle}}
-  ]
-} 
-\setbeamertemplate{block end}{\end{tcolorbox}}
+\newtcolorbox{beamer at tcb@block}[1][]{
+  code={
+    \beamer at tcb@colini[#1]
+    \ifx\insertblocktitle\@empty\else
+      \beamer at tcb@showtitletrue
+    \fi
+  },
+  colback=beamer at tcb@bodybg,
+  colbacktitle=beamer at tcb@titlebg,
+  coltext=beamer at tcb@bodyfg,
+  coltitle=beamer at tcb@titlefg,
+  before title={\usebeamerfont{block title}},
+  before upper={\usebeamercolor{block body}\usebeamerfont{block body}},
+  beamer at tcb@if={ifbeamer at tcb@showtitle}{title={\insertblocktitle}}{},
+}
 
-% alert block
-\setbeamertemplate{block alerted begin}{%
-  \beamer at tcb@colini[ alerted]
-  \ifx\insertblocktitle\@empty\else
-    \beamer at tcb@titletrue
-  \fi
-  \begin{tcolorbox}[
-    colback=beamer at tcb@bodybg,
-    colbacktitle=beamer at tcb@titlebg,
-    coltext=beamer at tcb@bodyfg,
-    coltitle=beamer at tcb@titlefg,
-    before title={\usebeamerfont{block title alerted}},
-    before upper={\usebeamercolor{block body alerted}\usebeamerfont{block body alerted}},    
-    beamer at tcb@iftitle={title={\insertblocktitle}}
-  ]
-} 
-\setbeamertemplate{block alerted end}{\end{tcolorbox}}
+\ifbeamer at tcb@blocks
+  \setbeamertemplate{block begin}{\begin{beamer at tcb@block}} 
+  \setbeamertemplate{block end}{\end{beamer at tcb@block}}
+  \setbeamertemplate{block alerted begin}{\begin{beamer at tcb@block}[ alerted]} 
+  \setbeamertemplate{block alerted end}{\end{beamer at tcb@block}}
+  \setbeamertemplate{block example begin}{\begin{beamer at tcb@block}[ example]} 
+  \setbeamertemplate{block example end}{\end{beamer at tcb@block}}
+\fi
 
-% example block
-\setbeamertemplate{block example begin}{%
-  \beamer at tcb@colini[ example]
-  \ifx\insertblocktitle\@empty\else
-    \beamer at tcb@titletrue
-  \fi
-  \begin{tcolorbox}[
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% patch title page etc.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcommand{\beamer at tcb@patchcolorbox}{%
+  \renewtcolorbox{beamercolorbox}[2][]{%
+    code={%
+      \usebeamercolor{##2}% 
+      \colorlet{beamer at tcb@bodybg}{##2.bg}%
+      \colorlet{beamer at tcb@bodyfg}{##2.fg}%
+      \ifbeamercolorempty[bg]{##2}{}{\beamer at tcb@colorfalse}%
+      \tikzset{/beamer at tcb/.cd,##1}%      
+    },
     colback=beamer at tcb@bodybg,
-    colbacktitle=beamer at tcb@titlebg,
     coltext=beamer at tcb@bodyfg,
-    coltitle=beamer at tcb@titlefg,
-    before title={\usebeamerfont{block title example}},
-    before upper={\usebeamercolor{block body example}\usebeamerfont{block body example}},      
-    beamer at tcb@iftitle={title={\insertblocktitle}}
-  ]
-} 
-\setbeamertemplate{block example end}{\end{tcolorbox}}
+    beamer at tcb@if={ifbeamer at tcb@color}{no shadow}{boxsep=\beamer at tcb@sep},
+    width=\beamer at tcb@wd,
+    beamer at tcb@if={ifbeamer at tcb@center}{halign=center}{},
+    beamer at tcb@if={ifbeamer at tcb@left}{halign=left}{},   
+    beamer at tcb@if={ifbeamer at tcb@right}{halign=right}{},    
+    left=\beamer at tcb@leftskip,
+    right=\beamer at tcb@rightskip,  
+  }%
+}
 
+\ifbeamer at tcb@titlepage
+  \addtobeamertemplate{title page}{\begingroup\beamer at tcb@patchcolorbox}{\endgroup}
+  \addtobeamertemplate{part page}{\begingroup\beamer at tcb@patchcolorbox}{\endgroup}
+  \addtobeamertemplate{section page}{\begingroup\beamer at tcb@patchcolorbox}{\endgroup}
+  \addtobeamertemplate{subsection page}{\begingroup\beamer at tcb@patchcolorbox}{\endgroup}
+\fi
+
 \mode<all>



More information about the tex-live-commits mailing list.