GeneralRenewing the enumerate environment and keep nesting support.

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
DoubleJ
Posts: 2
Joined: Fri May 31, 2013 10:11 am

Renewing the enumerate environment and keep nesting support.

Post by DoubleJ »

Hello,

In my document I want to change the spacing of the enumerate environment, in order to do so, I renew the environment:

Code: Select all

\renewenvironment{enumerate}%
{\begin{list}{\arabic{enumi}.}%
	  {\setlength{\leftmargin}{2.5em}%
	   \setlength{\itemsep}{-\parsep}%
	   \setlength{\topsep}{-\parskip}%%
	   \usecounter{enumi}}%
 }{\end{list}}
This makes the default enumerate list appear as I want to, however the problem is that nested lists are not supported anymore because the same counter is used for all the nested lists too. How can I renew this list environment such that if I am in a nested list, I use another counter:

Code: Select all

\begin{enumerate} % Uses enumi
	 \item An item
	 	 \begin{enumerate} % Uses enumii
	 	 \item Etc.
% ..... Close tags and so on
Thanks in advance.

Regards,
JJ

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Renewing the enumerate environment and keep nesting support.

Post by Johannes_B »

Have a look at the enumitem-package.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
DoubleJ
Posts: 2
Joined: Fri May 31, 2013 10:11 am

Renewing the enumerate environment and keep nesting support.

Post by DoubleJ »

Johannes_B wrote:Have a look at the enumitem-package.
This is not the solution that I am looking for. I tried this package and this conflicted a lot with other packages I use, I don't know exactly which. The packages are required as they are part of a template we use to write reports.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Renewing the enumerate environment and keep nesting support.

Post by localghost »

DoubleJ wrote:This is not the solution that I am looking for. I tried this package and this conflicted a lot with other packages I use, I don't know exactly which. The packages are required as they are part of a template we use to write reports.
The exact purpose of building a self-contained and minimal example is to find out this conflict. Furthermore it would give us an adequate problem description. So please reduce the problem to only relevant code and present it here.


Best regards and welcome to the board
Thorsten
Post Reply