Debian Codegraph @

texmf-dist/doc/latex/overlays/overlays.tex

raw
1 \documentclass[a4paper]{ltxdoc}
2 \usepackage[breaklinks,hidelinks]{hyperref}
3 \usepackage{polyglossia}
4 \setdefaultlanguage{english}
5 \setlength{\leftmargini}{\parindent}
6 \frenchspacing
7 \sloppy
8
9 \begin{document}
10 \title{\textsf{overlays} -- incremental slides}
11 \author{Andreas Nolda}
12 \date{2021/02/23 (v.\,2.12)}
13 \maketitle
14
15 \noindent The \textsf{overlay} package allows to write presentations with
16 incremental slides. It does not presuppose any specific document class. Rather,
17 it is a lightweight alternative to full-fledged presentation classes like
18 \textsf{beamer}.
19
20 In the following, every single state of a incremental slide will be called an
21 \emph{overlay} of that slide.
22
23 \section{User interface}
24
25 \DescribeMacro{overlays}
26 \DescribeMacro{fragileoverlays}
27 For incremental slides, the following environments are provided:
28 \begin{quote}
29 |\begin{overlays}{|\meta{total overlay number}|}| \\
30 \meta{slide content} \\
31 |\end{overlays}|
32 \end{quote}
33 \begin{quote}
34 |\begin{fragileoverlays}{|\meta{total overlay number}|}| \\
35 \meta{slide content} \\
36 |\end{fragileoverlays}|
37 \end{quote}
38 The |fragileoverlays| environment should be used for incremental slides with
39 verbatim content.
40
41 Note that the slide content should fit on a single page.
42
43 \DescribeMacro{\alert}
44 \DescribeMacro{\visible}
45 \DescribeMacro{\only}
46 In the slide content, the following commands can be used in order
47 to specify the content of the overlays:
48 \begin{quote}
49 |\alert{|\meta{overlay specification}|}{|\meta{content}|}|
50 \end{quote}
51 \begin{quote}
52 |\visible{|\meta{overlay specification}|}{|\meta{content}|}|
53 \end{quote}
54 \begin{quote}
55 |\only{|\meta{overlay specification}|}{|\meta{content}|}|
56 \end{quote} Overlay specifications are either single numbers like |1|, sequences
57 of numbers like |1,4|, or ranges of numbers like |1-4| or |1-|.
58
59 The |\alert| command highlights its content on the specified overlays with the
60 |alert| color, which may be redefined by means of the |\definecolor| command.
61
62 The |\visible| command uncovers its content on the overlays which are specified
63 in the overlay specification. On unspecified overlays, the content still takes
64 up space, being rendered in the |background| color, which, by default, is white.
65
66 The content of the |\only| command is also uncovered on the overlays specified
67 in the overlay specification, but is absent from unspecified overlays and does
68 not take up space there.
69
70 \pagebreak
71 \DescribeMacro{\savecountersbetweenoverlays}
72 The |page| and |equation| counters are not incremented between overlays. Other
73 counters can be saved between overlays, too, by means of the following command:
74 \begin{quote}
75 |\savecountersbetweenoverlays{|\meta{counter name}|}|
76 \end{quote}
77 \DescribeMacro{\savebetweenoverlays}
78 The |\savebetweenoverlays| command is provided as a shortcut for backward
79 compatibility.
80
81 \hyphenation{enum-item}
82 \DescribeMacro{\saveseriesbetweenoverlays}
83 Series of first-level lists specified by the |series| and |resume| keys of the
84 \textsf{enumitem} package can be saved between overlays by means of the
85 following command:
86 \begin{quote}
87 |\saveseriesbetweenoverlays{|\meta{series name}|}|
88 \end{quote}
89 See below for known limitations regarding the series name.
90
91 The |\savecountersbetweenoverlays| and |\saveseriesbetweenoverlays| commands
92 are typically used in the preamble.
93
94 \DescribeMacro{\overlaysoff}
95 \DescribeMacro{\alertsoff}
96 Use the |\overlaysoff| command in the preamble in order to switch overlay
97 processing off, effectively typesetting only the last overlay of each
98 incremental slide. In addition, highlights in |alert| color can be switched off
99 by means of the |\alertsoff| command.
100
101 \section{Known limitations}
102
103 The |\alert|, |\visible|, and |\only| commands must not contain verbatim
104 commands or environments. They may be used in the content of the |alltt|
105 environment, though.
106
107 The |\saveseriesbetweenoverlays| command only supports first-level lists. In
108 addition, it requires that the series name matches the basename of the list
109 counter (i.e. the counter name without the final |i|). In the case of the
110 |enumerate| list, the series name thus should be |enum|; in the case of lists
111 cloned by means of the |\newlist| command, the series name should be identical
112 to the list name.
113
114 \section{Dependencies}
115
116 The \textsf{overlays} package requires the following packages: \textsf{xcolor},
117 \textsf{environ}, and \textsf{pgffor} (part of \textsf{pgf}).
118
119 The \textsf{overlays} package enables support for the \textsf{graphics} and
120 \textsf{graphicx} packages if one of them is loaded before the \textsf{overlays}
121 package.
122
123 \DescribeMacro{\psalert}
124 \DescribeMacro{\psvisible}
125 Similarly, the \textsf{overlays} package enables support for the
126 \textsf{pstricks} package if the latter is loaded before the former. In
127 particular, the commands |\psalert| and |\psvisible| are provided for
128 highlighting or uncovering lines only.
129
130 \section{Credits}
131
132 The code of the \textsf{overlays} package is inspired by Matthias Meister's
133 \textsf{present} package.
134
135 In addition, it uses an algorithm by Martin Scharrer for testing numbers in
136 numerical ranges (cf. \url{http://tex.stackexchange.com/q/19000}).
137
138 The code for saving counters between overlays as well as the code for overlays
139 with verbatim content is taken from the \textsf{texpower} package, which in turn
140 is based on Till Tantau's \textsf{beamer} package.
141 \end{document}