On Apr 8, 8:47 am, jrothim <
jrot...@yahoo.com> wrote:
> Thanks for the response. I was indeed hoping to nest it within a
> table with rows, columns, lines, etc. But getting (referenceable)
> numbering within the table cells was beyond my latex knowledge base.
> I imagine there is a way. Any ideas or prior work out there would be
> appreciated.
Hey Jeff,
Here is one alternative solution to your problem. I created a new
counter (citycntr) that keeps track of your cities, and labels them so
that you can reference them at a later stage. The command used to
identify cities is
\city{<name of city>}{<label for city>}
where both arguments are required. If you want the label to be
optional, one can also do that. However, for now, I thought this would
suffice...
\documentclass{article}
\begin{document}
\newcounter{citycntr}
\renewcommand{\thecitycntr}{\arabic{citycntr}}
\newcommand{\city}[2]{%
\refstepcounter{citycntr}%
\thecitycntr.\ #1 \label{#2}
}
\begin{table}[htb]
\centering
\caption{Syrup production}
\label{tab:syrup}
\begin{tabular}{|c|c|} \hline
\city{Massachusetts}{ma} & 30,000 gallons \\
\city{Vermont}{vt} & 50,000 gallons \\
\city{New Hampshire}{nh} & 60,000 gallons \\ \hline
\end{tabular}
\end{table}
If you ever visit city~\ref{ma} or~\ref{nh}, then you do not have to
visit city~\ref{vt}.
\end{document}
Hope this helps,
Werner