beamerinnerthemelcsb.sty 4.74 KB
Newer Older
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
1
2
3
4
5
6
7
8
9
10
11

\def\lcsb@brain{brain}
\def\lcsb@microscope{microscope}
\def\lcsb@servers{servers}
\def\lcsb@watermark{watermark}
\def\lcsb@iwatermark{iwatermark}
\def\lcsb@black{black}
\def\lcsb@white{white}

\def\lcsb@background{} %TODO convert this to pgfkeys
\def\setlcsbbackground#1{\def\lcsb@background{#1}}
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
12
\def\lcsbtitlepage#1{\begingroup\lcsbwhitelogostrue\setlcsbbackground{#1}\frame[noframenumbering]{\titlepage}\endgroup}
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
13
14
15
16
17
18
19
20
21
22
23
24

\define@key{beamerframe}{c}[true]{% centered
  \beamer@frametopskip=0pt plus 1fill\relax%
  \beamer@framebottomskip=0pt plus 1fill\relax%
  \beamer@frametopskipautobreak=0pt plus .4\paperheight\relax%
  \beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax%
  \def\beamer@initfirstlineunskip{}%
}
\providebool{lcsb@standout}
\define@key{beamerframe}{standout}[true]{%
  \booltrue{lcsb@standout}
  \begingroup
25
  \lcsbwhitelogostrue
Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
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
  \setbeamercolor*{titlelike}{use=standout, fg=standout.fg}
  \setbeamercolor*{structure}{use=standout, fg=standout.fg}
  \setkeys{beamerframe}{c}
  \setkeys{beamerframe}{noframenumbering}
  \centering
  \usebeamercolor[fg]{standout}
  \usebeamerfont{standout}
}

\apptocmd{\beamer@reseteecodes}{%
  \ifbool{lcsb@standout}{
    \endgroup
    \boolfalse{lcsb@standout}
  }{}
}{}{}

\setbeamertemplate{background}{
  \begin{tikzpicture}
  \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
  \ifbool{lcsb@standout}{
    \usebeamercolor{standout}
    \fill[color=bg] (0,0) rectangle (\the\paperwidth,\the\paperheight);
  }{%
  \ifx\lcsb@background\lcsb@brain
    \node[inner sep=0pt] at (current page.center) {\includegraphics[width=\paperwidth]{media/brain.jpg}};
  \else\ifx\lcsb@background\lcsb@microscope
    \node[inner sep=0pt] at (current page.center) {\includegraphics[width=\paperwidth]{media/microscope.jpg}};
  \else\ifx\lcsb@background\lcsb@servers
    \node[inner sep=0pt] at (current page.center) {\includegraphics[width=\paperwidth]{media/servers.jpg}};
  \else\ifx\lcsb@background\lcsb@watermark
    \fill[color=white] (0,0) rectangle (\the\paperwidth,\the\paperheight);
    \node[rotate=15] at(0.3\paperwidth, 0.4\paperheight) {\lcsblogoG{height=\paperheight}};
  \else\ifx\lcsb@background\lcsb@iwatermark
    \usebeamercolor{normal text}
    \fill[color=bg] (0,0) rectangle (\the\paperwidth,\the\paperheight);
    \node[rotate=15] at(0.3\paperwidth, 0.4\paperheight) {\lcsblogoW{height=\paperheight}};
  \else\ifx\lcsb@background\lcsb@white
    \path[fill=white] (0,0) rectangle (\the\paperwidth,\the\paperheight);
  \else\ifx\lcsb@background\lcsb@black
    \path[fill=black] (0,0) rectangle (\the\paperwidth,\the\paperheight);
  \else
    \usebeamercolor{normal text}
    \fill[color=bg] (0,0) rectangle (\the\paperwidth,\the\paperheight);
  \fi\fi\fi\fi\fi\fi\fi}
  \end{tikzpicture}
}

\defbeamertemplate*{section page}{simple}{
  \begin{tikzpicture}[remember picture, overlay]
    \node[anchor=west, text width=\pagewidth-4ex-6mm, inner sep=2ex, line width=0pt, minimum height=32pt]
      (sectionbox) at ([xshift=6mm] current page.west) {
      \raggedright
      \usebeamercolor[fg]{section number}
      \usebeamerfont{section number}
      \insertsectionnumber.\\[1ex]
      \usebeamercolor[fg]{section title}
      \usebeamerfont{section title}
      \insertsectionhead
    };
    \usebeamercolor{lcsb side bar}
    \path[fill=fg] (current page.west |- sectionbox.north) rectangle ([xshift=3mm] current page.west |- sectionbox.south);
  \end{tikzpicture}
  \par
}

\AtBeginSection{
  \ifbeamer@inframe
    \sectionpage
  \else
    \frame[plain,noframenumbering]{\sectionpage}
  \fi
}

\defbeamertemplate*{title page}{lcsb}[1][]
{ 
  \begin{tikzpicture}[remember picture, overlay]
  \node[anchor=west, text width=\pagewidth-4ex-3mm, fill=black, fill opacity=0.5, text opacity=1, inner sep=2ex,line width=0pt]
    (titlebox) at ([xshift=3mm] current page.west) {
    \begin{beamercolorbox}[wd=\linewidth,#1]{title page header}
      \usebeamerfont{title}\inserttitle\par%
    \end{beamercolorbox}
    \vskip1ex%
    \begin{beamercolorbox}[wd=\linewidth,#1]{author}
      \usebeamerfont{author}\insertauthor\par%
    \end{beamercolorbox}
    \vskip0.5ex%
    \begin{beamercolorbox}[wd=\linewidth,#1]{date}
      \usebeamerfont{date}\insertdate%
    \end{beamercolorbox}};
    \usebeamercolor{lcsb side bar}
    \path[fill=fg] (current page.west |- titlebox.north) rectangle ([xshift=3mm] current page.west |- titlebox.south);
  \end{tikzpicture}
}

Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
120
121
122
123
124
125
\defbeamertemplate{footline}{frame numbering}{%
  \ifbeamer@noframenumbering\else%
    \tikz[overlay]\node[anchor=south west, inner sep=1ex] {\usebeamercolor[fg]{page number in head/foot}\usebeamerfont{page number in head/foot}\insertframenumber\footnotesize\usebeamerfont{page count in head/foot}/\inserttotalframenumber};%
  \fi%
}

Miroslav Kratochvil's avatar
Miroslav Kratochvil committed
126
\setbeamertemplate{itemize items}{\textbullet}
127
\setlength{\parskip}{0.5ex}