patched block environments

This commit is contained in:
Jan Benda 2021-03-04 00:33:22 +01:00
parent bed41a95cb
commit ee734b55e5
6 changed files with 217 additions and 46 deletions

View File

@ -55,13 +55,22 @@
\setbeamercolor{enumerate subitem}{parent={normal text}}
\setbeamercolor{block title}{fg=white, bg=blue}
\setbeamercolor{block body}{fg=normal text.fg, bg=black!10}
\setbeamercolor{block body}{fg=normal text.fg, bg=blue!20}
\setbeamercolor{block line top}{fg=}
\setbeamercolor{block line middle}{fg=}
\setbeamercolor{block line bottom}{fg=}
\setbeamercolor{block title alerted}{parent={block title}, bg=red}
\setbeamercolor{block body alerted}{parent={block body}, fg=red}
\setbeamercolor{block body alerted}{fg=red, bg=red!15}
\setbeamercolor{block line alerted top}{fg=}
\setbeamercolor{block line alerted middle}{fg=}
\setbeamercolor{block line alerted bottom}{fg=}
\setbeamercolor{block title example}{parent={block title}, bg=lightgreen}
\setbeamercolor{block body example}{parent={block body}}
\setbeamercolor{block body example}{fg=normal text.fg, bg=lightgreen!40}
\setbeamercolor{block line example top}{fg=}
\setbeamercolor{block line example middle}{fg=}
\setbeamercolor{block line example bottom}{fg=}
\if@beamer@colors@set

View File

@ -50,13 +50,22 @@
\setbeamercolor{frametitle line}{fg=utgold}
\setbeamercolor{block title}{fg=white, bg=utlightblue}
\setbeamercolor{block body}{fg=normal text.fg, bg=utblack!10}
\setbeamercolor{block body}{fg=normal text.fg, bg=utlightblue!15}
\setbeamercolor{block line top}{fg=}
\setbeamercolor{block line middle}{fg=}
\setbeamercolor{block line bottom}{fg=}
\setbeamercolor{block title alerted}{parent={block title}, bg=utred}
\setbeamercolor{block body alerted}{parent={block body}, fg=utred}
\setbeamercolor{block title example}{parent={block title}, bg=utcyan}
\setbeamercolor{block body example}{parent={block body}}
\setbeamercolor{block body alerted}{fg=utred, bg=utred!10}
\setbeamercolor{block line alerted top}{fg=}
\setbeamercolor{block line alerted middle}{fg=}
\setbeamercolor{block line alerted bottom}{fg=}
\setbeamercolor{block title example}{parent={block title}, bg=utgreen}
\setbeamercolor{block body example}{fg=normal text.fg, bg=utgreen!30}
\setbeamercolor{block line example top}{fg=}
\setbeamercolor{block line example middle}{fg=}
\setbeamercolor{block line example bottom}{fg=}
\addtobeamertemplate{proof begin}{%
\setbeamercolor{block title}{fg=white, bg=utmagenta}

View File

@ -8,6 +8,7 @@
\ProvidesPackage{beamerthemelines}[2021/02/28 beamer theme with horizontal lines]
\RequirePackage{tikz}
\RequirePackage{xstring}
% pass set/noset option to aptero color theme:
\DeclareOptionBeamer{set}{\PassOptionsToPackage{set}{beamercolorthemeaptero}}
@ -340,9 +341,124 @@
\setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman
%%%%% block environments:
%%%%% block environment:
\defbeamertemplate{block begin}{lines}[2]{%
\par\vskip\medskipamount%
\usebeamerfont{block title}%
\IfStrEq{\insertblocktitle}{}{}{%
\ifbeamercolorempty[fg]{block line top}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line top}
\rule{\columnwidth}{#1}
\end{beamercolorbox}
\nointerlineskip%
}
\begin{beamercolorbox}[wd=\columnwidth,ht=2.5ex,dp=1ex,leftskip=2mm,rightskip=2mm]{block title}
\strut\insertblocktitle
\end{beamercolorbox}}
\nointerlineskip
\ifbeamercolorempty[fg]{block line middle}{}{%
\begin{beamercolorbox}[wd=\columnwidth,hd=#2]{block line middle}
\rule{\columnwidth}{#2}
\end{beamercolorbox}
\nointerlineskip}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{block body}
}
\defbeamertemplate{block end}{lines}[1][1pt]{%
\end{beamercolorbox}%
\ifbeamercolorempty[fg]{block line bottom}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line bottom}
\rule{\columnwidth}{#1}
\end{beamercolorbox}
}%
}
\setbeamertemplate{block begin}[lines]{1pt}{1pt}
\setbeamertemplate{block end}[lines][1pt]
%%%%% block alerted environment:
\defbeamertemplate{block alerted begin}{lines}[2]{%
\par\vskip\medskipamount%
\usebeamerfont{block title alerted}%
\IfStrEq{\insertblocktitle}{}{}{%
\ifbeamercolorempty[fg]{block line alerted top}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line alerted top}
\rule{\columnwidth}{#1}
\end{beamercolorbox}
\nointerlineskip%
}
\begin{beamercolorbox}[wd=\columnwidth,ht=2.5ex,dp=1ex,leftskip=2mm,rightskip=2mm]{block title alerted}
\strut\insertblocktitle
\end{beamercolorbox}}
\nointerlineskip
\ifbeamercolorempty[fg]{block line alerted middle}{}{%
\begin{beamercolorbox}[wd=\columnwidth,hd=#2]{block line alerted middle}
\rule{\columnwidth}{#2}
\end{beamercolorbox}
\nointerlineskip}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{block body alerted}
}
\defbeamertemplate{block alerted end}{lines}[1][1pt]{%
\end{beamercolorbox}%
\ifbeamercolorempty[fg]{block line alerted bottom}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line alerted bottom}
\rule{\columnwidth}{#1}
\end{beamercolorbox}
}%
}
\setbeamertemplate{block alerted begin}[lines]{1pt}{1pt}
\setbeamertemplate{block alerted end}[lines][1pt]
%%%%% block example environment:
\defbeamertemplate{block example begin}{lines}[2]{%
\par\vskip\medskipamount%
\usebeamerfont{block title example}%
\IfStrEq{\insertblocktitle}{}{}{%
\ifbeamercolorempty[fg]{block line example top}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line example top}
\rule{\columnwidth}{#1}
\end{beamercolorbox}
\nointerlineskip%
}
\begin{beamercolorbox}[wd=\columnwidth,ht=2.5ex,dp=1ex,leftskip=2mm,rightskip=2mm]{block title example}
\strut\insertblocktitle
\end{beamercolorbox}}
\nointerlineskip
\ifbeamercolorempty[fg]{block line example middle}{}{%
\begin{beamercolorbox}[wd=\columnwidth,hd=#2]{block line example middle}
\rule{\columnwidth}{#2}
\end{beamercolorbox}
\nointerlineskip}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{block body example}
}
\defbeamertemplate{block example end}{lines}[1][1pt]{%
\end{beamercolorbox}%
\ifbeamercolorempty[fg]{block line example bottom}{}{%
\nointerlineskip
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line example bottom}
\rule{\columnwidth}{#1}
\end{beamercolorbox}
}%
}
\setbeamertemplate{blocks}[default]
\setbeamertemplate{block example begin}[lines]{1pt}{1pt}
\setbeamertemplate{block example end}[lines][1pt]
%%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -49,9 +49,16 @@
\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{blocks}[default] % default, rounded
\setbeamertemplate{block begin}[lines]{1pt}{1pt} % default, rounded, lines
\setbeamertemplate{block end}[lines][1pt]
\setbeamertemplate{title page}[leftlines] % leftlines, centerlines
\setbeamertemplate{block alerted begin}[lines]{1pt}{1pt} % default, rounded, lines
\setbeamertemplate{block alerted end}[lines][1pt]
\setbeamertemplate{block example begin}[lines]{1pt}{1pt} % default, rounded, lines
\setbeamertemplate{block example end}[lines][1pt]
\setbeamertemplate{title page}[leftlines] % leftlines, centerlines
\setbeamertemplate{title page graphic line}[default][1.4ex]
\setbeamertemplate{title page title line}[default][0.75pt]
\setbeamertemplate{title page author and}[line] % space, comma, line, and

View File

@ -8,6 +8,8 @@
\institute[T\"ubingen]{Neuroethology, University of T\"ubingen}
\date[2021]{March 2021}
\setbeamerfont{block body}{size=\small}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
@ -101,7 +103,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]{Itemize and enumerate}
\begin{minipage}[t]{0.45\textwidth}
\vspace{-2ex}
\vspace{-3ex}
\begin{block}{Itemize with overlays}
\verb!\begin{itemize}!\\
\verb!\item Apple!\\
@ -119,7 +121,7 @@
\end{minipage}
\hfill
\begin{minipage}[t]{0.45\textwidth}
\vspace{-2ex}
\vspace{-3ex}
\begin{block}{Enumerate with overlays}
\verb!\begin{enumerate}!\\
\verb!\item<2-> Apple!\\
@ -178,8 +180,8 @@
\begin{frame}[fragile]{Nested itemize and enumerate}
\begin{minipage}[t]{0.45\textwidth}
\vspace{-2ex}
\begin{block}{Itemize}\small
\vspace{-3ex}
\begin{block}{Itemize}
\verb!\begin{itemize}!\\
\verb!\item Apple!\\
\verb! \begin{itemize}!\\
@ -200,8 +202,8 @@
\end{minipage}
\hfill
\begin{minipage}[t]{0.45\textwidth}
\vspace{-2ex}
\begin{block}{Enumerate}\small
\vspace{-3ex}
\begin{block}{Enumerate}
\verb!\begin{enumerate}!\\
\verb!\item Apple!\\
\verb! \begin{enumerate}!\\
@ -235,22 +237,35 @@
\end{block}
\end{frame}
\begin{frame}{Blocks and theorems}
\begin{frame}{Block environments}
\begin{block}{Some block}
Block with title and content: \texttt{block} environment with title as argument.
\end{block}
\begin{block}{}
Block without title.
\end{block}
\begin{alertblock}{Careful!}
Alert block with title and content: \texttt{alertblock} environment with title as argument.
\end{alertblock}
\begin{example}
Example block with content: \texttt{example} environment.
\end{example}
\begin{definition}
Definition block with content: \texttt{definition} environment.
\end{definition}
\begin{proof}
Proof block with content: \texttt{proof} environment.
\end{proof}
\begin{alertblock}{}
Alert block without title.
\end{alertblock}
\begin{exampleblock}{Example}
Example block with title and content: \texttt{exampleblock} environment.
\end{exampleblock}
\begin{exampleblock}{}
Example block without title.
\end{exampleblock}
\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}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -324,9 +339,6 @@
\begin{block}{Just space}
\verb!\setbeamertemplate{footline separator}[space]!
\end{block}
\begin{block}{Color}
\verb!\setbeamercolor{footline separator}{fg=black}!
\end{block}
\end{frame}
\begin{frame}[fragile]{Footline page}

View File

@ -9,6 +9,8 @@
\titlelogo{\includegraphics[height=6ex]{UT_MNF_RGB}}
\titlegraphic{\includegraphics[width=\textwidth]{efishtitle}}
\setbeamerfont{block body}{size=\small}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
@ -22,6 +24,7 @@
\verb!\documentclass[aspectratio=169,t]{beamer}!\\
\verb!\usetheme[author,date,title,page]{ut}!
\end{block}
\vspace{2ex}
Options select content of footline (defaults to \verb![author,page,logo]!):
\begin{itemize}
\item \verb!author! / \verb!hideauthor!
@ -99,7 +102,7 @@
\begin{frame}[fragile]{Nested itemize and enumerate}
\begin{minipage}[t]{0.45\textwidth}
\vspace{-2ex}
\begin{block}{Itemize}\small
\begin{block}{Itemize}
\verb!\begin{itemize}!\\
\verb!\item Apple!\\
\verb! \begin{itemize}!\\
@ -121,7 +124,7 @@
\hfill
\begin{minipage}[t]{0.45\textwidth}
\vspace{-2ex}
\begin{block}{Enumerate}\small
\begin{block}{Enumerate}
\verb!\begin{enumerate}!\\
\verb!\item Apple!\\
\verb! \begin{enumerate}!\\
@ -150,26 +153,41 @@
Structural \structure{emphasis} is provided by the \verb!\structure{}! command.
\end{frame}
\begin{frame}{Blocks}
Carefully used, they bring color into the slide.
\begin{frame}{Block environments with title}
\begin{block}{Some block}
Block with title and content: \texttt{block} environment with title as argument.
\texttt{block} environment with title as argument.
\end{block}
\begin{alertblock}{Careful!}
Alert block with title and content: \texttt{alertblock} environment with title as argument.
\texttt{alertblock} environment with title as argument.
\end{alertblock}
\begin{exampleblock}{Example}
\texttt{exampleblock} environment with title as argument.
\end{exampleblock}
\end{frame}
\begin{frame}{Block environments without title}
\begin{block}{}
Block with empty title.\\
And just some text.
\end{block}
\begin{alertblock}{}
Alert block with empty title.\\
And just some text.
\end{alertblock}
\begin{example}
Example block with content: \texttt{example} environment.
\end{example}
\begin{exampleblock}{}
Example block with empty title.\\
And just some text.
\end{exampleblock}
\end{frame}
\begin{frame}{Theorems}
\begin{definition}
Definition block with content: \texttt{definition} environment.
\end{definition}
\begin{proof}
Proof block with content: \texttt{proof} environment.
\end{proof}
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}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%