-
Notifications
You must be signed in to change notification settings - Fork 1
/
beamerthemeEdinburgh.sty
153 lines (137 loc) · 5.23 KB
/
beamerthemeEdinburgh.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
\ProvidesPackage{beamerthemeEdinburgh}
\newif\ifbeamer@theme@subsection
\beamer@theme@subsectiontrue
\DeclareOptionBeamer{footline}{\csname beamer@theme@footline@#1\endcsname}
\DeclareOptionBeamer{subsection}[true]{\csname beamer@theme@subsection#1\endcsname}
\ProcessOptionsBeamer
\mode<presentation>
\useinnertheme[]{rectangles}
\usecolortheme{edinburgh}
\setbeamertemplate{navigation symbols}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FRAMES
% auxiliary def for gradient
\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
color(0pt)=(frametitle.bg);
color(\paperwidth)=(frametitle right.bg)}
%% HEADLINES
\defbeamertemplate*{headline}{miniframes theme}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}{section in head/foot}
\vskip2pt\insertsectionnavigationhorizontal{\paperwidth}{}{}\vskip2pt
\end{beamercolorbox}%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[ht=2.0ex,dp=1.125ex,leftskip=.3cm]{subsection in head/foot}
\usebeamerfont{subsection in head/foot} \insertsubsectionhead
%\insertsubsectionnavigationhorizontal{\paperwidth}{}{filll}
\else
\begin{beamercolorbox}[ht=1.0ex,dp=1ex]{subsection in head/foot}
\fi%
\end{beamercolorbox}%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}
%% FRAME TITLES
\defbeamertemplate*{frametitle}{Edinburgh theme}
{%
\nointerlineskip%
\vskip-2pt%
\hbox{\leavevmode
\advance\beamer@leftmargin by -12bp%
\advance\beamer@rightmargin by -12bp%
\beamer@tempdim=\textwidth%
\advance\beamer@tempdim by \beamer@leftmargin%
\advance\beamer@tempdim by \beamer@rightmargin%
\hskip-\Gm@lmargin\hbox{%
\setbox\beamer@tempbox=\hbox{
\begin{minipage}[b]{\paperwidth}%
\vbox{}\vskip-.75ex%
\leftskip0.3cm%
\rightskip0.3cm plus1fil\leavevmode
\insertframetitle%
\ifx\insertframesubtitle\@empty%
\strut\par%
\else
\par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}%
\fi%
\nointerlineskip
\vbox{}%
\end{minipage}}%
\beamer@tempdim=\ht\beamer@tempbox%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
\usebeamercolor{frametitle right}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\hskip-\paperwidth%
\box\beamer@tempbox%
}%
\hskip-\paperwidth%
}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% BLOCKS
% Redefine block begin and end templates to leave out the block title bar if the block title
% parameter is empty. The default/rectangles (other than the rounded) inner theme behaves
% quirky here.
\def\blockcolsep{.5ex}
%% NORMAL
\defbeamertemplate*{block begin}{edinburgh}{
\par\vskip\medskipamount%
\ifx\insertblocktitle\@empty
\else
\begin{beamercolorbox}[colsep*=\blockcolsep]{block title}
{\rule[-0.4ex]{0mm}{2ex}\insertblocktitle}%
\end{beamercolorbox}%
\fi
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title}
{}
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=\blockcolsep,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\defbeamertemplate*{block end}{edinburgh}{\end{beamercolorbox}\vskip\smallskipamount}
%% EXAMPLE BLOCKS
\defbeamertemplate*{block example begin}{edinburgh}{
\par\vskip\medskipamount%
\ifx\insertblocktitle\@empty
\else
\begin{beamercolorbox}[colsep*=\blockcolsep]{block title example}
{\rule[-0.4ex]{0mm}{2ex}\insertblocktitle}%
\end{beamercolorbox}%
\fi
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title example}
{}
{\ifbeamercolorempty[bg]{block body example}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body example}%
\begin{beamercolorbox}[colsep*=\blockcolsep,vmode]{block body example}%
\ifbeamercolorempty[bg]{block body example}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\defbeamertemplate*{block example end}{edinburgh}{\end{beamercolorbox}\vskip\smallskipamount}
%% ALERTED BLOCKS
\defbeamertemplate*{block alerted begin}{edinburgh}{
\par\vskip\medskipamount%
\ifx\insertblocktitle\@empty
\else
\begin{beamercolorbox}[colsep*=\blockcolsep]{block title alerted}
{\rule[-0.4ex]{0mm}{2ex}\insertblocktitle}%
\end{beamercolorbox}%
\fi
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title alerted}
{}
{\ifbeamercolorempty[bg]{block body alerted}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body alerted}%
\begin{beamercolorbox}[colsep*=\blockcolsep,vmode]{block body alerted}%
\ifbeamercolorempty[bg]{block body alerted}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\defbeamertemplate*{block alerted end}{edinburgh}{\end{beamercolorbox}\vskip\smallskipamount}
\mode<all>