-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamerouterthemeemc.sty
103 lines (93 loc) · 3.55 KB
/
beamerouterthemeemc.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
\ProvidesPackage{beamerouterthemeemc}[2016/02/27 EMC Beamer theme]
\usepackage{etoolbox}
\mode<presentation>
% Frame title
\defbeamertemplate{frame numbering}{counter}{\insertframenumber}
\defbeamertemplate{frame numbering}{fraction}{
\insertframenumber/\inserttotalframenumber
}
\defbeamertemplate*{frametitle}{emc}[1][]
{
%\vskip0.1cm%
\begin{beamercolorbox}[wd=\paperwidth,ht=10mm]{frametitle}
\begin{tikzpicture}
\useasboundingbox(0,0) rectangle(\the\paperwidth,0.02625*\the\paperwidth);
\ifx\insertframesubtitle\@empty%
{\node[anchor=west, font=\large] at (0.05*\the\paperwidth,0.62){\insertframetitle};%
\foreach \x in {0,...,79}%
\fill[color=structure] (0.0125*\the\paperwidth*\x,0.02*\the\paperwidth) rectangle(0.0125*\the\paperwidth*\x + 0.00625*\the\paperwidth,0.02625*\the\paperwidth);}%
\else%
{\node[anchor= west,font=\large] at (0.05*\the\paperwidth,0.74){\insertframetitle};%
\node[anchor= west,font=\small] at (0.05*\the\paperwidth,0.38){\insertframesubtitle};%
\foreach \x in {0,...,79}%
\fill[color=structure] (0.0125*\the\paperwidth*\x,0.008*\the\paperwidth) rectangle(0.0125*\the\paperwidth*\x + 0.00625*\the\paperwidth,0.01425*\the\paperwidth);}%
\fi
\end{tikzpicture}
\hfill%;
{\pgftext[at=\pgfpointxy{-0.1}{0.5},right,base]{\pgfuseimage{fg:logoNoText}}}%
\end{beamercolorbox}
}
\defbeamertemplate{footline}{plain}{%
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%
}
\defbeamertemplate*{footline}{emc}{%
\ifnum \insertpagenumber=1
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\end{beamercolorbox}}%
\else
\leavevmode%
\hbox{\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle\hfill%
\insertframenumber\,/\,\inserttotalframenumber
% {\pgftext[at=\pgfpointxy{0}{0.4},right,base]%
% {\pgfuseimage{fg:logoNoText}}%
% }%
\end{beamercolorbox}}%
\vskip0pt%
\fi
}
% \subsubsection{Standout frames}
%
% \themename offers a custom frame format with large, centered text and an
% inverted background. To use it, add the key |standout| to the frame:
% |\begin{frame}[standout] ... \end{frame}|.
%
% \begin{macro}{standout}
%
% Optional arguments to Beamer's frames are implemented using
% |\define@key| from the |keyval| package, which will execute code when the
% defined option is called.
%
% \begin{macrocode}
\providebool{emc@standout}
\define@key{beamerframe}{standout}[true]{%
\booltrue{emc@standout}
\extractcolorspecs{normal text.bg}{\model}{\mybgcolor}
\extractcolorspecs{emclblue}{\model}{\mycolorlb}
\extractcolorspecs{emcdblue}{\model}{\mycolordb}
\extractcolorspecs{white}{\model}{\mycolorw}
\begingroup
\ifx\mybgcolor\mycolorlb \emcset{color/background=white} \fi
\ifx\mybgcolor\mycolordb \emcset{color/background=lightblue} \fi
\ifx\mybgcolor\mycolorw \emcset{color/background=darkblue} \fi
}
% close group at end of slide by appending to reseteecodes
\apptocmd{\beamer@reseteecodes}{%
\ifbool{emc@standout}{
\endgroup
\ifx\mybgcolor\mycolorlb \emcset{color/background=lightblue} \fi
\ifx\mybgcolor\mycolordb \emcset{color/background=darkblue} \fi
\ifx\mybgcolor\mycolorw \emcset{color/background=white} \fi
\boolfalse{emc@standout}
}{}
}{}{}% <success><failure>
%\defbeamertemplate*{headline}{emc}{%
%\leavevmode%
%\hfill
%\pgfuseimage{fg:logoNoText}%
%}%
\mode<all>