Text FormattingRemove nested List Indentation

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Remove nested List Indentation

Post by ghostanime2001 »

When nesting an enumerate list environment inside another enumerate environment. How can you remove the second level indentation?
Last edited by ghostanime2001 on Sun Aug 07, 2011 7:15 am, edited 1 time in total.

Recommended reading 2024:

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

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Remove nested List Indentation

Post by kaiserkarl13 »

You can use a generic list:

Code: Select all

\begin{list}{\labelenumii}{\usecounter{enumii}\leftmargin=0em}
  \item First item in the list
  \item Second item
  \item and so on
\end{list}
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Remove nested List Indentation

Post by ghostanime2001 »

what about for enumerate?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Remove nested List Indentation

Post by Stefan Kottwitz »

Also here, you could use the enumitem package, it also has options for setting the indentation, by commands such as

Code: Select all

\setenumerate[2]{labelindent=0pt,itemindent=0pt}
Stefan
LaTeX.org admin
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Remove nested List Indentation

Post by ghostanime2001 »

Does this go in the preamble?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Remove nested List Indentation

Post by Stefan Kottwitz »

Yes, as it doesn't concern a specific list, it's a general setting for level 2 for all enumerate lists. All document wide settings should go into the preamble.

Stefan
LaTeX.org admin
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Remove nested List Indentation

Post by ghostanime2001 »

I know what you mean by document wide. But how can you tell which commands are document-wide?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Remove nested List Indentation

Post by Stefan Kottwitz »

I mean the commands that you would like to have document wide effect, so you can make the decision. Of course some commands have to be in the preamble, such as \usepackage. Other commands can be used afterwards, for example if you would like to change a setting in the middle of a document, or just for a certain range of text.

Stefan
LaTeX.org admin
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Remove nested List Indentation

Post by ghostanime2001 »

Can you especially help me with "Correct Alignment of nested Counters with outer Contents" post because these few posts I posted are really leading up to this post. I've tried everything to remove the whitespace on the labels in the second enumerate environment. But I just' can't align them properly :(
Post Reply