[NTG-context] About graphictext macro (Metafun)
Hans Hagen
pragma at wxs.nl
Thu Aug 27 09:39:55 CEST 2015
On 8/26/2015 7:12 PM, Fabrice Couvreur wrote:
> Hi,
> I try to understand how this macro by testing a simple example. Why pdf
> file is empty?
> This question follows my question Cover page (Metafun)
> http://www.ntg.nl/pipermail/ntg-context/2015/083078.html
> Thank you.
>
> \setuppagenumbering[location=]
>
> \setupcolors
> [state=start]
>
> \setMPtext{text}{MATHEMATIQUES}
>
>
> \starttext
> \startuseMPgraphic{test}
> picture pic ;
> pic := image(graphictext \MPstring{text}
> withdrawcolor red
> withpen pencircle scaled 1pt ; ) ;
> addto currentpicture also pic ;
> \stopuseMPgraphic
> \stoptext
Do you have pstoedit installed?
Anyway, there is a new mechanism that doesn't depend on additional
programs:
% outlinetext (text) transformations ;
% outlinetext.d (text) (draw options) transformations ;
% outlinetext.f (text) (fill options) transformations ;
% outlinetext.b (text) (draw options) (fill options) transformations ;
% outlinetext.r (text) (fill options) (draw options) transformations ;
\starttext
\startMPdefinitions
let graphictext = new_graphictext ;
\stopMPdefinitions
\startMPpage
draw outlinetext.b
("\framed[align=normal]{\input{tufte}}")
(withcolor .5white)
(withcolor red withpen pencircle scaled 1/10)
xsized 10cm ;
\stopMPpage
\startMPpage
draw outlinetext.r
("\framed[align=normal]{\input{tufte}}")
(withcolor red withpen pencircle scaled 1/10)
(withcolor .5white)
xsized 10cm ;
\stopMPpage
\startMPpage
draw outlinetext.d
("\framed[align=normal]{\input{tufte}}")
(withcolor .5white)
xsized 10cm ;
\stopMPpage
\startMPpage
picture p ; p := outlinetext.p("PX") ;
for i within p :
draw i withcolor red withpen pencircle scaled 1/10 ;
endfor ;
\stopMPpage
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the ntg-context
mailing list