Difference between revisions of "Overlays"

From Wiki
Jump to navigation Jump to search
m (revert an additional Command/ in Category)
(Better example, remove unneeded category)
Line 1: Line 1:
 
< [[Graphics]]
 
< [[Graphics]]
  
'''What are Overlays?'''
+
== What are Overlays? ==
  
Overlays are predefined snippets that you can stack on each other.
+
Overlays are predefined snippets that you can stack on each other. In contrast to [[layers]], which regard whole pages, overlays mostly are only single pictures, words or the like.
Opposite to [[Layers]] that regard whole pages, overlays mostly are only single pictures, words or the like.
 
  
'''Defining'''
+
== Defining ==
  
 
<texcode>
 
<texcode>
Line 14: Line 13:
 
Better put your commands in braces.
 
Better put your commands in braces.
  
'''Using'''
+
== Using ==
  
 
You can use defined overlays everywhere, where there's a <tt>background</tt> option.
 
You can use defined overlays everywhere, where there's a <tt>background</tt> option.
  
<texcode>
+
<context source=yes>
 +
\setupcolors[state=start]
 +
 
 
\defineoverlay[tea][{\green\ss\bf GREEN TEA}]
 
\defineoverlay[tea][{\green\ss\bf GREEN TEA}]
  
\framed[height=40pt, background=tea, align=middle]%
+
\framed[
{\em today\\for sale}
+
    background=tea,  
</texcode>
+
    align={middle,hilo}
 +
]{
 +
    \em today
 +
    \blank[2*big]
 +
    for sale
 +
}
 +
</context>
  
<context>
+
You can use this also with pictures. See also [[logos]].
\setupcolors[state=start]
 
\defineoverlay[tea][{\green\ss\bf GREEN TEA}]
 
  
\framed[height=40pt, background=tea, align=middle]%
+
Another use for overlays is for adding a graphic to every page to indicate chapters (sometimes known as a [[thumb index]]).
{\em today\\for sale}
 
</context>
 
  
You can use this also with pictures. See also [[Logos]].
+
== See Also ==
  
Another use for overlays is for adding a graphic to every page to indicate chapters (sometimes known as a [[Thumb_index|thumb index]]).
+
* [[:Category:Command/Overlays]]
  
 
[[Category:Graphics]]
 
[[Category:Graphics]]
[[Category:Overlays]]
 

Revision as of 12:51, 3 July 2012

< Graphics

What are Overlays?

Overlays are predefined snippets that you can stack on each other. In contrast to layers, which regard whole pages, overlays mostly are only single pictures, words or the like.

Defining

\defineoverlay[reference name][commands]

Better put your commands in braces.

Using

You can use defined overlays everywhere, where there's a background option.

\setupcolors[state=start]

\defineoverlay[tea][{\green\ss\bf GREEN TEA}]

\framed[
    background=tea, 
    align={middle,hilo}
]{
    \em today
    \blank[2*big]
    for sale
}

You can use this also with pictures. See also logos.

Another use for overlays is for adding a graphic to every page to indicate chapters (sometimes known as a thumb index).

See Also