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: Sam Liddicott
Subject: Re: [Texmacs-dev] Complete Re: adding pdf hyperlink support
Date: Thu, 14 Jul 2011 09:56:08 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20pre) Gecko/20110713 Lightning/1.0b2 Lanikai/3.1.12pre


I run evince from the command line so that I get to see it's error messages.
I click on the first link of the page that begins with:

Defektindizes
(29) Seien U , U1 die Cayley Transformierten von symmetrischen Operatoren T , T1.
Dann ist T T1 genau dann, wenn U U1.


The link is: (vgl. (2)), aber im


My text console shows:
failed to look up #sch2
(lots of times)

In the post-script I find this:

[ /Dest(#sch2) cvn /Rect [ 2382 1416 2507 1316 ]
/Border [16 16 1 [3 10]] /Color [1 0 0] /Subtype /Link /ANN pdfmark

which is the link to #sch2 but I do not find the anchor anywhere. In fact the only /DEST pdfmark's I notice are the ones that go with the link-jump because it was not worth the effort to not-generate them.

So my question is: why don't you have any anchors in your post-script document?

I'm not able to investigate this as you use style sheets that I do not have, but I wonder if your links work within texmacs? I notice that although you have many references, in the document you sent you only have 2 labels.

I looked at the label sch22-gl1 and found there were references to it, but when I browsed those in the pdf I got the console message: failed to look up #sch22-gl1 and see that there is no /DEST pdfmark for it.

So my guess (as far as I can take it with missing style sheets) is that the <label> tag is not being rendered in your documents, and that maybe you used an older patch before I had got labels rendering.

The latest patch is at https://savannah.gnu.org/bugs/?func=detailitem&item_id=15109
https://savannah.gnu.org/support/download.php?file_id=23606

please check that it matches the one you used.

Sam

On 14/07/11 09:35, Miguel de Benito Delgado wrote:
Hi Sam, list,

On Wed, Jul 13, 2011 at 10:51, Sam Liddicott <address@hidden <mailto: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> 
[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:

    
http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/pdf_creation_apis_and_specs/pdfmarkReference.pdf

(...)

    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.


_______________________________________________
Texmacs-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/texmacs-dev


--
[FSF Associate Member #2325] <http://www.fsf.org/register_form?referrer=2325>

<http://www.openrightsgroup.org/>



reply via email to

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