-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbeamerouterthemeLUH.sty
88 lines (75 loc) · 3.05 KB
/
beamerouterthemeLUH.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
\mode<presentation>
\setbeamersize{text margin left=1cm}
\defbeamertemplate*{footline}{LUH}[1][]{%
\begin{tikzpicture}[inner sep=0]
\ifnum\thepage<2\relax%
\LUHFooterHeight=\LUHFooterHeightTitle
\def\ScaleAuthor{1.1}
\else
\def\ScaleAuthor{1}
\fi
\useasboundingbox (0,0) rectangle (\the\paperwidth,\LUHFooterHeight);
% Gray rectangle
\usebeamercolor{footline}
\fill[bg] (-.1pt,-.1pt) rectangle(\the\paperwidth+.1pt,\LUHFooterHeight+.1pt);
\ifnum\thepage>1\relax%
% Green bar
\usebeamercolor{palette quaternary}
\fill[bg] (\the\paperwidth-\LUHBorder,\LUHFooterHeight) rectangle ++(-2cm,-0.2*\LUHFooterHeight);
% Page/Frame number
\node[left, text depth=0]
at (\the\paperwidth-1.5*\LUHBorder, \LUHFooterHeight/2-0.05*\LUHFooterHeight)
{\usebeamertemplate***{page number in head/foot}};
\fi
% Name, title, date
\node[right, text depth=0, text width=\paperwidth-\beamer@leftmargin-\beamer@rightmargin, inner sep=0]
at (\beamer@leftmargin, \LUHFooterHeight/2)
{
{\usebeamercolor[fg]{author in head/foot}\usebeamerfont{author in head/foot}\scalebox{\ScaleAuthor}{\insertauthor}}%
\ifnum\thepage>1\relax%
{\usebeamercolor{title in head/foot}\usebeamerfont{title in head/foot}\hspace{2em}\insertshorttitle}%
{\usebeamercolor{date in head/foot}\usebeamerfont{date in head/foot}\hspace{2em}\insertshortdate}%
\else
{\usebeamercolor{date in head/foot}%
\usebeamerfont{date in head/foot}%
\hfill\insertdate}%
\fi
};
\end{tikzpicture}
}
\defbeamertemplate*{headline}{LUH}[1][]{%
\begin{tikzpicture}
\useasboundingbox (0,\paperheight-\LUHLogoHeight-1.5*\LUHBorder) rectangle(\paperwidth,\paperheight);
\ifnum\thepage<2\relax%
\LUHLogoHeight=1.3\LUHLogoHeight
\fi
\node[anchor=north west,inner sep=0pt] at (\LUHBorder,\the\paperheight-\LUHBorder)
{\insertlogo};
\node[anchor=north east, inner sep=0pt] at (\the\paperwidth-\LUHBorder,\the\paperheight-\LUHBorder)
{\usebeamertemplate***{university logo}};
\end{tikzpicture}
}
\defbeamertemplate*{sidebar right}{LUH}[1][]{}
\defbeamertemplate*{sidebar left}{LUH}[1][]{}
\defbeamertemplate*{page number in head/foot}{LUH}[1][]{\translate{Page} \insertframenumber}
% Frame title
\defbeamertemplate*{frametitle}{LUH}[1][]{%
\begin{beamercolorbox}[wd=\paperwidth,ht=1cm,dp=0pt]{frametitle} %
\begin{tikzpicture}[inner sep=0,draw]
\useasboundingbox (0,0) rectangle(\paperwidth,1cm);
\usebeamercolor{frametitle}
\ifx\insertframesubtitle\@empty
\node[right, fg, text depth=0] at (\beamer@leftmargin,0.5)
{\usebeamerfont{frametitle}\insertframetitle};
\else
\node[right, fg, text depth=0] at (\beamer@leftmargin,0.7)
{\usebeamerfont{frametitle}\insertframetitle};
\usebeamercolor{framesubtitle}
\node[right, fg, text depth=0] at (\beamer@leftmargin,0.25)
{\usebeamerfont{framesubtitle}\insertframesubtitle};
\fi
\end{tikzpicture}
\end{beamercolorbox}
\vspace{-.7mm}
}
\mode<all>