0

Goal:

I am writing a report that makes extensive reference to a companion document of (large) tables. I'd like to make it as easy as possible for my reader to reference the tables, without cluttering the report.

In an ideal world, the two documents would be opened side-by-side, and the reader would click links in the report to scroll the table document to the correct location.

What I've tried:

My initial plan was to write the report in Latex, and use relative \href links to anchors in a companion HTML document. It doesn't work reliably. #Anchor links seem to get stripped in Windows, and the handling of relative URLs seems very variable between PDF viewers. Many PDF viewers can't even handle schema-less (bare or PRURL) URLs. Even if it did work, most modern browsers would open a new tab for every click, rather than scrolling the existing one.

Question:

This seems like a pretty obvious use-case, at least to me. Is there any reliable way to use Latex to create a document that scrolls a companion document?

  • 1
    It should be possible in one pdf to add hyperlinks to a "named destination" in a second document, as you have found that secondary window MUST be restricted to one document even when requested to goto another named destination where the named destination can be a page number or bookmark followed by other directives such as scroll. This is a common usage in docx and a standard usage for pdf. Look at the command line calls to say SumatraPDF (ALL LaTeX aware PDF viewers use similar methods for synctex to forward search to a given line) thus see the PDF viewer Latex Editor settings to reuse pdf. – user170109 Mar 24 at 19:57
  • 1
    Actually I have found that there is a significant limitation in what you wish to do since for security reasons the PDF format specifically tries to not make it easy to call some types of command so from Acrobat notes "If you use URLs containing local hard drive addresses (c:\folder), you cannot link to page numbers or set destinations." What this means for your usage is that without some significant workarounds you can only easily call From a pdf each page if it is a standalone file. WhaT a Farce ! – user170109 Mar 25 at 13:27
  • Thanks for the followup. I've really been beating my head against this one. – DS Justice Mar 25 at 16:24
  • Me too,word to excel no problem, html to pdf ok pdf to html ok pdf to pdf a nightmare I tried using a local server for serving pdfs etc but not yet found a way, there must be a way to get a call out since beamer can run media apps etc etc it just needs to be a call from pdf to the viewer with parameters – user170109 Mar 25 at 16:28
  • Thanks for confirming that it's not trivial! Given it's this hard, I think I can't reasonably rely on my users having an appropriate configuration. I'm going to have to look at other ways to address the core problem of separating data presentation from the narrative. – DS Justice Mar 25 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.