forked from luistar/unina-beamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamerinnerthemeUniNA.sty
153 lines (139 loc) · 4.63 KB
/
beamerinnerthemeUniNA.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerinnerthemeUniNA}[2018/11/16 An unofficial beamer theme for the University of Naples "Federico II"]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Theme options and definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{tikz}
\usetikzlibrary{external}
\usepackage{setspace}
\usepackage{transparent}
\usepackage[export]{adjustbox}
\DeclareOptionBeamer{sectionpages}{\def\beamersectionpages{true}}
\ProcessOptionsBeamer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%beamer specific options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>%refers to the first four modes (beamer,handout,second and trans). That is, to all modes except the article mode
{
%\setbeamersize{margin left=1cm,margin right=1cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%templates
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%title page
\setbeamertemplate{title page}{%
\begin{minipage}[b][\paperheight]{\textwidth}
\begin{tikzpicture}[overlay, remember picture]%
\node[anchor=center] at (current page.center) {%
{\transparent{0.05}\includegraphics[scale=.9]{_figures/logo-federico-II-blue.pdf}}%
};%
\end{tikzpicture}%
\vfill
%\centering
%\vspace*{\baselineskip}
{
\setstretch{1.25}
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
}
{
\ifx\insertsubtitle\empty
\else
\vspace*{\baselineskip}\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par
\fi
}\vspace*{\baselineskip}
\begin{beamercolorbox}[wd=\paperwidth,ht=.5\paperheight,sep=1cm]{frametitle}%
{\usebeamerfont{date}\insertdate}\vspace*{\baselineskip}
{\usebeamerfont{author}\insertauthor}\vspace*{\baselineskip}
{\usebeamerfont{institute}\insertinstitute}\vspace*{\baselineskip}
%{\inserttitlegraphic}
\begin{tikzpicture}[overlay, remember picture]%
%\node[anchor=center] at (current page.south) {%
% {\transparent{0.05}\includegraphics[scale=.85]{_figures/logo-federico-II-white.pdf}}%
%};%
\node[anchor=north] at (current page.center) {%
{\transparent{0.05}\adjincludegraphics[trim={0 0 0 {.5125\height}},scale=.9]{_figures/logo-federico-II-white.pdf}}%
};%
\end{tikzpicture}%
\end{beamercolorbox}%
\end{minipage}
}
\def\maketitle{%
\ifbeamer@inframe
\titlepage
\else
\frame[plain,noframenumbering]{\titlepage}
\fi
}
%standout page
\defbeamertemplate{standout page}{text}[1]{%
\begin{tikzpicture}[overlay, remember picture]%
\draw[fill=uninablue] (current page.south west) rectangle (current page.north east);
\node[anchor=center] at (current page.center) {%
{\transparent{0.05}\includegraphics[scale=.9]{_figures/logo-federico-II-white.pdf}}%
};%
\end{tikzpicture}%
\begin{minipage}[c][\textheight][c]{\textwidth}
\centering
%\vfill
{\usebeamercolor[fg]{frametitle}\Large #1}
%\vfill
%{\inserttitlegraphic}\vspace*{\baselineskip}
\end{minipage}
}
\newcommand{\standoutpage}[1]{%
\setbeamertemplate{standout page}[text]{#1}
\usebeamertemplate{standout page}
}
%standout page light
\defbeamertemplate{standout page light}{text}[1]{%
\begin{tikzpicture}[overlay, remember picture]%
\node[anchor=center] at (current page.center) {%
{\transparent{0.05}\includegraphics[scale=.9]{_figures/logo-federico-II-blue.pdf}}%
};%
\end{tikzpicture}%
\begin{minipage}[c][\textheight][c]{\textwidth}
\centering
%\vfill
{\Large #1}
%\vfill
%{\inserttitlegraphic}\vspace*{\baselineskip}
\end{minipage}
}
\newcommand{\standoutpagelight}[1]{%
\setbeamertemplate{standout page light}[text]{#1}
\usebeamertemplate{standout page light}
}
% Section pages
%standout page light
\defbeamertemplate{section page light}{text}[1]{%
\begin{tikzpicture}[overlay, remember picture]%
\node[anchor=center] at (current page.center) {%
{\transparent{0.05}\includegraphics[scale=.9]{_figures/logo-federico-II-blue.pdf}}%
};%
\end{tikzpicture}%
\begin{minipage}[l][\textheight][c]{\textwidth}
%\centering
%\vfill
{\setstretch{2}\usebeamerfont{title}\usebeamercolor[bg]{frametitle} #1}
%\vfill
%{\inserttitlegraphic}\vspace*{\baselineskip}
\end{minipage}
}
\newcommand{\sectionpagelight}[1]{%
\setbeamertemplate{section page light}[text]{#1}
\usebeamertemplate{section page light}
}
\ifx\beamersectionpages\undefined% section frames
%nothing
\else
\AtBeginSection{
\ifbeamer@inframe
\standoutpage{\insertsectionhead}
\else
\begin{frame}[plain,c,noframenumbering]
\sectionpagelight{\insertsectionhead}
\end{frame}
\fi
}
\fi
}%end of beamer specific options
\mode<all>