2023-11-18 01:26:09 +01:00

3.2 KiB

@slide(layout=chapter-slide)

@number 7

@title Enumerations

@slide(layout=content-and-preview)

@title Unordered lists 📜

@content

\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

@slide(layout=content-and-preview)

@title Ordered and definition lists

@content

\begin{enumerate}
  \item cook onions over medium % …
  \item add crushed tomatoes, carrots % …
  \item add herbs and spices % …
  % \item …
\end{enumerate}
\begin{description}
  \item [Béchamel sauce] Béchamel % …
  \item [Lasagne] Lasagne (singular % …
\end{description}

@preview

@slide(layout=content-and-preview)

@title Nested lists

@content

\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

@slide(layout=task)

@task-number 7

@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 a unordered list for the ingredients and a ordered list for the instructions.

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

@title Compact lists

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

\section{Ingredients}
\begin{compactitem}
  % \item …
\end{compactitem}
\section{Preparation}
\begin{compactenum}
  % \item …
\end{compactenum}
\section{Glossary}
\begin{compactdesc}
  % \item …
\end{compactdesc}

@preview

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

@title In-line enumerations

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

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

@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.

% Roman numerals
\begin{enumerate}[label=\roman*]
% …
% Arabic numerals
\begin{enumerate}[label=\arabic*]
% …
% Alphabetical
\begin{enumerate}[label=\alph*]
% …

@preview