latexlabelrefhyperreflongtable

Latex: hyperref to individual longtable rows


I have a few longtables that stretch several pages and I want to use pageref and hyperref to link to these rows.

But whatever I try, the links always refer to the start of the table. When I look into the aux file, the labels all seem to be re-defined into table.[number of table].

I tried putting invisible dummy figures into the table, but that just gives me errors of too many floats.

I also tried putting the labels into minipages, to no avail.

Even putting the labels into footnotes doesn't work, somehow longtable always seems to get to them.


Solution

  • I solved this problem by introducing a custom counter and label command:

    \newcounter{mycounter}
    \newcommand{\mylabel}[1]{\refstepcounter{mycounter} \label{#1}}