0

I have an itemize with custom item names.

How do I left-align and right-pad the item names so that they start in line with normal text on the page and the item descriptions align with each other?

This is what I am currently working with:

\begin{itemize}
\item[Array:]
Fixed size vector of other type-objects.\newline
All type-objects contained must be of the same type.
...
\item[BasicType:]
All scalar types of C (int, double, unsigned short, char\ldots).\newline
Represented as a fixed-size vector of bytes.
\end{itemize}

And this is how it looks like: enter image description here

1

1 Answer 1

2

Next time please give a minimal working sample.

I advise you to use the description environment which could be revised to get the desired output by the enumitem package. See the following MWS. By the way, it's better to delete the colons (:) after the label words.

\documentclass{article}
\usepackage{enumitem}

\begin{document}
Some texts.
\begin{description}[leftmargin=7em, labelwidth=7em, labelsep=0em]
\item[Array:]
Fixed size vector of other type-objects.\newline
All type-objects contained must be of the same type.
...
\item[BasicType:]
All scalar types of C (int, double, unsigned short, char\ldots).\newline
Represented as a fixed-size vector of bytes.
\end{description}
Some more texts.
\end{document}

enter image description here



At last, let me explain different uses of the enumerate, itemize and description environments: (1) enumerate lists items with orders, and so is used for ordered lists; (2) itemize lists items without orders, and so is used for unordered lists; (3) description lists items with or without orders and with contents to explain the label words, and so so is used for descriptive lists.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .