[Tex/LaTex] reference to a label linked with a longtable row


Is there a way to link to a specific row in a Longtabl environment. This is usefull when using the hyperref package and allows the viewer to simply jump from somewhere in the document to the right row of the table. At the moment one jumps always to the top of the column?

For instance:


As one can see in \hyperref[r3]{row 3}...

Best Answer

Have a look at the macros \hypertarget and \hyperlink of the hyperref package.

One can create an internal link (almost) anywhere in the document -- including some row in a tabular environment -- with the instruction


where <name> should be a unique "label" that will be used by hyperref to create the "target" and <text> should be whatever should be placed there. E.g., in a tabular environment, <text> could be the content of the first cell of a certain row. You can then link to that "label" elsewhere in the document with the command


where <name> should be the label you chose in the \hypertarget command and <text> can be anything that passes TeX's syntax rules; e.g., it could be the string "there".

Related Question