Translate lists chapter

This commit is contained in:
Knoch 2021-07-07 18:08:43 +02:00
parent 6e0942fb21
commit 180a35c8ac
11 changed files with 66 additions and 57 deletions

View File

@ -1,22 +1,23 @@
\chapter{Aufzählungen} \chapter{Lists}
\label{sec:lists} \label{sec:lists}
Von Haus aus unterstützt \LaTeX\ drei Aufzählungstypen: ungeordnete und geordnete Listen sowie Definitionslisten. Inherently, \LaTeX{} supports three types of lists: unordered, ordered, and description lists.
Zu jedem dieser Typen existieren eigene Umgebungen, die aber grundsätzlich gleich aufgebaut sind. For each of these types, there are dedicated environments whose structure is very similar.
\example{lst:unordered-list}{lists/nested-list}{Beispielhafte ungeordnete Aufzählung} \example{lst:unordered-list}{lists/nested-list}{Examplary unordered list}
In \cref{lst:unordered-list-code} werden verschiedene Listenelemente (\mintinline{latex}{\item}) von einer \mintinline{latex}{itemize}-Umgebung eingerahmt. In \cref{lst:unordered-list-code}, different list items (\mintinline{latex}{\item}) are framed by an \mintinline{latex}{itemize} environment.
Innerhalb eines Listenelements kann eine neue Listen\-umgebung eröffnet werden, um eine verschachtelte Liste zu erhalten. Within a list item, we can open a new list environment to create a nested list.
Ersetzt man \mintinline{latex}{itemize} durch \mintinline{latex}{enumerate}, erhält man bei sonst gleichem Quelltext eine geordnete Liste. If we replace \mintinline{latex}{itemize} by \mintinline{latex}{enumerate}, the list becomes ordered without changing the source code any further.
Für etwas weniger gebräuchliche Definitionslisten muss die Umgebung \mintinline{latex}{description} verwendet werden. To make use of the less common description lists, we have to specify the environment \mintinline{latex}{description}.
Außerdem erhalten die Elemente in eckigen Klammern den zu definierenden Begriff (\cref{lst:definition-list}). Moreover, the items need to be extended by the term to be defined, put in brackets (\cref{lst:description-list}).
\Example{lst:definition-list}{lists/definition-list}{lists/definition-list_crop}{Beispielhafte Definitionsliste} \Example{lst:description-list}{lists/description-list}{lists/description-list_crop}{Exemplary description list}
Die sehr großen Abstände zwischen einzelnen Listenelementen können durch das Paket \mintinline{latex}{paralist}\footnote{\url{https://www.ctan.org/pkg/paralist}} verringert werden. The exuberant spacing between list items can be reduced by utilizing the \mintinline{latex}{paralist}\footnote{\url{https://www.ctan.org/pkg/paralist}} package.
Hierzu wird nur der Umgebungsname ersetzt: \mintinline{latex}{compactitem} statt \mintinline{latex}{itemize}, \mintinline{latex}{compactenum} statt \mintinline{latex}{enumerate} und \mintinline{latex}{compactdesc} statt \mintinline{latex}{description}. To do so, we simply adjust the environment name: \mintinline{latex}{compactitem} replaces \mintinline{latex}{itemize}, \mintinline{latex}{compactenum} replaces \mintinline{latex}{enumerate}, and \mintinline{latex}{compactdesc} replaces \mintinline{latex}{description}.
Soll die Aufzählung im Fließtext erscheinen, bringt \mintinline{latex}{paralist} dafür die Umgebungen \mintinline{latex}{inparaenum} und \mintinline{latex}{inparaitem} mit. If the list ought to appear within a text body, \mintinline{latex}{paralist} provides the extra environments \mintinline{latex}{inparaenum} and \mintinline{latex}{inparaitem}.
Um das Aufzählungszeichen oder die Nummerierung anzupassen, kann das Paket \mintinline{latex}{enumitem}\footnote{\url{https://www.ctan.org/pkg/enumitem}} verwendet werden. We can customize bullet and list numbering styles via the \mintinline{latex}{enumitem}\footnote{\url{https://www.ctan.org/pkg/enumitem}} package.
\mintinline{latex}{\begin{enumerate}[label=\roman*]} erzeugt eine Liste mit römischen Zahlen. Für alphabetische Nummerierung sorgt der Parameter \mintinline{latex}{[label=\alph*]}. \mintinline{latex}{\begin{enumerate}[label=\roman*]} produces a list with Roman numerals.
The parameter \mintinline{latex}{[label=\alph*]} inserts alphabetical numbering.

View File

@ -1,20 +1,26 @@
Ingredients:
400 g berries, 50 ml maple sirup, 4 lemons, 1 l cold water, 400 g ice cubes
\noindent Instructions: Boil and shred the berries, add maple sirup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly
\begin{minted}{latex} \begin{minted}{latex}
\begin{itemize} \begin{itemize}
\item Zutaten: \item Ingredients:
\begin{compactitem} \begin{compactitem}
\item 400 g Beeren \item 400 g berries
\item 50 ml Ahornsirup \item 50 ml maple sirup
\item 4 gepresste Zitronen \item 4 lemons
\item 1 Liter kales Wasser \item 1 l cold water
\item 400 g Eiswürfel \item 400 g ice cubes
\end{compactitem} \end{compactitem}
\item Arbeitsschritte: \item Instructions:
\begin{compactenum} \begin{compactenum}
\item Beeren kochen und zu Saft verarbeiten \item boil and shred the berries
\item Ahornsirup hinzufügen \item add maple sirup
\item Zitronensaft auspressen \item squeeze the lemons and add their juice
\item restliche Zutaten zusammenfügen und verrühren \item add the remaining ingredients
\item scramble thoroughly
\end{compactenum} \end{compactenum}
\end{itemize} \end{itemize}
\end{minted} \end{minted}

View File

@ -1,4 +1,4 @@
Zutaten: Ingredients:
400 g Beeren, 50 ml Ahornsirup, 4 gepresste Zitronen, 1 Liter kaltes Wasser, 400 g Eiswürfel 400~g berries, 50~ml maple sirup, 4~lemons, 1~l cold water, 400~g ice cubes
\noindent Arbeitsschritte: Beeren kochen und zu Saft verarbeiten, Ahornsirup hinzufügen, Zitronensaft auspressen, restliche Zutaten zusammenfügen und verrühren \noindent Instructions: Boil and shred the berries, add maple sirup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly

View File

@ -1,3 +1,5 @@
Formatiert das Rezept in der Datei \mintinline{bash}{exercises/lists/lists.tex} als ungeordnete Liste (\mintinline{latex}{itemize}) mit den Elementen \emph{Zutaten} und \emph{Arbeitsschritte}. Innerhalb dieser soll eine kompakte, ungeordnete Liste (\mintinline{latex}{compactitem}) der Zutaten erstellt werden. Die Arbeitsschritte hingegen sollen als kompakte, geordnete Liste dargestellt werden. % TODO:
Format the recipe you can find in \mintinline{bash}{exercises/lists/lists.tex} as an unordered list (\mintinline{latex}{itemize}) with sub-lists \emph{Ingredients} and \emph{Instructions}.
Within these, there shall be a compact, unordered list (\mintinline{latex}{compactitem}) of ingredients and a compact, ordered list of instructions, respectively.
\exercisematerial{exercises/lists/lists} \exercisematerial{exercises/lists/lists}

View File

@ -1,6 +0,0 @@
\begin{description}
\item [Béchamelsauce] Béchamelsauce, Sauce Béchamel oder Milchsauce %
\item [Lasagne] Als Lasagne (Plural Lasagnen) werden sowohl %
\end{description}
\end{document}

View File

@ -1,15 +0,0 @@
\documentclass[a4paper]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\begin{document}
\thispagestyle{empty}
\begin{description}
\item [Béchamelsauce] Béchamelsauce, Sauce Béchamel oder Milchsauce ist eine helle Sauce aus Milch, Butter und Mehl, die meist zu Gemüse, Kartoffeln oder Eierspeisen serviert wird. Als klassische Grundsauce findet sie variiert bei vielen Gerichten Verwendung. Vgl. \url{https://de.wikipedia.org/wiki/B%C3%A9chamelsauce}.
\item [Lasagne] Als Lasagne (Plural Lasagnen) werden sowohl besonders breite Bandnudeln als auch der mehrere Teigschichten (Nudelplatten) beinhaltende Auflauf bezeichnet. Vgl. \url{https://de.wikipedia.org/wiki/Lasagne}.
\end{description}
\end{document}

View File

@ -0,0 +1,6 @@
\begin{description}
\item [Béchamel sauce] Béchamelsauce, also known as white sauce, %
\item [Lasagne] Lasagne (singular lasagna) are a type of wide, %
\end{description}
\end{document}

Binary file not shown.

View File

@ -0,0 +1,15 @@
\documentclass[a4paper]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\begin{document}
\thispagestyle{empty}
\begin{description}
\item [Béchamel sauce] Béchamel sauce, also known as white sauce, is made from a white roux (butter and flour) and milk. It has been considered, since the seventeenth century, one of the mother sauces of French cuisine. (cf. \url{https://en.wikipedia.org/wiki/B%C3%A9chamel_sauce})
\item [Lasagne] Lasagne (singular lasagna) are a type of wide, flat pasta, possibly one of the oldest types of pasta. Lasagne, or the singular lasagna, commonly refers to an Italian cuisine dish made with stacked layers of this flat pasta alternated with sauces and ingredients such as meats, tomato sauce and other vegetables, cheese (which may include ricotta and parmesan), and seasonings and spices such as garlic, oregano and basil. (cf. \url{https://en.wikipedia.org/wiki/Lasagne})
\end{description}
\end{document}

View File

@ -1,9 +1,9 @@
\begin{itemize} \begin{itemize}
\item Nudelplatten \item lasagne noodles
\item Passierte Tomaten \item crushed tomatoes
\item Kräuter \begin{enumerate} \item herbs \begin{enumerate}
\item Oregano \item oregano
\item Basilikum \item basil
\item Rosmarin \item rosemary
\end{enumerate} \end{enumerate}
\end{itemize} \end{itemize}