29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.2 Overlay variables<br />

[offset=3pt,frameoffset=6pt,backgroundoffset=9pt,<br />

background=screen,backgroundscreen=.85]<br />

{Welcome in the hall of frame!}}<br />

Welcome in the hall of frame!<br />

Figure 4.2 The three offsets.<br />

The communication between TEX and embedded METAPOST graphics takes place by means of some<br />

macros.<br />

overlay status macro meaning<br />

\overlaywidth the width of the graphic, as calculated from the actual width and background<br />

offset<br />

\overlayheight the height of the graphic, as calculated from the actual height, depth and<br />

background offset<br />

\overlaydepth the depth of the graphic, if available<br />

\overlaycolor the background color, if given<br />

\overlaylinecolor the color of the frame<br />

\overlaylinewidth the width of the frame<br />

The dimensions of the overlay are determined by dimensions of the background, which normally<br />

is the natural size of a \framed. When a background offset is specified, it is added to<br />

overlayheight and overlaywidth.<br />

Colors can be converted by \MPcolor and in addition to the macros mentioned, you can use all<br />

macros that expand into a dimension or dimen register prefixed by the TEX primitive \the (this<br />

and other primitives are explained in “The TEXbook”, by Donald Knuth).<br />

4.3 Stacking overlays<br />

A background can be a gray scale (screen), a color (color), a previously defined overlay identifier,<br />

or any combination of these. The next assignments are therefore legal:<br />

\framed[background=color,backgroundcolor=red]{...}<br />

\framed[background=screen,backgroundscreen=.8]{...}<br />

\framed[background=circle]{...}<br />

\framed[background={color,cow},backgroundcolor=red]{...}<br />

\framed[background={color,cow,grid},backgroundcolor=red]{...}<br />

In the last three cases of course you have to define circle, cow and grid as overlay. These items<br />

are packed in a comma separated list, which is to be surrounded by {}.<br />

Overlay variables Enhancing the layout<br />

129

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!