CLOSE Dave <Dave.Close <at> us.thalesgroup.com> writes: > > I admit I'm a newbie with LyX, but this seems like such a simple > operation. I read that LyX is especially good with lists, numbered, > itemized, etc. Well, I need that in a table. I want one column of my > table to contain the number of that row. For example, > > +------+------+ > | item | head | > +------+------+ > | 1 | text | > +------+------+ > | 2 | text | > +------+------+ > | 3 | text | > +------+------+ > > The numbers should automatically update if I add or delete a row in the > table. I am astounded that I can't easily find a way to do this with > LyX. What am I missing?
It can be done with LaTeX. Add the following to your preamble: \newcounter{trow} \newcommand{\therow}{\addtocounter{trow}{1}\arabic{trow}} Then insert \therow in ERT in the item column. You can copy it and paste it into the item cell of each new row. If you want to use this in more than one table in the same doc, insert \setcounter{trow}{0} in ERT somewhere in the text prior to each table other than the first. Otherwise, numbering in the second table picks up where it left off at the end of the first table. Paul