texlive[64305] Master/texmf-dist: beamertheme-tcolorbox (6sep22)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 6 21:40:08 CEST 2022


Revision: 64305
          http://tug.org/svn/texlive?view=revision&revision=64305
Author:   karl
Date:     2022-09-06 21:40:08 +0200 (Tue, 06 Sep 2022)
Log Message:
-----------
beamertheme-tcolorbox (6sep22)

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-05 23:49:36 UTC (rev 64304)
+++ trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/README.md	2022-09-06 19:40:08 UTC (rev 64305)
@@ -2,7 +2,7 @@
 
 A beamer inner theme which reproduces standard beamer blocks using tcolorboxes
 
-Current version: 2022/08/29 version v0.3
+Current version: 2022/09/06 version v0.4
 
 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-05 23:49:36 UTC (rev 64304)
+++ trunk/Master/texmf-dist/doc/latex/beamertheme-tcolorbox/beamertheme-tcolorbox-doc.tex	2022-09-06 19:40:08 UTC (rev 64305)
@@ -1,4 +1,3 @@
-% !TeX document-id = {ba2bf522-7c7a-4e0b-b68d-dc54a96e4f4a}
 % !TeX TS-program = latexmk -time -pdf -pdflatex="pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %%O %%S" %   | txs:///view-log | txs:///view-pdf 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -78,7 +77,7 @@
 		\url{https://github.com/samcarter/beamertheme-tcolorbox}\\
 		\url{https://www.ctan.org/pkg/beamertheme-tcolorbox}
 	}{samcarter}}
-\date{Version v0.3 \textendash{} 2022/08/29}
+\date{Version v0.4 \textendash{} 2022/09/06}
 
 \begin{document}
 \maketitle
@@ -140,6 +139,7 @@
 
 In addition to automatically adopting settings from the other themes, one can also 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|)
@@ -149,9 +149,10 @@
 \begin{tcolorbox}[title={}]
 \begin{lstlisting}
 \useinnertheme[
-  rounded
+  rounded,
   shadow=false,
-  shaded
+  shaded,
+  inmargin=false
 ]{tcolorbox}
 \end{lstlisting}
 \end{tcolorbox}
@@ -219,7 +220,6 @@
 \section{Caveats and known issues}
 
 \begin{itemize}
-\item the tcolorbox inner theme is not yet optimised for the \lstinline|inmargin| inner  theme, which is e.g.\ used by the Bergen theme
 \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}
 

Modified: trunk/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty	2022-09-05 23:49:36 UTC (rev 64304)
+++ trunk/Master/texmf-dist/tex/latex/beamertheme-tcolorbox/beamerinnerthemetcolorbox.sty	2022-09-06 19:40:08 UTC (rev 64305)
@@ -12,11 +12,19 @@
 % See http://www.latex-project.org/lppl.txt
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{beamerinnerthemetcolorbox}[2022/08/29 version v0.3 Beamer blocks with tcolorboxes]
+\ProvidesPackage{beamerinnerthemetcolorbox}[2022/09/06 version v0.4 Beamer blocks with tcolorboxes]
 
 \RequirePackage{tcolorbox}
 \tcbuselibrary{skins,hooks}
 
+\tcbset{
+  beamer at tcb@iftitle/.code n args={1}{
+    \ifbeamer at tcb@title
+      \pgfkeysalso{#1}
+    \fi
+  }
+}
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 % Theme Options
@@ -25,15 +33,19 @@
 \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{shaded}[true]{\csname beamer at tcb@shaded#1\endcsname}
+\DeclareOptionBeamer{inmargin}[true]{\csname beamer at tcb@inmargin#1\endcsname}
 
 \ExecuteOptionsBeamer{shadow=false}
 \ExecuteOptionsBeamer{rounded=false}
 \ExecuteOptionsBeamer{shaded=false}
+\ExecuteOptionsBeamer{inmargin=false}
 
 % check options from other themes
 \ifdefined\beamer at themerounded@shadow
@@ -44,6 +56,10 @@
   \fi
 \fi
 
+\ifdefined\beamer at putleft
+  \beamer at tcb@inmargintrue
+\fi
+
 \ProcessOptionsBeamer
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -96,6 +112,7 @@
   }
 \else
   \tcbsetforeverylayer{sharpish corners}
+  \beamer at tcb@titletrue
 \fi
 
 \ifbeamer at tcb@shaded
@@ -110,6 +127,15 @@
   \tcbsetforeverylayer{drop fuzzy shadow=black!90}
 \fi
 
+\ifbeamer at tcb@inmargin
+  \tcbsetforeverylayer{
+    detach title, 
+    overlay={
+      \node[anchor=north east,align=right,text width=\dimexpr\beamer at leftsidebar-\beamer at leftmargin-\beamer at rightmargin\relax] at ([xshift=-\beamer at leftmargin]frame.north west) {\tcbtitle};
+    }
+  }
+\fi
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 % Defining blocks
@@ -120,11 +146,8 @@
 % normal block
 \setbeamertemplate{block begin}{%
   \beamer at tcb@colini
-  \unless\ifbeamer at tcb@rounded
-    \tcbsetforeverylayer{title={\insertblocktitle}}
-  \fi
   \ifx\insertblocktitle\@empty\else
-    \tcbsetforeverylayer{title={\insertblocktitle}}
+    \beamer at tcb@titletrue
   \fi
   \begin{tcolorbox}[
     colback=beamer at tcb@bodybg,
@@ -132,7 +155,8 @@
     coltext=beamer at tcb@bodyfg,
     coltitle=beamer at tcb@titlefg,
     before title={\usebeamerfont{block title}},
-    before upper={\usebeamercolor{block body}\usebeamerfont{block body}},        
+    before upper={\usebeamercolor{block body}\usebeamerfont{block body}},
+    beamer at tcb@iftitle={title={\insertblocktitle}}
   ]
 } 
 \setbeamertemplate{block end}{\end{tcolorbox}}
@@ -140,11 +164,8 @@
 % alert block
 \setbeamertemplate{block alerted begin}{%
   \beamer at tcb@colini[ alerted]
-  \unless\ifbeamer at tcb@rounded
-    \tcbsetforeverylayer{title={\insertblocktitle}}
-  \fi  
   \ifx\insertblocktitle\@empty\else
-    \tcbsetforeverylayer{title={\insertblocktitle}}
+    \beamer at tcb@titletrue
   \fi
   \begin{tcolorbox}[
     colback=beamer at tcb@bodybg,
@@ -153,6 +174,7 @@
     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}}
@@ -160,11 +182,8 @@
 % example block
 \setbeamertemplate{block example begin}{%
   \beamer at tcb@colini[ example]
-  \unless\ifbeamer at tcb@rounded
-    \tcbsetforeverylayer{title={\insertblocktitle}}
-  \fi  
   \ifx\insertblocktitle\@empty\else
-    \tcbsetforeverylayer{title={\insertblocktitle}}
+    \beamer at tcb@titletrue
   \fi
   \begin{tcolorbox}[
     colback=beamer at tcb@bodybg,
@@ -173,6 +192,7 @@
     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}}



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