From 409067c8748e075c2789e51f57cd9794d8064e0b Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Sat, 24 Apr 2021 23:24:24 +0200 Subject: [PATCH] added sectiongraphic and subsectiongraphic --- beamercolorthemeaptero.sty | 4 ++++ beamercolorthemeut.sty | 4 ++++ beamerthemelines.sty | 44 +++++++++++++++++++++++++++++++++++--- beamerthemeut.sty | 3 +++ lines-example.tex | 18 ++++++++++++++-- lines-manual.tex | 37 ++++++++++++++++++++++++++++---- ut-example.tex | 16 ++++++++++++-- 7 files changed, 115 insertions(+), 11 deletions(-) diff --git a/beamercolorthemeaptero.sty b/beamercolorthemeaptero.sty index 019f5cb..69b5e52 100644 --- a/beamercolorthemeaptero.sty +++ b/beamercolorthemeaptero.sty @@ -114,14 +114,18 @@ \setbeamercolor{title page}{parent=normal text} \setbeamercolor{title page graphic line}{use=title, fg=title.fg} \setbeamercolor{title page title line}{use=title, fg=title.fg} +\setbeamercolor{titlelogo}{parent=normal text} +\setbeamercolor{titlegraphic}{parent=normal text} \setbeamercolor{section name}{parent=structure} \setbeamercolor{section name separator}{parent=section name} \setbeamercolor{section title}{parent=titlelike} +\setbeamercolor{sectiongraphic}{use=normal text, fg=normal text.fg, bg=normal text.fg!15} \setbeamercolor{subsection name}{parent=structure} \setbeamercolor{subsection name separator}{parent=section name} \setbeamercolor{subsection title}{parent=titlelike} +\setbeamercolor{subsectiongraphic}{use=normal text, fg=normal text.fg, bg=normal text.fg!15} % color of numbers in table of columns (sections get hyperref linkcolor): \setbeamercolor{section in toc}{parent=normal text} diff --git a/beamercolorthemeut.sty b/beamercolorthemeut.sty index e89816e..f8abe33 100644 --- a/beamercolorthemeut.sty +++ b/beamercolorthemeut.sty @@ -116,14 +116,18 @@ \setbeamercolor{title page logo line}{fg=} \setbeamercolor{title page graphic line}{fg=utred} \setbeamercolor{title page title line}{fg=} +\setbeamercolor{titlelogo}{parent=normal text} +\setbeamercolor{titlegraphic}{fg=white, bg=utgray} \setbeamercolor{section name}{parent=titlelike} \setbeamercolor{section name separator}{fg=utgold} \setbeamercolor{section title}{parent=titlelike} +\setbeamercolor{sectiongraphic}{fg=white, bg=utgray} \setbeamercolor{subsection name}{parent=titlelike} \setbeamercolor{subsection name separator}{fg=utgold} \setbeamercolor{subsection title}{parent=titlelike} +\setbeamercolor{subsectiongraphic}{fg=white, bg=utgray} % color of numbers in table of columns (sections get hyperref linkcolor): \setbeamercolor{section in toc}{use=normal text, fg=normal text.fg!60} diff --git a/beamerthemelines.sty b/beamerthemelines.sty index 18a80a0..15df99c 100644 --- a/beamerthemelines.sty +++ b/beamerthemelines.sty @@ -52,6 +52,20 @@ \titlelogo{} } +%%%%% \sectiongraphic command: + +\mode{ + \newcommand\sectiongraphic[1]{\def\insertsectiongraphic{#1}} + \sectiongraphic{} +} + +%%%%% \subsectiongraphic command: + +\mode{ + \newcommand\subsectiongraphic[1]{\def\insertsubsectiongraphic{#1}} + \subsectiongraphic{} +} + \mode @@ -944,11 +958,11 @@ %%%%% section page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% section page separator: space +% section name separator: space \defbeamertemplate{section name separator}{space}{} -% section page separator: text +% section name separator: text \defbeamertemplate{section name separator}{text}[1][1pt]% {{\usebeamercolor[fg]{section name separator}\rule[-0.5ex]{#1}{2.4ex}}} @@ -971,6 +985,12 @@ \begin{column}{0.9\textwidth} \usebeamerfont{section title}% {\usebeamercolor[fg]{section title}\hypersetup{linkcolor=}\insertsection}% + \ifx\insertsectiongraphic\@empty\else% + \vspace{1.5ex} + \begin{beamercolorbox}[wd=\linewidth]{sectiongraphic} + \insertsectiongraphic% + \end{beamercolorbox}% + \fi \end{column} \end{columns} } @@ -1003,7 +1023,19 @@ \defbeamertemplate{subsection page}{left}[1][0.3\textheight]% { - \usebeamertemplate{section page} + \vspace{#1}% + \begin{columns}[t,onlytextwidth] + \begin{column}{0.1\textwidth} + \usebeamerfont{section name}% + \raggedleft{\usebeamercolor[fg]{section name}% + \makebox[0.5\linewidth][r]{\insertsectionnumber}% + \makebox[0.5\linewidth][c]{\usebeamertemplate{section name separator}}}% + \end{column} + \begin{column}{0.9\textwidth} + \usebeamerfont{section title}% + {\usebeamercolor[fg]{section title}\hypersetup{linkcolor=}\insertsection}% + \end{column} + \end{columns} \vspace{2ex} \begin{columns}[t,onlytextwidth] \begin{column}{0.1\textwidth} @@ -1016,6 +1048,12 @@ \begin{column}{0.9\textwidth} \usebeamerfont{subsection title}% {\usebeamercolor[fg]{subsection title}\hypersetup{linkcolor=}\insertsubsection}% + \ifx\insertsectiongraphic\@empty\else% + \vspace{1.5ex} + \begin{beamercolorbox}[wd=\linewidth]{subsectiongraphic} + \insertsubsectiongraphic% + \end{beamercolorbox}% + \fi \end{column} \end{columns} } diff --git a/beamerthemeut.sty b/beamerthemeut.sty index c915daa..163d751 100644 --- a/beamerthemeut.sty +++ b/beamerthemeut.sty @@ -99,7 +99,10 @@ \setbeamertemplate{message}[lines]{0.5pt}{0.5pt} % default, lines \setbeamertemplate{section name separator}[text][2pt] % space, text +\setbeamertemplate{section page}[left][0.3\textheight] + \setbeamertemplate{subsection name separator}[text][2pt] % space, text +\setbeamertemplate{subsection page}[left][0.3\textheight] % default, (sub)sections numbered, circle, square, ball, ball unnumbered: \setbeamertemplate{section in toc}[sections numbered] diff --git a/lines-example.tex b/lines-example.tex index 8d2fcd3..e570686 100644 --- a/lines-example.tex +++ b/lines-example.tex @@ -7,6 +7,9 @@ \author[Benda]{Jan Benda} \institute[T\"ubingen]{Neuroethology, University of T\"ubingen} \date[2021]{March 2021} +\logo{} +\titlelogo{} +\titlegraphic{} \setbeamerfont{block body}{size=\small} @@ -403,7 +406,7 @@ \begin{block}{} \verb!\section{A new section}! \end{block} - automaticallly create a special frame with section number and title. + automaticallly create a special frame displaying the section number and title. \vfill \begin{block}{No automatic section pages} \verb!\AtBeginSection{} % in preamble! @@ -412,6 +415,11 @@ \begin{block}{Manual insertion of a section page} \verb!\frame[plain]{\sectionpage}! \end{block} + \vfill + \begin{block}{Section graphic} + In preamble or right before a new section:\\ + \verb!\sectiongraphic{\includegraphics[width=\linewidth]{amazingimage}}! + \end{block} \end{frame} \subsection{Subsection page} @@ -419,7 +427,8 @@ \frame[plain]{\subsectionpage} \begin{frame}[c,fragile]{Subsection pages} - After a subsection command\\ + After a subsection command + \vfill \begin{block}{} \verb!\subsection{A new subsection}! \end{block} @@ -430,6 +439,11 @@ \begin{block}{Subsection page} \verb!\frame[plain]{\subsectionpage}! \end{block} + \vfill + \begin{block}{Subsection graphic} + In preamble or right before a new subsection:\\ + \verb!\subsectiongraphic{\includegraphics[width=\linewidth]{amazingimage}}! + \end{block} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lines-manual.tex b/lines-manual.tex index d54322c..edeeba1 100644 --- a/lines-manual.tex +++ b/lines-manual.tex @@ -7,6 +7,9 @@ \author[Benda]{Jan Benda} \institute[T\"ubingen]{Neuroethology, University of T\"ubingen} \date[2021]{April 2021} +\logo{} +\titlelogo{} +\titlegraphic{} \setbeamerfont{block body}{size=\small} @@ -19,7 +22,7 @@ \end{frame} \begin{frame}[fragile]{Lines theme} - \begin{block}{Include} + \begin{block}{\LaTeX preamble} \verb!\documentclass[aspectratio=169,t]{beamer}!\\ \verb!\usetheme[author,date,title,page,hidelogo]{lines}! \end{block} @@ -733,7 +736,8 @@ \begin{block}{Color} \verb!\setbeamercolor{title page logo line}{fg=red}!\\ Empty foreground color hides line:\\ - \verb!\setbeamercolor{title page logo line}{fg=}! + \verb!\setbeamercolor{title page logo line}{fg=}!\\ + \verb!\setbeamercolor{titlelogo}{bg=gray}! \end{block} \end{frame} @@ -749,7 +753,8 @@ \begin{block}{Color} \verb!\setbeamercolor{title page graphic line}{fg=red}!\\ Empty foreground color hides line:\\ - \verb!\setbeamercolor{title page graphic line}{fg=}! + \verb!\setbeamercolor{title page graphic line}{fg=}!\\ + \verb!\setbeamercolor{titlegraphic}{bg=gray}! \end{block} \end{frame} @@ -835,6 +840,7 @@ \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\sectiongraphic{This could\\ be a\\ section\\ image!} \section{Sectioning pages} \subsection{Section page} @@ -846,7 +852,7 @@ \begin{block}{} \verb!\section{A new section}! \end{block} - automaticallly create a special frame with section number and title. + automaticallly create a special frame displaying the section number and title. \begin{block}{No automatic section pages} \verb!\AtBeginSection{} % in preamble! @@ -861,6 +867,17 @@ \end{block} \end{frame} +\begin{frame}[fragile]{Section page graphic} + \begin{block}{In preamble or right before a new section} + \verb!\sectiongraphic{\includegraphics[width=\linewidth]{amazingimage}}! + \end{block} + \vfill + \begin{block}{Color} + \verb!\setbeamercolor{sectiongraphic}{bg=gray}! + \end{block} +\end{frame} + +\subsectiongraphic{This could\\ be a\\ subsection\\ image!} \subsection{Subsection page} \frame[plain]{\subsectionpage} @@ -883,7 +900,19 @@ \end{block} \end{frame} +\begin{frame}[fragile]{Subsection page graphic} + \begin{block}{In preamble or right before a new subsection} + \verb!\subsectiongraphic{\includegraphics[width=\linewidth]{amazingimage}}! + \end{block} + \vfill + \begin{block}{Color} + \verb!\setbeamercolor{subsectiongraphic}{bg=gray}! + \end{block} +\end{frame} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\sectiongraphic{} +\subsectiongraphic{} \section{Further reading} \begin{frame}{Beamer templates} diff --git a/ut-example.tex b/ut-example.tex index 3989c6b..01d936d 100644 --- a/ut-example.tex +++ b/ut-example.tex @@ -9,7 +9,7 @@ \titlelogo{\includegraphics[height=5ex]{UT_MNF_RGB}\hfill% \includegraphics[height=6ex]{BCCN_Tuebingen_Logo-long}\hfill% \includegraphics[height=5ex]{CIN-E}} -\titlegraphic{\includegraphics[width=\textwidth]{efishtitle}} +\titlegraphic{\includegraphics[width=1\textwidth]{efishtitle}} \setbeamerfont{block body}{size=\small} @@ -394,7 +394,7 @@ \begin{block}{} \verb!\section{A new section}! \end{block} - automaticallly create a special frame with section number and title. + automaticallly create a special frame displaying the section number and title. \vfill \begin{block}{No automatic section pages} \verb!\AtBeginSection{} % in preamble! @@ -403,6 +403,11 @@ \begin{block}{Manual insertion of a section page} \verb!\frame[plain]{\sectionpage}! \end{block} + \vfill + \begin{block}{Section graphic} + In preamble or right before a new section:\\ + \verb!\sectiongraphic{\includegraphics[width=\linewidth]{amazingimage}}! + \end{block} \end{frame} \subsection{Subsection page} @@ -411,15 +416,22 @@ \begin{frame}[fragile]{Subsection pages} After a subsection command + \vfill \begin{block}{} \verb!\subsection{A new subsection}! \end{block} + \vfill you may want to insert a subsection page displaying the current section and subsection numbers and titles: \vfill \begin{block}{Subsection page} \verb!\frame[plain]{\subsectionpage}! \end{block} + \vfill + \begin{block}{Subsection graphic} + In preamble or right before a new subsection:\\ + \verb!\subsectiongraphic{\includegraphics[width=\linewidth]{amazingimage}}! + \end{block} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%