Changes

Jump to navigation Jump to search
369 bytes removed ,  19:08, 18 August 2013
m
no edit summary
== Overlays vs. Layers ==
Overlays and Layers are to different mechanism mechanisms, which are powerful when you combine both but first you have to know what each of them doescombined.
=== Overlays ===
ConTeXt has a an overlay environment which cane that can be used in the text to stack the arguments on the same spot. When take a close look at In the example you can see below, each new element is placed on top of the previous element, when you remove the \strut in the argument you would also notice that each argument is placed horizontal and vertical centered.
<context source=yes>
</context>
After you do know now what overlays are I come to Without the real overlay mechanism.\strut argument each argument is horizontally and vertically centered:
Overlays are created with the <context source=yes>\defineoverlay command which takes a name for the overlay and its content. The overlays are then applied to a setupbodyfont[40pt] \framed command or the background to the page the textblock, header etc.starttext
In \startoverlay {\red m} {\green a} {\blue l}\stopoverlay \stoptext</context>   Overlays are created with the \defineoverlay command, which takes an overlay name and content. The overlays are then applied to a \framed command or the background to the page the textblock, header, and so forth. The next example I created shows two new overlays with the names (“behind” and “before” (the name itself doesn’t matter) , which I are activated in the frame with tha a background key.
<context source=yes>
</context>
When you look at the The arguments of the background key you can used two more names besides my own in addition to the “behind” and “before” overlays. The first name in the list is “color” , which is needed when you can to use the argument of using the backgroundcolor key which puts to put a color two in the whole entire frame's area of the frame. The second name is “foreground” is more interesting because with this you , which can place overlays *before* the content of the frame because “foreground” is the frame text itself.
The differences between the overlay environment at the begin and the overlay mechanism for \framed aren’t so big, only the are similar. 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 ===
When you have used With layers the content of each layer was always centered in the frame but with layers you can put the content from each command can be positioned at a certain horizontal and vertical position. In the The following example I created creates a new layer and set three texts for it which . The texts are afterwards placed in the page which using the \flushlayer command.
<context source=yes>
419

edits

Navigation menu