Debian Codegraph @

texmf-dist/doc/latex/aobs-tikz/example.tex

raw
1 %%
2 %% This is file `example.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% aobs-tikz.dtx (with options: `example')
8 %% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
9 %% aobs-tikz - TikZ auxiliary styles for Beamer overlays
10 %%
11 %% E-mail: claudio dot fiandrino at gmail dot com
12 %%
13 %% Released under the LaTeX Project Public License v1.3c or later
14 %% See http://www.latex-project.org/lppl.txt
15 %% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
16 %%
17 %% The package defines auxiliary TikZ styles useful for
18 %% overlaying pictures' elements in Beamer.
19 %%
20 %% The TikZ styles are grouped in a library, overlay-beamer-styles
21 %% which is automatically called by the aobs-tikz package. Users
22 %% can either load only aobs-tikz or the library; the latter method
23 %% necessitates TikZ manual load.
24 \documentclass{beamer}
25 \usepackage{lmodern}
26 \usepackage{tikz}
27 \usetikzlibrary{positioning,
28 shapes.geometric,
29 shadows
30 }
31 \usetikzlibrary{overlay-beamer-styles}
32
33 \definecolor{processblue}{cmyk}{0.96,0,0,0}
34
35 \begin{document}
36 \begin{frame}{Styles for draw, fill and shading modifications}
37 \begin{columns}[T]
38 \begin{column}{0.2\textwidth}
39 \centering
40 Fill draw\\[2ex]
41 \tikz[baseline=(A.base)]{%
42 \node[background fill=red!50,%
43 fill on=<2>,%
44 anchor=base,%
45 rounded corners,%
46 ] (A) {ABCD};
47 }
48
49 \tikz[baseline=(A.base)]{%
50 \node[background fill=blue!50,%
51 fill on=<{1,3}>,%
52 anchor=base,%
53 rounded corners,%
54 ] (A) {EFGH};
55 }
56
57 \tikz[baseline=(A.base)]{%
58 \node[background draw=red,%
59 draw on=<2>,%
60 anchor=base,%
61 rounded corners,%
62 ] (A) {IJKL};
63 }
64
65 \tikz[baseline=(A.base)]{%
66 \node[background draw=blue,%
67 draw on=<{1,3}>,%
68 anchor=base,%
69 rounded corners,%
70 ] (A) {MNOP};
71 }
72
73 \tikz[baseline=(A.base)]{%
74 \node[background filldraw=red filled by blue!10,%
75 filldraw on=<2>,anchor=base,%
76 rounded corners,%
77 ] (A) {QRST};
78 }
79 \end{column}
80 \begin{column}{0.2\textwidth}
81 \centering
82 Shadings\\[2ex]
83 \tikz[baseline=(A.base)]{%
84 \node[background shade={top color=red!50, bottom color=white},%
85 shade on=<2>,%
86 anchor=base,%
87 rounded corners,%
88 ] (A) {ABCD};
89 }
90
91 \tikz[baseline=(A.base)]{%
92 \node[background shade={inner color=red!50, outer color=white},%
93 shade on=<{1,3}>,%
94 anchor=base,%
95 rounded corners,%
96 ] (A) {EFGH};
97 }
98
99 \tikz[baseline=(A.base)]{
100 \node[background shade={left color=orange!50, right color=white},%
101 shade on=<2>,%
102 anchor=base,%
103 rounded corners,%
104 ] (A) {IJKL};
105 }
106
107 \tikz[baseline=(A.base)]{
108 \node[background shadedraw={blue}{top color=white, bottom color=cyan!30},%
109 shadedraw on=<{1,3}>,%
110 anchor=base,%
111 rounded corners,%
112 ] (A) {MNOP};
113 }
114
115 \tikz[baseline=(A.base)]{
116 \node[background shadedraw={green!50!black}{inner color=white,%
117 outer color=green!30},%
118 shadedraw on=<2>,%
119 anchor=base,%
120 rounded corners,%
121 ] (A) {QRST};
122 }
123 \end{column}
124 \begin{column}{0.55\textwidth}
125 \centering
126 Node application\\[2ex]
127 \begin{tikzpicture}[node distance=0.5cm]
128 \tikzset{visibility 1/.style={
129 background draw=red, draw on=<{1,4}>,
130 background shade={top color=white,
131 bottom color=red!30},
132 shade on=<{2,3}>,
133 }
134 }
135 \tikzset{visibility 2/.style={
136 background shadedraw={green!50!black}{inner color=white,
137 outer color=green!30},
138 shadedraw on=<{2,3}>,
139 }
140 }
141 \tikzset{visibility 3/.style={
142 background draw=orange,
143 draw on=<1->,
144 background fill={orange!30},
145 fill on=<{2,3}>,
146 }
147 }
148 \tikzset{visibility 4/.style={
149 background draw=purple,
150 draw on=<2->,
151 background shade={left color=purple!30,
152 right color=cyan!30},
153 shade on=<{3,4}>,
154 }
155 }
156 \node[trapezium,
157 visibility 1] (A) {Text};
158 \node[trapezium,
159 visibility 2,
160 below= of A] (B) {Text};
161 \node[trapezium,
162 visibility 3,
163 below= of B] (C) {Text};
164 \node[trapezium,
165 visibility 4,
166 below= of C] (D) {Text};
167 \end{tikzpicture}
168 \end{column}
169 \end{columns}
170 \end{frame}
171
172 \begin{frame}{Styles for path aspect and text color modifications}
173 \centering
174 \begin{tikzpicture}[node distance=3cm and 2cm,
175 semithick ,
176 state/.style={circle,
177 top color=white,
178 bottom color=processblue!20,
179 draw, processblue,
180 text=blue,
181 minimum width=1cm},
182 background default shade={top color=white,
183 bottom color=processblue!20},
184 background default draw={processblue,
185 semithick}]
186 \node[state,
187 background draw={blue!80,
188 line width=1mm},
189 draw on=<2>,
190 circular drop shadow={visible on=<2>},
191 visible on=<{1,2}>% NOT visible in 3
192 ] (C) {$1$};
193 \node[state,
194 background draw={orange},
195 draw on=<{1,3}>,
196 background default aspect={semithick,
197 double disabled},
198 background aspect={double},
199 aspect on=<{1,3}>,
200 background shade={top color=white,
201 bottom color=orange!30},
202 shade on=<{1,3}>,
203 above left= of C] (A) {$0$};
204
205 \node[state,
206 background text=violet,
207 background default text=red,
208 text on=<2>,
209 above right= of C] (B) {$2$};
210
211 \draw (A)-- (B) (C)-- (A);
212
213 \draw[background default aspect={solid,semithick},
214 background aspect={dashdotted,
215 very thick},
216 aspect on=<{2,3}>,
217 background default draw={black},
218 background draw={red},
219 draw on=<3>](B)-- (C);
220 \end{tikzpicture}
221 \end{frame}
222 \end{document}
223 %%
224 %% Copyright (C) 2024 by Claudio Fiandrino <[email protected]>
225 %%
226 %% This file may be distributed and/or modified under the conditions
227 %% of the LaTeX Project Public License, either version 1.3 of this
228 %% license or (at your option) any later version.
229 %% The latest version of this license is in:
230 %%
231 %% http://www.latex-project.org/lppl.txt
232 %%
233 %% and version 1.3 or later is part of all distributions of LaTeX
234 %% version 2005/12/01 or later.
235 %%
236 %% This work is "maintained" (as per LPPL maintenance status) by
237 %% Claudio Fiandrino.
238 %%
239 %% This work consists of the files aobs-tikz.dtx
240 %% and the derived files aobs-tikz.ins
241 %% aobs-tikz.sty
242 %% tikzlibrarybeamer-overlay-styles.code.tex
243 %% aobs-tikz.pdf
244 %% example.tex
245 %% example.pdf
246 %% README.txt
247 %%
248 %%
249 %% End of file `example.tex'.