texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Complete Re: adding pdf hyperlink support


From: Miguel de Benito Delgado
Subject: Re: [Texmacs-dev] Complete Re: adding pdf hyperlink support
Date: Thu, 14 Jul 2011 10:35:40 +0200

Hi Sam, list,

On Wed, Jul 13, 2011 at 10:51, Sam Liddicott <address@hidden> wrote:
Maybe your link target is on the same page?

Hehehe:

CUSTOMER: Hi, my computer doesn't work.
SUPPORT: Hmmm... have you tried turning it on?

Luckily (hopefully?) not my case. The targets are indeed on a different page.
 
Otherwise I have ghostscript 9.01 and use ps2pdf to make the PDF which I view with evince, but Foxit PDF reader also works.
What pdf viewer are you using?

I use GPL Ghostscript  9.00 (2010-09-14) and TeXmacs export to PDF, which in turn uses it. The viewer is Apple's Preview, but it has no trouble with the links in yourfangle.pdf file. So that shouldn't be a problem. The PDF readers in my cellphone also work with your links, but not with mine.
 
I've read here [http://www.madepublic.com/rc.php?RCD_ID=15191] that one must know the number of the page one is jumping to, and add it with "/Page 7", say. Might this not solve the more-or-less-random-destinations problem?
You don't need to know the number of the page you are jumping to.

Got it. It seems indeed way better to use named destinations as the documentation you pasted says:
 
(...) 
As for the view, on page 45:
View
array
Specifies a link or bookmark’s destination on a page, and its fit type.
The first array entry is one of the fit type names shown in Table 3.5. The
remaining entries, if any, specify the location as either a rectangle, a
point, or an x– or y–coordinate, depending on the fit type.

we use XYZ with NULL as zoom so as not to change the zoom the user already has:
(...) 
Now left and top are the position of the rect being rendered at the label; here is a sample from one of my files:

[ /Dest(#footnr-2) cvn /View [/XYZ 363 2948 null] /DEST pdfmark

and here is the link to it:

[ /Dest(#footnote-2) cvn /Rect [ 363 2924 393 2887 ]
/Border [16 16 1 [3 10]] /Color [1 0 0] /Subtype /Link /ANN pdfmark

Nice. Thanks for the details!
 
Please could you try this PDF and see if it works for you:
http://git.savannah.gnu.org/cgit/fangle.git/plain/fangle.pdf

As I said, it does. Though I experience some weirdness: in the TOC, click on "Introduction... 3", the viewer jumps to the bottom of page 3, whereas the number is displayed at the top. The same (jumping to the bottom of the page) happens if I click, say, "License... 4", or "3 Using Fangle with LaTeX...15".
 
GOOD NEWS - I note that links from the table-of-contents DO jump to the right part of the page! If the TOC entry is to a new section - that has the page-number at the bottom of the page instead of the top of the page, then I notice that evince takes me to the bottom of the page. If the TOC entry is to a subsection and the page number is shown at the top of the page, then evince takes me to the top of the page.

To see, try: http://git.savannah.gnu.org/cgit/fangle.git/plain/fangle.pdf and in the contents, click on "4 Using Fangle with Lyx ... 17" - it goes to the bottom of the page where the page 17 is. Then try "4.4 configuring the build script ... 19" and see that it goes to the top of the page. In both cases where the page number is printed.

Yep, it works for me too in those particular instances, though not in others, as I already explained. But you're close!
 
In the .ps, the destination for configuring the build script is:

[ /Dest(#auto-18) cvn /View [/XYZ 108 4144 null] /DEST pdfmark

and the toc link is:

[ /Dest(#auto-18) cvn /Rect [ 3568 3296 3651 3243 ]
/Border [16 16 1 [3 10]] /Color [1 0 0] /Subtype /Link /ANN pdfmark

Hopefully that gives me enough clue to work out the problem why it doesn't position properly for other links.

I'd like to be of more help, but my exams are in a couple of weeks! Please be patient with my delays.
 
But I'm very interested in your links not working at all, and would like to see the .ps and .pdf (and .tm file).

Sure, I'll send them privately, since I don't think I can make them public (no big deal, it's not top secret, don't worry)

Regards,
________________
Miguel de  Benito.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]