I would like to create a table with labels for an element in each line -- but I want these labels to start at 1 without interfering with the rest of my labels for figures, tables, etc. I'm trying to create a table for a list of requirements (one on each line), and each requirement is assigned a numerical ID.
I'm using the tabularx environment because I'd like to stretch the table across the entire page.
For example, I have:
Code: Select all
\documentclass[pdftex]{book}
\usepackage{tabularx}
\begin{document}
\begin{table} \label{tab
\begin{tabularx}{\linewidth}{|c|X|}
\em{ID} & \em{Name} \\
1.0 & Requirement 1 \\
1.1 & Subrequirement 1 \\
2.0 & Requirement 2 \\
%...
\end{tabularx}
\caption{My list of requirements}
\label{tab:reqs}
\end{table}
The table above is Table \ref{tab:reqs}.
\end{document}
I've tried putting a label after "Requirement 1" and referencing to it in the ID column, but shows nothing in the ID column or in subsequent references (outside the table doesn't generate anything either).
I'm using pdflatex and I don't seem to be getting any warnings or errors indicating that it cannot find the label.
Thanks in advance,
Alex