From: Hans Hagen <pragma@wxs.nl>
Subject: Re: followup metapost textext?
Date: Fri, 23 Dec 2005 00:26:53 +0100 [thread overview]
Message-ID: <43AB363D.2070308@wxs.nl> (raw)
In-Reply-To: <90BFF6E7-DF4E-4C31-9A9D-1DB20226C81B@science.uva.nl>
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
prev parent reply other threads:[~2005-12-22 23:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-21 18:01 Hans van der Meer
2005-12-22 7:49 ` Taco Hoekwater
2005-12-22 17:11 ` Hans van der Meer
2005-12-22 22:05 ` Hans van der Meer
2005-12-22 22:22 ` Hans Hagen
2005-12-22 22:49 ` Hans van der Meer
2005-12-22 23:05 ` Taco Hoekwater
2005-12-22 23:26 ` Hans Hagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43AB363D.2070308@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).