* MPgraphic
@ 1999-10-26 5:31 Haseloff, Lutz
1999-10-26 10:07 ` MPgraphic Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Haseloff, Lutz @ 1999-10-26 5:31 UTC (permalink / raw)
I like it VERY much, to have METAPOST-code
and the TeX-code in the one and only sourcefile.
But an error occurs, when i want to process labels.
My sourcefile:
\setupoutput [pdftex]
\useencoding [win]
\mainlanguage [de]
\starttext
\startuseMPgraphic{test}
label(btex \font\land=psxu7t at 20pt
\land LAND etex,(0,9pt));
label(btex \font\land=psxu7t at 20pt
\land BRANDENBURG etex,(0,-9pt));
\stopuseMPgraphic
\useMPgraphic{test}
\stoptext
Context breaks with errormessage:
!missing `,` has been inserted!
A look into the mpgraph.mp shows following:
mpgraph:=1;
beginfig(1);
label(btex \font \land =psxu7t at 20pt
\land LAND etex;
,(0,9pt));
label(btex \font \land =psxu7t at 20pt
\land BRANDENBURG etex;
,(0,-9pt));
endfig;
end.
If i put the METAPOST-code into a seperate file and
metapost it, all works fine,
mp mpgraph don´t work.
Does ConTeXt insert an extra ´;´ to the METAPOST-code?
Lutz
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MPgraphic
1999-10-26 5:31 MPgraphic Haseloff, Lutz
@ 1999-10-26 10:07 ` Hans Hagen
0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 1999-10-26 10:07 UTC (permalink / raw)
Cc: ntg-context
"Haseloff, Lutz" wrote:
>
> I like it VERY much, to have METAPOST-code
> and the TeX-code in the one and only sourcefile.
> But an error occurs, when i want to process labels.
> Does ConTeXt insert an extra ´;´ to the METAPOST-code?
indeed:
\long\def\dodowriteMPgraphicline#1btex#2#3etex#4\MPend%
{\ifx\next\empty\else\ifx\next\relax\else
\bgroup
\let\par=\empty
\ifx#2\relax
\immediate\write\MPwrite{#1;}%
\egroup
\else
\convertargument#2#3\to\ascii
\immediate\write\MPwrite{#1btex \ascii etex;}%
\egroup
\dowriteMPgraphicline#4btex\relax etex\MPend
\fi
\fi\fi}
you may remove the ^^; before etex and see
what happens. As you may notice, the text between btex etex is passed
unexpanded. (a pretty hard coded fontname in you file btw; if you know
what tex you run, you can say \rm or so).
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* MPgraphic
@ 2009-05-05 8:47 R. Bastian
0 siblings, 0 replies; 3+ messages in thread
From: R. Bastian @ 2009-05-05 8:47 UTC (permalink / raw)
To: ntg-context
Salut tout le monde,
I wrote
------------------------
[...]
texte texte
\startMPgraphic
draw (0.0cm, 0.0cm) -- (1.1cm, 1.1cm) ;
\stopMPgraphic
[...]
-------------------------
The compilation works ; I get an EPS-file with suffixe mpgraph.2 (visible with gv)
but there is nothing in the PDF.
I use the minimals from 23.04.09.
What is wrong ?
best regards,
René B.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-05 8:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-26 5:31 MPgraphic Haseloff, Lutz
1999-10-26 10:07 ` MPgraphic Hans Hagen
2009-05-05 8:47 MPgraphic R. Bastian
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).