\documentclass[10pt,aspectratio=169,t]{beamer}
\usetheme[author,institute,date,title,page,hidelogo]{lines}
\usecolortheme{aptero}

\title[Lines beamer theme]{Lines}
\subtitle{a line-based theme for beamer}
\author[Benda]{Jan Benda}
\institute[T\"ubingen]{Neuroethology, University of T\"ubingen}
\date[2021]{March 2021}

\setbeamerfont{block body}{size=\small}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{frame}[plain]
  \titlepage
\end{frame}

\begin{frame}[fragile]{Lines theme}
  \begin{block}{Include}
      \verb!\documentclass[aspectratio=169,t]{beamer}!\\
      \verb!\usetheme[author,date,title,page,hidelogo]{lines}!
  \end{block}
  Options select content of footline (defaults to \texttt{[author,page,logo]}):
  \begin{itemize}
  \item \texttt{author} / \texttt{hideauthor}
  \item \texttt{institute} / \texttt{hideinstitute}
  \item \texttt{date} / \texttt{hidedate}
  \item \texttt{title} / \texttt{hidetitle}
  \item \texttt{page} / \texttt{hidepage}
  \item \texttt{logo} / \texttt{hidelogo}
  \end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\section{Frames}

\begin{frame}[fragile]{Beamer frames}
  \begin{block}{Frame environment with title}
    \verb!\begin{frame}{The title of my slide}!\\
    \verb!  Some content.!\\
    \verb!\end{frame}!
  \end{block}
  \begin{block}{Alternative specification of frame title}
    \verb!\begin{frame}!\\
    \verb!  \frametitle{The title of my slide}!\\
    \verb!  Some content.!\\
    \verb!\end{frame}!
  \end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{Frame title}
  \begin{block}{Title with logo}
    \verb!\setbeamertemplate{frametitle}[boxlinelogo]!
  \end{block}
  \begin{block}{Title without logo}
    \verb!\setbeamertemplate{frametitle}[boxline]!
  \end{block}
  \begin{block}{Color/Font}
    \verb!\setbeamercolor{frametitle}{fg=blue, bg=white}!\\
    \verb!\setbeamerfont{frametitle}{size=\LARGE}!
  \end{block}
\end{frame}

\begin{frame}[fragile]{Frame title line}
  \begin{block}{Thin line respecting page margins}
    \verb!\setbeamertemplate{frametitle line}[text][0.5pt]!
  \end{block}
  \begin{block}{Thick line}
    \verb!\setbeamertemplate{frametitle line}[text][3pt]!
  \end{block}
  \begin{block}{Line over full page}
    \verb!\setbeamertemplate{frametitle line}[page][1pt]!
  \end{block}
  \begin{block}{Color}
    \verb!\setbeamercolor{frametitle line}{fg=blue}!\\
    An empty foreground color hides the line:\\
    \verb!\setbeamercolor{frametitle line}{fg=}!
  \end{block}
\end{frame}

\begin{frame}[fragile]{Frame subtitle}
  \framesubtitle{Here we have a subtitle}
  \begin{block}{Frame environment with subtitle}
    \verb!\begin{frame}!\\
    \verb!  \frametitle{The title of my slide}!\\
    \verb!  \framesubtitle{This is a subtitle}!\\
    \verb!  Some content.!\\
    \verb!\end{frame}!
  \end{block}
  \begin{alertblock}{Try to avoid subtitles!}
    Keep the messages on your slides simple and clean.
  \end{alertblock}
  \begin{block}{Color/Font}
    \verb!\setbeamercolor{framesubtitle}{fg=blue}!\\
    \verb!\setbeamerfont{framesubtitle}{size=\large}!
  \end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{Itemize and enumerate}
  \vfill
  \begin{minipage}[t]{0.3\textwidth}
    \vspace{-3ex}
    \begin{block}{Itemize with overlays}
      \verb!\begin{itemize}!\\
        \verb!\item Apple!\\
        \verb!\item<2-> Orange!\\
        \verb!\item<2-> Lemon!\\
        \verb!\item<3-> Banana!\\
        \verb!\end{itemize}!
    \end{block}
    \begin{itemize}
    \item Apple
    \item<2-> Orange
    \item<2-> Lemon
    \item<3-> Banana
    \end{itemize}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.25\textwidth}
    \vspace{-3ex}
    \begin{block}{Enumerate with overlays}
      \verb!\begin{enumerate}!\\
        \verb!\item<2-> Apple!\\
        \verb!\item<1-> Orange!\\
        \verb!\item<2> Lemon!\\
        \verb!\item<3-> Banana!\\
        \verb!\end{enumerate}!
    \end{block}
    \begin{enumerate}
    \item<2-> Apple
    \item<1-> Orange
    \item<2> Lemon
    \item<3-> Banana
    \end{enumerate}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.37\textwidth}
    \vspace{-3ex}
    \begin{block}{Cover transparency}
      \verb!\setbeamercovered{transparent=50}!\\
      \verb!\begin{enumerate}!\\
        \verb!\item<1> Apple!\\
        \verb!\item<2-> Orange!\\
        \verb!\item<3> Lemon!\\
        \verb!\end{enumerate}!
    \end{block}
    \setbeamercovered{transparent=50}
    \begin{enumerate}
    \item<1> Apple
    \item<2-> Orange
    \item<3> Lemon
    \end{enumerate}
    \setbeamercovered{invisible}
  \end{minipage}
\end{frame}

\newcommand{\itemizesymboldemo}[1]{
  \begin{minipage}[t]{0.17\textwidth}
    \setbeamertemplate{itemize item}[#1]
    \texttt{#1}:
    \begin{itemize}
    \item Apple
    \item Orange
    \item Banana
    \end{itemize}
  \end{minipage}
  \setbeamertemplate{itemize item}[arrow]
}

\begin{frame}[fragile]{Itemize symbols}
  \begin{block}{Itemize item}
    \verb!\setbeamertemplate{itemize item}[arrow]!\\
    \verb!\setbeamertemplate{itemize subitem}[dash]!\\
    \verb!\setbeamercolor{itemize item}{fg=black}!
  \end{block}
  \vfill
  \itemizesymboldemo{default}
  \itemizesymboldemo{triangle}
  \itemizesymboldemo{square}
  \itemizesymboldemo{circle}
  \itemizesymboldemo{ball}

  \vfill\vfill
  \itemizesymboldemo{arrow}
  \itemizesymboldemo{filledarrow}
  \itemizesymboldemo{dash}
  \itemizesymboldemo{check}
  \itemizesymboldemo{uncheck}
\end{frame}

\newcommand{\enumeratedemo}{
  \begin{enumerate}
  \item Apple
  \item Orange
  \item Banana
  \end{enumerate}
}

\newcommand{\enumeratesymboldemo}[1]{
  \begin{minipage}[t]{0.17\textwidth}
    \setbeamertemplate{enumerate item}[#1]
    \texttt{#1}:
    \enumeratedemo
  \end{minipage}
  \setbeamertemplate{enumerate item}[default]
}

\begin{frame}[fragile]{Enumerate symbols}
  \begin{block}{Enumerate item}
    \verb!\setbeamertemplate{enumerate item}[arabic]!\\
    \verb!\setbeamertemplate{enumerate subitem}[alph]!\\
    \verb!\setbeamercolor{enumerate item}{fg=black}!
  \end{block}
  \vfill
  \enumeratesymboldemo{default}
  \enumeratesymboldemo{square}
  \enumeratesymboldemo{circle}
  \enumeratesymboldemo{ball}

  \vfill\vfill
  \enumeratesymboldemo{alph}
  \enumeratesymboldemo{Alph}
  \enumeratesymboldemo{arabic}
  \enumeratesymboldemo{roman}
  \enumeratesymboldemo{Roman}
\end{frame}

\begin{frame}[fragile]{Custom enumerate symbols}
  \begin{block}{Alph within brackets}
    \verb!\setbeamertemplate{enumerate item}{(\alph{enumi})}!
  \end{block}
  \setbeamertemplate{enumerate item}{(\alph{enumi})}
  \enumeratedemo
  \begin{block}{Arabic with closing bracket}
    \verb!\setbeamertemplate{enumerate item}{\arabic{enumi})}!
  \end{block}
  \setbeamertemplate{enumerate item}{\arabic{enumi})}
  \enumeratedemo
  \setbeamertemplate{enumerate item}[arabic]
\end{frame}

\begin{frame}[fragile]{Nested itemize and enumerate}
  \begin{minipage}[t]{0.45\textwidth}
    \vspace{-3ex}
    \begin{block}{Itemize}
      \verb!\begin{itemize}!\\
      \verb!\item Apple!\\
      \verb!  \begin{itemize}!\\
      \verb!  \item Red!\\
      \verb!  \item Green!\\
      \verb!  \end{itemize}!\\
      \verb!\item Banana!\\
      \verb!\end{itemize}!
    \end{block}
    \begin{itemize}
    \item Apple
      \begin{itemize}
      \item Red
      \item Green
      \end{itemize}
    \item Banana
    \end{itemize}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.45\textwidth}
    \vspace{-3ex}
    \begin{block}{Enumerate}
      \verb!\begin{enumerate}!\\
      \verb!\item Apple!\\
      \verb!  \begin{enumerate}!\\
      \verb!  \item Red!\\
      \verb!  \item Green!\\
      \verb!  \end{enumerate}!\\
      \verb!\item Banana!\\
      \verb!\end{enumerate}!
    \end{block}
    \begin{enumerate}
    \item Apple
      \begin{enumerate}
      \item Red
      \item Green
      \end{enumerate}
    \item Banana
    \end{enumerate}
  \end{minipage}
\end{frame}

\begin{frame}[fragile]{Itemize with action items}
  \begin{minipage}[t]{0.45\textwidth}
    \vspace{-2ex}
    \begin{block}{Itemize}
      \verb!\begin{itemize}!\\
        \verb!\item[\itemfilledarrow] Apple!\\
        \verb!\item<2-| alert@3> Orange!\\
        \verb!\item<2-| emph@2| uncheck@3-> Lemon!\\
        \verb!\item<3-| emph@1-> Banana!\\
        \verb!\item<3-| check@4> Mango!\\
        \verb!\item<4-| message@1-> Cherries!\\
        \verb!\item<4-> Grapes!\\
        \verb!\end{itemize}!
    \end{block}
  \end{minipage}
  \hfill
  \begin{minipage}[t]{0.45\textwidth}
    \begin{itemize}
    \item[\itemfilledarrow] Apple
    \item<2-| alert@3> Orange
    \item<2-| emph@2| uncheck@3-> Lemon
    \item<3-| emph@1-> Banana
    \item<3-| check@4> Mango
    \item<4-| message@1-> Cherries
    \item<4-> Grapes
    \end{itemize}
  \end{minipage}
  \begin{block}{Colors and fonts for message items}
    \verb!\setbeamercolor{message item}{fg=red}!\\
    \verb!\setbeamercolor{message item symbol}{fg=red}!\\
    \verb!\setbeamerfont{message item}{size=\large}!
  \end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{Alert and structure}
  \vfill
  The \verb!\alert{}! command \alert{emphasizes} text.

  \vfill
  Structural \structure{emphasis} is provided by the \verb!\structure{}! command.

  \vfill
  \begin{block}{Colors/Fonts}
    \verb!\setbeamercolor{alerted text}{fg=red}!\\
    \verb!\setbeamercolor{structure}{fg=blue}!
  \end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{Block environments with title}
  ... add structure and color to a slide --- use them with care:
  \begin{block}{Some block}
    Block with title and content\\
    \verb!\begin{block}{Some block}!\\
    \verb!  Block with title and content!\\
    \verb!\end{block}!
  \end{block}
  \begin{alertblock}{Careful!}
    \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}[fragile]{Block environments without title}
  ... add color to a slide in a more subtle way:
  \begin{block}{}
    Block with empty title.\\
    \verb!\begin{block}{}!\\
    \verb!  Block with empty title!\\
    \verb!\end{block}!
  \end{block}
  \begin{alertblock}{}
    \texttt{alertblock} with empty title.\\
    And just some text.
  \end{alertblock}
  \begin{exampleblock}{}
    \texttt{exampleblock} with empty title.\\
    And just some text.
  \end{exampleblock}
\end{frame}

\newcommand{\blockdemo}{
  \begin{block}{Some block}
    Block with title and content.
  \end{block}
}

\newcommand{\blockthemedemo}[2]{
  \vspace{-1ex}
  \setbeamertemplate{block begin}[#1]#2#2
  \setbeamertemplate{block end}[#1]#2
  \blockdemo
  \setbeamertemplate{block begin}[lines]{0.5pt}{0.5pt}
  \setbeamertemplate{block end}[lines]{0.5pt}
}

\begin{frame}[fragile]{Themes for block environments with title}
  The box of the \texttt{default} theme extends beyond \verb!\textwidth! and the title box
  is wider than the body box:\\
  \begin{small}
    \verb!\setbeamertemplate{block begin}[default]!
    \verb!\setbeamertemplate{block end}[default]!
  \end{small}
  \blockthemedemo{default}{}
  \vfill
  The box of the \texttt{rounded} theme also extends beyond \verb!\textwidth!:\\
  \begin{small}
    \verb!\setbeamertemplate{block begin}[rounded]!
    \verb!\setbeamertemplate{block end}[rounded]!
  \end{small}
  \blockthemedemo{rounded}{}
  \vfill
  The box of the \texttt{lines} theme is as wide as \verb!\textwidth!
  and the title box always has the same height:\\
  \begin{small}
    \verb!\setbeamertemplate{block begin}[lines]{0pt}{0pt}!
    \verb!\setbeamertemplate{block end}[lines]{0pt}!
  \end{small}
  \blockthemedemo{lines}{{0pt}}
\end{frame}

\renewcommand{\blockthemedemo}[2]{
  \vspace{-1ex}
  \setbeamertemplate{block begin}[#1]#2#2
  \setbeamertemplate{block end}[#1]#2
  \begin{block}{}
    Block without title.
  \end{block}
  \setbeamertemplate{block begin}[lines]{0.5pt}{0.5pt}
  \setbeamertemplate{block end}[lines]{0.5pt}
}

\begin{frame}[fragile]{Themes for block environments without title}
  The \texttt{default} theme still shows a title box:\\
  \begin{small}
    \verb!\setbeamertemplate{block begin}[default]!
    \verb!\setbeamertemplate{block end}[default]!
  \end{small}
  \blockthemedemo{default}{}
  \vfill
  The \texttt{rounded} theme works as expected:\\
  \begin{small}
    \verb!\setbeamertemplate{block begin}[rounded]!
    \verb!\setbeamertemplate{block end}[rounded]!
  \end{small}
  \blockthemedemo{rounded}{}
  \vfill
  The \texttt{lines} theme works as expected and stays within the \verb!\textwidth!:\\
  \begin{small}
    \verb!\setbeamertemplate{block begin}[lines]{0pt}{0pt}!
    \verb!\setbeamertemplate{block end}[lines]{0pt}!
  \end{small}
  \blockthemedemo{lines}{{0pt}}
\end{frame}

\newcommand{\blockcolordemo}[4]{
  \setbeamertemplate{block begin}[lines]{0pt}{0pt}
  \setbeamertemplate{block end}[lines]{0pt}
  \setbeamercolor{block title}{fg=#1, bg=#2}
  \setbeamercolor{block body}{fg=#3, bg=#4}
  \begin{small}
    \texttt{\textbackslash setbeamercolor\{block title\}\{fg=#1, bg=#2\}}\\
    \texttt{\textbackslash setbeamercolor\{block body\}\{fg=#3, bg=#4\}}\\
  \end{small}
  \blockdemo
  \setbeamertemplate{block begin}[lines]{0.5pt}{0.5pt}
  \setbeamertemplate{block end}[lines]{0.5pt}
  \setbeamercolor{block title}{fg=white, bg=blue}
  \setbeamercolor{block body}{fg=normal text.fg, bg=black!15}
}

\begin{frame}[fragile]{Colors for block environments}
  \blockcolordemo{white}{red}{blue}{blue!20}
  \vfill
  \blockcolordemo{}{}{}{}
  \vfill
  \blockcolordemo{black}{white}{black}{white}
\end{frame}

\newcommand{\blockfontdemo}[2]{
  \setbeamertemplate{block begin}[lines]{0pt}{0pt}
  \setbeamertemplate{block end}[lines]{0pt}
  \begin{small}
    \texttt{\textbackslash setbeamerfont\{block title\}\{size=\textbackslash #1\}}\\
    \texttt{\textbackslash setbeamerfont\{block body\}\{size=\textbackslash #1\}}\\
  \end{small}
  \blockdemo
  \setbeamertemplate{block begin}[lines]{0.5pt}{0.5pt}
  \setbeamertemplate{block end}[lines]{0.5pt}
  \setbeamerfont{block title}{parent=normal text}
  \setbeamerfont{block body}{parent=normal text}
}

\begin{frame}[fragile]{Fonts for block environments}
  \setbeamerfont{block title}{size=\LARGE}
  \setbeamerfont{block body}{size=\normalsize}
  \blockfontdemo{large}{normalsize}
  \vfill
  \setbeamerfont{block title}{size=\normalsize}
  \setbeamerfont{block body}{size=\tiny}
  \blockfontdemo{normalsize}{tiny}
\end{frame}

\newcommand{\blocklinedemo}[3]{
  \setbeamertemplate{block begin}[lines]{2pt}{2pt}
  \setbeamertemplate{block end}[lines]{2pt}
  \setbeamercolor{block line top}{fg=#1}
  \setbeamercolor{block line middle}{fg=#2}
  \setbeamercolor{block line bottom}{fg=#3}
  \begin{small}
    \texttt{\textbackslash setbeamercolor\{block line top\}\{fg=#1\}}\\
    \texttt{\textbackslash setbeamercolor\{block line middle\}\{fg=#2\}}\\
    \texttt{\textbackslash setbeamercolor\{block line bottom\}\{fg=#3\}}
  \end{small}
  \blockdemo
  \setbeamertemplate{block begin}[lines]{0.5pt}{0.5pt}
  \setbeamertemplate{block end}[lines]{0.5pt}
  \setbeamercolor{block line top}{fg=}
  \setbeamercolor{block line middle}{fg=}
  \setbeamercolor{block line bottom}{fg=blue}
}

\begin{frame}[fragile]{Lines for block environments}
  \blocklinedemo{blue!80!black}{white}{blue!50}
  \vfill
  \blocklinedemo{}{blue!50}{}
  \vfill
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Theorems --- for mathematicians}
  \begin{theorem}
    \texttt{theorem} environment.
  \end{theorem}
  \begin{definition}
    \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}
  %  \texttt{example} environment.
  %\end{example}
  \begin{proof}
    \texttt{proof} environment.\\
    Same colors and fonts as the \texttt{block} environment.
  \end{proof}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{Message box}
  \begin{block}{A new (non-beamer) command for highlighting messages}
    \verb!\messagebox{Take home message}!
  \end{block}
  \vfill
  \messagebox{Take home message}
  \vfill
  Use it!
  \vfill
  \begin{block}{Colors/Fonts/Template}
    \verb!\setbeamertemplate{message}[lines]{1pt}{1pt} % width top/bottom line!\\
    \verb!\setbeamercolor{message}{fg=white, bg=red}!\\
    \verb!\setbeamercolor{message line top}{fg=}!\\
    \verb!\setbeamercolor{message line bottom}{fg=}!\\
    \verb!\setbeamertemplate{message symbol}[circle]   % default, circle, arrow!\\
    \verb!\setbeamercolor{message symbol}{fg=white}!
  \end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{Quotations}
  Quote something of somebody with indentation:
  \begin{quotation}[Me And Myself]
    A \verb!quotation! environment. There is a lot to talk about and
    it really takes a lot of words to express this. Most likely this
    does not fit into a single line. We might even need yet another
    full new line.
    
    Here we even start a second paragraph.
  \end{quotation}
  \vfill
  Quote something else of somebody else without indentation:
  \begin{quote}[Me And Myself]
    A \verb!quote! environment. There is a lot to talk about and
    it really takes a lot of words to express this. Most likely this
    does not fit into a single line.
    
    Here we even start a second paragraph.
  \end{quote}
  \vfill
  Here is a poem:
  \begin{verse}
    A \verb!verse! environment ---\\with a second line.
  \end{verse}
\end{frame}

\newcommand{\quotedemo}{
  \begin{quote}[Hamlet]
    To be, or not to be.
  \end{quote}
  \vfill
}

\newcommand{\quotesymboldemo}[2]{
  \setbeamertemplate{quote symbol}[#1]#2
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{quote symbol\}[#1]#2}
  \end{small}
  \quotedemo
  \setbeamertemplate{quote symbol}[opendblquote]
}

\begin{frame}[fragile]{Quote symbol settings}
  \quotesymboldemo{default}{}
  \quotesymboldemo{closequote}{}
  \quotesymboldemo{openquote}{}
  \quotesymboldemo{closedblquote}{}
  \quotesymboldemo{opendblquote}{}
  \quotesymboldemo{opendblquote}{[2]}
\end{frame}

\newcommand{\quotesymbolfontdemo}[1]{
  \setbeamerfont{quote symbol}{family*=#1}
  \begin{small}
    \texttt{\textbackslash setbeamerfont\{quote symbol\}\{family*=#1\}}
  \end{small}
  \quotedemo
  \setbeamerfont{quote symbol}{family*=pbk}
}

\begin{frame}[fragile]{Font settings for quote symbol}
  \quotesymbolfontdemo{pbk}
  \quotesymbolfontdemo{pnc}
  \quotesymbolfontdemo{qcs}
  \quotesymbolfontdemo{phv}
\end{frame}

\newcommand{\quotesourcedemo}[1]{
  \setbeamertemplate{quote source}[#1]
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{quote source\}[#1]}
  \end{small}
  \quotedemo
  \setbeamertemplate{quote source}[rightline]
}

\begin{frame}[fragile]{Source settings for quote and quotation environments}
  Do not print the source:\\
  \quotesourcedemo{default}
  Left aligned in a new line:\\
  \quotesourcedemo{left}
  \quotesourcedemo{leftbrackets}
  \begin{alertblock}{}
    In the template names, replace \texttt{quote} by
    \texttt{quotation} to apply the same changes to the
    \texttt{quotation} environment.
  \end{alertblock}
\end{frame}

\begin{frame}[fragile]{Source settings for quote and quotation environments}
  Right aligned in a new line:
  \vfill
  \quotesourcedemo{right}
  \quotesourcedemo{rightbrackets}
  \quotesourcedemo{dashright}
  \quotesourcedemo{tilderight}
\end{frame}

\begin{frame}[fragile]{Source settings for quote and quotation environments}
  Right aligned in the last line:
  \vfill
  \quotesourcedemo{rightline}
  \quotesourcedemo{rightlinebrackets}
  \quotesourcedemo{dashrightline}
  \quotesourcedemo{tilderightline}
  In case the last line is too long, the source is printed on the next line:
  \begin{quote}[Hamlet by William Shakespeare]
    To be, or not to be, that is the question:
    Whether 'tis nobler in the mind to suffer ...
  \end{quote}
\end{frame}

\newcommand{\quotecolordemo}[2]{
  \setbeamercolor{quote line top}{fg=#1}
  \setbeamercolor{quote line bottom}{fg=#2}
  \begin{small}
    \texttt{\textbackslash setbeamercolor\{quote line top\}\{fg=#1\}}\\
    \texttt{\textbackslash setbeamercolor\{quote line bottom\}\{fg=#2\}}
  \end{small}
  \quotedemo
}

\begin{frame}[fragile]{Line settings for quote and quotation environments}
  \setbeamertemplate{quote begin}[lines][2pt]
  \setbeamertemplate{quote end}[lines][2pt]
  \begin{small}
    \verb!\setbeamertemplate{quote begin}[lines][2pt]!
    \verb!\setbeamertemplate{quote end}[lines][2pt]!
  \end{small}
  \vfill
  \quotecolordemo{}{}
  \quotecolordemo{blue}{}
  \quotecolordemo{}{blue}
  \quotecolordemo{red}{blue}
\end{frame}
\setbeamertemplate{quote begin}[lines][0.5pt]
\setbeamertemplate{quote end}[lines][0.5pt]
\setbeamercolor{quote line top}{fg=}
\setbeamercolor{quote line bottom}{fg=}

\newcommand{\quoteboxdemo}[2]{
  \setbeamercolor{quote}{fg=#1, bg=#2}
  \begin{small}
    \texttt{\textbackslash setbeamercolor\{quote\}\{fg=#1, bg=#2\}}\\
  \end{small}
  \quotedemo
  \setbeamercolor{quote}{fg=normal text.fg, bg=black!15}
}

\begin{frame}[fragile]{Colors and fonts for quote and quotation environments}
  \setbeamerfont{quote}{shape=\upshape}
  {\small \verb!\setbeamerfont{quote}{shape=\upshape}!\\}
  \quotedemo
  \setbeamerfont{quote}{size=\normalsize, shape=\slshape}
  \quoteboxdemo{blue}{}
  \quoteboxdemo{red}{black!15}
  \setbeamercolor{quote symbol}{fg=green}
  {\small \verb!\setbeamercolor{quote symbol}{fg=green}!\\}
  \quotedemo
  \setbeamercolor{quote symbol}{fg=red}
  \setbeamercolor{quote source}{fg=blue}
  {\small \verb!\setbeamercolor{quote source}{fg=blue}!\\}
  \quotedemo
  \setbeamercolor{quote source}{fg=}
  \setbeamerfont{quote source}{size=\footnotesize, shape=\itshape}
  {\small \verb!\setbeamerfont{quote source}{size=\footnotesize, shape=\itshape}!\\}
  \quotedemo
  \setbeamercolor{quote source}{fg=}
  \setbeamerfont{quote source}{size=\normalsize}
\end{frame}
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\newcommand{\colorpatch}[1]{%
  \parbox{10ex}{\centerline{\strut#1}\textcolor{#1}{\rule{10ex}{10ex}}}
  \quad}

\begin{frame}{Colors of the aptero theme}
  \vspace{1ex}
  \colorpatch{red}
  \colorpatch{orange}
  \colorpatch{yellow}
  \colorpatch{lightgreen}
  \colorpatch{green}

  \vspace{1ex}
  \colorpatch{darkgreen}
  \colorpatch{cyan}
  \colorpatch{lightblue}
  \colorpatch{blue}
  \colorpatch{purple}

  \vspace{1ex}
  \colorpatch{magenta}
  \colorpatch{pink}
  \colorpatch{white}
  \colorpatch{gray}
  \colorpatch{black}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\newcommand{\footlinecolordemo}[2]{
  \setbeamercolor{footline}{fg=#1, bg=#2}
  \begin{small}
    \texttt{\textbackslash setbeamercolor\{footline\}\{fg=#1, bg=#2\}}
  \end{small}
  \par
  \usebeamertemplate{footline}\normalsize
  \setbeamercolor{footline}{fg=black!75, bg=}
  \vfill
}

\newcommand{\footlinetemplatedemo}[1]{
  \setbeamertemplate{footline}[#1]
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{footline\}[#1]}
  \end{small}
  \par
  \usebeamertemplate{footline}\normalsize
  \setbeamertemplate{footline}[linesleft]
  \vfill
}

\begin{frame}[fragile]{Footline}
  \footlinecolordemo{blue}{}
  \footlinecolordemo{blue}{black!20}
  \setbeamercolor{footline}{fg=blue}
  \footlinetemplatedemo{linesleft}
  \footlinetemplatedemo{linesright}
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{footline\}[default]}
  \end{small}
  \par
  --- no footline ---
\end{frame}

\newcommand{\footlineboxdemo}[2]{
  \setbeamertemplate{footline line}[#1]#2
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{footline line\}[#1]#2}
  \end{small}
  \par
  \usebeamertemplate{footline}\normalsize
  \setbeamertemplate{footline line}[text][0.5pt]
  \vfill
}

\begin{frame}[fragile]{Footline line}
  \setbeamercolor{footline}{fg=blue}
  \footlineboxdemo{text}{[0.5pt]}
  \footlineboxdemo{text}{[3pt]}
  \footlineboxdemo{page}{[0.5pt]}
\end{frame}

\newcommand{\footlineseparatordemo}[2]{
  \setbeamertemplate{footline separator}[#1]#2
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{footline separator\}[#1]#2}
  \end{small}
  \par
  \usebeamertemplate{footline}\normalsize
  \setbeamertemplate{footline separator}[text][0.5pt]
  \vfill
}

\begin{frame}[fragile]{Footline separator}
  \setbeamercolor{footline}{fg=blue}
  \footlineseparatordemo{text}{[0.5pt]}
  \footlineseparatordemo{full}{[0.5pt]}
  \footlineseparatordemo{full}{[3pt]}
  \footlineseparatordemo{dash}{}
  \footlineseparatordemo{space}{}
\end{frame}

\newcommand{\footlinepagedemo}[1]{
  \setbeamertemplate{page number in head/foot}[#1]
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{page number in head/foot\}[#1]}
  \end{small}
  \par
  \usebeamertemplate{footline}\normalsize
  \setbeamertemplate{page number in head/foot}[frames]
  \vfill
}

\begin{frame}[fragile]{Footline page numbers}
  How the page in the footline is displayed can be controlled in the
  following way:
  \par\vfill
  Frame number with slide number:\\
  \footlinepagedemo{slides}
  \pause
  Frame number:\\
  \footlinepagedemo{frames}
  \pause
  Frame number with total number of frames:\\
  \footlinepagedemo{framestotal}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\section{Title page}

\begin{frame}[fragile]{Title page templates}
  \begin{block}{Title page frame}
    \verb!\begin{frame}[plain]!\\
    \verb!  \titlepage!\\
    \verb!\end{frame}!
  \end{block}
  \vspace{2ex}
  \begin{block}{Flushed left}
    \verb!\setbeamertemplate{title page}[leftlines]!
  \end{block}
  \begin{block}{Centered}
    \verb!\setbeamertemplate{title page}[centerlines]!
  \end{block}
\end{frame}

\begin{frame}[fragile,c]{Title page content}
  From top to bottom:
  \begin{enumerate}
  \item Logo images with a frametitle line below
  \item Title graphic images with a line directly below
  \item Title and subtitle with a line below
  \item Authors
  \item Institutions and date
  \end{enumerate}
\end{frame}

\begin{frame}[fragile]{Title page logo}
  \begin{block}{In preamble --- can be more than a single image!}
    \verb!\titlelogo{\includegraphics[height=6ex]{ourlogo}}!
  \end{block}
  Separate them with the \verb!\hspace{0.1\textwidth}! or \verb!\hfill! commands.
  \vspace{2ex}
  \begin{block}{Line below logo is the same as for frame titles}
    \verb!\setbeamertemplate{frametitle line}[text][0.5pt]!
  \end{block}
\end{frame}

\begin{frame}[fragile]{Title page graphic}
  \begin{block}{In preamble --- can be more than a single image!}
    \verb!\titlegraphic{\includegraphics[width=\textwidth]{amazingimage}}!
  \end{block}
  Separate them with the \verb!\hspace{0.1\textwidth}! or \verb!\hfill! commands.
  \vspace{2ex}
  \begin{block}{Line below title graphic}
    \verb!\setbeamertemplate{title page graphic line}[default][1.5ex]!
  \end{block}
  \begin{block}{Color}
    \verb!\setbeamercolor{title page graphic line}{fg=red}!\\
    Empty foreground color hides line:\\
    \verb!\setbeamercolor{title page graphic line}{fg=}!
  \end{block}
\end{frame}

\begin{frame}[fragile]{Title page title and subtitle}
  \begin{block}{In preamble}
    \verb!\title{The titel of my talk}!\\
    \verb!\subtitle{and whatever}!\\
  \end{block}
  \begin{block}{Color/Font}
    \verb!\setbeamercolor{title}{fg=black}!
  \end{block}
  \begin{block}{Line below title and subtitle}
    \verb!\setbeamertemplate{title page title line}[default][0.2ex]!
  \end{block}
  \begin{block}{Color}
    \verb!\setbeamercolor{title page title line}{fg=red}!\\
    Empty foreground color hides line:\\
    \verb!\setbeamercolor{title page title line}{fg=}!
  \end{block}
\end{frame}

\newcommand{\titlepageauthorsdemo}[1]{
  \setbeamertemplate{title page author and}[#1]
  \usebeamertemplate{title page author and}
  \author{Mary Hagedorn\inst{1} \and Walter Heiligenberg\inst{2}}
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{title page author and\}[#1]}
  \end{small}
  \par
  \insertauthor
  \setbeamertemplate{title page author and}[line]
  \vfill
}

\begin{frame}[fragile]{Title page authors}
  \begin{block}{In preamble}
    \strut\verb!\author{Mary Hagedorn\inst{1} \and Walter Heiligenberg\inst{2}}!
  \end{block}
  \titlepageauthorsdemo{space}
  \titlepageauthorsdemo{comma}
  \titlepageauthorsdemo{line}
  \titlepageauthorsdemo{and}
  \begin{block}{Color/Font}
    \verb!\setbeamercolor{author}{fg=black}!
  \end{block}
\end{frame}

\newcommand{\titlepageinstitutedemo}[1]{
  \setbeamertemplate{title page institute and}[#1]
  \usebeamertemplate{title page institute and}
  \institute{\inst{1}University \and \inst{2}Scripps}
  \begin{small}
    \texttt{\textbackslash setbeamertemplate\{title page institute and\}[#1]}
  \end{small}
  \par
  \insertinstitute
  \setbeamertemplate{title page institute and}[line]
  \vfill
}

\begin{frame}[fragile]{Title page institutes}
  \begin{block}{In preamble}
    \strut\verb!\institute{\inst{1}University \and \inst{2}Scripps}!
  \end{block}
  \titlepageinstitutedemo{space}
  \titlepageinstitutedemo{comma}
  \titlepageinstitutedemo{line}
  \begin{block}{Color/Font}
    \verb!\setbeamercolor{institute}{fg=black}!
  \end{block}
\end{frame}

\begin{frame}[fragile]{Title page date}
  \begin{block}{In preamble}
    \strut\verb!\date[2020]{ICN 2020}!
  \end{block}
  \begin{block}{Font}
    \verb!\setbeamerfont{date}{size=\normalsize}!
  \end{block}
  \begin{block}{Color}
    Same as for institutes.
  \end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\section{Sectioning pages}

\subsection{Section page}

\frame[plain]{\subsectionpage}

\begin{frame}[fragile]{Section page}
  Section commands between the frames, like
  \begin{block}{}
    \verb!\section{A new section}!
  \end{block}
  automaticallly create a special frame with section number and title.

  \begin{block}{No automatic section pages}
    \verb!\AtBeginSection{}  % in preamble!
  \end{block}
  \begin{block}{Manual insertion of a section page}
    \verb!\frame[plain]{\sectionpage}!
  \end{block}
  \begin{block}{Colors/Fonts}
    \verb!\setbeamercolor{section name}{parent=titlelike}!
    \verb!\setbeamercolor{section name separator}{parent=section name}!
    \verb!\setbeamercolor{section title}{parent=titlelike}!
  \end{block}
\end{frame}

\subsection{Subsection page}

\frame[plain]{\subsectionpage}

\begin{frame}[fragile]{Subsection pages}
  After a subsection command\\
  \begin{block}{}
    \verb!\subsection{A new subsection}!
  \end{block}
  you may want to insert a subsection page displaying the current
  section and subsection numbers and titles:
  \begin{block}{Subsection page}
    \verb!\frame[plain]{\subsectionpage}!
  \end{block}
  \vfill
  \begin{block}{Colors/Fonts}
    \verb!\setbeamercolor{subsection name}{parent=titlelike}!
    \verb!\setbeamercolor{subsection name separator}{parent=section name}!
    \verb!\setbeamercolor{subsection title}{parent=titlelike}!
  \end{block}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\section{Further reading}

\begin{frame}{Beamer user guide}
  Read the beamer user guide at
  \begin{block}{}
    \url{http://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf}
  \end{block}
  
  \vfill
  In particular
  \begin{itemize}
  \item the tutorial (section 3)
  \item the ``guidelines for creating presentations'' (section 5) --- quite nice and independent of beamer!
  \item ``creating overlays'' (section 9)
  \item section 11 for some fancy features (hyperlinks and zooming)
  \item ``local structure'' (section 12) for more infos on lists and blocks, etc.
  \end{itemize}
\end{frame}

\begin{frame}{Beamer templates}
  \begin{alertblock}{}
    Templates are a powerful method of beamer that allow you to modify
    the appearance of your presentation.
  \end{alertblock}
  \vfill
  Read the beamer user guide
  \begin{itemize}
  \item section 16.3 ``Changing the Templates Used for Different Elements of a Presentation''
  \end{itemize}

  \vfill
  You find a nice summary of common beamer template/color/font names in the
  \begin{block}{Beamer appearance cheat sheet}
    \url{http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf}
  \end{block}
\end{frame}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
