Text Formatting ⇒ Itemizing with description: why does it indent?
-
- Posts: 3
- Joined: Sat Feb 20, 2010 3:12 am
Itemizing with description: why does it indent?
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Itemizing with description: why does it indent?
[1] View topic: Avoidable mistakes
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Itemizing with description: why does it indent?
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?
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