[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-users
Subject:    Re: Enumerate without reset problem
From:       Guenter Milde <G.Milde () physik ! tu-dresden ! de>
Date:       2002-08-28 7:11:09
[Download RAW message or body]

On Tue, 27 Aug 2002 21:22:57 -0600 wrote bintut@softhome.net:

> Hello gurus, 
> 
> I have another problem with the "enumerate without reset" feature based from 
> <http://www.lyx.org/help/list/enum.php3>. 
> 
>  - - - < s n i p > - - -
> \newcounter{myEnumCounter}
> \newcounter{mySaveCounter}
> \renewenvironment{enumerate}{%
>  \begin{list}{\arabic{myEnumCounter}.}{\usecounter{myEnumCounter}%
>  \setcounter{myEnumCounter}{\value{mySaveCounter}}}
>  }{%
>  \setcounter{mySaveCounter}{\value{myEnumCounter}}\end{list}%
> }
> \newcommand\myEnumReset{\setcounter{mySaveCounter}{0}}
>  - - - < s n i p > - - - 
> 
> My problem is, if I put the above snippet in my preamble, it goes global 
> which I don't want to happen. 

You need a separate environment for the enumerate_continuously.

You might try

 - - - < s n i p > - - -
\newcounter{myEnumCounter}
\newcounter{mySaveCounter}
\newenvironment{enumerate_continuously}{%
 \begin{list}{\arabic{myEnumCounter}.}{\usecounter{myEnumCounter}%
 \setcounter{myEnumCounter}{\value{mySaveCounter}}}
 }{%
 \setcounter{mySaveCounter}{\value{myEnumCounter}}\end{list}%
}
\newcommand\myEnumReset{\setcounter{mySaveCounter}{0}}
 - - - < s n i p > - - - 

and look in the Extended guide to see how to make a LyX paragraph style out
of it (or see at the layouts in $lyxdir/layout, copy one to ~/.lyx/layout
and modify...)

> Not only that, the second level of some of my 
> enumeration has been reset and starts as 1 and not 1.1 for example.  And if 
> I tried it as a TeX command, I got so many errors.  Any other ideas on how I 
> can enumerate without reset in a particular part of my documentation? 

For the second level (and subsequent ones) I suppose things get more
complicated: you might need a good LaTeX book to see how to solve this...


Guenter


--
G.Milde at physik.tu-dresden.de

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic