I would like to reference a row in a table. Where, for example, the 3rd row of table 2 would output [2.3].
Below is some code that sets up a counter and outputs the references and outputs the row of the table, but does not preface it with the table number.
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{tabularx}\usepackage{hyperref}\newcounter{rownumber}[figure]\setcounter{rownumber}{1}\begin{document}\section{A section}This is just some random text\dots\subsection{A Sub-section}\subsection{Another Sub-section}\begin{figure}[h!]\caption{is here}\begin{tabular}{| c | c | c | }\refstepcounter{rownumber}\label{r1} 1 & my first row & some text \\\refstepcounter{rownumber}\label{r2} 2 & my second row & some other text \\\refstepcounter{rownumber}\label{r3} 3 & third row & final text \\\end{tabular}\end{figure}\subsection{A Sub-Phase}\section{YYYY}YYYY\section{ZZZZZZZZ}The rownumber is \hspace{\value{rownumber}\parindent}\subsection{A Sub-Phase}1st Reference: \ref{r1}\\Second Reference: \ref{r2}\\