* Strange problem with metapost graphics
@ 2008-04-17 10:05 Jean Magnan de Bornier
2008-04-17 11:00 ` Yue Wang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jean Magnan de Bornier @ 2008-04-17 10:05 UTC (permalink / raw)
To: ntg-context
Hi all,
Here is minimal example of some trouble I have:
...................................
\startMPinclusions
numeric u; u=1cm;
\stopMPinclusions
\starttext
\startuseMPgraphic{dummy}
drawarrow (0,0)..(8u,0);
label.bot(\sometxt{temps}, (7u,-.5u));
\stopuseMPgraphic
\placefigure[fig:Uncontratdanslaflèchedutemps]{Un contrat dans la flèche du temps}{\useMPgraphic{dummy}}
\startuseMPgraphic{ummy}
pair A[];
A[0]:=(-1u, -1u);
A[1]:=( 6u, -1u);
A[2]:=( 6u, 4u);
A[3]:=(-1u, 4u);
draw A[0]--A[1]--A[2]--A[3]--cycle withpen pencircle scaled 1pt;
label.bot(\sometxt{Dupont}, A[0]);
label.top(\sometxt{Smith}, A[2]);
\stopuseMPgraphic
\placefigure[fig:Boîte d'Edgeworth]{Boîte d'Edgeworth}{\useMPgraphic{ummy}}
\stoptext
.................................
The trouble is that this compiles nicely with pdftex, a little less nicely
with xetex, and badly with luatex, tested at home and on context live.
- xetex: the label in the first graphic appears with bad size.
- luatex: first label in the second graphic appears with bad size and font,
and second label disappears; but if I comment out the label in the first
graphic, the second graphic is as expected.
Any idea?
--
Jean
___________________________________________________________________________________
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] 5+ messages in thread
* Re: Strange problem with metapost graphics
2008-04-17 10:05 Strange problem with metapost graphics Jean Magnan de Bornier
@ 2008-04-17 11:00 ` Yue Wang
2008-04-17 11:13 ` Taco Hoekwater
2008-04-17 11:17 ` Hans Hagen
2 siblings, 0 replies; 5+ messages in thread
From: Yue Wang @ 2008-04-17 11:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi.
XeTeX result always have some offset compared to the pdftex result. I
don't know why.
Moreover, it is impossible to use opentype (at least I never use it
successfully.).
Yue Wang
___________________________________________________________________________________
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] 5+ messages in thread
* Re: Strange problem with metapost graphics
2008-04-17 10:05 Strange problem with metapost graphics Jean Magnan de Bornier
2008-04-17 11:00 ` Yue Wang
@ 2008-04-17 11:13 ` Taco Hoekwater
2008-04-17 11:17 ` Hans Hagen
2 siblings, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2008-04-17 11:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
Jean Magnan de Bornier wrote:
>
> - luatex: first label in the second graphic appears with bad size and font,
> and second label disappears; but if I comment out the label in the first
> graphic, the second graphic is as expected.
>
> Any idea?
A much smaller luatex test is possible:
\startuseMPgraphic{a}
label.bot(textext("a"), origin);
\stopuseMPgraphic
\useMPgraphic{a}
\startuseMPgraphic{b}
label.bot(textext("b"), origin);
\stopuseMPgraphic
\useMPgraphic{b}
There is some problem with the textext array indices, it seems:
report >> error: >> (0,0,_tt_w_2,0,0,1)
! Transform components aren't all known.
<to be read again>
yscaled
<argument> ...square.xscaled._tt_w_[_tt_n_]yscaled
(_tt_h_[_tt_n_]+_tt_d_[_tt...
image->...ture;currentpicture:=nullpicture;(TEXT2)
;currentpicture.endgroup
textext->...ipt"ts"withpostscript.decimal._tt_n_;)
fi.endgroup
<*> ...; ;randomseed:=1403; label.bot(textext("b")
, origin); ;
___________________________________________________________________________________
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] 5+ messages in thread
* Re: Strange problem with metapost graphics
2008-04-17 10:05 Strange problem with metapost graphics Jean Magnan de Bornier
2008-04-17 11:00 ` Yue Wang
2008-04-17 11:13 ` Taco Hoekwater
@ 2008-04-17 11:17 ` Hans Hagen
2008-04-17 17:22 ` Jean Magnan de Bornier
2 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2008-04-17 11:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
Jean Magnan de Bornier wrote:
> Hi all,
> Here is minimal example of some trouble I have:
>
> ...................................
> \startMPinclusions
> numeric u; u=1cm;
> \stopMPinclusions
> \starttext
> \startuseMPgraphic{dummy}
> drawarrow (0,0)..(8u,0);
> label.bot(\sometxt{temps}, (7u,-.5u));
> \stopuseMPgraphic
> \placefigure[fig:Uncontratdanslaflèchedutemps]{Un contrat dans la flèche du temps}{\useMPgraphic{dummy}}
>
>
> \startuseMPgraphic{ummy}
> pair A[];
> A[0]:=(-1u, -1u);
> A[1]:=( 6u, -1u);
> A[2]:=( 6u, 4u);
> A[3]:=(-1u, 4u);
> draw A[0]--A[1]--A[2]--A[3]--cycle withpen pencircle scaled 1pt;
> label.bot(\sometxt{Dupont}, A[0]);
> label.top(\sometxt{Smith}, A[2]);
> \stopuseMPgraphic
> \placefigure[fig:Boîte d'Edgeworth]{Boîte d'Edgeworth}{\useMPgraphic{ummy}}
> \stoptext
> .................................
>
> The trouble is that this compiles nicely with pdftex, a little less nicely
> with xetex, and badly with luatex, tested at home and on context live.
>
> - xetex: the label in the first graphic appears with bad size.
>
> - luatex: first label in the second graphic appears with bad size and font,
> and second label disappears; but if I comment out the label in the first
> graphic, the second graphic is as expected.
>
> Any idea?
at the end of mp-mlib.mp add
def resettextexts =
_tt_n_ := 0 ;
enddef ;
extra_endfig := extra_endfig & "resettextexts ; " ;
then run
ctxtools --touch
context --make (or texexec --make --luatex)
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 5+ messages in thread
* Re: Strange problem with metapost graphics
2008-04-17 11:17 ` Hans Hagen
@ 2008-04-17 17:22 ` Jean Magnan de Bornier
0 siblings, 0 replies; 5+ messages in thread
From: Jean Magnan de Bornier @ 2008-04-17 17:22 UTC (permalink / raw)
To: ntg-context
Le 17 avril à 13:17:44 Hans Hagen <pragma@wxs.nl> écrit notamment:
| Jean Magnan de Bornier wrote:
| > Hi all,
| > Here is minimal example of some trouble I have:
| >
| > ...................................
| > \startMPinclusions
| > numeric u; u=1cm;
| > \stopMPinclusions
| > \starttext
| > \startuseMPgraphic{dummy}
| > drawarrow (0,0)..(8u,0);
| > label.bot(\sometxt{temps}, (7u,-.5u));
| > \stopuseMPgraphic
| > \placefigure[fig:Uncontratdanslaflèchedutemps]{Un contrat dans la flèche du temps}{\useMPgraphic{dummy}}
| >
| >
| > \startuseMPgraphic{ummy}
| > pair A[];
| > A[0]:=(-1u, -1u);
| > A[1]:=( 6u, -1u);
| > A[2]:=( 6u, 4u);
| > A[3]:=(-1u, 4u);
| > draw A[0]--A[1]--A[2]--A[3]--cycle withpen pencircle scaled 1pt;
| > label.bot(\sometxt{Dupont}, A[0]);
| > label.top(\sometxt{Smith}, A[2]);
| > \stopuseMPgraphic
| > \placefigure[fig:Boîte d'Edgeworth]{Boîte d'Edgeworth}{\useMPgraphic{ummy}}
| > \stoptext
| > .................................
| >
| > The trouble is that this compiles nicely with pdftex, a little less nicely
| > with xetex, and badly with luatex, tested at home and on context live.
| >
| > - xetex: the label in the first graphic appears with bad size.
| >
| > - luatex: first label in the second graphic appears with bad size and font,
| > and second label disappears; but if I comment out the label in the first
| > graphic, the second graphic is as expected.
| >
| > Any idea?
>
| at the end of mp-mlib.mp add
>
| def resettextexts =
| _tt_n_ := 0 ;
| enddef ;
>
| extra_endfig := extra_endfig & "resettextexts ; " ;
>
| then run
>
| ctxtools --touch
| context --make (or texexec --make --luatex)
Done! But same result :-(
--
Jean
___________________________________________________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2008-04-17 17:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-17 10:05 Strange problem with metapost graphics Jean Magnan de Bornier
2008-04-17 11:00 ` Yue Wang
2008-04-17 11:13 ` Taco Hoekwater
2008-04-17 11:17 ` Hans Hagen
2008-04-17 17:22 ` Jean Magnan de Bornier
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).