-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheadline.tex
75 lines (72 loc) · 2.5 KB
/
headline.tex
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
\usepackage{multicol}
\makeatletter
\def\insertsectionnavigation#1{%
\hbox to #1{\vbox{{\usebeamerfont{section in head/foot}%
\usebeamercolor[fg]{section in head/foot}%
\def\slideentry##1##2##3##4##5##6{}%
\def\sectionentry##1##2##3##4##5{%
\ifnum##5=\c@part%
\def\insertsectionhead{##2\hskip1em}%
\def\insertsectionheadnumber{##1}%
\def\insertpartheadnumber{##5}%
\hyperlink{Navigation##3}{%
\ifnum\c@section=##1%
{\usebeamertemplate{section in head/foot}}%
\else%
{\usebeamertemplate{section in head/foot shaded}}%
\fi%
}\par
\fi}%
\parbox[c][0cm][c]{.5\paperwidth}{%
\begin{multicols}{2}
\dohead
\end{multicols}}\space}
}%
\hfil}%
}
\def\insertsubsectionnavigation#1{%
\hbox to #1{%
\vbox{{%
\usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}%
\vskip0.5625ex%
\beamer@currentsubsection=0%
\def\sectionentry##1##2##3##4##5{}%
\def\slideentry##1##2##3##4##5##6{\ifnum##6=\c@part\ifnum##1=\c@section%
\ifnum##2>\beamer@currentsubsection%
\beamer@currentsubsection=##2%
\def\insertsubsectionhead{##5}%
\def\insertsectionheadnumber{##1}%
\def\insertsubsectionheadnumber{##2}%
\def\insertpartheadnumber{##6}%
\beamer@link(##4){%
\ifnum\c@subsection=##2%
{\usebeamertemplate{subsection in head/foot}}%
\else%
{\usebeamertemplate{subsection in head/foot shaded}}%
\fi\hfill}\par
\fi\fi\fi}%
\hspace*{0.5em}\parbox[c][0cm][c]{\dimexpr.5\paperwidth-1em\relax}{%
\begin{multicols}{2}
\dohead\vskip0.5625ex\end{multicols}
}\space
}\hfil
}}}
\setbeamertemplate{headline}
{%
\leavevmode\@tempdimb=2.4375ex%
\ifnum\beamer@subsectionmax<\beamer@sectionmax%
\multiply\@tempdimb by\beamer@sectionmax%
\else%
\multiply\@tempdimb by\beamer@subsectionmax%
\fi%
\ifdim\@tempdimb>0pt%
\advance\@tempdimb by 1.125ex%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=0.5\@tempdimb,dp=2ex]{section in head/foot}%
\vbox to0.5\@tempdimb{\vfill\insertsectionnavigation{.5\paperwidth}\vfill}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=0.5\@tempdimb,dp=2ex]{subsection in head/foot}%
\vbox to0.5\@tempdimb{\vfill\insertsubsectionnavigation{.5\paperwidth}\vfill}%
\end{beamercolorbox}%
\fi%
}
\makeatother