Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 319
heeen Avatar asked Oct 14 '22 18:10

heeen


1 Answers

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

\newcounter{mycounter}
\newcommand{\mylabel}[1]{\refstepcounter{mycounter} \label{#1}}
like image 144
heeen Avatar answered Oct 20 '22 17:10

heeen