GeneralDescript List Indenting

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
bramp
Posts: 10
Joined: Mon Aug 25, 2008 5:33 pm

Descript List Indenting

Post by bramp »

I'm having problems customising the apperance of my lists. Take for example:

Code: Select all

\begin{description}
  \item[Item 1] A big long bit of text describing item one, which goes on and on and on, hopefully on to another line

  \item[Item 2] A big long bit of text describing item one, which goes on and on and on, hopefully on to another line
\end{description}
Now if we take Item 1 for example, it wraps onto two lines. The second line it is indented. What I want is to reduce that indentation.

I have tried using the enumitem package, but have not been able to find the command to reduce that indentation.

Can someone help?
thanks

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Descript List Indenting

Post by Stefan Kottwitz »

Hi bramp,

one possibility is to redefine the description environment:

Code: Select all

\renewenvironment{description}
  {\list{}{\labelwidth0pt\leftmargin0pt
    \let\makelabel\descriptionlabel}}
  {\endlist}
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Descript List Indenting

Post by localghost »

The enumitem package offers to set the option leftmargin, which is indirectly responsible for the indentation of the second line (and all further ones).

Code: Select all

\begin{description}[leftmargin=0pt]
  \item[Item 1:] A big long bit of text describing item one, which goes on and on and on, hopefully on to another line

  \item[Item 2:] A big long bit of text describing item one, which goes on and on and on, hopefully on to another line
\end{description}
You can set this option globally by defining some properties for the description environment in the preamble.

Code: Select all

\setdescription{leftmargin=0pt}
Further explanations are given by the documentation of enumitem.


Best regards
Thorsten¹
bramp
Posts: 10
Joined: Mon Aug 25, 2008 5:33 pm

Re: Descript List Indenting

Post by bramp »

ah thankyou!

I tired a bunch of different things from emumitem, but not leftmargin. I assumed that would be the margin for the whole list, but changing it seems to only effect the 2nd line.

thanks
Andrew
Post Reply