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{enumerate subitem}{parent={normal text}}
\setbeamercolor{block title}{fg=white, bg=blue} \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 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 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 \if@beamer@colors@set

View File

@ -50,13 +50,22 @@
\setbeamercolor{frametitle line}{fg=utgold} \setbeamercolor{frametitle line}{fg=utgold}
\setbeamercolor{block title}{fg=white, bg=utlightblue} \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 title alerted}{parent={block title}, bg=utred}
\setbeamercolor{block body alerted}{parent={block body}, fg=utred} \setbeamercolor{block body alerted}{fg=utred, bg=utred!10}
\setbeamercolor{block line alerted top}{fg=}
\setbeamercolor{block title example}{parent={block title}, bg=utcyan} \setbeamercolor{block line alerted middle}{fg=}
\setbeamercolor{block body example}{parent={block body}} \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}{% \addtobeamertemplate{proof begin}{%
\setbeamercolor{block title}{fg=white, bg=utmagenta} \setbeamercolor{block title}{fg=white, bg=utmagenta}

View File

@ -8,6 +8,7 @@
\ProvidesPackage{beamerthemelines}[2021/02/28 beamer theme with horizontal lines] \ProvidesPackage{beamerthemelines}[2021/02/28 beamer theme with horizontal lines]
\RequirePackage{tikz} \RequirePackage{tikz}
\RequirePackage{xstring}
% pass set/noset option to aptero color theme: % pass set/noset option to aptero color theme:
\DeclareOptionBeamer{set}{\PassOptionsToPackage{set}{beamercolorthemeaptero}} \DeclareOptionBeamer{set}{\PassOptionsToPackage{set}{beamercolorthemeaptero}}
@ -340,9 +341,124 @@
\setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman \setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman
%%%%% block environments: %%%%% block environment:
\setbeamertemplate{blocks}[default] \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{block example begin}[lines]{1pt}{1pt}
\setbeamertemplate{block example end}[lines][1pt]
%%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -49,7 +49,14 @@
\setbeamertemplate{enumerate item}[arabic] % default, circle, square, ball, alph, Alph, arabic, roman, Roman \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{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{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}[leftlines] % leftlines, centerlines
\setbeamertemplate{title page graphic line}[default][1.4ex] \setbeamertemplate{title page graphic line}[default][1.4ex]

View File

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

View File

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