Debian Codegraph @

texmf-dist/doc/latex/beamer/beamerug-localstructure.tex

raw
1 % !TeX root = beameruserguide.tex
2 % Copyright 2003-2007 by Till Tantau
3 % Copyright 2010 by Vedran Mileti\'c
4 % Copyright 2012-2015 by Vedran Mileti\'c, Joseph Wright
5 % Copyright 2016 by Joseph Wright
6 % Copyright 2017,2018 by Louis Stuart, Joseph Wright
7 % Copyright 2019-2026 by Joseph Wright, samcarter
8 %
9 % This file may be distributed and/or modified
10 %
11 % 1. under the LaTeX Project Public License and/or
12 % 2. under the GNU Free Documentation License.
13 %
14 % See the file LICENSE.md for more details.
15
16 \section{Structuring a Presentation: The Local Structure}
17
18 \LaTeX\ provides different commands for structuring text ``locally,'' for example, via the |itemize| environment. These environments are also available in the \beamer\ class, although their appearance has been slightly changed. Furthermore, the \beamer\ class also defines some new commands and environments, see below, that may help you to structure your text.
19
20
21 \subsection{Itemizations, Enumerations, and Descriptions}
22 \label{section-enumerate}
23
24 There are three predefined environments for creating lists, namely |enumerate|, |itemize|, and |description|. The first two can be nested to depth three, but nesting them to this depth creates totally unreadable slides.
25
26 The |\item| command is overlay specification-aware. If an overlay specification is provided, the item will only be shown on the specified slides, see the following example. If the |\item| command is to take an optional argument and an overlay specification, the overlay specification can either come first as in |\item<1>[Cat]| or come last as in |\item[Cat]<1>|.
27 \begin{verbatim}
28 \begin{frame}
29 There are three important points:
30 \begin{enumerate}
31 \item<1-> A first one,
32 \item<2-> a second one with a bunch of subpoints,
33 \begin{itemize}
34 \item first subpoint. (Only shown from second slide on!).
35 \item<3-> second subpoint added on third slide.
36 \item<4-> third subpoint added on fourth slide.
37 \end{itemize}
38 \item<5-> and a third one.
39 \end{enumerate}
40 \end{frame}
41 \end{verbatim}
42
43 \begin{environment}{{itemize}\opt{|[<|\meta{default overlay specification}|>]|}}
44 Used to display a list of items that do not have a special ordering. Inside the environment, use an |\item| command for each topic.
45
46 If the optional parameter \meta{default overlay specification} is given, in every occurrence of an |\item| command that does not have an overlay specification attached to it, the \meta{default overlay specification} is used. By setting this specification to be an incremental overlay specification, see Section~\ref{section-incremental}, you can implement, for example, a step-wise uncovering of the items. The \meta{default overlay specification} is inherited by subenvironments. Naturally, in a subenvironment you can reset it locally by setting it to |<1->|.
47 \example
48 \begin{verbatim}
49 \begin{itemize}
50 \item This is important.
51 \item This is also important.
52 \end{itemize}
53 \end{verbatim}
54
55 \example
56 \begin{verbatim}
57 \begin{itemize}[<+->]
58 \item This is shown from the first slide on.
59 \item This is shown from the second slide on.
60 \item This is shown from the third slide on.
61 \item<1-> This is shown from the first slide on.
62 \item This is shown from the fourth slide on.
63 \end{itemize}
64 \end{verbatim}
65
66 \example
67 \begin{verbatim}
68 \begin{itemize}[<+-| alert@+>]
69 \item This is shown from the first slide on and alerted on the first slide.
70 \item This is shown from the second slide on and alerted on the second slide.
71 \item This is shown from the third slide on and alerted on the third slide.
72 \end{itemize}
73 \end{verbatim}
74
75 \example
76 \begin{verbatim}
77 \newenvironment{mystepwiseitemize}{\begin{itemize}[<+-| alert@+>]}{\end{itemize}}
78 \end{verbatim}
79
80 The appearance of an |itemize| list is governed by several templates. The first template concerns the way the little marker introducing each item is typeset:
81 \begin{element}{itemize items}\semiyes\no\no
82 This template is a parent template, whose children are |itemize item|, |itemize subitem|, and |itemize subsubitem|. This means that if you use the |\setbeamertemplate| command on this template, the command is instead called for all of these children (with the same arguments).
83
84 \begin{templateoptions}
85 \itemoption{default}{}
86 The default item marker is a small triangle colored with the foreground of the \beamer-color |itemize item| (or, for subitems, |itemize subitem| etc.). Note that these colors will automatically change under certain circumstances such as inside an example block or inside an |alertenv| environment.
87 \itemoption{triangle}{}
88 Alias for the default.
89 \itemoption{circle}{}
90 Uses little circles (or dots) as item markers.
91 \itemoption{square}{}
92 Uses little squares as item markers.
93 \itemoption{ball}{}
94 Uses little balls as item markers.
95 \end{templateoptions}
96 \end{element}
97
98 \begin{element}{itemize item}\yes\yes\yes
99 \colorfontparents{item}
100 This template (with |item| instead of |items|) governs how the marker in front of a first-level item is typeset. ``First-level'' refers to the level of nesting. See the |itemize items| template for the \meta{options} that may be given.
101
102 When the template is inserted, the \beamer-font and -color |itemize item| is installed. Typically, the font is ignored by the template as some special symbol is drawn anyway, by the font may be important if an optional argument is given to the |\item| command as in |\item[First]|.
103
104 The font and color inherit from the |item| font and color, which are explained at the end of this section.
105 \end{element}
106
107 \begin{element}{itemize subitem}\yes\yes\yes
108 \colorfontparents{subitem}
109 Like |itemize item|, only for second-level items. An item of an itemize inside an enumerate counts as a second-level item.
110 \end{element}
111
112 \begin{element}{itemize subsubitem}\yes\yes\yes
113 \colorfontparents{subsubitem}
114 Like |itemize item|, only for third-level items.
115 \end{element}
116 \end{environment}
117
118 \begin{environment}{{enumerate}\opt{|[<|\meta{default overlay specification}|>]|}\oarg{mini template}}
119 Used to display a list of items that are ordered. Inside the environment, use an |\item| command for each topic. By default, before each item increasing Arabic numbers followed by a dot are printed (as in ``1.'' and ``2.''). This can be changed by specifying a different template, see below.
120
121 The first optional argument \meta{default overlay specification} has exactly the same effect as for the |itemize| environment. It is ``detected'' by the opening |<|-sign in the \meta{default overlay specification}. Thus, if there is only one optional argument and if this argument does not start with |<|, then it is considered to be a \meta{mini template}.
122
123 The syntax of the \meta{mini template} is the same as the syntax of mini templates in the |enumerate| package (you do not need to include the |enumerate| package, this is done automatically). Roughly spoken, the text of the \meta{mini template} is printed before each item, but any occurrence of a |1| in the mini template is replaced by the current item number, an occurrence of the letter |A| is replaced by the $i$-th letter of the alphabet (in uppercase) for the $i$-th item, and the letters |a|, |i|, and |I| are replaced by the corresponding lowercase letters, lowercase Roman letters, and uppercase Roman letters, respectively. So the mini template |(i)| would yield the items (i), (ii), (iii), (iv), and so on. The mini template |A.)| would yield the items A.), B.), C.), D.) and so on. For more details on the possible mini templates, see the documentation of the |enumerate| package. Note that there is also a template that governs the appearance of the mini template.
124
125 \example
126 \begin{verbatim}
127 \begin{enumerate}
128 \item This is important.
129 \item This is also important.
130 \end{enumerate}
131
132 \begin{enumerate}[(i)]
133 \item First Roman point.
134 \item Second Roman point.
135 \end{enumerate}
136
137 \begin{enumerate}[<+->][(i)]
138 \item First Roman point.
139 \item Second Roman point, uncovered on second slide.
140 \end{enumerate}
141 \end{verbatim}
142
143 \articlenote
144 To use the \meta{mini template}, you have to include the package |enumerate|.
145
146 \begin{element}{enumerate items}\semiyes\no\no
147 Similar to |itemize items|, this template is a parent template, whose children are |enumerate item|, |enumerate subitem|, |enumerate subsubitem|, and |enumerate mini template|. These templates govern how the text (the number) of an enumeration is typeset.
148
149 \begin{templateoptions}
150 \itemoption{default}{}
151 The default enumeration marker uses the scheme 1., 2., 3.\ for the first level, 1.1, 1.2, 1.3 for the second level and 1.1.1, 1.1.2, 1.1.3 for the third level.
152 \itemoption{circle}{}
153 Places the numbers inside little circles. The colors are taken from |item projected| or |subitem projected| or |subsubitem projected|.
154 \itemoption{square}{}
155 Places the numbers on little squares.
156 \itemoption{ball}{}
157 ``Projects'' the numbers onto little balls.
158 \end{templateoptions}
159 \end{element}
160
161 \begin{element}{enumerate item}\yes\yes\yes
162 This template governs how the number in front of a first-level item is typeset. The level here refers to the level of enumeration nesting only. Thus an enumerate inside an itemize is a first-level enumerate (but it uses the second-level |itemize/enumerate body|).
163
164 When the template is inserted, the \beamer-font and -color |enumerate item| are installed.
165
166 The following command is useful for this template:
167 \begin{templateinserts}
168 \iteminsert{\insertenumlabel}
169 inserts the current number of the top-level enumeration (as an Arabic number). This insert is also available in the next two templates.
170 \end{templateinserts}
171 \end{element}
172
173 \begin{element}{enumerate subitem}\yes\yes\yes
174 Like |enumerate item|, only for second-level items.
175
176 \begin{templateinserts}
177 \iteminsert{\insertsubenumlabel}
178 inserts the current number of the second-level enumeration (as an Arabic number).
179 \end{templateinserts}
180
181 \example
182 \begin{verbatim}
183 \setbeamertemplate{enumerate subitem}{\insertenumlabel-\insertsubenumlabel}
184 \end{verbatim}
185 \end{element}
186
187 \begin{element}{enumerate subsubitem}\yes\yes\yes
188 Like |enumerate item|, only for third-level items.
189
190 \begin{templateinserts}
191 \iteminsert{\insertsubsubenumlabel}
192 inserts the current number of the third-level enumeration (as an Arabic number).
193 \end{templateinserts}
194 \end{element}
195
196 \begin{element}{enumerate mini template}\yes\yes\yes
197 This template is used to typeset the number that arises from a mini template.
198
199 \begin{templateinserts}
200 \iteminsert{\insertenumlabel}
201 inserts the current number rendered by this mini template. For example, if the \meta{mini template} is |(i)| and this command is used in the fourth item, |\insertenumlabel| would yield |(iv)|.
202 \end{templateinserts}
203 \end{element}
204 \end{environment}
205
206 The following templates govern how the \emph{body} of an |itemize| or an |enumerate| is typeset.
207 \begin{element}{itemize/enumerate body begin}\yes\no\no
208 This template is inserted at the beginning of a first-level |itemize| or |enumerate| environment. Furthermore, before this template is inserted, the \beamer-font and -color |itemize/enumerate body| is used.
209 \end{element}
210 \begin{element}{itemize/enumerate body end}\yes\no\no
211 This template is inserted at the end of a first-level |itemize| or |enumerate| environment.
212 \end{element}
213 There exist corresponding templates like |itemize/enumerate subbody begin| for second- and third-level itemize or enumerates.
214
215 \begin{element}{items}\semiyes\no\no
216 This template is a parent template of |itemize items| and |enumerate items|.
217 \example
218 |\setbeamertemplate{items}[circle]| will cause all items in |itemize| or |enumerate| environments to become circles (of the appropriate size, color, and font).
219 \end{element}
220
221 \label{section-descriptions}
222
223 \begin{environment}{{description}\opt{|[<|\meta{default overlay specification}|>]|}\oarg{long text}}
224 Like |itemize|, but used to display a list that explains or defines labels. The width of \meta{long text} is used to set the indentation. Normally, you choose the widest label in the description and copy it here. If you do not give this argument, the default width is used, which can be changed using |\setbeamersize| with the argument |description width=|\meta{width}.
225
226 As for |enumerate|, the \meta{default overlay specification} is detected by an opening~|<|. The effect is the same as for |enumerate| and |itemize|.
227 \example
228 \begin{verbatim}
229 \begin{description}
230 \item[Lion] King of the savanna.
231 \item[Tiger] King of the jungle.
232 \end{description}
233
234 \begin{description}[longest label]
235 \item<1->[short] Some text.
236 \item<2->[longest label] Some text.
237 \item<3->[long label] Some text.
238 \end{description}
239 \end{verbatim}
240
241 \example
242 The following has the same effect as the previous example:
243 \begin{verbatim}
244 \begin{description}[<+->][longest label]
245 \item[short] Some text.
246 \item[longest label] Some text.
247 \item[long label] Some text.
248 \end{description}
249 \end{verbatim}
250
251 \begin{element}{description item}\yes\yes\yes
252 This template is used to typeset the description items. When this template is called, the \beamer-font and -color |description item| are installed.
253
254 \begin{templateoptions}
255 \itemoption{default}{}
256 By default, the description item text is just inserted without any modification.
257 \end{templateoptions}
258
259 The main insert that is useful inside this template is:
260 \begin{templateinserts}
261 \iteminsert{\insertdescriptionitem} inserts the text of the current description item.
262 \end{templateinserts}
263 \end{element}
264
265 \begin{element}{description body begin}\yes\no\no
266 This template is inserted at the beginning of a |description| environment. Furthermore, before this template is inserted, the \beamer-font and -color |description body| is used.
267 \end{element}
268
269 \begin{element}{description body end}\yes\no\no
270 This template is inserted at the end of a |description| environment.
271 \end{element}
272 \end{environment}
273
274 In order to simplify changing the color or font of items, the different kinds of items inherit from or just use the following ``general'' \beamer-color and fonts:
275
276 \begin{element}{item}\no\yes\yes
277 \colorparents{local structure}
278 \fontparents{structure}
279
280 This color/font serves as a parent for the individual items of |itemize| and |enumerate| environments, but also for items in the table of contents. Since its color parent is the |local structure|, a change of that color causes the color of items to change accordingly.
281 \end{element}
282
283 \begin{element}{item projected}\no\yes\yes
284 \colorfontparents{item}
285
286 This is a special ``version'' of the |item| color and font that should be used by templates that render items with text (as in an enumeration) and which ``project'' this text onto something like a ball or a square or whatever. While the normal |item| color typically has a transparent background, the |item projected| typically has a colored background and, say, a white foreground.
287 \end{element}
288
289 \begin{element}{subitem}\no\yes\yes
290 \colorfontparents{item}
291 Same as |item| for subitems, that is, for items on the second level of indentation.
292 \end{element}
293
294 \begin{element}{subitem projected}\no\yes\yes
295 \colorfontparents{item projected}
296 Same as |item projected| for subitems, that is, for items on the second level of indentation.
297 \end{element}
298
299 \begin{element}{subsubitem}\no\yes\yes
300 \colorfontparents{subitem}
301 Same as |subitem| for subsubitems, that is, for items on the third level of indentation.
302 \end{element}
303
304 \begin{element}{subsubitem projected}\no\yes\yes
305 \colorfontparents{subitem projected}
306 Same as |subitem projected| for subsubitems, that is, for items on the third level of indentation.
307 \end{element}
308
309
310 \subsection{Highlighting}
311
312 The \beamer\ class predefines commands and environments for highlighting text. Using these commands makes it easy to change the appearance of a document by changing the theme.
313
314 \begin{command}{\structure\sarg{overlay specification}\marg{text}}
315 The given text is marked as part of the structure, that is, it is supposed to help the audience see the structure of your presentation. If the \meta{overlay specification} is present, the command only has an effect on the specified slides.
316 \example
317 |\structure{Paragraph Heading.}|
318
319 Internally, this command just puts the \emph{text} inside a |structureenv| environment.
320
321 \articlenote
322 Structure text is typeset as bold text. This can be changed by modifying the templates.
323
324 \begin{element}{structure}\no\yes\yes
325 This color/font is used when structured text is typeset, but it is also widely used as a base for many other colors including the headings of blocks, item buttons, and titles. In most color themes, the colors for navigational elements in the headline or the footline are derived from the foreground color of |structure|. By changing the structure color you can easily change the ``basic color'' of your presentation, other than the color of normal text. See also the related color |local structure| and the related font |tiny structure|.
326
327 Inside the |\structure| command, the background of the color is ignored, but this is not necessarily true for elements that inherit their color from |structure|. There is no template |structure|, use |structure begin| and |structure end| instead.
328 \end{element}
329
330 \begin{element}{local structure}\no\yes\no
331 This color should be used to typeset structural elements that change their color according to the ``local environment.'' For example, an item ``button'' in an |itemize| environment changes its color according to circumstances. If it is used inside an example block, it should have the |example text| color; if it is currently ``alerted'' it should have the |alerted text| color. This color is setup by certain environments to have the color that should be used to typeset things like item buttons. Since the color used for items, |item|, inherits from this color by default, items automatically change their color according to the current situation.
332
333 If you write your own environment in which the item buttons and similar structural elements should have a different color, you should change the color |local structure| inside these environments.
334 \end{element}
335
336 \begin{element}{tiny structure}\no\no\yes
337 This special font is used for ``tiny'' structural text. Basically, this font should be used whenever a structural element uses a tiny font. The idea is that the tiny versions of the |structure| font often are not suitable. For example, it is often necessary to use a boldface version for them. Also, one might wish to have serif smallcaps structural text, but still retain normal sans-serif tiny structural text.
338 \end{element}
339 \end{command}
340
341 \begin{environment}{{structureenv}\sarg{overlay specification}}
342 Environment version of the |\structure| command.
343
344 \begin{element}{structure begin}\yes\no\no
345 This text is inserted at the beginning of a |structureenv| environment.
346
347 \begin{templateoptions}
348 \itemoption{default}{}
349
350 \articlenote
351 The text is typeset in boldface.
352 \end{templateoptions}
353 \end{element}
354
355 \begin{element}{structure end}\yes\no\no
356 This text is inserted at the end of a |structureenv| environment.
357 \end{element}
358 \end{environment}
359
360
361 \begin{command}{\alert\sarg{overlay specification}\marg{highlighted text}}
362 The given text is highlighted, typically by coloring the text red. If the \meta{overlay specification} is present, the command only has an effect on the specified slides.
363 \example
364 |This is \alert{important}.|
365
366 Internally, this command just puts the \emph{highlighted text} inside an |alertenv|.
367
368 \articlenote
369 Alerted text is typeset as emphasized text. This can be changed by modifying the templates, see below.
370
371 \begin{element}{alerted text}\no\yes\yes
372 This color/font is used when alerted text is typeset. The background is currently ignored. There is no template |alerted text|, rather there are templates |alerted text begin| and |alerted text end| that are inserted before and after alerted text.
373 \end{element}
374 \end{command}
375
376 \begin{environment}{{alertenv}\sarg{overlay specification}}
377 Environment version of the |\alert| command.
378
379 \begin{element}{alerted text begin}\yes\no\no
380 This text is inserted at the beginning of an |alertenv| environment.
381
382 \begin{templateoptions}
383 \itemoption{default}{}
384
385 \beamernote
386 This changes the color |local structure| to |alerted text|. This causes things like buttons or items to be colored in the same color as the alerted text, which is often visually pleasing. See also the |\structure| command.
387
388 \articlenote
389 The text is emphasized.
390 \end{templateoptions}
391 \end{element}
392
393 \begin{element}{alerted text end}\yes\no\no
394 This text is inserted at the end of an |alertenv| environment.
395 \end{element}
396 \end{environment}
397
398
399 \subsection{Block Environments}
400 \label{predefined}
401
402 The \beamer\ class predefines an environment for typesetting a ``block'' of text that has a heading. The appearance of blocks can easily be changed using the following template:
403
404 \begin{element}{blocks}\semiyes\no\no
405 Changing this parent template changes the templates of normal blocks, alerted blocks, and example blocks.
406
407 \example
408 |\setbeamertemplate{blocks}[default]|
409 \example
410 |\setbeamertemplate{blocks}[rounded][shadow=true]|
411
412 \begin{templateoptions}
413 \itemoption{default}{\oarg{}}
414 The default setting typesets the block title on its own line. If a background is specified either for the |block title| or for the |block body|, this background color is used as background of the title or body, respectively. For alerted and example blocks, the corresponding \beamer-colors and -fonts are used, instead.
415 \itemoption{rounded}{\oarg{shadow=true}}
416 Makes the blocks ``rounded.'' This means that the corners of the backgrounds of the blocks are ``rounded off.'' If the |shadow=true| option is given, a ``shadow'' is drawn behind the block.
417 \end{templateoptions}
418 \end{element}
419
420
421 \begin{environment}{{block}\sarg{action specification}\marg{block title}\sarg{action specification}}
422 Only one \meta{action specification} may be given. Inserts a block, like a definition or a theorem, with the title \meta{block title}. If the \meta{action specification} is present, the given actions are taken on the specified slides, see Section~\ref{section-action-specifications}. In the example, the definition is shown only from slide 3 onward.
423 \example
424 \begin{verbatim}
425 \begin{block}<3->{Definition}
426 A \alert{set} consists of elements.
427 \end{block}
428 \end{verbatim}
429
430 \articlenote
431 The block name is typeset in bold.
432
433 \begin{element}{block begin}\yes\no\no
434 This template is inserted at the beginning of a block before the \meta{environment contents}. Inside this template, the block title can be accessed via the following insert:
435 \begin{itemize}
436 \iteminsert{\insertblocktitle}
437 Inserts the \meta{block title} into the template.
438 \end{itemize}
439
440 When the template starts, no special color or font is installed (for somewhat complicated reasons). Thus, this template should install the correct colors and fonts for the title and the body itself.
441 \end{element}
442
443 \begin{element}{block end}\yes\no\no
444 This template is inserted at the end of a block.
445 \end{element}
446
447 \begin{element}{block title}\no\yes\yes
448 This \beamer-color/-font should be used to typeset the title of the block. Since neither the color nor the font are setup automatically, the template |block begin| must do so itself.
449
450 The default block template and also the |rounded| version honor the background of this color.
451 \end{element}
452
453 \begin{element}{block body}\no\yes\yes
454 This \beamer-color/-font should be used to typeset the body of the block, that is, the \meta{environment contents}. As for |block title|, the color and font must be setup by the template |block begin|.
455 \end{element}
456 \end{environment}
457
458 \begin{environment}{{alertblock}\sarg{action specification}\marg{block
459 title}\sarg{action specification}}
460 Inserts a block whose title is highlighting. Behaves like the |block| environment otherwise.
461 \example
462 \begin{verbatim}
463 \begin{alertblock}{Wrong Theorem}
464 $1=2$.
465 \end{alertblock}
466 \end{verbatim}
467
468 \articlenote
469 The block name is typeset in bold and is emphasized.
470
471 \begin{element}{block alerted begin}\yes\no\no
472 Same applies as for normal blocks.
473 \end{element}
474
475 \begin{element}{block alerted end}\yes\no\no
476 Same applies as for normal blocks.
477 \end{element}
478
479 \begin{element}{block title alerted}\no\yes\yes
480 Same applies as for normal blocks.
481 \end{element}
482
483 \begin{element}{block body alerted}\no\yes\yes
484 Same applies as for normal blocks.
485 \end{element}
486 \end{environment}
487
488 \begin{environment}{{exampleblock}\sarg{action specification}\marg{block title}\sarg{action specification}}
489 Inserts a block that is supposed to be an example. Behaves like the |block| environment otherwise.
490
491 \example
492 In the following example, the block is completely suppressed on the first slide (it does not even occupy any space).
493 \begin{verbatim}
494 \begin{exampleblock}{Example}<only@2->
495 The set $\{1,2,3,5\}$ has four elements.
496 \end{exampleblock}
497 \end{verbatim}
498
499 \articlenote
500 The block name is typeset in italics.
501
502 \begin{element}{block example begin}\yes\no\no
503 Same applies as for normal blocks.
504 \end{element}
505
506 \begin{element}{block example end}\yes\no\no
507 Same applies as for normal blocks.
508 \end{element}
509
510 \begin{element}{block title example}\no\yes\yes
511 Same applies as for normal blocks.
512 \end{element}
513
514 \begin{element}{block body example}\no\yes\yes
515 Same applies as for normal blocks.
516 \end{element}
517 \end{environment}
518
519
520 \subsection{Theorem Environments}
521 \label{section-theorems}
522
523 The \beamer\ class predefines several environments, like |theorem| or |definition| or |proof|, that you can use to typeset things like, well, theorems, definitions, or proofs. The complete list is the following:
524 |theorem|, |Theorem|, |corollary|, |Corollary|, |definition|, |Definition|, |definitions|, |fact|, |example|, |Example|, |examples|, |Examples|, |lemma|, |Lemma|, |problem|, |Problem|, |proof|, |Proof|, and |solution|.
525
526 The following German block environments are also predefined: |Problem|, |Loesung|, |Definition|, |Satz|, |Beweis|, |Folgerung|, |Lemma|, |Fakt|, |Theorem|, |Beispiel|, and |Beispiele|.
527
528 Here is a typical example on how to use them:
529 \begin{verbatim}
530 \begin{frame}
531 \frametitle{A Theorem on Infinite Sets}
532
533 \begin{theorem}<1->
534 There exists an infinite set.
535 \end{theorem}
536
537 \begin{proof}<2->
538 This follows from the axiom of infinity.
539 \end{proof}
540
541 \begin{example}<3->[Natural Numbers]
542 The set of natural numbers is infinite.
543 \end{example}
544 \end{frame}
545 \end{verbatim}
546
547 In the following, only the English versions are discussed. The German ones behave analogously.
548
549 \begin{environment}{{theorem}\sarg{action specification}\oarg{additional text}\sarg{action specification}}
550 Inserts a theorem. Only one \meta{action specification} may be given. If present, the \meta{additional text} is shown behind the word ``Theorem'' in rounded brackets (although this can be changed by the template).
551
552 The appearance of the theorem is governed by the templates |theorem begin| and |theorem end|, see their description later on for details on how to change these. Every theorem is put into a |block| environment, thus the templates for blocks also apply.
553
554 The theorem style (a concept from |amsthm|) used for this environment is |plain|. In this style, the body of a theorem should be typeset in italics. The head of the theorem should be typeset in a bold font, but this is usually overruled by the templates.
555
556 If the option |envcountsect| is given either as class option in one of the |presentation| modes or as an option to the package |beamerarticle| in |article| mode, then the numbering of the theorems is local to each section with the section number prefixing the theorem number; otherwise they are numbered consecutively throughout the presentation or article. We recommend using this option in |article| mode.
557
558 By default, no theorem numbers are shown in the |presentation| modes.
559
560 \example
561 \begin{verbatim}
562 \begin{theorem}[Kummer, 1992]
563 If $\#^_A^n$ is $n$-enumerable, then $A$ is recursive.
564 \end{theorem}
565
566 \begin{theorem}<2->[Tantau, 2002]
567 If $\#_A^2$ is $2$-fa-enumerable, then $A$ is regular.
568 \end{theorem}
569 \end{verbatim}
570
571 \end{environment}
572
573 The environments \declare{|corollary|}, \declare{|fact|}, and \declare{|lemma|} behave exactly the same way.
574
575 \begin{classoption}{envcountsect}
576 Causes theorems, definitions, and so on to be numbered locally to each section. Thus, the first theorem of the second section would be Theorem~2.1 (assuming that there are no definitions, lemmas, or corollaries earlier in the section).
577 \end{classoption}
578
579 \begin{environment}{{definition}\sarg{action specification}\oarg{additional text}\sarg{action specification}}
580 Behaves like the |theorem| environment, except that the theorem style |definition| is used. In this style, the body of a theorem is typeset in an upright font.
581 \end{environment}
582
583 The environment \declare{|definitions|} behaves exactly the same way.
584
585 \begin{environment}{{example}\sarg{action specification}\oarg{additional text}\sarg{action specification}}
586 Behaves like the |theorem| environment, except that the theorem style |example| is used. A side-effect of using this theorem style is that the \meta{environment contents} is put in an |exampleblock| instead of a |block|.
587 \end{environment}
588
589 The environment \declare{|examples|} behaves exactly the same way.
590
591 \beamernote
592 The default template for typesetting theorems suppresses the theorem number, even if this number is ``available'' for typesetting (which it is by default in all predefined environments; but if you define your own environment using |\newtheorem*| no number will be available).
593
594 \articlenote
595 In |article| mode, theorems are automatically numbered. By specifying the class option |envcountsect|, theorems will be numbered locally to each section, which is usually a good idea, except for very short articles.
596
597 \begin{environment}{{proof}\sarg{action specification}\oarg{proof name}\sarg{action specification}}
598 Typesets a proof. If the optional \meta{proof name} is given, it completely replaces the word ``Proof.'' This is different from normal theorems, where the optional argument is shown in brackets.
599
600 At the end of the proof, a |\qed| symbol is shown, except if you say |\qedhere| earlier in the proof (this is exactly as in |amsthm|). The default |\qed| symbol is an open square. To completely suppress the symbol, write |\def\qedsymbol{}| in your preamble. To get a closed square, say
601 \begin{verbatim}
602 \setbeamertemplate{qed symbol}{\vrule width1.5ex height1.5ex depth0pt}
603 \end{verbatim}
604
605 If you use |babel| and a different language, the text ``Proof'' is replaced by whatever is appropriate in the selected language.
606
607 \example
608 \begin{verbatim}
609 \begin{proof}<2->[Sketch of proof]
610 Suppose ...
611 \end{proof}
612 \end{verbatim}
613
614 \begin{element}{qed symbol}\yes\yes\yes
615 The symbol is shown at the end of every proof.
616 \end{element}
617 \end{environment}
618
619 You can define new environments using the following command:
620
621 \begin{command}{\newtheorem\opt{|*|}\marg{environment name}\oarg{numbered same as}\marg{head text}\oarg{number within}}
622 This command is used exactly the same way as in the |amsthm| package (as a matter of fact, it is the command from that package). For example, the two optional arguments, \meta{numbered same as} and \meta{number within}, are mutually exclusive; see the documentation of |amsthm| for details. The only difference is that environments declared using this command are overlay specification-aware in \beamer\ and that, when typeset, are typeset according to \beamer's templates.
623
624 \articlenote
625 Environments declared using this command are also overlay specification-aware in |article| mode.
626
627 \example
628 |\newtheorem{observation}[theorem]{Observation}|
629 \end{command}
630
631 You can also use |amsthm|'s command |\newtheoremstyle| to define new theorem styles. Note that the default template for theorems will ignore any head font setting, but will honor the body font setting.
632
633 If you wish to define the environments like |theorem| differently (for example, have it numbered within each subsection), you can use the following class option to disable the definition of the predefined environments:
634
635 \begin{classoption}{notheorems}
636 Switches off the definition of default blocks like |theorem|, but still loads |amsthm| and makes theorems overlay specification-aware.
637 \end{classoption}
638
639 The option is also available as a package option for |beamerarticle| and has the same effect.
640
641 \articlenote
642 In the |article| version, the package |amsthm| sometimes clashes with the document class. In this case you can use the following option, which is once more available as a class option for \beamer\ and as a package option for |beamerarticle|, to switch off the loading of |amsthm| altogether.
643
644 \begin{classoption}{noamsthm}
645 Does not load |amsthm| and also not |amsmath|. Environments like |theorem| or |proof| will not be available.
646 \end{classoption}
647
648 \begin{classoption}{noamssymb}
649 Does not load |amssymb|. This option is mainly intended for users who are loading specialist font packages. Note that |\blacktriangleright| needs to be defined if |itemize| environments are in use.
650 \end{classoption}
651
652 \begin{classoption}{leqno}
653 Place equation numbers on the left.
654 \end{classoption}
655
656 \begin{classoption}{fleqn}
657 Position equations at a fixed indent from the left margin rather than centered in the text column.
658 \end{classoption}
659
660 \begin{element}{theorems}\semiyes\no\no
661 This template is a parent of |theorem begin| and |theorem end|, see the first for a detailed discussion of how the theorem templates are set.
662
663 \example
664 |\setbeamertemplate{theorems}[numbered]|
665
666 \begin{templateoptions}
667 \itemoption{default}{}
668 By default, theorems are typeset as follows: The font specification for the body is honored, the font specification for the head is ignored. No theorem number is printed.
669 \itemoption{normal font}{}
670 Like the default, except all font specifications for the body are ignored. Thus, the fonts are used that are normally used for blocks.
671 \itemoption{numbered}{}
672 This option is like the default, except that the theorem number is printed for environments that are numbered.
673 \itemoption{ams style}{}
674 This causes theorems to be put in a |block| or |exampleblock|, but to be otherwise typeset as is normally done in |amsthm|. Thus the head font and body font depend on the setting for the theorem to be typeset and theorems are numbered.
675 \end{templateoptions}
676 \end{element}
677
678
679 \begin{element}{theorem begin}\yes\no\no
680 Whenever an environment declared using the command |\newtheorem| is to be typeset, this template is inserted at the beginning and the template |theorem end| at the end. If there is an overlay specification when an environment like |theorem| is used, this overlay specification will directly follow the \meta{block beginning template} upon invocation. This is even true if there was an optional argument to the |theorem| environment. This optional argument is available via the insert |\inserttheoremaddition|.
681
682 Numerous inserts are available in this template, see below.
683
684 Before the template starts, the font is set to the body font prescribed by the environment to be typeset.
685
686 \example
687 The following typesets theorems like |amsthm|:
688 \begin{verbatim}
689 \setbeamertemplate{theorem begin}
690 {%
691 \begin{\inserttheoremblockenv}
692 {%
693 \inserttheoremheadfont
694 \inserttheoremname
695 \inserttheoremnumber
696 \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
697 \inserttheorempunctuation
698 }%
699 }
700 \setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}}
701 \end{verbatim}
702
703 \example
704 In the following example, all font ``suggestions'' for the environment are suppressed or ignored; and the theorem number is suppressed.
705 \begin{verbatim}
706 \setbeamertemplate{theorem begin}
707 {%
708 \normalfont% ignore body font
709 \begin{\inserttheoremblockenv}
710 {%
711 \inserttheoremname
712 \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
713 }%
714 }
715 \setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}}
716 \end{verbatim}
717
718 The following inserts are available inside this template:
719 \begin{itemize}
720 \iteminsert{\inserttheoremblockenv}
721 This will normally expand to |block|, but if a theorem that has theorem style |example| is typeset, it will expand to |exampleblock|. Thus you can use this insert to decide which environment should be used when typesetting the theorem.
722
723 \iteminsert{\inserttheoremheadfont}
724 This will expand to a font changing command that switches to the font to be used in the head of the theorem. By not inserting it, you can ignore the head font.
725
726 \iteminsert{\inserttheoremname}
727 This will expand to the name of the environment to be typeset (like ``Theorem'' or ``Corollary'').
728
729 \iteminsert{\inserttheoremnumber}
730 This will expand to the number of the current theorem preceded by a space or to nothing, if the current theorem does not have a number.
731
732 \iteminsert{\inserttheoremaddition}
733 This will expand to the optional argument given to the environment or will be empty, if there was no optional argument.
734
735 \iteminsert{\inserttheorempunctuation}
736 This will expand to the punctuation character for the current environment. This is usually a period.
737 \end{itemize}
738 \end{element}
739
740 \begin{element}{theorem end}\yes\no\no
741 Inserted at the end of a theorem.
742 \end{element}
743
744 \begin{element}{proof begin}\yes\no\no
745 Inserted at the beginning of a |proof| environment. This template behaves like a normal |block begin| template by default.
746
747 \begin{itemize}
748 \iteminsert{\insertproofname}
749 This will expand to the proof name, followed by a period most of the time.
750 \end{itemize}
751 \end{element}
752
753 \begin{element}{proof end}\yes\no\no
754 Inserted at the end of a |proof| environment.
755 \end{element}
756
757 \subsection{Framed and Boxed Text}
758
759 In order to draw a frame (a rectangle) around some text, you can use \LaTeX's standard command |\fbox| and also |\frame| (inside a \beamer\ frame, the |\frame| command changes its meaning to the normal \LaTeX\ |\frame| command). More frame types are offered by the package |fancybox|, which defines the following commands: |\shadowbox|, |\doublebox|, |\ovalbox|, and |\Ovalbox|. Please consult the \LaTeX\ Companion for details on how to use these commands.
760
761 The \beamer\ class also defines two environments for creating colored boxes.
762
763 \begin{environment}{{beamercolorbox}\oarg{options}\marg{beamer color}}
764 This environment can be used to conveniently typeset some text using some \beamer-color. Basically, the following two command blocks do the same:
765 \begin{verbatim}
766 \begin{beamercolorbox}{beamer color}
767 Text
768 \end{beamercolorbox}
769
770 {
771 \usebeamercolor{beamer color}
772 \colorbox{bg}{
773 \color{fg}
774 Text
775 }
776 }
777 \end{verbatim}
778
779 In other words, the environment installs the \meta{beamer color} and uses the background for the background of the box and the foreground for the text inside the box. However, in reality, numerous \meta{options} can be given to specify in much greater detail how the box is rendered.
780
781 If the background color of \meta{beamer color} is empty, no background is drawn behind the text, that is, the background is ``transparent.''
782
783 This command is used extensively by the default inner and outer themes for typesetting the headlines and footlines. It is not really intended to be used in normal frames (for example, it is not available inside |article| mode). You should prefer using structuring elements like blocks or theorems that automatically insert colored boxes as needed.
784
785 \example
786 The following example could be used to typeset a headline with two lines, the first showing the document title, the second showing the author's name:
787 \begin{verbatim}
788 \begin{beamercolorbox}[ht=2.5ex,dp=1ex,center]{title in head/foot}
789 \usebeamerfont{title in head/foot}
790 \insertshorttitle
791 \end{beamercolorbox}%
792 \begin{beamercolorbox}[ht=2.5ex,dp=1ex,center]{author in head/foot}
793 \usebeamerfont{author in head/foot}
794 \insertshortauthor
795 \end{beamercolorbox}
796 \end{verbatim}
797
798 \example
799 Typesetting a postit:
800 \begin{verbatim}
801 \setbeamercolor{postit}{fg=black,bg=yellow}
802 \begin{beamercolorbox}[sep=1em,wd=5cm]{postit}
803 Place me somewhere!
804 \end{beamercolorbox}
805 \end{verbatim}
806
807 The following \meta{options} can be given:
808 \begin{itemize}
809 \item
810 \declare{|wd=|\marg{width}} sets the width of the box. This command has two effects: First, \TeX's |\hsize| is set to \meta{width}. Second, after the box has been typeset, its width is set to \meta{width} (no matter what it actually turned out to be). Since setting the |\hsize| does not automatically change some of \LaTeX's linewidth dimensions, you should consider using a minipage inside this environment if you fool around with the width.
811
812 If the width is larger than the normal text width, as specified by the value of |\textwidth|, the width of the resulting box is reset to the width |\textwidth|, but intelligent negative skips are inserted at the left and right end of the box. The net effect of this is that you can use a width larger than the text width for a box and can insert the resulting box directly into normal text without getting annoying warnings and having the box positioned sensibly.
813 \item
814 \declare{|dp=|\marg{depth}} sets the depth of the box, overriding the real depth of the box. The box is first typeset normally, then the depth is changed afterwards. This option is useful for creating boxes that have guaranteed size.
815
816 If the option is not given, the box has its ``natural'' depth, which results from the typesetting. For example, a box containing only the letter ``a'' will have a different depth from a box containing only the letter ``g.''
817 \item
818 \declare{|ht=|\meta{height}} sets the height of the box, overriding the real height. Note that the ``height'' does not include the depth (see, for example, the \TeX-book for details). If you want a one-line box that always has the same size, setting the height to 2.25ex and the depth to 1ex is usually a good option.
819 \item
820 \declare{|left|} causes the text inside the box to be typeset left-aligned and with a (radically) ragged right border. This is the default. To get a better ragged right border, use the |rightskip| option. Note that this will override any |leftskip| or |rightskip| setting.
821 \item
822 \declare{|right|} causes the text to be right-aligned with a (radically) ragged left border. Note that this will override any |leftskip| or |rightskip| setting.
823 \item
824 \declare{|center|} centers the text inside the box. Note that this will override any |leftskip| or |rightskip| setting.
825 \item
826 \declare{|leftskip=|\meta{left skip}} installs the \meta{left skip} inside the box as the left skip. \TeX's left skip is a glue that is inserted at the left end of every line. See the \TeX-book for details. Note that this will override any |left|, |center| or |right| setting.
827 \item
828 \declare{|rightskip=|\meta{right skip}} install the \meta{right skip}. To get a good ragged right border, try, say, |\rightskip=0pt plus 4em|. Note that this will override any |left|, |center| or |right| setting.
829 \item
830 \declare{|sep=|\meta{dimension}} sets the size of extra space around the text. This space is added ``inside the box,'' which means that if you specify a |sep| of 1cm and insert the box normally into the vertical list, then the left border of the box will be aligned with the left border of the slide text, while the left border of the text inside the box will be 1cm to the right of this left border. Likewise, the text inside the box will stop 1cm before the right border of the normal text.
831 \item
832 \declare{|colsep=|\meta{dimension}} sets the extra ``color separation space'' around the text. This space behaves the same way as the space added by |sep|, only this space is only inserted if the box has a colored background, that is, if the background of the \meta{beamer color} is not empty. This command can be used together with |sep|, the effects accumulate.
833 \item
834 \declare{|colsep*=|\meta{dimension}} sets an extra color separation space around the text that is \emph{horizontally outside the box}. This means that if the box has a background, this background will protrude by \meta{dimension} to the left and right of the text, but this protruding background will not be taken into consideration by \TeX\ for typesetting purposes.
835
836 A typical example usage of this option arises when you insert a box with a colored background in the middle of normal text. In this case, if the background color is set, you would like a background to be drawn behind the text \emph{and} you would like a certain extra space around this text (the background should not stop immediately at the borders of the text, this looks silly) \emph{and} you would like the normal text always to be at the same horizontal position, independently of whether a background is present or not. In this case, using |colsep*=4pt| is a good option.
837 \item
838 \declare{|shadow|}\opt{|=|\meta{\underline{true} or false}} draws a shadow behind the box. Currently, this option only has an effect if used together with the |rounded| option, but that may change.
839 \item
840 \declare{|rounded=|\meta{true or false}} causes the borders of the box to be rounded off if there is a background installed. This command internally calls |beamerboxesrounded|. In this case, |colsep*| option will have no effect.
841 \item
842 \declare{|ignorebg|} causes the background color of the \meta{beamer color} to be ignored, that is, to be treated as if it were set to ``transparent'' or ``empty.''
843 \item
844 \declare{|vmode|} causes \TeX\ to be in vertical mode when the box starts. Normally, \TeX\ will be in horizontal mode at the start of the box (a |\leavevmode| is inserted automatically at the beginning of the box unless this option is given). Only \TeX perts need this option, so, if you use it, you will probably know what you are doing anyway.
845 \item
846 \declare{|bgopacity|=\marg{opacity}} sets the opacity with which the background is drawn. To draw a box with 30\% transparent background, set |bgopacity=0.7|. Note that combining rounded corners and a transparent background can lead to fine gaps appearing in the box because the box is drawn in multiple segments. If |bgopacity| is not specified, |\pgfsetfillopacity| is never set so that the surrounding opacity setting is adopted.
847 \end{itemize}
848 \end{environment}
849
850 \begin{environment}{{beamerboxesrounded}\oarg{options}\marg{head}}
851 The text inside the environment is framed by a rectangular area with rounded corners. For the large rectangular area, the \beamer-color specified with the |lower| option is used. Its background is used for the background, its foreground for the foreground. If the \meta{head} is not empty, \meta{head} is drawn in the upper part of the box using the \beamer-color specified with the |upper| option for the fore- and background. The following options can be given:
852 \begin{itemize}
853 \item
854 \declare{|lower=|\meta{beamer color}} sets the \beamer-color to be used for the lower (main) part of the box. Its background is used for the background, its foreground for the foreground of the main part of the box. If either is empty, the current background or foreground is used. The box will never be transparent.
855 \item
856 \declare{|upper=|\meta{beamer color}} sets the \beamer-color used for the upper (head) part of the box. It is only used if the \meta{head} is not empty.
857 \item
858 \declare{|width=|\meta{dimension}} causes the width of the text inside the box to be the specified \meta{dimension}. By default, the |\textwidth| is used. Note that the box will protrude 4pt to the left and right.
859 \item
860 \declare{|shadow|}\opt{|=|\meta{\underline{true} or false}}. If set to |true|, a shadow will be drawn.
861 \item
862 \declare{|bgopacity|=\marg{opacity}} sets the opacity with which the background is drawn. To draw a box with 30\% transparent background, set |bgopacity=0.7|. Note that with a transparent background fine gaps can appear in the box because the box is drawn in multiple segments. If |bgopacity| is not specified, |\pgfsetfillopacity| is never set so that the surrounding opacity setting is adopted.
863 \end{itemize}
864 If no \meta{head} is given, the head part is completely suppressed.
865 \example
866 \begin{verbatim}
867 \begin{beamerboxesrounded}[upper=block head,lower=block body,shadow=true]{Theorem}
868 $A = B$.
869 \end{beamerboxesrounded}
870 \end{verbatim}
871
872 \articlenote
873 This environment is not available in |article| mode.
874 \end{environment}
875
876
877 \subsection{Figures and Tables}
878
879 You can use the standard \LaTeX\ environments |figure| and |table| much the same way you would normally use them. However, any placement specification will be ignored. Figures and tables are immediately inserted where the environments start. If there are too many of them to fit on the frame, you must manually split them among additional frames or use the |allowframebreaks| option.
880
881 \example
882 \begin{verbatim}
883 \begin{frame}
884 \begin{figure}
885 \pgfuseimage{myfigure}
886 \caption{This caption is placed below the figure.}
887 \end{figure}
888
889 \begin{figure}
890 \caption{This caption is placed above the figure.}
891 \pgfuseimage{myotherfigure}
892 \end{figure}
893 \end{frame}
894 \end{verbatim}
895
896 \begin{element}{caption}\yes\yes\yes
897 This template is used to render the caption.
898 \begin{templateoptions}
899 \itemoption{default}{}
900 typesets the caption name (a word like ``Figure'' or ``Abbildung'' or ``Table,'' depending on whether a table or figure is typeset and depending on the currently installed language) before the caption text. No number is printed, since these make little sense in a normal presentation.
901 \itemoption{numbered}{}
902 adds the figure or table number to the caption. Use this option only if your audience has a printed handout or printed lecture notes that follow the same numbering.
903 \itemoption{caption name own line}{}
904 As the name suggests, this option puts the caption name (like ``Figure'') on its own line.
905 \end{templateoptions}
906
907 Inside the template, you can use the following inserts:
908 \begin{itemize}
909 \iteminsert{\insertcaption}
910 Inserts the text of the current caption.
911
912 \iteminsert{\insertcaptionname}
913 Inserts the name of the current caption. This word is either ``Table'' or ``Figure'' or, if the |babel| package is used, some translation thereof.
914
915 \iteminsert{\insertcaptionnumber}
916 Inserts the number of the current figure or table.
917 \end{itemize}
918 \end{element}
919
920 \begin{element}{caption name}\no\yes\yes
921 These \beamer-color and -font are used to typeset the caption name (a word like ``Figure''). The |caption| template must directly ``use'' them, they are not installed automatically by the |\insertcaptionname| command.
922 \end{element}
923
924 \begin{element}{caption label separator}\yes\no\no
925 This template is inserted between caption name and caption text.
926 \begin{templateoptions}
927 \itemoption{default}{}
928 Typesets the colon followed by the space.
929 \itemoption{none}{}
930 Typesets no separator.
931 \itemoption{colon}{}
932 Alias for the default.
933 \itemoption{period}{}
934 Typesets the period followed by the space.
935 \itemoption{space}{}
936 Typesets the space.
937 \itemoption{quad}{}
938 Typesets the |\quad| followed by the space.
939 \itemoption{endash}{}
940 Typesets the en-dash surrounded by spaces (| -- |).
941 \end{templateoptions}
942 \end{element}
943
944
945 \subsection{Splitting a Frame into Multiple Columns}
946
947 The \beamer\ class offers several commands and environments for splitting (perhaps only part of) a frame into multiple columns. These commands have nothing to do with \LaTeX's commands for creating columns. Columns are especially useful for placing a graphic next to a description/explanation.
948
949 The main environment for creating columns is called |columns|. Inside this environment, you can either place several |column| environments, each of which creates a new column, or use the |\column| command to create new columns.
950
951 \begin{environment}{{columns}\sarg{action specification}\oarg{options}}
952 A multi-column area. If the \meta{action specification} is present, the given actions are taken on the specified slides, see Section~\ref{section-action-specifications}. Inside the environment you should place only |column| environments or |\column| commands (see below). The following \meta{options} may be given:
953 \begin{itemize}
954 \item
955 \declare{|b|} will cause the bottom lines of the columns to be vertically aligned.
956 \item
957 \declare{|c|} will cause the columns to be centered vertically relative to each other. Default, unless the global option |t| is used.
958 \item
959 \declare{|onlytextwidth|} is the same as |totalwidth=\textwidth|. This option can also be set for the whole document with the |onlytextwidth| class option:
960 \begin{classoption}{onlytextwidth}
961 \end{classoption}
962 \item
963 \declare{|t|} will cause the first lines of the columns to be aligned. Default if global option |t| is used.
964 \item
965 \declare{|T|} is similar to the |t| option, but |T| aligns the tops of the first lines while |t| aligns the so-called baselines of the first lines. If strange things seem to happen in conjunction with the |t| option (for example if a graphic suddenly ``drops down'' with the |t| option instead of ``going up''), try using this option instead.
966 \item
967 \declare{|totalwidth=|\meta{width}} will cause the columns to occupy not the whole page width, but only \meta{width}, all told.
968 Note that this means that any margins are ignored.
969 \item
970 \declare{|height=|\meta{height}} will set a fixed height for the columns.
971 \end{itemize}
972
973 \example
974 \begin{verbatim}
975 \begin{columns}[t]
976 \begin{column}{5cm}
977 Two\\lines.
978 \end{column}
979 \begin{column}{5cm}
980 One line (but aligned).
981 \end{column}
982 \end{columns}
983 \end{verbatim}
984
985 \example
986 \begin{verbatim}
987 \begin{columns}[t]
988 \column{5cm}
989 Two\\lines.
990
991 \column[T]{5cm}
992 \includegraphics[height=3cm]{mygraphic.jpg}
993 \end{columns}
994 \end{verbatim}
995
996 \articlenote
997 This environment is ignored in |article| mode.
998
999 \end{environment}
1000
1001 To create a column, you can either use the |column| environment or the |\column| command.
1002
1003 \begin{environment}{{column}\sarg{action specification}\oarg{options}\marg{column width}}
1004 Creates a single column of width \meta{column width}. If the \meta{action specification} is present, the given actions are taken on the specified slides, see Section~\ref{section-action-specifications}. The vertical placement of the enclosing |columns| environment can be overruled by specifying a specific placement in \meta{options} (|t| and |T| for the two top modes, |c| for centered, and |b| for bottom). The |height=|\meta{height} key can be used to specify a fixed height.
1005
1006 \example
1007 The following code has the same effect as the above examples:
1008 \begin{verbatim}
1009 \begin{columns}
1010 \begin{column}[t]{5cm}
1011 Two\\lines.
1012 \end{column}
1013 \begin{column}[t]{5cm}
1014 One line (but aligned).
1015 \end{column}
1016 \end{columns}
1017 \end{verbatim}
1018
1019 \articlenote
1020 This command is ignored in |article| mode.
1021
1022 \end{environment}
1023
1024 \begin{command}{{\column}\sarg{action specification}\oarg{options}\marg{column width}}
1025 Starts a single column. The parameters and options are the same as for the |column| environment. The column automatically ends with the next occurrence of |\column| or of a |column| environment or of the end of the current |columns| environment.
1026
1027 \example
1028 \begin{verbatim}
1029 \begin{columns}
1030 \column[t]{5cm}
1031 Two\\lines.
1032 \column[t]{5cm}
1033 One line (but aligned).
1034 \end{columns}
1035 \end{verbatim}
1036
1037 \articlenote
1038 This command is ignored in |article| mode.
1039
1040 \end{command}
1041
1042
1043 \subsection{Positioning Text and Graphics Absolutely}
1044
1045 Normally, \beamer\ uses \TeX's normal typesetting mechanism to position text and graphics on the page. In certain situation you may instead wish a certain text or graphic to appear at a page position that is specified \emph{absolutely}. This means that the position is specified relative to the upper left corner of the slide.
1046
1047 The package |textpos| provides several commands for positioning text absolutely and it works together with \beamer. When using this package, you will typically have to specify the options |overlay| and perhaps |absolute|. For details on how to use the package, please see its documentation.
1048
1049 Another package to conveniently position elements at specific positions on the frame is Ti\emph{k}Z. Besides the possibility to manually chose coordinates, this also allows to position elements in respect to the page:
1050
1051 \example
1052 \begin{verbatim}
1053 \usepackage{tikz}
1054
1055 \begin{frame}
1056 \tikz[remember picture, overlay] \node at (3.1415,1) {I'm here};
1057
1058 \tikz[remember picture, overlay] \node at (current page.center) {I'm the centre of the frame!};
1059 \end{frame}
1060 \end{verbatim}
1061
1062 \subsection{Verbatim and Fragile Text}
1063
1064 If you wish to use a |{verbatim}| environment in a frame, you have to add the option |[fragile]| to the |{frame}| environment. The |\end{frame}| must be alone on a single line (except for any leading whitespace). Using this option will cause the frame contents to be written to an external file and then read back. See the description of the |{frame}| environment for more details.
1065
1066 You must also use the |[fragile]| option for frames that include any ``fragile'' text, which is any text that is not ``interpreted the way text is usually interpreted by \TeX.'' For example, if you use a package that (locally) redefined the meaning of, say, the character |&|, you must use this option.
1067
1068 Inside |{verbatim}| environments you obviously cannot use commands like |\alert<2>| to highlight part of code since the text is written in, well, verbatim. There are several good packages like |alltt| or |listings| that allow you to circumvent this problem. For simple cases, the following environment can be used, which is defined by \beamer:
1069
1070 \begin{environment}{{semiverbatim}}
1071 The text inside this environment is typeset like verbatim text. However, the characters |\|, |{|, and |}| retain their meaning. Thus, you can say things like
1072 \begin{verbatim}
1073 \alert<1->{std::cout << "AT&T likes 100% performance";}
1074 \end{verbatim}
1075
1076 To typeset the three characters |\|, |{|, and |}| you can use the commands |\\| (which is redefined inside this environment---you do not need it anyway), |\{|, and |\}|. Thus in order to get typeset ``|\alert<1>{X}|'' you can write |\\alert<1>\{X\}|.
1077 \end{environment}
1078
1079
1080 \subsection{Abstract}
1081
1082 The |{abstract}| environment is overlay specification-aware in \beamer:
1083
1084 \begin{environment}{{abstract}\sarg{action specification}}
1085 You can use this environment to typeset an abstract.
1086
1087 \begin{element}{abstract}\no\yes\yes
1088 These \beamer-color and -font are used to typeset the abstract. If a background color is set, this background color is used as background for the whole abstract by default.
1089 \end{element}
1090
1091 \begin{element}{abstract title}\yes\yes\yes
1092 \colorparents{titlelike}
1093 This template is used for the title. By default, this inserts the word |\abstractname|, centered. The background color is ignored.
1094 \end{element}
1095
1096 \begin{element}{abstract begin}\yes\no\no
1097 This template is inserted at the very beginning of the abstract, before the abstract title and the \meta{environment contents} is inserted.
1098 \end{element}
1099
1100 \begin{element}{abstract end}\yes\no\no
1101 This template is inserted at the end of the abstract, after the \meta{environment contents}.
1102 \end{element}
1103 \end{environment}
1104
1105
1106 \subsection{Verse, Quotations, Quotes}
1107
1108 \LaTeX\ defines three environments for typesetting quotations and verses: |verse|, |quotation|, and |quote|. These environments are also available in the \beamer\ class, where they are overlay specification-aware. If an overlay specification is given, the verse or quotation is shown only on the specified slides and is covered otherwise. The difference between a |quotation| and a |quote| is that the first has paragraph indentation, whereas the second hasn't.
1109
1110 You can change the font and color used for these by changing the \beamer-colors and -fonts listed below. Unlike the standard \LaTeX\ environments, the default font theme typesets a verse in an italic serif font, quotations and quotes are typeset using an italic font (whether serif or sans-serif depends on the standard document font).
1111
1112 \begin{environment}{{verse}\sarg{action specification}}
1113 You can use this environment to typeset a verse.
1114
1115 \begin{element}{verse}\no\yes\yes
1116 These \beamer-color and -font are used to typeset the verse. If a background color is set, this background color is used as background for the whole abstract. The default font is italic serif.
1117 \end{element}
1118
1119 \begin{element}{verse begin}\yes\no\no
1120 This template is inserted at the beginning of the verse.
1121 \end{element}
1122
1123 \begin{element}{verse end}\yes\no\no
1124 This template is inserted at the end of the verse.
1125 \end{element}
1126 \end{environment}
1127
1128 \begin{environment}{{quotation}\sarg{action specification}}
1129 Use this environment to typeset multi-paragraph quotations. Think again, before presenting multi-paragraph quotations.
1130
1131 \begin{element}{quotation}\no\yes\yes
1132 These \beamer-color and -font are used to typeset the quotation.
1133 \end{element}
1134
1135 \begin{element}{quotation begin}\yes\no\no
1136 This template is inserted at the beginning of the quotation.
1137 \end{element}
1138
1139 \begin{element}{quotation end}\yes\no\no
1140 This template is inserted at the end of the quotation.
1141 \end{element}
1142 \end{environment}
1143
1144 \begin{environment}{{quote}\sarg{action specification}}
1145 Use this environment to typeset a single-paragraph quotation.
1146
1147 \begin{element}{quote}\no\yes\yes
1148 These \beamer-color and -font are used to typeset the quote.
1149 \end{element}
1150
1151 \begin{element}{quote begin}\yes\no\no
1152 This template is inserted at the beginning of the quote.
1153 \end{element}
1154
1155 \begin{element}{quote end}\yes\no\no
1156 This template is inserted at the end of the quote.
1157 \end{element}
1158 \end{environment}
1159
1160
1161 \subsection{Footnotes}
1162
1163 First a word of warning: Using footnotes is usually not a good idea. They disrupt the flow of reading.
1164
1165 You can use the usual |\footnote| command. It has been augmented to take an additional option, for placing footnotes at the frame bottom instead of at the bottom of the current minipage.
1166
1167 \begin{command}{\footnote\sarg{overlay specification}\oarg{options}\marg{text}}
1168 Inserts a footnote into the current frame. Footnotes will always be shown on the current frame; they will never be ``moved'' to other frames. As usual, one can give a number as \meta{options}, which will cause the footnote to use that number. The \beamer\ class adds two additional options:
1169 \begin{itemize}
1170 \item
1171 \declare{|frame|} causes the footnote to be shown at the bottom of the frame. This is normally the default behavior anyway, but in minipages, columns and certain blocks it makes a difference. In a minipage, the footnote is usually shown as part of the minipage rather than as part of the frame.
1172
1173 This option can also be set for the whole document with the |framefootnotes| class option:
1174 \begin{classoption}{framefootnotes}
1175 \end{classoption}
1176 \item
1177 \declare{|noframe|} is the antidote to the |frame| option. It ensures that the footnote is shown as part of the minipage even if the |framefootnotes| class option is used.
1178 \end{itemize}
1179
1180 If an \meta{overlay specification} is given, this causes the footnote \meta{text} to be shown only on the specified slides. The footnote symbol in the text is shown on all slides.
1181
1182 \example
1183 |\footnote{On a fast machine.}|
1184 \example
1185 |\footnote[frame,2]{Not proved.}|
1186 \example
1187 |\footnote<.->{Der Spiegel, 4/04, S.~90.}|
1188
1189 \articlenote
1190 In |article| mode, footnotes are typeset as usual. The |frame| option has no effect, which means in a minipage the footnote is shown as part of it.
1191
1192 \begin{element}{footnote}\yes\yes\yes
1193 This template will be used to render the footnote. Inside this template, the following two inserts can be used:
1194 \begin{itemize}
1195 \iteminsert{\insertfootnotetext}
1196 Inserts the current footnote text.
1197 \iteminsert{\insertfootnotemark}
1198 Inserts the current footnote mark (like a raised number). This mark is computed automatically.
1199 \end{itemize}
1200 \end{element}
1201
1202 \begin{element}{footnote mark}\no\yes\yes
1203 This \beamer-color/-font is used when rendering the footnote mark, both in the text and at the beginning of the footnote itself.
1204 \end{element}
1205 \end{command}