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 2016 by Joseph Wright 5% Copyright 2017,2018 by Louis Stuart, Joseph Wright 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 Free Documentation License. 11% 12% See the file doc/licenses/LICENSE for more details. 13 14\section{Structuring a Presentation: The Local Structure} 15 16\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. 17 18 19\subsection{Itemizations, Enumerations, and Descriptions} 20\label{section-enumerate} 21 22There 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. 23 24The |\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>|. 25\begin{verbatim} 26\begin{frame} 27 There are three important points: 28 \begin{enumerate} 29 \item<1-> A first one, 30 \item<2-> a second one with a bunch of subpoints, 31 \begin{itemize} 32 \item first subpoint. (Only shown from second slide on!). 33 \item<3-> second subpoint added on third slide. 34 \item<4-> third subpoint added on fourth slide. 35 \end{itemize} 36 \item<5-> and a third one. 37 \end{enumerate} 38\end{frame} 39\end{verbatim} 40 41\begin{environment}{{itemize}\opt{|[<|\meta{default overlay specification}|>]|}} 42 Used to display a list of items that do not have a special ordering. Inside the environment, use an |\item| command for each topic. 43 44 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->|. 45 \example 46\begin{verbatim} 47\begin{itemize} 48\item This is important. 49\item This is also important. 50\end{itemize} 51\end{verbatim} 52 53 \example 54\begin{verbatim} 55\begin{itemize}[<+->] 56\item This is shown from the first slide on. 57\item This is shown from the second slide on. 58\item This is shown from the third slide on. 59\item<1-> This is shown from the first slide on. 60\item This is shown from the fourth slide on. 61\end{itemize} 62\end{verbatim} 63 64 \example 65\begin{verbatim} 66\begin{itemize}[<+-| alert@+>] 67\item This is shown from the first slide on and alerted on the first slide. 68\item This is shown from the second slide on and alerted on the second slide. 69\item This is shown from the third slide on and alerted on the third slide. 70\end{itemize} 71\end{verbatim} 72 73 \example 74\begin{verbatim} 75\newenvironment{mystepwiseitemize}{\begin{itemize}[<+-| alert@+>]}{\end{itemize}} 76\end{verbatim} 77 78 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: 79 \begin{element}{itemize items}\semiyes\no\no 80 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). 81 82 \begin{templateoptions} 83 \itemoption{default}{} 84 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. 85 \itemoption{triangle}{} 86 Alias for the default. 87 \itemoption{circle}{} 88 Uses little circles (or dots) as item markers. 89 \itemoption{square}{} 90 Uses little squares as item markers. 91 \itemoption{ball}{} 92 Uses little balls as item markers. 93 \end{templateoptions} 94 \end{element} 95 96 \begin{element}{itemize item}\yes\yes\yes 97 \colorfontparents{item} 98 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. 99 100 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]|. 101 102 The font and color inherit from the |item| font and color, which are explained at the end of this section. 103 \end{element} 104 105 \begin{element}{itemize subitem}\yes\yes\yes 106 \colorfontparents{subitem} 107 Like |itemize item|, only for second-level items. An item of an itemize inside an enumerate counts as a second-level item. 108 \end{element} 109 110 \begin{element}{itemize subsubitem}\yes\yes\yes 111 \colorfontparents{subsubitem} 112 Like |itemize item|, only for third-level items. 113 \end{element} 114\end{environment} 115 116\begin{environment}{{enumerate}\opt{|[<|\meta{default overlay specification}|>]|}\oarg{mini template}} 117 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. 118 119 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}. 120 121 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. 122 123 \example 124\begin{verbatim} 125\begin{enumerate} 126\item This is important. 127\item This is also important. 128\end{enumerate} 129 130\begin{enumerate}[(i)] 131\item First Roman point. 132\item Second Roman point. 133\end{enumerate} 134 135\begin{enumerate}[<+->][(i)] 136\item First Roman point. 137\item Second Roman point, uncovered on second slide. 138\end{enumerate} 139\end{verbatim} 140 141 \articlenote 142 To use the \meta{mini template}, you have to include the package |enumerate|. 143 144 \begin{element}{enumerate items}\semiyes\no\no 145 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. 146 147 \begin{templateoptions} 148 \itemoption{default}{} 149 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. 150 \itemoption{circle}{} 151 Places the numbers inside little circles. The colors are taken from |item projected| or |subitem projected| or |subsubitem projected|. 152 \itemoption{square}{} 153 Places the numbers on little squares. 154 \itemoption{ball}{} 155 ``Projects'' the numbers onto little balls. 156 \end{templateoptions} 157 \end{element} 158 159 \begin{element}{enumerate item}\yes\yes\yes 160 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|). 161 162 When the template is inserted, the \beamer-font and -color |enumerate item| are installed. 163 164 The following command is useful for this template: 165 \begin{templateinserts} 166 \iteminsert{\insertenumlabel} 167 inserts the current number of the top-level enumeration (as an Arabic number). This insert is also available in the next two templates. 168 \end{templateinserts} 169 \end{element} 170 171 \begin{element}{enumerate subitem}\yes\yes\yes 172 Like |enumerate item|, only for second-level items. 173 174 \begin{templateinserts} 175 \iteminsert{\insertsubenumlabel} 176 inserts the current number of the second-level enumeration (as an Arabic number). 177 \end{templateinserts} 178 179 \example 180\begin{verbatim} 181\setbeamertemplate{enumerate subitem}{\insertenumlabel-\insertsubenumlabel} 182\end{verbatim} 183 \end{element} 184 185 \begin{element}{enumerate subsubitem}\yes\yes\yes 186 Like |enumerate item|, only for third-level items. 187 188 \begin{templateinserts} 189 \iteminsert{\insertsubsubenumlabel} 190 inserts the current number of the second-level enumeration (as an Arabic number). 191 \end{templateinserts} 192 \end{element} 193 194 \begin{element}{enumerate mini template}\yes\yes\yes 195 This template is used to typeset the number that arises from a mini template. 196 197 \begin{templateinserts} 198 \iteminsert{\insertenumlabel} 199 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)|. 200 \end{templateinserts} 201 \end{element} 202\end{environment} 203 204The following templates govern how the \emph{body} of an |itemize| or an |enumerate| is typeset. 205\begin{element}{itemize/enumerate body begin}\yes\no\no 206 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. 207\end{element} 208\begin{element}{itemize/enumerate body end}\yes\no\no 209 This template is inserted at the end of a first-level |itemize| or |enumerate| environment. 210\end{element} 211There exist corresponding templates like |itemize/enumerate subbody begin| for second- and third-level itemize or enumerates. 212 213\begin{element}{items}\semiyes\no\no 214 This template is a parent template of |itemize items| and |enumerate items|. 215 \example 216 |\setbeamertemplate{items}[circle]| will cause all items in |itemize| or |enumerate| environments to become circles (of the appropriate size, color, and font). 217\end{element} 218 219\label{section-descriptions} 220 221\begin{environment}{{description}\opt{|[<|\meta{default overlay specification}|>]|}\oarg{long text}} 222 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}. 223 224 As for |enumerate|, the \meta{default overlay specification} is detected by an opening~|<|. The effect is the same as for |enumerate| and |itemize|. 225 \example 226\begin{verbatim} 227\begin{description} 228\item[Lion] King of the savanna. 229\item[Tiger] King of the jungle. 230\end{description} 231 232\begin{description}[longest label] 233\item<1->[short] Some text. 234\item<2->[longest label] Some text. 235\item<3->[long label] Some text. 236\end{description} 237\end{verbatim} 238 239 \example 240 The following has the same effect as the previous example: 241\begin{verbatim} 242\begin{description}[<+->][longest label] 243\item[short] Some text. 244\item[longest label] Some text. 245\item[long label] Some text. 246\end{description} 247\end{verbatim} 248 249 \begin{element}{description item}\yes\yes\yes 250 This template is used to typeset the description items. When this template is called, the \beamer-font and -color |description item| are installed. 251 252 \begin{templateoptions} 253 \itemoption{default}{} 254 By default, the description item text is just inserted without any modification. 255 \end{templateoptions} 256 257 The main insert that is useful inside this template is: 258 \begin{templateinserts} 259 \iteminsert{\insertdescriptionitem} inserts the text of the current description item. 260 \end{templateinserts} 261 \end{element} 262 263 \begin{element}{description body begin}\yes\no\no 264 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. 265 \end{element} 266 267 \begin{element}{description body end}\yes\no\no 268 This template is inserted at the end of a |description| environment. 269 \end{element} 270\end{environment} 271 272In 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: 273 274\begin{element}{item}\no\yes\yes 275 \colorparents{local structure} 276 \fontparents{structure} 277 278 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. 279\end{element} 280 281\begin{element}{item projected}\no\yes\yes 282 \colorfontparents{item} 283 284 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. 285\end{element} 286 287\begin{element}{subitem}\no\yes\yes 288 \colorfontparents{item} 289 Same as |item| for subitems, that is, for items on the second level of indentation. 290\end{element} 291 292\begin{element}{subitem projected}\no\yes\yes 293 \colorfontparents{item projected} 294 Same as |item projected| for subitems, that is, for items on the second level of indentation. 295\end{element} 296 297\begin{element}{subsubitem}\no\yes\yes 298 \colorfontparents{subitem} 299 Same as |subitem| for subsubitems, that is, for items on the third level of indentation. 300\end{element} 301 302\begin{element}{subsubitem projected}\no\yes\yes 303 \colorfontparents{subitem projected} 304 Same as |subitem projected| for subsubitems, that is, for items on the third level of indentation. 305\end{element} 306 307 308\subsection{Highlighting} 309 310The \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. 311 312\begin{command}{\structure\sarg{overlay specification}\marg{text}} 313 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. 314 \example 315 |\structure{Paragraph Heading.}| 316 317 Internally, this command just puts the \emph{text} inside a |structureenv| environment. 318 319 \articlenote 320 Structure text is typeset as bold text. This can be changed by modifying the templates. 321 322 \begin{element}{structure}\no\yes\yes 323 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|. 324 325 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. 326 \end{element} 327 328 \begin{element}{local structure}\no\yes\no 329 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. 330 331 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. 332 \end{element} 333 334 \begin{element}{tiny structure}\no\no\yes 335 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. 336 \end{element} 337\end{command} 338 339\begin{environment}{{structureenv}\sarg{overlay specification}} 340 Environment version of the |\structure| command. 341 342 \begin{element}{structure begin}\yes\no\no 343 This text is inserted at the beginning of a |structureenv| environment. 344 345 \begin{templateoptions} 346 \itemoption{default}{} 347 348 \articlenote 349 The text is typeset in boldface. 350 \end{templateoptions} 351 \end{element} 352 353 \begin{element}{structure end}\yes\no\no 354 This text is inserted at the end of a |structureenv| environment. 355 \end{element} 356\end{environment} 357 358 359\begin{command}{\alert\sarg{overlay specification}\marg{highlighted text}} 360 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. 361 \example 362 |This is \alert{important}.| 363 364 Internally, this command just puts the \emph{highlighted text} inside an |alertenv|. 365 366 \articlenote 367 Alerted text is typeset as emphasized text. This can be changed by modifying the templates, see below. 368 369 \begin{element}{alerted text}\no\yes\yes 370 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. 371 \end{element} 372\end{command} 373 374\begin{environment}{{alertenv}\sarg{overlay specification}} 375 Environment version of the |\alert| command. 376 377 \begin{element}{alerted text begin}\yes\no\no 378 This text is inserted at the beginning of a an |alertenv| environment. 379 380 \begin{templateoptions} 381 \itemoption{default}{} 382 383 \beamernote 384 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. 385 386 \articlenote 387 The text is emphasized. 388 \end{templateoptions} 389 \end{element} 390 391 \begin{element}{alerted text end}\yes\no\no 392 This text is inserted at the end of an |alertenv| environment. 393 \end{element} 394\end{environment} 395 396 397\subsection{Block Environments} 398\label{predefined} 399 400The \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: 401 402\begin{element}{blocks}\semiyes\no\no 403 Changing this parent template changes the templates of normal blocks, alerted blocks, and example blocks. 404 405 \example 406 |\setbeamertemplate{blocks}[default]| 407 \example 408 |\setbeamertemplate{blocks}[rounded][shadow=true]| 409 410 \begin{templateoptions} 411 \itemoption{default}{} 412 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. 413 \itemoption{rounded}{\oarg{shadow=true}} 414 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. 415 \end{templateoptions} 416\end{element} 417 418 419\begin{environment}{{block}\sarg{action specification}\marg{block title}\sarg{action specification}} 420 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. 421 \example 422\begin{verbatim} 423 \begin{block}<3->{Definition} 424 A \alert{set} consists of elements. 425 \end{block} 426\end{verbatim} 427 428 \articlenote 429 The block name is typeset in bold. 430 431 \begin{element}{block begin}\yes\no\no 432 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: 433 \begin{itemize} 434 \iteminsert{\insertblocktitle} 435 Inserts the \meta{block title} into the template. 436 \end{itemize} 437 438 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. 439 \end{element} 440 441 \begin{element}{block end}\yes\no\no 442 This template is inserted at the end of a block. 443 \end{element} 444 445 \begin{element}{block title}\no\yes\yes 446 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. 447 448 The default block template and also the |rounded| version honor the background of this color. 449 \end{element} 450 451 \begin{element}{block body}\no\yes\yes 452 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|. 453 \end{element} 454\end{environment} 455 456\begin{environment}{{alertblock}\sarg{action specification}\marg{block 457title}\sarg{action specification}} 458 Inserts a block whose title is highlighting. Behaves like the |block| environment otherwise. 459 \example 460\begin{verbatim} 461 \begin{alertblock}{Wrong Theorem} 462 $1=2$. 463 \end{alertblock} 464\end{verbatim} 465 466 \articlenote 467 The block name is typeset in bold and is emphasized. 468 469 \begin{element}{block alerted begin}\yes\no\no 470 Same applies as for normal blocks. 471 \end{element} 472 473 \begin{element}{block alerted end}\yes\no\no 474 Same applies as for normal blocks. 475 \end{element} 476 477 \begin{element}{block title alerted}\no\yes\yes 478 Same applies as for normal blocks. 479 \end{element} 480 481 \begin{element}{block body alerted}\no\yes\yes 482 Same applies as for normal blocks. 483 \end{element} 484\end{environment} 485 486\begin{environment}{{exampleblock}\sarg{action specification}\marg{block title}\sarg{overlay specification}} 487 Inserts a block that is supposed to be an example. Behaves like the |block| environment otherwise. 488 489 \example 490 In the following example, the block is completely suppressed on the first slide (it does not even occupy any space). 491\begin{verbatim} 492 \begin{exampleblock}{Example}<only@2-> 493 The set $\{1,2,3,5\}$ has four elements. 494 \end{exampleblock} 495\end{verbatim} 496 497 \articlenote 498 The block name is typeset in italics. 499 500 \begin{element}{block example begin}\yes\no\no 501 Same applies as for normal blocks. 502 \end{element} 503 504 \begin{element}{block example end}\yes\no\no 505 Same applies as for normal blocks. 506 \end{element} 507 508 \begin{element}{block title example}\no\yes\yes 509 Same applies as for normal blocks. 510 \end{element} 511 512 \begin{element}{block body example}\no\yes\yes 513 Same applies as for normal blocks. 514 \end{element} 515\end{environment} 516 517 518\subsection{Theorem Environments} 519\label{section-theorems} 520 521The \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: |theorem|, |corollary|, |definition|, |definitions|, |fact|, |example|, and |examples|. The following German block environments are also predefined: |Problem|, |Loesung|, |Definition|, |Satz|, |Beweis|, |Folgerung|, |Lemma|, |Fakt|, |Beispiel|, and |Beispiele|. 522 523Here is a typical example on how to use them: 524\begin{verbatim} 525\begin{frame} 526 \frametitle{A Theorem on Infinite Sets} 527 528 \begin{theorem}<1-> 529 There exists an infinite set. 530 \end{theorem} 531 532 \begin{proof}<2-> 533 This follows from the axiom of infinity. 534 \end{proof} 535 536 \begin{example}<3->[Natural Numbers] 537 The set of natural numbers is infinite. 538 \end{example} 539\end{frame} 540\end{verbatim} 541 542In the following, only the English versions are discussed. The German ones behave analogously. 543 544\begin{environment}{{theorem}\sarg{action specification}\oarg{additional text}\sarg{action specification}} 545 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). 546 547 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. 548 549 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. 550 551 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. 552 553 By default, no theorem numbers are shown in the |presentation| modes. 554 555 \example 556\begin{verbatim} 557\begin{theorem}[Kummer, 1992] 558 If $\#^_A^n$ is $n$-enumerable, then $A$ is recursive. 559\end{theorem} 560 561\begin{theorem}<2->[Tantau, 2002] 562 If $\#_A^2$ is $2$-fa-enumerable, then $A$ is regular. 563\end{theorem} 564\end{verbatim} 565 566\end{environment} 567 568The environments \declare{|corollary|}, \declare{|fact|}, and \declare{|lemma|} behave exactly the same way. 569 570\begin{classoption}{envcountsect} 571 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). 572\end{classoption} 573 574\begin{environment}{{definition}\sarg{action specification}\oarg{additional text}\sarg{action specification}} 575 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. 576\end{environment} 577 578The environment \declare{|definitions|} behaves exactly the same way. 579 580\begin{environment}{{example}\sarg{action specification}\oarg{additional text}\sarg{action specification}} 581 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|. 582\end{environment} 583 584The environment \declare{|examples|} behaves exactly the same way. 585 586\beamernote 587The 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). 588 589\articlenote 590In |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. 591 592\begin{environment}{{proof}\sarg{action specification}\oarg{proof name}\sarg{action specification}} 593 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. 594 595 At the end of the theorem, 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 circle. To completely suppress the symbol, write |\def\qedsymbol{}| in your preamble. To get a closed square, say 596\begin{verbatim} 597\setbeamertemplate{qed symbol}{\vrule width1.5ex height1.5ex depth0pt} 598\end{verbatim} 599 600 If you use |babel| and a different language, the text ``Proof'' is replaced by whatever is appropriate in the selected language. 601 602 \example 603\begin{verbatim} 604\begin{proof}<2->[Sketch of proof] 605 Suppose ... 606\end{proof} 607\end{verbatim} 608 609 \begin{element}{qed symbol}\yes\yes\yes 610 The symbol is shown at the end of every proof. 611 \end{element} 612\end{environment} 613 614You can define new environments using the following command: 615 616\begin{command}{\newtheorem\opt{|*|}\marg{environment name}\oarg{numbered same as}\marg{head text}\oarg{number within}} 617 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. 618 619 \articlenote 620 Environments declared using this command are also overlay specification-aware in |article| mode. 621 622 \example 623 |\newtheorem{observation}[theorem]{Observation}| 624\end{command} 625 626You 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. 627 628If 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: 629 630\begin{classoption}{notheorems} 631 Switches off the definition of default blocks like |theorem|, but still loads |amsthm| and makes theorems overlay specification-aware. 632\end{classoption} 633 634The option is also available as a package option for |beamerarticle| and has the same effect. 635 636\articlenote 637In 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. 638 639\begin{classoption}{noamsthm} 640 Does not load |amsthm| and also not |amsmath|. Environments like |theorem| or |proof| will not be available. 641\end{classoption} 642 643\begin{classoption}{noamssymb} 644 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. 645\end{classoption} 646 647 648\begin{element}{theorems}\semiyes\no\no 649 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. 650 651 \example 652 |\setbeamertemplate{theorems}[numbered]| 653 654 \begin{templateoptions} 655 \itemoption{default}{} 656 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. 657 \itemoption{normal font}{} 658 Like the default, except all font specifications for the body are ignored. Thus, the fonts are used that are normally used for blocks. 659 \itemoption{numbered}{} 660 This option is like the default, except that the theorem number is printed for environments that are numbered. 661 \itemoption{ams style}{} 662 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. 663 \end{templateoptions} 664\end{element} 665 666 667\begin{element}{theorem begin}\yes\no\no 668 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|. 669 670 Numerous inserts are available in this template, see below. 671 672 Before the template starts, the font is set to the body font prescribed by the environment to be typeset. 673 674 \example 675 The following typesets theorems like |amsthm|: 676\begin{verbatim} 677\setbeamertemplate{theorem begin} 678{% 679 \begin{\inserttheoremblockenv} 680 {% 681 \inserttheoremheadfont 682 \inserttheoremname 683 \inserttheoremnumber 684 \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi% 685 \inserttheorempunctuation 686 }% 687} 688\setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}} 689\end{verbatim} 690 691 \example 692 In the following example, all font ``suggestions'' for the environment are suppressed or ignored; and the theorem number is suppressed. 693\begin{verbatim} 694\setbeamertemplate{theorem begin} 695{% 696 \normalfont% ignore body font 697 \begin{\inserttheoremblockenv} 698 {% 699 \inserttheoremname 700 \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi% 701 }% 702} 703\setbeamertemplate{theorem end}{\end{\inserttheoremblockenv}} 704\end{verbatim} 705 706 The following inserts are available inside this template: 707 \begin{itemize} 708 \iteminsert{\inserttheoremblockenv} 709 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. 710 711 \iteminsert{\inserttheoremheadfont} 712 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. 713 714 \iteminsert{\inserttheoremname} 715 This will expand to the name of the environment to be typeset (like ``Theorem'' or ``Corollary''). 716 717 \iteminsert{\inserttheoremnumber} 718 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. 719 720 \iteminsert{\inserttheoremaddition} 721 This will expand to the optional argument given to the environment or will be empty, if there was no optional argument. 722 723 \iteminsert{\inserttheorempunctuation} 724 This will expand to the punctuation character for the current environment. This is usually a period. 725 \end{itemize} 726\end{element} 727 728\begin{element}{theorem end}\yes\no\no 729 Inserted at the end of a theorem. 730\end{element} 731 732\begin{element}{proof begin}\yes\no\no 733 Inserted at the beginning of a |proof| environment. This template behaves like a normal |block begin| template by default. 734 735 \begin{itemize} 736 \iteminsert{\insertproofname} 737 This will expand to the proof name, followed by a period most of the time. 738 \end{itemize} 739\end{element} 740 741\begin{element}{proof end}\yes\no\no 742 Inserted at the end of a |proof| environment. 743\end{element} 744 745\subsection{Framed and Boxed Text} 746 747In 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. 748 749The \beamer\ class also defines two environments for creating colored boxes. 750 751\begin{environment}{{beamercolorbox}\oarg{options}\marg{beamer color}} 752 This environment can be used to conveniently typeset some text using some \beamer-color. Basically, the following two command blocks do the same: 753\begin{verbatim} 754\begin{beamercolorbox}{beamer color} 755 Text 756\end{beamercolorbox} 757 758{ 759 \usebeamercolor{beamer color} 760 \colorbox{bg}{ 761 \color{fg} 762 Text 763 } 764} 765\end{verbatim} 766 767 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. 768 769 If the background color of \meta{beamer color} is empty, no background is drawn behind the text, that is, the background is ``transparent.'' 770 771 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. 772 773 \example 774 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: 775\begin{verbatim} 776\begin{beamercolorbox}[ht=2.5ex,dp=1ex,center]{title in head/foot} 777 \usebeamerfont{title in head/foot} 778 \insertshorttitle 779\end{beamercolorbox}% 780\begin{beamercolorbox}[ht=2.5ex,dp=1ex,center]{author in head/foot} 781 \usebeamerfont{author in head/foot} 782 \insertshortauthor 783\end{beamercolorbox} 784\end{verbatim} 785 786 \example 787 Typesetting a postit: 788\begin{verbatim} 789\setbeamercolor{postit}{fg=black,bg=yellow} 790\begin{beamercolorbox}[sep=1em,wd=5cm]{postit} 791 Place me somewhere! 792\end{beamercolorbox} 793\end{verbatim} 794 795 The following \meta{options} can be given: 796 \begin{itemize} 797 \item 798 \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. 799 800 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. 801 \item 802 \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. 803 804 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.'' 805 \item 806 \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. 807 \item 808 \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. 809 \item 810 \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. 811 \item 812 \declare{|center|} centers the text inside the box. Note that this will override any |leftskip| or |rightskip| setting. 813 \item 814 \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. 815 \item 816 \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. 817 \item 818 \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. 819 \item 820 \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. 821 \item 822 \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. 823 824 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. 825 \item 826 \declare{|shadow|}\opt{|=|\meta{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. 827 \item 828 \declare{|rounded|}\opt{|=|\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. 829 \item 830 \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.'' 831 \item 832 \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. 833 \end{itemize} 834\end{environment} 835 836\begin{environment}{{beamerboxesrounded}\oarg{options}\marg{head}} 837 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: 838 \begin{itemize} 839 \item 840 \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. 841 \item 842 \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. 843 \item 844 \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. 845 \item 846 \declare{|shadow=|\meta{true or false}}. If set to |true|, a shadow will be drawn. 847 \end{itemize} 848 If no \meta{head} is given, the head part is completely suppressed. 849 \example 850\begin{verbatim} 851\begin{beamerboxesrounded}[upper=block head,lower=block body,shadow=true]{Theorem} 852 $A = B$. 853\end{beamerboxesrounded} 854\end{verbatim} 855 856 \articlenote 857 This environment is not available in |article| mode. 858\end{environment} 859 860 861\subsection{Figures and Tables} 862 863You 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. 864 865\example 866\begin{verbatim} 867\begin{frame} 868 \begin{figure} 869 \pgfuseimage{myfigure} 870 \caption{This caption is placed below the figure.} 871 \end{figure} 872 873 \begin{figure} 874 \caption{This caption is placed above the figure.} 875 \pgfuseimage{myotherfigure} 876 \end{figure} 877\end{frame} 878\end{verbatim} 879 880\begin{element}{caption}\yes\yes\yes 881 This template is used to render the caption. 882 \begin{templateoptions} 883 \itemoption{default}{} 884 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. 885 \itemoption{numbered}{} 886 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. 887 \itemoption{caption name own line}{} 888 As the name suggests, this options puts the caption name (like ``Figure'') on its own line. 889 \end{templateoptions} 890 891 Inside the template, you can use the following inserts: 892 \begin{itemize} 893 \iteminsert{\insertcaption} 894 Inserts the text of the current caption. 895 896 \iteminsert{\insertcaptionname} 897 Inserts the name of the current caption. This word is either ``Table'' or ``Figure'' or, if the |babel| package is used, some translation thereof. 898 899 \iteminsert{\insertcaptionnumber} 900 Inserts the number of the current figure or table. 901 \end{itemize} 902\end{element} 903 904\begin{element}{caption name}\no\yes\yes 905 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. 906\end{element} 907 908\begin{element}{caption label separator}\yes\no\no 909 This template is inserted between caption name and caption text. 910 \begin{templateoptions} 911 \itemoption{default}{} 912 Typesets the colon followed by the space. 913 \itemoption{none}{} 914 Typesets no separator. 915 \itemoption{colon}{} 916 Alias for the default. 917 \itemoption{period}{} 918 Typesets the period followed by the space. 919 \itemoption{space}{} 920 Typesets the space. 921 \itemoption{quad}{} 922 Typesets the |\quad| followed by the space. 923 \itemoption{endash}{} 924 Typesets the en-dash surrounded by spaces (| -- |). 925 \end{templateoptions} 926\end{element} 927 928 929\subsection{Splitting a Frame into Multiple Columns} 930 931The \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. 932 933The 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. 934 935\begin{environment}{{columns}\oarg{options}} 936 A multi-column area. Inside the environment you should place only |column| environments or |\column| commands (see below). The following \meta{options} may be given: 937 \begin{itemize} 938 \item 939 \declare{|b|} will cause the bottom lines of the columns to be vertically aligned. 940 \item 941 \declare{|c|} will cause the columns to be centered vertically relative to each other. Default, unless the global option |t| is used. 942 \item 943 \declare{|onlytextwidth|} is the same as |totalwidth=\textwidth|. 944 \item 945 \declare{|t|} will cause the first lines of the columns to be aligned. Default if global option |t| is used. 946 \item 947 \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. 948 \item 949 \declare{|totalwidth=|\meta{width}} will cause the columns to occupy not the whole page width, but only \meta{width}, all told. 950 Note that this means that any margins are ignored. 951 \end{itemize} 952 953 \example 954\begin{verbatim} 955\begin{columns}[t] 956 \begin{column}{5cm} 957 Two\\lines. 958 \end{column} 959 \begin{column}{5cm} 960 One line (but aligned). 961 \end{column} 962\end{columns} 963\end{verbatim} 964 965 \example 966\begin{verbatim} 967\begin{columns}[t] 968 \column{5cm} 969 Two\\lines. 970 971 \column[T]{5cm} 972 \includegraphics[height=3cm]{mygraphic.jpg} 973\end{columns} 974\end{verbatim} 975 976 \articlenote 977 This environment is ignored in |article| mode. 978 979\end{environment} 980 981To create a column, you can either use the |column| environment or the |\column| command. 982 983\begin{environment}{{column}\oarg{placement}\marg{column width}} 984 Creates a single column of width \meta{column width}. The vertical placement of the enclosing |columns| environment can be overruled by specifying a specific \meta{placement} (|t| and |T| for the two top modes, |c| for centered, and |b| for bottom). 985 986 \example 987 The following code has the same effect as the above examples: 988\begin{verbatim} 989\begin{columns} 990 \begin{column}[t]{5cm} 991 Two\\lines. 992 \end{column} 993 \begin{column}[t]{5cm} 994 One line (but aligned). 995 \end{column} 996\end{columns} 997\end{verbatim} 998 999 \articlenote 1000 This command is ignored in |article| mode. 1001 1002\end{environment} 1003 1004\begin{command}{{\column}\oarg{placement}\marg{column width}} 1005 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. 1006 1007 \example 1008\begin{verbatim} 1009\begin{columns} 1010 \column[t]{5cm} 1011 Two\\lines. 1012 \column[t]{5cm} 1013 One line (but aligned). 1014\end{columns} 1015\end{verbatim} 1016 1017 \articlenote 1018 This command is ignored in |article| mode. 1019 1020\end{command} 1021 1022 1023\subsection{Positioning Text and Graphics Absolutely} 1024 1025Normally, \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. 1026 1027The 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. 1028 1029 1030\subsection{Verbatim and Fragile Text} 1031 1032If 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. 1033 1034You 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. 1035 1036Inside |{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: 1037 1038\begin{environment}{{semiverbatim}} 1039 The text inside this environment is typeset like verbatim text. However, the characters |\|, |{|, and |}| retain their meaning. Thus, you can say things like 1040\begin{verbatim} 1041\alert<1->{std::cout << "AT&T likes 100% performance";} 1042\end{verbatim} 1043 1044 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\}|. 1045\end{environment} 1046 1047 1048\subsection{Abstract} 1049 1050The |{abstract}| environment is overlay specification-aware in \beamer: 1051 1052\begin{environment}{{abstract}\sarg{action specification}} 1053 You can use this environment to typeset an abstract. 1054 1055 \begin{element}{abstract}\no\yes\yes 1056 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. 1057 \end{element} 1058 1059 \begin{element}{abstract title}\yes\yes\yes 1060 \colorparents{titlelike} 1061 This template is used for the title. By default, this inserts the word |\abstractname|, centered. The background color is ignored. 1062 \end{element} 1063 1064 \begin{element}{abstract begin}\yes\no\no 1065 This template is inserted at the very beginning of the abstract, before the abstract title and the \meta{environment contents} is inserted. 1066 \end{element} 1067 1068 \begin{element}{abstract end}\yes\no\no 1069 This template is inserted at the end of the abstract, after the \meta{environment contents}. 1070 \end{element} 1071\end{environment} 1072 1073 1074\subsection{Verse, Quotations, Quotes} 1075 1076\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. 1077 1078You 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). 1079 1080\begin{environment}{{verse}\sarg{action specification}} 1081 You can use this environment to typeset a verse. 1082 1083 \begin{element}{verse}\no\yes\yes 1084 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. 1085 \end{element} 1086 1087 \begin{element}{verse begin}\yes\no\no 1088 This template is inserted at the beginning of the verse. 1089 \end{element} 1090 1091 \begin{element}{verse end}\yes\no\no 1092 This template is inserted at the end of the verse. 1093 \end{element} 1094\end{environment} 1095 1096\begin{environment}{{quotation}\sarg{action specification}} 1097 Use this environment to typeset multi-paragraph quotations. Think again, before presenting multi-paragraph quotations. 1098 1099 \begin{element}{quotation}\no\yes\yes 1100 These \beamer-color and -font are used to typeset the quotation. 1101 \end{element} 1102 1103 \begin{element}{quotation begin}\yes\no\no 1104 This template is inserted at the beginning of the quotation. 1105 \end{element} 1106 1107 \begin{element}{quotation end}\yes\no\no 1108 This template is inserted at the end of the quotation. 1109 \end{element} 1110\end{environment} 1111 1112\begin{environment}{{quote}\sarg{action specification}} 1113 Use this environment to typeset a single-paragraph quotation. 1114 1115 \begin{element}{quote}\no\yes\yes 1116 These \beamer-color and -font are used to typeset the quote. 1117 \end{element} 1118 1119 \begin{element}{quote begin}\yes\no\no 1120 This template is inserted at the beginning of the quote. 1121 \end{element} 1122 1123 \begin{element}{quote end}\yes\no\no 1124 This template is inserted at the end of the quote. 1125 \end{element} 1126\end{environment} 1127 1128 1129\subsection{Footnotes} 1130 1131First a word of warning: Using footnotes is usually not a good idea. They disrupt the flow of reading. 1132 1133You 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. 1134 1135\begin{command}{\footnote\sarg{overlay specification}\oarg{options}\marg{text}} 1136 Inserts a footnote into the current frame. Footnotes will always be shown at the bottom of 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 one additional option: 1137 \begin{itemize} 1138 \item 1139 \declare{|frame|} causes the footnote to be shown at the bottom of the frame. This is normally the default behavior anyway, but in minipages 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. 1140 \end{itemize} 1141 1142 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. 1143 1144 \example 1145 |\footnote{On a fast machine.}| 1146 \example 1147 |\footnote[frame,2]{Not proved.}| 1148 \example 1149 |\footnote<.->{Der Spiegel, 4/04, S.~90.}| 1150 1151 \articlenote 1152 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. 1153 1154 \begin{element}{footnote}\yes\yes\yes 1155 This template will be used to render the footnote. Inside this template, the following two inserts can be used: 1156 \begin{itemize} 1157 \iteminsert{\insertfootnotetext} 1158 Inserts the current footnote text. 1159 \iteminsert{\insertfootnotemark} 1160 Inserts the current footnote mark (like a raised number). This mark is computed automatically. 1161 \end{itemize} 1162 \end{element} 1163 1164 \begin{element}{footnote mark}\no\yes\yes 1165 This \beamer-color/-font is used when rendering the footnote mark, both in the text and at the beginning of the footnote itself. 1166 \end{element} 1167\end{command} 1168