29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

182<br />

meta:hash:linecolor=darkyellow]<br />

left \par \& \par right \eTD<br />

\bTD[background={meta:hash:horizontal,meta:hash:vertical},<br />

meta:hash:linecolor=darkred]<br />

horizontal \par \& \par vertical \eTD<br />

\eTR<br />

\eTABLE<br />

The long names are somewhat cumbersome, but in that way we can prevent name clashes. Also,<br />

since the METAPOST interface is english, the variables are also english.<br />

7.5 Symbol collections<br />

left<br />

&<br />

right<br />

horizontal<br />

&<br />

vertical<br />

Table 7.3 A double<br />

hashed table.<br />

In CONTEXT, a symbol can be defined without much coding. The advantage of using symbols is<br />

that you can redefine them depending on the situation. So,<br />

\definesymbol [yes] [\em Yes!]<br />

creates a symbol, that lets \symbol[yes] expand into Yes! Since nearly anything can be a symbol,<br />

we can also say:<br />

\definesymbol [yes] [\mathematics{\star}]<br />

or even the already defined symbol ⋆, by saying:<br />

\definesymbol [yes] [{\symbol[star]}]<br />

It may be clear that we can use a graphic as well:<br />

\def\metabuttonsymbol#1{\uniqueMPgraphic{meta:button}{type=#1}}<br />

\definesymbol[menu:left] [\metabuttonsymbol{101}]<br />

\definesymbol[menu:right] [\metabuttonsymbol{102}]<br />

\definesymbol[menu:list] [\metabuttonsymbol{103}]<br />

\definesymbol[menu:index] [\metabuttonsymbol{104}]<br />

\definesymbol[menu:person][\metabuttonsymbol{105}]<br />

\definesymbol[menu:stop] [\metabuttonsymbol{106}]<br />

\definesymbol[menu:info] [\metabuttonsymbol{107}]<br />

\definesymbol[menu:down] [\metabuttonsymbol{108}]<br />

\definesymbol[menu:up] [\metabuttonsymbol{109}]<br />

\definesymbol[menu:print] [\metabuttonsymbol{110}]<br />

Shapes, symbols and buttons Symbol collections

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

Saved successfully!

Ooh no, something went wrong!