]> code.communitydata.science - cdsc_tex.git/blob - poster_template/beamerouterthemedecolines.sty
Merge branch 'master' of code.communitydata.cc:cdsc_tex
[cdsc_tex.git] / poster_template / beamerouterthemedecolines.sty
1 % Copyright 2007 by Marco Barisione
2 %
3 % This file may be distributed and/or modified
4 %
5 % 1. under the LaTeX Project Public License and/or
6 % 2. under the GNU Public License.
7
8 \mode<presentation>
9
10 % String used between the current page and the total page count.
11 \def\beamer@decolines@pageofpages{/}
12 \DeclareOptionBeamer{pageofpages}{\def\beamer@decolines@pageofpages{#1}}
13
14 % Show a line below the frame title.
15 \DeclareOptionBeamer{titleline}[true]{\def\beamer@decolines@titleline{#1}}
16
17 % Image used for the watermark.
18 \def\beamer@decolines@watermarkorig{}
19 \DeclareOptionBeamer{watermark}{\def\beamer@decolines@watermarkorig{#1}}
20
21 % Height of the watermark.
22 \def\beamer@decolines@watermarkheight{100px}
23 \DeclareOptionBeamer{watermarkheight}{\def\beamer@decolines@watermarkheight{#1}}
24
25 % The original image height is watermarkheightmult * watermarkheight.
26 \def\beamer@decolines@watermarkheightmult{1}
27 \DeclareOptionBeamer{watermarkheightmult}{\def\beamer@decolines@watermarkheightmult{#1}}
28
29 \ExecuteOptionsBeamer{titleline=false}
30 \ProcessOptionsBeamer
31
32 % Enable/disable the watermark.
33 \def\watermarkon{%
34   \def\beamer@decolines@watermark{\beamer@decolines@watermarkorig}%
35 }
36 \def\watermarkoff{\def\beamer@decolines@watermark{}}
37
38 % Initially enable the watermark.
39 \watermarkon
40
41 % Colors.
42 \setbeamercolor*{lineup}{parent=palette primary}
43 \setbeamercolor*{linemid}{parent=palette secondary}
44 \setbeamercolor*{linebottom}{parent=palette tertiary}
45 \setbeamercolor*{page header}{parent=titlelike}
46
47 % Lengths
48 \newlength{\headerheight}
49 \setlength{\headerheight}{.045\paperheight}
50 \newlength{\beamer@decolines@lineup}
51 \setlength{\beamer@decolines@lineup}{.018\paperheight}
52 \newlength{\beamer@decolines@linemid}
53 \setlength{\beamer@decolines@linemid}{.015\paperheight}
54 \newlength{\beamer@decolines@linebottom}
55 \setlength{\beamer@decolines@linebottom}{.01\paperheight}
56
57 % The height of the watermark part below the 3 bottom lines.
58 \newlength{\beamer@decolines@watermarkheightbottom}
59 \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@lineup}
60 \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linemid}
61 \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linebottom}
62
63 % The height of the watermark part over the 3 bottom lines before shrinking.
64 \newlength{\beamer@decolines@watermarkheightupperorig}
65 \setlength{\beamer@decolines@watermarkheightupperorig}{\beamer@decolines@watermarkheight}
66 \addtolength{\beamer@decolines@watermarkheightupperorig}{-\beamer@decolines@watermarkheightbottom}
67 \multiply\beamer@decolines@watermarkheightupperorig by \beamer@decolines@watermarkheightmult
68
69 % Footer.
70 \defbeamertemplate*{footline}{decolines theme}
71 {
72   \leavevmode%
73   % First line.
74   \hbox{%
75   \begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@decolines@lineup,dp=1.5pt]{}%
76   \end{beamercolorbox}%
77   \begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@decolines@lineup,dp=1.5pt,right]{lineup}%
78     \usebeamerfont{palette primary}
79     %\insertframenumber{} \beamer@decolines@pageofpages{} \inserttotalframenumber%
80   \end{beamercolorbox}%
81   } %
82   % Second line.
83   \hbox{%
84   \begin{beamercolorbox}[wd=\paperwidth,ht=\beamer@decolines@linemid,dp=0pt]{linemid}%
85   \end{beamercolorbox}%
86   } %
87   % Third line.
88   \hbox{%
89   \begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{}%
90   \end{beamercolorbox}%
91   \begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{linebottom}%
92   \end{beamercolorbox}%
93   }%
94   % This seems to fix some alignment problems with the watermark. It has to be
95   % always applied if you do not want to see the footer moving up and down when
96   % moving from a page with watermark to a page without or vice versa.
97   \vskip-.5px%
98   % Watermark.
99   \if\beamer@decolines@watermark\@empty\else%
100     \vskip-\beamer@decolines@watermarkheightbottom%
101     \llap{\includegraphics[height=\beamer@decolines@watermarkheightbottom,clip=true,%
102       trim=0pt 0pt 0pt \beamer@decolines@watermarkheightupperorig]{\beamer@decolines@watermark}\hskip-\paperwidth}%
103   \fi%
104 }
105
106 \defbeamertemplate*{headline}{decolines theme}{}
107 %
108 %{
109 %  \leavevmode%
110 %  \hbox{%
111 %  \begin{beamercolorbox}[wd=\paperwidth,ht=\headerheight,dp=0pt]{page header}%
112 %  \end{beamercolorbox}%
113 %  } %
114 %  \vskip0pt%
115 %}
116
117 \defbeamertemplate*{frametitle}{decolines theme}[1][left]
118 {
119   \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
120   \@tempdima=\textwidth%
121   \advance\@tempdima by\beamer@leftmargin%
122   \advance\@tempdima by\beamer@rightmargin%
123   \vbox{}\vskip-.5\beamer@leftmargin%
124   \begin{beamercolorbox}[sep=.5\beamer@leftmargin,#1,wd=\the\@tempdima]{page header}
125     \usebeamerfont{frametitle}\usebeamercolor[bg]{framesubtitle}%
126     \vbox{}\vskip0ex%
127     \if@tempswa\else\csname beamer@fte#1\endcsname\fi%
128     \strut\insertframetitle\strut\par%
129     {%
130       \ifx\insertframesubtitle\@empty%
131       \else%
132       {\usebeamerfont{framesubtitle}\usebeamercolor[bg]{framesubtitle}\insertframesubtitle\strut\par}%
133       \fi
134     }%
135     \vskip-1ex%
136     \if@tempswa\else\vskip-\beamer@leftmargin\fi
137   \end{beamercolorbox}%
138   \def\beamer@decolines@truetext{true}%
139   \ifx\beamer@decolines@titleline\beamer@decolines@truetext%
140     \vskip-.5\beamer@leftmargin%
141     \begin{beamercolorbox}[wd=\textwidth,ht=.1ex,dp=0ex]{linemid}%
142     \end{beamercolorbox}%
143   \fi
144 }
145
146 % Frame title continuations, default
147 \defbeamertemplate*{frametitle continuation}{decolines theme}{(\insertcontinuationcount)}
148
149 \defbeamertemplate*{sidebar right}{decolines theme}
150 {
151   \vskip.1\beamer@leftmargin%
152   \llap{\insertlogo\hskip.5\beamer@leftmargin}%
153   \vfill%
154   \if\beamer@decolines@watermark\@empty\else%
155   \llap{\includegraphics[height=\beamer@decolines@watermarkheight]{\beamer@decolines@watermark}}%
156   \vskip-\beamer@decolines@watermarkheightbottom%
157   \fi
158 }
159
160 \mode
161 <all>

Community Data Science Collective || Want to submit a patch?