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

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

Hi, Hans and Jin-Hwan:

When using ConTeXt to produce my documents, I found that all
hyperlinks are wrong. And here is a simple test.

The tex and pdf files are attached in the mail. The problem will happen when:
1) using pdftex to produce the dvi, and use dvipdfmx to convert the dvi to pdf.
2) using xetex to produce xdv, and xdvipdfmx that xdv to pdf.

Open the file in Acrobat Reader, Go to page three, and you can see a
hyperlink text "Equation 1", it links to page 2. however, the equation
is in page1.

The "section 1" or  "page 4" should point to page 4, but it point to page 5 now.

So my question:
- As far as I know, dvipdfmx's ConTeXt support was written by
Jin-Hwan. and the hyperlink code is written by Hans. Surely at least
one of the two source code files has a cross-ref bug. But I don't know
which. Can the bug be fixed?

Thanks

Yue Wang

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

[-- Attachment #3: test-hyperlink.tex --]
[-- Type: application/x-tex, Size: 582 bytes --]

[-- Attachment #4: 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] 6+ messages in thread

* Re: XeConTeXt bug report III: Wrong hyperlink
  2009-05-12  5:00 XeConTeXt bug report III: Wrong hyperlink Yue Wang
@ 2009-05-12  6:33 ` Jin-Hwan Cho
  2009-05-12 12:49   ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Jin-Hwan Cho @ 2009-05-12  6:33 UTC (permalink / raw)
  To: Yue Wang; +Cc: mailing list for ConTeXt users, Jonathan Kew

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

> Hi, Hans and Jin-Hwan:
>
> When using ConTeXt to produce my documents, I found that all
> hyperlinks are wrong. And here is a simple test.
>
> The tex and pdf files are attached in the mail. The problem will  
> happen when:
> 1) using pdftex to produce the dvi, and use dvipdfmx to convert the  
> dvi to pdf.
> 2) using xetex to produce xdv, and xdvipdfmx that xdv to pdf.
>
> Open the file in Acrobat Reader, Go to page three, and you can see a
> hyperlink text "Equation 1", it links to page 2. however, the equation
> is in page1.
>
> The "section 1" or  "page 4" should point to page 4, but it point to  
> page 5 now.
>
> So my question:
> - As far as I know, dvipdfmx's ConTeXt support was written by
> Jin-Hwan. and the hyperlink code is written by Hans. Surely at least
> one of the two source code files has a cross-ref bug. But I don't know
> which. Can the bug be fixed?

It's not a BUG in a strict sense.

The driver file spec-dpx.tex (included in texlive 2008) just give

\special{pdf:names /Dests (#1) [@thispage \PDFpageviewwrd]}

in the 463th line for \doPDFdestination.

However, \PDFpageviewwrd is defined in the 1666th line of spec-fdf.tex.
Here, generated is "/XYZ 0 0 0". PDF Reference 1.7 (p.582) says that

 > "/XYZ left top zoom" displays the page designated by page, with the  
coordinates
 > (left, top) positioned at the upper-left corner of the window and  
the contents of
 > the page magnified by the factor zoom.

So "/XYZ 0 0 0" means that the coordinates (0,0) of the page will be  
positioned at
the upper-left corner of the window. But what is (0,0)? It is not the  
upper-left corner
of the page, but the lower-left corner of the page. Therefore, it  
looks the next page
is displayed.

Hans already gave a comment at the 1656th line of spec-fdf.tex as

 > \def\PDFpagexyzspec{0 0 0} % hack, pdftex does handle this

I think that the value of the paperheight is better than 0 for "top"  
value.

Best regards, ChoF.

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

* Re: XeConTeXt bug report III: Wrong hyperlink
  2009-05-12  6:33 ` Jin-Hwan Cho
@ 2009-05-12 12:49   ` Hans Hagen
  2009-05-12 16:34     ` Yue Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2009-05-12 12:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Jin-Hwan Cho wrote:


> I think that the value of the paperheight is better than 0 for "top" value.

thanks for figuring it out ... i now just fall back to fit

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

* Re: XeConTeXt bug report III: Wrong hyperlink
  2009-05-12 12:49   ` Hans Hagen
@ 2009-05-12 16:34     ` Yue Wang
  2009-05-12 17:37       ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Yue Wang @ 2009-05-12 16:34 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users, Jin-Hwan Cho

On Tue, May 12, 2009 at 8:49 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Jin-Hwan Cho wrote:
>
>
>> I think that the value of the paperheight is better than 0 for "top"
>> value.
>
> thanks for figuring it out ... i now just fall back to fit


then focus=standard wont make the link point to the right place...
btw, in ConTeXt's pdftex or luatex mode, it also point to the wrong place.
but Eplain and LaTeX hyperref handle that right...


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

* Re: XeConTeXt bug report III: Wrong hyperlink
  2009-05-12 16:34     ` Yue Wang
@ 2009-05-12 17:37       ` Hans Hagen
  2009-05-13 14:16         ` Yue Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2009-05-12 17:37 UTC (permalink / raw)
  To: Yue Wang; +Cc: mailing list for ConTeXt users, Jin-Hwan Cho

Yue Wang wrote:
> On Tue, May 12, 2009 at 8:49 PM, Hans Hagen <pragma@wxs.nl> wrote:
>> Jin-Hwan Cho wrote:
>>
>>
>>> I think that the value of the paperheight is better than 0 for "top"
>>> value.
>> thanks for figuring it out ... i now just fall back to fit
> 
> 
> then focus=standard wont make the link point to the right place...

well, so be it .. i have no time now to look into xyz placement

> btw, in ConTeXt's pdftex or luatex mode, it also point to the wrong place.
> but Eplain and LaTeX hyperref handle that right...

as Chof pointed out, it also relates a bit to how the viewer shows the page

i tested the fixes for pdftex/xetex and it seems to work ok now

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

* Re: XeConTeXt bug report III: Wrong hyperlink
  2009-05-12 17:37       ` Hans Hagen
@ 2009-05-13 14:16         ` Yue Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Yue Wang @ 2009-05-13 14:16 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users, Jin-Hwan Cho

oh, no. better change that to this:
/XYZ @xpos @ypos 0
so xetex and pdftex/luatex will share the same behavior. (it point to
the place a little bit lower, so the behavior is much better than fit)
as to the wrong destination.. I highly suspect that the PDF /Dests is
written right after the box, not before the box.


On Wed, May 13, 2009 at 1:37 AM, Hans Hagen <pragma@wxs.nl> wrote:
> Yue Wang wrote:
>>
>> On Tue, May 12, 2009 at 8:49 PM, Hans Hagen <pragma@wxs.nl> wrote:
>>>
>>> Jin-Hwan Cho wrote:
>>>
>>>
>>>> I think that the value of the paperheight is better than 0 for "top"
>>>> value.
>>>
>>> thanks for figuring it out ... i now just fall back to fit
>>
>>
>> then focus=standard wont make the link point to the right place...
>
> well, so be it .. i have no time now to look into xyz placement
>
>> btw, in ConTeXt's pdftex or luatex mode, it also point to the wrong place.
>> but Eplain and LaTeX hyperref handle that right...
>
> as Chof pointed out, it also relates a bit to how the viewer shows the page
>
> i tested the fixes for pdftex/xetex and it seems to work ok now
>
> 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] 6+ messages in thread

end of thread, other threads:[~2009-05-13 14:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12  5:00 XeConTeXt bug report III: Wrong hyperlink Yue Wang
2009-05-12  6:33 ` Jin-Hwan Cho
2009-05-12 12:49   ` Hans Hagen
2009-05-12 16:34     ` Yue Wang
2009-05-12 17:37       ` Hans Hagen
2009-05-13 14:16         ` 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).