At 02:26 PM 1/23/2003 +0100, you wrote:
On Thursday 23 January 2003 13:19, Hans Hagen wrote:
> can you prepare a simple example + set of files needed

attached: pie.mp, extfig.tex, incontext.tex

1. mpost pie.mp
   works well, graphics can be included as external figure in
   extfig.tex.

2. mptopdf pie.mp   or   texexec incontext
   complains about being unable to produce mpx file

As far as I understood the piechartmp manual, the line
SetupText(1,this,this);
should activate TeX typesetting without changing the default
parameters for which TeX to use and which setup commands to execute.
The trick is to overload the piechart text handler:

\startMPinclusions
input piechartmp ; let normal_makeText = _makeText ;
vardef _makeText primary s =
if pc_Metafun : textext(s) else : normal_makeText(s) fi
enddef
\stopMPinclusions

\forceMPTEXcheck{Segment}

\starttext

\startMPpage[offset=2pt]
SetupText(1,this,this);
Segment(1674,"$\sqrt x$",(.8,.0,.0),"16740");
Segment(305.3,"\TeX",(.0,.6,.0),"3053");
Segment(55.2,"help",(.6,.8,.8),"552");
PieChart(6cm,0.1,65,330,0);
Label.auto(0)(name)(outwards,0);
\stopMPpage

\stoptext

This produces a piechart with typeset text

The force can go into a module, say m-mppie.tex, which also loads the piechart module, say:

\appendtoks input piechartmp ; \to \everyMPinitializations

\forceMPTEXcheck{Segment}

\endinput

but the vardef redefiniton can best go into the mp file, if not it can also go into the module, or be one of the options of SetupText

Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to