Code

Add a simple Makefile snippet to simplify usage.
[tokkeebeamer.git] / beamerthemetokkee.sty
1 %
2 % Copyright (C) 2013-2016 Sebastian 'tokkee' Harl <sh@tokkee.org>
3 % All rights reserved.
4 %
5 % Redistribution and use in source and binary forms, with or without
6 % modification, are permitted provided that the following conditions
7 % are met:
8 % 1. Redistributions of source code must retain the above copyright
9 %    notice, this list of conditions and the following disclaimer.
10 % 2. Redistributions in binary form must reproduce the above copyright
11 %    notice, this list of conditions and the following disclaimer in the
12 %    documentation and/or other materials provided with the distribution.
13 %
14 % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 % ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16 % TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 % PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
18 % CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 % EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 % PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 % OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 % WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 % OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24 % ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 %
26 \usepackage{beamertokkee}
27 \usepackage{lmodern}
29 \usepackage{beamertokkee}
31 \usecolortheme{tokkee}
33 \usepackage{translator}
34 \usedictionary{translator-tokkeebeamer-dictionary}
36 \usepackage{tikz}
38 \usetikzlibrary{positioning}
40 \setbeamersize{text margin left=7mm, text margin right=7mm}
42 \titlegraphic{
43         \begin{tikzpicture}[remember picture,overlay]
44                 \node[inner sep=5mm,anchor=south west] at (current page.south west)
45                         {\includegraphics[width=.25\paperwidth]{tokkee_logo}};
46         \end{tikzpicture}
47 }
49 \setbeamerfont{title}{series=\bfseries}
50 \setbeamerfont{author}{series=\bfseries}
51 \setbeamertemplate{title page}
52 {
53         \begin{centering}
54                 \titlebox{%
55                         {\usebeamerfont{title}\usebeamercolor[fg]{title}%
56                          \inserttitle}
57                         \ifx\insertsubtitle\@empty%
58                         \else%
59                                 \par\\[.25em]
60                                 {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}%
61                                  \mbox{\insertsubtitle}\par}%
62                         \fi%
63                 }
65                 \vskip1em
67                 \begin{beamercolorbox}[sep=8pt,center]{author}
68                         \usebeamerfont{author}\insertauthor
69                 \end{beamercolorbox}
70                 \begin{beamercolorbox}[sep=8pt,center]{institute}
71                         \usebeamerfont{institute}\insertinstitute
72                 \end{beamercolorbox}
73                 \begin{beamercolorbox}[sep=8pt,center]{date}
74                         \usebeamerfont{date}\insertdate
75                 \end{beamercolorbox}
77                 \vskip0.5em
78                 {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
79         \end{centering}
80 }
82 \setbeamerfont{frametitle}{series=\bfseries}
83 \setbeamertemplate{frametitle}
84 {
85         \begin{tikzpicture}[remember picture,overlay]
86                 \fill[fill=tokkeelightgray,anchor=north west]
87                         (-7mm,-.0\paperheight) rectangle +(\paperwidth,20mm);
88                 \fill[fill=tokkeeblue,anchor=north west,drop shadow]
89                         (-7mm,-.0\paperheight) rectangle +(\paperwidth,-3mm);
90         \end{tikzpicture}
91         \begin{tikzpicture}[remember picture,overlay]
92                 \node[inner sep=0pt,anchor=east] (logo)
93                         at (\textwidth,.07\paperheight)
94                         {\includegraphics[height=10mm]{tokkee_logo}};
95                 \node[inner sep=0pt,anchor=base west] (tokkee_frametitle)
96                         at (-.03\paperwidth,.05\paperheight)
97                         {\insertframetitle};
98         \end{tikzpicture}
99 }
101 \setbeamertemplate{headline}
103         % "allocate" space for the headline
104         \vspace*{.10\paperheight}
107 \setbeamertemplate{footline}
109         \begin{tikzpicture}[overlay]
110                 \node (tokkee_copyright)[inner sep=0pt,anchor=base west]
111                         at (.03\paperwidth,.02\paperheight)
112                         {\scriptsize \insertcopyrightinfo};
113                 \node (tokkee_framenumber) [inner sep=0pt,anchor=base east]
114                         at (.97\paperwidth,.02\paperheight)
115                         {\scriptsize \insertshorttitle{} -- \translate{Slide} \insertframenumber};
116         \end{tikzpicture}
119 % no navigation symbols
120 \setbeamertemplate{navigation symbols}{}
122 % Use black dots as itemize symbols
123 \setbeamertemplate{itemize item}[circle]
124 \setbeamertemplate{itemize subitem}[square]
125 \setbeamertemplate{itemize subsubitem}[square]