Hi LyX-Folks,

I am writing a document that refers to specific pages or chapters of other documents. In the resulting PDF, the reader should be able to navigate directly to the referred document and page. I am using the hyperref package to generate the links.

Problem is that I am not the author of the documents to refer to. I have just the PDFs. Moreover, they most probably have not been created with LaTeX, but with Word or worse.

I already figured out how Word (respective the Acrobat plugin) generates navigation labels for pages. For pages 1,2,3,... there are PDF labels "Page#1", "Page#2", "Page#3", and so on available (without the quotes).

If I use the \hyperref command such as:

\hyperref{external.pdf}{Page}{2}

this generates a link to the correct document (external.pdf), however to the label "Page.2", which does not exist -- it has to be "Page#2".

So I tried to redefine the command that is used inside hyperref to generate the target label names. This looks like:

\def\@@hyperref#1#2#3{%
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]@one\\{#1}%
}

OK, the second line is responsible for inserting the dot (".") between the second and the third parameter. However, while I successfully managed to replace it with almost any character, I have not been able to use "#" for this purpose. This is probably because "#" is a magic character for LaTeX that must not be used inside names.

I have the slight feeling that I am out of luck here :-(

Any ideas?

Thanks a lot!

Daniel

Reply via email to