Text FormattingMake margins of description the same as margins of enumerate

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
porton
Posts: 7
Joined: Wed Mar 04, 2015 12:24 am

Make margins of description the same as margins of enumerate

Post by porton »

Please help to write suitable \renewenvironment to make the margins of `description` environment exactly the same as margins of `enumerate` environment.

I am about all: the left margin for the label, the space after the label, the indent of a new paragraph inside the list for `description`, to become exactly the same as the corresponding margins of `enumerate`.

I use `amsbook` class.

Please help.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Make margins of description the same as margins of enumerate

Post by rais »

porton wrote:Please help to write suitable \renewenvironment to make the margins of `description` environment exactly the same as margins of `enumerate` environment.
isn't a {description} label wider than an item bullet or number? What's the point, then?
Have you considered using {itemize} instead of {description} (testwise, perhaps)?

The enumitem package may offer what you're looking for (so far, I only used it for adaptable {enumerate} lists; not sure what it does {description}-wise).

KR
Rainer
porton
Posts: 7
Joined: Wed Mar 04, 2015 12:24 am

Make margins of description the same as margins of enumerate

Post by porton »

rais wrote:
porton wrote:Please help to write suitable \renewenvironment to make the margins of `description` environment exactly the same as margins of `enumerate` environment.
isn't a {description} label wider than an item bullet or number? What's the point, then?

Have you considered using {itemize} instead of {description} (testwise, perhaps)?

The enumitem package may offer what you're looking for (so far, I only used it for adaptable {enumerate} lists; not sure what it does {description}-wise).

KR
Rainer
I want it to work in the special case when the {description} label is thin.

{itemize} is not what I need.
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Make margins of description the same as margins of enumerate

Post by rais »

porton wrote: I want it to work in the special case when the {description} label is thin.

{itemize} is not what I need.
what, just because the label's not in bold face when using itemize?
\item[\textbf{...}] should do it inside {itemize}, then. Or perhaps

Code: Select all

\newcommand*\ditem[1][]{\item[\textbf{#1}]}
then you can use \ditem instead of \item.
I'm just saying using {itemize} may be easier than adapting the {description} environment.
For the latter, see `texdoc enumitem'.

KR
Rainer
Post Reply