-
Notifications
You must be signed in to change notification settings - Fork 0
/
beamerouterthemeppt_theme_1.sty
80 lines (66 loc) · 2.38 KB
/
beamerouterthemeppt_theme_1.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
\mode<presentation>
\makeatletter
\def\progressbar@progressbar{} % the progress bar
\newcount\progressbar@tmpcounta % auxiliary counter
\newcount\progressbar@tmpcountb % auxiliary counter
\newdimen\progressbar@pbht % progressbar height
\newdimen\progressbar@pbwd % progressbar width
\newdimen\progressbar@tmpdim % auxiliary dimension
\progressbar@pbwd = \paperwidth
\progressbar@pbht = 3pt
% the progress bar
\def\progressbar@progressbar{%
\progressbar@tmpcounta=\insertframenumber
\progressbar@tmpcountb=\inserttotalframenumber
\progressbar@tmpdim=\progressbar@pbwd
\divide\progressbar@tmpdim by 100
\multiply\progressbar@tmpdim by \progressbar@tmpcounta
\divide\progressbar@tmpdim by \progressbar@tmpcountb
\multiply\progressbar@tmpdim by 100
\begin{tikzpicture}
\usebeamercolor{footline}
\fill[color = footline.bg]
(0pt, 0pt) rectangle ++ (\progressbar@pbwd, \progressbar@pbht);
\fill [color = footline.fg]
(0pt, 0pt) rectangle ++ (\progressbar@tmpdim, \progressbar@pbht);
\end{tikzpicture}%
}
\setbeamertemplate{footline}{%
\nointerlineskip%
\ifnum\theframenumber=1%
% This is the title frame, do nothing
\else
\begin{beamercolorbox}[wd=\paperwidth, ht=0.02\paperheight]{page number in head/foot}
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
% the page number
\node[above left] at (\the\paperwidth - 1em, 0.1cm){%
\usebeamercolor[fg]{page number in head/foot}%
\usebeamerfont{page number in head/foot}%
\insertpagenumber%
};
% the progress bar
\progressbar@progressbar%
\end{tikzpicture}
\end{beamercolorbox}
\fi
}
\defbeamertemplate*{frametitle}{texsx}[1][]
{
\vskip5pt%
\begin{beamercolorbox}[wd=\paperwidth,ht=25pt]{frametitle}
\begin{tikzpicture}
\useasboundingbox[fill=base-color-white](0,0) rectangle(\paperwidth,30pt);
\fill[base-color-one] (5pt, 0) rectangle(\paperwidth - 5pt,25pt);
\ifx\insertframesubtitle\@empty%
{\node[anchor=west, base-color-black] at (9pt,12pt){\insertframetitle};}
\else%
{
\node[anchor= west, base-color-black, font=\large] at (10pt,17pt){\insertframetitle};%
\node[anchor= west, base-color-black, font=\small] at (10pt,6pt){\insertframesubtitle};
}%
\fi
\end{tikzpicture}
\end{beamercolorbox}
}
\makeatother