Download MetaFun - Pragma ADE
Transcript
241
vsize := ypart urcorner p - ypart lrcorner p ;
q := p xscaled ((hsize-2offset)/hsize)
yscaled ((vsize-2offset)/vsize) ;
hsize := xpart lrcorner q - xpart llcorner q ;
vsize := ypart urcorner q - ypart lrcorner q ;
\stopuseMPgraphic
We adapt the text split code to use the reduced path instead of the original.
\startuseMPgraphic{text split}
t := (ulcorner q -- urcorner q) intersectionpoint q ;
b := (llcorner q -- lrcorner q) intersectionpoint q ;
l := q cutbefore t ; l := l cutafter b ;
r := q cutbefore b ; r := r cutafter t ;
\stopuseMPgraphic
In order to test what we have reached so far, we draw the original path, the left and right part of
the reduced path, and both the top and bottom point.
\startuseMPgraphic{text draw}
drawarrow p withpen pencircle
draw
t withpen pencircle
draw
b withpen pencircle
drawarrow l withpen pencircle
drawarrow r withpen pencircle
\stopuseMPgraphic
scaled
scaled
scaled
scaled
scaled
1pt
2pt
2pt
1pt
1pt
withcolor red ;
;
;
withcolor green ;
withcolor blue ;
Again we use \includeMPgraphic to combine the components into a graphic.
\startuseMPgraphic{text}
\includeMPgraphic{text path} \includeMPgraphic{text vars}
\includeMPgraphic{text move} \includeMPgraphic{text split}
\includeMPgraphic{text draw}
\stopuseMPgraphic
Then we use \useMPgraphic{text} to call up the picture.
Talking to TEX
Typesetting in METAPOST
Related documents
MetaFun - Personal Web pages at the Department of Mathematics
The Metafun manual - (La)TeX Navigator
METAFUN manual
Viessmann VITOCELL 300-H Technical data
erratum meta-euro
Typesetting in Lua using LuaTEX
A Field Guide to Wheat Phenotyping
Mosel User Guide
A short introduction to mEtapost
as a PDF
A User`s Manual for MetaPost
A User`s Manual for MetaPost