simplified block environments
This commit is contained in:
parent
ee734b55e5
commit
0c2aae823f
@ -57,20 +57,20 @@
|
|||||||
\setbeamercolor{block title}{fg=white, bg=blue}
|
\setbeamercolor{block title}{fg=white, bg=blue}
|
||||||
\setbeamercolor{block body}{fg=normal text.fg, bg=blue!20}
|
\setbeamercolor{block body}{fg=normal text.fg, bg=blue!20}
|
||||||
\setbeamercolor{block line top}{fg=}
|
\setbeamercolor{block line top}{fg=}
|
||||||
\setbeamercolor{block line middle}{fg=}
|
\setbeamercolor{block line middle}{fg=blue}
|
||||||
\setbeamercolor{block line bottom}{fg=}
|
\setbeamercolor{block line bottom}{fg=blue}
|
||||||
|
|
||||||
\setbeamercolor{block title alerted}{parent={block title}, bg=red}
|
\setbeamercolor{block title alerted}{parent={block title}, bg=red}
|
||||||
\setbeamercolor{block body alerted}{fg=red, bg=red!15}
|
\setbeamercolor{block body alerted}{fg=red, bg=red!15}
|
||||||
\setbeamercolor{block line alerted top}{fg=}
|
\setbeamercolor{block line alerted top}{fg=}
|
||||||
\setbeamercolor{block line alerted middle}{fg=}
|
\setbeamercolor{block line alerted middle}{fg=red}
|
||||||
\setbeamercolor{block line alerted bottom}{fg=}
|
\setbeamercolor{block line alerted bottom}{fg=red}
|
||||||
|
|
||||||
\setbeamercolor{block title example}{parent={block title}, bg=lightgreen}
|
\setbeamercolor{block title example}{parent={block title}, bg=lightgreen}
|
||||||
\setbeamercolor{block body example}{fg=normal text.fg, bg=lightgreen!40}
|
\setbeamercolor{block body example}{fg=normal text.fg, bg=lightgreen!40}
|
||||||
\setbeamercolor{block line example top}{fg=}
|
\setbeamercolor{block line example top}{fg=}
|
||||||
\setbeamercolor{block line example middle}{fg=}
|
\setbeamercolor{block line example middle}{fg=lightgreen}
|
||||||
\setbeamercolor{block line example bottom}{fg=}
|
\setbeamercolor{block line example bottom}{fg=lightgreen}
|
||||||
|
|
||||||
\if@beamer@colors@set
|
\if@beamer@colors@set
|
||||||
|
|
||||||
|
@ -52,20 +52,20 @@
|
|||||||
\setbeamercolor{block title}{fg=white, bg=utlightblue}
|
\setbeamercolor{block title}{fg=white, bg=utlightblue}
|
||||||
\setbeamercolor{block body}{fg=normal text.fg, bg=utlightblue!15}
|
\setbeamercolor{block body}{fg=normal text.fg, bg=utlightblue!15}
|
||||||
\setbeamercolor{block line top}{fg=}
|
\setbeamercolor{block line top}{fg=}
|
||||||
\setbeamercolor{block line middle}{fg=}
|
\setbeamercolor{block line middle}{fg=utlightblue}
|
||||||
\setbeamercolor{block line bottom}{fg=}
|
\setbeamercolor{block line bottom}{fg=utlightblue}
|
||||||
|
|
||||||
\setbeamercolor{block title alerted}{parent={block title}, bg=utred}
|
\setbeamercolor{block title alerted}{parent={block title}, bg=utred}
|
||||||
\setbeamercolor{block body alerted}{fg=utred, bg=utred!10}
|
\setbeamercolor{block body alerted}{fg=utred, bg=utred!10}
|
||||||
\setbeamercolor{block line alerted top}{fg=}
|
\setbeamercolor{block line alerted top}{fg=}
|
||||||
\setbeamercolor{block line alerted middle}{fg=}
|
\setbeamercolor{block line alerted middle}{fg=utred}
|
||||||
\setbeamercolor{block line alerted bottom}{fg=}
|
\setbeamercolor{block line alerted bottom}{fg=utred}
|
||||||
|
|
||||||
\setbeamercolor{block title example}{parent={block title}, bg=utgreen}
|
\setbeamercolor{block title example}{parent={block title}, bg=utgreen}
|
||||||
\setbeamercolor{block body example}{fg=normal text.fg, bg=utgreen!30}
|
\setbeamercolor{block body example}{fg=normal text.fg, bg=utgreen!30}
|
||||||
\setbeamercolor{block line example top}{fg=}
|
\setbeamercolor{block line example top}{fg=}
|
||||||
\setbeamercolor{block line example middle}{fg=}
|
\setbeamercolor{block line example middle}{fg=utgreen}
|
||||||
\setbeamercolor{block line example bottom}{fg=}
|
\setbeamercolor{block line example bottom}{fg=utgreen}
|
||||||
|
|
||||||
\addtobeamertemplate{proof begin}{%
|
\addtobeamertemplate{proof begin}{%
|
||||||
\setbeamercolor{block title}{fg=white, bg=utmagenta}
|
\setbeamercolor{block title}{fg=white, bg=utmagenta}
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
\mode<presentation>
|
\mode<presentation>
|
||||||
|
|
||||||
% margins:
|
% margins:
|
||||||
\setbeamersize{text margin left=1em,text margin right=1em}
|
\setbeamersize{text margin left=1ex,text margin right=1ex}
|
||||||
|
|
||||||
% no navigation symbols:
|
% no navigation symbols:
|
||||||
\defbeamertemplate{navigation symbols}{empty}{}
|
\defbeamertemplate{navigation symbols}{empty}{}
|
||||||
@ -341,124 +341,68 @@
|
|||||||
\setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman
|
\setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman
|
||||||
|
|
||||||
|
|
||||||
%%%%% block environment:
|
%%%%% block environments:
|
||||||
|
|
||||||
\defbeamertemplate{block begin}{lines}[2]{%
|
\newcommand{\block@lines@begin}[3]{%
|
||||||
\par\vskip\medskipamount%
|
\par\vskip\medskipamount%
|
||||||
\usebeamerfont{block title}%
|
\usebeamerfont{block title#1}%
|
||||||
\IfStrEq{\insertblocktitle}{}{}{%
|
\IfStrEq{\insertblocktitle}{}{}{%
|
||||||
\ifbeamercolorempty[fg]{block line top}{}{%
|
\ifbeamercolorempty[fg]{block line#1 top}{}{%
|
||||||
\nointerlineskip
|
\nointerlineskip
|
||||||
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line top}
|
\begin{beamercolorbox}[wd=\columnwidth,hd=#2]{block line#1 top}
|
||||||
\rule{\columnwidth}{#1}
|
\rule{\columnwidth}{#2}
|
||||||
\end{beamercolorbox}
|
\end{beamercolorbox}
|
||||||
\nointerlineskip%
|
\nointerlineskip%
|
||||||
}
|
}
|
||||||
\begin{beamercolorbox}[wd=\columnwidth,ht=2.5ex,dp=1ex,leftskip=2mm,rightskip=2mm]{block title}
|
\begin{beamercolorbox}[wd=\columnwidth,ht=2.4ex,dp=0.9ex,leftskip=2mm,rightskip=2mm]{block title#1}
|
||||||
\strut\insertblocktitle
|
\strut\insertblocktitle
|
||||||
\end{beamercolorbox}}
|
\end{beamercolorbox}}
|
||||||
\nointerlineskip
|
\nointerlineskip
|
||||||
\ifbeamercolorempty[fg]{block line middle}{}{%
|
\ifbeamercolorempty[fg]{block line#1 middle}{}{%
|
||||||
\begin{beamercolorbox}[wd=\columnwidth,hd=#2]{block line middle}
|
\begin{beamercolorbox}[wd=\columnwidth,hd=#3]{block line#1 middle}
|
||||||
\rule{\columnwidth}{#2}
|
\rule{\columnwidth}{#3}
|
||||||
\end{beamercolorbox}
|
\end{beamercolorbox}
|
||||||
\nointerlineskip}%
|
\nointerlineskip}%
|
||||||
\usebeamerfont{block body}%
|
\usebeamerfont{block body#1}%
|
||||||
\begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{block body}
|
\begin{beamercolorbox}[wd=\columnwidth,colsep=2mm]{block body#1}
|
||||||
}
|
}
|
||||||
|
|
||||||
\defbeamertemplate{block end}{lines}[1][1pt]{%
|
\newcommand{\block@lines@end}[2]{%
|
||||||
|
\vspace{-0.4ex}%
|
||||||
\end{beamercolorbox}%
|
\end{beamercolorbox}%
|
||||||
\ifbeamercolorempty[fg]{block line bottom}{}{%
|
\ifbeamercolorempty[fg]{block line#1 bottom}{}{%
|
||||||
\nointerlineskip
|
\nointerlineskip
|
||||||
\begin{beamercolorbox}[wd=\columnwidth,hd=#1]{block line bottom}
|
\begin{beamercolorbox}[wd=\columnwidth,hd=#2]{block line#1 bottom}
|
||||||
\rule{\columnwidth}{#1}
|
\rule{\columnwidth}{#2}
|
||||||
\end{beamercolorbox}
|
\end{beamercolorbox}
|
||||||
}%
|
}%
|
||||||
}
|
}
|
||||||
|
|
||||||
\setbeamertemplate{block begin}[lines]{1pt}{1pt}
|
%%%%% block environment:
|
||||||
\setbeamertemplate{block end}[lines][1pt]
|
|
||||||
|
|
||||||
|
\defbeamertemplate{block begin}{lines}[2]{\block@lines@begin{}{#1}{#2}}
|
||||||
|
\defbeamertemplate{block end}{lines}[1]{\block@lines@end{}{#1}}
|
||||||
|
|
||||||
%%%%% block alerted environment:
|
\setbeamertemplate{block begin}[lines]{0.5pt}{0.5pt}
|
||||||
|
\setbeamertemplate{block end}[lines]{0.5pt}
|
||||||
|
|
||||||
\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]{%
|
%%%%% block alerted environment:
|
||||||
\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}
|
\defbeamertemplate{block alerted begin}{lines}[2]{\block@lines@begin{ alerted}{#1}{#2}}
|
||||||
\setbeamertemplate{block alerted end}[lines][1pt]
|
\defbeamertemplate{block alerted end}{lines}[1]{\block@lines@end{ alerted}{#1}}
|
||||||
|
|
||||||
|
\setbeamertemplate{block alerted begin}[lines]{0.5pt}{0.5pt}
|
||||||
|
\setbeamertemplate{block alerted end}[lines]{0.5pt}
|
||||||
|
|
||||||
%%%%% block example environment:
|
|
||||||
|
|
||||||
\defbeamertemplate{block example begin}{lines}[2]{%
|
%%%%% block example environment:
|
||||||
\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]{%
|
\defbeamertemplate{block example begin}{lines}[2]{\block@lines@begin{ example}{#1}{#2}}
|
||||||
\end{beamercolorbox}%
|
\defbeamertemplate{block example end}{lines}[1]{\block@lines@end{ example}{#1}}
|
||||||
\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 begin}[lines]{0.5pt}{0.5pt}
|
||||||
\setbeamertemplate{block example end}[lines][1pt]
|
\setbeamertemplate{block example end}[lines]{0.5pt}
|
||||||
|
|
||||||
|
|
||||||
%%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%% title page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
@ -50,13 +50,13 @@
|
|||||||
\setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman
|
\setbeamertemplate{enumerate subitem}[alph] % default, circle, square, ball, alph, arabic, roman
|
||||||
|
|
||||||
\setbeamertemplate{block begin}[lines]{1pt}{1pt} % default, rounded, lines
|
\setbeamertemplate{block begin}[lines]{1pt}{1pt} % default, rounded, lines
|
||||||
\setbeamertemplate{block end}[lines][1pt]
|
\setbeamertemplate{block end}[lines]{1pt}
|
||||||
|
|
||||||
\setbeamertemplate{block alerted begin}[lines]{1pt}{1pt} % default, rounded, lines
|
\setbeamertemplate{block alerted begin}[lines]{1pt}{1pt} % default, rounded, lines
|
||||||
\setbeamertemplate{block alerted end}[lines][1pt]
|
\setbeamertemplate{block alerted end}[lines]{1pt}
|
||||||
|
|
||||||
\setbeamertemplate{block example begin}[lines]{1pt}{1pt} % default, rounded, lines
|
\setbeamertemplate{block example begin}[lines]{1pt}{1pt} % default, rounded, lines
|
||||||
\setbeamertemplate{block example end}[lines][1pt]
|
\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]
|
||||||
|
@ -242,19 +242,19 @@
|
|||||||
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}{}
|
\begin{block}{}
|
||||||
Block without title.
|
Block with empty title.
|
||||||
\end{block}
|
\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{alertblock}{}
|
\begin{alertblock}{}
|
||||||
Alert block without title.
|
Alert block with empty title.
|
||||||
\end{alertblock}
|
\end{alertblock}
|
||||||
\begin{exampleblock}{Example}
|
\begin{exampleblock}{Example}
|
||||||
Example block with title and content: \texttt{exampleblock} environment.
|
Example block with title and content: \texttt{exampleblock} environment.
|
||||||
\end{exampleblock}
|
\end{exampleblock}
|
||||||
\begin{exampleblock}{}
|
\begin{exampleblock}{}
|
||||||
Example block without title.
|
Example block with empty title.
|
||||||
\end{exampleblock}
|
\end{exampleblock}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
@ -431,7 +431,7 @@
|
|||||||
|
|
||||||
\begin{frame}[fragile]{Title page authors}
|
\begin{frame}[fragile]{Title page authors}
|
||||||
\begin{block}{In preamble}
|
\begin{block}{In preamble}
|
||||||
\verb!\author{Mary Hagedorn\inst{1} \and Walter Heiligenberg\inst{2}}!
|
\strut\verb!\author{Mary Hagedorn\inst{1} \and Walter Heiligenberg\inst{2}}!
|
||||||
\end{block}
|
\end{block}
|
||||||
\begin{block}{Author separator}
|
\begin{block}{Author separator}
|
||||||
\verb!\setbeamertemplate{title page author and}[line]!
|
\verb!\setbeamertemplate{title page author and}[line]!
|
||||||
@ -450,7 +450,7 @@
|
|||||||
|
|
||||||
\begin{frame}[fragile]{Title page institutes}
|
\begin{frame}[fragile]{Title page institutes}
|
||||||
\begin{block}{In preamble}
|
\begin{block}{In preamble}
|
||||||
\verb!\institute{\inst{1}Somewhere \and \inst{2}Somewhere else}!
|
\strut\verb!\institute{\inst{1}Somewhere \and \inst{2}Somewhere else}!
|
||||||
\end{block}
|
\end{block}
|
||||||
\begin{block}{Institutes separator}
|
\begin{block}{Institutes separator}
|
||||||
\verb!\setbeamertemplate{title page institute and}[line]!
|
\verb!\setbeamertemplate{title page institute and}[line]!
|
||||||
@ -469,7 +469,7 @@
|
|||||||
|
|
||||||
\begin{frame}[fragile]{Title page date}
|
\begin{frame}[fragile]{Title page date}
|
||||||
\begin{block}{In preamble}
|
\begin{block}{In preamble}
|
||||||
\verb!\date[2020]{ICN 2020}!
|
\strut\verb!\date[2020]{ICN 2020}!
|
||||||
\end{block}
|
\end{block}
|
||||||
\begin{block}{Font}
|
\begin{block}{Font}
|
||||||
\verb!\setbeamerfont{date}{size=\normalsize}!
|
\verb!\setbeamerfont{date}{size=\normalsize}!
|
||||||
@ -541,7 +541,18 @@
|
|||||||
\end{itemize}
|
\end{itemize}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\begin{frame}{More resources}
|
\begin{frame}{Beamer templates}
|
||||||
|
Templates are a powerful method of beamer that allow you to modify
|
||||||
|
the appearance of your presentation.
|
||||||
|
|
||||||
|
\bigskip
|
||||||
|
Read in the beamer user guide
|
||||||
|
\begin{itemize}
|
||||||
|
\item section 16.3 ``Changing the Templates Used for Different Elements of a Presentation''
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\bigskip
|
||||||
|
You find a nice summary of common beamer template/color/font names in the
|
||||||
\begin{block}{Beamer appearance cheat sheet}
|
\begin{block}{Beamer appearance cheat sheet}
|
||||||
\url{http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf}
|
\url{http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf}
|
||||||
\end{block}
|
\end{block}
|
||||||
|
Loading…
Reference in New Issue
Block a user