| 1 |
\iffalse meta-comment |
| 2 |
|
| 3 |
File: ltx-talk.tex Copyright (C) 2023-2026 Joseph Wright |
| 4 |
|
| 5 |
It may be distributed and/or modified under the conditions of the |
| 6 |
LaTeX Project Public License (LPPL), either version 1.3c of this |
| 7 |
license or (at your option) any later version. The latest version |
| 8 |
of this license is in the file |
| 9 |
|
| 10 |
https://www.latex-project.org/lppl.txt |
| 11 |
|
| 12 |
This file is part of the "ltx-talk bundle" (The Work in LPPL) |
| 13 |
and all files in that bundle must be distributed together. |
| 14 |
|
| 15 |
The released version of this bundle is available from CTAN. |
| 16 |
|
| 17 |
----------------------------------------------------------------------- |
| 18 |
|
| 19 |
The development version of the bundle can be found at |
| 20 |
|
| 21 |
https://github.com/josephwright/ltx-talk |
| 22 |
|
| 23 |
for those people who are interested. |
| 24 |
|
| 25 |
----------------------------------------------------------------------- |
| 26 |
|
| 27 |
\fi |
| 28 |
|
| 29 |
\DocumentMetadata{pdfversion = 2.0, lang = en, tagging = on} |
| 30 |
|
| 31 |
\documentclass{l3doc} |
| 32 |
% Until this is inlined into l3doc |
| 33 |
\usepackage{latex-lab-testphase-l3doc} |
| 34 |
|
| 35 |
\usepackage{siunitx} |
| 36 |
\usepackage{unicode-math} |
| 37 |
|
| 38 |
% Commands needed in this document |
| 39 |
\ExplSyntaxOn |
| 40 |
\makeatletter |
| 41 |
\NewDocumentCommand \acro { m } |
| 42 |
{ |
| 43 |
\textsc |
| 44 |
{ |
| 45 |
\exp_args:NV \tl_if_head_eq_charcode:nNTF \f@series { m } |
| 46 |
{ \text_lowercase:n } |
| 47 |
{ \use:n } |
| 48 |
{#1} |
| 49 |
} |
| 50 |
} |
| 51 |
\makeatother |
| 52 |
\ExplSyntaxOff |
| 53 |
\NewDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}} |
| 54 |
\NewDocumentCommand\foreign{m}{\textit{#1}} |
| 55 |
\NewDocumentCommand\opt{m}{\texttt{#1}} |
| 56 |
\ExplSyntaxOn |
| 57 |
\NewDocumentCommand \sarg { m } { \texttt < \__codedoc_meta:n {#1} \texttt > } |
| 58 |
\ExplSyntaxOff |
| 59 |
% Tidy up the above in bookmarks |
| 60 |
\makeatletter |
| 61 |
\pdfstringdefDisableCommands{% |
| 62 |
\let\acro\@firstofone |
| 63 |
\let\foreign\@firstofone |
| 64 |
\let\opt\@firstofone |
| 65 |
} |
| 66 |
\makeatother |
| 67 |
|
| 68 |
% As we are dealing with a class, this has to be done manually |
| 69 |
\def\filedate{2026-04-30} |
| 70 |
\def\fileversion{v0.5.0} |
| 71 |
|
| 72 |
\begin{document} |
| 73 |
|
| 74 |
\title{% |
| 75 |
\cls{ltx-talk} -- A class for typesetting presentations% |
| 76 |
\thanks{This file describes \fileversion, |
| 77 |
last revised \filedate.}% |
| 78 |
} |
| 79 |
|
| 80 |
\author{% |
| 81 |
Joseph Wright% |
| 82 |
\thanks{% |
| 83 |
E-mail: \email{[email protected]}% |
| 84 |
}% |
| 85 |
} |
| 86 |
|
| 87 |
\date{Released \filedate} |
| 88 |
|
| 89 |
\maketitle |
| 90 |
|
| 91 |
\tableofcontents |
| 92 |
|
| 93 |
\begin{documentation} |
| 94 |
|
| 95 |
\section{Introduction% |
| 96 |
\label{sec:intro}} |
| 97 |
|
| 98 |
The \cls{beamer} class was first released in 2003, and rapidly became the |
| 99 |
most popular method for producing presentations in \LaTeX{}. As detailed in |
| 100 |
the \cls{beamer} manual |
| 101 |
\begin{quotation} |
| 102 |
Till Tantau created \cls{beamer} mainly in his spare time. Many other people |
| 103 |
have helped by sending him emails containing suggestions for improvement or |
| 104 |
corrections or patches or whole new themes (by now, this amounts to over a |
| 105 |
thousand emails concerning \cls{beamer}). Indeed, most of the development was |
| 106 |
only initiated by feature requests and bug reports. Without this feedback, |
| 107 |
\cls{beamer} would still be what it was originally intended to be: a small |
| 108 |
private collection of macros that make using the \cls{seminar} class easier. |
| 109 |
Till created the first version of \cls{beamer} for his PhD defense |
| 110 |
presentation in February 2003. A month later, he put the package on |
| 111 |
\acro{ctan} at the request of some colleagues. After that, things somehow got |
| 112 |
out of hand. |
| 113 |
\end{quotation} |
| 114 |
|
| 115 |
Despite the very large amount of work Till (and others) put into \cls{beamer}, |
| 116 |
there are several challenges which confront us today. |
| 117 |
\begin{enumerate} |
| 118 |
\item The document interface is flexible but in places deviates from normal |
| 119 |
\LaTeX{} conventions |
| 120 |
\item Internally, the code makes use of whatever methods would give the |
| 121 |
visual results but not necessarily the most idiomatic style |
| 122 |
\item Till made few comments in the code or in commit messages in the code |
| 123 |
history |
| 124 |
\item The underlying box structure of a \cls{beamer} document is very |
| 125 |
different from the standard \LaTeX{} model, and a lot of material is |
| 126 |
boxed up multiple times |
| 127 |
\item Engine, font and macro development over the past 20 years offers |
| 128 |
new approaches for some areas |
| 129 |
\end{enumerate} |
| 130 |
These all feed into an issue addressing a major requirement today: |
| 131 |
accessibility. Broadly, the internal structure (and to some extent the user |
| 132 |
interface) of \cls{beamer} means that it is not possible to \enquote{retrofit} |
| 133 |
PDF tagging into the class. |
| 134 |
|
| 135 |
Instead, the approach is to develop a new class, \cls{ltx-talk}, which takes |
| 136 |
ideas from \cls{beamer} but with tagging and accessibility of structure as a |
| 137 |
design aim from the beginning. In contrast to work by the \LaTeX{} Project Team |
| 138 |
on making the core classes accessible, the expectation for \cls{ltx-talk} is |
| 139 |
that users \emph{will} need to change their sources. Unlike other documents, |
| 140 |
presentations tend to be \enquote{single use}: revised and adjusted each time |
| 141 |
they are used. The need to edit sources should therefore not be an |
| 142 |
insurmountable barrier. |
| 143 |
|
| 144 |
At present, this code is experimental: only a (small) subset of \cls{beamer} |
| 145 |
functionality is implemented, some things are being done differently, and |
| 146 |
almost everything is still subject to discussion. Some document commands are |
| 147 |
stubs: either doing nothing at all or dropping optional arguments. This is to |
| 148 |
allow testing of existing \cls{beamer} sources with minimal changes. |
| 149 |
|
| 150 |
\section{Engine support} |
| 151 |
|
| 152 |
Creating fully tagged PDFs is only possible with suitable engine support; |
| 153 |
Lua\TeX{} offers the best outcomes here and \pdfTeX{} is usable but with some |
| 154 |
limitations (for example, more \LaTeX{} runs being required). As such, |
| 155 |
\cls{ltx-talk} is \emph{only} tested with these engines. Most notably, \XeTeX{} |
| 156 |
is \emph{not} supported: it is not suitable for fully accessible tagged PDF |
| 157 |
production, and transparency support is problematic. Issues arising which are |
| 158 |
\XeTeX{}-specific will therefore be closed without investigation. |
| 159 |
|
| 160 |
\section{Submitting ideas} |
| 161 |
|
| 162 |
As noted in Section~\ref{sec:intro}, the class is at present experimental. As |
| 163 |
such, missing features or restrictions should be expected throughout. Over |
| 164 |
time, the aim is to address many of the things that \pkg{beamer} can do (though |
| 165 |
there may be some that are not included). |
| 166 |
|
| 167 |
At present, prioritization of requests will be focussed on the need to provide |
| 168 |
accessible content. This means that structural issues are likely to be handled |
| 169 |
before design aspects. |
| 170 |
|
| 171 |
\section{Simple example documents} |
| 172 |
|
| 173 |
Using \cls{ltx-talk} \emph{absolutely requires} the use of the |
| 174 |
\cs{DocumentMetadata} command. As such, the most basic \cls{ltx-talk} document |
| 175 |
is |
| 176 |
\begin{verbatim} |
| 177 |
\DocumentMetadata{} % likely with "tagging = on" |
| 178 |
\documentclass{ltx-talk} |
| 179 |
\begin{document} |
| 180 |
\begin{frame} |
| 181 |
Some content here |
| 182 |
\end{frame} |
| 183 |
\end{document} |
| 184 |
\end{verbatim} |
| 185 |
|
| 186 |
A slightly more useful version, which generates multiple slides and shows some |
| 187 |
(current) features, is |
| 188 |
\begin{verbatim} |
| 189 |
\DocumentMetadata{} |
| 190 |
\documentclass{ltx-talk} |
| 191 |
\begin{document} |
| 192 |
\begin{frame} |
| 193 |
\frametitle{An example frame} |
| 194 |
\begin{itemize}[action-spec = <+->] |
| 195 |
\item This will be on slide one onward |
| 196 |
\item This will be on slide two onward |
| 197 |
\item<.-> So will this |
| 198 |
\item But this will only appear on slide three |
| 199 |
\end{itemize} |
| 200 |
Back to appearing on all slides |
| 201 |
\end{frame} |
| 202 |
\end{document} |
| 203 |
\end{verbatim} |
| 204 |
|
| 205 |
Tagging is activated for the standard (projector) output of \cls{ltx-talk}, but |
| 206 |
it is perhaps more useful in \opt{handout} mode, which is activated using a |
| 207 |
class option. |
| 208 |
\begin{verbatim} |
| 209 |
\DocumentMetadata{} |
| 210 |
\documentclass[mode = handout]{ltx-talk} |
| 211 |
\begin{document} |
| 212 |
\begin{frame} |
| 213 |
\frametitle{An example frame} |
| 214 |
\begin{itemize}[action-spec = <+->] |
| 215 |
\item This will be on slide one onward |
| 216 |
\item This will be on slide two onward |
| 217 |
\item<.-> So will this |
| 218 |
\item But this will only appear on slide three |
| 219 |
\end{itemize} |
| 220 |
Back to appearing on all slides |
| 221 |
\end{frame} |
| 222 |
\end{document} |
| 223 |
\end{verbatim} |
| 224 |
For convenience, this option is also available as simply \opt{handout}, to |
| 225 |
match the \cls{beamer} syntax. |
| 226 |
|
| 227 |
A larger set of examples which can be edited and typeset in the browser are |
| 228 |
available at \url{https://www.texdev.net/ltx-talk/examples/}. |
| 229 |
|
| 230 |
\section{Class structure and design decisions} |
| 231 |
|
| 232 |
As covered in Section~\ref{sec:intro}, the \cls{ltx-talk} class is currently |
| 233 |
highly experimental. Active discussion is ongoing around many aspects of the |
| 234 |
way that things should work, and very little is therefore at all stable. That |
| 235 |
said, some decisions have been made: some of this is re-stating ideas which |
| 236 |
carry forward from \cls{beamer}. |
| 237 |
\begin{itemize} |
| 238 |
\item The basic structure of a presentation is made up of \env{frame} |
| 239 |
environments, which are made up of one or more slides. |
| 240 |
\item Variable content is indicated by an \emph{overlay specification}, given |
| 241 |
in optional angle brackets (|< ... >|). |
| 242 |
\item Slides have a \emph{fixed} height of \qty{100}{\mm}. |
| 243 |
\item The default font will be sans-serif using established standard |
| 244 |
implementations (currently \pkg{sansmathfonts} with Latin Modern for |
| 245 |
text for \pdfTeX{} and New Computer Modern for OpenType engines). |
| 246 |
\end{itemize} |
| 247 |
|
| 248 |
\section{Differences from \cls{beamer}} |
| 249 |
|
| 250 |
The following key differences between \cls{beamer} and \cls{ltx-talk} are |
| 251 |
important to note for the user. |
| 252 |
\begin{itemize} |
| 253 |
\item The default font setup in \cls{ltx-talk} is \emph{all} sans-serif, in |
| 254 |
particular \cs{mathrm} and \cs{textrm} will give a sans-serif font |
| 255 |
\item Overlay specifications can only be given as the first argument to |
| 256 |
commands |
| 257 |
\item Where a command takes a star as an option, this comes \emph{before} |
| 258 |
the overlay argument, e.g. |\includegraphics*<...>|: this reflects the |
| 259 |
fact that the star is usually described as part of the command name rather |
| 260 |
than as an argument |
| 261 |
\item There are no optional braced arguments in \cls{ltx-talk}, in particular |
| 262 |
frame titles are given either using a \emph{mandatory} |{...}| |
| 263 |
argument or using \cs{frametitle} (see below) |
| 264 |
\item New overlay-aware commands and environments should be defined using |
| 265 |
\pkg{ltcmd} (\cs{NewDocumentCommand} and so on): no changes are made to the |
| 266 |
behavior of \cs{newcommand} or \cs{newenvironment} |
| 267 |
\item There are no commands containing the class name (or \texttt{beamer}): |
| 268 |
rather, methods from the kernel or other standard packages should be used |
| 269 |
(these are documented where needed) |
| 270 |
\item The class features are specifically focussed on presentation and avoid |
| 271 |
as far as possible other changes from standard \LaTeX{}; in particular, |
| 272 |
the various math-focussed additions which \cls{beamer} make (such as various |
| 273 |
theorem environments) are not included |
| 274 |
\end{itemize} |
| 275 |
|
| 276 |
\section{Differences from \enquote{classical} \LaTeXe{}} |
| 277 |
|
| 278 |
The class builds on ideas developed by the \LaTeX{} team over many years, and |
| 279 |
introduced along with tagging support in recent years. This includes some |
| 280 |
revision of how standard \LaTeX{} commands work, in particular |
| 281 |
\begin{itemize} |
| 282 |
\item The optional argument to (sub)sections is treated as a set of |
| 283 |
key--value entries, and these can be used to have fine control over the |
| 284 |
processing of the title (for example, whether it appears in the table of |
| 285 |
contents or PDF bookmarks); this argument is favored over using the |
| 286 |
starred form. |
| 287 |
\end{itemize} |
| 288 |
|
| 289 |
\section{Creating frames} |
| 290 |
|
| 291 |
\subsection{The frame environment} |
| 292 |
|
| 293 |
\DescribeEnv{frame} |
| 294 |
A presentation consists of a series of frames. Each frame consists of a series |
| 295 |
of slides. You create a frame using the \env{frame} environment. All of the text |
| 296 |
that is not tagged by overlay specifications is shown on all slides of the |
| 297 |
frame. (Overlay specifications are explained in more detail in later sections. |
| 298 |
For the moment, let's just say that an overlay specification is a list of |
| 299 |
numbers or number ranges in angle brackets that is put after certain commands |
| 300 |
as in |\uncover<1,2>{Text}|.) If a frame contains commands that have an overlay |
| 301 |
specification, the frame will contain multiple slides; otherwise it contains |
| 302 |
only one slide. |
| 303 |
|
| 304 |
\begin{syntax} |
| 305 |
\cs{begin}\{\texttt{frame}\}\sarg{overlay spec}\oarg{options} |
| 306 |
\meta{environment contents} |
| 307 |
\cs{end}\{\texttt{frame}\} |
| 308 |
\end{syntax} |
| 309 |
The \meta{overlay spec} dictates which slides of a frame are to be shown. If |
| 310 |
left out, the number is calculated automatically. The \meta{environment |
| 311 |
contents} can be normal \LaTeX{} text, but may not contain |\verb| commands or |
| 312 |
|verbatim| environments or any environment that changes the character codes. |
| 313 |
|
| 314 |
\begin{verbatim} |
| 315 |
\begin{frame} |
| 316 |
\frametitle{A title} |
| 317 |
Some content |
| 318 |
\end{frame} |
| 319 |
\end{verbatim} |
| 320 |
|
| 321 |
\DescribeEnv{frame*} |
| 322 |
The \env{frame*} environment works exactly the same way as the \env{frame} one, |
| 323 |
\emph{except} that it can contain |\verb| commands or |verbatim| environments |
| 324 |
or any environment that changes the character codes. The \env{frame*} |
| 325 |
environment however \emph{cannot} be used inside the argument of another |
| 326 |
command. |
| 327 |
\begin{verbatim} |
| 328 |
\begin{frame*} |
| 329 |
\frametitle{A title} |
| 330 |
Some content \verb|$%#|. |
| 331 |
\end{frame*} |
| 332 |
\end{verbatim} |
| 333 |
|
| 334 |
In contrast to \cls{beamer}'s \opt{fragile} frame option, the \env{frame*} |
| 335 |
environment does not use external files to handle verbatim material. As such, |
| 336 |
there is very little performance impact processing frames containing category |
| 337 |
code changes. |
| 338 |
|
| 339 |
\subsection{Components of a frame} |
| 340 |
|
| 341 |
\subsubsection{The frame title} |
| 342 |
|
| 343 |
\DescribeMacro{\frametitle} |
| 344 |
\DescribeMacro{\framesubtitle} |
| 345 |
\begin{syntax} |
| 346 |
\cs{frametitle}\sarg{overlay spec}\oarg{options}\marg{frame title} |
| 347 |
\cs{framesubtitle}\sarg{overlay spec}\oarg{options}\marg{frame subtitle} |
| 348 |
\end{syntax} |
| 349 |
The frame title is shown prominently at the top of the frame and can be |
| 350 |
specified with the command \cs{frametitle}. You should end the \meta{frame |
| 351 |
title} with a period, if the title is a proper sentence. Otherwise, there |
| 352 |
should not be a period. A frame subtitle may also be given; this is typically |
| 353 |
used where a series of related frames are given with clearly distinct content. |
| 354 |
|
| 355 |
Currently, the \meta{frame subtitle} is not used in output: this will be |
| 356 |
addressed in later releases. The \meta{options} for both commands are currently |
| 357 |
unused. |
| 358 |
|
| 359 |
\DescribeOption{frame-title-arg} |
| 360 |
The class can be loaded with the option \opt{frame-title-arg}. When this is |
| 361 |
active, the \env{frame} environment \emph{requires} an argument in all cases |
| 362 |
\begin{verbatim} |
| 363 |
\begin{frame}{Frame title here} |
| 364 |
\end{verbatim} |
| 365 |
Note that this option does \emph{not} influence frame subtitles, which can |
| 366 |
\emph{only} be given using \cs{framesubitle}. |
| 367 |
|
| 368 |
At present, the final form of the frame title interface is not decided: |
| 369 |
feedback on this aspect is therefore \emph{particularly welcome}. |
| 370 |
|
| 371 |
\subsection{Frame and margin size} |
| 372 |
|
| 373 |
The size of a frame is actually the \enquote{paper size} of a presentation, and |
| 374 |
it is variable. The standard size of a frame is \qty{100}{\mm} height with an |
| 375 |
aspect ratio of $16:9$. It is the job of the presentation program to display |
| 376 |
the slides at full screen size. The main advantage of using a small |
| 377 |
\enquote{paper size} is that you can use all your normal fonts at their natural |
| 378 |
sizes. In particular, inserting a graphic with \qty{11}{pt} labels will result |
| 379 |
in reasonably sized text during the presentation. |
| 380 |
|
| 381 |
\DescribeOption{font-size} |
| 382 |
You can change the standard font size for the frames using the \opt{font-size} |
| 383 |
option. This is initially set to \opt{11pt}, and if a non-standard size is |
| 384 |
requested will use the \pkg{relsize} package to produce the output requested. |
| 385 |
To support translation from \cls{beamer}, the classical options \opt{10pt}, |
| 386 |
\opt{11pt} and \opt{12pt} are also supported. |
| 387 |
|
| 388 |
\DescribeOption{aspect-ratio} |
| 389 |
The aspect ratio of the slides can be adjusted by setting the |
| 390 |
\opt{aspect-ratio} load-time option, which takes two integer values separated |
| 391 |
by a colon. These values are the relative width and height of the slide: in |
| 392 |
contrast to \pkg{beamer}, the absolute height is a fixed value of |
| 393 |
\qty{100}{\mm}. |
| 394 |
|
| 395 |
Aside from using these options, you should refrain from changing the |
| 396 |
\enquote{paper size}. However, you \emph{can} change the size of the left and |
| 397 |
right margins, which default to \qty{10}{\mm}. These should be set using the |
| 398 |
interfaces from the \pkg{geometry} package, for example |
| 399 |
\begin{verbatim} |
| 400 |
\geometry{lmargin = 15mm, rmargin = 15mm} |
| 401 |
\end{verbatim} |
| 402 |
|
| 403 |
\subsection{Restricting the slides of a frame} |
| 404 |
|
| 405 |
The number of slides in a frame is automatically calculated. If the largest |
| 406 |
number mentioned in any overlay specification inside the frame is~4, four |
| 407 |
slides are introduced (despite the fact that a specification like |<4->| might |
| 408 |
suggest that more than four slides would be possible). |
| 409 |
|
| 410 |
\section{Creating overlays} |
| 411 |
|
| 412 |
\subsection{The \cs{pause} command} |
| 413 |
|
| 414 |
\DescribeMacro{\pause} |
| 415 |
The \cs{pause} command offers an easy, but not very flexible way of creating |
| 416 |
frames that are uncovered piecewise. If you say \cs{pause} somewhere in a |
| 417 |
frame, only the text on the frame up to the \cs{pause} command is shown on the |
| 418 |
first slide. On the second slide, everything is shown up to the second |
| 419 |
\cs{pause}, and so forth. You can also use \cs{pause} inside environments; its |
| 420 |
effect will last after the environment. However, taking this to extremes and |
| 421 |
using \cs{pause} deeply within a nested environment may not have the desired |
| 422 |
result. |
| 423 |
|
| 424 |
A much more fine-grained control over what is shown on each slide can be |
| 425 |
attained using overlay specifications, see the next sections. However, for many |
| 426 |
simple cases the \cs{pause} command is sufficient. |
| 427 |
|
| 428 |
The \cs{pause} command takes an optional argument |
| 429 |
\begin{syntax} |
| 430 |
\cs{pause}\oarg{overlay spec} |
| 431 |
\end{syntax} |
| 432 |
This causes the text following it to be shown only from the next slide on, or, |
| 433 |
if the optional \meta{overlay spec} is given, from the slide with the number |
| 434 |
\meta{overlay spec}. If the optional \meta{overlay spec} is given, the counter |
| 435 |
|pauses| is set to this number. This command uses the \cs{onslide} command |
| 436 |
internally. The effect of \cs{pause} lasts till the next \cs{pause}, |
| 437 |
\cs{onslide}, or the end of the frame. |
| 438 |
\begin{verbatim} |
| 439 |
\begin{frame} |
| 440 |
\begin{itemize} |
| 441 |
\item |
| 442 |
Shown from first slide on. |
| 443 |
\pause |
| 444 |
\item |
| 445 |
Shown from second slide on. |
| 446 |
\begin{itemize} |
| 447 |
\item |
| 448 |
Shown from second slide on. |
| 449 |
\pause |
| 450 |
\item |
| 451 |
Shown from third slide on. |
| 452 |
\end{itemize} |
| 453 |
\item |
| 454 |
Shown from third slide on. |
| 455 |
\pause |
| 456 |
\item |
| 457 |
Shown from fourth slide on. |
| 458 |
\end{itemize} |
| 459 |
|
| 460 |
Shown from fourth slide on. |
| 461 |
|
| 462 |
\begin{itemize} |
| 463 |
\onslide |
| 464 |
\item |
| 465 |
Shown from first slide on. |
| 466 |
\pause |
| 467 |
\item |
| 468 |
Shown from fifth slide on. |
| 469 |
\end{itemize} |
| 470 |
\end{frame} |
| 471 |
\end{verbatim} |
| 472 |
|
| 473 |
This command does \emph{not} work correctly inside math mode environments like |
| 474 |
\env{align} and \pkg{pgf} environments like \env{tikzpicture} or |
| 475 |
\env{tcolorbox}, since these do really wicked things. |
| 476 |
|
| 477 |
To \enquote{unpause} some text, that is, to temporarily suspend pausing, use |
| 478 |
the command \cs{onslide}, see below. |
| 479 |
|
| 480 |
\subsection{The general concept of overlay specifications} |
| 481 |
|
| 482 |
Whilst the \cs{pause} command is easy to understand, it is quite limited and so |
| 483 |
is best suited only to simple cases. The \cls{ltx-talk} class therefore |
| 484 |
supports a different approach. The idea is to add \emph{overlay specifications} |
| 485 |
to commands. These specifications are always given in pointed brackets and |
| 486 |
follow the command as the first argument. In the simplest case, the |
| 487 |
specification contains just a number. A command with an overlay specification |
| 488 |
following it will only have \enquote{effect} on the slide(s) mentioned in the |
| 489 |
specification. What exactly \enquote{having an effect} means, depends on the |
| 490 |
command. Consider the following example. |
| 491 |
\begin{verbatim} |
| 492 |
\begin{frame} |
| 493 |
\textbf{This line is bold on all three slides.} |
| 494 |
\textbf<2>{This line is bold only on the second slide.} |
| 495 |
\textbf<3>{This line is bold only on the third slide.} |
| 496 |
\end{frame} |
| 497 |
\end{verbatim} |
| 498 |
|
| 499 |
For the command \cs{textbf}, the overlay specification causes the text to be |
| 500 |
set in boldface only on the specified slides. On all other slides, the text is |
| 501 |
set in a normal font. |
| 502 |
|
| 503 |
For a second example, consider the following frame: |
| 504 |
\begin{verbatim} |
| 505 |
\begin{frame} |
| 506 |
\only<1>{This line is inserted only on slide~1.} |
| 507 |
\only<2>{This line is inserted only on slide~2.} |
| 508 |
\end{frame} |
| 509 |
\end{verbatim} |
| 510 |
|
| 511 |
The command \cs{only} normally simply inserts its parameter into the current |
| 512 |
frame. However, if an overlay specification is present, it \enquote{throws |
| 513 |
away} its parameter on slides that are not mentioned. |
| 514 |
|
| 515 |
Overlay specifications can only be written behind certain commands, not every |
| 516 |
command. Which commands you can use and which effects this will have is |
| 517 |
explained in the next section. However, it is quite easy to redefine an |
| 518 |
existing command such that it becomes \enquote{overlay specification aware}, |
| 519 |
see also Section~\ref{sec:overlay-cmds}. |
| 520 |
|
| 521 |
The syntax of (basic) overlay specifications is the following: they are |
| 522 |
comma-separated lists of slides and ranges. Ranges are specified like this: |
| 523 |
|2-5|, which means slide two through to five. The start or the end of a range |
| 524 |
can be omitted. For example, |3-| means \enquote{slides three, four, five, and |
| 525 |
so on} and |-5| means the same as |1-5|. A complicated example is |
| 526 |
|-3,6-8,10,12-15|, which selects the slides 1, 2, 3, 6, 7, 8, 10, 12, 13, 14 |
| 527 |
and~15. |
| 528 |
|
| 529 |
\subsection{Commands with overlay specifications% |
| 530 |
\label{sec:overlay-cmds}} |
| 531 |
|
| 532 |
For the following commands, adding an overlay specification causes the command |
| 533 |
to be simply ignored on slides that are not included in the specification: |
| 534 |
\cs{textbf}, \cs{textit}, \cs{textmd}, \cs{textnormal}, \cs{textrm}, |
| 535 |
\cs{textsc}, \cs{textsf}, \cs{textsl}, \cs{texttt}, \cs{textup}, \cs{emph}; |
| 536 |
\cs{color}, \cs{mathcolor}, \cs{textcolor}; \cs{alert}; \cs{includegraphics}; |
| 537 |
\cs{label}. |
| 538 |
|
| 539 |
If a command takes several arguments, like \cs{color}, the specification should |
| 540 |
directly follow the command as in the following example: |
| 541 |
\begin{verbatim} |
| 542 |
\begin{frame} |
| 543 |
\color<2-3>[rgb]{1,0,0} This text is red on slides 2 and 3, otherwise |
| 544 |
black. |
| 545 |
\end{frame} |
| 546 |
\end{verbatim} |
| 547 |
|
| 548 |
For the following commands, the effect of an overlay specification is special: |
| 549 |
|
| 550 |
\DescribeMacro{\onslide} |
| 551 |
\begin{syntax} |
| 552 |
\cs{onslide}\sarg{overlay spec} |
| 553 |
\end{syntax} |
| 554 |
All text following this command will only be shown (uncovered) on the specified |
| 555 |
slides. On non-specified slides, the text still occupies space. If no slides |
| 556 |
are specified, the following text is always shown. You need not call this |
| 557 |
command in the same \TeX{} group, its effect transcends block groups. |
| 558 |
\begin{verbatim} |
| 559 |
\begin{frame} |
| 560 |
Shown on first slide. |
| 561 |
\onslide<2-3> |
| 562 |
Shown on second and third slide. |
| 563 |
\begin{itemize} |
| 564 |
\item |
| 565 |
Still shown on the second and third slide. |
| 566 |
\onslide<4-> |
| 567 |
\item |
| 568 |
Shown from slide~4 on. |
| 569 |
\end{itemize} |
| 570 |
Shown from slide~4 on. |
| 571 |
\onslide |
| 572 |
Shown on all slides. |
| 573 |
\end{frame} |
| 574 |
\end{verbatim} |
| 575 |
|
| 576 |
\DescribeMacro{\only} |
| 577 |
\begin{syntax} |
| 578 |
\cs{only}\sarg{overlay spec}\marg{text} |
| 579 |
\end{syntax} |
| 580 |
The \meta{text} is inserted only into the specified slides. For other slides, |
| 581 |
the text is simply thrown away. In particular, it occupies no space. |
| 582 |
\begin{verbatim} |
| 583 |
\only<3->{Text inserted from slide 3 on.} |
| 584 |
\end{verbatim} |
| 585 |
|
| 586 |
\DescribeMacro{\uncover} |
| 587 |
\begin{syntax} |
| 588 |
\cs{uncover}\sarg{overlay spec}\marg{text} |
| 589 |
\end{syntax} |
| 590 |
If the \meta{overlay spec} is present, the \meta{text} is shown |
| 591 |
(\enquote{uncovered}) only on the specified slides. On other slides, the text |
| 592 |
still occupies space and it is still typeset, but it is not shown or only shown |
| 593 |
as if transparent. For details on how to specify whether the text is invisible |
| 594 |
or just transparent see Section~\ref{sec:opacity}. |
| 595 |
\begin{verbatim} |
| 596 |
\uncover<3->{Text shown from slide 3 on.} |
| 597 |
\end{verbatim} |
| 598 |
|
| 599 |
\DescribeMacro{\visible} |
| 600 |
\begin{syntax} |
| 601 |
\cs{visible}\sarg{overlay spec}\marg{text} |
| 602 |
\end{syntax} |
| 603 |
This command does almost the same as \cs{uncover}. The only difference is that |
| 604 |
if the text is not shown, it is never shown in a transparent way, but rather it |
| 605 |
is not shown at all. Thus, for this command the transparency settings have no |
| 606 |
effect. |
| 607 |
\begin{verbatim} |
| 608 |
\visible<2->{Text shown from slide 2 on.} |
| 609 |
\end{verbatim} |
| 610 |
|
| 611 |
\DescribeMacro{\invisible} |
| 612 |
\begin{syntax} |
| 613 |
\cs{invisible}\sarg{overlay spec}\marg{text} |
| 614 |
\end{syntax} |
| 615 |
This command does the opposite of \cs{visible}. |
| 616 |
\begin{verbatim} |
| 617 |
\invisible<2->{Text hidden from slide~2 on.} |
| 618 |
\end{verbatim} |
| 619 |
|
| 620 |
\DescribeMacro{\alt} |
| 621 |
\begin{syntax} |
| 622 |
\cs{alt}\sarg{overlay spec}\marg{default text}\marg{alternative text} |
| 623 |
\end{syntax} |
| 624 |
The default text is shown on the specified slides, otherwise the alternative |
| 625 |
text. |
| 626 |
\begin{verbatim} |
| 627 |
\alt<2>{On slide~2}{Not on slide~2.} |
| 628 |
\end{verbatim} |
| 629 |
|
| 630 |
\DescribeMacro{\temporal} |
| 631 |
\begin{syntax} |
| 632 |
\cs{temporal}\sarg{overlay spec}\marg{before slide text}\marg{default text}% |
| 633 |
\marg{after slide text} |
| 634 |
\end{syntax} |
| 635 |
This command alternates between three different texts, depending on whether the |
| 636 |
current slide is temporally before the specified slides, is one of the |
| 637 |
specified slides, or comes after them. If the \meta{overlay spec} is not an |
| 638 |
interval (that is, if it has a \enquote{hole}), the \enquote{hole} is |
| 639 |
considered to be part of the before slides. |
| 640 |
\begin{verbatim} |
| 641 |
\temporal<3-4>{Shown on 1, 2}{Shown on 3, 4}{Shown 5, 6, 7, ...} |
| 642 |
\temporal<3,5>{Shown on 1, 2, 4}{Shown on 3, 5}{Shown 6, 7, 8, ...} |
| 643 |
\end{verbatim} |
| 644 |
As a possible application of the \cs{temporal} command consider the following |
| 645 |
example: |
| 646 |
\begin{verbatim} |
| 647 |
\NewDocumentCommand\colorize{D<>{all}}{% |
| 648 |
\temporal<#1>{\color{red!50}}{\color{black}}{\color{black!50}}} |
| 649 |
\begin{frame} |
| 650 |
\begin{itemize} |
| 651 |
\colorize<1> \item First item. |
| 652 |
\colorize<2> \item Second item. |
| 653 |
\colorize<3> \item Third item. |
| 654 |
\colorize<4> \item Fourth item. |
| 655 |
\end{itemize} |
| 656 |
\end{frame} |
| 657 |
\end{verbatim} |
| 658 |
|
| 659 |
\DescribeMacro{\item} |
| 660 |
\begin{syntax} |
| 661 |
\cs{item}\sarg{action spec}\oarg{item label} |
| 662 |
\end{syntax} |
| 663 |
The effect of \meta{action spec} is described in Section~\ref{sec:action-spec}; |
| 664 |
this extends the \meta{overlay spec} to include the potential to |
| 665 |
\enquote{alert} items. |
| 666 |
\begin{verbatim} |
| 667 |
\begin{frame} |
| 668 |
\begin{itemize} |
| 669 |
\item<1-> First point, shown on all slides. |
| 670 |
\item<2-> Second point, shown on slide~2 and later. |
| 671 |
\item<2-> Third point, also shown on slide~2 and later. |
| 672 |
\item<3-> Fourth point, shown on slide~3. |
| 673 |
\end{itemize} |
| 674 |
\end{frame} |
| 675 |
|
| 676 |
\begin{frame} |
| 677 |
\begin{enumerate} |
| 678 |
\item<3-| alert@3>[0.] A zeroth point, shown at the very end. |
| 679 |
\item<1-| alert@1> The first and main point. |
| 680 |
\item<2-| alert@2> The second point. |
| 681 |
\end{enumerate} |
| 682 |
\end{frame} |
| 683 |
\end{verbatim} |
| 684 |
|
| 685 |
\subsection{Environments with overlay specifications} |
| 686 |
|
| 687 |
\DescribeEnv{onlyenv} |
| 688 |
\DescribeEnv{invisibleenv} |
| 689 |
\DescribeEnv{uncoverenv} |
| 690 |
\DescribeEnv{visibleenv} |
| 691 |
For each of the basic commands \cs{only}, \cs{visible}, \cs{uncover} and |
| 692 |
\cs{invisible} there exists \enquote{environment versions} \env{onlyenv}, |
| 693 |
\env{visibleenv}, \env{uncoverenv} and \env{invisibleenv}. Except for |
| 694 |
\env{onlyenv}, these environments do the same as the commands. |
| 695 |
|
| 696 |
For the \env{onlyenv} environment, the contents of the environment is inserted |
| 697 |
into the text only on the specified slides. The difference to \cs{only} is, |
| 698 |
that the text is actually typeset inside a box that is then thrown away, |
| 699 |
whereas \cs{only} immediately throws away its contents. If the text is not |
| 700 |
\enquote{typesettable}, the \env{onlyenv} may produce an error where \cs{only} |
| 701 |
would not. |
| 702 |
\begin{verbatim} |
| 703 |
\begin{frame} |
| 704 |
This line is always shown. |
| 705 |
\begin{onlyenv}<2> |
| 706 |
This line is inserted on slide~2. |
| 707 |
\end{onlyenv} |
| 708 |
\end{frame} |
| 709 |
\end{verbatim} |
| 710 |
|
| 711 |
\subsection{Dynamically changing text or images} |
| 712 |
|
| 713 |
You may sometimes wish to have some part of a frame change dynamically from |
| 714 |
slide to slide. On each slide of the frame, something different should be shown |
| 715 |
inside this area. You could achieve the effect of dynamically changing text by |
| 716 |
giving a list of \cs{only} commands like this: |
| 717 |
\begin{verbatim} |
| 718 |
\only<1>{Initial text.} |
| 719 |
\only<2>{Replaced by this on second slide.} |
| 720 |
\only<3>{Replaced again by this on third slide.} |
| 721 |
\end{verbatim} |
| 722 |
|
| 723 |
The trouble with this approach is that it may lead to slight, but annoying |
| 724 |
differences in the heights of the lines, which may cause the whole frame to |
| 725 |
\enquote{wobble} from slide to slide. This problem becomes much more severe if |
| 726 |
the replacement text is several lines long. |
| 727 |
|
| 728 |
To solve this problem, you can use two environments: \env{overlayarea} and |
| 729 |
\env{overprint}. The first is more flexible, but less user-friendly. |
| 730 |
|
| 731 |
\DescribeEnv{overlayarea} |
| 732 |
\begin{syntax} |
| 733 |
\cs{begin}\{overlayarea\}\marg{area width}\marg{area height} |
| 734 |
\end{syntax} |
| 735 |
Everything within the environment will be placed in a rectangular area of the |
| 736 |
specified size. The area will have the same size on all slides of a frame, |
| 737 |
regardless of its actual contents. |
| 738 |
\begin{verbatim} |
| 739 |
\begin{overlayarea}{\textwidth}{3cm} |
| 740 |
\only<1>{Some text for the first slide.\\Possibly several lines long.} |
| 741 |
\only<2>{Replacement on the second slide.} |
| 742 |
\end{overlayarea} |
| 743 |
\end{verbatim} |
| 744 |
|
| 745 |
\DescribeEnv{overprint} |
| 746 |
\begin{syntax} |
| 747 |
\cs{begin}\{overprint\}\oarg{area width} |
| 748 |
\end{syntax} |
| 749 |
The \meta{area width} defaults to the text width. Inside the environment, use |
| 750 |
\cs{only} or \env{onlyenv} to specify different things that should be shown for |
| 751 |
this environment on different slides. Everything within the environment will be |
| 752 |
placed in a rectangular area of the specified width. The height and depth of |
| 753 |
the area are chosen large enough to accommodate the largest contents of the |
| 754 |
area. Two compilations will be needed to allow \LaTeX{} to track the tallest |
| 755 |
version of the frame contents. |
| 756 |
\begin{verbatim} |
| 757 |
\begin{overprint} |
| 758 |
\only<1|handout:1>{% |
| 759 |
Some text for the first slide.\\ |
| 760 |
Possibly several lines long. |
| 761 |
}% |
| 762 |
\only<2|handout:0>{% |
| 763 |
Replacement on the second slide. Suppressed for handout. |
| 764 |
}% |
| 765 |
\end{overprint} |
| 766 |
Following text |
| 767 |
\end{verbatim} |
| 768 |
|
| 769 |
A similar need for dynamical changes arises when you have, say, a series of |
| 770 |
pictures named \file{first}, \file{second}, and \file{third} that show |
| 771 |
different stages of some process. To make a frame that shows these pictures on |
| 772 |
different slides, the following code might be used: |
| 773 |
\begin{verbatim} |
| 774 |
\begin{frame} |
| 775 |
\frametitle{The Three Process Stages} |
| 776 |
|
| 777 |
\includegraphics<1>{first} |
| 778 |
\includegraphics<2>{second} |
| 779 |
\includegraphics<3>{third} |
| 780 |
\end{frame} |
| 781 |
\end{verbatim} |
| 782 |
|
| 783 |
\subsection{Advanced overlay specifications} |
| 784 |
|
| 785 |
\subsubsection{Mode specifications} |
| 786 |
|
| 787 |
This section is only important if you use the mode mechanism to create |
| 788 |
different versions of your presentation. If you are not familiar with modes, |
| 789 |
please skip this section or read Section~\ref{sec:modes} first. |
| 790 |
|
| 791 |
In certain cases you may wish to have different overlay specifications to apply |
| 792 |
to a command in different modes. For example, you might wish a certain text to |
| 793 |
appear only from the third slide on during your presentation, but in a handout |
| 794 |
for the audience there should be no third slide and the text should appear |
| 795 |
already on the second slide. In this case you could write |
| 796 |
\begin{verbatim} |
| 797 |
\only<3| handout:2>{Some text} |
| 798 |
\end{verbatim} |
| 799 |
|
| 800 |
The vertical bar separates the two different specifications |3| and |
| 801 |
|handout:2|. By writing a mode name before a colon, you specify that the |
| 802 |
following specification only applies to that mode. If no mode is given, as in |
| 803 |
|3|, the mode |projector| is automatically added. For this reason, if you write |
| 804 |
|\only<3>{Text}| and you are in |handout| mode, the text will be shown on all |
| 805 |
slides since there is no restriction specified for handouts and since the |3| |
| 806 |
is the same as |projector:3|. |
| 807 |
|
| 808 |
It is also possible to give an overlay specification that contains only a mode |
| 809 |
name (or several, separated by vertical bars): |
| 810 |
\begin{verbatim} |
| 811 |
\only<handout>{This text is shown only in handout mode.} |
| 812 |
\end{verbatim} |
| 813 |
|
| 814 |
An overlay specification that does not contain any slide numbers is called a |
| 815 |
(pure) \emph{mode specification}. If a mode specification is given, all modes |
| 816 |
that are not mentioned are automatically suppressed. Thus |<projector:1->| |
| 817 |
means \enquote{on all slides in |projector| mode and also on all slides in all |
| 818 |
other modes, since nothing special is specified for them}, whereas |
| 819 |
|<projector>| means \enquote{on all slides in |projector| mode and not on any |
| 820 |
other slide}. |
| 821 |
|
| 822 |
You can also mix pure mode specifications and overlay specifications, although |
| 823 |
this can get confusing: |
| 824 |
\begin{verbatim} |
| 825 |
\only<article| projector:1>{Riddle} |
| 826 |
\end{verbatim} |
| 827 |
|
| 828 |
This will cause the text |Riddle| to be inserted in |article| mode and on the |
| 829 |
first slide of a frame in |projector| mode, but not at all in |handout| mode. |
| 830 |
|
| 831 |
\subsubsection{Action specifications% |
| 832 |
\label{sec:action-spec}} |
| 833 |
|
| 834 |
This section also introduces a rather advanced concept. You may also wish to |
| 835 |
skip it on first reading. |
| 836 |
|
| 837 |
Some overlay specification-aware commands can handle not only normal overlay |
| 838 |
specifications, but also a so called \emph{action spec}. In an action |
| 839 |
specification, the list of slide numbers and ranges is prefixed by |
| 840 |
\meta{action}|@|, where \meta{action} is the name of a certain action to be |
| 841 |
taken on the specified slides: |
| 842 |
\begin{verbatim} |
| 843 |
\item<3-|alert@3> Shown from slide~3 on, alerted on slide~3. |
| 844 |
\end{verbatim} |
| 845 |
|
| 846 |
In the above example, the \cs{item} command, which allows actions to be |
| 847 |
specified, will uncover the item text from slide three on and it will, |
| 848 |
additionally, alert this item exactly on slide~3. |
| 849 |
|
| 850 |
Not all commands can take an action specification. Currently, only \cs{item}, |
| 851 |
\cs{action}, the environment \env{actionenv}, and the block environments (like |
| 852 |
\env{block}) handle them. |
| 853 |
|
| 854 |
By default, the following actions are available: |
| 855 |
\begin{itemize} |
| 856 |
\item |alert| alters the item or block. |
| 857 |
\item |uncover| uncovers the item or block (this is the default, if no action |
| 858 |
is specified). |
| 859 |
\item |only| causes the whole item or block to be inserted only on the |
| 860 |
specified slides. |
| 861 |
\item |visible| causes the text to become visible only on the specified |
| 862 |
slides (the difference between |uncover| and |visible| is the same as |
| 863 |
between \cs{uncover} and \cs{visible}). |
| 864 |
\item |invisible| causes the text to become invisible on the specified |
| 865 |
slides. |
| 866 |
\end{itemize} |
| 867 |
|
| 868 |
The whole action mechanism is based on the following environment: |
| 869 |
\DescribeEnv{actionenv} |
| 870 |
\begin{syntax} |
| 871 |
\cs{begin}\{actionenv\}\sarg{action spec} |
| 872 |
\end{syntax} |
| 873 |
This environment extracts all actions from the \meta{action spec} for the |
| 874 |
current mode. For each action of the form \meta{action}|@|\meta{slide numbers}, |
| 875 |
it inserts the equivalent internal code to: |
| 876 |
|\begin{|\meta{action}|env}<|\meta{slide number}|>| at the beginning of the |
| 877 |
environment and the text |\end{|\meta{action}|env}| at the end. An |
| 878 |
\meta{overlay spec} without an action is promoted to |uncover@|\meta{overlay |
| 879 |
spec}. |
| 880 |
\begin{verbatim} |
| 881 |
\begin{frame} |
| 882 |
\begin{actionenv}<2-|alert@3-4,6> |
| 883 |
This text is shown the same way as the text below. |
| 884 |
\end{actionenv} |
| 885 |
|
| 886 |
\begin{uncoverenv}<2-> |
| 887 |
\begin{alertenv}<3-4,6> |
| 888 |
This text is shown the same way as the text above. |
| 889 |
\end{alertenv} |
| 890 |
\end{uncoverenv} |
| 891 |
\end{frame} |
| 892 |
\end{verbatim} |
| 893 |
|
| 894 |
\DescribeMacro{\action} |
| 895 |
\begin{syntax} |
| 896 |
\cs{action}\sarg{action spec}\marg{text} |
| 897 |
\end{syntax} |
| 898 |
This has the same effect as putting \meta{text} in an \env{actionenv}. |
| 899 |
|
| 900 |
Note that the syntax for action specifications in \cls{ltx-talk} is currently |
| 901 |
more tightly defined than that for \cls{beamer}. Only a single action is |
| 902 |
allowed, and this must come \emph{after} any overlay or mode part. |
| 903 |
|
| 904 |
\subsubsection{Incremental specifications% |
| 905 |
\label{sec:incremental}} |
| 906 |
|
| 907 |
This section is mostly important for people who have already used overlay |
| 908 |
specifications a lot and have grown tired of writing things like |<1->|, |
| 909 |
|<2->|, |<3->|, and so on again and again. You should skip this section on |
| 910 |
first reading. |
| 911 |
|
| 912 |
Often you want to have overlay specifications that follow a pattern similar to |
| 913 |
the following: |
| 914 |
\begin{verbatim} |
| 915 |
\begin{itemize} |
| 916 |
\item<1-> Apple |
| 917 |
\item<2-> Peach |
| 918 |
\item<3-> Plum |
| 919 |
\item<4-> Orange |
| 920 |
\end{itemize} |
| 921 |
\end{verbatim} |
| 922 |
|
| 923 |
The problem starts if you decide to insert a new fruit, say, at the beginning. |
| 924 |
In this case, you would have to adjust all of the overlay specifications. Also, |
| 925 |
if you add a \cs{pause} command before the |itemize|, you would also have to |
| 926 |
update the overlay specifications. |
| 927 |
|
| 928 |
The class offers a special syntax to make creating lists as the one above more |
| 929 |
convenient. You can replace it by the following list of \emph{incremental |
| 930 |
overlay specifications}: |
| 931 |
\begin{verbatim} |
| 932 |
\begin{itemize} |
| 933 |
\item<+-> Apple |
| 934 |
\item<+-> Peach |
| 935 |
\item<+-> Plum |
| 936 |
\item<+-> Orange |
| 937 |
\end{itemize} |
| 938 |
\end{verbatim} |
| 939 |
|
| 940 |
The effect of the |+| sign is the following. You can use it in any overlay |
| 941 |
specification at any point where you would usually use a number. If a |+| sign |
| 942 |
is encountered, it is replaced by one more than the current value of the |
| 943 |
\LaTeX{} counter |pauses|; that is $0$ at the beginning of the frame, so the |
| 944 |
first possible replacement value is~$1$. At the end of the overlay |
| 945 |
specification, the |pauses| counter is incremented. This only happens once even |
| 946 |
if the specification contains multiple |+| signs (they are replaced by the same |
| 947 |
number, which is also the new value of |pauses|). |
| 948 |
|
| 949 |
In the above example, the first specification is replaced by |<1->|. Then the |
| 950 |
second is replaced by |<2->| and so forth. We can now easily insert new |
| 951 |
entries, without having to change anything else. We might also write the |
| 952 |
following: |
| 953 |
\begin{verbatim} |
| 954 |
\begin{itemize} |
| 955 |
\item<+-| alert@+> Apple |
| 956 |
\item<+-| alert@+> Peach |
| 957 |
\item<+-| alert@+> Plum |
| 958 |
\item<+-| alert@+> Orange |
| 959 |
\end{itemize} |
| 960 |
\end{verbatim} |
| 961 |
|
| 962 |
This will alert the current item when it is uncovered. For example, the first |
| 963 |
specification \verb"<+-| alert@+>" is replaced by \verb"<1-| alert@1>", the |
| 964 |
second is replaced by \verb"<2-| alert@2>", and so on. Since the \env{itemize} |
| 965 |
environment also allows you to specify a default overlay specification, see the |
| 966 |
documentation of that environment, the above example can be written even more |
| 967 |
economically as follows: |
| 968 |
\begin{verbatim} |
| 969 |
\begin{itemize}[<+-| alert@+>] |
| 970 |
\item Apple |
| 971 |
\item Peach |
| 972 |
\item Plum |
| 973 |
\item Orange |
| 974 |
\end{itemize} |
| 975 |
\end{verbatim} |
| 976 |
|
| 977 |
The \cs{pause} command also updates the counter |pauses|. You can change this |
| 978 |
counter yourself using the normal \LaTeX{} commands \cs{setcounter} or |
| 979 |
\cs{addtocounter}. |
| 980 |
|
| 981 |
Any occurrence of a |+| sign may be followed by an \emph{offset} in round |
| 982 |
brackets. This offset will be added to the value of the |pauses| counter. Thus, |
| 983 |
if |pauses| is $2$, then |<+(1)->| expands to |<3->| and |<+(-1)-+>| expands to |
| 984 |
|<1-2>|. For example |
| 985 |
\begin{verbatim} |
| 986 |
\begin{itemize} |
| 987 |
\item<2-> Apple |
| 988 |
\item<3-> Peach |
| 989 |
\item<4-> Plum |
| 990 |
\item<5-> Orange |
| 991 |
\end{itemize} |
| 992 |
\end{verbatim} |
| 993 |
and |
| 994 |
\begin{verbatim} |
| 995 |
\begin{itemize}[<+(1)->] |
| 996 |
\item Apple |
| 997 |
\item Peach |
| 998 |
\item Plum |
| 999 |
\item Orange |
| 1000 |
\end{itemize} |
| 1001 |
\end{verbatim} |
| 1002 |
are equivalent. |
| 1003 |
|
| 1004 |
There is another special sign you can use in an overlay specification that |
| 1005 |
behaves similarly to the |+| sign: a dot. When you write |<.->|, a similar |
| 1006 |
process occurs to that for |<+->|, \emph{except} that the counter |pauses| is |
| 1007 |
used unchanged. Thus a dot, possibly followed by an offset, just expands to the |
| 1008 |
current value of the counter |pauses|, possibly offset. This dot notation can |
| 1009 |
be useful in case like the following: |
| 1010 |
\begin{verbatim} |
| 1011 |
\begin{itemize}[<+->] |
| 1012 |
\item Apple |
| 1013 |
\item<.-> Peach |
| 1014 |
\item Plum |
| 1015 |
\item Orange |
| 1016 |
\end{itemize} |
| 1017 |
\end{verbatim} |
| 1018 |
|
| 1019 |
In the example, the second item is shown at the same time as the first one |
| 1020 |
since it does not update the counter. |
| 1021 |
|
| 1022 |
In the following example, each time an item is uncovered, the specified text is |
| 1023 |
alerted. When the next item is uncovered, this altering ends. |
| 1024 |
\begin{verbatim} |
| 1025 |
\begin{itemize}[<+->] |
| 1026 |
\item This is \alert<.>{important}. |
| 1027 |
\item We want to \alert<.>{highlight} this and \alert<.>{this}. |
| 1028 |
\item What is the \alert<.>{matrix}? |
| 1029 |
\end{itemize} |
| 1030 |
\end{verbatim} |
| 1031 |
|
| 1032 |
The replacements of the |+| sign and the |.| sign are no less than zero. This |
| 1033 |
prevents errors when encountering large negative offsets, for example |
| 1034 |
|<+(-7)->| is converted to |<0->| rather than |<-6->|. |
| 1035 |
|
| 1036 |
\section{Structuring a presentation: the global structure} |
| 1037 |
|
| 1038 |
This section lists the commands that are used for structuring a presentation |
| 1039 |
\enquote{globally} using commands like \cs{section} or \cs{part}. These |
| 1040 |
commands are used to create a \emph{static} structure, meaning that the |
| 1041 |
resulting presentation is normally presented one slide after the other in the |
| 1042 |
order the slides occur. |
| 1043 |
|
| 1044 |
\subsection{Adding a title frame} |
| 1045 |
|
| 1046 |
You can use the standard \cs{maketitle} command to insert a title frame. As |
| 1047 |
standard, it will arrange the following elements on the title page: the |
| 1048 |
document title and subtitle, the authors' names, their affiliation, and the |
| 1049 |
date. |
| 1050 |
|
| 1051 |
\DescribeMacro{\maketitle} |
| 1052 |
\begin{syntax} |
| 1053 |
\cs{maketitle}\oarg{settings} |
| 1054 |
\end{syntax} |
| 1055 |
The \cs{maketitle} command may be inserted either inside or outside of a |
| 1056 |
\env{frame} environment; the result will be a full frame in either case. The |
| 1057 |
optional argument to the command is used to specify the following |
| 1058 |
\meta{settings} |
| 1059 |
\begin{itemize} |
| 1060 |
\item \opt{element-order} which determines which entries are printed |
| 1061 |
and the order they appear: a comma-list |
| 1062 |
\item \opt{frame-style} sets the frame style |
| 1063 |
\item \opt{horizontal-alignment} |
| 1064 |
\item \opt{vertical-alignment} |
| 1065 |
\end{itemize} |
| 1066 |
|
| 1067 |
\DescribeMacro{\author} |
| 1068 |
\DescribeMacro{\date} |
| 1069 |
\DescribeMacro{\institute} |
| 1070 |
\DescribeMacro{\subtitle} |
| 1071 |
\DescribeMacro{\title} |
| 1072 |
\begin{syntax} |
| 1073 |
\cs{author}\oarg{options}\marg{author} \\ |
| 1074 |
\cs{date}\oarg{options}\marg{date} \\ |
| 1075 |
\cs{institute}\oarg{options}\marg{institute} \\ |
| 1076 |
\cs{subtitle}\oarg{options}\marg{subtitle} \\ |
| 1077 |
\cs{title}\oarg{options}\marg{title} |
| 1078 |
\end{syntax} |
| 1079 |
As well as the standard \LaTeX{} elements \cs{author}, \cs{title} and |
| 1080 |
\cs{date}, \cls{ltx-talk} supports \cs{subtitle} and \cs{institute}. These |
| 1081 |
working the same way as the standard commands for providing metadata. The |
| 1082 |
\meta{options} may be used to set the \opt{short-} version of each item: if no |
| 1083 |
key name is given, the entire optional argument is used as the short version. |
| 1084 |
If multiple \meta{options} are given, they are interpreted as key-values. |
| 1085 |
|
| 1086 |
\section{Structuring a presentation: the local structure} |
| 1087 |
|
| 1088 |
\LaTeX{} provides different commands for structuring text \enquote{locally}, |
| 1089 |
for example, \foreign{via} the \env{itemize} environment. These environments |
| 1090 |
are also available in the \cls{ltx-talk} class, although their appearance has |
| 1091 |
been slightly changed. |
| 1092 |
|
| 1093 |
\subsection{Itemizations, enumerations and descriptions} |
| 1094 |
|
| 1095 |
\DescribeEnv{description} |
| 1096 |
\DescribeEnv{enumerate} |
| 1097 |
\DescribeEnv{itemize} |
| 1098 |
There are three predefined environments for creating lists, namely |
| 1099 |
\env{enumerate}, \env{itemize}, and \env{description}. The first two can be |
| 1100 |
nested to depth three, but nesting them to this depth creates totally |
| 1101 |
unreadable slides. |
| 1102 |
|
| 1103 |
\DescribeMacro{\item} |
| 1104 |
The \cs{item} command is overlay specification-aware. If an overlay |
| 1105 |
specification is provided, the item will only be shown on the specified slides, |
| 1106 |
see the following example. If the \cs{item} command is to take an optional |
| 1107 |
argument and an overlay specification, the overlay specification comes first as |
| 1108 |
in |\item<1>[Cat]|. |
| 1109 |
\begin{verbatim} |
| 1110 |
\begin{frame} |
| 1111 |
There are three important points: |
| 1112 |
\begin{enumerate} |
| 1113 |
\item<1-> A first one, |
| 1114 |
\item<2-> a second one with a bunch of subpoints, |
| 1115 |
\begin{itemize} |
| 1116 |
\item first subpoint. (Only shown from second slide on!). |
| 1117 |
\item<3-> second subpoint added on third slide. |
| 1118 |
\item<4-> third subpoint added on fourth slide. |
| 1119 |
\end{itemize} |
| 1120 |
\item<5-> and a third one. |
| 1121 |
\end{enumerate} |
| 1122 |
\end{frame} |
| 1123 |
\end{verbatim} |
| 1124 |
|
| 1125 |
The list environments have syntax |
| 1126 |
\begin{syntax} |
| 1127 |
\cs{begin}\marg{list type}\oarg{options} |
| 1128 |
\end{syntax} |
| 1129 |
|
| 1130 |
If the option \opt{action-spec} is given, in every occurrence of an \cs{item} |
| 1131 |
command that does not have an overlay specification attached to it, the |
| 1132 |
\meta{overlay specification} is used. By setting this specification to be an |
| 1133 |
incremental overlay specification, see Section~\ref{sec:incremental}, you |
| 1134 |
can implement, for example, a stepwise uncovering of the items. The |
| 1135 |
\meta{overlay specification} is inherited by sub-environments. |
| 1136 |
Naturally, in a sub-environment you can reset it locally by setting it to |
| 1137 |
|<1->| (the subitems will be shown on all slides) or |<.->| (the subitems will |
| 1138 |
be shown starting from the same slide as the parent item). |
| 1139 |
\begin{verbatim} |
| 1140 |
\begin{itemize}[action-spec = <+->] |
| 1141 |
\item This is shown from the first slide on. |
| 1142 |
\item This is shown from the second slide on. |
| 1143 |
\item This is shown from the third slide on. |
| 1144 |
\item<1-> This is shown from the first slide on. |
| 1145 |
\item This is shown from the fourth slide on. |
| 1146 |
\end{itemize} |
| 1147 |
\end{verbatim} |
| 1148 |
If you do not need to give any other options for the list environment, you may |
| 1149 |
use the shortened format |[<...>]|, which matches the \cls{beamer} syntax: |
| 1150 |
\begin{verbatim} |
| 1151 |
\begin{itemize}[<+->] |
| 1152 |
\item This is shown from the first slide on. |
| 1153 |
\item This is shown from the second slide on. |
| 1154 |
\item This is shown from the third slide on. |
| 1155 |
\item<1-> This is shown from the first slide on. |
| 1156 |
\item This is shown from the fourth slide on. |
| 1157 |
\end{itemize} |
| 1158 |
\end{verbatim} |
| 1159 |
|
| 1160 |
\subsection{Highlighting} |
| 1161 |
|
| 1162 |
\DescribeMacro{\alert} |
| 1163 |
\begin{syntax} |
| 1164 |
\cs{alert}\sarg{overlay spec}\marg{text} |
| 1165 |
\end{syntax} |
| 1166 |
The given \meta{text} is highlighted, typically by coloring the text red. If |
| 1167 |
the \meta{overlay spec} is present, the command only has an effect on the |
| 1168 |
specified slides. |
| 1169 |
\begin{verbatim} |
| 1170 |
This is \alert{important}. |
| 1171 |
\end{verbatim} |
| 1172 |
|
| 1173 |
\DescribeEnv{alertenv} |
| 1174 |
\begin{syntax} |
| 1175 |
\cs{begin}\{\texttt{alertenv}\}\sarg{overlay spec} |
| 1176 |
\end{syntax} |
| 1177 |
Environment version of the \cs{alert} command. |
| 1178 |
|
| 1179 |
\subsection{Block environments} |
| 1180 |
|
| 1181 |
\subsection{Figures and tables} |
| 1182 |
|
| 1183 |
You can use the standard \LaTeX{} environments \env{figure} and \env{table} |
| 1184 |
much the same way you would normally use them. However, any placement |
| 1185 |
specification will be ignored. Figures and tables are immediately inserted |
| 1186 |
where the environments start. If there are too many of them to fit on the |
| 1187 |
frame, you must manually split them among additional frames. |
| 1188 |
\begin{verbatim} |
| 1189 |
\begin{frame} |
| 1190 |
\begin{figure} |
| 1191 |
\includegraphics{myfigure} |
| 1192 |
\caption{This caption is placed below the figure.} |
| 1193 |
\end{figure} |
| 1194 |
|
| 1195 |
\begin{figure} |
| 1196 |
\caption{This caption is placed above the figure.} |
| 1197 |
\includegraphics{myotherfigure} |
| 1198 |
\end{figure} |
| 1199 |
\end{frame} |
| 1200 |
\end{verbatim} |
| 1201 |
|
| 1202 |
Note that at present the standard setting for \cls{ltx-talk} place the float |
| 1203 |
content left-aligned. This is similar to the \LaTeX{} base classes and |
| 1204 |
contrasts with \cls{beamer}. See the example directory for the supported method |
| 1205 |
to center content in floats. |
| 1206 |
|
| 1207 |
The floating environments, like other blocks, accept a first action argument. |
| 1208 |
This can be used to apply an overlay to the entire content, most obviously a |
| 1209 |
graphics and the associated caption. |
| 1210 |
|
| 1211 |
\subsection{Splitting a frame into multiple columns} |
| 1212 |
|
| 1213 |
The class offers several commands and environments for splitting (perhaps only |
| 1214 |
part of) a frame into multiple columns. These commands have nothing to do with |
| 1215 |
\LaTeX{}'s commands for creating columns. Columns are especially useful for |
| 1216 |
placing a graphic next to a description/explanation. |
| 1217 |
|
| 1218 |
The main environment for creating columns is called \env{columns}. Inside this |
| 1219 |
environment, you can place several \env{column} environments, each of which |
| 1220 |
creates a new column. |
| 1221 |
|
| 1222 |
\DescribeEnv{columns} |
| 1223 |
\begin{syntax} |
| 1224 |
\cs{begin}\{\texttt{columns}\}\sarg{action spec}\oarg{options} |
| 1225 |
\end{syntax} |
| 1226 |
A multi-column area. If the \meta{action spec} is present, the given actions |
| 1227 |
are taken on the specified slides, see Section~\ref{sec:action-spec}. The |
| 1228 |
following \meta{options} may be given: |
| 1229 |
\begin{itemize} |
| 1230 |
\item \opt{vertical-alignment} a choice of one of \opt{bottom}, \opt{center} |
| 1231 |
or \opt{top}; this causes the content of the columns to be aligned as |
| 1232 |
specified. The standard setting is \opt{center}. For compatibility with |
| 1233 |
\cls{beamer}, the short options \opt{b}, \opt{c} and \opt{t} are available. |
| 1234 |
\item \opt{width} will cause the columns to occupy \meta{width}: the standard |
| 1235 |
setting is \cs{textwidth}. |
| 1236 |
\end{itemize} |
| 1237 |
|
| 1238 |
\DescribeEnv{column} |
| 1239 |
\begin{syntax} |
| 1240 |
\cs{begin}\{\texttt{column}\}\sarg{action spec}\oarg{placement}\marg{column width} |
| 1241 |
\end{syntax} |
| 1242 |
To create a column, you can use the \env{column} environment. |
| 1243 |
\begin{verbatim} |
| 1244 |
\begin{columns} |
| 1245 |
\begin{column}{5cm} |
| 1246 |
Two\\lines. |
| 1247 |
\end{column} |
| 1248 |
\begin{column}{5cm} |
| 1249 |
One line (but aligned). |
| 1250 |
\end{column} |
| 1251 |
\end{columns} |
| 1252 |
\end{verbatim} |
| 1253 |
|
| 1254 |
Creates a single column of width \meta{column width}. If the \meta{action |
| 1255 |
specification} is present, the given actions are taken on the specified slides, |
| 1256 |
see Section~\ref{sec:action-spec}. The vertical placement of the enclosing |
| 1257 |
\env{columns} environment can be overruled by specifying a specific |
| 1258 |
\meta{placement}. |
| 1259 |
|
| 1260 |
\subsection{Footnotes} |
| 1261 |
|
| 1262 |
First a word of warning: Using footnotes is usually not a good idea. They |
| 1263 |
disrupt the flow of reading. |
| 1264 |
|
| 1265 |
\DescribeMacro{\footnote} |
| 1266 |
\begin{syntax} |
| 1267 |
\cs{footnote}\sarg{overlay spec}\oarg{mark-number}\marg{text} |
| 1268 |
\end{syntax} |
| 1269 |
Inserts a footnote into the current frame. Footnotes will always be shown on |
| 1270 |
the current frame; they will never be \enquote{moved} to other frames. As |
| 1271 |
usual, one can give a \meta{mark-number}, which will cause the footnote to use |
| 1272 |
that number. Footnotes are placed at the bottom of the content area of the |
| 1273 |
frame: unlike \cls{beamer}, this is true for footnotes in columns, |
| 1274 |
\foreign{etc.}: for \cls{beamer}, this behavior is similar to the |
| 1275 |
\opt{framefootnotes} class option or \cs{footnote[frame]}\marg{text}. |
| 1276 |
|
| 1277 |
If an \meta{overlay spec} is given, this causes the footnote \meta{text} to be |
| 1278 |
shown only on the specified slides. The footnote symbol in the text is shown on |
| 1279 |
all slides. |
| 1280 |
|
| 1281 |
\subsection{Repeating a frame} |
| 1282 |
|
| 1283 |
\DescribeMacro{\reuseframe} |
| 1284 |
\begin{syntax} |
| 1285 |
\cs{reuseframe}\sarg{overlay spec}\oarg{options}\marg{name} |
| 1286 |
\end{syntax} |
| 1287 |
Reuses a frame that was previously created using \env{frame} or \env{frame*} |
| 1288 |
environment with the option \opt{name =\meta{name}}. You can use this command |
| 1289 |
to \enquote{continue} a frame that has been interrupted by another frame. The |
| 1290 |
effect of this command is to insert the \env{frame} environment with the given |
| 1291 |
\meta{overlay specification} and \meta{options} with the original contents. |
| 1292 |
\begin{verbatim} |
| 1293 |
\begin{frame}<1-2>[name = myframe] |
| 1294 |
\begin{itemize} |
| 1295 |
\item<alert@1> First subject. |
| 1296 |
\item<alert@2> Second subject. |
| 1297 |
\item<alert@3> Third subject. |
| 1298 |
\end{itemize} |
| 1299 |
\end{frame} |
| 1300 |
|
| 1301 |
\begin{frame} |
| 1302 |
Some stuff explaining more on the second matter. |
| 1303 |
\end{frame} |
| 1304 |
|
| 1305 |
\reuseframe<3>{myframe} |
| 1306 |
\end{verbatim} |
| 1307 |
|
| 1308 |
The effect of the above code is to create four slides. In the first two, the |
| 1309 |
items 1 and~2 are highlighted. The third slide contains the text \enquote{Some |
| 1310 |
stuff explaining more on the second matter}. The fourth slide is identical to |
| 1311 |
the first two slides, except that the third point is now highlighted. |
| 1312 |
|
| 1313 |
\DescribeMacro{\againframe} |
| 1314 |
To allow conversion of \cls{beamer} slides, the alternative name |
| 1315 |
\cs{againframe} is available, and the use of the \opt{label} key in place of |
| 1316 |
\opt{name} is currently supported. |
| 1317 |
|
| 1318 |
\section{Creating alternative output formats% |
| 1319 |
\label{sec:modes}} |
| 1320 |
|
| 1321 |
\DescribeOption{mode} |
| 1322 |
The \cls{ltx-talk} class allows you to select different output formats from the |
| 1323 |
same source using the option \opt{mode}. This works with the overlay |
| 1324 |
specification to typeset some of the input selectively. |
| 1325 |
|
| 1326 |
\subsection{Creating handouts using the \opt{handout} mode} |
| 1327 |
|
| 1328 |
During a presentation it is very much desirable that the audience has a |
| 1329 |
\emph{handout} or even \emph{lecture notes} available to it. A handout allows |
| 1330 |
everyone in the audience to individually go back to things they have not |
| 1331 |
understood. |
| 1332 |
|
| 1333 |
The easiest way of creating a handout for your audience is to set the |
| 1334 |
\opt{mode} option set to \meta{handout}. This will cause the document to be |
| 1335 |
typeset in |handout| mode. It will look like a presentation, but it can be |
| 1336 |
printed or annotated more easily (the overlays are \enquote{flattened}). |
| 1337 |
|
| 1338 |
\section{Creating tagging PDF output} |
| 1339 |
|
| 1340 |
As detailed in the introduction (Section~\ref{sec:intro}), the \cls{ltx-talk} |
| 1341 |
class has been written from the start with tagging in mind. As such, where |
| 1342 |
possible, tagging is generated automatically. This works best with predictable |
| 1343 |
frame structure, for example the classical \enquote{uncover a list one item at |
| 1344 |
a time} approach. |
| 1345 |
|
| 1346 |
\subsection{Enabling tagging} |
| 1347 |
|
| 1348 |
Tagging can be enabled using the standard \LaTeX{} interface |
| 1349 |
\begin{verbatim} |
| 1350 |
\DocumentMetadata{tagging = on} |
| 1351 |
\end{verbatim} |
| 1352 |
as the first line of the source. |
| 1353 |
|
| 1354 |
In most cases, you will also need to state which standard(s) you are |
| 1355 |
targeting: validators in particular require that standards are explicitly |
| 1356 |
stated. For accessibility, the UA-2 standard is the most likely target, which |
| 1357 |
would mean using |
| 1358 |
\begin{verbatim} |
| 1359 |
\DocumentMetadata{tagging = on, pdfstandard = UA-2} |
| 1360 |
\end{verbatim} |
| 1361 |
as the first line of the source. |
| 1362 |
|
| 1363 |
\subsection{Current tagging approach} |
| 1364 |
|
| 1365 |
Whilst some aspects of tagging are straight-forward, there are specific |
| 1366 |
challenges in tagging presentations that mean that some parts of the approach |
| 1367 |
are experimental. In particular, the relationship between frame titles and |
| 1368 |
sectioning is still very much open. At present, frame titles are tagged as |
| 1369 |
sections at the level \texttt{H4}, \foreign{i.e.}, deliberately well below |
| 1370 |
sections and subsections. This may lead to warning from some accessibility |
| 1371 |
checkers. |
| 1372 |
|
| 1373 |
Feedback here is needed from users of assistive technology tools, to allow |
| 1374 |
adjustment to the standard tagging to best aid them. It is likely that in the |
| 1375 |
future, a richer range of options will be provided in this area. At present, if |
| 1376 |
you want to adjust the tagging you could use for example |
| 1377 |
\begin{verbatim} |
| 1378 |
\tagpdfsetup{role / new-tag = frametitle / H1} |
| 1379 |
\end{verbatim} |
| 1380 |
|
| 1381 |
\subsection{Controlling tagging} |
| 1382 |
|
| 1383 |
\DescribeOption{tag-slides} |
| 1384 |
To enable control tagging of slides, the frame option \opt{tag-slides} is |
| 1385 |
available. This can be used to list which slides in a frame are tagged: those |
| 1386 |
omitted are marked as artifacts. The setting should be a comma-list of slide |
| 1387 |
numbers, which an include \opt{n} as a marker to mean the last slide of the |
| 1388 |
frame. The standard setting is \opt{tag-slides = n}, meaning only the last |
| 1389 |
slide of the frame is tagged. You may use mode specifications in the |
| 1390 |
\opt{tag-slides} option, for example \opt{tag-slides = n\|handout:1,n} would |
| 1391 |
tag the last slide in the frame in \texttt{projector} mode and the first and |
| 1392 |
last for \texttt{handout} mode. |
| 1393 |
|
| 1394 |
\section{Changing the way things look} |
| 1395 |
|
| 1396 |
The design of frames in \cls{ltx-talk} is controlled by \emph{templates}, a |
| 1397 |
feature introduced in the \LaTeX{} kernel in the 2024-06-01 release. The |
| 1398 |
general concept is currently documented in \file{lttemplates.pdf} with some |
| 1399 |
coverage in \file{clsguide.pdf}. |
| 1400 |
|
| 1401 |
Several of the templates are illustrated in the examples, available along with |
| 1402 |
this document or at \url{https://www.texdev.net/ltx-talk/examples/} as live |
| 1403 |
demonstrations. |
| 1404 |
|
| 1405 |
\subsection{Font choice and loading} |
| 1406 |
|
| 1407 |
For \pdfTeX{} users, font choice will typically be determined by the available |
| 1408 |
\LaTeX{} font packages. For \LuaTeX{} users, the font choice will be partly |
| 1409 |
determined by the system fonts installed. To get consistent appearance for text |
| 1410 |
and math mode material, \LuaTeX{} users are strongly encouraged to choose a |
| 1411 |
font available with Unicode math support. A demonstration of the majority of |
| 1412 |
current options in this area is available at |
| 1413 |
\url{https://mathfonts.github.io/pdf-test-expression}, where you can also try |
| 1414 |
out the appearance of expressions you choose. |
| 1415 |
|
| 1416 |
Note that for Lua\TeX{}, the current font loading approach is using |
| 1417 |
\pkg{lua-unicode-math} with the font then loaded directly. For some use cases, |
| 1418 |
for example bold math usage, you may wish to adjust the font setup using a |
| 1419 |
\pkg{lua-unicode-math} font-specific package such as |
| 1420 |
\begin{verbatim} |
| 1421 |
\usepackage{lum-newcomputermodernsans} |
| 1422 |
\end{verbatim} |
| 1423 |
This area is very experimental and users may need to manually adjust loading if |
| 1424 |
they have specific font requirements. |
| 1425 |
|
| 1426 |
\subsection{Template \texttt{floatenv}} |
| 1427 |
|
| 1428 |
This template is used to create environments which map to the floats in a |
| 1429 |
starndard \LaTeX{} document. Note that they do \emph{not} float in an |
| 1430 |
\cls{ltx-talk} document. The template takes two arguments: options to apply to |
| 1431 |
an individual environment, and the type of \enquote{float}. The standard |
| 1432 |
template is \texttt{talk}, which recognizes the keys |
| 1433 |
\begin{itemize} |
| 1434 |
\item \opt{float-placement} Ignored at present |
| 1435 |
\item \opt{horizontal-alignment} Takes a choice of \opt{left}, \opt{center} |
| 1436 |
or \opt{right} |
| 1437 |
\end{itemize} |
| 1438 |
|
| 1439 |
\subsection{Template \texttt{footer}} |
| 1440 |
|
| 1441 |
This template is used to populate the footer area of the slide: this takes no |
| 1442 |
arguments. The standard template is \texttt{talk}, which recognizes the keys |
| 1443 |
\begin{itemize} |
| 1444 |
\item \opt{background-color} The color of the background of the entire footer |
| 1445 |
area |
| 1446 |
\item \opt{color} The color of the text in the footer area |
| 1447 |
\item \opt{element-order} A comma-separated list of metadata elements to |
| 1448 |
print: this can include the \texttt{framenumber}. Where available, |
| 1449 |
\enquote{short} versions of the metadata items are printed. |
| 1450 |
\item \opt{font} Font for printing elements |
| 1451 |
\item \opt{left-hspace} Margin on left of footer |
| 1452 |
\item \opt{right-hspace} Margin on right of footer |
| 1453 |
\item \opt{separator} Tokens inserted between elements. |
| 1454 |
\end{itemize} |
| 1455 |
|
| 1456 |
The current list of supported metadata entries is |
| 1457 |
\begin{itemize} |
| 1458 |
\item \texttt{author} |
| 1459 |
\item \texttt{date} |
| 1460 |
\item \texttt{framenumber} |
| 1461 |
\item \texttt{institute} |
| 1462 |
\item \texttt{subtitle} |
| 1463 |
\item \texttt{title} |
| 1464 |
\item \texttt{totalframes} |
| 1465 |
\end{itemize} |
| 1466 |
|
| 1467 |
Two instances of this template are pre-defined: \texttt{std} and |
| 1468 |
\texttt{wallpaper}. The \texttt{wallpaper} version omits any elements, meaning |
| 1469 |
that it only applies a colored background to the footer. |
| 1470 |
|
| 1471 |
\subsection{Template \texttt{header}} |
| 1472 |
|
| 1473 |
This template is used to populate the header area of the slide: this takes no |
| 1474 |
arguments. The standard template is \texttt{talk}, which recognizes the keys |
| 1475 |
\begin{itemize} |
| 1476 |
\item \opt{background-color} The color of the background of the entire header |
| 1477 |
area |
| 1478 |
\item \opt{color} The color of the text in the header area |
| 1479 |
\item \opt{font} Font for printing elements |
| 1480 |
\item \opt{height} The overall height of the header background area |
| 1481 |
\item \opt{left-hspace} Margin on left of header |
| 1482 |
\item \opt{print-frame-title} A boolean to turn title printing on and off |
| 1483 |
\item \opt{right-hspace} Margin on right of header |
| 1484 |
\end{itemize} |
| 1485 |
|
| 1486 |
Two instances of this template are pre-defined: \texttt{std} and |
| 1487 |
\texttt{wallpaper}. The \texttt{wallpaper} version sets \opt{print-frame-title} |
| 1488 |
to \opt{false}, and thus only adds the background color to the header. |
| 1489 |
|
| 1490 |
\section{Guidelines for creating presentations} |
| 1491 |
|
| 1492 |
In this section we sketch the guidelines that we try to stick to when we create |
| 1493 |
presentations. These guidelines either arise out of experience, out of common |
| 1494 |
sense, or out of recommendations by other people or books. These rules are |
| 1495 |
certainly not intended as commandments that, if not followed, will result in |
| 1496 |
catastrophe. The central rule of typography also applies to creating |
| 1497 |
presentations: \emph{Every rule can be broken, but no rule may be ignored.} |
| 1498 |
|
| 1499 |
\subsection{Structuring a presentation} |
| 1500 |
|
| 1501 |
\subsubsection{Know the time constraints} |
| 1502 |
|
| 1503 |
When you start to create a presentation, the very first thing you should worry |
| 1504 |
about is the amount of time you have for your presentation. Depending on the |
| 1505 |
occasion, this can be anything between 2~minutes and two hours. |
| 1506 |
\begin{itemize} |
| 1507 |
\item A simple rule for the number of frames is that you should have at most |
| 1508 |
one frame per minute. |
| 1509 |
\item In most situations, you will have less time for your presentation than |
| 1510 |
you would like. |
| 1511 |
\item \emph{Do not try to squeeze more into a presentation than time allows |
| 1512 |
for.} No matter how important some detail seems to you, it is better to |
| 1513 |
leave it out, but get the main message across, than getting neither the |
| 1514 |
main message nor the detail across. |
| 1515 |
\end{itemize} |
| 1516 |
|
| 1517 |
In many situations, a quick appraisal of how much time you have will show that |
| 1518 |
you won't be able to mention certain details. Knowing this can save you hours |
| 1519 |
of work on preparing slides that you would have to remove later anyway. |
| 1520 |
|
| 1521 |
\subsubsection{Global structure} |
| 1522 |
|
| 1523 |
To create the \enquote{global structure} of a presentation, with the time |
| 1524 |
constraints in mind, proceed as follows: |
| 1525 |
\begin{itemize} |
| 1526 |
\item Make a mental inventory of the things you can reasonably talk about |
| 1527 |
within the time available. |
| 1528 |
\item Categorize the inventory into sections and subsections. |
| 1529 |
\item For very long talks (like a 90~minute lecture), you might also divide |
| 1530 |
your talk into independent parts (like a \enquote{review of the previous |
| 1531 |
lecture part} and a \enquote{main part}) using the \cs{part} command. Note |
| 1532 |
that each part has its own table of contents. % TODO |
| 1533 |
\item Do not feel afraid to change the structure later on as you work on the |
| 1534 |
talk. |
| 1535 |
\end{itemize} |
| 1536 |
|
| 1537 |
\paragraph{Parts, section, and subsections} |
| 1538 |
|
| 1539 |
\begin{itemize} |
| 1540 |
\item Do not use more than four sections and not less than two per part. |
| 1541 |
\end{itemize} |
| 1542 |
|
| 1543 |
Even four sections are usually too much, unless they follow a very easy pattern. |
| 1544 |
Five and more sections are simply too hard to remember for the audience. After |
| 1545 |
all, when you present the table of contents, the audience will not yet really be |
| 1546 |
able to grasp the importance and relevance of the different sections and will |
| 1547 |
most likely have forgotten them by the time you reach them. |
| 1548 |
\begin{itemize} |
| 1549 |
\item Ideally, a table of contents should be understandable by itself. In |
| 1550 |
particular, it should be comprehensible \emph{before} someone has heard |
| 1551 |
your talk. |
| 1552 |
\item Keep section and subsection titles self-explaining. |
| 1553 |
\item Both the sections and the subsections should follow a logical pattern. |
| 1554 |
\item Begin with an explanation of what your talk is all about. (Do not |
| 1555 |
assume that everyone knows this. The \emph{Ignorant Audience Law} states: |
| 1556 |
Someone important in the audience always knows less than you think |
| 1557 |
everyone should know, even if you take the Ignorant Audience Law into |
| 1558 |
account.) |
| 1559 |
\item Then explain what you or someone else has found out concerning the |
| 1560 |
subject matter. |
| 1561 |
\item Always conclude your talk with a summary that repeats the main message |
| 1562 |
of the talk in a short and simple way. People pay most attention at the |
| 1563 |
beginning and at the end of talks. The summary is your \enquote{second |
| 1564 |
chance} to get across a message. |
| 1565 |
\item You can also add an appendix part using the \cs{appendix} command. Put |
| 1566 |
everything into this part that you do not actually intend to talk about, |
| 1567 |
but that might come in handy when questions are asked. % TODO |
| 1568 |
\item Do not use subsubsections, they are evil. |
| 1569 |
\end{itemize} |
| 1570 |
|
| 1571 |
\paragraph{Giving an abstract} |
| 1572 |
|
| 1573 |
In papers, the abstract gives a short summary of the whole paper in about 100 |
| 1574 |
words. This summary is intend to help readers appraise whether they should |
| 1575 |
read the whole paper or not. |
| 1576 |
\begin{itemize} |
| 1577 |
\item Since your audience is unlikely to flee after the first slide, in a |
| 1578 |
presentation you usually do not need to present an abstract. |
| 1579 |
\item However, if you can give a nice, succinct statement of your talk, you |
| 1580 |
might wish to include an abstract. |
| 1581 |
\item If you include an abstract, be sure that it is \emph{not} some long |
| 1582 |
text but just a very short message. |
| 1583 |
\item \emph{Never, ever} reuse a paper abstract for a presentation. |
| 1584 |
\end{itemize} |
| 1585 |
|
| 1586 |
\paragraph{Numbered theorems and definitions} |
| 1587 |
|
| 1588 |
A common way of globally structuring (math) articles and books is to use |
| 1589 |
consecutively numbered definitions and theorems. Unfortunately, for |
| 1590 |
presentations the situation is a bit more complicated and we would like to |
| 1591 |
discourage using numbered theorems in presentations. The audience has no chance |
| 1592 |
of remembering these numbers. \emph{Never} say things like \enquote{now, by |
| 1593 |
Theorem~2.5 that I showed you earlier, we have \dots} It would be much better |
| 1594 |
to refer to, say, Kummer's Theorem instead of Theorem~2.5. If Theorem~2.5 is |
| 1595 |
some obscure theorem that does not have its own name (unlike Kummer's Theorem |
| 1596 |
or Main Theorem or Second Main Theorem or Key Lemma), then the audience will |
| 1597 |
have forgotten about it anyway by the time you refer to it again. |
| 1598 |
|
| 1599 |
In our opinion, the only situation in which numbered theorems make sense in a |
| 1600 |
presentation is in a lecture, in which the students can read lecture notes in |
| 1601 |
parallel to the lecture where the theorems are numbered in exactly the same |
| 1602 |
way. |
| 1603 |
|
| 1604 |
If you do number theorems and definitions, number everything consecutively. |
| 1605 |
Thus if there are one theorem, one lemma, and one definition, you would have |
| 1606 |
Theorem~1, Lemma~2, and Definition~3. Some people prefer all three to be |
| 1607 |
numbered~1. We would \emph{strongly} like to discourage this. The problem is |
| 1608 |
that this makes it virtually impossible to find anything since Theorem~2 might |
| 1609 |
come after Definition~10 or the other way round. Papers and, worse, books that |
| 1610 |
have a Theorem~1 and a Definition~1 are a pain. |
| 1611 |
\begin{itemize} |
| 1612 |
\item Do not inflict pain on other people. |
| 1613 |
\end{itemize} |
| 1614 |
|
| 1615 |
\paragraph{Bibliographies} |
| 1616 |
|
| 1617 |
You may also wish to present a bibliography at the end of your talk, so that |
| 1618 |
people can see what kind of \enquote{further reading} is possible. When adding |
| 1619 |
a bibliography to a presentation, keep the following in mind: |
| 1620 |
\begin{itemize} |
| 1621 |
\item It is a bad idea to present a long bibliography in a presentation. |
| 1622 |
Present only very few references. (Naturally, this applies only to the talk |
| 1623 |
itself, not to a possible handout.) |
| 1624 |
\item If you present more references than fit on a single slide you can be |
| 1625 |
almost sure that none of them will be remembered. |
| 1626 |
\item Present references only if they are intended as \enquote{further |
| 1627 |
reading.} Do not present a list of all things you used like in a paper. |
| 1628 |
\item You should not present a long list of all your other great papers |
| 1629 |
\emph{except} if you are giving an application talk. |
| 1630 |
\item Using the \cs{cite} commands can be confusing since the audience has |
| 1631 |
little chance of remembering the citations. If you cite the references, |
| 1632 |
always cite them with full author name and year like \enquote{[Nobacon, |
| 1633 |
2003]} instead of something like \enquote{[2,\,4]} or |
| 1634 |
\enquote{[Nob01,\,ND02]}. |
| 1635 |
\item If you want to be modest, you can abbreviate your name when citing |
| 1636 |
yourself as in \enquote{[Nickelsen and N., 2003]} or |
| 1637 |
\enquote{[Nickelsen and N, 2003]}. However, this can be confusing for the |
| 1638 |
audience since it is often not immediately clear who exactly \enquote{N.} |
| 1639 |
might be. We recommend using the full name. |
| 1640 |
\end{itemize} |
| 1641 |
|
| 1642 |
\subsubsection{Frame structure} |
| 1643 |
|
| 1644 |
Just like your whole presentation, each frame should also be structured. A |
| 1645 |
frame that is solely filled with some long text is very hard to follow. It is |
| 1646 |
your job to structure the contents of each frame such that, ideally, the |
| 1647 |
audience immediately sees which information is important, which information is |
| 1648 |
just a detail, how the presented information is related, and so on. |
| 1649 |
|
| 1650 |
\paragraph{The frame title} |
| 1651 |
|
| 1652 |
\begin{itemize} |
| 1653 |
\item Put a title on each frame. The title explains the contents of the frame |
| 1654 |
to people who did not follow all details on the slide. |
| 1655 |
\item The title should really \emph{explain} things, not just give a cryptic |
| 1656 |
summary that cannot be understood unless one has understood the whole |
| 1657 |
slide. For example, a title like \enquote{The Poset} will have everyone |
| 1658 |
puzzled what this slide might be about. Titles like \enquote{Review of the |
| 1659 |
Definition of Partially Ordered Sets (Posets)} or \enquote{A Partial |
| 1660 |
Ordering on the Columns of the Genotype Matrix} are \emph{much} more |
| 1661 |
informative. |
| 1662 |
\item Ideally, titles on consecutive frames should \enquote{tell a story} |
| 1663 |
all by themselves. |
| 1664 |
\item In English, you should \emph{either} \emph{always} capitalize all words |
| 1665 |
in a frame title except for words like \enquote{a} or \enquote{the} (as in |
| 1666 |
a title), \emph{or} you \emph{always} use the normal lowercase letters. Do |
| 1667 |
\emph{not} mix this; stick to one rule. The same is true for block titles. |
| 1668 |
For example, do not use titles like \enquote{A short Review of Turing |
| 1669 |
machines.} Either use \enquote{A Short Review of Turing Machines.} or |
| 1670 |
\enquote{A short review of Turing machines.} (Turing is still spelled with |
| 1671 |
a capital letter since it is a proper name). |
| 1672 |
\item In English, the title of the whole document should be capitalized, |
| 1673 |
regardless of whether you capitalize anything else. |
| 1674 |
\item In German and other languages that have lots of capitalized words, |
| 1675 |
always use the correct upper-/lowercase letters. Never capitalize anything |
| 1676 |
in addition to what is usually capitalized. |
| 1677 |
\end{itemize} |
| 1678 |
|
| 1679 |
\paragraph{How much can I put on a frame?} |
| 1680 |
|
| 1681 |
\begin{itemize} |
| 1682 |
\item A frame with too little on it is better than a frame with too much on |
| 1683 |
it. A usual frame should have between 20 and 40 words. The maximum should be |
| 1684 |
at about 80 words. |
| 1685 |
\item Do not assume that everyone in the audience is an expert on the subject |
| 1686 |
matter. Even if the people listening to you should be experts, they may |
| 1687 |
last have heard about things you consider obvious several years ago. You |
| 1688 |
should always have the time for a quick reminder of what exactly a |
| 1689 |
\enquote{semantical complexity class} or an \enquote{$\omega$-complete |
| 1690 |
partial ordering} is. |
| 1691 |
\item Never put anything on a slide that you are not going to explain |
| 1692 |
during the talk, not even to impress anyone with how complicated your |
| 1693 |
subject matter really is. However, you may explain things that are not on a |
| 1694 |
slide. |
| 1695 |
\item Keep it simple. Typically, your audience will see a slide for less than |
| 1696 |
50~seconds. They will not have the time to puzzle through long sentences or |
| 1697 |
complicated formulas. |
| 1698 |
\end{itemize} |
| 1699 |
|
| 1700 |
\paragraph{Structuring a frame} |
| 1701 |
|
| 1702 |
\begin{itemize} |
| 1703 |
\item Use block environments like \env{block}, \env{theorem}, \env{proof}, |
| 1704 |
\env{example}, and so on. |
| 1705 |
\item Prefer \env{enumerate} and \env{itemize} environments over plain text. |
| 1706 |
\item Use \env{description} when you define several things. |
| 1707 |
\item Do not use more than two levels of \enquote{subitemizing.} |
| 1708 |
\item Do not create endless \env{itemize} or \env{enumerate} lists. |
| 1709 |
\item Do not uncover lists piecewise. |
| 1710 |
\item Emphasis is an important part of creating structure. Use \cs{alert} to |
| 1711 |
highlight important things. This can be a single word or a whole sentence. |
| 1712 |
However, do not overuse highlighting since this will negate the effect. |
| 1713 |
\item Use columns. |
| 1714 |
\item \emph{Never} use footnotes. They needlessly disrupt the flow of |
| 1715 |
reading. Either what is said in the footnote is important and should be put |
| 1716 |
in the normal text; or it is not important and should be omitted |
| 1717 |
(\emph{especially} in a presentation). |
| 1718 |
\item Use \env{quote} or \env{quotation} to typeset quoted text. |
| 1719 |
\item Do not use long bibliographies. |
| 1720 |
\end{itemize} |
| 1721 |
|
| 1722 |
\paragraph{Writing the text} |
| 1723 |
|
| 1724 |
\begin{itemize} |
| 1725 |
\item Use short sentences. |
| 1726 |
\item Prefer phrases over complete sentences. For example, instead of |
| 1727 |
\enquote{The figure on the left shows a Turing machine, the figure on the |
| 1728 |
right shows a finite automaton.}\ try \enquote{Left: A Turing machine. |
| 1729 |
Right: A finite automaton.} Even better, turn this into an itemize or a |
| 1730 |
description. |
| 1731 |
\item Punctuate correctly: no punctuation after phrases, complete punctuation |
| 1732 |
in and after complete sentences. |
| 1733 |
\item \emph{Never} use a smaller font size to \enquote{fit more on a frame.} |
| 1734 |
\item Do not hyphenate words. If absolutely necessary, hyphenate words |
| 1735 |
\enquote{by hand}, using the command~|\-|. |
| 1736 |
\item Break lines \enquote{by hand} using the command~|\\|. Do not rely on |
| 1737 |
automatic line breaking. Break where there is a logical pause. For |
| 1738 |
example, good breaks in \enquote{the tape alphabet is larger than the input |
| 1739 |
alphabet} are before \enquote{is} and before the second \enquote{the.} Bad |
| 1740 |
breaks are before either \enquote{alphabet} and before \enquote{larger.} |
| 1741 |
\item Text and numbers in figures should have the \emph{same} size as normal |
| 1742 |
text. Illegible numbers on axes usually ruin a chart and its message. |
| 1743 |
\end{itemize} |
| 1744 |
|
| 1745 |
\subsection{Using graphics} |
| 1746 |
|
| 1747 |
Graphics often convey concepts or ideas much more efficiently than text: A |
| 1748 |
picture can say more than a thousand words. (Although, sometimes a word can say |
| 1749 |
more than a thousand pictures.) |
| 1750 |
\begin{itemize} |
| 1751 |
\item Put (at least) one graphic on each slide, whenever possible. |
| 1752 |
Visualizations help an audience enormously. |
| 1753 |
\item Usually, place graphics to the left of the text. (Use the \env{columns} |
| 1754 |
environment.) In a left-to-right reading culture, we look at the left |
| 1755 |
first. |
| 1756 |
\item Graphics should have the same typographic parameters as the text: Use |
| 1757 |
the same fonts (at the same size) in graphics as in the main text. A small |
| 1758 |
dot in a graphic should have exactly the same size as a small dot in a |
| 1759 |
text. The line width should be the same as the stroke width used in |
| 1760 |
creating the glyphs of the font. For example, an \qty{11}{pt} non-bold |
| 1761 |
Computer Modern font has a stroke width of \qty{0.4}{pt}. |
| 1762 |
\item While bitmap graphics, like photos, can be much more colorful than the |
| 1763 |
rest of the text, vector graphics should follow the same \enquote{color |
| 1764 |
logic} as the main text (like black~= normal lines, red~= highlighted |
| 1765 |
parts, green~= examples, blue~= structure). |
| 1766 |
\item Like text, you should explain everything that is shown on a graphic. |
| 1767 |
Unexplained details make the audience puzzle whether this was something |
| 1768 |
important that they have missed. Be careful when importing graphics from a |
| 1769 |
paper or some other source. They usually have much more detail than you |
| 1770 |
will be able to explain and should be radically simplified. |
| 1771 |
\item Sometimes the complexity of a graphic is intentional and you are |
| 1772 |
willing to spend much time explaining the graphic in great detail. In this |
| 1773 |
case, you will often run into the problem that fine details of the graphic |
| 1774 |
are hard to discern for the audience. |
| 1775 |
\end{itemize} |
| 1776 |
|
| 1777 |
\subsection{Choosing appropriate colors} |
| 1778 |
|
| 1779 |
\begin{itemize} |
| 1780 |
\item Use colors sparsely. The prepared themes are already quite colorful |
| 1781 |
(blue~= structure, red~= alert, green~= example). If you add more colors |
| 1782 |
for things like code, math text, \foreign{etc}., you should have a \emph{very} |
| 1783 |
good reason. |
| 1784 |
\item Be careful when using bright colors on white background, |
| 1785 |
\emph{especially} when using green. What looks good on your monitor may look |
| 1786 |
bad during a presentation due to the different ways monitors, projectors, |
| 1787 |
and printers reproduce colors. Add lots of black to pure colors when you |
| 1788 |
use them on bright backgrounds. |
| 1789 |
\item Maximize contrast. Normal text should be black on white or at least |
| 1790 |
something very dark on something very bright. \emph{Never} do things like |
| 1791 |
\enquote{light green text on not-so-light green background.} |
| 1792 |
\item Background shadings decrease the legibility without increasing the |
| 1793 |
information content. Do not add a background shading just because it |
| 1794 |
\enquote{somehow looks nicer.} |
| 1795 |
\item Inverse video (bright text on dark background) can be a problem during |
| 1796 |
presentations in bright environments since only a small percentage of the |
| 1797 |
presentation area is light up by the projector. Inverse video is harder to |
| 1798 |
reproduce on printouts and on transparencies. |
| 1799 |
\end{itemize} |
| 1800 |
|
| 1801 |
\end{documentation} |
| 1802 |
|
| 1803 |
\PrintIndex |
| 1804 |
|
| 1805 |
\end{document} |