[NTG-context] \sometxt in staticMPfigure

Sanjoy Mahajan sanjoy at mrao.cam.ac.uk
Tue Sep 26 02:53:11 CEST 2006


With the new beta, this stress test for \sometxt works fine:

====================================================
\setupcolors[state=start]
\starttext
\startstaticMPfigure{fig}
  label(\sometxt{he\color[blue]{ab}lo}, origin) withcolor red;
  draw fullcircle scaled 1cm xscaled 2;
\stopstaticMPfigure

\usestaticMPfigure[fig]

xyz
\stoptext
====================================================

Well, it comes out in red, then blue, but the last two letters ('lo')
are in black, I guess because pdftex doesn't have a color stack.  But
that's not what I was meaning to test.  I just wanted to test \sometxt
and it looks good.

But, the following now doesn't work (I'm pretty sure it would have
worked with 2006.08.08 because I've been using the boxes macros alot):

================= dc2.tex [my crazy naming scheme] ===================
\starttext

\startMPinclusions
  input boxes
\stopMPinclusions

\startstaticMPfigure{fig}
  boxit.h(btex h etex);
  drawboxed(h);
\stopstaticMPfigure

\usestaticMPfigure[fig]

xyz

\stoptext
====================================================

It produces

  This is MetaPost, Version 0.901 (Web2C 7.5.3)
  (/home/sanjoy/texmf/web2c/natural.tcx)
  (texexec-mpgraph.mp
  >> boxit.h
  ! Isolated expression.
  <to be read again> 
		     (
  l.150 boxit.h(
		btex  h etex
  ? 

That's from making:

============== dc2-fig.mp ======================================
;

boxit.h(btex h etex);
drawboxed(h);
====================================================

and then ruby running:

  system(texmfstart --ifchanged=dc2-fig.mp texexec --mpstatic dc2-fig.mp),

which eventually makes the larger file texexec-mpgraph.mp and then does:

  mpost -mem=metafun -translate-file=natural.tcx texexec-mpgraph.mp

which produces the same error.

Hmm, looking at texexec-mpgraph.mp, there's no 'input boxes' line, so
the MPinclusions are not being included?

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   -- Bertrand de Jouvenal


More information about the ntg-context mailing list