]> code.communitydata.science - cdsc_tex.git/blob - poster_template/beamerinnerthemefancy.sty
added a version of a single slide template (based on kaylea's taboo topics)
[cdsc_tex.git] / poster_template / beamerinnerthemefancy.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 % Use alternative title page style.
11 \DeclareOptionBeamer{alternativetitlepage}[true]{\def\beamer@fancy@alternativetitlepage{#1}}
12
13 % Logo to use in the alternative title page.
14 \def\beamer@fancy@titlepagelogo{}
15 \DeclareOptionBeamer{titlepagelogo}{\def\beamer@fancy@titlepagelogo{#1}}
16
17 % Bullet shape.
18 \DeclareOptionBeamer{bullet}{\def\beamer@fancy@bullet{#1}}
19
20 \ExecuteOptionsBeamer{alternativetitlepage=false,bullet=square}
21 \ProcessOptionsBeamer
22
23 % Colors.
24 \setbeamercolor*{lineup}{parent=palette primary}
25 \setbeamercolor*{linemid}{parent=palette secondary}
26 \setbeamercolor*{linebottom}{parent=palette tertiary}
27 \setbeamercolor*{title page header}{parent=palette quaternary}
28
29 % Lengths.
30 \newlength{\beamer@fancy@lineup}
31 \setlength{\beamer@fancy@lineup}{.025\paperheight}
32 \newlength{\beamer@fancy@linemid}
33 \setlength{\beamer@fancy@linemid}{.015\paperheight}
34 \newlength{\beamer@fancy@linebottom}
35 \setlength{\beamer@fancy@linebottom}{.01\paperheight}
36
37 % Margins.
38 \newlength{\beamer@fancy@normalmargin}
39 \setlength{\beamer@fancy@normalmargin}{.06\paperwidth}
40 \setbeamersize{text margin left=\beamer@fancy@normalmargin}
41 \setbeamersize{text margin right=\beamer@fancy@normalmargin}
42 \setlength\leftmargini{.6\beamer@fancy@normalmargin}
43 \setlength\leftmarginii{.6\beamer@fancy@normalmargin}
44 \setlength\leftmarginiii{.6\beamer@fancy@normalmargin}
45
46 % Normal title page.
47 \defbeamertemplate*{title page normal}{fancy theme}[1][]
48 {
49   \vbox{}
50   \vfill
51   \begin{centering}
52     \begin{beamercolorbox}[wd=\paperwidth,sep=8pt,center,#1]{title page header}
53       \usebeamerfont{title}\inserttitle\par%
54       \ifx\insertsubtitle\@empty%
55       \else%
56         \vskip0.25em%
57         {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
58       \fi%     
59     \end{beamercolorbox}%
60     \vskip1em\par
61     \begin{beamercolorbox}[sep=8pt,center,#1]{author}
62       \usebeamerfont{author}\insertauthor
63     \end{beamercolorbox}
64     \begin{beamercolorbox}[sep=8pt,center,#1]{institute}
65       \usebeamerfont{institute}\insertinstitute
66     \end{beamercolorbox}
67     \begin{beamercolorbox}[sep=8pt,center,#1]{date}
68       \usebeamerfont{date}\insertdate
69     \end{beamercolorbox}\vskip0.5em
70     {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
71   \end{centering}
72   \vfill
73 }
74
75 % Alternative title page, you should use this in a frame with the [plain]
76 % option.
77 \defbeamertemplate*{title page alternative}{fancy theme}[1][]
78 {
79   {\parskip0pt\offinterlineskip%
80   \hbox{\hskip-\Gm@lmargin\hbox{\vbox{%
81   \@tempdima=\textwidth\textwidth=\paperwidth\hsize=\textwidth\def\\{,}\vbox{}\vskip-1.5ex%
82     % Title.
83     \begin{beamercolorbox}[wd=\paperwidth,ht=.4\paperheight,center,#1]{title page header}
84       \usebeamerfont{title}\inserttitle\par%
85       \ifx\insertsubtitle\@empty%
86       \else%
87         \vskip0.25em%
88         {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
89       \fi%     
90       \vspace{.125\paperheight}%
91     \end{beamercolorbox}%
92     \vbox{}\vskip-\beamer@fancy@lineup%
93     \vbox{}\vskip-\beamer@fancy@linemid%
94     % First line.
95     \hbox{%
96     \begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@fancy@lineup,dp=0pt]{}%
97     \end{beamercolorbox}%
98     \begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@fancy@lineup,dp=0pt]{lineup}%
99     \end{beamercolorbox}%
100     }%
101     \vbox{}\vskip0ex%
102     % Second line.
103     \hbox{%
104     \begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@fancy@linemid,dp=0pt]{}%
105     \end{beamercolorbox}%
106     \begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@fancy@linemid,dp=0pt]{linemid}%
107     \end{beamercolorbox}%
108     }%
109     % Third line.
110     \hbox{%
111     \begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@fancy@linebottom,dp=0pt]{}%
112     \end{beamercolorbox}%
113     \begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@fancy@linebottom,dp=0pt]{linebottom}%
114     \end{beamercolorbox}%
115     }%
116     \vskip0pt%
117   }}%
118   \hskip-\Gm@rmargin%
119   }}\hfil%
120   %
121   \begin{columns}
122       \ifx\beamer@fancy@titlepagelogo\@empty%
123           \column{\textwidth}
124       \else
125           \column{.5\textwidth}
126               % Logo.
127               \begin{centering}
128                   \vbox{}\vspace{-2em}\vfill
129                   \includegraphics[height=.4\paperheight]{\beamer@fancy@titlepagelogo}
130                   \vfill
131               \end{centering}
132           \column{.5\textwidth}
133        \fi
134           % Authors, institute and date
135           \vskip1em\par
136           \begin{beamercolorbox}[sep=8pt,center,#1]{author}
137             \usebeamerfont{author}\insertauthor
138           \end{beamercolorbox}
139           \begin{beamercolorbox}[sep=8pt,center,#1]{institute}
140             \usebeamerfont{institute}\insertinstitute
141           \end{beamercolorbox}
142           \begin{beamercolorbox}[sep=8pt,center,#1]{date}
143             \usebeamerfont{date}\insertdate
144           \end{beamercolorbox}\vskip0.5em
145           {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
146   \end{columns}
147 }
148
149 \defbeamertemplate*{title page}{fancy}[1][]
150 {
151   \def\beamer@fancy@truetext{true}%
152   \ifx\beamer@fancy@alternativetitlepage\beamer@fancy@truetext%
153     \usebeamertemplate{title page alternative}%
154   \else%
155     \usebeamertemplate{title page normal}%
156   \fi%
157 }
158
159 % Items.
160 \defbeamertemplate{itemize item}{squarealt}%
161 {\tiny\raise.5ex\hbox{\donotcoloroutermaths$\blacksquare$}}
162 \defbeamertemplate{itemize subitem}{squarealt}%
163 {\tiny\raise.4ex\hbox{\donotcoloroutermaths$\square$}}
164 \defbeamertemplate{itemize subsubitem}{squarealt}%
165 {\tiny\raise.3ex\hbox{\donotcoloroutermaths$\blacksquare$}}
166
167 \defbeamertemplate{itemize item}{circlealt}%
168 {\small\raise.2ex\hbox{\donotcoloroutermaths$\bullet$}}
169 \defbeamertemplate{itemize subitem}{circlealt}%
170 {\small\raise.1ex\hbox{\donotcoloroutermaths$\circ$}}
171 \defbeamertemplate{itemize subsubitem}{circlealt}%
172 {\scriptsize\raise.1ex\hbox{\donotcoloroutermaths$\bullet$}}
173
174 \def\circletext{circle}
175 \ifx\beamer@fancy@bullet\circletext
176   \setbeamertemplate{items}[circlealt]
177 \else
178   \setbeamertemplate{items}[squarealt]
179 \fi
180
181 \mode<all>
182

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