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