Changes

Jump to navigation Jump to search
30 bytes removed ,  22:17, 6 June 2020
m
minor adjustments, nothing new
== What are Overlays? ==__TOC__
Overlays are predefined snippets that you can stack on each other. In contrast to [[Layers|layers]], which regard whole pages, overlays mostly are only single pictures, words or the like.
== Defining ==
<texcode>
Better put your commands in braces.
== Using ==
You can use defined overlays everywhere, where there's a <tt>background</tt> option.
Another use for overlays is for adding a graphic to every page to indicate chapters (sometimes known as a [[Thumb index|thumb index]]).
== Overlays vs. Layers ==
Overlays and Layers are different mechanisms, which are powerful when combined.
=== Overlays ===
ConTeXt has an overlay environment that can be used in the text to stack the arguments on the same spot. In the example below, each new element is placed on top of the previous element.
\stoptext
</context>
 
The methods to set them because in the first case you set the content for each level which the argument in braces ({…}{…}) and in the second case you define them first with \defineoverlay and set the order in the background key.
=== Layers ===
With layers the content from each command can be positioned at a certain horizontal and vertical position. The following example creates a new layer and set three texts. The texts are placed in the page using the \flushlayer command.
When you look at the example you can see that haven't created a overlay for layer even though I said you need it to put the layer after the text. This isn’t necessary because when you create a new layer context does also create a overlay with the same name in which the layer is placed. The other question is how you can place overlays on the text/page when I told before overalls can only be placed on frame, this is possible because all page elements (textblock, header, footer and even the page and paper itself) are frames. Even though these elements are frames they don’t provide all the options from \framed because they are a special version with less functionality.
== See Also ==
* [[:Category:Command/Overlays]]
[[Category:Graphics]]

Navigation menu