2

I have created a multi-page timeline using a longtable with enumerated rows (see this answer).

My MWE is as follows:

\begin{longtable}{@{\stepcounter{rowcount}(\therowcount)\hspace*{\tabcolsep}}l p{30em}}
   [date || blank] & [text] \\
   [...repeat...]
\end{longtable}

And it looks like this:

enter image description here

My intention is to be able to then reference these numbers, similar to how court case reports are referenced via paragraph number. I've tried adding \label{tl:{description}}s but when I \ref them I just get the section number for the section of the document containing the timeline.

Is it possible to somehow reference the rowcount value for each row when referencing instead?

1 Answers1

2

The code in question is

@{\stepcounter{rowcount}\therowcount.)\hspace*{\tabcolsep}}

There are two issues, Firstly you need \refstepcounter not \stepcounter so \label sees it, then secondly each @{...} is in its own scope so you probably want

@{}>{\refstepcounter{rowcount}\therowcount.)\hspace*{\tabcolsep}}

so then you can use \label in the first column

David Carlisle
  • 757,742