Debian Codegraph @

texmf-dist/tex/latex/beamer/beamerbasenavigation.sty

raw
1 % Copyright 2003-2007 by Till Tantau
2 % Copyright 2010 by Vedran Mileti\'c
3 % Copyright 2012-2015 by Vedran Mileti\'c, Joseph Wright
4 % Copyright 2017,2018 by Louis Stuart, Joseph Wright
5 % Copyright 2022-2026 by Joseph Wright, samcarter
6 %
7 % This file may be distributed and/or modified
8 %
9 % 1. under the LaTeX Project Public License and/or
10 % 2. under the GNU Public License.
11 %
12 % See the file LICENSE.md for more details.
13
14 \mode
15 <presentation>
16
17 %
18 % Navigation buttons
19 %
20
21 % The following commands are called by the .nav file.
22 \def\beamer@framepages#1#2{%
23 \ifnum\c@page<#1%
24 \else%
25 \ifnum\c@page>#2%
26 \else%
27 \gdef\beamer@startpageofframe{#1}%
28 \gdef\beamer@endpageofframe{#2}%
29 \fi%
30 \fi%
31 }
32 \def\beamer@subsectionpages#1#2{%
33 \ifnum\c@page<#1%
34 \else%
35 \ifnum\c@page>#2%
36 \else%
37 \gdef\beamer@startpageofsubsection{#1}%
38 \gdef\beamer@endpageofsubsection{#2}%
39 \fi%
40 \fi%
41 }
42 \def\beamer@sectionpages#1#2{%
43 \ifnum\c@page<#1%
44 \else%
45 \ifnum\c@page>#2%
46 \else%
47 \gdef\beamer@startpageofsection{#1}%
48 \gdef\beamer@endpageofsection{#2}%
49 \fi%
50 \fi%
51 }
52 \def\beamer@partpages#1#2{%
53 \ifnum\c@page<#1%
54 \else%
55 \ifnum\c@page>#2%
56 \else%
57 \gdef\beamer@startpageofpart{#1}%
58 \gdef\beamer@endpageofpart{#2}%
59 \fi%
60 \fi%
61 }
62 \def\beamer@nextpage#1{%
63 \beamer@tempcount=#1%
64 \advance\beamer@tempcount by1\relax%
65 \ifnum\beamer@tempcount>\beamer@endpageofdocument%
66 \beamer@tempcount=\beamer@endpageofdocument%
67 \fi}
68 \def\beamer@prevpage#1{%
69 \beamer@tempcount=#1\relax%
70 \ifnum\beamer@tempcount>1%
71 \advance\beamer@tempcount by-1%
72 \fi%
73 }
74
75 \def\hyperlinkslideprev{%
76 \beamer@prevpage\c@page%
77 \hyperlink{Navigation\the\beamer@tempcount}}
78 \def\hyperlinkslidenext{%
79 \beamer@nextpage\c@page%
80 \hyperlink{Navigation\the\beamer@tempcount}}
81 \def\hyperlinkframestart{\hyperlink{Navigation\beamer@startpageofframe}}
82 \def\hyperlinkframeend{\hyperlink{Navigation\beamer@endpageofframe}}
83 \def\hyperlinkframestartnext{%
84 \beamer@nextpage\beamer@endpageofframe%
85 \hyperlink{Navigation\the\beamer@tempcount}}
86 \def\hyperlinkframeendprev{%
87 \beamer@prevpage\beamer@startpageofframe%
88 \hyperlink{Navigation\the\beamer@tempcount}}
89
90 \def\hyperlinksubsectionstart{\hyperlink{Navigation\beamer@startpageofsubsection}}
91 \def\hyperlinksubsectionend{\hyperlink{Navigation\beamer@endpageofsubsection}}
92 \def\hyperlinksubsectionstartnext{%
93 \beamer@nextpage\beamer@endpageofsubsection%
94 \hyperlink{Navigation\the\beamer@tempcount}}
95 \def\hyperlinksubsectionendprev{%
96 \beamer@prevpage\beamer@startpageofsubsection%
97 \hyperlink{Navigation\the\beamer@tempcount}}
98
99 \def\hyperlinksectionstart{\hyperlink{Navigation\beamer@startpageofsection}}
100 \def\hyperlinksectionend{\hyperlink{Navigation\beamer@endpageofsection}}
101 \def\hyperlinksectionstartnext{%
102 \beamer@nextpage\beamer@endpageofsection%
103 \hyperlink{Navigation\the\beamer@tempcount}}
104 \def\hyperlinksectionendprev{%
105 \beamer@prevpage\beamer@startpageofsection%
106 \hyperlink{Navigation\the\beamer@tempcount}}
107
108 \def\hyperlinkpartstart{\hyperlink{Navigation\beamer@startpageofpart}}
109 \def\hyperlinkpartend{\hyperlink{Navigation\beamer@endpageofpart}}
110 \def\hyperlinkpartstartnext{%
111 \beamer@nextpage\beamer@endpageofpart%
112 \hyperlink{Navigation\the\beamer@tempcount}}
113 \def\hyperlinkpartendprev{%
114 \beamer@prevpage\beamer@startpageofpart%
115 \hyperlink{Navigation\the\beamer@tempcount}}
116
117 \def\hyperlinkpresentationstart{\hyperlink{Navigation1}}
118 \def\hyperlinkpresentationend{%
119 \ifx\beamer@startpageofappendix\@empty%
120 \beamer@tempcount=\beamer@endpageofdocument%
121 \else%
122 \beamer@prevpage\beamer@startpageofappendix%
123 \fi%
124 \hyperlink{Navigation\the\beamer@tempcount}}
125 \def\hyperlinkappendixstart{%
126 \ifx\beamer@startpageofappendix\@empty%
127 \beamer@tempcount=\beamer@endpageofdocument%
128 \else%
129 \beamer@tempcount=\beamer@startpageofappendix%
130 \fi%
131 \hyperlink{Navigation\the\beamer@tempcount}}
132 \def\hyperlinkappendixend{\hyperlink{Navigation\beamer@endpageofdocument}}
133
134 \def\hyperlinkdocumentstart{\hyperlink{Navigation1}}
135 \def\hyperlinkdocumentend{\hyperlink{Navigation\beamer@endpageofdocument}}
136
137 \mode
138 <article>
139 {
140 \newcommand<>\hyperlinkslideprev[1]{}
141 \newcommand<>\hyperlinkslidenext[1]{}
142
143 \newcommand<>\hyperlinkframestart[1]{}
144 \newcommand<>\hyperlinkframeend[1]{}
145 \newcommand<>\hyperlinkframestartnext[1]{}
146 \newcommand<>\hyperlinkframeendprev[1]{}
147
148 \newcommand<>\hyperlinksubsectionstart[1]{}
149 \newcommand<>\hyperlinksubsectionend[1]{}
150 \newcommand<>\hyperlinksubsectionstartnext[1]{}
151 \newcommand<>\hyperlinksubsectionendprev[1]{}
152
153 \newcommand<>\hyperlinksectionstart[1]{}
154 \newcommand<>\hyperlinksectionend[1]{}
155 \newcommand<>\hyperlinksectionstartnext[1]{}
156 \newcommand<>\hyperlinksectionendprev[1]{}
157
158 \newcommand<>\hyperlinkpartstart[1]{}
159 \newcommand<>\hyperlinkpartend[1]{}
160 \newcommand<>\hyperlinkpartstartnext[1]{}
161 \newcommand<>\hyperlinkpartendprev[1]{}
162
163 \newcommand<>\hyperlinkpresentationstart[1]{}
164 \newcommand<>\hyperlinkpresentationend[1]{}
165 \newcommand<>\hyperlinkappendixstart[1]{}
166 \newcommand<>\hyperlinkappendixend[1]{}
167
168 \newcommand<>\hyperlinkdocumentstart[1]{}
169 \newcommand<>\hyperlinkdocumentend[1]{}
170 }
171
172 \newcommand\insertframestartpage{\beamer@startpageofframe}
173 \newcommand\insertframeendpage{\beamer@endpageofframe}
174 \newcommand\insertsubsectionstartpage{\beamer@startpageofsubsection}
175 \newcommand\insertsubsectionendpage{\beamer@endpageofsubsection}
176 \newcommand\insertsectionstartpage{\beamer@startpageofsection}
177 \newcommand\insertsectionendpage{\beamer@endpageofsection}
178 \newcommand\insertpartstartpage{\beamer@startpageofpart}
179 \newcommand\insertpartendpage{\beamer@endpageofpart}
180 \newcommand\insertpresentationstartpage{1}
181 \newcommand\insertpresentationendpage{{%
182 \ifx\beamer@startpageofappendix\@empty%
183 \beamer@tempcount=\beamer@endpageofdocument\relax%
184 \else%
185 \beamer@prevpage\beamer@startpageofappendix\relax%
186 \fi%
187 \the\beamer@tempcount}}
188 \newcommand\insertappendixstartpage{{%
189 \ifx\beamer@startpageofappendix\@empty%
190 \beamer@tempcount=\beamer@endpageofdocument\relax%
191 \else%
192 \beamer@tempcount=\beamer@startpageofappendix\relax%
193 \fi%
194 \the\beamer@tempcount}}
195 \newcommand\insertappendixendpage{\beamer@endpageofdocument}
196 \newcommand\insertdocumentstartpage{1}
197 \newcommand\insertdocumentendpage{\beamer@endpageofdocument}
198
199
200 %
201 % Navigation Button Art
202 %
203
204 \def\beamer@linkspace#1{\vbox to7.5pt{}\kern#1}
205
206 % Due to what could be regarded as a bug in hyperref or DVIPDFm and
207 % derivatives, no links are made to empty boxes with XeTeX. This is
208 % fixed by drawing some 'real' content, which makes the PDF bigger!
209 \begingroup\expandafter\expandafter\expandafter\endgroup
210 \expandafter\ifx\csname XeTeXrevision\endcsname\relax
211 \expandafter\@gobble
212 \else
213 \expandafter\@firstofone
214 \fi
215 {%
216 \def\beamer@linkspace#1{%
217 \@ifundefined{if@RTL}{%
218 \special{dvipdfmx:catch_phantom true height 8pt depth 1.5pt}%
219 \vbox to7.5pt{}\kern#1%
220 }{%
221 \if@RTL%
222 \vbox to7.5pt{}\kern#1%
223 \special{dvipdfmx:catch_phantom true height 8pt depth 1.5pt}%
224 \else%
225 \special{dvipdfmx:catch_phantom true height 8pt depth 1.5pt}%
226 \vbox to7.5pt{}\kern#1%
227 \fi%
228 }%
229 }%
230 }
231
232 \input{beamerbasenavigationsymbols}
233
234 %
235 % User Buttons
236 %
237
238 \pgfdefobject{beamergotosymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{5pt}{5pt}}
239 {
240 \pgfpathqmoveto{1.5bp}{0.5bp}
241 \pgfpathqlineto{3.5bp}{2bp}
242 \pgfpathqlineto{1.5bp}{3.5bp}
243 \pgfusepathqfill
244 }
245
246 \def\insertgotosymbol{%
247 \begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
248 \pgfuseobject{beamergotosymbol}%
249 \end{pgfpicture}}
250
251 \pgfdefobject{beamerskipsymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{7pt}{5pt}}
252 {
253 \pgfpathqmoveto{1.5bp}{0.5bp}
254 \pgfpathqlineto{3.5bp}{2bp}
255 \pgfpathqlineto{1.5bp}{3.5bp}
256 \pgfpathqmoveto{3.5bp}{0.5bp}
257 \pgfpathqlineto{5.5bp}{2bp}
258 \pgfpathqlineto{3.5bp}{3.5bp}
259 \pgfusepathqfill
260 }
261
262 \def\insertskipsymbol{%
263 \begin{pgfpicture}{1pt}{0pt}{8pt}{5pt}
264 \pgfuseobject{beamerskipsymbol}%
265 \end{pgfpicture}}
266
267
268 \pgfdefobject{beamerreturnsymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{5pt}{5pt}}
269 {
270 \pgfpathqmoveto{3.5bp}{0.5bp}
271 \pgfpathqlineto{1.5bp}{2bp}
272 \pgfpathqlineto{3.5bp}{3.5bp}
273 \pgfusepathqfill
274 }
275
276 \def\insertreturnsymbol{%
277 \begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
278 \pgfuseobject{beamerreturnsymbol}%
279 \end{pgfpicture}}
280
281
282 \def\beamerbutton#1{\def\insertbuttontext{#1}\usebeamertemplate**{button}}
283 \def\beamergotobutton#1{\beamerbutton{\insertgotosymbol#1}}
284 \def\beamerskipbutton#1{\beamerbutton{\insertskipsymbol#1}}
285 \def\beamerreturnbutton#1{\beamerbutton{\insertreturnsymbol#1}}
286
287 \mode
288 <article>
289 {
290 \let\beamerbutton=\@firstofone
291 \let\beamergotobutton=\beamerbutton
292 \let\beamerskipbutton=\beamerbutton
293 \let\beamerreturnbutton=\beamerbutton
294 }
295
296
297 %
298 % Inserting navigation bars
299 %
300
301 \newdimen\beamer@section@min@dim
302 \newcommand*{\beamer@section@set@min@width}{%
303 \ifdim\wd\beamer@sectionbox>\beamer@section@min@dim
304 \else
305 \setbox\beamer@sectionbox=\hbox to \beamer@section@min@dim
306 {\box\beamer@sectionbox\hfil}%
307 \global\beamer@section@min@dim\z@
308 \fi
309 }
310
311 \def\insertnavigation#1{%
312 \vbox{{%
313 \usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
314 \beamer@xpos=0\relax%
315 \beamer@ypos=1\relax%
316 \beamer@ypos@offset=0\relax%
317 \hbox to #1{\hskip.3cm\setbox\beamer@sectionbox=\hbox{\kern1sp}%
318 \ht\beamer@sectionbox=1.875ex%
319 \dp\beamer@sectionbox=0.75ex%
320 \hskip-1.875ex plus-1fill%
321 \global\beamer@section@min@dim\z@
322 \dohead%
323 \beamer@section@set@min@width
324 \box\beamer@sectionbox\hfil\hskip.3cm}%
325 }}}
326
327 \def\sectionentry#1#2#3#4#5{% section number, section title, page
328 \beamer@xpos=0\relax%
329 \beamer@ypos=1\relax%
330 \beamer@ypos@offset=0\relax%
331 \ifnum#5=\c@part%
332 \beamer@section@set@min@width%
333 \box\beamer@sectionbox\hskip1.875ex plus 1fill%
334 \setbox\beamer@sectionbox=
335 \hbox{\def\insertsectionhead{#2}%
336 \def\insertsectionheadnumber{#1}%
337 \def\insertpartheadnumber{#5}%
338 {%
339 \usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
340 \ifnum\c@section=#1%
341 \hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot}}}%
342 \else%
343 \hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot shaded}}}%
344 \fi}%
345 }%
346 \ht\beamer@sectionbox=1.875ex%
347 \dp\beamer@sectionbox=0.75ex%
348 \fi\ignorespaces}
349
350 \def\beamer@nav@subsectionstyle#1{\beamer@toc@sprocess\beamer@nav@css\beamer@nav@oss\beamer@nav@ooss#1///}
351 \beamer@nav@subsectionstyle{show}
352
353 \def\beamer@subsectionentry#1#2#3#4#5{}% no effect by default.
354 \def\beamer@subsubsectionentry#1#2#3#4#5#6{}% no effect by default.
355
356 \def\insertverticalnavigation#1{%
357 \vbox{%
358 \def\sectionentry##1##2##3##4##5{%
359 \ifnum##5=\c@part%
360 \def\insertsectionhead{##2}%
361 \def\insertsectionheadnumber{##1}%
362 \def\insertpartheadnumber{##5}%
363 \hbox to #1{{%
364 \usebeamerfont{section in sidebar}\usebeamercolor[fg]{section in sidebar}%
365 \hyperlink{Navigation##3}{%
366 \ifnum\c@section=##1%
367 \ifnum\c@subsection=0\relax%
368 {\usebeamertemplate{section in sidebar}}%
369 \else%
370 \ifx\beamer@nav@css\beamer@hidetext%
371 {\usebeamertemplate{section in sidebar}}%
372 \else%
373 {\usebeamertemplate{section in sidebar shaded}}%
374 \fi%
375 \fi%
376 \else
377 {\usebeamertemplate{section in sidebar shaded}}%
378 \fi}}}%
379 \beamer@currentsubsection=0\relax\fi}%
380 \def\slideentry##1##2##3##4##5##6{}%
381 \def\beamer@subsectionentry##1##2##3##4##5{%
382 \ifnum##1=\c@part%
383 \def\insertpartheadnumber{##1}%
384 \def\insertsectionheadnumber{##2}%
385 \def\insertsubsectionheadnumber{##3}%
386 \def\insertsubsectionhead{##5}%
387 \beamer@tocifnothide{\ifnum\c@section=##2\ifnum\c@subsection=##3\beamer@nav@css\else\beamer@nav@oss\fi\else\beamer@nav@ooss\fi}%
388 {\hbox{{%
389 \usebeamerfont{subsection in sidebar}\usebeamercolor[fg]{subsection in sidebar}%
390 \hyperlink{Navigation##4}{%
391 \ifnum\c@section=##2%
392 \ifnum\c@subsection=##3%
393 \ifnum\c@subsubsection=0\relax%
394 {\usebeamertemplate{subsection in sidebar}}%
395 \else%
396 {\usebeamertemplate{subsection in sidebar shaded}}%
397 \fi%
398 \else%
399 {\usebeamertemplate{subsection in sidebar shaded}}%
400 \fi%
401 \else%
402 {\usebeamertemplate{subsection in sidebar shaded}}%
403 \fi}}}%
404 }%
405 \fi}%
406 \def\beamer@subsubsectionentry##1##2##3##4##5##6{%
407 \ifnum##1=\c@part%
408 \def\insertpartheadnumber{##1}%
409 \def\insertsectionheadnumber{##2}%
410 \def\insertsubsectionheadnumber{##3}%
411 \def\insertsubsubsectionheadnumber{##4}%
412 \def\insertsubsubsectionhead{##6}%
413 \beamer@tocifnothide{\ifnum\c@section=##2\ifnum\c@subsection=##3\ifnum\c@subsubsection=##4\beamer@nav@css\else\beamer@nav@oss\fi\else\beamer@nav@ooss\fi\else\beamer@nav@ooss\fi}%
414 {\hbox{{%
415 \usebeamerfont{subsubsection in sidebar}\usebeamercolor[fg]{subsubsection in sidebar}%
416 \hyperlink{Navigation##5}{%
417 \ifnum\c@section=##2%
418 \ifnum\c@subsection=##3%
419 \ifnum\c@subsubsection=##4%
420 {\usebeamertemplate{subsubsection in sidebar}}%
421 \else
422 {\usebeamertemplate{subsubsection in sidebar shaded}}%
423 \fi%
424 \else%
425 {\usebeamertemplate{subsubsection in sidebar shaded}}%
426 \fi%
427 \else%
428 {\usebeamertemplate{subsubsection in sidebar shaded}}%
429 \fi}}}%
430 }%
431 \fi}%
432 %\beamer@currentsubsection=0\relax%
433 \dohead%
434 }%
435 }
436
437 \def\slideentry#1#2#3#4#5#6{%
438 %section number, subsection number, slide number, first/last frame, page number, part number
439 \ifnum#6=\c@part\ifnum#1>0\ifnum#3>0%
440 \ifbeamer@compress%
441 \advance\beamer@xpos by1\relax%
442 \else%
443 \ifnum#2=0%
444 \beamer@ypos@offset=1\relax%
445 \fi
446 \beamer@xpos=#3\relax%
447 \beamer@ypos=#2\relax%
448 \advance\beamer@ypos by \beamer@ypos@offset\relax
449 \fi%
450 \hbox to 0pt{%
451 \beamer@tempdim=-\beamer@vboxoffset%
452 \advance\beamer@tempdim by-\beamer@boxsize%
453 \multiply\beamer@tempdim by\beamer@ypos%
454 \advance\beamer@tempdim by -.05cm%
455 \raise\beamer@tempdim\hbox{%
456 \beamer@tempdim=\beamer@boxsize%
457 \multiply\beamer@tempdim by\beamer@xpos%
458 \advance\beamer@tempdim by -\beamer@boxsize%
459 \advance\beamer@tempdim by 1pt%
460 \kern\beamer@tempdim
461 \global\beamer@section@min@dim\beamer@tempdim
462 \hbox{\beamer@link(#4){%
463 \usebeamerfont{mini frame}%
464 \ifnum\c@section=#1%
465 \ifnum\c@subsection=#2%
466 \usebeamercolor[fg]{mini frame}%
467 \ifnum\c@subsectionslide=#3%
468 \usebeamertemplate{mini frame}%\beamer@minislidehilight%
469 \else%
470 \usebeamertemplate{mini frame in current subsection}%\beamer@minisliderowhilight%
471 \fi%
472 \else%
473 \usebeamercolor{mini frame}%
474 %\color{fg!50!bg}%
475 \usebeamertemplate{mini frame in other subsection}%\beamer@minislide%
476 \fi%
477 \else%
478 \usebeamercolor{mini frame}%
479 %\color{fg!50!bg}%
480 \usebeamertemplate{mini frame in other section}%\beamer@minislide%
481 \fi%
482 }}}\hskip-10cm plus 1fil%
483 }\fi\fi%
484 \else%
485 \fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
486 \fi\ignorespaces
487 }
488
489 \def\fakeslideentry#1#2#3#4#5#6{%
490 \ifnum#1>0\ifnum#3>0%
491 \ifbeamer@compress%
492 \advance\beamer@xpos by1\relax%
493 \else%
494 \ifnum#2=0%
495 \beamer@ypos@offset=1\relax%
496 \fi
497 \beamer@xpos=#3\relax%
498 \beamer@ypos=#2\relax%
499 \advance\beamer@ypos by \beamer@ypos@offset\relax
500 \fi%
501 \hbox to 0pt{\beamer@tempdim=-\beamer@vboxoffset%
502 \advance\beamer@tempdim by -\beamer@boxsize%
503 \multiply\beamer@tempdim by\beamer@ypos%
504 \advance\beamer@tempdim by -.05cm%
505 \raise\beamer@tempdim\hbox{}}\fi\fi\ignorespaces}
506
507
508 \def\beamer@link(#1/#2){%
509 \def\beamer@goto{{Navigation#1}}% default: first slide of frame
510 \ifnum\c@page<#2%
511 \ifnum\c@page<#1\else% go to last slide of frame, on all slides of
512 % the frame, except for the last one
513 \def\beamer@goto{{Navigation#2}}% jump to last slide of frame
514 \fi\fi%
515 \expandafter\hyperlink\beamer@goto}
516
517 \define@key{beamer@margin}{mini frame size}{\beamer@boxsize=#1}
518 \define@key{beamer@margin}{mini frame offset}{\beamer@vboxoffset=#1}
519
520 \def\insertsectionnavigation#1{%
521 \hbox to #1{%
522 \vbox{{\usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
523 \vskip0.5625ex%
524 \def\slideentry##1##2##3##4##5##6{}%
525 \def\sectionentry##1##2##3##4##5{%
526 \ifnum##5=\c@part%
527 \def\insertsectionhead{##2}%
528 \def\insertsectionheadnumber{##1}%
529 \def\insertpartheadnumber{##5}%
530 \setbox\beamer@tempbox=\hbox{%
531 \hyperlink{Navigation##3}{\hbox to #1{%
532 \hskip0.3cm%
533 \ifnum\c@section=##1%
534 {\usebeamertemplate{section in head/foot}}%
535 \else%
536 {\usebeamertemplate{section in head/foot shaded}}%
537 \fi\hskip0.3cm}}}%
538 \ht\beamer@tempbox=1.6875ex\dp\beamer@tempbox=0.75ex%
539 \box\beamer@tempbox\fi}%
540 \dohead\vskip0.5625ex}}\hfil}}
541
542 \def\insertsectionnavigationhorizontal#1#2#3{%
543 \hbox to #1{{%
544 \def\slideentry##1##2##3##4##5##6{}%
545 #2\hskip.3cm%
546 \usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
547 \setbox\beamer@sectionbox=\hbox{}%
548 \ht\beamer@sectionbox=1.875ex%
549 \dp\beamer@sectionbox=0.75ex%
550 \hskip-1.875ex plus-1fill\dohead%
551 \box\beamer@sectionbox\hfil\hskip.3cm%
552 #3}}}
553
554 \def\insertsubsectionnavigation#1{%
555 \hbox to #1{%
556 \vbox{{%
557 \usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}%
558 \vskip0.5625ex%
559 \beamer@currentsubsection=0%
560 \def\sectionentry##1##2##3##4##5{}%
561 \def\slideentry##1##2##3##4##5##6{\ifnum##6=\c@part\ifnum##1=\c@section%
562 \ifnum##2>\beamer@currentsubsection%
563 \beamer@currentsubsection=##2%
564 \def\insertsubsectionhead{##5}%
565 \def\insertsectionheadnumber{##1}%
566 \def\insertsubsectionheadnumber{##2}%
567 \def\insertpartheadnumber{##6}%
568 \setbox\beamer@tempbox=\hbox{\beamer@link(##4){%
569 \hbox to #1{\hskip0.3cm%
570 \ifnum\c@subsection=##2%
571 {\usebeamertemplate{subsection in head/foot}}%
572 \else%
573 {\usebeamertemplate{subsection in head/foot shaded}}%
574 \fi\hfil\hskip0.3cm}}}%
575 \ht\beamer@tempbox=1.6875ex\dp\beamer@tempbox=0.75ex%
576 \box\beamer@tempbox\fi\fi\fi}%
577 \dohead\vskip0.5625ex}}\hfil}}
578
579 \def\insertsubsectionnavigationhorizontal#1#2#3{%
580 \hbox to #1{{%
581 \usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}%
582 \beamer@currentsubsection=0%
583 \def\sectionentry##1##2##3##4##5{}%
584 \def\slideentry##1##2##3##4##5##6{\ifnum##6=\c@part\ifnum##1=\c@section%
585 \ifnum##2>\beamer@currentsubsection%
586 \beamer@currentsubsection=##2%
587 \box\beamer@sectionbox\hskip1.875ex plus1fill%
588 \setbox\beamer@sectionbox=
589 \hbox{\def\insertsubsectionhead{##5}%
590 \def\insertsectionheadnumber{##1}%
591 \def\insertsubsectionheadnumber{##2}%
592 \def\insertpartheadnumber{##6}%
593 \ifnum\c@subsection=##2%
594 \beamer@link(##4){{\usebeamertemplate{subsection in head/foot}}}\else%
595 \beamer@link(##4){{\usebeamertemplate{subsection in head/foot shaded}}}\fi}%
596 \ht\beamer@sectionbox=1.875ex%
597 \dp\beamer@sectionbox=0.75ex%
598 \fi\fi\fi\ignorespaces}%
599 #2\hskip.3cm\setbox\beamer@sectionbox=\hbox{}%
600 \hskip-1.875ex plus-1fill\dohead%
601 \box\beamer@sectionbox\hfil\hskip.3cm%
602 #3}}}
603
604
605
606 %
607 % Name slides
608 %
609
610 \def\beamer@inserttarget#1{%
611 \ifbeamer@inframe%
612 \ifvmode%
613 \nointerlineskip\vbox to0pt{#1}%
614 \else%
615 \hbox{#1}%
616 \fi%
617 \else% defer to next frame
618 \expandafter\gdef\expandafter\beamer@framehypertargets\expandafter{\beamer@framehypertargets#1}%
619 \fi%
620 }
621
622
623 \def\beamer@nameslide#1{%
624 \addtocontents{snm}{\protect\beamer@slide{#1}{\the\c@page}}%
625 \beamer@inserttarget{\hypertarget{#1}{}}}
626 \def\beamer@dummynameslide{\beamer@inserttarget{}}
627
628 \def\beamer@slide#1#2{\expandafter\def\csname beamer@hyperlink#1\endcsname{%
629 \hyperlink{Navigation#2}}}
630
631 \let\beamer@framehypertargets\@empty
632
633 %
634 % Page anchors
635 %
636
637 % This code is copied from hyperref, which doesn't activate this part with
638 % option "implicit = false" set. Things are much simplified as we already
639 % know that anchors are required and what to use for them.
640
641 \def\Hy@EveryPageAnchor{%
642 \Hy@DistillerDestFix
643 \vbox to 0pt{%
644 \kern\voffset
645 \kern\topmargin
646 \kern-1bp\relax
647 \hbox to 0pt{%
648 \kern\hoffset
649 \kern\ifodd\value{page}%
650 \oddsidemargin
651 \else
652 \evensidemargin
653 \fi
654 \kern-1bp\relax
655 \hyper@@anchor{Navigation\the\c@page}\relax%
656 \hyper@@anchor{page.\the\c@page}\relax%
657 \hss
658 }%
659 \vss
660 }%
661 }
662
663 \AtBeginShipout{%
664 \setbox\AtBeginShipoutBox=\vbox{%
665 \offinterlineskip
666 \Hy@EveryPageAnchor
667 \box\AtBeginShipoutBox
668 }%
669 }
670
671 \providecommand*{\Hy@DistillerDestFix}{}
672
673 \mode
674 <all>