Compare commits

...

4 Commits

Author SHA1 Message Date
a89148f53a Add some missing translations 2021-09-09 22:02:16 +02:00
43c4487702 Add missing translations 2021-09-09 21:36:58 +02:00
b497cacd1a Minor fixes 2021-09-09 21:25:51 +02:00
574838b080 Minor corrections 2021-09-09 21:16:51 +02:00
25 changed files with 56 additions and 51 deletions

View File

@ -2,8 +2,8 @@
\label{sec:basic-document-structure}
In essence, every \LaTeX{} document is composed of two parts:
We call the first commands within our \LaTeX{} document the \emph{preamble}.
It contains global information about our document, such as the document class, the encoding, the language, the page format, and additional packages that we want to use.
We call the first commands within our \LaTeX{} document the \emph{preamble}.
It \replaced[id=F]{specifies global properties of}{contains global information about} our document, such as the document class, the encoding, the language, the page format, and additional packages that we want to use.
The \emph{document environment}, on the other hand, contains the actual content of our document, i.\,e., the things that we will later see in our generated \acro{PDF} file.
\Example{lst:latex-document-basic-structure}{basic-document-structure/hello-world}{basic-document-structure/hello-world_crop}{Exemplary structure of a simple \LaTeX{} document with preamble and document environment}
@ -14,6 +14,7 @@ A minimal preamble should contain the following specifications:
\subsection{Document class}\label{sec:document-class}
We can define a document class by using the command \mintinline[breaklines,breakafter=\]]{latex}|\documentclass[<parameter>]{<document class>}|.
\todo{Was verursacht diese komische Klammer nach dem Befehl?}
The most commonly used document classes that are supported by default are \mintinline{latex}{article} for short documents, and \mintinline{latex}{report} for longer ones.
Furthermore, you can use \mintinline{latex}{book} for books, \mintinline{latex}{beamer}\footnote{We do not cover making presentations in \LaTeX{} in this tutorial. However, if you are interested in the topic, we recommend this introduction on Overleaf: \url{https://www.overleaf.com/learn/latex/Beamer}} for presentations, and \mintinline{latex}{letter}\footnote{We also do not cover letters in this script. An introduction can be found on WikiBooks: \url{https://en.wikibooks.org/wiki/LaTeX/Letters}} for letters.
@ -76,10 +77,10 @@ The package \mintinline{latex}{babel} provides language-specific information (e.
The desired language can be passed as an optional parameter.
\mintinline{latex}{ngerman}, for instance, is used for the new German spelling.
Some packages require that the language is already passed as an optional parameter in the \mintinline{latex}{\documentclass} command.
In this case, just leave out the optional parameter for the language within the \mintinline{latex}{babel} command.
In this case, just leave out the optional parameter for the language within the \mintinline{latex}{babel} \added[id=F]{inclusion} command.
We can also use multiple languages in our document.
To do so, we pass the languages, separated by commas, as an optional parameter to the \mintinline{latex}{\babel} command.
To do so, we pass the languages, separated by commas, as an optional parameter to the \replaced[id=F]{babel inclusion}{\mintinline{latex}{\babel}} command.
Within our document, we can switch between languages with the \mintinline{latex}{\selectlanguage{<language>}} command.
Alternatively, foreign-language text can be declared by using the following command:
@ -93,7 +94,7 @@ The actual content of the \acro{PDF} document needs to be put between \mintinlin
\subsection{Continuous text}
The easiest content that we can integrate into the document environment is continuous text.
We can write it directly into our source code.
Line breaks and multiple spaces are ignored by \LaTeX{}.
Line breaks and multiple \added[id=F]{consecutive} spaces are ignored by \LaTeX{}.
Blank lines create a new paragraph, that is indented by default.
\footnote{The automatic indentation of new paragraphs can be prevented by using the command \mintinline{latex}{\noindent}.}
Manual line breaks can be enforced with two backslashes (\textbackslash\textbackslash).
@ -103,7 +104,7 @@ This should be avoided, though.
Some characters are reserved for \LaTeX-specific commands, for instance, the percent sign.
Using a percent sign tells the \LaTeX{} compiler to ignore the rest of the line, i.\,e., the text after the percent character will not appear in the generated \acro{PDF} document.
This can be useful in order to take notes while working on a document without affecting the document itself.
This is called a comment.
\replaced[id=F]{It}{This} is called a comment.
However, if we want the percent sign to actually appear in the text, we can achieve this by using a backslash: \mintinline{latex}{\%}.
This solution is called escaping and also works for other reserved characters, like \#, \$, \&, \_, \{ and \}.
@ -134,7 +135,7 @@ An alternative title for the table of contents can be declared as an optional pa
\subsection{Front matter}
A simple front matter can be created by using the command \mintinline{latex}{\maketitle}.
The values that get inserted into the front matter must be specified within the preamble.
The values \replaced[id=F]{to be}{that get} inserted into the front matter must be specified within the preamble.
Multiple authors are joined by \mintinline{latex}{\and}.
If the date is not specified by the \mintinline{latex}{\date} command, the current date will be inserted by default.
The design of the front matter depends on the specified document class.

View File

@ -1,7 +1,7 @@
\chapter{Formatting Paragraphs} % (fold)
\label{sec:formatting-paragraphs}
\section*{Ragged Alignment}
\section*{Ragged alignment}
\label{sec:ragged-alignment}
By default, \LaTeX{} sets continuous text in full justification.
However, we can also switch to ragged alignment by using the commands
@ -15,9 +15,9 @@ format
of our paragraph (\cref{lst:ragged-alignment}).
\example{lst:ragged-alignment}{formatting-paragraphs/ragged-alignment}{Ragged
Alignment}
alignment}
\section*{Indentation and Spacing}
\section*{Indentation and spacing}
\label{sec:indents-and-parskips}
Usually, we illustrate a new paragraph by indenting the first line of it
(\mintinline{tex}{\parindent}).
@ -28,8 +28,8 @@ For both variants, there are adjustable parameters:
\begin{minted}{tex}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em
plus .5em % erlaubte Dehnung
minus .5em % erlaubte Stauchung
plus .5em % admissible stretch
minus .5em % admissible shrink
}
\end{minted}

View File

@ -8,7 +8,7 @@ Important packages for mathematical features are the \texttt{amsmath},
Society, as well as \texttt{mathtools}.
As with many other environments, adding an asterisk turns off the numbering.
\example{lst:sample-math-environment}{maths/sample-math-environment}{Exempary math environments}
\example{lst:sample-math-environment}{maths/sample-math-environment}{Exemplary math environments}
\section{A few examples}
%Die \cref{tbl:maths-common-commands,tbl:maths-logic-sets-braces} listen einige häufig in Formeln verwendeten Befehle auf.
@ -27,7 +27,7 @@ As with many other environments, adding an asterisk turns off the numbering.
\bottomrule
\end{tabular}
\caption{Frequently used commands (square root, fraction, power, sum, inequation, binomial coefficient).
By \mintinline{latex}{^{}} and \mintinline{latex}{_{}}, the content get super- or subscript.}
By \mintinline{latex}{^{}} and \mintinline{latex}{_{}}, the content is set in super- or subscript.}
\label{tbl:maths-common-commands}
\end{table}
@ -52,8 +52,8 @@ As with many other environments, adding an asterisk turns off the numbering.
\section{Growing brackets}
Especially in combination with fractions, brackts should grow according to their content.
This can be achieved by prepending each bracket (\mintinline{latex}{(}, \mintinline{latex}{)}, \mintinline{latex}{[}, \mintinline{latex}{]}, \mintinline{latex}{\lbrace} and \mintinline{latex}{\rbrace}) with a position marker (\mintinline{latex}{\left} oder \mintinline{latex}{\right}).
Especially in combination with fractions, brackets should grow according to their content.
This can be achieved by pre-pendingnot each bracket (\mintinline{latex}{(}, \mintinline{latex}{)}, \mintinline{latex}{[}, \mintinline{latex}{]}, \mintinline{latex}{\lbrace} and \mintinline{latex}{\rbrace}) with a position marker (\mintinline{latex}{\left} oder \mintinline{latex}{\right}).
\example{lst:growing-brackets}{maths/growing-brackets}{Example for growing brackets}
@ -74,7 +74,7 @@ Line breaks are denoted by two backslashes.
\Example{lst:math-alignment-example}{maths/align-example}{maths/align-example_crop}{Equations aligned at equals signs}
\section{Intensional set notation}\todo{Is that really what this section is about? Looks rather like a “text within maths” section to me.}
\section{Intensional set notation}\todo{Is that really what this section is about? Looks rather like a “text within maths” section to me.}\todo{Ich kenne es nur als »Set-builder notation«, »text within maths« ist natürlich auch nicht falsch.}
Sometimes sets have to be defined in terms of textual descriptions or longer function names.
The \LaTeX{} math mode assumes that letters are variables rather than text, which creates problems when they are indeed supposed to be entire words.

View File

@ -1,6 +1,8 @@
\chapter{Project structure}
\label{sec:project-structure}
\todo{Wäre zu diesem Kapitel noch ein schematisches Bild sinnvoll?}
In the previous chapters we have only seen very short \LaTeX{} examples. \LaTeX{} can of course also be used to create larger documents and projects, such as a thesis.
In order not to lose the overview in the source code and to avoid that source files become too long, a reasonable structuring of a larger \LaTeX{} project is advisable. For this purpose, the source code is divided into different files, which will be discussed in more detail in the following sections.

View File

@ -9,7 +9,7 @@ The special character used most frequently is a simple space between words.
The word space is not the only one, though\,---\,there are a few more types of spaces.
\Cref{lst:spaces} illustrates how they are used.
\example{lst:spaces}{special-characters/spaces}{Unterschiedliche Leerzeichen in \LaTeX}
\example{lst:spaces}{special-characters/spaces}{Different spaces in \LaTeX}
\paragraph{English Spacing}
In documents written in English, \LaTeX{} uses traditional English Spacing by default. That is, double spaces after each sentence.
@ -39,12 +39,12 @@ as shown in \cref{tbl:bars}.
\end{longtable}
The hyphen is obviously also used for hyphenation, but for this purpose, we should not insert it explicitly in our source code.
In most places, \LaTeX{} does the hyphenation automatically if we are using the correct \texttt{babel} package.\footnote{c.\,f. \cref{sec:language}.}
In case something goes wrong, we can intervene using the codes from \cref{tbl:separators}:\footnote{Those also require the \texttt{babel} package.}\todo{Is it because of the English document that the last example does not work?}
In most places, \LaTeX{} does the hyphenation automatically if we are using the correct \texttt{babel} \replaced[id=F]{configuration}{package}.\footnote{c.\,f. \cref{sec:language}.}
In case something goes wrong, we can intervene using the codes from \cref{tbl:separators}:\footnote{Those also require the \texttt{babel} package.}
\begin{longtable}{@{}lp{11cm}@{}}
\toprule
Code & Erläuterung \\
Code & Explanation \\
\midrule
\endhead
\mintinline{tex}|\-| & Exclusive hyphenation: The word may only be hyphenated at this position (can also be used multiple times within one word\,---\,all of those positions are then allowed). \\
@ -52,7 +52,7 @@ In case something goes wrong, we can intervene using the codes from \cref{tbl:se
\mintinline{tex}|-| & Exclusive hyphen: Is only used for compound words and prevents the automatic hyphenation for the rest of the word (which is typographically desirable). \\
\mintinline{tex}|"=| & Non-exclusive hyphen: Is used for long compound words when the text wrapping would not work without additional automatic hyphenation. \\
\mintinline{tex}|""| & Cut-off point without a hyphen: Allows something like a \textsc{url} to wrap without inserting a potentially misleading hyphen. \\
\mintinline{tex}|"~| & Non-wrapping hyphen: Keeps the hypen together with the following word, very useful in German: \emph{Vorlesungszeit und "~raum} \\
\mintinline{tex}|"~| & Non-wrapping hyphen: Keeps the hyphen together with the following word, very useful in German: \foreignlanguage{ngerman}{\emph{Vorlesungszeit und "~raum}} \\
\bottomrule
\caption{Exceptions for hyphenation}
\label{tbl:separators}
@ -103,7 +103,7 @@ If not, we can also create the diacritics via escape codes.
\verb|\~{o}| & -- & \~{o} & & \verb|\.{o}| & -- & \.{o} & & \verb|\o| & -- & \o \\
\bottomrule
\end{tabular}
\caption{Diakritika}
\caption{Diacritics}
\label{tbl:diacritics}
\end{table}
@ -116,7 +116,7 @@ Please note that some of them only work in maths environments (c.\,f. \cref{sec:
\center
\begin{tabular}{cll}
\toprule
Zeichen & Code & Bemerkung \\
Sign & Code & Remarks \\
\midrule
?`/!` & \verb|?`/!`| & \\
\textasciicircum & \verb|\textasciicircum| & \\

View File

@ -24,7 +24,7 @@ So dont be surprised when your carefully nested selection of four different m
italics & \mintinline{latex}{\textit{italics}} & \textit{italics} \\
small caps & \mintinline{latex}{\textsc{small caps}} & \textsc{small caps} \\
monospaced & \mintinline{latex}{\texttt{typewriter text}} & \texttt{typewriter text} \\
slanted & \mintinline{latex}{\texttt{slanted}} & \textsl{slanted} (please, dont!) \\
slanted & \mintinline{latex}{\textsl{slanted}} & \textsl{slanted} (please, dont!) \\
underlined & \mintinline{latex}{\underline{underlined}} & \underline{underlined} \\
subscript & \mintinline{latex}{\textsubscript{subscript}} & x\textsubscript{subscript} \\
superscript & \mintinline{latex}{\textsubscript{superscript}} & x\textsuperscript{superscript} \\
@ -36,7 +36,7 @@ So dont be surprised when your carefully nested selection of four different m
Usually, you should not need these commands too often, as they appear by themselves when you are using semantic markup.
For instance, the \texttt{hyperref} package provides the \mintinline{latex}{\url{}} command.
This command does not only use a monospaced font for \textsc{URL}s, it also makes them clickable and, if necessary, wraps them without adding hyphens.
This command does not only use a monospaced font for \acro{URL}s, it also makes them clickable and, if necessary, wraps them without adding hyphens.
The same applies for different font sizes.
You can specify the body text font size with an option at the document class:

View File

@ -2,7 +2,7 @@
% \documentclass{scrartcl}
% \usepackage[utf8]{inputenc}
% \usepackage[T1]{fontenc}
% \usepackage[ngerman]{babel}
% \usepackage[english]{babel}
% \usepackage[hidelinks]{hyperref}
% \begin{document}
@ -13,15 +13,15 @@
\subsection{Pink Lemonade}
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}
\subsubsection{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.
To make the drink sweeter 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.
\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!
Put the berries along with the maple syrup into a large bowl and cook them 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 no 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.

View File

@ -6,11 +6,11 @@
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. \\
To make the drink sweeter 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 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! \\
Put the berries along with the maple syrup into a large bowl and cook them 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 no 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!

View File

@ -1,7 +1,7 @@
\begin{enumerate}
\item In the directory \mintinline{latex}{exercises/basic-document-structure}, you can find a file named \mintinline{latex}{document-structure.tex}. Open the file, copy its text and paste it into a new file. You can name the new file as you want. Wrap the text of your new file into a \mintinline{latex}{document} environment and add a preamble in order to be able to compile your first \LaTeX{} document.
\item In the directory \mintinline{latex}{exercises/basic-document-structure}, you can find a file named \mintinline{latex}{document-structure.tex}. Open the file, copy its text and paste it into a new file. You can name the new file as you want. Wrap the text of your new file in a \mintinline{latex}{document} environment and add a preamble in order to be able to compile your first \LaTeX{} document.
\item Congratulations! You have created and compiled your first \LaTeX{} document. Maybe you have noticed that paragraphs within the text were created by using \mintinline{latex}{\\}. Replace the two backslashes by real paragraphs.
\item It's time to structure your first document. Use the \LaTeX{} commands \mintinline{latex}{\section}, \mintinline{latex}{\subsection}, etc. to structure the text. Also, include a table of contents for your document.
\item It is time to structure your first document. Use the \LaTeX{} commands \mintinline{latex}{\section}, \mintinline{latex}{\subsection}, etc. to structure the text. Also, include a table of contents for your document.
\item Afterwards, comment out the preamble, the document environment, and the table of contents.
\end{enumerate}

View File

@ -1,5 +1,5 @@
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

View File

@ -1,5 +1,5 @@
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

View File

@ -18,19 +18,19 @@
\mintinline{latex}{\include} makes every included file appear on a new
page. Hence the command \mintinline{latex}{\newpage} becomes superfluous.
\item
\textbf{Can the preamble also be excluded? If no, why? If yes, why can
\textbf{Can the preamble also be excluded? If no, why? If yes, when can
outsourcing the preamble be useful?} \\
The preamble can also be outsourced, like in task 1. In real-world \LaTeX{}
projects we often make use of numerous packages that need to be configured
by additional commands within the preamble. Therefore, it is advisable to
outsource the preamble. On top of that, this is useful because the file can
outsource the preamble. On top of that, this is useful because the file
with the most-commonly used packages can be moved from one project to
another without needing to rewrite the preamble every time.
\item
\textbf{Add the command \mintinline{latex}{\includeonly{section2}} to the
preamble. Compile the document again, and check what has changed. What does
the command do and why can it be helpful in a larger project? } \\
The command \mintinline{latex}{\includeonly{section2}} doex exactly what
the command do and how can it be helpful in a larger project? } \\
The command \mintinline{latex}{\includeonly{section2}} does exactly what
the name already says. During compilation, only the
\mintinline{latex}{\include}
statements that contain file names that appear in

View File

@ -5,15 +5,15 @@
\begin{document}
\thispagestyle{empty}
\section{Ebene 1}
\section{Level 1}
Lorem ipsum dolor sit amet, consectetur adipisici elit.
\subsection{Ebene 2}
\subsection{Level 2}
Lorem ipsum dolor sit amet, consectetur adipisici elit.
\subsubsection{Ebene 3}
\subsubsection{Level 3}
Lorem ipsum dolor sit amet, consectetur adipisici elit.
\paragraph{Ebene 4}
\paragraph{Level 4}
Lorem ipsum dolor sit amet, consectetur adipisici elit.
\subparagraph{Ebene 5}
\subparagraph{Level 5}
Lorem ipsum dolor sit amet, consectetur adipisici elit.
\end{document}

View File

@ -1,9 +1,9 @@
\documentclass[ngerman]{article}
\documentclass[english]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[english]{babel}
\title{Die Welt der Trüffel}
\title{The World of Truffles}
\author{Fooboar Rüssel \and Fachschaft WIAI}
\date{\today}

View File

@ -1,4 +1,4 @@
Die imaginäre Einheit $i$ ist definiert als $i = \sqrt{-1}$.
The imaginary unit $i$ is defined as $i = \sqrt{-1}$.
\begin{equation}
2 \sqrt{\frac{\pi^2}{3} \cdot c_2}

Binary file not shown.

View File

@ -5,6 +5,7 @@
\begin{document}
\frenchspacing
\selectlanguage{english}
% Title page
\input{content/titlepage.tex}

View File

@ -1,9 +1,9 @@
\documentclass[a4paper]{report}
\documentclass[a4paper,english]{report}
% Language and font encoding
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[english,ngerman]{babel}
% Special characters
\usepackage{eurosym, tipa, textcomp, textgreek, upgreek}
@ -47,3 +47,4 @@
% Tracking changes
\usepackage{changes}
\definechangesauthor[color=blue, name={Christian}]{C}
\definechangesauthor[color=purple, name={Florian}]{F}