GNU TeXmacsUser manualReferenceAboutEnglish
Overlays

The standard “fold”, “unroll” and “switch” tags implement the most frequent kinds of traversal of a slideshow. However, there are cases in which more complex successions are needed.

Elimination of \(x\) from
\(\displaystyle x \sin y - 3 xy = \alpha\)
yields
\(\displaystyle x = \frac{\alpha}{\sin y - 3 y} .\)
Elimination of \({\color{red}{x}}\) from
\(\displaystyle {\color{red}{x}} \sin y - 3 {\color{red}{x}} y = \alpha\)
yields
\(\displaystyle {\color{red}{x}} = \frac{\alpha}{\sin y - 3 y} .\)

Figure 1. Example of highlighting a variable \(x\) when switching from one slide to a next one.

For instance, imagine that we are given a slide, and that we wish to highlight all occurrences of some variable \(x\) in red on the next slide (see figure ?). This could be achieved by using a switch tag: we just copy the whole slide both in the first and in the second branch of the switch, and next color all instances of \(x\) red in the second branch. However, this solution has the disadvantage that any a posteriori modification on the slide has to be made both in the first and in the second branch.

TeXmacs provides a so called “overlay” mechanism for this kind of more complex successions of slides. You may insert a pile of overlays using Insert\(\rightarrow\)Fold\(\rightarrow\)Overlays\(\rightarrow\)Standard. At the start, the pile contains a unique overlay, but new overlays can then be added using the standard keyboard shortcuts ⌃→ and ⌃← for structured insertion. When applied to overlays, the standard keys F10 and F11 for traversing the presentation have the effect of going up and down in the pile of overlays.

By default, all text which is typed by the user will be visible on all overlays. But, using the filters in the menu Insert\(\rightarrow\)Fold\(\rightarrow\)Overlay, it is also possible to create text which is only visible on specified overlays of the pile. There are four basic types of filters:

Visible from here on

Text that will be visible on this and all subsequent overlays.

Visible until here

Text that will be visible on this and all previous overlays.

Visible only here

Text that will be visible only on this overlay.

Visible except here

Text that will be visible on all but the current overlays.

In a similar way, TeXmacs provides tags for alternate views: depending on whether a certain predicate is met, we show the “main content” on certain overlays and the “alternate content” on the remaining overlays. We use the same four types of predicates:

Alternate from here on

The alternate text will be used on this and all subsequent overlays.

Alternate until here

The alternate text will be used on this and all previous overlays.

Alternate only here

The alternate text will only be used on this overlay.

Alternate except here

The alternate text will be used on all but the current overlays.

TeXmacs finally provides a means of customizing the way that “hidden” and “shown” content should be rendered: user determined coloring schemes can be used using the alter-colors tag which can be inserted from Insert\(\rightarrow\)Fold\(\rightarrow\)Overlay\(\rightarrow\)Specify color alternation. For instance, in order to achieve the effect mentioned in the example from Figure ?, you may specify a “black to red” color alternation, and then use a Visible from here on type of overlay.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".