-
Notifications
You must be signed in to change notification settings - Fork 4
/
beamerinnerthemepolimi.sty
99 lines (86 loc) · 4.11 KB
/
beamerinnerthemepolimi.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
\mode<presentation>
% Background.
\defbeamertemplate*{background}{polimi}{
% Titlepage.
\ifnum\c@framenumber=0
\begin{tikzpicture}[overlay, remember picture]
\if@bgphoto
\node at (current page.north) [anchor=north, inner sep=0pt] {\includegraphics[width=\paperwidth]{bgphoto_cut.jpg}};
\fi
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.4415\paperheight, fill=bluePolimi] {};
\if@nologo\else
\node at (foot.north) [anchor=south, inner sep=0.5cm] {
\if@bgphoto
\includegraphics[width=0.3\paperwidth]{logo_centrato_COL_negativo.png}
\else
\includegraphics[width=0.3\paperwidth]{logo_centrato_COL_positivo.png}
\fi
};
\fi
\node at ([shift={(0, -0.1)}] foot.north) {\includegraphics[width=\paperwidth]{decoration.pdf}};
\end{tikzpicture}
\else
\begin{tikzpicture}[overlay, remember picture]
\node (head) at (current page.north) [anchor=north, minimum width=\paperwidth, minimum height=0.1835\paperheight, fill=bluePolimi] {};
\node at ([shift={(0, 0.1)}] head.south) {\includegraphics[width=\paperwidth]{decoration.pdf}};
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.105\paperheight, fill=bluePolimi] {};
\end{tikzpicture}
\fi
}
% Only footer background.
\defbeamertemplate*{background}{footer}{
\begin{tikzpicture}[overlay, remember picture]
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.105\paperheight, fill=bluePolimi] {};
\end{tikzpicture}
}
% Title page.
\defbeamertemplate*{title page}{polimi}[1][]
{
\color{white}
\vspace{4.25cm}
\begin{minipage}[t][\baselineskip]{\paperwidth}
{\Large\bf \inserttitle}
\end{minipage}
\\[\baselineskip]
\begin{minipage}[t][2\baselineskip]{\paperwidth}
{\large \insertsubtitle}
\end{minipage}
\vfill
\begin{minipage}[t][\baselineskip]{\paperwidth}
{\large\bf \insertauthor}
\end{minipage}
\begin{minipage}[t][\baselineskip]{\paperwidth}
\insertdate
\end{minipage}
\vfill
\addtocounter{framenumber}{-1}
}
% Table of Contents.
\setbeamertemplate{section in toc}[circle]
\setbeamertemplate{subsection in toc}{\leavevmode \leftskip=0.7em {\color{bluePolimi} $\bullet$} \hskip1pt \inserttocsubsection\par}
% Section page.
\defbeamertemplate*{section page}{polimi}{
\begin{tikzpicture}[overlay, remember picture]
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.4415\paperheight, fill=bluePolimi] {};
\node at ([shift={(0, -0.1)}] foot.north) {\includegraphics[width=\paperwidth]{decoration.pdf}};
\path let \p1 = ([shift={(0, 0.105\paperheight+0.25)}] current page.south west), \p2 = (current page.east) in (\x1, \y1) edge [white, line width=0.5] (\x2, \y1);
\node at ([shift={(\xshift, 3.5)}] current page.south west) [anchor=north west, inner sep=0pt, text width=\textwidth]
{
{\color{white}\Large\bf \insertsection}
};
\end{tikzpicture}
}
\setbeamertemplate{section page}[polimi]
% Subsection page.
\defbeamertemplate*{subsection page}{polimi}{
\begin{tikzpicture}[overlay, remember picture]
\node (foot) at (current page.south) [anchor=south, minimum width=\paperwidth, minimum height=0.4415\paperheight, fill=bluePolimi] {};
\node at ([shift={(0, -0.1)}] foot.north) {\includegraphics[width=\paperwidth]{decoration.pdf}};
\path let \p1 = ([shift={(0, 0.105\paperheight+0.25)}] current page.south east), \p2 = (current page.west) in (\paperwidth,\y1) edge [white, line width=0.5] (\x2,\y1);
\node at ([shift={(\xshift, 3.5)}] current page.south west) [anchor=north west, inner sep=0pt, text width=\textwidth]
{
{\color{white}\Large\bf \insertsubsection}
};
\end{tikzpicture}
}
\setbeamertemplate{subsection page}[polimi]