@slide(layout=chapter-slide)

@number
6

@title
Enumerations

@slide(layout=content-and-preview)

@title
Unordered lists 📜

@content
``` {.lang-tex .hljs}
\begin{itemize}
    \item lasagna noodles
    \item crushed tomatoes, % …
    \item oregano, basil, % …
    \item mozzarella cheese
    \item flour
    \item milk
\end{itemize}
```

We mark each bullet point with `\item`.
This pattern is the same for all kinds of enumerations.

@preview
![](svg/lists/itemize-english-crop.svg)

@slide(layout=content-and-preview)

@title
Ordered and definition lists

@content
``` {.lang-tex .hljs}
\begin{enumerate}
  \item cook onions over medium % …
  \item add crushed tomatoes, carrots % …
  \item add herbs and spices % …
  % \item …
\end{enumerate}
```

``` {.lang-tex .hljs .fragment}
\begin{description}
  \item [Béchamel sauce] Béchamel % …
  \item [Lasagne] Lasagne (singular % …
\end{description}
```

@preview
<img class="thin-padding" src="svg/lists/enumerate-english-crop.svg" style="margin-bottom: 0;"/>
<img class="thin-padding fragment" src="svg/lists/definition-english-crop.svg"/>

@slide(layout=content-and-preview)

@title
Nested lists

@content
``` {.lang-tex .hljs}
\begin{itemize}
  % …
  \item vegetables \begin{itemize}
    \item crushed tomatoes
    \item carrots
  \end{itemize}
  \item herbs \begin{enumerate}
    \item oregano
    \item basil
  \end{enumerate}
  % …
\end{itemize}
```

@preview
![](svg/lists/nested-lists-english-crop.svg)


@slide(layout=task)

@task-number
6

@title
Adding enumerations

@content
* Turn the recipe in `lists.tex` into an **unordered list** consisting of the elements *Ingredients* and *Instructions*. You can find the file in the directory `exercises/lists`. Use the `itemize` command.
* Within this list, create an **unordered list** for the ingredients and an **ordered list** for the instructions.


@slide(layout=extra-content-and-preview)

@title
Compact lists

@content
The package `paralist` offers enumerations with less line spacing.

``` {.lang-tex .hljs}
\section{Ingredients}
\begin{compactitem}
  % \item …
\end{compactitem}
\section{Preparation}
\begin{compactenum}
  % \item …
\end{compactenum}
\section{Glossary}
\begin{compactdesc}
  % \item …
\end{compactdesc}
```

@preview
![](svg/lists/compact-english-crop.svg)

@slide(layout=extra-content-and-preview)

@title
In-line enumerations

@content
Another feature provided by `paralist` enables us to integrate enumerations into paragraphs.

``` {.lang-tex .hljs}
The following herbs are % …
\begin{inparaitem}
	\item lovage
	\item parsley
	\item chives
\end{inparaitem}
```

Of course, there is an accompanying list type called `inparaenum` for ordered lists.

@preview
<img class="thin-padding" src="svg/lists/paralist-extended-english-crop.svg"/>


@slide(layout=extra-content-and-preview)

@title
List styles

@content
The list style type can be set using the optional parameter `label`.
To accomplish this, we need to  include the package `enumitem` first (but after all other list-related packages).

``` {.lang-tex .hljs}
% Roman numerals
\begin{enumerate}[label=\roman*]
% …
% Arabic numerals
\begin{enumerate}[label=\arabic*]
% …
% Alphabetical
\begin{enumerate}[label=\alph*]
% …
```

@preview
![](svg/lists/list-style-types-english-crop.svg)


@slide(layout=task)

@task-number
6x

@title
Special enumerations

@content
* Try using **Roman numerals** in the ordered list.
* Make the ordered list **start at 7** (keyword: `\setcounter`).
* Reduce the **white space** between the items in the unordered list.