3

I want to use the hyperref package to create hyperlinks in my pdf output.

I have a global table and I would like to link each line to a more detailed table further down the document. And for each detailed table, I would like the paragraph title to become an hyperlink to the global table.

The first part is not a problem (linking each line of the big table to a small detail table). I didn't find how to do the second one though (link the paragraph title to the global table).

Something like

\subparagraph{\hyperlink{my target here}{my title here}}

doesn't seem to work.

Anybody knows how to write this one ?

Thank you for your help.

  • Possibly helpful: tex.stackexchange.com/questions/73840/… – John Wickerson Jun 7 '13 at 6:32
  • interverting \hyperlink and \subparagraph doesn't help unfortunately. – Chapo Jun 7 '13 at 6:38
  • I was thinking more along the lines of Gonzalo's answer on the linked page. – John Wickerson Jun 7 '13 at 6:40
  • \hypertarget{ALL-Global}{target Global} ... \slink{ALL-Global}{\subparagraph{my title here}} is a no-go as well. The sref function doesn't seem to match what I was looking for either. – Chapo Jun 7 '13 at 6:56
4

Section titles might appear in the table of contents or in the headers. Both is unlikely for \subparagraph, but who knows. This can be solved by using the optional argument to avoid linked titles at the other locations:

\subparagraph[My title]{\hypertarget{My target}{My title}}

Or, if there is a \label for the \caption of the global table:

\subparagraph[My title]{\hyperref[tab:globaltable]{My title}}
...
\caption{My global table}\label{tab:globaltable}
  • Thank you for that. I do not have a TOC in that document so no worries. Replacing hypertarget with hyperlink in \subparagraph[My title]{\hypertarget{My target}{My title}} does work. But I don't understand what the [My title] is supposed to represent. Changing it has no impact on my document. Is it a label of some sort ? – Chapo Jun 7 '13 at 7:15
-1

Using Heiko Oberdiek's answer here is the final solution :

\subparagraph[My title]{\hyperlink{My target}{My title}}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.