Hi guys,
I am trying to itemize using the \begin{description} command in LaTeX when writing up solutions. How do you get it to where, when the text (in the compiled Pdf documument) wraps around to start a new line, it lines up with the beginning of the previous line? I start off my code with
\begin{description}
\item[\textbf{1.}] one two three four five six seven eight nine ten \\
eleven thirteen fourteen
\end{description}
In the compiled Pdf file, the second line is indented for some reason. So in the case above, below the first line,"eleven" is indented to right a bit and is not in align with the first line. What I would like in the example above is for "eleven" to begin right below "one", perfectly aligned. I notice that it does this properly when I use the "enumerate" command, but not with "description".Is this possible?
My preamble is:
\documentclass[10pt]{article}
\usepackage[hmargin=3cm,vmargin=2.5cm]{geometry}
\usepackage{amscd, amsmath,amssymb}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.1in}
Thanks a lot for any help!
james
Text Formatting ⇒ Itemizing with description: why does it indent?
-
- Posts: 3
- Joined: Sat Feb 20, 2010 3:12 am
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Itemizing with description: why does it indent?
At first, get used to posting always full examples because such code snippets are completely useless [1]. Regarding your problem you obviously never heard of the enumerate environment.
[1] View topic: Avoidable mistakes
Best regards
Thorsten
[1] View topic: Avoidable mistakes
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Itemizing with description: why does it indent?
James says in the post that he knows about the enumerate "command". (I assume he means environment.) It just isn't clear why he's not using it.
Hanging indent is normal for description lists. If you want to change it, probably using some of the features of the enumitem package is best.
E.g.:
But if this is really an enumeration, you'd be better off using enumerate, as Thorsten hints.
Just a quick example:
Read the enumitem documentation for more info.
Hanging indent is normal for description lists. If you want to change it, probably using some of the features of the enumitem package is best.
E.g.:
Code: Select all
\documentclass[10pt]{article}
\usepackage[hmargin=3cm,vmargin=2.5cm]{geometry}
\usepackage{amscd, amsmath,amssymb}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.1in}
\usepackage{enumitem}
\setdescription{leftmargin=0pt}
\begin{document}
\begin{description}
\item[\textbf{1.}] one two three four five six seven eight nine ten \\
eleven thirteen fourteen
\end{description}
\end{document}
Just a quick example:
Code: Select all
\documentclass[10pt]{article}
\usepackage[hmargin=3cm,vmargin=2.5cm]{geometry}
\usepackage{amscd, amsmath,amssymb}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.1in}
\usepackage{enumitem}
\setenumerate{leftmargin=0pt,itemindent=1.5em,labelsep=1.5em,labelwidth=0pt,align=left,label={\textbf{\arabic*.}}}
\begin{document}
\begin{enumerate}
\item one two three four five six seven eight nine ten \\
eleven thirteen fourteen
\end{enumerate}
\end{document}
-
- Posts: 3
- Joined: Sat Feb 20, 2010 3:12 am
Re: Itemizing with description: why does it indent?
Thanks for your responses,
The reason I'm not using the enumerate command is because I don't necessarily need it to go in counting order since we are assigned random problems from our book. Sometimes the sequence might go "6, 10, 19". Additionally, I like to have the number in bold which enumerate does not do.
Thanks again,
James
The reason I'm not using the enumerate command is because I don't necessarily need it to go in counting order since we are assigned random problems from our book. Sometimes the sequence might go "6, 10, 19". Additionally, I like to have the number in bold which enumerate does not do.
Thanks again,
James
Re: Itemizing with description: why does it indent?
Understood about your first point, though you'll see with my enumerate example that it can use bold if you tell it to.