[texhax] need help with LaTeX

Philip G. Ratcliffe philipratcliffe at tiscali.it
Mon Jan 17 13:04:15 CET 2005


> I would appreciate if someone can help me out. I am creating a table in
> LaTeX format which is done, now what I would like to do is to
> have counter
> in those column. So here is what i would like to achieve.

This goes part of the way - you should be able to figure out modifications.

\documentclass{article}
\newcounter{tableitem}
\newcommand\tableitem{\protect\stepcounter{tableitem}\thetableitem}
\newcounter{tableitemitem}
\newcommand\tableitemitem{\protect\stepcounter{tableitemitem}\thetableitem.\
thetableitemitem}
\makeatletter%
    \@addtoreset{tableitemitem}  {tableitem}
\makeatother%
\begin{document}
\begin{tabular}{rr}
  \setcounter{tableitem}{0}
  \tableitem & A1 is \tableitemitem
\\
             & A2 is \tableitemitem
\\
  \tableitem & BB is \tableitemitem
\end{tabular}
\end{document}

Cordialmente,  Philip G. Ratcliffe
-----------------------------------------
Professor of Nuclear & Subnuclear Physics
Dipartimento di Fisica e Matematica
Universita degli Studi dell'Insubria
via Valleggio 11
22100 Como (CO)
Italy

Tel. +39 (031) 238.6231
Fax  +39 (031) 238.6119
Cell +39 (340) 2346580
Web  http://www.unico.it/~pgr
-----------------------------------------



More information about the texhax mailing list