On Mon, 18 Oct 1999, Paolo wrote:
Sorry to keep you waiting...
> Thank you for your help.
> Your suggestion works corrctly in a latex file, but I am non able to use
> that in LyX.
> I tried the following instruction, in LyX:
>
> \begin{enumerate}
> \setcounter{enumi}{3}
> \item line number 1
> \item line number 2
> \end{enumerate}
>
> Two lines numbered 4 and 5 result, as expected.
>
> Yet I didn't succeed when adding the single command \setcounter{enumi}{3}
> in a LyX enumerate environment.
Okay to make this work in LyX is even uglier than I imagined. The main
problem is that LyX doesn't give us the option of squeezing a line or two
of raw LaTeX in between the \begin{...} and the first \item. If we could
get a good solution to that we could also fix a few other minor problems
like adding toc entries for the Bibliography that would always give the
right page numbers. Anyway, in answer to your question here's an ugly
solution I came up with:
In the first item after the break insert the following as TeX:
[##.]\setcounter{enumi}{##}
where the ## is the number you want the enumeration to start at.
I've also written a \newcommand to add to your preamble to give you a
simpler way of using this scheme:
\newcommand{\setenumi}[1]{#1.\setcounter{enumi}{#1}}
In this case you just write as TeX:
[\setenumi{3}]
at the start of the first \item after the break in enumeration.
I've tried a bunch of stuff but I can't seem to figure out a way to record
the value of enumi from the last \item before the break. I can print the
value out at that \item but can't get a something simple like:
\let\savetheenumi=\value{enumi}
or other variations to work. Any others got ideas here?
Allan. (ARRae)