-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbeamerthemenumpex.sty
More file actions
318 lines (258 loc) · 11.2 KB
/
Copy pathbeamerthemenumpex.sty
File metadata and controls
318 lines (258 loc) · 11.2 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
% Beamer numpex
%
% Copyright 2014 Matthias Vogelgesang
% Licensed under CC-BY-SA 4.0 International.
%
% The initial template comes from the HSRM beamer theme by Benjamin Weiss, which
% you can find at https://github.com/hsrmbeamertheme/hsrmbeamertheme.
%
\ProvidesPackage{beamerthemenumpex}
%{{{ --- Options ----------------------
% Lengths.
% \newlength{\beamer@fancy@lineup}
% \setlength{\beamer@fancy@lineup}{.025\paperheight}
% \newlength{\beamer@fancy@linemid}
% \setlength{\beamer@fancy@linemid}{.015\paperheight}
% \newlength{\beamer@fancy@linebottom}
% \setlength{\beamer@fancy@linebottom}{.01\paperheight}
% Margins.
\newlength{\beamer@fancy@normalmargin}
\setlength{\beamer@fancy@normalmargin}{.06\paperwidth}
\setbeamersize{text margin left=\beamer@fancy@normalmargin}
\setbeamersize{text margin right=\beamer@fancy@normalmargin}
\setlength\leftmargini{.6\beamer@fancy@normalmargin}
\setlength\leftmarginii{.6\beamer@fancy@normalmargin}
\setlength\leftmarginiii{.6\beamer@fancy@normalmargin}
\ProcessOptionsBeamer
%}}}
\mode<presentation>
%{{{ --- Packages ---------------------
\RequirePackage{etoolbox}
\RequirePackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{backgrounds}
\usetikzlibrary{calc}
\usecolortheme{numpex}
\usefonttheme{numpex}
%}}}
%{{{ --- Titlepage --------------------
\def\maketitle{\ifbeamer@inframe\titlepage\else\frame[plain]{\titlepage}\fi}
\def\titlepage{\usebeamertemplate{title page}}
\setbeamertemplate{title page}
{
\begin{tikzpicture}[remember picture,overlay]
\node[xshift=0cm,yshift=0, anchor=east, inner sep=0] at (current page.east) {\includegraphics[width=1.05\textwidth]{images/back1.jpg}};
\node[xshift=1cm,yshift=0, anchor=north west, inner sep=0] at (current page.north west) {\includegraphics[height=1.3cm]{images/rf.png}};
\node[xshift=-0.5cm,yshift=-0.2cm, anchor=north east, inner sep=0] at (current page.north east) {\includegraphics[height=1cm]{images/cea.jpg}~~~\includegraphics[height=1cm]{images/cnrs.png}~~~\includegraphics[height=0.9cm]{images/inria.png}};
\node[xshift=1.5cm,yshift=0, anchor=west, inner sep=0] at (current page.west) {\includegraphics[height=2cm]{images/f2030_white.png}};
\node[xshift=-0.5cm,yshift=0cm, anchor=east, inner sep=0, text width=0.6\textwidth] at (current page.east) {%
\ifx\inserttitle\@empty%
\else%
{\raggedright\linespread{1.0}\usebeamerfont{title}\usebeamercolor[fg]{title}{\inserttitle}\par}%
\vspace*{0.5em}
\fi%
\ifx\insertsubtitle\@empty%
\else%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\vspace*{0.5em}
\fi%
\ifx\insertauthor\@empty%
\else%
{\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor\par}%
\vspace*{0.25em}
\fi%
\ifx\insertdate\@empty%
\else%
{\usebeamerfont{date}\usebeamercolor[fg]{date}\insertdate\par}%
\fi%
\ifx\insertinstitut\@empty%
\else%
\vspace*{3mm}
{\usebeamerfont{institute}\usebeamercolor[fg]{institute}\insertinstitute\par}%
\fi%
};
\end{tikzpicture}%
}
% {{{ --- Commands ---------------------
% \newcommand{\insertsectionHEAD}{%
% \expandafter\insertsectionHEADaux\insertsectionhead}
% \newcommand{\insertsectionHEADaux}[3]{\textsc{\MakeLowercase{#3}}
% }
\newcommand{\plain}[2][]{%
\begingroup
\setbeamercolor{background canvas}{parent=palette tertiary}
\begin{frame}{#1}
\centering
\vfill\vspace{1em}\usebeamerfont{section title}\textcolor{nblue}{\bfseries #2}\vfill
\end{frame}
\endgroup
}
%}}}
%{{{ --- Itemize ----------------------
% Items.
\defbeamertemplate{itemize item}{squarealt}%
{\tiny\raise.5ex\hbox{\donotcoloroutermaths$\blacksquare$}}
\defbeamertemplate{itemize subitem}{squarealt}%
{\tiny\raise.4ex\hbox{\donotcoloroutermaths$\square$}}
\defbeamertemplate{itemize subsubitem}{squarealt}%
{\tiny\raise.3ex\hbox{\donotcoloroutermaths$\blacksquare$}}
\defbeamertemplate{itemize item}{circlealt}%
{\small\raise.2ex\hbox{\donotcoloroutermaths$\bullet$}}
\defbeamertemplate{itemize subitem}{circlealt}%
{\small\raise.1ex\hbox{\donotcoloroutermaths$\circ$}}
\defbeamertemplate{itemize subsubitem}{circlealt}%
{\scriptsize\raise.1ex\hbox{\donotcoloroutermaths$\bullet$}}
\defbeamertemplate{description item}{circlealt}%
{\textbf{\insertdescriptionitem}\hfill}
\setbeamertemplate{items}[circlealt]
%}}}
%{{{ --- Sections ---------------------
% Insert frame with section title at every section start
\AtBeginSection[]
{
% \begingroup
\setbeamercolor{background canvas}{fg=white, bg=white}
\begin{frame}[plain]
\begin{tikzpicture}[remember picture,overlay]
\node[xshift=0.2cm,yshift=0, anchor=north west, inner sep=0] at (current page.north west) {\includegraphics[height=1.3cm]{images/rf.png}~\includegraphics[height=1.3cm]{images/f2030.png}};
\node[xshift=-0.5cm,yshift=-0.2cm, anchor=north east, inner sep=0] at (current page.north east) {\includegraphics[height=1cm]{images/cea.jpg}~~~\includegraphics[height=1cm]{images/cnrs.png}~~~\includegraphics[height=0.9cm]{images/inria.png}};
\node[xshift=0cm,yshift=0, anchor=south, inner sep=0] at (current
page.south)
{\includegraphics[width=\paperwidth,height=0.9\textheight]{images/back2.jpg}};
\node[xshift=0cm,yshift=0, anchor=center, inner sep=0, text width=\textwidth] at (current
page.center)
{\usebeamerfont{section title}\usebeamercolor[fg]{section title}\insertsection};
\end{tikzpicture}
% \node[anchor=south west, fg, inner sep=0pt, text width=\textwidth] at (0pt,10pt) {\insertsection};
\end{frame}
% \endgroup
}
%}}}
%{{{ --- Captions ---------------------
\setbeamertemplate{caption label separator}{: }
\setbeamertemplate{caption}[numbered]
%}}}
%{{{ --- Footline/footnote ------------
\usenavigationsymbolstemplate{}
\setbeamertemplate{footline}
{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.2222\paperwidth, ht=3ex, dp=3ex, center]{structure}%
{\raisebox{-0.5\baselineskip}{\includegraphics[height=0.6cm]{images/cea.jpg}~~~\includegraphics[height=0.6cm]{images/cnrs.png}~~~\includegraphics[height=0.5cm]{images/inria.png}}}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5556\paperwidth, ht=3ex, dp=3ex, center]{structure}%
\usebeamerfont{title in head/foot}\insertshorttitle%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.16665\paperwidth, ht=3ex, dp=3ex, center]{structure}%
\hfill\usebeamerfont{author in head/foot}\insertshortauthor%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.05555\paperwidth, ht=3ex, dp=3ex, center]{structure}%
\hfill\usebeamerfont{page number in head/foot}\insertframenumber%
\end{beamercolorbox}}%
\vskip0pt%
}
\setbeamertemplate{footnote}
{%
\parindent 0em\noindent%
\raggedright
\usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par%
}
%}}}
%{{{ --- Frametitle -------------------
\setbeamertemplate{frametitle}
{%
\nointerlineskip
\begin{beamercolorbox}[sep=0.3cm,wd=\paperwidth]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\strut\insertframetitle\strut%
\hfill
% \raisebox{-0.8mm}{\includegraphics[width=2cm,,height=0.4cm]{example-image}}
\vskip-0.8ex%
\end{beamercolorbox}
}
\defbeamertemplate*{block begin}{numpex}
{
\par\vskip\medskipamount%
\begin{beamercolorbox}[colsep*=.75ex]{block title}
\usebeamerfont*{block title}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title}
{}
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=.75ex]{block body}%
\vspace{-\baselineskip}\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\defbeamertemplate*{block end}{numpex}
{\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title}
{}
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=.75ex,ht=0.05cm]{block title}
~
\end{beamercolorbox}
\vskip\smallskipamount}
\defbeamertemplate*{block example begin}{numpex}
{
\par\vskip\medskipamount%
\begin{beamercolorbox}[colsep*=.75ex]{block title example}
\usebeamerfont*{block title}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title}
{}
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=.75ex]{block body example}%
\vspace{-\baselineskip}\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\defbeamertemplate*{block example end}{numpex}
{\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title}
{}
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=.75ex,ht=0.05cm]{block title example}
~
\end{beamercolorbox}
\vskip\smallskipamount}
\setbeamertemplate{bibliography item}{\insertbiblabel}
\mode<all>
%{{{ misc
\let\otp\titlepage
\renewcommand{\titlepage}{\otp\addtocounter{framenumber}{-1}}
\newcommand{\mreducelistspacing}{\vspace{-\topsep}}
%}}}
\usepackage[procnames]{listings}
\lstset{ %
backgroundcolor=\color{black!3}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
basicstyle=\code\footnotesize, % the size of the fonts that are used for the code
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
breaklines=true, % sets automatic line breaking
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{black!70}, % comment style
extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
frame=single, % adds a frame around the code
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color{nblue}, % keyword style
procnamestyle=\color{nred}, % procedures style
language=[95]fortran, % the language of the code
numbers=none, % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt, % how far the line-numbers are from the code
numberstyle=\tiny\color{black!20},% the style that is used for the line-numbers
rulecolor=\color{nblue}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false, % underline spaces within strings only
showtabs=false, % show tabs within strings adding particular underscores
stepnumber=2, % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color{ngreen}, % string literal style
tabsize=2, % sets default tabsize to 2 spaces
title=\lstname, % show the filename of files included with \lstinputlisting; also try caption instead of title
procnamekeys={call}
}