ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jin-Hwan Cho <jinhwan.cho@gmail.com>
To: Yue Wang <yuleopen@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Jonathan Kew <jonathan_kew@sil.org>
Subject: Re: XeConTeXt bug report III: Wrong hyperlink
Date: Tue, 12 May 2009 15:33:27 +0900	[thread overview]
Message-ID: <349CB3E3-0889-43FA-BC5E-EA35B7D07EFA@gmail.com> (raw)
In-Reply-To: <68bfdc900905112200s62c8ccc7j287265940bb6e60f@mail.gmail.com>

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
___________________________________________________________________________________


  reply	other threads:[~2009-05-12  6:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12  5:00 Yue Wang
2009-05-12  6:33 ` Jin-Hwan Cho [this message]
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

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=349CB3E3-0889-43FA-BC5E-EA35B7D07EFA@gmail.com \
    --to=jinhwan.cho@gmail.com \
    --cc=jonathan_kew@sil.org \
    --cc=ntg-context@ntg.nl \
    --cc=yuleopen@gmail.com \
    /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).