-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamerouterthemeWM.sty
75 lines (69 loc) · 2.79 KB
/
beamerouterthemeWM.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
\mode<presentation>
%%
\newlength{\PageMargin}
\newlength{\PageTopMargin}
\newlength{\PageFooter}
\newlength{\PageFooterEvent}
\newlength{\PageFooterTitle}
\newlength{\PageFooterPageNumber}
\newlength{\PageWidthMinusMargins}
\pgfmathsetlength{\PageMargin}{5pt}
\pgfmathsetlength{\PageFooter}{10pt}
\pgfmathsetlength{\PageTopMargin}{2*\PageMargin}
\pgfmathsetlength{\PageWidthMinusMargins}{\the\paperwidth-3*\PageMargin}
\pgfmathsetlength{\PageFooterEvent}{0.25*\the\paperwidth}
\pgfmathsetlength{\PageFooterTitle}{0.5*\the\paperwidth}
\pgfmathsetlength{\PageFooterPageNumber}{1.75*\PageFooter}
%% Specify the default margins
\setbeamersize{text margin left=\PageMargin,text margin right=\PageMargin}
%%%%%
% Need to push frame title down below the margin
\setbeamertemplate{frametitle}{
%\vspace*{\PageTopMargin}\hspace*{\PageMargin}
%\vspace*{\PageTopMargin}%
%% Since we can't use insertframetitle because of expansion problems,
%% we have to check for this value ourselves now
\pgfmathsetmacro{\localTitleLineWidth}{\textwidth}
\pgfmathsetmacro{\localTitleContinuationWidth}{\beamer@autobreakcount>0?
\widthof{\space\insertcontinuationcountroman} : 0.0}
\pgfmathsetmacro{\localTitleWidth}{\widthof{\beamer@frametitle}+\localTitleContinuationWidth}
%\settowidth{\localTitleBaseWidth}{\expandafter{\romannumeral-`X}\usebeamertemplate*{frametitle continuation}}
%\fi}
%% Perform some computations
\pgfmathsetmacro{\localTitleRatio}{\localTitleLineWidth/\localTitleWidth)}
\pgfmathsetmacro{\localTitleScale}{\localTitleRatio>1 ? 1.0 : \localTitleRatio}
%% Now space the title from the top-left by 1mm
%\vspace*{1mm}\hspace*{1mm}
\begin{center}%
\scalefont{\localTitleScale}{\insertframetitle}%
\end{center}%
}
%% Configure the footline (footer)
\setbeamerfont{event in head/foot}{size=\fontsize{6.5}{10},series=\bfseries}
\setbeamerfont{title in head/foot}{size=\fontsize{6.5}{10},series=\bfseries}
\setbeamerfont{page number in head/foot}{size=\fontsize{6.5}{10},series=\bfseries}
\setbeamertemplate{footline}{%
%% The Left end of the footline
\begin{minipage}[c][\PageFooter][c]{\PageFooterEvent}%
\begin{beamercolorbox}[wd=\PageFooterEvent]{event in head/foot}%
\hspace*{\PageFooter}\usebeamerfont{event in head/foot}\insertshortevent%
\end{beamercolorbox}%
\end{minipage}%
\hfill
%% The middle of the footline
\begin{minipage}[c][\PageFooter][c]{\PageFooterTitle}%
\begin{beamercolorbox}[center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle%
\end{beamercolorbox}%
\end{minipage}%
\hfill%
%% The right end of the footline
\begin{minipage}[c][\PageFooter][c]{\PageFooterPageNumber}%
\begin{beamercolorbox}[center]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\insertpagenumber%
\end{beamercolorbox}%
\end{minipage}%
}
\mode
<all>