Hans van der Meer wrote:

I finally managed to contrive two simple examples, one that works here and one that doesn't.

The next code typeset with texexec --pdf with lines commented OUT does work:

\setupcolors[state=start]
\usetypescript[luc]\setupbodyfont[luc,10pt]
\startMPenvironment
    \usetypescript[luc]
    \setupbodyfont[luc,10pt]
\stopMPenvironment

\definecolor[gray][s=.825]
\definecolor[yellow][r=.625,g=.625]
\setupMPpage[offset=1pt,background=color,backgroundcolor=gray]

\startuseMPgraphic{standalone}
    draw (0,0)--(100,0)--(100,50)--(50,50)--(50,100)--(0,100)--(0,0);
label (textext("cornerstone"), (10,5)) rotated 45 withcolor \MPcolor {yellow};
\stopuseMPgraphic

\starttext
%%%%%%%%%%\startMPpage
    \includeMPgraphic{standalone}
%%%%%%%%%%\stopMPpage
\stoptext

When I remove the %'s it does not work.
The first below is the wrong one, showing unknown, the second one correctly shows the word cornerstone.
Is the conclusion correct that it could be something with \startMPpage?

no, with \includeMPgraphics not being expanded before testing on mptex runs:

\long\def\writecheckedMPgraphic#1%
 {\ifforceMPTEXgraphic
    \global\MPTEXgraphictrue
  \else
    \global\MPTEXgraphicfalse
    \edef\ascii{#1}\convertcommand\ascii\to\MPascii
    \the\MPTEXgraphicchecks\relax % \relax is end condition!
  \fi
  \flushMPTEXgraphic % verbatimtex etc
  \writeMPgraphic{#1}}

\startuseMPgraphic{standalone}
   draw textext("whatever") ;
\stopuseMPgraphic

\starttext

% \forceMPTEXgraphictrue

\startMPcode
   fill fullcircle scaled 2mm ; \includeMPgraphic{standalone}
\stopMPcode

\startMPcode
   draw fullcircle scaled 2mm ; \includeMPgraphic{standalone}
\stopMPcode

\stoptext

one can always force tex runs with: \forceMPTEXgraphictrue


_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to