ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* XeConTeXt bug report II: MetaPost Graphics
@ 2009-05-12  5:00 Yue Wang
  2009-05-12  5:51 ` Jin-Hwan Cho
  0 siblings, 1 reply; 7+ messages in thread
From: Yue Wang @ 2009-05-12  5:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jonathan Kew, Jin-Hwan Cho

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

Hi, Hans and Jin-Hwan:

Here is a simple ConTeXt metafun demo file:

\starttext
\setupcolors[state=start]
\startMPpage
  path p ; color c[] ;
  p := fullsquare scaled 4cm ;
  c[0] := transparent(1,.5,red) ;
  c[1] := transparent(1,.5,green) ;
  c[2] := transparent(1,.5,blue) ;
  for i = 0 upto 2 :
    fill p rotated (i*30) withcolor white ;
  endfor ;
  for i = 0 upto 2 :
    fill p rotated (i*30) withcolor c[i] ;
  endfor ;
  addbackground withcolor transparent(1,.5,cmyk(0,0,1,0)) ;
\stopMPpage
\stoptext

When process the file using luatex or pdftex, we can see a nice picture there.
However, when
1) using pdftex to produce the dvi, and convert the dvi using dvipdfmx
2) using xetex to produce the pdf using xdvipdfmx
the figure is placed at the wrong place. there will be a displacement
for all the metapost figures when xetex is used to produce the
graphics. I attach the wrong result in the mail.

So my question is :
- is this a bug in ConTeXt, or in (x)dvipdfmx. can the bug be fixed?

Thanks

Yue Wang

[-- Attachment #2: test-metafun.pdf --]
[-- Type: application/pdf, Size: 1420 bytes --]

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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] 7+ messages in thread

* Re: XeConTeXt bug report II: MetaPost Graphics
  2009-05-12  5:00 XeConTeXt bug report II: MetaPost Graphics Yue Wang
@ 2009-05-12  5:51 ` Jin-Hwan Cho
  2009-05-12  8:21   ` Yue Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Jin-Hwan Cho @ 2009-05-12  5:51 UTC (permalink / raw)
  To: Yue Wang; +Cc: mailing list for ConTeXt users, Jonathan Kew

Hi, Yue Wang,

Many years have passed since I wrote spec-dpx.tex for ConTeXt.

The file spec-dpx.tex included in texlive 2008 (the only one I have)
looks quite changed according to the progression of ConTeXt.

Anyway, your example worked when I change the 763th line of
spec-dpx.tex as follows:

{\scratchdimen\wd#2\scratchdimen.5\scratchdimen\hskip-\the\scratchdimen

==>

{%

But, I do not know this modification of \setMPPDFobject does not affect
other cases. Could you check more examples?

Best regards, ChoF.

On May 12, 2009, at 2:00 PM, Yue Wang wrote:

> Hi, Hans and Jin-Hwan:
>
> Here is a simple ConTeXt metafun demo file:
>
> \starttext
> \setupcolors[state=start]
> \startMPpage
>  path p ; color c[] ;
>  p := fullsquare scaled 4cm ;
>  c[0] := transparent(1,.5,red) ;
>  c[1] := transparent(1,.5,green) ;
>  c[2] := transparent(1,.5,blue) ;
>  for i = 0 upto 2 :
>    fill p rotated (i*30) withcolor white ;
>  endfor ;
>  for i = 0 upto 2 :
>    fill p rotated (i*30) withcolor c[i] ;
>  endfor ;
>  addbackground withcolor transparent(1,.5,cmyk(0,0,1,0)) ;
> \stopMPpage
> \stoptext
>
> When process the file using luatex or pdftex, we can see a nice  
> picture there.
> However, when
> 1) using pdftex to produce the dvi, and convert the dvi using dvipdfmx
> 2) using xetex to produce the pdf using xdvipdfmx
> the figure is placed at the wrong place. there will be a displacement
> for all the metapost figures when xetex is used to produce the
> graphics. I attach the wrong result in the mail.
>
> So my question is :
> - is this a bug in ConTeXt, or in (x)dvipdfmx. can the bug be fixed?
>
> Thanks
>
> Yue Wang
> <test-metafun.pdf>

___________________________________________________________________________________
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] 7+ messages in thread

* Re: XeConTeXt bug report II: MetaPost Graphics
  2009-05-12  5:51 ` Jin-Hwan Cho
@ 2009-05-12  8:21   ` Yue Wang
  2009-05-12 10:08     ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Yue Wang @ 2009-05-12  8:21 UTC (permalink / raw)
  To: Jin-Hwan Cho; +Cc: mailing list for ConTeXt users, Jonathan Kew

Hi, all:

I tried this fix with some of my documents and it seems that this
fixed all my documents.
Hans, can you commit that to HEAD?

Thanks a lot, Jin-Hwan:)

Yue Wang

On Tue, May 12, 2009 at 1:51 PM, Jin-Hwan Cho <jinhwan.cho@gmail.com> wrote:
> Hi, Yue Wang,
>
> Many years have passed since I wrote spec-dpx.tex for ConTeXt.
>
> The file spec-dpx.tex included in texlive 2008 (the only one I have)
> looks quite changed according to the progression of ConTeXt.
>
> Anyway, your example worked when I change the 763th line of
> spec-dpx.tex as follows:
>
> {\scratchdimen\wd#2\scratchdimen.5\scratchdimen\hskip-\the\scratchdimen
>
> ==>
>
> {%
>
> But, I do not know this modification of \setMPPDFobject does not affect
> other cases. Could you check more examples?
>
> Best regards, ChoF.
>
> On May 12, 2009, at 2:00 PM, Yue Wang wrote:
>
>> Hi, Hans and Jin-Hwan:
>>
>> Here is a simple ConTeXt metafun demo file:
>>
>> \starttext
>> \setupcolors[state=start]
>> \startMPpage
>>  path p ; color c[] ;
>>  p := fullsquare scaled 4cm ;
>>  c[0] := transparent(1,.5,red) ;
>>  c[1] := transparent(1,.5,green) ;
>>  c[2] := transparent(1,.5,blue) ;
>>  for i = 0 upto 2 :
>>   fill p rotated (i*30) withcolor white ;
>>  endfor ;
>>  for i = 0 upto 2 :
>>   fill p rotated (i*30) withcolor c[i] ;
>>  endfor ;
>>  addbackground withcolor transparent(1,.5,cmyk(0,0,1,0)) ;
>> \stopMPpage
>> \stoptext
>>
>> When process the file using luatex or pdftex, we can see a nice picture
>> there.
>> However, when
>> 1) using pdftex to produce the dvi, and convert the dvi using dvipdfmx
>> 2) using xetex to produce the pdf using xdvipdfmx
>> the figure is placed at the wrong place. there will be a displacement
>> for all the metapost figures when xetex is used to produce the
>> graphics. I attach the wrong result in the mail.
>>
>> So my question is :
>> - is this a bug in ConTeXt, or in (x)dvipdfmx. can the bug be fixed?
>>
>> Thanks
>>
>> Yue Wang
>> <test-metafun.pdf>
>
>
___________________________________________________________________________________
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] 7+ messages in thread

* Re: XeConTeXt bug report II: MetaPost Graphics
  2009-05-12  8:21   ` Yue Wang
@ 2009-05-12 10:08     ` Hans Hagen
  2009-05-12 10:12       ` Yue Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2009-05-12 10:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jin-Hwan Cho, Jonathan Kew

Yue Wang wrote:
> Hi, all:
> 
> I tried this fix with some of my documents and it seems that this
> fixed all my documents.
> Hans, can you commit that to HEAD?

what line is that in the current dpx file?

Hans

-----------------------------------------------------------------
                                           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] 7+ messages in thread

* Re: XeConTeXt bug report II: MetaPost Graphics
  2009-05-12 10:08     ` Hans Hagen
@ 2009-05-12 10:12       ` Yue Wang
  2009-05-12 11:05         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Yue Wang @ 2009-05-12 10:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

736 on current version

On Tue, May 12, 2009 at 6:08 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Yue Wang wrote:
>>
>> Hi, all:
>>
>> I tried this fix with some of my documents and it seems that this
>> fixed all my documents.
>> Hans, can you commit that to HEAD?
>
> what line is that in the current dpx file?
>
> Hans
>
> -----------------------------------------------------------------
>                                          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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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] 7+ messages in thread

* Re: XeConTeXt bug report II: MetaPost Graphics
  2009-05-12 10:12       ` Yue Wang
@ 2009-05-12 11:05         ` Hans Hagen
  2009-05-12 11:19           ` Yue Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2009-05-12 11:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Yue Wang wrote:
> 736 on current version

but that line already looks that way ... so what needs to be patched


-----------------------------------------------------------------
                                           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] 7+ messages in thread

* Re: XeConTeXt bug report II: MetaPost Graphics
  2009-05-12 11:05         ` Hans Hagen
@ 2009-05-12 11:19           ` Yue Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Yue Wang @ 2009-05-12 11:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, Hans

Prof. Cho asked you to comment the line after the {
i.e.:

- {\scratchdimen\wd#2\scratchdimen.5\scratchdimen\hskip-\the\scratchdimen
+{%

Yue Wang

On Tue, May 12, 2009 at 7:05 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Yue Wang wrote:
>>
>> 736 on current version
>
> but that line already looks that way ... so what needs to be patched
>
>
> -----------------------------------------------------------------
>                                          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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2009-05-12 11:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12  5:00 XeConTeXt bug report II: MetaPost Graphics Yue Wang
2009-05-12  5:51 ` Jin-Hwan Cho
2009-05-12  8:21   ` Yue Wang
2009-05-12 10:08     ` Hans Hagen
2009-05-12 10:12       ` Yue Wang
2009-05-12 11:05         ` Hans Hagen
2009-05-12 11:19           ` Yue Wang

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).