Minor corrections
This commit is contained in:
parent
e9c410f139
commit
574838b080
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -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!
|
||||
|
||||
@ -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}
|
||||
|
||||
|
||||
Binary file not shown.
@ -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}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -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}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -47,3 +47,4 @@
|
||||
% Tracking changes
|
||||
\usepackage{changes}
|
||||
\definechangesauthor[color=blue, name={Christian}]{C}
|
||||
\definechangesauthor[color=purple, name={Florian}]{F}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user