Alessio Caiazza is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

nolith / ipv6 - fine del mondo http://slideshare.net/nolith/ipv6-e-la-fine-del-mondo

Slide su IPv6 per la notte blù

Clone this repository (size: 9.7 MB): HTTPS / SSH
hg clone https://bitbucket.org/nolith/ipv6-fine-del-mondo
hg clone ssh://hg@bitbucket.org/nolith/ipv6-fine-del-mondo

ipv6 - fine del mondo / beamerouterthemeprogressbar.sty

commit
8ed461c82949
parent
68081ad44dff
parent
c09d89674da4
branch
default

merge

1
8ac71584cf53
\ProvidesPackage{beamerouterthemeprogressbar}[2007/06/21]
2
8ac71584cf53
3
8ac71584cf53
4
8ac71584cf53
% Beamer theme by Sylvain Bouveret <sylvain[dot]bouveret[aT]cert[DoT]fr>
5
8ac71584cf53
% jun. 2007 version 0.32
6
8ac71584cf53
%
7
8ac71584cf53
% based on the LaTeX-Beamer package :
8
8ac71584cf53
% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>
9
8ac71584cf53
%
10
8ac71584cf53
% This program can be redistributed and/or modified under the terms
11
8ac71584cf53
% of the GNU Public License, version 2.
12
8ac71584cf53
13
8ac71584cf53
\RequirePackage{tikz}
14
8ac71584cf53
15
8ac71584cf53
\makeatletter
16
8ac71584cf53
17
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18
8ac71584cf53
%
19
8ac71584cf53
% Some color definitions...
20
8ac71584cf53
%
21
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22
8ac71584cf53
23
8ac71584cf53
\setbeamercolor{progressbar primary}{parent=palette primary}
24
8ac71584cf53
\setbeamercolor{progressbar secondary}{parent=palette secondary}
25
8ac71584cf53
\setbeamercolor{progressbar tertiary}{parent=palette tertiary}
26
8ac71584cf53
\setbeamercolor{progressbar quaternary}{parent=palette quaternary}
27
8ac71584cf53
28
8ac71584cf53
29
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30
8ac71584cf53
%
31
8ac71584cf53
% Some computations dedicated to the progressbar...
32
8ac71584cf53
%
33
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34
8ac71584cf53
35
8ac71584cf53
\newdimen\progressbar@currentbarlength
36
8ac71584cf53
\newdimen\progressbar@framenumberrectangle
37
8ac71584cf53
\newdimen\progressbar@titlerectangle
38
8ac71584cf53
\newdimen\progressbar@leftbar
39
8ac71584cf53
40
8ac71584cf53
\newcount\progressbar@tmpresult
41
8ac71584cf53
\newcount\progressbar@numer
42
8ac71584cf53
\newcount\progressbar@denom
43
8ac71584cf53
\newcount\progressbar@barlength
44
8ac71584cf53
45
8ac71584cf53
\progressbar@framenumberrectangle=\paperwidth
46
8ac71584cf53
\progressbar@titlerectangle=\paperwidth
47
8ac71584cf53
48
8ac71584cf53
\advance\progressbar@framenumberrectangle by -0.9cm
49
8ac71584cf53
\advance\progressbar@titlerectangle by -1.1cm
50
8ac71584cf53
51
8ac71584cf53
\progressbar@barlength=115 % (in millimeters)
52
8ac71584cf53
\progressbar@leftbar=\progressbar@titlerectangle
53
8ac71584cf53
\advance\progressbar@leftbar by -\progressbar@barlength mm
54
8ac71584cf53
55
8ac71584cf53
\def\insertprogressbar{
56
8ac71584cf53
  \ifnum\inserttotalframenumber=1\else
57
8ac71584cf53
    \progressbar@numer=\insertframenumber
58
8ac71584cf53
    \advance\progressbar@numer by -1
59
8ac71584cf53
    \progressbar@denom=\inserttotalframenumber
60
8ac71584cf53
    \advance\progressbar@denom by -1
61
8ac71584cf53
    \progressbar@tmpresult=\progressbar@barlength
62
8ac71584cf53
    \multiply\progressbar@tmpresult by \progressbar@numer
63
8ac71584cf53
    \divide\progressbar@tmpresult by \progressbar@denom
64
8ac71584cf53
    \progressbar@currentbarlength=\progressbar@tmpresult mm
65
8ac71584cf53
66
8ac71584cf53
    \begin{tikzpicture}
67
8ac71584cf53
      \shade[top color=bg, bottom color=bg!80!fg] (0, 0) rectangle  (\paperwidth, 0.6cm);
68
8ac71584cf53
      \shade[left color=bg,right color=bg!70!fg] (.5\paperwidth, 0.2cm) rectangle (\paperwidth, 0.22cm);
69
8ac71584cf53
      \draw (\progressbar@framenumberrectangle, 0.21cm) node [anchor=mid west, draw=bg!70!fg, fill=bg] {\color{structure.fg!70!bg}\insertframenumber~/~\inserttotalframenumber};
70
8ac71584cf53
      \draw (\progressbar@titlerectangle, 0.32cm) node [anchor=south east] {\color{bg!70!fg}\inserttitle};
71
8ac71584cf53
      \fill (\progressbar@leftbar, 0.12cm) [fill=bg, rounded corners=0.1cm] rectangle (\progressbar@titlerectangle, 0.3cm);
72
8ac71584cf53
      \ifnum\insertframenumber=1\else
73
8ac71584cf53
      \shade[left color=progressbar primary.fg!10!bg, right color=progressbar primary.fg!20!bg, rounded corners=0.1cm] (\progressbar@leftbar, 0.12cm) rectangle ++(\progressbar@currentbarlength, 0.2cm);
74
8ac71584cf53
      \fi
75
8ac71584cf53
      \draw (\progressbar@leftbar, 0.11cm) [draw=bg!70!fg, rounded corners=0.1cm] rectangle ++(\progressbar@barlength mm, 0.2cm);
76
8ac71584cf53
    \end{tikzpicture}
77
8ac71584cf53
  \fi
78
8ac71584cf53
}
79
8ac71584cf53
80
8ac71584cf53
81
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82
8ac71584cf53
%
83
8ac71584cf53
% Definition of the customized templates...
84
8ac71584cf53
%
85
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86
8ac71584cf53
87
8ac71584cf53
\mode<presentation>
88
8ac71584cf53
89
8ac71584cf53
\newlength\progressbar@sectionboxwidth
90
8ac71584cf53
\newlength\progressbar@sectionboxheight
91
8ac71584cf53
\newbox\progressbar@sectionbox
92
8ac71584cf53
\newbox\progressbar@sectionboxbox
93
8ac71584cf53
94
8ac71584cf53
\usesectionheadtemplate
95
8ac71584cf53
  {\hfill
96
8ac71584cf53
    \setbox\progressbar@sectionbox=\hbox{\insertsectionhead}%
97
8ac71584cf53
    \progressbar@sectionboxwidth=\wd\progressbar@sectionbox
98
8ac71584cf53
    \advance\progressbar@sectionboxwidth by 4pt
99
8ac71584cf53
    \setbox\progressbar@sectionbox=\hbox{\pgfinterruptpicture t \endpgfinterruptpicture}%
100
8ac71584cf53
    \progressbar@sectionboxheight=\ht\progressbar@sectionbox
101
8ac71584cf53
    \advance\progressbar@sectionboxheight by 4pt
102
8ac71584cf53
    \begin{tikzpicture}
103
8ac71584cf53
      \useasboundingbox (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
104
8ac71584cf53
      \draw[anchor=base] (0pt, 2pt) node {\color{structure.fg!80!bg} \insertsectionhead};
105
8ac71584cf53
      \draw[rounded corners=3pt, draw=structure.fg!80!bg] (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
106
8ac71584cf53
    \end{tikzpicture}
107
8ac71584cf53
  }
108
8ac71584cf53
  {\hfill
109
8ac71584cf53
    \setbox\progressbar@sectionbox=\hbox{\pgfinterruptpicture\insertsectionhead\endpgfinterruptpicture}%
110
8ac71584cf53
    \progressbar@sectionboxwidth=\wd\progressbar@sectionbox
111
8ac71584cf53
    \advance\progressbar@sectionboxwidth by 4pt
112
8ac71584cf53
    \setbox\progressbar@sectionboxbox=\hbox{\pgfinterruptpicture t \endpgfinterruptpicture}%
113
8ac71584cf53
    \progressbar@sectionboxheight=\ht\progressbar@sectionboxbox
114
8ac71584cf53
    \advance\progressbar@sectionboxheight by 4pt
115
8ac71584cf53
    \begin{tikzpicture}
116
8ac71584cf53
      \useasboundingbox (-0.5\progressbar@sectionboxwidth, 0pt) rectangle (0.5\progressbar@sectionboxwidth, \progressbar@sectionboxheight);
117
8ac71584cf53
      \draw[anchor=base] (0pt, 2pt) node {\color{structure.fg!50!bg} \insertsectionhead};
118
8ac71584cf53
    \end{tikzpicture}
119
8ac71584cf53
  }
120
8ac71584cf53
121
8ac71584cf53
122
8ac71584cf53
123
8ac71584cf53
124
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
125
8ac71584cf53
%
126
8ac71584cf53
% Headline...
127
8ac71584cf53
%
128
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129
8ac71584cf53
130
8ac71584cf53
\defbeamertemplate*{headline}{progressbar theme}
131
8ac71584cf53
{%
132
8ac71584cf53
  \leavevmode%
133
8ac71584cf53
  \begin{beamercolorbox}[wd=\paperwidth,ht=4ex,dp=1.125ex]{section in head/foot}%
134
8ac71584cf53
    \insertsectionnavigationhorizontal{\paperwidth}{}{}%\hskip0pt plus1filll}{}%
135
8ac71584cf53
  \end{beamercolorbox}%
136
8ac71584cf53
}
137
8ac71584cf53
138
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139
8ac71584cf53
%
140
8ac71584cf53
% Footline...
141
8ac71584cf53
%
142
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
143
8ac71584cf53
144
8ac71584cf53
\defbeamertemplate*{footline}{progressbar theme}{
145
8ac71584cf53
  \begin{beamercolorbox}[wd=\paperwidth,ht=0.6cm,dp=0ex]{progressbar in head/foot}%
146
8ac71584cf53
    \insertprogressbar
147
8ac71584cf53
  \end{beamercolorbox}%
148
8ac71584cf53
}
149
8ac71584cf53
150
8ac71584cf53
151
8ac71584cf53
152
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153
8ac71584cf53
%
154
8ac71584cf53
% Title page...
155
8ac71584cf53
%
156
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157
8ac71584cf53
158
8ac71584cf53
159
8ac71584cf53
%\institute{(void)}
160
8ac71584cf53
161
8ac71584cf53
\defbeamertemplate*{title page}{progressbar theme}{
162
8ac71584cf53
  \pgfdeclarehorizontalshading{separationtitlepagelineshading}{0.5pt}{color(0cm)=(bg); color(0.5\textwidth)=(structure.fg); color(\textwidth)=(bg)}
163
8ac71584cf53
  
164
8ac71584cf53
  \makeatletter
165
8ac71584cf53
  \begin{center}
166
8ac71584cf53
    \textbf{\textcolor{structure.fg}\large\inserttitle}
167
8ac71584cf53
    
168
8ac71584cf53
    \pgfuseshading{separationtitlepagelineshading}
169
8ac71584cf53
    \vskip\baselineskip
170
8ac71584cf53
    \footnotesize\insertauthor\\[\baselineskip]
171
8ac71584cf53
    \ifx\insertinstitute\@empty \else\tiny\insertinstitute\\[\baselineskip]\fi
172
8ac71584cf53
    \insertlogo
173
8ac71584cf53
    \vskip\baselineskip
174
8ac71584cf53
    \pgfuseshading{separationtitlepagelineshading}
175
8ac71584cf53
    \vfill
176
8ac71584cf53
    \footnotesize    
177
8ac71584cf53
    \insertdate
178
8ac71584cf53
  \end{center}
179
8ac71584cf53
  \makeatother
180
8ac71584cf53
}
181
8ac71584cf53
\setbeamertemplate{title page}[mytitlepage]
182
8ac71584cf53
183
8ac71584cf53
184
8ac71584cf53
185
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
186
8ac71584cf53
%
187
8ac71584cf53
% Background...
188
8ac71584cf53
%
189
8ac71584cf53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190
8ac71584cf53
191
8ac71584cf53
\defbeamertemplate*{background canvas}{progressbar theme}{\pgfuseshading{background shading}}%[action]
192
8ac71584cf53
193
8ac71584cf53
\AtBeginDocument{%
194
8ac71584cf53
  {
195
8ac71584cf53
    \usebeamercolor{progressbar primary}
196
8ac71584cf53
    \pgfdeclareverticalshading{background shading}{\the\paperwidth}{color(0cm)=(normal text.bg); color(0.8\paperheight)=(normal text.bg); color(0.95\paperheight)=(progressbar primary.bg); color(\paperheight)=(progressbar primary.bg)
197
8ac71584cf53
    }
198
8ac71584cf53
  }
199
8ac71584cf53
}
200
8ac71584cf53
201
8ac71584cf53
\mode
202
8ac71584cf53
<all>
203
8ac71584cf53
204
8ac71584cf53
\makeatother