diff --git a/beamercolorthemeaptero.sty b/beamercolorthemeaptero.sty index 557ea2c..0d2ae5f 100644 --- a/beamercolorthemeaptero.sty +++ b/beamercolorthemeaptero.sty @@ -9,12 +9,6 @@ \ProvidesPackage{beamercolorthemeaptero}[2021/02/28 color theme for lines inner and outer beamer theme] -\newif\if@beamer@colors@set -\DeclareOptionBeamer{noset}{\@beamer@colors@setfalse} -\DeclareOptionBeamer{set}{\@beamer@colors@settrue} -\ExecuteOptionsBeamer{set} -\ProcessOptionsBeamer - % muted colors: \definecolor{red}{rgb}{0.753,0.153,0.090} \definecolor{orange}{rgb}{0.969,0.502,0.090} @@ -72,17 +66,11 @@ \setbeamercolor{block line example middle}{fg=lightgreen} \setbeamercolor{block line example bottom}{fg=lightgreen} -\if@beamer@colors@set - - \addtobeamertemplate{proof begin}{% - \setbeamercolor{block title}{fg=white, bg=green} - }{} - - \addtobeamertemplate{theorem begin}{% - \setbeamercolor{block title}{fg=white, bg=orange} - }{} - -\fi +\setbeamercolor{theorem title}{parent={block title}, bg=orange} +\setbeamercolor{theorem body}{fg=normal text.fg, bg=orange!40} +\setbeamercolor{theorem line top}{fg=} +\setbeamercolor{theorem line middle}{fg=orange} +\setbeamercolor{theorem line bottom}{fg=orange} \setbeamercolor{section in toc}{parent={normal text}} \setbeamercolor{subsection in toc}{parent={normal text}} diff --git a/beamercolorthemeut.sty b/beamercolorthemeut.sty index b840332..63eeca4 100644 --- a/beamercolorthemeut.sty +++ b/beamercolorthemeut.sty @@ -67,13 +67,11 @@ \setbeamercolor{block line example middle}{fg=utgreen} \setbeamercolor{block line example bottom}{fg=utgreen} -\addtobeamertemplate{proof begin}{% - \setbeamercolor{block title}{fg=white, bg=utmagenta} -}{} - -\addtobeamertemplate{theorem begin}{% - \setbeamercolor{block title}{fg=white, bg=utorange} -}{} +\setbeamercolor{theorem title}{parent={block title}, bg=utorange} +\setbeamercolor{theorem body}{fg=normal text.fg, bg=utorange!25} +\setbeamercolor{theorem line top}{fg=} +\setbeamercolor{theorem line middle}{fg=utorange} +\setbeamercolor{theorem line bottom}{fg=utorange} \setbeamercolor{section in toc}{parent={normal text}} \setbeamercolor{subsection in toc}{parent={normal text}} diff --git a/beamerthemelines.sty b/beamerthemelines.sty index 6826ea5..2d6615d 100644 --- a/beamerthemelines.sty +++ b/beamerthemelines.sty @@ -10,10 +10,6 @@ \RequirePackage{tikz} \RequirePackage{xstring} -% pass set/noset option to aptero color theme: -\DeclareOptionBeamer{set}{\PassOptionsToPackage{set}{beamercolorthemeaptero}} -\DeclareOptionBeamer{noset}{\PassOptionsToPackage{noset}{beamercolorthemeaptero}} - \newif\if@beamer@footline@author \newif\if@beamer@footline@institute \newif\if@beamer@footline@date @@ -346,7 +342,7 @@ \newcommand{\block@lines@begin}[3]{% \par\vskip\medskipamount% \usebeamerfont{block title#1}% - \IfStrEq{\insertblocktitle}{}{}{% + \IfStrEq{\insertblocktitle}{}{}{% % IfStrEq does not work for theorems! \ifbeamercolorempty[fg]{block line#1 top}{}{% \nointerlineskip \begin{beamercolorbox}[wd=\columnwidth,hd=#2]{block line#1 top} @@ -405,6 +401,61 @@ \setbeamertemplate{block example end}[lines]{0.5pt} +%%%%% theorem environments (theorem, corollary, fact, lemma, definition, example): + +\newcommand{\theorem@lines@begin}[3]{% + \par\vskip\medskipamount% + \usebeamerfont{#1 title}% + \ifbeamercolorempty[fg]{#1 line top}{}{% + \nointerlineskip + \begin{beamercolorbox}[wd=\columnwidth,hd=#2]{#1 line top} + \rule{\columnwidth}{#2} + \end{beamercolorbox} + \nointerlineskip% + } + \begin{beamercolorbox}[wd=\columnwidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{#1 title} + \strut \insertblocktitle + \end{beamercolorbox} + \nointerlineskip + \ifbeamercolorempty[fg]{#1 line middle}{}{% + \begin{beamercolorbox}[wd=\columnwidth,hd=#3]{#1 line middle} + \rule{\columnwidth}{#3} + \end{beamercolorbox} + \nointerlineskip}% + \usebeamerfont{#1 body}% + \begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{#1 body} + } + +\newcommand{\theorem@lines@end}[2]{% + \vspace{-0.4ex}% + \end{beamercolorbox}% + \ifbeamercolorempty[fg]{#1 line bottom}{}{% + \nointerlineskip + \begin{beamercolorbox}[wd=\columnwidth,hd=#2]{#1 line bottom} + \rule{\columnwidth}{#2} + \end{beamercolorbox} + }% +} + +\newenvironment<>{theoremblock}[1]{% + \begin{actionenv}#2% + \def\insertblocktitle{#1}% + \par% + \usebeamertemplate{block theorem begin}} + {\par% + \usebeamertemplate{block theorem end}% + \end{actionenv}} + +\renewcommand{\inserttheoremblockenv}{theoremblock} +\renewcommand{\inserttheoremheadfont}{} + +\defbeamertemplate{block theorem begin}{lines}[2]{\theorem@lines@begin{theorem}{#1}{#2}} +\defbeamertemplate{block theorem end}{lines}[1]{\theorem@lines@end{theorem}{#1}} + +\setbeamertemplate{block theorem begin}[lines]{0.5pt}{0.5pt} +\setbeamertemplate{block theorem end}[lines]{0.5pt} + + %%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% title page graphic line: @@ -663,6 +714,11 @@ \setbeamerfont{institute}{size=\normalsize} \setbeamerfont{date}{size=\tiny} +\setbeamerfont{block title}{size=\normalsize} +\setbeamerfont{block title alerted}{size=\normalsize} +\setbeamerfont{block title example}{size=\normalsize} +\setbeamerfont{theorem title}{size=\normalsize} + \setbeamerfont*{section title}{size=\huge} \setbeamerfont*{section name}{size=\huge} \setbeamerfont*{subsection title}{size=\Large} diff --git a/beamerthemeut.sty b/beamerthemeut.sty index 69e9184..35d661d 100644 --- a/beamerthemeut.sty +++ b/beamerthemeut.sty @@ -49,14 +49,17 @@ \setbeamertemplate{enumerate item}[arabic] % default, circle, square, ball, alph, Alph, arabic, roman, Roman \setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman -\setbeamertemplate{block begin}[lines]{1pt}{1pt} % default, rounded, lines -\setbeamertemplate{block end}[lines]{1pt} +\setbeamertemplate{block begin}[lines]{0.75pt}{0.75pt} % default, rounded, lines +\setbeamertemplate{block end}[lines]{0.75pt} -\setbeamertemplate{block alerted begin}[lines]{1pt}{1pt} % default, rounded, lines -\setbeamertemplate{block alerted end}[lines]{1pt} +\setbeamertemplate{block alerted begin}[lines]{0.75pt}{0.75pt} % default, rounded, lines +\setbeamertemplate{block alerted end}[lines]{0.75pt} -\setbeamertemplate{block example begin}[lines]{1pt}{1pt} % default, rounded, lines -\setbeamertemplate{block example end}[lines]{1pt} +\setbeamertemplate{block example begin}[lines]{0.75pt}{0.75pt} % default, rounded, lines +\setbeamertemplate{block example end}[lines]{0.75pt} + +\setbeamertemplate{block theorem begin}[lines]{0.75pt}{0.75pt} +\setbeamertemplate{block theorem end}[lines]{0.75pt} \setbeamertemplate{title page}[leftlines] % leftlines, centerlines \setbeamertemplate{title page graphic line}[default][1.4ex] diff --git a/lines-example.tex b/lines-example.tex index 837b295..6a0f2c8 100644 --- a/lines-example.tex +++ b/lines-example.tex @@ -259,13 +259,25 @@ \end{frame} \begin{frame}{Theorems} - Not supported yet. - % \begin{definition} - % Definition block with content: \texttt{definition} environment. - % \end{definition} - % \begin{proof} - % Proof block with content: \texttt{proof} environment. - % \end{proof} + \begin{theorem} + \texttt{theorem} environment. + \end{theorem} + \begin{definition} + Definition block with content: \texttt{definition} environment.\\[1ex] + All theorem environments get the same color and font: + \begin{itemize} + \item \texttt{theorem title} + \item \texttt{theorem body} + \item \texttt{theorem line top/middle/bottom} + \end{itemize} + \end{definition} + %\begin{example} + % Example block with content: \texttt{example} environment. + %\end{example} + \begin{proof} + Proof block with content: \texttt{proof} environment.\\ + Same colors and fonts as the \texttt{block} environment. + \end{proof} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/ut-example.tex b/ut-example.tex index 0107443..9dd7876 100644 --- a/ut-example.tex +++ b/ut-example.tex @@ -154,6 +154,7 @@ \end{frame} \begin{frame}{Block environments with title} + ... add structure and color to a slide --- use them with care: \begin{block}{Some block} \texttt{block} environment with title as argument. \end{block} @@ -166,6 +167,7 @@ \end{frame} \begin{frame}{Block environments without title} + ... add color to a slide in a more subtle way: \begin{block}{} Block with empty title.\\ And just some text. @@ -181,13 +183,25 @@ \end{frame} \begin{frame}{Theorems} - Not supported yet. - % \begin{definition} - % Definition block with content: \texttt{definition} environment. - % \end{definition} - % \begin{proof} - % Proof block with content: \texttt{proof} environment. - % \end{proof} + \begin{theorem} + \texttt{theorem} environment. + \end{theorem} + \begin{definition} + Definition block with content: \texttt{definition} environment.\\[1ex] + All theorem environments get the same color and font: + \begin{itemize} + \item \texttt{theorem title} + \item \texttt{theorem body} + \item \texttt{theorem line top/middle/bottom} + \end{itemize} + \end{definition} + %\begin{example} + % Example block with content: \texttt{example} environment. + %\end{example} + \begin{proof} + Proof block with content: \texttt{proof} environment. + Same colors and fonts as the \texttt{block} environment. + \end{proof} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%