translate document-structure example and make other minor changes

This commit is contained in:
Fradtschuk 2021-09-05 11:07:52 +02:00
parent 36c5dd0ac8
commit a7e734a5e2
7 changed files with 43 additions and 41 deletions

View File

@ -21,7 +21,7 @@ In addition to the standard document classes, the \acro{KOMA} script classes hav
They provide alternatives to the document classes mentioned above:
In lieu of \mintinline{latex}{article} you can use \mintinline{latex}{scrartcl}, \mintinline{latex}{report} is replaced by \mintinline{latex}{scrreport}, and \mintinline{latex}{scrbook} can be used instead of \mintinline{latex}{book}.
As a replacement for \mintinline{latex}{letter}, one can use \mintinline{latex}{scrlttr2}.
A complete list of all \acro{KOMA} script classes is available online\footnote{Available at: \url{https://komascript.de/omascriptbestandteile}}.
A complete list of all \acro{KOMA} script classes is available online.\footnote{Available at: \url{https://komascript.de/omascriptbestandteile}}
By using \acro{KOMA} document classes, the layout of the generated \acro{PDF} document is changed.
On top of that, they provide additional functionalities.
The standard document classes are designed according to the American-English
@ -30,7 +30,7 @@ writing letters.
Each \mintinline{latex}{\documentclass} command can hold optional parameters in
square brackets.
\mintinline{latex}{\documentclass[10pt,a5paper,landscape]{scrartcl}}, for instance, configures a \acro{KOMA} script article and sets its font size to 10\,pt\footnote{The standard font size is 12,pt.}, the page size to A5\footnote{The default case would be A4.}, and the orientation of the page to landscape.
\mintinline{latex}{\documentclass[10pt,a5paper,landscape]{scrartcl}}, for instance, configures a \acro{KOMA} script article and sets its font size to 10\,pt,\footnote{The standard font size is 12\,pt.} the page size to A5,\footnote{The default case would be A4.} and the orientation of the page to landscape.
The language can be passed as an optional parameter, too (cf. \cref{sec:language}).
\subsection{Digression: packages}
@ -45,7 +45,7 @@ Packages provide additional commands and functionalities that we can use within
There are numerous packages for different use cases (e.\,g., typesetting formulas, lists, \textellipsis).
In order to use a package, it must be included within the preamble.
To do so, the above-mentioned command is used.
The most important \LaTeX{} packages can be found in the Comprehensive \TeX\ Archive Network\footnote{Available at: \url{https://www.ctan.org/}}, short: \acro{CTAN}.
The most important \LaTeX{} packages can be found in the Comprehensive \TeX\ Archive Network,\footnote{Available at: \url{https://www.ctan.org/}} short: \acro{CTAN}.
You can also find the documentation for the packages there.
\subsection{Encoding}
@ -63,6 +63,7 @@ As a consequence, \acro{UTF-8}\footnote{cf. \url{https://en.wikipedia.org/wiki/U
In \LaTeX{}, we need to specify two character encodings:
The input encoding (short: \mintinline{latex}{inputenc}), which refers to our source code, and the font encoding (short: \mintinline{latex}{fontenc}), which concerns the choice of the file that is used to portray the content within our \acro{PDF} document, since we also need special characters there.
\todo{fontenc wird hier sehr umständlich beschrieben bzw. ist in dieser Detailtiefe nicht unbedingt relevant}
\todo{Wie wäre es mit \enquote{\[...\] and the font encoding, which determines how the content of our PDF document looks like.} oder so ähnlich?}
\footnote{Details on \mintinline{latex}{fontenc} can be found at: \url{https://tex.stackexchange.com/questions/108417/font-encoding-in-latex}}
\mintinline{latex}{T1} is an encoding that tries to cover most European languages with a limited number of characters.
@ -119,7 +120,7 @@ The commands that are depicted in \cref{lst:headlines} can be used with any docu
\todo{Beispiele neu generieren.}
Depending on your specified document class, the commands \mintinline{latex}{\chapter{Chapter}} and \mintinline{latex}{\part{Part}} are additionally available -- for instance in books.
You can mark the command with an asterisk if you want to omit the numbering of a section and exclude it from the table of contents\footnote{cf. \cref{sec:table-of-contents}}:
You can mark the command with an asterisk if you want to omit the numbering of a section and exclude it from the table of contents:\footnote{cf. \cref{sec:table-of-contents}}
\begin{minted}{latex}
\section*{This section is excluded from the table of contents}

View File

@ -27,9 +27,9 @@ There are different export options, but most of the time we output the document
As a brief example for a command, we shall use the \replaced[id=C]{emphasis}{highlighting} of words or sentences.
The command is \mintinline{latex}{\emph{}}.
We write the text we want to \replaced[id=C]{emphasize}{highlight} inside the curly brackets in the source code, like this:
We write the text we want to \replaced[id=C]{emphasize}{highlight} inside the curly braces in the source code, like this:
\mintinline{latex}{\emph{Good morning!}}.
In the resulting PDF, this text will appear in italics: \emph{Good morning!}
In the resulting \acro{PDF}, this text will appear in italics: \emph{Good morning!}
There is no trace of the command identifier and the special characters.
You can see, we are not writing italic text inside the source code, we just tell the compiler that certain words should be \replaced[id=C]{emphasized}{highlighted} by the use of a command.
@ -43,8 +43,8 @@ The principle is similar to style sheets in office programs, although more consi
\section{What do we need to use \LaTeX{}?}
\label{subsec:what-we-need}
If we want to generate a PDF document with \LaTeX{}, we need at least two programs.
One to create the source code, and a second to process the source code.
If we want to generate a \acro{PDF} document with \LaTeX{}, we need at least two programs.
One to create the source code, and a second one to process the source code.
The latter is the already mentioned compiler.
In principle, a simple text editing program is sufficient for creating the source code.

View File

@ -38,7 +38,7 @@ One of these programs is \TeX{}studio.\footnote{You find the latest version on \
To prevent errors during the compilation of our document, you have to change the compiler command.
In \TeX{}studio, click on the \emph{Options} button and then on \emph{Configure \TeX{}studio \textellipsis}\todo{Add the correct steps for Mac (these dont apply)}.
A new window will open up.
Navigate to the \emph{Commands} area and, next to \emph{PdfLaTeX}, add the flag \mintinline{bash}{-shell-escape}.
Navigate to the \emph{Commands} area, and, next to \emph{PdfLaTeX}, add the flag \mintinline{bash}{-shell-escape}.
In other words: The command for \emph{PdfLaTeX} should look like this:
\mint{bash}{pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex}

View File

@ -10,7 +10,7 @@ In 1968, the first volume was published, at that time still printed using mechan
This method was just disappearing then, and being replaced by new methods.
However, the author did not like the results of those new methods, so,
at the end of the 70s, he began to develop his own typesetting system \TeX{}
(pronounced as \emph{tech}\todo{is that a valid transliteration in english?}), named after the ancient Greek word \texttau$\mathrm{\acute{\varepsilon}}$\textchi\textnu\texteta{} (technē) meaning \emph{art, craft}.
(pronounced as \emph{tech}\todo{is that a valid transliteration in english?}\todo{we could also use the IPA transcription: [tek])} named after the ancient Greek word \texttau$\mathrm{\acute{\varepsilon}}$\textchi\textnu\texteta{} (technē) meaning \emph{art, craft}.
Today, Donald Knuth (that is the former students name) is a retired professor of computer science and his compiler book has grown to become the multi-volume standard work \emph{The Art of Computer Programming}\,\,three volumes of which are still to be written, among them the one on compilers.
Unlike the book, however, \TeX{} is the rare occurrence of a software system that may actually be called \emph{complete} without meaning \emph{dead}.
@ -24,7 +24,7 @@ It explains some of the advantages that still distinguish \LaTeX{} today:
It is a mature, stable, and reliable system
that does typesetting in a typographically sophisticated way and mostly automatically.
As the \TeX{} code is stored in plaintext files (cf. \cref{sec:basic-functionality}),
As the \TeX{} code is stored in plain text files (cf. \cref{sec:basic-functionality}),
even more advantages arise:
You can structure your projects clearly (cf. \cref{sec:project-structure}),
and whenever you undo changes in the source code, you can always rely on getting exactly the same output as before
@ -32,7 +32,7 @@ and whenever you undo changes in the source code, you can always rely on getting
\todo{Klingt für mich, als würden Undos nichts bewirken. (F)}
On a larger scale, this does also work in connection with Git or other source code versioning tools.
Furthermore, you can trust your source code to be readable long-term, without any specific software.
It can always be opened with any program that supports plaintext.
It can always be opened with any program that supports plain text.
% Quellen:
% https://en.wikipedia.org/wiki/Donald_Knuth

View File

@ -8,32 +8,33 @@
% \begin{document}
% \tableofcontents
\section{Getränke}
\section{Beverages}
\subsection{Pink Lemonade}
Wir alle kennen und lieben sie im Sommer: eine kühle Limonade. Die pinke Variante wurde traditionell zubereitet, indem man der Limonade Lebensmittelfarbe hinzugefügt hat. Wir haben das Ganze etwas abgewandelt und uns für eine Variante mit Beeren entschieden, um den sauren Geschmack der Zitronen auszugleichen. Dadurch wird die Limonade ein perfekter und erfrischender Sommer-Drink!
We all know and love it in summer: a cold lemonade. The pink variant of our favorite summer drink is traditionally achieved by adding food coloring to the lemonade. However, we changed things up a little and decided to go for a variant with berries instead of food coloring, which also makes the drink less sour.
\subsubsection{Zutaten}
Für die Zubereitung der Limonade braucht ihr 400 g Beeren. Sie können entweder gefroren oder frisch sein. Bei der Wahl der Beeren könnt ihr euch austoben: Himbeeren, Heidelbeeren, Brombeeren oder auch eine Mischung aus verschiedenen Beeren eignen sich hervorragend.
For making the lemonade we need 400\,g of berries. You can use either frozen or fresh ones. You can, of course, adjust the choice of berries to your likings: raspberries, blueberries, blackberries, or a mixture work excellently for making the lemonade.
Für ein wenig Süße nutzen wir 50 ml Ahornsirup, natürlich könnt ihr auch mehr oder weniger nehmen, je nachdem, wie sauer ihr eure Limonade haben wollt. Übrigens eignen sich auch andere Süßungsmittel wie etwa Agavendicksaft oder Kokosblütensirup wunderbar.
To make the drink more sweet we use 50\,ml of maple syrup. Needless to say, you can also use less, if you want your lemonade to be more sour. By the way, other sweeteners, such as agave syrup, or coconut sugar also work fine.
Außerdem benötigen wir noch 4 gepresste Zitronen, ungefähr einen Liter kaltes Wasser und 400 g Eiswürfel, damit das Getränk auch schön kühl bleibt.
Additionally, we need the juice of four freshly-squeezed lemons, one litre worth of cold water and 400\,g of ice cubes to keep the drink cold.
\subsubsection{Zubereitung}
Die Beeren zusammen mit dem Ahornsirup in einen Kochtopf geben und bei mittlerer Hitze für drei bis vier Minuten kochen. Sobald die Beeren anfangen, weich zu werden, könnt ihr die Hitze etwas reduzieren. Mit dem Ende eines Holzlöffels zerdrückt ihr nun die Beeren, bis so gut wie keine großen Stücke mehr vorhanden sind. Je weniger Stücke, desto besser!
\subsubsection{Instructions}
Put the berries along with the maple syrup into a large bowl and cook it at medium-high heat for around three to four minutes. When the berries start to soften, reduce the heat a little. Now mash the berries with the end of a wooden spoon until there are almost now big chunks anymore. The less chunks the better!
Nun platziert ihr ein Sieb über dem Gefäß, in dem ihr eure Limonade aufbewahren wollt, und gebt die Himbeeren in das Sieb. Mit der Rückseite eines Löffels versucht ihr, so viel Saft wie möglich aus der Beeren-Mixtur zu pressen. Den Saft danach abkühlen lassen.
Place a sieve over the container that you want to store the lemonade in. Put the berries into the sieve. With the end of the wooden spoon, try to press out as much liquid of the berry mixture as possible. Let the juice sit until it is completely cold.
Sobald eure Beeren-Flüssigkeit abgekühlt ist, gebt den Zitronensaft, das kalte Wasser und die Eiswürfel hinzu und rührt alles ordentlich um.
When the liquid is cold, add the lemon juice, the cold water, and the ice cubes and stir everything.
Eure Limonade ist nun fertig zum genießen und bereit, in Gläser gefüllt zu werden!
\subsection{Heiße Schokolade}
Your lemonade is now ready to enjoy!
\subsection{Hot Chocolate}
Coming soon!
\section{Frühstücksgerichte}
\subsubsection{Overnight Oats aus Couscous}
\section{Breakfast}
\subsubsection{Buckwheat Overnight Oats}
Coming soon!
% \end{document}

View File

@ -1,25 +1,25 @@
1. Getränke
1. Beverages
1.1 Pink Lemonade
Wir alle kennen und lieben sie im Sommer: eine kühle Limonade. Die pinke Variante wurde traditionell zubereitet, indem man der Limonade Lebensmittelfarbe hinzugefügt hat. Wir haben das Ganze etwas abgewandelt und uns für eine Variante mit Beeren entschieden, um den sauren Geschmack der Zitronen auszugleichen. Dadurch wird die Limonade ein perfekter und erfrischender Sommer-Drink!
We all know and love it in summer: a cold lemonade. The pink variant of our favorite summer drink is traditionally achieved by adding food coloring to the lemonade. However, we changed things up a little and decided to go for a variant with berries instead of food coloring, which also makes the drink less sour.
1.1.1 Zutaten
Für die Zubereitung der Limonade braucht ihr 400 g Beeren. Sie können entweder gefroren oder frisch sein. Bei der Wahl der Beeren könnt ihr euch austoben: Himbeeren, Heidelbeeren, Brombeeren oder auch eine Mischung aus verschiedenen Beeren eignen sich hervorragend. \\
Für ein wenig Süße nutzen wir 50 ml Ahornsirup, natürlich könnt ihr auch mehr oder weniger nehmen, je nachdem, wie sauer ihr eure Limonade haben wollt. Übrigens eignen sich auch andere Süßungsmittel wie etwa Agavendicksaft oder Kokosblütensirup wunderbar. \\
Außerdem benötigen wir noch 4 gepresste Zitronen, ungefähr einen Liter kaltes Wasser und 400 g Eiswürfel, damit das Getränk auch schön kühl bleibt.
1.1.1 Ingredients
For making the lemonade we need 400\,g of berries. You can use either frozen or fresh ones. You can, of course, adjust the choice of berries to your likings: raspberries, blueberries, blackberries, or a mixture work excellently for making the lemonade. \\
To make the drink more sweet we use 50\,ml of maple syrup. Needless to say, you can also use less, if you want your lemonade to be more sour. By the way, other sweeteners, such as agave syrup, or coconut sugar also work fine. \\
Additionally, we need the juice of four freshly-squeezed lemons, one litre worth of cold water and 400\,g of ice cubes to keep the drink cold.
1.1.2 Zubereitung
Die Beeren zusammen mit dem Ahornsirup in einen Kochtopf geben und bei mittlerer Hitze für drei bis vier Minuten kochen. Sobald die Beeren anfangen, weich zu werden, könnt ihr die Hitze etwas reduzieren. Mit dem Ende eines Holzlöffels zerdrückt ihr nun die Beeren, bis so gut wie keine großen Stücke mehr vorhanden sind. Je weniger Stücke, desto besser! \\
Nun platziert ihr ein Sieb über dem Gefäß, in dem ihr eure Limonade aufbewahren wollt, und gebt die Himbeeren in das Sieb. Mit der Rückseite eines Löffels versucht ihr, so viel Saft wie möglich aus der Beeren-Mixtur zu pressen. Den Saft danach abkühlen lassen. \\
Sobald eure Beeren-Flüssigkeit abgekühlt ist, gebt den Zitronensaft, das kalte Wasser und die Eiswürfel hinzu und rührt alles ordentlich um. \\
Eure Limonade ist nun fertig zum genießen und bereit, in Gläser gefüllt zu werden!
1.1.2 Instructions
Put the berries along with the maple syrup into a large bowl and cook it at medium-high heat for around three to four minutes. When the berries start to soften, reduce the heat a little. Now mash the berries with the end of a wooden spoon until there are almost now big chunks anymore. The less chunks the better! \\
Place a sieve over the container that you want to store the lemonade in. Put the berries into the sieve. With the end of the wooden spoon, try to press out as much liquid of the berry mixture as possible. Let the juice sit until it is completely cold. \\
When the liquid is cold, add the lemon juice, the cold water, and the ice cubes and stir everything. \\
Your lemonade is now ready to enjoy!
1.2 Heiße Schokolade
1.2 Hot Chocolate
Coming soon!
2. Frühstücksgerichte
2. Breakfast
2.1 Overnight Oats aus Couscous
2.1 Buckwheat Porridge
Coming soon!

View File

@ -4,5 +4,5 @@
\usepackage[ngerman]{babel}
\begin{document}
Hallo, Welt!
Hello World!
\end{document}