Skip to content
Snippets Groups Projects
Commit 4305aa55 authored by Leonard Fisser's avatar Leonard Fisser :frog:
Browse files

Merge branch 'add_frame_type_options' into 'master'

Add frame type options

Closes #6

See merge request e-4/utilities/tuhh_latex_presentation!7
parents 0d0f2081 58faa0bc
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ build:
stage: build
script:
- pdflatex -interaction=nonstopmode demo_tuhh_presentation
- pdflatex -interaction=nonstopmode demo_tuhh_presentation
artifacts:
paths:
- demo_tuhh_presentation.pdf
File added
......@@ -16,8 +16,10 @@
\definecolor{tuhhSocWarmGray}{RGB}{168,150,140}
\definecolor{tuhhSlideRed}{RGB}{255,79,79}
\definecolor{tuhhSlideGrey}{RGB}{242,242,242}
\setbeamercolor*{tuhh teal}{fg=tuhhTeal}
\setbeamercolor*{tuhh slideGrey}{fg=tuhhSlideGrey}
\setbeamercolor*{tuhh slideRed}{fg=tuhhSlideRed}
\setbeamercolor*{tuhh slideViolet}{fg=tuhhTecViolet}
......
\mode<presentation>
\setbeamertemplate{background}{
\begin{tikzpicture}
\ifnum\thepage>1\relax%
\begin{beamercolorbox}{tuhh teal}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[outer sep=0, inner sep=0] (tuhh_logo) at (309.42mm+7.91mm, \the\paperheight-28.05mm) {\includegraphics[width=25.82mm]{.theme_imgs/TUHH_logo_rgb.pdf}};
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
%date
\node[rectangle,
minimum width = 32.10mm,
minimum height = 15.99 mm,
text width = 32.10mm,
align=center,
outer sep = 0mm,
inner sep = 0.0mm,
anchor = west,
] at (301.22mm, \the\paperheight-5.24mm-180.00mm) {\usebeamerfont{date_small}\insertdate};
%slide number
\node[rectangle,
minimum width = 32.10mm,
minimum height = 4.0mm,
text width = 32.10mm,
align=center,
outer sep = 0mm,
inner sep = 0.0mm,
anchor = west,
] at (301.22mm, \the\paperheight-140.26mm) {\usebeamerfont{frame_number}\insertframenumber};
\defbeamertemplate{content_frame}{tuhh}[1][]{
\usebeamertemplate{content_frame_background}
}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\defbeamertemplate*{content_frame_background}{tuhh}[1][]{
\setbeamertemplate{background}{
\begin{tikzpicture}
\begin{beamercolorbox}{tuhh teal}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[outer sep=0, inner sep=0] (tuhh_logo) at (309.42mm+7.91mm, \the\paperheight-28.05mm) {\includegraphics[width=25.82mm]{.theme_imgs/TUHH_logo_rgb.pdf}};
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
%date
\node[rectangle,
draw,
line width = 1pt,
minimum width = 327.91mm,
minimum height = 179.99mm,
outer sep = 5.34mm,
anchor = south west,
] at (0, 0) {};
minimum width = 32.10mm,
minimum height = 15.99 mm,
text width = 32.10mm,
align=center,
outer sep = 0mm,
inner sep = 0.0mm,
anchor = west,
] at (301.22mm, \the\paperheight-5.24mm-180.00mm) {\usebeamerfont{date_small}\insertdate};
%slide number
\node[rectangle,
minimum width = 32.10mm,
minimum height = 4.0mm,
text width = 32.10mm,
align=center,
outer sep = 0mm,
inner sep = 0.0mm,
anchor = west,
] at (301.22mm, \the\paperheight-140.26mm) {\usebeamerfont{frame_number}\insertframenumber};
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[rectangle,
draw,
line width = 1pt,
minimum width = 327.91mm,
minimum height = 179.99mm,
outer sep = 5.34mm,
anchor = south west,
] at (0, 0) {};
%upper horz 1
\draw[line width = 1pt] (5.33mm, \the\paperheight-37.26mm) -- (5.33mm+295.89mm,\the\paperheight-37.26mm) {};
......@@ -49,10 +53,91 @@
%first vert
\draw[line width = 1pt] (301.22mm, \the\paperheight-5.24mm) -- (301.22mm, \the\paperheight-5.24mm-180.00mm) {};
\end{beamercolorbox}%
\fi
\end{tikzpicture}
}
}
% First page is always landing page
\ifnum\thepage<2\relax%
\defbeamertemplate*{plain_background}{tuhh}[1][]{
\setbeamertemplate{background}{}
}
\defbeamertemplate*{agenda_frame}{tuhh}[1][]{
\setbeamertemplate{background}{
\begin{tikzpicture}
\begin{beamercolorbox}{tuhh teal}
\usebeamercolor{tuhh slideGrey}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[rectangle,
fill=fg,
minimum width = 198.03mm,
minimum height = 180.00mm,
text width = 0,
align=center,
outer sep = 0mm,
inner sep = 0.0mm,
anchor = north west,
] at (103.33 mm, \the\paperheight-7.91mm-5.26mm) {};
\usebeamercolor{tuhh teal}
\node[outer sep=0, inner sep=0, anchor=west] (thank you) at (18.08mm, \the\paperheight-15.99mm-44.22mm) {\usebeamerfont{title} Agenda:};
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[outer sep=0, inner sep=0] (tuhh_logo) at (5.29mm+29.755mm, \the\paperheight-122.41mm-25.815mm) {\includegraphics[width=59.51mm]{.theme_imgs/TUHH_agenda_icon.pdf}};
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[outer sep=0, inner sep=0] (tuhh_logo) at (309.42mm+7.91mm, \the\paperheight-28.05mm) {\includegraphics[width=25.82mm]{.theme_imgs/TUHH_logo_rgb.pdf}};
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
%date
\node[rectangle,
minimum width = 32.10mm,
minimum height = 15.99 mm,
text width = 32.10mm,
align=center,
outer sep = 0mm,
inner sep = 0.0mm,
anchor = west,
] at (301.22mm, \the\paperheight-5.24mm-180.00mm) {\usebeamerfont{date_small}\insertdate};
%slide number
\node[rectangle,
minimum width = 32.10mm,
minimum height = 4.0mm,
text width = 32.10mm,
align=center,
outer sep = 0mm,
inner sep = 0.0mm,
anchor = west,
] at (301.22mm, \the\paperheight-140.26mm) {\usebeamerfont{frame_number}\insertframenumber};
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[rectangle,
draw,
line width = 1pt,
minimum width = 327.91mm,
minimum height = 179.99mm,
outer sep = 5.34mm,
anchor = south west,
] at (0, 0) {};
%mid horz 1
\draw[line width = 1pt] (301.22mm, \the\paperheight-95.25mm) -- (301.22mm+32.10mm, \the\paperheight-95.25mm) {};
%mid horz 2
\draw[line width = 1pt] (5.34mm, \the\paperheight-95.25mm) -- (5.34mm+97.98mm, \the\paperheight-95.25mm) {};
%lower horz 1
\draw[line width = 1pt] (301.22mm, \the\paperheight-169.25 mm) -- (301.22mm+32.10mm, \the\paperheight-169.25 mm) {};
%first vert
\draw[line width = 1pt] (301.22mm, \the\paperheight-5.24mm) -- (301.22mm, \the\paperheight-5.24mm-180.00mm) {};
%second vert
\draw[line width = 1pt] (103.33mm, \the\paperheight-5.24mm) -- (103.33mm, \the\paperheight-5.24mm-180.00mm) {};
\end{beamercolorbox}%
\end{tikzpicture}
}
}
% Title page
\defbeamertemplate*{titlepage_frame}{tuhh}[1][]
{
\setbeamertemplate{background}{
\begin{tikzpicture}
% TUHH Logo
\node[outer sep=0, inner sep=0] (tuhh_logo) at (19.07mm+25.875mm, \the\paperheight-109.93mm-18.923mm) {\includegraphics[width=73.75mm]{.theme_imgs/TUHH_logo-wortmarke_en_rgb.pdf}};
% TUHH Building A
......@@ -93,32 +178,13 @@
% Third Red Circle
\draw[fg,fill=fg] (126.96mm+1.325mm, \the\paperheight-141.20mm-1.325mm) circle (1.325mm);
\end{beamercolorbox}%
\fi
\end{tikzpicture}
\end{tikzpicture}
}
}
% Title page
\defbeamertemplate*{title page}{tuhh}[1][]
{
\begin{beamercolorbox}[leftskip=0mm,wd=142.19mm,dp=66.32mm,ht=66.32mm,#1]{title page header}
\usebeamerfont{title}\inserttitle%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=1mm,ht=14mm,#1]{title page header}
% Margin Placeholder
\end{beamercolorbox}%
\begin{beamercolorbox}[leftskip=114.285mm,wd=550mm,#1]{title page header}
\usebeamerfont{date}\DTMsetdatestyle{ddmmyyyy}\insertdate
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=1mm,ht=12mm,#1]{title page header}
% Margin Placeholder
\end{beamercolorbox}%
\begin{beamercolorbox}[leftskip=21.336mm,wd=550mm,#1]{title page header}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}%
}
\setbeamertemplate{endpage}{
{\setbeamertemplate{background}
\defbeamertemplate*{endpage_frame}{tuhh}[1][]{
\setbeamertemplate{background}
{
\begin{tikzpicture}
\begin{beamercolorbox}{tuhh teal}
......@@ -183,10 +249,6 @@
\draw[fg,line width = 1pt,fill=fg] (131.37mm+18.99mm, \the\paperheight-147.33mm-18.99mm) circle (2.5mm);
\end{beamercolorbox}%
\end{tikzpicture}
}
\begin{frame}
\end{frame}
}
}
......
......@@ -12,5 +12,26 @@
\end{beamercolorbox}%
}
% Title page content title
\defbeamertemplate*{titlepage}{}[1][]
{
\begin{beamercolorbox}[leftskip=0mm,wd=142.19mm,dp=66.32mm,ht=57mm,#1]{title page header}
\usebeamerfont{title}\inserttitle%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=1mm,ht=14mm,#1]{title page header}
% Margin Placeholder
\end{beamercolorbox}%
\begin{beamercolorbox}[leftskip=114.285mm,wd=550mm,#1]{title page header}
\usebeamerfont{date}\DTMsetdatestyle{ddmmyyyy}\insertdate
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=1mm,ht=12mm,#1]{title page header}
% Margin Placeholder
\end{beamercolorbox}%
\begin{beamercolorbox}[leftskip=21.336mm,wd=550mm,#1]{title page header}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}%
}
\mode
<all>
\ No newline at end of file
......@@ -27,4 +27,80 @@
\setlist[enumerate]{leftmargin=\leftmargini, label=\makebox[0.5em][c]{\arabic*}.}
\setlist[itemize]{leftmargin=\leftmargini, label=\raisebox{0.375ex}{\footnotesize$\bullet$}}
% A default frame should always use a content_frame background
\BeforeBeginEnvironment{frame}{%
\setbeamertemplate{content_frame}{\usebeamertemplate{content_frame_background}}
\usebeamertemplate{content_frame}%
}
% Titlepage definition
\makeatletter
\define@key{beamerframe}{titlepage}[true]{%
\setbeamertemplate{content_frame}{\usebeamertemplate{titlepage_frame}}
\usebeamertemplate{content_frame}%
}
\makeatother
\renewcommand*{\titlepage}{
\begin{frame}[titlepage]
\usebeamertemplate{titlepage}
\end{frame}
}
% Finalpage definition
\makeatletter
\define@key{beamerframe}{finalpage}[true]{%
\setbeamertemplate{content_frame}{\usebeamertemplate{endpage_frame}}
\usebeamertemplate{content_frame}%
}
\makeatother
% Custom final page setup
\newcommand{\finalpage}{
\begin{frame}[finalpage]
\end{frame}
}
% Renew TOC command to indent it to the grey rectangle
\let\oldTableOfContents\tableofcontents
\renewcommand*{\tableofcontents}{
\begin{minipage}{98.99mm}
\hfill
\end{minipage}
\begin{minipage}[c][137.74mm]{0.4\textwidth}
\oldTableOfContents
\end{minipage}
}
% Add section numbers to TOC
\setbeamertemplate{section in toc}{\makebox[0.5em][c]{\inserttocsectionnumber}.~\inserttocsection}
% Adjust TOC entry spacing
\makeatletter
\patchcmd{\beamer@sectionintoc}
{\vfill}
{\vskip 1em}
{}
{}
\pretocmd{\beamer@subsectionintoc}
{\vskip 0.25em}
{}
{}
% Finalpage definition
\makeatletter
\define@key{beamerframe}{agenda}[true]{%
\setbeamertemplate{content_frame}{\usebeamertemplate{agenda_frame}}
\usebeamertemplate{content_frame}%
}
\makeatother
% Plain page definition
\makeatletter
\define@key{beamerframe}{plain}[true]{%
\setbeamertemplate{content_frame}{\usebeamertemplate{plain_background}}
\usebeamertemplate{content_frame}%
}
\makeatother
\mode<all>
\ No newline at end of file
......@@ -9,11 +9,20 @@
\institute{Corresponding Authors Institute}
\telephonenumber{+49 40 42878-3330}
\begin{document}
\titlepage
\begin{frame}[agenda]
\tableofcontents
\end{frame}
% Frame 1
\begin{frame}{This is a presentation slide!}
\section{Section Title}
\subsection{Subsection Title}
\begin{minipage}{0.49\textwidth}
\begin{itemize}
\item This is an item.
......@@ -36,6 +45,8 @@
% Frame 2
\begin{frame}{This is a second presentation slide!}
\section{Section Title}
\centering{\textbf{This is the place where you can write your content in bold.}}
\centering{\textit{This is the place where you can write your content in italic.}}
......
......@@ -14,10 +14,6 @@
\AtBeginDocument{\usebeamerfont{normal text}}
\newcommand{\finalpage}{
\usebeamertemplate{endpage}
}
\def\telephonenumber{\@dblarg\beamer@telephonenumber}
\long\def\beamer@telephonenumber[#1]#2{%
\def\inserttelephonenumber{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}#2}%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment