Debian Codegraph @

texmf-dist/doc/latex/beamersubframe/bsf-example.tex

raw
1 %%
2 %% This is file `bsf-example.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% beamersubframe.dtx (with options: `example')
8 %%
9 %% Copyright (c) 2011 Mike Kaufmann, all rights reserved
10 %%
11 %% This program is provided under the terms of the
12 %% LaTeX Project Public License distributed from CTAN
13 %% archives in directory macros/latex/base/lppl.txt.
14 %%
15 %% Author: Mike Kaufmann
16 %% [email protected]
17 %%
18 %% \CharacterTable
19 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
20 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
21 %% Digits \0\1\2\3\4\5\6\7\8\9
22 %% Exclamation \! Double quote \" Hash (number) \#
23 %% Dollar \$ Percent \% Ampersand \&
24 %% Acute accent \' Left paren \( Right paren \)
25 %% Asterisk \* Plus \+ Comma \,
26 %% Minus \- Point \. Solidus \/
27 %% Colon \: Semicolon \; Less than \<
28 %% Equals \= Greater than \> Question mark \?
29 %% Commercial at \@ Left bracket \[ Backslash \\
30 %% Right bracket \] Circumflex \^ Underscore \_
31 %% Grave accent \` Left brace \{ Vertical bar \|
32 %% Right brace \} Tilde \~}
33 %%
34 \documentclass{beamer}
35 \usepackage{lmodern}
36 \usepackage[T1]{fontenc}
37
38 \usepackage[append]{beamersubframe}
39
40 \newcommand<>{\linkdetail}[4]{%
41 \ifappend{\uncover#5{\hyperlink{#3}{\beamergotobutton{#4}}}}%
42 {\uncover#5{\hyperlink{#1}{\beamerskipbutton{#2}}}}
43 }
44 \newcommand<>{\returndetail}[2]{%
45 \ifappend{\uncover#3{\hyperlink{#1}{\beamerreturnbutton{#2}}}}%
46 {\visible<0>{\beamerreturnbutton{#2}}}
47 }
48 \newcommand<>{\linkdifftext}[3]{%
49 \ifappend{\uncover#4{\hyperlink{#1}{\beamergotobutton{#3}}}}%
50 {\uncover#4{\hyperlink{#1}{\beamerskipbutton{#2}}}}
51 }
52
53 \defbeamertemplate*{sidebar left}{bsf test}[1][50]
54 {
55 \vfill%
56 \rlap{\hskip0.1cm\hbox{\color{fg!#1!bg}\tiny{\ifsubframe{detail}{main part}}}}%
57 \vskip2pt%
58 }
59
60 \begin{document}
61 \begin{frame}{some frame}
62 \begin{itemize}[<+->]
63 \item there is foo
64 \item foo is good
65 \item and there is bar
66 \item bar is good too
67 \end{itemize}
68 \end{frame}
69
70 \begin{frame}<1-2>[label=lfoo]{frame on foo}
71 \begin{itemize}[<+->]
72 \item item a
73 \item item b \linkdetail<2>{lfoo<3>}{Skip Details}{ldfoob}{Goto Details}
74 \item item c
75 \item item d
76 \end{itemize}
77 \end{frame}
78
79 \begin{subframe}[label=ldfoob]{details on foo item b}
80 \begin{itemize}[<+->]
81 \item item b.1
82 \item item b.2
83 \item item b.3
84 \item item b.4
85 \end{itemize}
86 \end{subframe}
87
88 \begin{subframe}
89 \frametitle{more details on foo item b}
90 \begin{itemize}[<+->]
91 \item item b.5
92 \item item b.6
93 \item item b.7
94 \item item b.8
95 \end{itemize}
96
97 \vspace{2ex}
98 \returndetail<4>{lfoo<3>}{Return from Details}
99 \end{subframe}
100
101 \againframe<3->{lfoo}
102
103 \begin{frame}{frame on bar}
104 \begin{itemize}[<+->]
105 \item item w
106 \item item x
107 \item item y
108 \item item z \linkdetail<4>{lother}{Skip Details}{ldbarz}{Goto Details}
109 \end{itemize}
110 \end{frame}
111
112 \begin{subframe}[label=ldbarz]
113 \frametitle{details on bar item z}
114 \begin{itemize}[<+->]
115 \item item z.1
116 \item item z.2
117 \item item z.3
118 \item item z.4
119 \end{itemize}
120
121 \vspace{2ex}
122 \linkdifftext<4>{lother}{Skip further Details}{Return from Details}
123 \end{subframe}
124
125 \begin{subframe}{more details on bar item z}
126 \begin{itemize}[<+->]
127 \item item z.5
128 \item item z.6
129 \item item z.7
130 \item item z.8
131 \end{itemize}
132
133 \vspace{2ex}
134 \returndetail<4>{lother}{Return from Details}
135 \end{subframe}
136
137 \begin{frame}[label=lother]{another frame}
138 \begin{itemize}[<+->]
139 \item conclusion 1
140 \item conclusion 2
141 \item conclusion 3
142 \item conclusion 4
143 \end{itemize}
144 \end{frame}
145
146 \appendsubframes
147 \end{document}
148 \endinput
149 %%
150 %% End of file `bsf-example.tex'.