Learn how to use the enumerate and itemize environments to add ordered, unordered and nested lists to your document.
Using lists in LaTeX is pretty straightforward and doesn’t require you do add any additional packages. For unordered lists, LaTeX provides the itemize environment and for ordered lists there is the enumerate environment. The elements within both environments have to be declared beginning with the \item command. The following code examples show how to use the most common types of lists you’re going to use in your document.
Unordered lists
As I’ve mentioned above, unordered lists use the itemize environment and works without any additonal packages:
\begin{itemize} \item One \item Two \item Three \end{itemize}
This will generate the following output:
Ordered lists
If you want to add an ordered list, you simply have to replace itemize with enumerated environment and LaTeX will take care of the enumeration for you:
\begin{enumerate} \item One \item Two \item Three \end{enumerate}
As you can see, LaTeX will automatically get the numbers right:
Nested lists
Sometimes you also have to list things, which have some kind of sub-category. For this reason, LaTeX allows you to nest list environments and it will fix the indentation and numbering accordingly.
% ... \begin{enumerate} \item One \begin{enumerate} \item Two \item Three \item Four \end{enumerate} \item Five \item Six \end{enumerate}
The output will be formatted like this:
Changing the numbering / bullets
Sometimes it’s necessary to change the numbering scheme of a list, e.g. you want to use a different symbol and so forth. You can easily modify the output of the list.
Unordered lists
You can make the following changes easily without loading a package:
%From bullet to dash \item[--] or \item[$-$] % From bullet to asterisk \item[$\ast$] %Use any math character \item[$\CHARACTER$]
A full working code could look like this:
\begin{itemize} \item[--] Dash \item[$-$] Dash \item[$\ast$] Asterisk \end{itemize}
And the output will look as follows:
If you are looking for more bullet styles, check the following tutorial:
If you want to change the symbol for all items of the list, you should preferably use the enumitem environment, which I will explain using the example of ordered lists.
Ordered lists
Changing this environment is a little more tricky, because there’s a lot more logic involved and the easiest solution is probably using the enumerate or enumitem environments. I will use the enumerate environment for this purpose. So I will first add this environment to my preamble:
\documentclass{article} % ... \usepackage{enumitem} \begin{document}
We can now use the following options on the enumerate environment:
%Roman numbers \begin{enumerate}[label=(\roman*)] %... % Arabic numbers \begin{enumerate}[label=\arabic*)] %... % Alphabetical \begin{enumerate}[label=\alph*)] %...
The output will look like this:
You can likewise use this to change the symbol of unordered lists:
\begin{itemize}[label=$\ast$] \item One \item Two \item Three \end{itemize}
Which will consistently change the symbol of all items:
Summary
- Unordered lists can be created using the itemize environment.
- Ordered lists can be created using the enumerate environment.
- Lists can be nested and will be aligned and enumerated properly.
- Use the enumitem package to customize the symbols or enumeration.