Merge branch '2021-translate-script' of git.stuve-bamberg.de:latex/latex-skript into 2021-translate-script
This commit is contained in:
commit
308a0da7db
@ -1,20 +1,16 @@
|
|||||||
\chapter{Basic Document Structure}
|
\chapter{Basic Document Structure}
|
||||||
\label{sec:basic-document-structure}
|
\label{sec:basic-document-structure}
|
||||||
|
|
||||||
How does a \LaTeX{} document look like?
|
|
||||||
In essence, every \LaTeX{} document is composed of two parts: the first part is
|
In essence, every \LaTeX{} document is composed of two parts: the first part is
|
||||||
the preamble and is followed by the second part, the document environment.
|
the preamble. It is directly followed by the second part, the document environment.
|
||||||
|
|
||||||
We call the first commands within our \LaTeX{} document a \emph{preamble}. It
|
We call the first commands within our \LaTeX{} document a \emph{preamble}. It
|
||||||
contains global information about our document, such as the document class that
|
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 want to use, the encoding, the language, the page format, and additional
|
|
||||||
packages.
|
|
||||||
The \emph{document environment}, on the other hand, contains the actual content
|
The \emph{document environment}, on the other hand, contains the actual content
|
||||||
of our document, that is, the things that we will later see in our generated
|
of our document, that is, the things that we will later see in our generated
|
||||||
\acro{PDF} file.
|
\acro{PDF} file.
|
||||||
|
|
||||||
\Example{lst:latex-document-basic-structure}{basic-document-structure/hello-world}{basic-document-structure/hello-world_crop}{Beispielhafter
|
\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
|
||||||
Structure of a simple \LaTeX{} document with preamble and document
|
|
||||||
environment}
|
environment}
|
||||||
|
|
||||||
\section{Preamble}
|
\section{Preamble}
|
||||||
@ -23,7 +19,7 @@ A minimal preamble should contain the following specifications:
|
|||||||
|
|
||||||
\subsection{Document Class}\label{sec:document-class}
|
\subsection{Document Class}\label{sec:document-class}
|
||||||
We can define a document class by using the command
|
We can define a document class by using the command
|
||||||
\mintinline{latex}|\documentclass[<parameter>]{<document class>}|. The most
|
\mintinline[breaklines,breakafter=\]]{latex}|\documentclass[<parameter>]{<document class>}|. The most
|
||||||
commonly used document classes that are supported by default are
|
commonly used document classes that are supported by default are
|
||||||
\mintinline{latex}{article} for short documents, and \mintinline{latex}{report}
|
\mintinline{latex}{article} for short documents, and \mintinline{latex}{report}
|
||||||
for longer ones. Furthermore, you can use \mintinline{latex}{book} for books,
|
for longer ones. Furthermore, you can use \mintinline{latex}{book} for books,
|
||||||
@ -35,8 +31,7 @@ for longer ones. Furthermore, you can use \mintinline{latex}{book} for books,
|
|||||||
script. An introduction can be found on WikiBooks:
|
script. An introduction can be found on WikiBooks:
|
||||||
\url{https://en.wikibooks.org/wiki/LaTeX/Letters}} for letters.
|
\url{https://en.wikibooks.org/wiki/LaTeX/Letters}} for letters.
|
||||||
|
|
||||||
In addition to the standard document classes, the \acro{KOMA} script classes
|
In addition to the standard document classes, the \acro{KOMA} script classes have developed. They provide alternatives to the document classes
|
||||||
developed over time. They provide alternatives to the document classes
|
|
||||||
mentioned above: In lieu of \mintinline{latex}{article} you can use
|
mentioned above: In lieu of \mintinline{latex}{article} you can use
|
||||||
\mintinline{latex}{scrartcl}, \mintinline{latex}{report} is replaced by
|
\mintinline{latex}{scrartcl}, \mintinline{latex}{report} is replaced by
|
||||||
\mintinline{latex}{scrreport}, and \mintinline{latex}{scrbook} can be used
|
\mintinline{latex}{scrreport}, and \mintinline{latex}{scrbook} can be used
|
||||||
@ -56,7 +51,7 @@ square brackets.
|
|||||||
\mintinline{latex}{\documentclass[10pt,a5paper,landscape]{scrartcl}}, for
|
\mintinline{latex}{\documentclass[10pt,a5paper,landscape]{scrartcl}}, for
|
||||||
instance, configures a \acro{KOMA} script article and sets its font size
|
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
|
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
|
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.
|
landscape. The language can be passed as an optional parameter, too (cf.
|
||||||
\cref{sec:language}).
|
\cref{sec:language}).
|
||||||
|
|
||||||
@ -67,11 +62,11 @@ landscape. The language can be passed as an optional parameter, too (cf.
|
|||||||
\end{minted}
|
\end{minted}
|
||||||
Packages provide additional commands and functionalities that we can use within
|
Packages provide additional commands and functionalities that we can use within
|
||||||
our \LaTeX{} source code. There are numerous packages for different use cases
|
our \LaTeX{} source code. There are numerous packages for different use cases
|
||||||
(e.\,g. typesetting forumlas, lists, \textellipsis).
|
(e.\,g., typesetting forumlas, lists, \textellipsis).
|
||||||
In order make use of a package, it must be included within the preamble. To do
|
In order make use of a package, it must be included within the preamble. To do
|
||||||
so, the above-mentioned command is used.
|
so, the above-mentioned command is used.
|
||||||
The most important \LaTeX{} packages can be found n the Comprehensive \TeX\
|
The most important \LaTeX{} packages can be found in the Comprehensive \TeX\
|
||||||
Archive Network,\footnote{Available at: \url{https://www.ctan.org/}}, short:
|
Archive Network\footnote{Available at: \url{https://www.ctan.org/}}, short:
|
||||||
\acro{CTAN}. You can also find the documentations for the packages there.
|
\acro{CTAN}. You can also find the documentations for the packages there.
|
||||||
|
|
||||||
\subsection{Encoding}
|
\subsection{Encoding}
|
||||||
@ -85,7 +80,7 @@ The character encoding\footnote{cf.
|
|||||||
\url{https://en.wikipedia.org/wiki/Character_encoding}} determines the
|
\url{https://en.wikipedia.org/wiki/Character_encoding}} determines the
|
||||||
available character set.
|
available character set.
|
||||||
The standard encoding in \LaTeX{} is \acro{ASCII}.\footnote{cf.
|
The standard encoding in \LaTeX{} is \acro{ASCII}.\footnote{cf.
|
||||||
\url{https://de.wikipedia.org/wiki/American_Standard_Code_for_Information_Interchange}}
|
\url{https://en.wikipedia.org/wiki/ASCII}}
|
||||||
It is an American character encoding and therefore does, for instance, not
|
It is an American character encoding and therefore does, for instance, not
|
||||||
contain German umlauts, or other special characters, which makes it unsuitable
|
contain German umlauts, or other special characters, which makes it unsuitable
|
||||||
for most use cases.
|
for most use cases.
|
||||||
@ -94,14 +89,14 @@ As a consequence, \acro{UTF-8}\footnote{cf.
|
|||||||
character
|
character
|
||||||
encoding.
|
encoding.
|
||||||
|
|
||||||
In \LaTeX{} we need to specify two character encodings:
|
In \LaTeX{}, we need to specify two character encodings:
|
||||||
The input encoding (short: \mintinline{latex}{inputenc}), which refers to our
|
The input encoding (short: \mintinline{latex}{inputenc}), which refers to our
|
||||||
source code, and the font encoding (short: \mintinline{latex}{fontenc}), which
|
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
|
concerns the choice of the file that is used to portray the content within our
|
||||||
\acro{PDF} document, since we also need special characters
|
\acro{PDF} document, since we also need special characters
|
||||||
there.\footnote{Details on how
|
there.\footnote{Details on
|
||||||
\mintinline{latex}{fontenc} works can be found at:
|
\mintinline{latex}{fontenc} can be found at:
|
||||||
\url{https://www.texwelt.de/fragen/5537/was-macht-eigentlich-usepackaget1fontenc}}
|
\url{https://tex.stackexchange.com/questions/108417/font-encoding-in-latex}}
|
||||||
\mintinline{latex}{T1} is an enconding that tries to cover most European
|
\mintinline{latex}{T1} is an enconding that tries to cover most European
|
||||||
language with a limited number of characters.
|
language with a limited number of characters.
|
||||||
|
|
||||||
@ -111,10 +106,10 @@ language with a limited number of characters.
|
|||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
The package \mintinline{latex}{babel} provides language-specific information
|
The package \mintinline{latex}{babel} provides language-specific information
|
||||||
(e.\,g. on hyphenation, special characters, changing fonts, translation of
|
(e.\,g., on hyphenation, special characters, changing fonts, translation of
|
||||||
labels\footnote{cf. \cref{sec:references}} like \enquote{Chapter},
|
labels\footnote{cf. \cref{sec:references}} like \enquote{Chapter},
|
||||||
\enquote{Table of Contents}, or \enquote{Figure}).
|
\enquote{Table of Contents}, or \enquote{Figure}, \textellipsis).
|
||||||
The language that you want to use can be passed as an optional parameter.
|
The desired language can be passed as an optional parameter.
|
||||||
\mintinline{latex}{ngerman}, for instance, is used for the new German spelling.
|
\mintinline{latex}{ngerman}, for instance, is used for the new German spelling.
|
||||||
Some packages require that the language is already passed as optional parameter
|
Some packages require that the language is already passed as optional parameter
|
||||||
in the \mintinline{latex}{\documentclass} command. In this case, just leave out
|
in the \mintinline{latex}{\documentclass} command. In this case, just leave out
|
||||||
@ -122,41 +117,41 @@ the
|
|||||||
optional parameter for the language within the \mintinline{latex}{babel}
|
optional parameter for the language within the \mintinline{latex}{babel}
|
||||||
command.
|
command.
|
||||||
|
|
||||||
You can also use multiple languages in your document. To do so, pass the
|
We can also use multiple languages in your document. To do so, we pass the
|
||||||
languages,
|
languages,
|
||||||
separated by commas, as optional parameter to the \mintinline{latex}{\babel}
|
separated by commas, as optional parameter to the \mintinline{latex}{\babel}
|
||||||
command. Within your document, you can switch between langauges with the
|
command. Within your document, we can switch between languages with the
|
||||||
\mintinline{latex}{\selectlanguage{<language>}} command. Alternatively, you can
|
\mintinline{latex}{\selectlanguage{<language>}} command. Alternatively,foreign-language text
|
||||||
include foreign-language text by using the following command:
|
can be included by using the following command:
|
||||||
\begin{minted}{latex}
|
\begin{minted}{latex}
|
||||||
\foreignlanguage{<language>}{<text>}
|
\foreignlanguage{<language>}{<text>}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
\section{Document Environment}
|
\section{Document Environment}
|
||||||
The actual content of your \acro{PDF} document needs to be put between
|
The actual content of the \acro{PDF} document needs to be put between
|
||||||
\mintinline{latex}{\begin{document}} and \mintinline{latex}{\end{document}}.
|
\mintinline{latex}{\begin{document}} and \mintinline{latex}{\end{document}}.
|
||||||
|
|
||||||
\subsection{Continuous Text}
|
\subsection{Continuous Text}
|
||||||
The easiest content that you can integrate into the document environment is
|
The easiest content that we can integrate into the document environment is
|
||||||
continuous
|
continuous
|
||||||
text. You can write it directly into your source code. Line breaks and multiple
|
text. We can write it directly into our source code. Line breaks and multiple
|
||||||
spaces are ignored by \LaTeX{}. Blank lines create a new paragraph, which is
|
spaces are ignored by \LaTeX{}. Blank lines create a new paragraph, that is
|
||||||
indented by default.\footnote{The automatic indentation of new paragraphs can
|
indented by default.\footnote{The automatic indentation of new paragraphs can
|
||||||
be prevented by using the command \mintinline{latex}{\noindent}.}
|
be prevented by using the command \mintinline{latex}{\noindent}.}
|
||||||
Manual linebreaks can be forced with two backslashes
|
Manual line breaks can be forced with two backslashes
|
||||||
(\textbackslash\textbackslash). This should be avoided, though.
|
(\textbackslash\textbackslash). This should be avoided, though.
|
||||||
|
|
||||||
\subsection{Comments}
|
\subsection{Comments}
|
||||||
Some characters are reserved for \LaTeX-specific commands, like, for instance,
|
Some characters are reserved for \LaTeX-specific commands, for instance,
|
||||||
the percent sign. Using a percent sign tells the \LaTeX compiler to ignore the
|
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
|
rest of the line, i.\,e., the text after the percent character will not appear
|
||||||
in your generated \acro{PDF} document.
|
in the generated \acro{PDF} document.
|
||||||
This can be useful in order to take notes while working on your 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.
|
without affecting the document itself. This is called a comment.
|
||||||
|
|
||||||
However, if you want the percent sign to actually appear in your text, you can
|
However, if we want the percent sign to actually appear in the text, we can
|
||||||
achieve this by using a backslash: \mintinline{latex}{\%}.
|
achieve this by using a backslash: \mintinline{latex}{\%}.
|
||||||
This solution is also called escaping and also works for other reserved
|
This solution is called escaping and also works for other reserved
|
||||||
characters, like \#, \$, \&, \_, \{ and \}.
|
characters, like \#, \$, \&, \_, \{ and \}.
|
||||||
|
|
||||||
In order to escape the backslash, the command
|
In order to escape the backslash, the command
|
||||||
@ -169,7 +164,7 @@ sections and chapters. Needless to say, \LaTeX{} provides us with commands for
|
|||||||
that.
|
that.
|
||||||
The commands that are depicted in \cref{lst:headlines} can be used with any
|
The commands that are depicted in \cref{lst:headlines} can be used with any
|
||||||
document class.
|
document class.
|
||||||
\Example{lst:headlines}{basic-document-structure/headlines}{basic-document-structure/headlines_crop}{Überschriftenebenen}
|
\Example{lst:headlines}{basic-document-structure/headlines}{basic-document-structure/headlines_crop}{Heading Levels}
|
||||||
Depending on your specified document class the commands
|
Depending on your specified document class the commands
|
||||||
\mintinline{latex}{\chapter{Chapter}} and \mintinline{latex}{\part{Part}} are
|
\mintinline{latex}{\chapter{Chapter}} and \mintinline{latex}{\part{Part}} are
|
||||||
additionally available -- for instance in books.
|
additionally available -- for instance in books.
|
||||||
@ -182,7 +177,7 @@ a section and exclude it from the table of contents\footnote{cf.
|
|||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
An alternative title for the table of contents can be declared as an optional
|
An alternative title for the table of contents can be declared as an optional
|
||||||
parameter in square brackets between the command and the actual title.
|
parameter in square brackets between the command and the actual title:
|
||||||
|
|
||||||
\begin{minted}{latex}
|
\begin{minted}{latex}
|
||||||
\section[Title in the TOC]{Actual Chapter Title}
|
\section[Title in the TOC]{Actual Chapter Title}
|
||||||
@ -198,8 +193,7 @@ current date
|
|||||||
will be inserted by default.
|
will be inserted by default.
|
||||||
The design of the front matter depends on the specified document class.
|
The design of the front matter depends on the specified document class.
|
||||||
|
|
||||||
\Example{lst:titles}{basic-document-structure/titles}{basic-document-structure/titles_crop}{Die
|
\Example{lst:titles}{basic-document-structure/titles}{basic-document-structure/titles_crop}{The Front Matter}
|
||||||
Titelei}
|
|
||||||
|
|
||||||
\subsection{Indices}\label{sec:table-of-contents}
|
\subsection{Indices}\label{sec:table-of-contents}
|
||||||
The command \mintinline{latex}{\tableofcontents} generates an automatically
|
The command \mintinline{latex}{\tableofcontents} generates an automatically
|
||||||
@ -219,4 +213,4 @@ Besides the table of contents, you can also generate a
|
|||||||
\mintinline{latex}{\listoftables} (list of tables). The captions of your
|
\mintinline{latex}{\listoftables} (list of tables). The captions of your
|
||||||
figures and tables will appear within those indices.\footnote{cf.
|
figures and tables will appear within those indices.\footnote{cf.
|
||||||
\cref{sec:graphics} (Graphics) and \cref{sec:tables} (Tables) for more
|
\cref{sec:graphics} (Graphics) and \cref{sec:tables} (Tables) for more
|
||||||
information on captions.}
|
information on captions}
|
||||||
|
|||||||
@ -1,77 +1,74 @@
|
|||||||
\chapter{Wie funktioniert \LaTeX?}
|
\chapter{How does \LaTeX function?}
|
||||||
\label{sec:basic-functionality}
|
\label{sec:basic-functionality}
|
||||||
|
|
||||||
Programme zur Textverarbeitung und Dokumentenerstellung nutzen unterschiedliche Vorgehensweisen, um basierend auf einer bearbeiteten Datei ein Dokument zu erstellen.
|
Word processing and document creation programs use different approaches to create a document based on an edited file.
|
||||||
Bei der Arbeit mit Microsoft Word gilt die Regel: Ein als \acro{PDF} exportiertes Dokument sieht genauso aus wie das Quelldokument in Word. Dort wo eine Grafik in Word platziert wird, ist sie auch im \acro{PDF} aufzufinden. Anpassungen der Darstellung in MS Word und anderen bekannten Programmen führen also zu einer direkten optischen Veränderung im resultierenden Export. Diese Art der Formatierung wird \emph{What you see is what you get} genannt (kurz: \acro{WYSIWYG}). Inhalt und Struktur sind eng miteinander verbunden.
|
When working with Microsoft Word, the rule is: a document exported as \acro{PDF} looks exactly like the source document in Word. Where a graphic is placed in Word, it is also found in the \acro{PDF}. Adjustments to the appearance in MS Word and other popular programs thus result in a direct visual change in the resulting export. This type of formatting is called \emph{What you see is what you get} (\acro{WYSIWYG} for short). Content and structure are closely linked.
|
||||||
|
|
||||||
\LaTeX{} arbeitet hingegen nach dem Prinzip \emph{What you get is what you mean} (kurz: \acro{WYGIWYM}). Inhalt und Struktur sind stärker getrennt.
|
\LaTeX{}, on the other hand, works according to the principle \emph{What you get is what you mean} (\acro{WYGIWYM} for short). Content and structure are separated more clearly.
|
||||||
Der Inhalt wird in einem Dokument in einfacher Textform platziert, zusammen mit sogenannten \emph{Befehlen}\textit{.} Die Kombination von inhaltlichem Text und Befehlen nennen wir auch Quelltext. Um die Darstellung des Inhalts anzupassen, ändern wir nicht den Text selbst, sondern fügen entsprechende Befehle hinzu. Diese werden von einem \emph{Compiler} verarbeitet, welcher die Darstellung je nach Befehl anpasst. Zeile für Zeile verarbeitet der Compiler Text und Befehle aus unserem Quelltext. Wenn der gesamte Quelltext von dem Compiler verarbeitet wurde, erhalten wir das finale Dokument. Es gibt zwar unterschiedliche Exportmöglichkeiten, meistens lassen wir uns das Dokument aber als \acro{PDF} ausgeben -- wie auch bei Word.
|
The content is placed in a document in plain text form, together with so-called \emph{commands}. The combination of content text and commands is also called \emph{source} text. To customize the presentation of the content, we do not change the content text itself, but add appropriate commands instead. These are processed by a \emph{compiler}, which adjusts the resulting appearance depending on the command. Line by line, the compiler processes text and commands from our source code. When all the source code has been processed by the compiler, we get the final document. There are different export options, but most of the time we output the document as a \acro{PDF} - just like Word.
|
||||||
% Alter Paragraph:
|
|
||||||
%Der Compiler nimmt besagten Quelltext entgegen und liest ihn Zeile für Zeile.
|
|
||||||
%Erkennt er einen Befehl, wird dieser verarbeitet. Verschiedene Befehle haben verschiedene Einflüsse auf das Endresultat, dazu später mehr. Wenn der gesamte Quelltext von dem Compiler verarbeitet wurde, erhalten wir das finale Dokument. Es gibt zwar unterschiedliche Exportmöglichkeiten, meistens lassen wir uns das Dokument aber als \acro{PDF} ausgeben -- wie auch bei Word.
|
|
||||||
|
|
||||||
Als kurzes Beispiel für einen Befehl dient uns hier das Hervorheben von Wörtern oder Sätzen. Der Befehl lautet \mintinline{latex}{\emph{}}. Den Text, den wir hervorheben möchten, schreiben wir im Quellcode innerhalb der geschweiften Klammern, etwa so: \mintinline{latex}{\emph{Guten Tag!}}. Im resultierenden \acro{PDF} erscheint dieser Text dann kursiv: \emph{Guten Tag!} Von dem Befehlsbezeichner und den Sonderzeichen ist keine Spur mehr zu sehen. Wir schreiben also keinen kursiven Text innerhalb des Quellcodes, sondern teilen dem Compiler einfach mit, dass bestimmte Wörter doch bitte hervorgehoben werden sollen.
|
%Als kurzes Beispiel für einen Befehl dient uns hier das Hervorheben von Wörtern oder Sätzen. Der Befehl lautet \mintinline{latex}{\emph{}}. Den Text, den wir hervorheben möchten, schreiben wir im Quellcode innerhalb der geschweiften Klammern, etwa so: \mintinline{latex}{\emph{Guten Tag!}}. Im resultierenden \acro{PDF} erscheint dieser Text dann kursiv: \emph{Guten Tag!} Von dem Befehlsbezeichner und den Sonderzeichen ist keine Spur mehr zu sehen. Wir schreiben also keinen kursiven Text innerhalb des Quellcodes, sondern teilen dem Compiler einfach mit, dass bestimmte Wörter doch bitte hervorgehoben werden sollen.
|
||||||
|
|
||||||
Dieses einfache Beispiel verdeutlicht eine Stärke des \acro{WYGIWYM}-Prinzips.
|
As a brief example for a command, we shall use the highlighting of words or sentences. The command is \mintinline{latex}{\emph{}}. We write the text we want to highlight inside the curly brackets in the source code, like this: \mintinline{latex}{\emph{Good morning!}}. In the resulting 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 highlighted by use of a command.
|
||||||
Wir markieren Textelemente auf der semantischen Ebene und können die zugehörigen typographischen Anpassungen an zentraler Stelle vornehmen -- oder lassen \LaTeX{} die Konfiguration selbst erledigen.
|
|
||||||
Wenn wir etwa die Art und Weise des Hervorhebens ändern möchten, dann können wir dies zentral konfigurieren. An allen Stellen, wo \mintinline{latex}{\emph{}} verwendet wird, wird das Endresultat entsprechend angepasst. Es besteht keine Notwendigkeit, an jeder einzelnen Stelle Anpassungen vorzunehmen. Das Prinzip ist ähnlich zu Formatvorlagen in Office-Programmen, wenn auch konsequenter und mächtiger.
|
|
||||||
% Überleitung zum nächsten Abschnitt??
|
|
||||||
|
|
||||||
% TEMP/UNSURE
|
%Dieses einfache Beispiel verdeutlicht eine Stärke des \acro{WYGIWYM}-Prinzips. Wir markieren Textelemente auf der semantischen Ebene und können die zugehörigen typographischen Anpassungen an zentraler Stelle vornehmen -- oder lassen \LaTeX{} die Konfiguration selbst erledigen. Wenn wir etwa die Art und Weise des Hervorhebens ändern möchten, dann können wir dies zentral konfigurieren. An allen Stellen, wo \mintinline{latex}{\emph{}} verwendet wird, wird das Endresultat entsprechend angepasst. Es besteht keine Notwendigkeit, an jeder einzelnen Stelle Anpassungen vorzunehmen. Das Prinzip ist ähnlich zu Formatvorlagen in Office-Programmen, wenn auch konsequenter und mächtiger.
|
||||||
%Wie man mit Word oder anderen Programmen ein \acro{PDF} generiert, wisst ihr vermutlich. Besonders kompliziert ist es nicht. Im Grunde benötigen wir nur das Programm selbst.
|
|
||||||
% OLD
|
|
||||||
%Dieses einfache Beispiel verdeutlicht eine Stärke des \acro{WYGIWYM}-Prinzips.
|
|
||||||
%Wir markieren Textelemente auf der semantischen Ebene (\enquote{Dieser Text soll hervorgehoben werden.}) und können die zugehörigen typographischen Anpassungen (\enquote{Hervorgehobener Text wird kursiv gedruckt.}) an zentraler Stelle festlegen -- oder gleich \LaTeX{} überlassen.
|
|
||||||
%Das Prinzip ist ähnlich zu Formatvorlagen in Office-Programmen, wenn auch konsequenter und mächtiger.
|
|
||||||
%Basierend auf dem Text, den Befehlen und den Standard-Einstellungen des Compilers entsteht so das finale Dokument.
|
|
||||||
|
|
||||||
\section{Was brauchen wir dazu?}
|
This simple example illustrates a strength of the \acro{WYGIWYM} principle.
|
||||||
|
We mark text elements on the semantic level and can make the associated typographic adjustments centrally - or let \LaTeX{} do the configuration itself.
|
||||||
|
For instance, if we want to change the way highlighting is done, we can configure this centrally. At all places where \mintinline{latex}{\emph{}} is used, the final result will be adjusted accordingly. There is no need to make adjustments at each individual place. The principle is similar to style sheets in Office programs, although more consistent and powerful.
|
||||||
|
|
||||||
|
|
||||||
|
\section{What do we need to use \LaTeX{}?}
|
||||||
\label{subsec:what-we-need}
|
\label{subsec:what-we-need}
|
||||||
|
|
||||||
Möchten wir mit \LaTeX{} ein \acro{PDF}-Dokument generieren, so benötigen wir zumindest zwei Programme. Eines, um den Quelltext zu erstellen, und ein zweites, um den Quelltext zu verarbeiten. Letzteres ist der bereits erwähnte Compiler.
|
%Oxford komma wie?
|
||||||
|
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. The latter is the already mentioned compiler.
|
||||||
|
|
||||||
Grundsätzlich ist ein einfaches Textbearbeitungsprogramm zur Erstellung des Quelltextes ausreichend. Die meisten Betriebssysteme beinhalten solche Programme bereits. Vielleicht seid ihr schon mit Anwendungen wie Notepad++\footnote{Verfügbar unter \url{https://notepad-plus-plus.org/}.} vertraut, auch diese sind geeignet.
|
In principle, a simple text editing program is sufficient for creating the source code. Most operating systems already include such programs. Maybe you are already used to applications like Notepad++\footnote{Available at \url{https://notepad-plus-plus.org/}.}, these are usable as well. Then there are advanced programs like TeXstudio\footnote{Available at \url{https://www.texstudio.org/}.} or Texmaker\footnote{Available at \url{https://www.xm1math.net/texmaker/}.}, which integrate additional functions that facilitate the use of commands. You are free to choose.
|
||||||
Fortgeschrittene Programme wie TeXstudio\footnote{Verfügbar unter \url{https://www.texstudio.org/}.} oder Texmaker\footnote{Verfügbar unter \url{https://www.xm1math.net/texmaker/}.} integrieren zusätzliche Funktionen, welche die Verwendung von Befehlen erleichtern. Hier habt ihr freie Wahl.
|
|
||||||
% Letzten Paragraphen irgendwie weniger abrupt beenden?
|
|
||||||
|
|
||||||
Zum Kompilieren des Quelltexts wird, wie bereits erwähnt, ein Compiler benötigt.
|
%Zum Kompilieren des Quelltexts wird, wie bereits erwähnt, ein Compiler benötigt. Der Compiler ist meist Teil einer Sammlung von Programmen und Paketen, die zusammen eine \LaTeX-Distribution bilden. Auf die Hilfsprogramme werden wir für den Moment nicht näher eingehen.\footnote{Eines dieser Hilfsprogramme kommt später im Kapitel \ref{sec:literature} zum Einsatz, wenn wir Literatur referenzieren.} Die enthaltenen Pakete stellen verschiedene Befehle zur Verfügung.
|
||||||
Der Compiler ist meist Teil einer Sammlung von Programmen und Paketen, die zusammen eine \LaTeX-Distribution bilden.
|
|
||||||
Auf die Hilfsprogramme werden wir für den Moment nicht näher eingehen.\footnote{Eines dieser Hilfsprogramme kommt später im Kapitel \ref{sec:literature} zum Einsatz, wenn wir Literatur referenzieren.} Die enthaltenen Pakete stellen verschiedene Befehle zur Verfügung.
|
|
||||||
|
|
||||||
Wir verwenden den Compiler einer Distribution unserer Wahl. Bekannte Distributionen sind MiK\TeX,\footnote{Für Windows, macOS und Linux. Verfügbar unter \url{https://miktex.org/}.} Mac\TeX\footnote{Für macOS und Linux. Verfügbar unter \url{https://www.tug.org/mactex/}.} und \TeX{} Live.\footnote{Für Windows, macOS und Linux. Verfügbar unter \url{https://www.tug.org/texlive/}.}
|
% Kleine Anpassung, emph's hinzugefügt
|
||||||
Installiert euch am besten gleich eine davon. Die Installation kann unter Umständen mehrere Stunden dauern. Manche Distributionen gibt es daher als kleine und als vollständige Variante zum Download.
|
As mentioned before, we need a compiler to be able to compile our source code.
|
||||||
Die vollständige Variante enthält alle Pakete, während in der normalen Version Pakete erst dann heruntergeladen werden, wenn sie benötigt werden.
|
The compiler is usually part of a collection of \emph{programs} and \emph{packages}, which are together called a \LaTeX-\emph{distribution}. The included packages provide various additional commands. For now, we will skip over the many programs\footnote{We will get to know one of these helper programs later on, in \ref{sec:literature}, when we are citing literature.}.
|
||||||
Die Entscheidung, ob ihr lieber zu Beginn oder später während des Arbeitens auf den Download wartet, können wir euch leider nicht abnehmen.
|
|
||||||
|
|
||||||
\section{Die Befehle}
|
% usable? Ich dachte an ein Analog zu "well maintained", aber passt das vielleicht einfach selbst?
|
||||||
|
Multiple different usable distributions exist. Known distributions are MiK\TeX,\footnote{For Windows, macOS and Linux. Available at \url{https://miktex.org/}.} Mac\TeX\footnote{For macOS and Linux. Available at \url{https://www.tug.org/mactex/}.} and \TeX{} Live\footnote{For Windows, macOS and Linux. Available at \url{https://www.tug.org/texlive/}.}. It is best to install one of them right away. The installation may take several hours. For this reason, some distributions are available for download in a small and a full version.
|
||||||
|
The full version contains all packages, while the small version downloads packages only when they are needed.
|
||||||
|
Unfortunately, we cannot take away the decision if you would rather wait for the download at the beginning or later while you are working. %Oxford-Komma?
|
||||||
|
|
||||||
|
%Wir verwenden den Compiler einer Distribution unserer Wahl. Bekannte Distributionen sind MiK\TeX,\footnote{Für Windows, macOS und Linux. Verfügbar unter \url{https://miktex.org/}.} Mac\TeX\footnote{Für macOS und Linux. Verfügbar unter \url{https://www.tug.org/mactex/}.} und \TeX{} Live.\footnote{Für Windows, macOS und Linux. Verfügbar unter \url{https://www.tug.org/texlive/}.}
|
||||||
|
%Installiert euch am besten gleich eine davon. Die Installation kann unter Umständen mehrere Stunden dauern. Manche Distributionen gibt es daher als kleine und als vollständige Variante zum Download. Die vollständige Variante enthält alle Pakete, während in der normalen Version Pakete erst dann heruntergeladen werden, wenn sie benötigt werden. Die Entscheidung, ob ihr lieber zu Beginn oder später während des Arbeitens auf den Download wartet, können wir euch leider nicht abnehmen.
|
||||||
|
|
||||||
|
\section{The commands}
|
||||||
\label{subsec:command-structure}
|
\label{subsec:command-structure}
|
||||||
Die in Quelltext verwendeten Befehle folgen einem allgemeinen Aufbau:
|
The commands used in source code follow a general structure:
|
||||||
\begin{minted}{xml}
|
\begin{minted}{xml}
|
||||||
\<befehl>[<optionale_parameter>]{<obligatorische_parameter>}
|
\<command>[<optional_parameters>]{<mandatory_parameters>}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
Ein Befehl kann mehrere optionale und/oder obligatorische Parameter verwenden. Manche Befehle besitzen keine obligatorischen Parameter. Ein paar Beispiele sind in \cref{tbl:latex-commands} dargestellt.
|
A command can use several optional and/or mandatory parameters. Some commands have no mandatory parameters at all. Some examples are shown in \cref{tbl:latex-commands}.
|
||||||
|
|
||||||
\begin{table}[h!]
|
\begin{table}[h!]
|
||||||
\widebox{
|
\widebox{
|
||||||
\begin{tabular}{@{}p{\widefigurewidth}p{\widefigurewidth}@{}}
|
\begin{tabular}{@{}p{\widefigurewidth}p{\widefigurewidth}@{}}
|
||||||
\toprule
|
\toprule
|
||||||
Befehl & Effekt \\
|
Command & Effekt \\
|
||||||
\midrule
|
\midrule
|
||||||
\mintinline{latex}{\newpage} & fügt eine neue Seite ein \\
|
\mintinline{latex}{\newpage} & inserts a new page \\
|
||||||
\mintinline{latex}{\textbf{Text}} & schreibt den übergebenen Text fett \\
|
\mintinline{latex}{\textbf{Text}} & prints the text in bold font \\
|
||||||
\mintinline{latex}{\usepackage[utf8]{inputenc}} & setzt die Textkodierung auf \acro{UTF-8} \\
|
\mintinline{latex}{\usepackage[utf8]{inputenc}} & specifies the text encoding to \acro{UTF-8} \\
|
||||||
\mintinline{latex}{\documentclass[a4paper,12pt]{article}} & setzt die Dokumentenklasse \\
|
\mintinline{latex}{\documentclass[a4paper,12pt]{article}} & specifies the document class \\
|
||||||
\mintinline{latex}{\frac{3}{4}} & fügt den mathematischen Bruch ein \\
|
\mintinline{latex}{\frac{3}{4}} & inserts a mathematical fraction \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
}
|
}
|
||||||
\caption{Beispiele für \LaTeX-Befehle}
|
\caption{Examples for \LaTeX-commands}
|
||||||
\label{tbl:latex-commands}
|
\label{tbl:latex-commands}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
Sollte ein Befehl mehrere optionale Parameter erlauben, welche gleiche Eingabetypen akzeptieren, muss angegeben werden, welcher Parameter gemeint ist. Beispielsweise akzeptiert der Befehl für das Einbinden von Grafiken optionale Parameter für Breite und Höhe. Bei einer Eingabe von \mintinline{tex}|[12cm, 4cm]| wäre unklar, welcher Wert für welchen Parameter bestimmt ist. Um die Zuweisung zu konkretisieren, können die Parameter explizit angegeben werden:
|
If a command allows multiple optional parameters that accept the same input types, it is necessary to specify which parameter is meant. For example, the command for embedding graphics accepts optional parameters for width and height. If \mintinline{tex}|[12cm, 4cm]| were entered, it would be unclear which value is intended for which parameter. To make the assignment more concrete, we can specify the parameters explicitly:
|
||||||
\begin{minted}{tex}
|
\begin{minted}{tex}
|
||||||
\includegraphics[width=12cm, height=4cm]{bild.png}
|
\includegraphics[width=12cm, height=4cm]{picture.png}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
Wie die Beispiele bereits zeigen, können Befehle sehr unterschiedlich sein. Manche sind für Verwendung in mathematischen Formeln bestimmt, andere ermöglichen das Einbinden von Grafiken. Zu Anfang wird es gewöhnungsbedürftig sein, sich alle häufig vorkommenden Befehle zu merken -- aller Anfang ist bekanntlich schwer. Nach etwas Übung und Geduld sind einfache Dokumente aber im Handumdrehen erstellt.
|
As the examples already show, there are many different commands that can be used. Some are intended for use in mathematical formulas, others allow the inclusion of graphics. At the beginning it will take some getting used to. Remembering all the relevant commands is hard, but after some practice and patience simple documents can be created in no time.
|
||||||
@ -1,44 +1,48 @@
|
|||||||
\chapter*{Erste Schritte mit \LaTeX}
|
\newpage
|
||||||
\addcontentsline{toc}{section}{Erste Schritte mit \LaTeX}
|
\definecolor{latexblue}{rgb}{0.9,0.925,0.95}
|
||||||
|
\pagecolor{latexblue}
|
||||||
|
|
||||||
Dieses Skript dient als kurze Referenz zum Umgang mit LateX und als Übungsbeispiel für das LaTeX-Tutorium der Fachschaft WIAI.
|
\chapter*{First steps with \LaTeX}
|
||||||
Viele Aufgaben erfordern es, das Skript selbst anzupassen.
|
\addcontentsline{toc}{section}{First steps with \LaTeX}
|
||||||
Das dafür benötigte Projektarchiv mit allen Quelltextdateien sowie die aktuellste Version dieses Skriptes sind auf Github\footnote{\url{https://github.com/fs-wiai/latex-script/releases}} zu finden.
|
|
||||||
|
|
||||||
Bevor wir ins Arbeiten mit \LaTeX{} einsteigen können, müssen wir es natürlich zunächst installieren.
|
This script serves as a short reference on handling \LaTeX{} and as exercise material für the \LaTeX{} workshop of the Fachschaft \acro{WIAI}.
|
||||||
Außerdem müssen wir einige Anpassungen vornehmen, um mit diesem Projekt arbeiten zu können.
|
Many tasks require you to modify the script on your own.
|
||||||
Alle Schritte erläutern wir in den folgenden Kapiteln näher.
|
The project material with all of the source files and the lastest version of this script can be found on Github.\footnote{\url{https://github.com/fs-wiai/latex-script/releases}}
|
||||||
Nach und nach werdet ihr so ein Verständnis der Arbeitsweise mit \LaTeX{} aufbauen.
|
|
||||||
Für den Anfang folgt einfach der Anleitung.
|
Before we can dive into \LaTeX{}, we will obviously have to install it.
|
||||||
Achtet bitte darauf, dass ihr \emph{zuerst} den Compiler und \emph{danach} einen Editor installiert.
|
We will also need to do some configuration to be able to work with this project.
|
||||||
|
All of this will be explained in more detail in the following chapters.
|
||||||
|
Bit by bit, you will get an understanding of how to work with \LaTeX{}.
|
||||||
|
For now, just follow our instructions.
|
||||||
|
Please, make sure to install the \emph{compiler first} and the the \emph{editor afterwards}\textit{.}
|
||||||
|
|
||||||
\section*{Compiler}
|
\section*{Compiler}
|
||||||
Zunächst zum Compiler. Ihn brauchen wir, um den Quelltext, den wir schreiben, in ein \acro{PDF} umzuwandeln. Hier gibt es für verschiedene Betriebssysteme unterschiedliche Compiler, wie etwa MikTeX für Windows,\footnote{\url{https://miktex.org/download}} MacTex für MacOS\footnote{\url{http://tug.org/mactex/}} und TeXLive für Linux-Distributionen.\footnote{Sofern ihr eine debianbasierte Linux-Distribution verwendet, kann der Compiler mittels \mintinline{bash}{sudo apt install texlive-full} installiert werden. Für andere Distributionen findet ihr eine Anleitung unter \url{https://tug.org/texlive/doc/texlive-en/texlive-en.html\#installation}.} Bestenfalls installiert ihr die volle Version mit allen Paketen.
|
Let’s start with the compiler.
|
||||||
|
We will need it to convert the source code that we are going to write into a \acro{PDF}.
|
||||||
|
There are different compilers for different operating systems;
|
||||||
|
for example, MikTeX for Windows,\footnote{\url{https://miktex.org/download}} MacTex for MacOS\footnote{\url{http://tug.org/mactex/}} and TeXLive for Linux distributions.\footnote{If you are using a Debian-based Linux distribution, you can install the compiler by executing \mintinline{bash}{sudo apt install texlive-full}. For other distributions, you find instructions on \url{https://tug.org/texlive/doc/texlive-en/texlive-en.html\#installation}.} In case you get to choose, it is best to install the full version with all packages.
|
||||||
|
|
||||||
\section*{Editor}
|
\section*{Editor}
|
||||||
Sobald ihr das gemacht habt, könnt ihr euch auch schon einen Editor
|
As soon as you have installed the compiler, you can download an editor that you are going to use to write your \LaTeX{} documents.
|
||||||
herunterladen, in dem ihr eure \LaTeX-Dokumente gerne schreiben möchtet. Dafür
|
Any editor will do (notepad++, Atom, VS Code, etc.).
|
||||||
ist eigentlich jeder Editor geeignet (notepad++, Atom, VS Code, usw.). Wir
|
However, for beginners, we do recommend to use a program that supports you with \LaTeX-specific features.
|
||||||
empfehlen für Anfänger jedoch ein Programm, das \LaTeX-spezfische Funktionen
|
One of them is TeXstudio.\footnote{You find the latestt version on \url{https://www.texstudio.org/}.}
|
||||||
besitzt, wie etwa TeXstudio.\footnote{Eine aktuelle Version findet ihr unter
|
|
||||||
\url{https://www.texstudio.org/}.}
|
|
||||||
|
|
||||||
\section*{Compilerbefehl ändern}
|
\section*{Changing the compiler command}
|
||||||
Damit es beim Kompilieren dieses Dokuments nicht zu Fehlern kommt, müsst ihr
|
To prevent errors during the compilation of our document, you have to change the compiler command.
|
||||||
nun den Compilerbefehl ändern. Klickt dazu in TeXstudio zunächst auf die
|
In TeXstudio, click on the \emph{options} button and then on \emph{Configure TeXstudio \textellipsis}\todo{Need to find out what they are actually called in English. Maybe also add the correct steps for Mac (these don’t apply)}.
|
||||||
Schaltfläche \emph{Optionen} und anschließend auf \emph{TeXstudio
|
A new window will open up.
|
||||||
konfigurieren \textellipsis}. Danach wird sich ein neues Fenster öffnen. Dort navigiert
|
Navigate to the \emph{commands} area and, at \emph{PdfLaTeX}, add the flag \mintinline{bash}{-shell-escape}.
|
||||||
ihr zum Bereich \emph{Befehle} und setzt bei \emph{PdfLaTeX} das Flag
|
In other words: The command for \emph{PdfLaTeX} should look like this:
|
||||||
\mintinline{bash}{-shell-escape}. In anderen Worten: Der Text bei
|
\mint{bash}{pdflatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex}
|
||||||
\emph{PdfLaTeX} sollte folgendermaßen lauten:
|
|
||||||
\mint{bash}{pdflatex -synctex=1 -interaction=nonstopmode -shell-escape
|
|
||||||
%.tex}
|
|
||||||
|
|
||||||
|
|
||||||
\section*{Das erste Mal kompilieren}
|
\section*{Compiling for the first time}
|
||||||
Öffnet nun die Datei \mintinline{bash}{main.tex} im Wurzelverzeichnis des
|
Open up the file \mintinline{bash}{main.tex} in the root directory of the project and compile it by pressing \faForward.
|
||||||
Projektes und kompiliert sie durch Druck auf \faForward.
|
Looking at the directory, you should see a few new files.
|
||||||
In dem Ordner, in dem die Datei liegt, sollten verschiedene neue Dateien erschienen sein.
|
The \mintinline{bash}{main.pdf} file contains the compiled document.
|
||||||
Die Datei \mintinline{bash}{main.pdf} enthält das kompilierte Dokument.
|
The other files are auxiliary files that the compiler uses, for example, to generate the table of contents.
|
||||||
Außerdem sind einige Hilfsdateien aufgetaucht, die der Compiler zum Beispiel nutzt, um das Inhaltsverzeichnis zu generieren.
|
You are now ready to go!
|
||||||
Damit seid ihr startklar!
|
|
||||||
|
\newpage
|
||||||
|
\nopagecolor
|
||||||
|
|||||||
@ -1,64 +1,60 @@
|
|||||||
\chapter{Grafiken}
|
\chapter{Graphics}
|
||||||
\label{sec:graphics}
|
\label{sec:graphics}
|
||||||
|
|
||||||
Da wir in \LaTeX{} mit Plaintext-Dateien arbeiten, können wir Grafiken nicht – wie von Textverarbeitungsprogrammen gewohnt – einfach einbetten.
|
Since in \LaTeX{} we work with plain text, we cannot simply embed graphics into our text as we may be used to from other text word processing programs.
|
||||||
Stattdessen werden externe Bilddateien über Befehle referenziert und dann erst beim Kompilieren eingebunden und positioniert.
|
Instead, we reference external image files by a command. The figure is then embedded and positioned at compile time.
|
||||||
|
|
||||||
\section{Grafiken einfügen}
|
\section{Inserting Graphics}
|
||||||
\label{sec:display-graphics}
|
\label{sec:display-graphics}
|
||||||
Damit Grafiken referenziert werden können, muss das Paket \texttt{graphicx} eingebunden werden. Zum Einfügen können dann folgende Befehle verwendet werden:
|
In order to be able to reference graphics, the package \texttt{graphicx} has to be included. For inserting a figure, we can use the following commands:
|
||||||
|
|
||||||
\begin{minted}[tabsize=4]{latex}
|
\begin{minted}[tabsize=4]{latex}
|
||||||
\begin{figure}
|
\begin{figure}
|
||||||
\includegraphics{<dateipfad>}
|
\includegraphics{<file path>}
|
||||||
\caption[<kurztitel>]{<bildunterschrift>}
|
\caption[<short title>]{<caption>}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
\noindent Soll die Bildgröße angepasst werden, kann der \texttt{includegraphics}-Befehl abgeändert werden.
|
\noindent The command \mintinline{latex}{includegraphics} can be used to change the image size. The desired height and width of the figure can be indicated separately, like illustrated by the following example:
|
||||||
Die erwünschte Höhe und Breite können hier separat angegeben werden, etwa wie folgt:
|
|
||||||
|
|
||||||
\begin{minted}{latex}
|
\begin{minted}{latex}
|
||||||
\includegraphics[width=0.5\textwidth,height=5cm]{<dateipfad>}
|
\includegraphics[width=0.5\textwidth,height=5cm]{<file path>}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
\section{Platzierung}
|
\section{Positioning}
|
||||||
\label{sec:graphics-placement}
|
\label{sec:graphics-placement}
|
||||||
Ein interessanter Aspekt des What-you-get-is-what-you-mean-Paradigmas ist die Art und Weise, wie Grafiken positioniert werden können.
|
One interesting aspect of the what-you-get-is-what-you-mean paradigm is the way how graphics can be positioned.
|
||||||
Standardmäßig erfolgt eine automatische Platzierung an einer vom Compiler berechneten, potenziell optimalen Stelle.
|
By default, the graphic is placed at the potentially optimal position that is calculated by the compiler. It creates multiple layouts and evaluates them. By moving graphics, typographic blemishes, like widows and orphans\footnote{The first (last) line of a paragraph appears alone as last (first) line on the previous (next) page, cf. \url{https://en.wikipedia.org/wiki/Widows_and_orphans}.}, can be avoided.
|
||||||
Dabei werden verschiedene Layouts erstellt und danach bewertet, wie ansprechend das Ergebnis ist.
|
|
||||||
Durch das Verschieben von Grafiken können typografische Schönheitsfehler wie Schusterjungen und Hurenkinder\footnote{Die erste (letzte) Zeile eines Absatzes steht allein als letzte (erste) Zeile auf der vorherigen (nächsten) Seite, vgl. \url{https://de.wikipedia.org/wiki/Hurenkind_und_Schusterjunge}.} weitestgehend vermieden werden.
|
|
||||||
|
|
||||||
Dies bedeutet aber auch, dass eine Grafik nicht notwendigerweise zwischen den zwei Textblöcken wie im Quelltext erscheint, sondern an anderer Stelle.
|
As a consequence, graphics are not necessarily placed between the two text blocks that we specify, but at another position.
|
||||||
Um im Text einen klaren Bezug zu einer gegebenenfalls anderswo platzierten Grafik herzustellen, können wir Labels verwenden, die wir in \cref{sec:references} erklären.
|
In order to reference a picture, that possibly is placed on another page, we can use labels, which are covered in \cref{sec:references}.
|
||||||
Wir können diese Verschiebungen außerdem durch Hinzufügen eines optionalen Parameters zur \mintinline{latex}{figure}-Umgebung mehr oder minder rigoros begrenzen.
|
On top of that, we can limit the positioning of our image more or less rigorously by adding optional parameters to the \texttt{figure} environment. The available positioning shortcuts can be found in \cref{tbl:placement-abbreviations}.
|
||||||
Die verfügbaren Positionskürzel werden in \cref{tbl:placement-abbreviations} aufgelistet.
|
|
||||||
|
|
||||||
\begin{table}[h!]
|
\begin{table}[h!]
|
||||||
\center
|
\centering
|
||||||
\begin{tabular}{cl}
|
\begin{tabular}{cl}
|
||||||
\toprule
|
\toprule
|
||||||
Kürzel & Position \\
|
Shortcut & Position \\
|
||||||
\midrule
|
\midrule
|
||||||
h & möglichst hier, wenn es gefällt \\
|
h & here, if possible \\
|
||||||
t & oberer Seitenrand \emph{(top)} \\
|
t & on top of the page \emph{(top)} \\
|
||||||
b & unterer Seitenrand \emph{(bottom)} \\
|
b & at the bottom of the bage \emph{(bottom)} \\
|
||||||
p & auf einer eigenen Seite \emph{(page)} \\
|
p & on its own apge\emph{(page)} \\
|
||||||
H & Definitiv an dieser Stelle! (benötigt Paket \texttt{float}) \\
|
H & Definitely here! (requires package \texttt{float}) \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Kürzel zur Platzierung von Abbildungen}
|
\caption{Shortcuts for Positioning Graphics}
|
||||||
\label{tbl:placement-abbreviations}
|
\label{tbl:placement-abbreviations}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
\begin{minted}[tabsize=4]{latex}
|
\begin{minted}[tabsize=4]{latex}
|
||||||
\begin{figure}[<positionskürzel>]
|
\begin{figure}[<position shortcut>]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics{<dateipfad>}
|
\includegraphics{<file path>}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
Neben der vertikalen Positionierung spielt gegebenenfalls auch die horizontale Ausrichtung eine Rolle.
|
Besides the vertical positioning, also the horizontal orientation may be of importance.
|
||||||
Standardmäßig sind Grafiken linksbündig orientiert.
|
By default, graphics are left-justified.
|
||||||
Der Befehl \mintinline{latex}{\centering} zentriert alle folgenden Objekte bis zum Ende der aktuellen Umgebung.
|
The command \mintinline{latex}{\centering} centers all following objects in the current environment.
|
||||||
Soll sich die Zentrierung nur auf ein Objekt beziehen, kann dieses stattdessen mit \mintinline{latex}{\begin{center}} und \mintinline{latex}{\end{center}} umschlossen werden.
|
If we want the centering to affect only one object, we can alternatively wrap the figure with \mintinline{latex}{\begin{center}} and \mintinline{latex}{\end{center}}.
|
||||||
|
|||||||
@ -1,91 +1,95 @@
|
|||||||
\chapter{Sonderzeichen}
|
\chapter{Special characters}
|
||||||
|
|
||||||
\label{sec:special-characters}
|
\label{sec:special-characters}
|
||||||
|
|
||||||
\section{Leerzeichen}
|
\section{Spaces}
|
||||||
|
|
||||||
Das am häufigsten benötigte Sonderzeichen ist ein einfaches Leerzeichen als Wortzwischenraum.
|
The special character used most frequently is a simple space between words.
|
||||||
Dieses Zeichen entsteht in \LaTeX, wenn im Quellcode zwischen anderen Zeichen Leerzeichen oder einzelne Zeilenumbrüche stehen.
|
\LaTeX{} creates it whenever the source code contains spaces or single newlines (by hitting the enter key once) between other characters.
|
||||||
Es gibt aber auch einige andere Arten von Leerzeichen.
|
The word space is not the only one, though\,---\,there are a few more types of spaces.
|
||||||
Wie sie verwendet werden können, wird in \cref{lst:spaces} veranschaulicht.
|
\Cref{lst:spaces} illustrates how they are used.
|
||||||
|
|
||||||
\example{lst:spaces}{special-characters/spaces}{Unterschiedliche Leerzeichen in \LaTeX}
|
\example{lst:spaces}{special-characters/spaces}{Unterschiedliche Leerzeichen in \LaTeX}
|
||||||
|
|
||||||
\paragraph{English Spacing}
|
\paragraph{English Spacing}
|
||||||
In englischsprachigen Dokumenten verwendet LaTeX das traditionelle English Spacing, also doppelte Leerzeichen nach dem Satzende.
|
In documents written in English, \LaTeX{} uses traditional English Spacing by default. That is, double spaces after each sentence.
|
||||||
Der Befehl \mintinline{tex}|\frenchspacing| vor dem ersten Absatz verhindert das.
|
We can prevent this by using the command \mintinline{tex}|\frenchspacing| above the first paragraph.
|
||||||
Der Befehl \mintinline{tex}|\nonfrenchspacing| schaltet wieder zurück.
|
With \mintinline{tex}|\nonfrenchspacing|, we can reset the behavior.
|
||||||
Bei English Spacing versucht \LaTeX, Abkürzungen zu erkennen und danach trotzdem normale Wortzwischenräume zu setzen.
|
When using English Spacing, \LaTeX{} tries to recognize abbreviations and to use normal spaces after those.
|
||||||
Das solltet ihr aber kontrollieren – und, wo nötig,
|
We should still check this and\,---\,where necessary\,---\,enforce word spaces (\mintinline[showspaces]{tex}{.\ }) or sentence spaces (\mintinline[showspaces]{tex}{\@. }).
|
||||||
Wortzwischenräume (\mintinline[showspaces]{tex}{.\ }) oder Satzenden (\mintinline[showspaces]{tex}{\@. }) erzwingen.
|
|
||||||
|
|
||||||
\section{Striche}
|
\section{Hyphens and dashes}
|
||||||
Es gibt verschiedene horizontale Striche.
|
There are different kinds of horizontal lines being used as punctuation,
|
||||||
Am häufigsten werden der Bindestrich (-), der Halbgeviertstrich (–) und der Geviertstrich\footnote{Ein Geviert ist die Zeilenhöhe, die eine Bleiletter aus dem Buchdruck einnimmt.} (—) verwendet.
|
most frequently the hyphen (-), the en dash (–) and the em dash (—).\footnote{They are named after the letters N and M,
|
||||||
Diese drei Striche werden in \LaTeX{} durch unterschiedlich viele Bindestriche im Quelltext erzeugt, wie \cref{tbl:bars} zeigt.
|
that occupy roughly the same space.
|
||||||
|
The letter M is also about as wide as it is tall, and the amount is called a \emph{Geviert} in German, hence the German terms \emph{Halbgeviertstrich} and \emph{Geviertstrich} for the two dashes.}
|
||||||
|
These three characters are created in \LaTeX{} by different numbers of consecutive hyphens in the source code,
|
||||||
|
as shown in \cref{tbl:bars}.
|
||||||
|
|
||||||
\begin{longtable}{@{}llp{7.8cm}@{}}
|
\begin{longtable}{@{}llp{7.8cm}@{}}
|
||||||
\toprule
|
\toprule
|
||||||
Code & Strich & Verwendung \\
|
Code & Character & Usage \\
|
||||||
\midrule
|
\midrule
|
||||||
\mintinline{tex}|-| & Bindestrich & \LaTeX-Wochenende \\
|
\mintinline{tex}|-| & Hyphen & a small-sized stroke \\
|
||||||
\mintinline{tex}|--| & Halbgeviertstrich & als Gedankenstrich – mit Leerzeichen außenrum – oder als Bis-Strich: 10\,–\,12 Uhr \\
|
\mintinline{tex}|--| & En dash & a range mark (8\,--\,10\,am) or an interruptor at sentence level – the latter surrounded by spaces and used in most European languages (including British English) \\
|
||||||
\mintinline{tex}|---| & Geviertstrich & a dash\,—\,mostly used in American English \\
|
\mintinline{tex}|---| & Em dash & an interruptor at sentence level\,---\,mostly used in American English and without or with thin spaces \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\caption{Striche in \LaTeX}
|
\caption{Hyphens and dashes in \LaTeX}
|
||||||
\label{tbl:bars}
|
\label{tbl:bars}
|
||||||
\end{longtable}
|
\end{longtable}
|
||||||
|
|
||||||
Der Bindestrich wird zwar auch zur Silbentrennung verwendet, ihr solltet ihn dafür aber nicht explizit im Quellcode eingeben.
|
The hyphen is obviously also used for hyphenation, but for this purpose, we should not insert it explicitly in our source code.
|
||||||
An den meisten Stellen trennt \LaTeX{} automatisch richtig, wenn ihr das passende \texttt{babel}-Paket eingebunden habt.\footnote{Vgl. \cref{sec:language}.}
|
In most places, \LaTeX{} does the hyphenation automatically if we are using the correct \texttt{babel} package.\footnote{c.\,f. \cref{sec:language}.}
|
||||||
Wenn dabei etwas schiefgeht, könnt ihr mit den Codes in \cref{tbl:separators} eingreifen:\footnote{Auch dafür muss \texttt{babel} eingebunden sein.}
|
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?}
|
||||||
|
|
||||||
\begin{longtable}{@{}lp{11cm}@{}}
|
\begin{longtable}{@{}lp{11cm}@{}}
|
||||||
\toprule
|
\toprule
|
||||||
Code & Erläuterung \\
|
Code & Erläuterung \\
|
||||||
\midrule
|
\midrule
|
||||||
\endhead
|
\endhead
|
||||||
\mintinline{tex}|\-| & Ausschließliche Trennstelle: Das Wort darf nur an dieser Stelle getrennt werden (kann auch mehrfach in einem Wort vorkommen, dann sind alle Stellen erlaubt). \\
|
\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). \\
|
||||||
\mintinline{tex}|"-| & Zusätzliche Trennstelle: Das Wort darf neben den von \LaTeX{} erkannten Trennstellen auch hier getrennt werden. \\
|
\mintinline{tex}|"-| & Additional hyphenation: The word may be hyphenated here, as well as at the default positions. \\
|
||||||
\mintinline{tex}|-| & Exklusiver Bindestrich: Wird für Komposita verwendet und unterbindet die automatische Silbentrennung im Wort (das ist typografisch erwünscht). \\
|
\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}|"=| & Nichtexklusiver Bindestrich: Wird für lange Komposita verwendet, bei denen die Silbentrennung aktiv bleiben soll, weil der Umbruch sonst nicht klappt. \\
|
\mintinline{tex}|"=| & Non-exclusive hyphen: Is used for long compound words when the text wrapping would not work without additional automatic hyphenation. \\
|
||||||
\mintinline{tex}|""| & Trennstelle ohne Strich: Kann beispielsweise verwendet werden, um \textsc{url}s ohne Bindestrich zu trennen. \\
|
\mintinline{tex}|""| & Cut-off point without a hyphen: Allows something like a \textsc{url} to wrap without inserting a potentially misleading hyphen. \\
|
||||||
\mintinline{tex}|"~| & Bindestrich ohne Trennstelle: Wird verwendet, um den Bindestrich zusammen mit dem folgenden Wort umbrechen zu lassen: \emph{Vorlesungszeit und "~raum} \\
|
\mintinline{tex}|"~| & Non-wrapping hyphen: Keeps the hypen together with the following word, very useful in German: \emph{Vorlesungszeit und "~raum} \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\caption{Ausnahmen für die Silbentrennung}
|
\caption{Exceptions for hyphenation}
|
||||||
\label{tbl:separators}
|
\label{tbl:separators}
|
||||||
\end{longtable}
|
\end{longtable}
|
||||||
|
|
||||||
\section{Anführungszeichen}
|
\section{Quotation marks}
|
||||||
Anführungszeichen können grundsätzlich mit den Codes in \cref{tbl:quotation-marks} erzeugt werden.
|
Quotation marks can generally be created using the codes from \cref{tbl:quotation-marks}.
|
||||||
Entscheidend ist dabei jeweils das Aussehen und nicht die Semantik, weshalb zum Beispiel im Deutschen die französichen Guillemets verkehrt herum verwendet werden (»french left quoation mark« rechts und umgekehrt).
|
The decisive factor is the appearance, not the semantics, which is why the French Guillemets are used the wrong way around in German
|
||||||
|
(the \emph{french left quotation mark} on the right and vice versa).
|
||||||
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\center
|
\center
|
||||||
\begin{tabular}{lcccc}
|
\begin{tabular}{lcccc}
|
||||||
\toprule
|
\toprule
|
||||||
Sprache & \multicolumn{2}{c}{Erste Ebene} & \multicolumn{2}{c}{Zweite Ebene} \\
|
Language & \multicolumn{2}{c}{First level} & \multicolumn{2}{c}{Second level} \\
|
||||||
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
|
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
|
||||||
& Code & Ergebnis & Code & Ergebnis \\
|
& Code & Result & Code & Result \\
|
||||||
\midrule
|
\midrule
|
||||||
Deutsch & \mintinline{tex}|\glqq...\grqq| & \glqq…\grqq & \mintinline{tex}|\glq…\grq| & \glq…\grq \\
|
English (\acro{A.\,E.}) & \mintinline{tex}|``...''| & ``…'' & \mintinline{tex}|`...'| & `…' \\
|
||||||
Deutsch alternativ & \mintinline{tex}|\frqq...\flqq| & \frqq…\flqq & \mintinline{tex}|\frq…\flq| & \frq…\flq \\
|
English (\acro{B.\,E.}) & \mintinline{tex}|`...'| & `…' & \mintinline{tex}|``...''| & ``…'' \\
|
||||||
Englisch (\acro{A.\,E.}) & \mintinline{tex}|``...''| & ``…'' & \mintinline{tex}|`...'| & `…' \\
|
German & \mintinline{tex}|\glqq...\grqq| & \glqq…\grqq & \mintinline{tex}|\glq…\grq| & \glq…\grq \\
|
||||||
Englisch (\acro{B.\,E.}) & \mintinline{tex}|`...'| & `…' & \mintinline{tex}|``...''| & ``…'' \\
|
German (alternatively) & \mintinline{tex}|\frqq...\flqq| & \frqq…\flqq & \mintinline{tex}|\frq…\flq| & \frq…\flq \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Anführungszeichen}
|
\caption{Quotation marks}
|
||||||
\label{tbl:quotation-marks}
|
\label{tbl:quotation-marks}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
Deutlich flexibler seid ihr aber mit dem Paket \mintinline{tex}{csquotes}, das den Befehl \mintinline{tex}|\enquote{<zitat>}| zur Verfügung stellt.
|
We can also get more flexibility using the \mintinline{tex}{csquote} package, which provides the \mintinline{tex}|\enquote{<quote>}| command.
|
||||||
Abhängig von der Sprache werden die passenden Anführungszeichen verwendet; bei verschachtelten \texttt{enquote}s wird zwischen erster und zweiter Ebene gewechselt.
|
It chooses the correct quotation marks depending on the language being used; also, nested \texttt{enquote}s automatically switch back and forth between first and second level.
|
||||||
Mit der Option \mintinline{tex}|autostyle=true| beim Paketimport setzt der Befehl \mintinline{tex}|\foreignquote{<sprache>}{<zitat>}| je nach Sprache abweichende Anführungszeichen.
|
When enabling the \mintinline{tex}|autostyle=true| option on package import, \mintinline{tex}|\foreignquote{<language>}{<quote>}| selects varying quotation marks for each quotation.
|
||||||
|
|
||||||
\section{Diakritika}
|
\section{Diacritics}
|
||||||
Wenn ihr Buchstaben mit diakritischen Zeichen direkt über die Tastatur eingeben könnt – beispielsweise die deutschen Umlaute oder gängige Akzente auf einer deutschen Tastatur –, könnt ihr das auch direkt im Quelltext tun.
|
If we are able to insert letters with diacritics via our keyboard\,---\,e.\,g., the German Umlauts or common accents\,---\,we can also do this within our source code:
|
||||||
Die Zeichen bleiben dann im Output erhalten.
|
The characters will remain intact in the output.
|
||||||
Ansonsten können die Diakritika auch per Escape-Codes erzeugt werden.
|
If not, we can also create the diacritics via escape codes.
|
||||||
\cref{tbl:diacritics} gibt nur einige Beispiele an – die Buchstaben lassen sich natürlich austauschen, es gibt aber auch noch viele andere Diakritika.
|
\Cref{tbl:diacritics} shows just a few examples\,---\,the letters can of course be swapped out, but there is still a huge amount of different diacritics.
|
||||||
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\center
|
\center
|
||||||
@ -103,10 +107,10 @@ Ansonsten können die Diakritika auch per Escape-Codes erzeugt werden.
|
|||||||
\label{tbl:diacritics}
|
\label{tbl:diacritics}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
\section{Andere Sonderzeichen}
|
\section{More special characters}
|
||||||
Einige Sonderzeichen, beispielsweise das Prozentzeichen, sind für die \LaTeX{}-Syntax reserviert und können nicht als normale Zeichen verwendet werden.
|
Some special characters, like the percent sign, are reserved as part of the \LaTeX{} syntax and cannot be used as normal characters.
|
||||||
Diese und viele, viele weitere Sonderzeichen können über eigene Befehle erzeugt werden.
|
These and many, many more can be created by their own commands.
|
||||||
Dabei ist zu beachten, dass manche Sonderzeichen nur in Mathe-Umgebungen (siehe \cref{sec:maths}) funktionieren, andere brauchen zusätzliche Pakete.
|
Please note that some of them only work in maths environments (c.\,f. \cref{sec:maths}), others might require additional packages.
|
||||||
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\center
|
\center
|
||||||
@ -128,15 +132,15 @@ Dabei ist zu beachten, dass manche Sonderzeichen nur in Mathe-Umgebungen (siehe
|
|||||||
\textless/\textgreater & \verb|\textless/\textgreater| & \\
|
\textless/\textgreater & \verb|\textless/\textgreater| & \\
|
||||||
\textperthousand & \verb|\textperthousand| & \\
|
\textperthousand & \verb|\textperthousand| & \\
|
||||||
\textsection & \verb|\textsection| & \\
|
\textsection & \verb|\textsection| & \\
|
||||||
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & nur in Mathe-Umgebung \\
|
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths environments \\
|
||||||
\euro & \verb|\euro| & nur mit Paket \texttt{eurosym} \\
|
\euro & \verb|\euro| & requires the \texttt{eurosym} package \\
|
||||||
\textteshlig & \verb|\textteshlig| & nur mit Paket \texttt{tipa} \\
|
\textteshlig & \verb|\textteshlig| & requires the \texttt{tipa} package \\
|
||||||
\textmusicalnote & \verb|\textmusicalnote| & nur mit Paket \texttt{textcomp} \\
|
\textmusicalnote & \verb|\textmusicalnote| & requires the \texttt{textcomp} package \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Einige Sonderzeichen}
|
\caption{Some special characters}
|
||||||
\label{tbl:special-characters}
|
\label{tbl:special-characters}
|
||||||
\end{table}
|
\end{table}
|
||||||
Falls ihr mal ein Sonderzeichen braucht, von dem ihr nicht genau wisst, wie es heißt, hilft euch \emph{Detexify}\footnote{\url{http://detexify.kirelabs.org/classify.html}} – ihr könnt das Symbol zeichnen und bekommt alle nötigen Infos.
|
Whenever you need a certain symbol and don’t know its name, \emph{Detexify}\footnote{\url{http://detexify.kirelabs.org/classify.html}} comes to the rescue: You can draw the symbol and get all necessery information.
|
||||||
Dass es von Keilschrift bis zu technischen Symbolen wirklich \emph{alles} gibt, stellt ihr fest, wenn ihr durch die \emph{Comprehensive \LaTeX{} Symbol List}\footnote{\url{http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}} blättert.
|
From cuneiforms to technical symbols, there is absolutely \emph{everything}, as you can see scrolling through the \emph{Comprehensive \LaTeX{} Symbol List}.\footnote{\url{http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}}
|
||||||
|
|
||||||
|
|||||||
@ -1,50 +1,53 @@
|
|||||||
\chapter{Tabellen}
|
\chapter{Tables}
|
||||||
\label{sec:tables}
|
\label{sec:tables}
|
||||||
|
|
||||||
Für Tabellen gibt es zwei grundlegende Umgebungen.
|
There are two fundamental environments for tables.
|
||||||
Die erste, \texttt{table}, ist dafür zuständig, die Tabelle insgesamt in das übrige Dokument einzubauen.
|
The first one called \texttt{table} is responsible for integrating the table as a whole into the document.
|
||||||
Die Positionierung erfolgt dabei analog zur Positionierung von Grafiken.
|
Positioning is done the same way as it is with graphics.
|
||||||
Auch bei Tabellen kann der Befehl \mintinline{tex}{\caption} verwendet werden, um der Tabelle eine Beschriftung zuzuordnen.
|
The \mintinline{tex}{\caption} command is the same, as well.
|
||||||
|
|
||||||
Beim Tabelleninhalt hören die Gemeinsamkeiten auf:
|
At the table \emph{content}, the similarities end:
|
||||||
Während Grafiken aus externen Dateien stammen und nicht durch \LaTeX{} interpretiert werden, muss die innere Struktur von Tabellen im Code aufgeschlüsselt werden.
|
While graphics are embedded from external files and not interpreted by \LaTeX{},
|
||||||
Dazu dient die Umgebung \texttt{tabular}, die als verpflichtenden Parameter eine Spaltendefinition erwartet.
|
the inner structure of tables has to be encoded explicitly.
|
||||||
Die Spaltendefinition besteht aus je einem Buchstaben pro Tabellenspalte, der die Textausrichtung der Spalte angibt:
|
This is done with the \texttt{tabular} environment that expects a column definition as an obligatory parameter.
|
||||||
\texttt{l} für linksbündig, \texttt{r} für rechtsbündig, \texttt{c} für zentriert.
|
The column definition consists of one letter per column specifying its text alignment:
|
||||||
|
\texttt{l} for left-justified, \texttt{r} for right-justified, \texttt{c} for centered.
|
||||||
|
|
||||||
Innerhalb der \texttt{tabular}-Umgebung folgt dann der eigentliche Tabelleninhalt.
|
Within the \texttt{tabular} environment, the actual table content follows.
|
||||||
Dabei werden Tabellenzeilen genau wie Zeilenumbrüche durch \mintinline{tex}{\\} markiert, Zellengrenzen durch \mintinline{tex}{&}.
|
Table rows are separated by \mintinline{tex}{\\}, just like line breaks, and cells by an \mintinline{tex}{&}.
|
||||||
|
|
||||||
Für typografisch ansprechende Tabellen empfehlen wir das Paket \texttt{booktabs}.\footnote{Alle bisher genannten Befehle funktionieren auch ohne dieses Paket, das Ergebnis sieht dann aber deutlich unprofessioneller aus.}
|
For typographically pleasing tables, we recommend the \texttt{booktabs} package.\footnote{All commands previously mentioned also work without this package, but the result will look far less professional.}
|
||||||
Dieses Paket bringt die Befehle \mintinline{tex}{\toprule}, \mintinline{tex}{\midrule} und \mintinline{tex}{\bottomrule} mit, die jeweils passende horizontale Linien für den Tabellenbegin, für Gruppierungen innerhalb der Tabelle sowie für das Tabellenende zeichnen.
|
This package brings along the commands \mintinline{tex}{\toprule}, \mintinline{tex}{\midrule} and \mintinline{tex}{\bottomrule} that draw appropriate horizontal lines above, within and below the table, respectively.
|
||||||
|
|
||||||
Vertikale Linien können als senkrechter Strich (\texttt{|}) in die Spaltendefinition eingefügt werden, davon ist aber abzuraten.
|
Vertical lines can be inserted as a vertical bar character (\texttt{|}) in the column definition, but this is not recommended.\footnote{The
|
||||||
Wenn ihr den zusätzlichen Weißraum entfernen möchtet, der standardmäßig die Spalten umgibt, könnt ihr – ebenfalls zwischen den Buchstaben der Spaltendefinition – die Zeichenkette \mintinline{tex}{@{}} einfügen.
|
whitespace within the table separates the columns clearly enough, additional lines just make for visual clutter.}
|
||||||
|
If you want to remove the additional whitespace that surrounds the columns by default (e.\,g., to the left of the first column and to the right of the last), you can add the string \mintinline{tex}{@{}} at the corresponding places within the column definition.
|
||||||
|
|
||||||
Die komplette Tabelle kann dann beispielsweise so aussehen wie in \cref{lst:sample-table} abgebildet.
|
A complete table can then look like the one shown in \cref{lst:sample-table}.
|
||||||
|
|
||||||
\Example{lst:sample-table}{tables/table-example}{tables/table-example-renderable}{Eine komplette Tabelle}
|
\Example{lst:sample-table}{tables/table-example}{tables/table-example-renderable}{A complete table}
|
||||||
|
|
||||||
\paragraph{Überlänge}
|
\paragraph{Excess length}
|
||||||
Für Tabellen, die über eine Seite hinausgehen, oder die Zeilenumbrüche innerhalb einzelner Tabellenzellen erfordern, kann zusätzlich das Paket \texttt{longtable} eingebunden werden, mit dem \texttt{booktabs} ebenfalls kompatibel ist.
|
For tables exceeding one page or requiring line breaks within individual cells,
|
||||||
Die \texttt{longtable}-Umgebung vereint die \texttt{table}- und die \texttt{tabular}-Umgebung.
|
the \texttt{longtable} package can be used additionally (also supported by \texttt{booktabs}).
|
||||||
Damit ergibt sich folgende Grundstruktur:
|
The \texttt{longtable} environment combines the \texttt{table} and \texttt{tabular} environments.
|
||||||
|
With it, you get the following basic structure:
|
||||||
|
|
||||||
\begin{minted}{latex}
|
\begin{minted}{latex}
|
||||||
\begin{longtable}
|
\begin{longtable}
|
||||||
% Inhalte
|
% content
|
||||||
\caption{<Beschriftung>}
|
\caption{<caption>}
|
||||||
\end{longtable}
|
\end{longtable}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
\paragraph{Überbreite}
|
\paragraph{Excess width}
|
||||||
Soll stattdessen eine sehr breite Tabelle dargestellt werden, empfiehlt es sich auf hochkant ausgerichteten Seiten, die Tabelle um 90\textdegree{} zu drehen.
|
If you want to present a very wide table instead, it is preferable on pages in portrait orientation to turn the table by 90\textdegree{}.
|
||||||
Das geht mithilfe des Pakets \texttt{rotating}.
|
This can be done with the help of the \texttt{rotating} package.
|
||||||
Der einzige Unterschied zu einer normalen Tabelle ist, dass die \texttt{table}- Umgebung durch eine \texttt{sidewaystable}-Umgebung ersetzt wird.
|
The only difference between this and a normal table is that the \texttt{table} environment gets replaced by a \texttt{sidewaystable} environment.
|
||||||
Die Positionierung und die enthaltene \texttt{tabular}"=Umgebung funktionieren unverändert.
|
Positioning and the \texttt{tabular} stay unaffected.
|
||||||
|
|
||||||
\paragraph{Weitere Möglichkeiten}
|
\paragraph{More possibilities}
|
||||||
Natürlich bietet \LaTeX{} noch viele weitere Features für ausgefeiltere Tabellen, beispielsweise zeilen- oder spaltenübergreifende Zellen.
|
Of course, \LaTeX{} offers lots of additional features for sophisticated tables, e.\,g., row- or column-spanning cells.
|
||||||
Dafür, oder wenn ihr euch einfach Tipparbeit sparen wollt, empfehlen wir euch den \emph{Tables Generator,}\footnote{\url{https://tablesgenerator.com/}} in dem ihr Tabellen in \textsc{wysiwyg}-Manier zusammenklicken könnt und kopierfertigen \LaTeX-Code erhaltet.
|
For something like this\,---\,or just to save some typing\,---\,we recommend the \emph{Tables Generator}\textit{,}\footnote{\url{https://tablesgenerator.com/}} that allows you to click your tables together in \textsc{wysiwyg} style and provides you with \LaTeX{} code ready for copying into your document.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,67 +1,70 @@
|
|||||||
\chapter{Textauszeichnung}
|
\chapter{Text markup}
|
||||||
|
|
||||||
Bei der Textauszeichnung wird zwischen semantischer und optischer Hervorhebung unterschieden.
|
Text markup can be done in two ways: semantically or visually.
|
||||||
Wir empfehlen, so oft wie möglich semantische Auszeichnung zu verwenden, die nur angibt, \emph{warum} etwas ausgezeichnet wird, und \LaTeX{} überlässt, \emph{wie} es aussehen soll.
|
We recommend that you use semantic markup whenever possible.
|
||||||
Die einfachste semantische Auszeichnung, die auch im vorherigen Satz verwendet wurde, ist eine Betonung mit \mintinline{latex}{\emph{…}}.
|
In contrast to visual markup, it only states \emph{why} something is \todo{better word here}marked and entrusts to \LaTeX{} \emph{how} it is going to look.
|
||||||
Der Befehl lässt sich auch schachteln und setzt Text normalerweise kursiv bzw. in zweiter Ebene wieder gerade.
|
The simplest semantic markup, that was also used in the previous sentence, is an emphasis: \mintinline{latex}{\emph{…}}.
|
||||||
Diese Art der Hervorhebung wird erst beim Lesen wahrgenommen und zieht nicht schon vorher Aufmerksamkeit an, wie es der farbige Befehl in diesem Absatz tut, oder Fettsatz, der eher zur Gliederung geeignet ist.
|
By default, this command sets text in italics.
|
||||||
|
When it is nested, the second level of emphasis is set straight again.
|
||||||
|
This kind of formatting is only perceived when reading the text and does not attract attention beforehand, as colored or bold text does (which is more appropriate for higher-level structuring purposes).
|
||||||
|
|
||||||
Einige optische Auszeichnungen werden in \cref{tbl:visual-markup} aufgelistet, sollten aber sehr vorsichtig verwendet werden.
|
Some types of visual markup are listed in \cref{tbl:visual-markup}, but you should use them very carefully.
|
||||||
Grundsätzlich lassen sie sich auch untereinander schachteln, bei einigen Kombinationen werden aber die passenden Schriftschnitte fehlen.
|
In principle, they can also be nested, however, for some combinations, the corresponding fonts will be missing.
|
||||||
Viele andere Programme fangen in solchen Fällen an, vorhandene Schnitte zu verzerren, um den fehlenden Schnitt zu imitieren.
|
Many other programs try to distort existing fonts to imitate the missing one.
|
||||||
Gut sieht so etwas aber nicht aus, deshalb verzichtet \LaTeX{} darauf.
|
As this \todo{Are we doing synaereses?}doesn’t look particularly good, \LaTeX{} will not do it.
|
||||||
|
So don’t be surprised when your carefully nested selection of four different markups is just ignored and doesn’t do anything at all.
|
||||||
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\center
|
\center
|
||||||
\begin{tabular}{lll}
|
\begin{tabular}{lll}
|
||||||
\toprule
|
\toprule
|
||||||
Auszeichnung & Befehl & Darstellung \\
|
Markup & Command & Rendering \\
|
||||||
\midrule
|
\midrule
|
||||||
fett & \mintinline{latex}{\textbf{bold face}} & \textbf{bold face} \\
|
bold & \mintinline{latex}{\textbf{bold face}} & \textbf{bold face} \\
|
||||||
kursiv & \mintinline{latex}{\textit{italics}} & \textit{italics} \\
|
italics & \mintinline{latex}{\textit{italics}} & \textit{italics} \\
|
||||||
Kapitälchen & \mintinline{latex}{\textsc{small caps}} & \textsc{small caps} \\
|
small caps & \mintinline{latex}{\textsc{small caps}} & \textsc{small caps} \\
|
||||||
dicktengleich & \mintinline{latex}{\texttt{typewriter text}} & \texttt{typewriter text} \\
|
monospaced & \mintinline{latex}{\texttt{typewriter text}} & \texttt{typewriter text} \\
|
||||||
schräg & \mintinline{latex}{\texttt{slanted}} & \textsl{slanted} (bitte nicht!) \\
|
slanted & \mintinline{latex}{\texttt{slanted}} & \textsl{slanted} (please, don’t!) \\
|
||||||
unterstrichen & \mintinline{latex}{\underline{underlined}} & \underline{underlined} \\
|
underlined & \mintinline{latex}{\underline{underlined}} & \underline{underlined} \\
|
||||||
tiefgestellt & \mintinline{latex}{\textsubscript{subscript}} & x\textsubscript{subscript} \\
|
subscript & \mintinline{latex}{\textsubscript{subscript}} & x\textsubscript{subscript} \\
|
||||||
hochgestellt & \mintinline{latex}{\textsubscript{superscript}} & x\textsuperscript{superscript} \\
|
superscript & \mintinline{latex}{\textsubscript{superscript}} & x\textsuperscript{superscript} \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Befehle zur optischen Textauszeichnung}
|
\caption{Visual markup commands}
|
||||||
\label{tbl:visual-markup}
|
\label{tbl:visual-markup}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
Normalerweise solltet ihr diese Befehle kaum brauchen, denn da, wo diese Auszeichnungen angebracht sind, tauchen sie meistens von selbst auf, wenn ihr semantische Befehle verwendet.
|
Usually, you should not need these commands too often, as they appear by themselves when you are using semantic markup.
|
||||||
Beispielsweise stellt das Paket \texttt{hyperref} den Befehl \mintinline{latex}{\url{…}} bereit.
|
For instance, the \texttt{hyperref} package provides the \mintinline{latex}{\url{…}} command.
|
||||||
Damit werden \textsc{url}s nicht nur mit einer dickten\-gleichen Schrift gesetzt, sondern sie sind auch anklickbar und werden bei Bedarf umgebrochen, ohne dass Bindestriche eingefügt werden.
|
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.
|
||||||
|
|
||||||
Das gleiche gilt für unterschiedliche Schriftgrößen:
|
The same applies for different font sizes.
|
||||||
Die Größe der Schrift im Fließtext könnt ihr mit einer Option der Dokumentenklasse festlegen:
|
You can specify the body text font size with an option at the document class:
|
||||||
\begin{minted}{latex}
|
\begin{minted}{latex}
|
||||||
\documentclass[9pt]{article}
|
\documentclass[9pt]{article}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
Darauf aufbauend erzeugt \LaTeX{} verschiedene Schriftgrade, die durch die Befehle in \cref{tbl:type-sizes} gesetzt werden können.
|
Building upon this, \LaTeX{} generates different font sizes that can be called via the commands in \cref{tbl:type-sizes}.
|
||||||
Beschränkt so etwas aber besser auf Titelseiten und ähnliches.
|
It is, however, best to restrict those to title pages and similar things.
|
||||||
Für den Rest könnt ihr auf die Standardeinstellungen vertrauen und euch das visuelle Durcheinander sparen.
|
For the rest, you can trust the default settings and avoid the visual clutter.
|
||||||
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\center
|
\center
|
||||||
\begin{tabular}{ll}
|
\begin{tabular}{ll}
|
||||||
\toprule
|
\toprule
|
||||||
Befehl & Darstellung \\
|
Command & Rendering \\
|
||||||
\midrule
|
\midrule
|
||||||
\mintinline{latex}{{\tiny winzig}} & {\tiny winzig} \\
|
\mintinline{latex}{{\tiny tiny}} & {\tiny tiny} \\
|
||||||
\mintinline{latex}{{\footnotesize Fußnotengröße}} & {\footnotesize Fußnotengröße} \\
|
\mintinline{latex}{{\footnotesize footnote size}} & {\footnotesize footnote size} \\
|
||||||
\mintinline{latex}{{\small klein}} & {\small klein} \\
|
\mintinline{latex}{{\small small}} & {\small small} \\
|
||||||
\mintinline{latex}{{\normalsize normal}} & {\normalsize normal} \\
|
\mintinline{latex}{{\normalsize normal}} & {\normalsize normal} \\
|
||||||
\mintinline{latex}{{\large groß}} & {\large groß} \\
|
\mintinline{latex}{{\large large}} & {\large large} \\
|
||||||
\mintinline{latex}{{\Large größer}} & {\Large größer} \\
|
\mintinline{latex}{{\Large larger}} & {\Large larger} \\
|
||||||
\mintinline{latex}{{\LARGE am größten}} & {\LARGE am größten} \\
|
\mintinline{latex}{{\LARGE largest}} & {\LARGE largest} \\
|
||||||
\mintinline{latex}{{\huge am allergrößten}} & {\huge am allergrößten} \\
|
\mintinline{latex}{{\huge largest of all}} & {\huge largest of all} \\
|
||||||
\mintinline{latex}{{\Huge Größenwahn}} & {\Huge Größenwahn} \\
|
\mintinline{latex}{{\Huge megalomania}} & {\Huge megalomania} \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Befehle zur optischen Textauszeichnung}
|
\caption{Font size commands}
|
||||||
\label{tbl:type-sizes}
|
\label{tbl:type-sizes}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item Im Ordner \mintinline{latex}{exercises/basic-document-structure} findet ihr eine Datei namens \mintinline{latex}{document-structure.tex}. Öffnet die Datei, kopiert den Text und fügt ihn in eine neue Datei ein, die ihr beispielsweise \mintinline[breaklines, breakbytokenanywhere]{latex}{document- structure-solution.tex} nennt. Packt den Text in der neuen Datei in eine \mintinline{latex}{document}-Umgebung und fügt eine Präambel ein, um euer erstes \LaTeX -Dokument anschließend kompilieren zu können. Kompiliert nun das neue Dokument.
|
\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 Herzlichen Glückwunsch, ihr habt euer erstes eigenes \LaTeX -Dokument erstellt und kompiliert. Wie euch vielleicht aufgefallen ist, sind die Absätze im Dokument mit \mintinline{latex}{\\} erstellt worden. Ersetzt diese durch richtige Absätze.
|
\item Congratulations! You have created and compiled your first \LaTeX{} document. Maybe you have noticed that pargraphs within the text were created by using \mintinline{latex}{\\}. Replace the two backslashes by real paragraphs.
|
||||||
\item Nun ist es an der Zeit, das Dokument etwas zu strukturieren. Verwendet für die Überschriften die passenden \LaTeX -Befehle (\mintinline{latex}{\section}, \mintinline{latex}{\subsection}, usw.) und fügt anschließend ein Inhaltsverzeichnis in euer Dokument ein.
|
\item It's time to structure your first document. Use the \LaTeX{} commmands \mintinline{latex}{\section}, \mintinline{latex}{\subsection}, etc. to structure the text. Also, include a table of contents for your document.
|
||||||
\item Kommentiert im Anschluss die Präambel, die Dokumentenumgebung und das Inhaltsverzeichnis wieder aus. Nur so kann eure Lösung auch ins Skript eingebunden werden.
|
\item Afterwards, comment out the preamble, the document environment and the table of contents.
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
\exercisematerial{exercises/basic-document-structure/document-structure}
|
\exercisematerial{exercises/basic-document-structure/document-structure}
|
||||||
|
|||||||
@ -2,6 +2,6 @@
|
|||||||
\begin{figure}[H]
|
\begin{figure}[H]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=\textwidth]{exercises/graphics/latex-logo.png}
|
\includegraphics[width=\textwidth]{exercises/graphics/latex-logo.png}
|
||||||
\caption{Das \LaTeX{}-Projekt-Logo}
|
\caption{The \LaTeX{} Project Logo}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Bitte hier das Bild einfügen.
|
Please insert the image here.
|
||||||
@ -1,3 +1,4 @@
|
|||||||
Bei den Übungsaufgaben findet ihr im Ordner \mintinline{latex}{graphics} eine Bilddatei namens \mintinline{latex}{latex-logo.png}. Fügt das Bild in die Datei \mintinline{bash}{exercises/graphics/graphics.tex} ein. Sorgt dafür, dass das Bild genau unter diesem Text erscheint. Das Bild soll außerdem zentriert eingebunden werden und über eine Bildunterschrift verfügen. Passt die Größe außerdem an die Breite der Seite (\mintinline{latex}{\textwidth}) an.
|
In the \texttt{exercises/graphics} directory you can find an image file named \texttt{latex-logo.png}. Insert the image into the \texttt{exercises/graphics/graphics.tex} file. Make sure that the image is placed exactly where you have specified it. On top of that, the picture shall be centered, and a caption shall be added. Adapt the image width to the text width (\mintinline{latex}{\textwidth}).
|
||||||
|
|
||||||
|
|
||||||
\exercisematerial{exercises/graphics/graphics}
|
\exercisematerial{exercises/graphics/graphics}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
\begin{minted}[breaklines]{latex}
|
\begin{minted}[breaklines]{latex}
|
||||||
Was ist eigentlich ein Semesterticket? Es ist auch als \enquote{Studi-Ticket} oder \enquote{Studi-Karte} bekannt und ermöglicht es euch, kostenlos die öffentlichen Verkehrsmittel in und um Bamberg zu nutzen. In Bamberg wird euer Studierenden\-ausweis u.\,a. als Semesterticket genutzt. Um es nutzen zu können, solltet ihr den Studierenden\-ausweis in einem der Universitätsgebäude validieren. Dies ist möglich, sobald ihr die Semestergebühr von 101,50\,\euro{} bezahlt habt. Ein Validierungsdrucker befindet sich z.\,B. im ERBA-Gebäude im Foyer vor der Bibliothek. Die Öffnungszeiten des Uni-Gebäudes an der Weberei sind Mo.\,--\,Fr., 7.00\,--\,22.00 Uhr.
|
What is a semester ticket?
|
||||||
|
It is also known as \enquote{Studi-Ticket} or \enquote{Studi-Karte} and allows you to use the local public transport around Bamberg for free.
|
||||||
|
In Bamberg, your student card (Studierenden\-ausweis) is used, i.\,a., as a semester ticket.
|
||||||
|
To be able to use it, you should validate the student card in one of the university buildings.
|
||||||
|
This is possible after you have paid the semester fees (101,50\,\euro).
|
||||||
|
A validation printers are located in multiple university buildings, e.\,g., in the foyer of the Erba building, in front of the library.
|
||||||
|
This building is opened Monday\,--\,Friday, 7am\,--\,10pm.
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,7 @@
|
|||||||
Was ist eigentlich ein Semesterticket? Es ist auch als Studi-Ticket oder Studi-Karte bekannt und ermöglicht es euch, kostenlos die öffentlichen Verkehrsmittel in und um Bamberg zu nutzen. In Bamberg wird euer Studierendenausweis u. a. als Semesterticket genutzt. Um es nutzen zu können, solltet ihr den Studierendenausweis in einem der Universitätsgebäude validieren. Dies ist möglich, sobald ihr die Semestergebühr von 101,50 Euro bezahlt habt. Ein Validierungsdrucker befindet sich z. B. im ERBA-Gebäude im Foyer vor der Bibliothek. Die Öffnungszeiten des Uni-Gebäudes an der Weberei sind Mo. - Fr., 7.00 - 22.00 Uhr.
|
What is a semester ticket?
|
||||||
|
It is also known as Studi-Ticket or Studi-Karte and allows you to use the local public transport around Bamberg for free.
|
||||||
|
In Bamberg, your student card (Studierendenausweis) is used, i. a., as a semester ticket.
|
||||||
|
To be able to use it, you should validate the student card in one of the university buildings.
|
||||||
|
This is possible after you have paid the semester fees (101,50 EUR).
|
||||||
|
A validation printers are located in multiple university buildings, e. g., in the foyer of the Erba building, in front of the library.
|
||||||
|
This building is opened Monday - Friday, 7am - 10pm.
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
% Don't copy this ugly texttt line break hack.
|
% breakanywhere doesn't seem to work.
|
||||||
Für diese Aufgabe arbeiten wir mit der Datei \texttt{exercises/}""\texttt{special-characters/}""\texttt{special-characters.tex}.
|
For this task, we are using the file \mintinline[breakanywhere]{bash}{exercises/special-characters/special-}\newline\mintinline[breakanywhere]{bash}{characters.tex}.
|
||||||
Die Ergebnisse seht ihr im Skript bei Übung 5.
|
To be able to see your results here within the script,
|
||||||
Kompiliert deshalb zur Prüfung eurer Lösung die Datei \mintinline{bash}{main.tex}.
|
compile the \mintinline{bash}{main.tex} file.
|
||||||
Dies gilt auch für die folgenden Aufgaben.
|
This applies for the subsequent tasks, as well.
|
||||||
|
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item Im Text findet ihr eine Reihe an Abkürzungen. Ersetzt die Leerzeichen innerhalb der Abkürzungen durch schmale Leerzeichen. Setzt außerdem ein schmales Leerzeichen vor das Wort \emph{Euro}.
|
\item In the text, you find a bunch of abbreviations. Replace the spaces within the abbreviations by thin spaces. Put a thin space in front of the word \emph{EUR}.
|
||||||
\item Ersetzt die Bindestriche bei den Öffnungszeiten der ERBA durch Halbgeviertstriche.
|
\item Replace the hyphens within the Erba opening hours by en dashes.
|
||||||
\item Setzt beim Wort \emph{Studierendenausweis} eine ausschließliche Trennstelle nach \enquote{Studierenden-}.
|
\item Restrict the hyphenation of word \emph{Studierendenausweis} to one position: \\\emph{Studierenden-ausweis}.
|
||||||
\item Setzt die Wörter \emph{Studi-Ticket} und \emph{Studi-Karte} in Anführungszeichen. Nutzt dafür den Befehl \mintinline{latex}{\enquote}.
|
\item Add quotation marks around the words \emph{Studi-Ticket} and \emph{Studi-Karte} using the \mintinline{latex}{\enquote} command.
|
||||||
\item Ersetzt das Wort \emph{Euro} durch ein Euro-Zeichen.
|
\item Replace the word \emph{EUR} by a Euro symbol (hence the thin space).
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
\exercisematerial{exercises/special-characters/special-characters}
|
\exercisematerial{exercises/special-characters/special-characters}
|
||||||
|
|||||||
@ -3,27 +3,27 @@
|
|||||||
\centering
|
\centering
|
||||||
\begin{tabular}{clll}
|
\begin{tabular}{clll}
|
||||||
\toprule
|
\toprule
|
||||||
Nr. & Name & Kürzel & Semester \\
|
No. & Name & Abbreviation & Term \\
|
||||||
\midrule
|
\midrule
|
||||||
1 & Mathematik für Informatik 1 & GdI-MfI1-B & Winter \\
|
1 & Mathematik für Informatik 1 & GdI-MfI1-B & winter \\
|
||||||
2 & Datenbanksysteme & MOBI-DBS-B & Sommer \\
|
2 & Datenbanksysteme & MOBI-DBS-B & summer \\
|
||||||
3 & Einführung in die Medieninformatik & MI-EMI-B & Winter \\
|
3 & Einführung in die Medieninformatik & MI-EMI-B & winter \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Übersicht über einige Veranstaltungen}
|
\caption{Overview over some courses}
|
||||||
\end{table}
|
\end{table}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|
||||||
\begin{table}[h]
|
\begin{table}[h]
|
||||||
\centering
|
\centering
|
||||||
\begin{tabular}{clll}
|
\begin{tabular}{clll}
|
||||||
\toprule
|
\toprule
|
||||||
Nr. & Name & Kürzel & Semester \\
|
No. & Name & Abbreviation & Term \\
|
||||||
\midrule
|
\midrule
|
||||||
1 & Mathematik für Informatik 1 & GdI-MfI1-B & Winter \\
|
1 & Mathematik für Informatik 1 & GdI-MfI1-B & winter \\
|
||||||
2 & Datenbanksysteme & MOBI-DBS-B & Sommer \\
|
2 & Datenbanksysteme & MOBI-DBS-B & summer \\
|
||||||
3 & Einführung in die Medieninformatik & MI-EMI-B & Winter \\
|
3 & Einführung in die Medieninformatik & MI-EMI-B & winter \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Übersicht über einige Veranstaltungen}
|
\caption{Overview over some courses}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Mathematik für Informatik
|
\item Mathematik für Informatik
|
||||||
\subitem Kürzel: GdI-MfI1-B
|
\subitem abbreviation: GdI-MfI1-B
|
||||||
\subitem Semester: Winter
|
\subitem term: winter
|
||||||
\item Datenbanksysteme
|
\item Datenbanksysteme
|
||||||
\subitem Kürzel: MOBI-DBS-B
|
\subitem abbreviation: MOBI-DBS-B
|
||||||
\subitem Semester: Sommer
|
\subitem term: summer
|
||||||
\item Einführung in die Medieninformatik
|
\item Einführung in die Medieninformatik
|
||||||
\subitem Kürzel: MI-EMI-B
|
\subitem abbreviation: MI-EMI-B
|
||||||
\subitem Semester: Winter
|
\subitem term: winter
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
Die folgende Liste zeigt ein paar Eckdaten über einige Lehrveranstaltungen an der Fakultät WIAI. Die Übersicht ist allerdings etwas unschön geraten. Wandelt deshalb die Liste in eine Tabelle mit den Spalten \emph{Name}, \emph{Kürzel} und \emph{Semester} um. Fügt zusätzlich eine \emph{zentrierte Spalte} ein, in denen ihr die Veranstaltungen nummeriert. Fügt außerdem eine Tabellenunterschrift hinzu. Arbeitet hierfür bitte in der Datei \mintinline{bash}{exercises/tables/tables.tex}.
|
The following list shows some key data about a few courses of the \acro{WIAI} faculty.
|
||||||
|
However, the overview is not as clear as it could be.
|
||||||
|
To improve it, convert the list into a table with columns for \emph{name}, \emph{abbreviation} and \emph{term}.
|
||||||
|
Insert an additional \emph{centered column} that numbers the courses.
|
||||||
|
Add a caption to the table.
|
||||||
|
You find the table in \mintinline{bash}{exercises/tables/tables.tex}.
|
||||||
|
|
||||||
\exercisematerial{exercises/tables/tables}
|
\exercisematerial{exercises/tables/tables}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
\begin{minted}[breaklines]{latex}
|
\begin{minted}[breaklines]{latex}
|
||||||
Die \emph{Rekursion} ist eine bekannte Problemlösestrategie in der Informatik. Dabei wird ein großes Problem zerlegt und zunächst nur ein Teil der Aufgabe gelöst. Oft wird \emph{Rekursion} innerhalb von Programmcode umgesetzt, indem eine Methode sich immer wieder selbst aufruft, bis eine bestimmte Abbruchbedingung erfüllt ist. Das heißt, dass das Programm theoretisch bis ins Unendliche weiterlaufen kann, wenn es \emph{rekursiv} ist.
|
``\emph{Recursion} (adjective: \emph{recursive}) occurs when a thing is defined in terms of itself or of its type.
|
||||||
|
\emph{Recursion} is used in a variety of disciplines ranging from linguistics to logic.
|
||||||
Weitere Informationen findet ihr im Wikipedia-Artikel zur Rekursion unter \url{https://de.wikipedia.org/wiki/Rekursion}.
|
The most common application of \emph{recursion} is in mathematics and computer science,
|
||||||
|
where a function being defined is applied within its own definition.''
|
||||||
|
|
||||||
|
Source and more information: \url{https://en.wikipedia.org/wiki/Recursion}
|
||||||
\end{minted}
|
\end{minted}
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
Die Rekursion ist eine bekannte Problemlösestrategie in der Informatik. Dabei wird ein großes Problem zerlegt und zunächst nur ein Teil der Aufgabe gelöst. Oft wird Rekursion innerhalb von Programmcode umgesetzt, indem eine Methode sich immer wieder selbst aufruft, bis eine bestimmte Abbruchbedingung erfüllt ist. Das heißt, dass das Programm theoretisch bis ins Unendliche weiterlaufen kann, wenn es rekursiv ist.
|
``Recursion (adjective: recursive) occurs when a thing is defined in terms of itself or of its type.
|
||||||
|
Recursion is used in a variety of disciplines ranging from linguistics to logic.
|
||||||
|
The most common application of recursion is in mathematics and computer science,
|
||||||
|
where a function being defined is applied within its own definition.''
|
||||||
|
|
||||||
|
Source and more information: https://en.wikipedia.org/wiki/Recursion
|
||||||
|
|
||||||
Weitere Informationen findet ihr im Wikipedia-Artikel zur Rekursion unter https://de.wikipedia.org/wiki/Rekursion.
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item Hebt im Text in der Datei \mintinline{bash}{exercies/text-markup/markup.tex} die Wörter \glqq{}Rekursion\grqq{} und \glqq{}rekursiv\grqq{} hervor.
|
\item In \mintinline{bash}{exercies/text-markup/markup.tex}, emphasize the words ``recursion'' and ``recursive.''
|
||||||
\item Macht die URL im Text anklickbar.
|
\item Make the \textsc{url} clickable.
|
||||||
\item Natürlich könnt ihr auch die anderen Befehle, die ihr zur Textauszeichnung gelernt habt, ausprobieren. Entfernt sie allerdings im Anschluss wieder, um das Dokument sauber zu halten.
|
\item Of course, you can also experiment with the other commands that you learned for text markup. However, you might want to remove them afterwards to keep your document nice and tidy.
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
\exercisematerial{exercises/text-markup/markup}
|
\exercisematerial{exercises/text-markup/markup}
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
\section{Ebene 1}
|
\section{Level 1}
|
||||||
Lorem ipsum % …
|
Lorem ipsum % …
|
||||||
\subsection{Ebene 2}
|
\subsection{Level 2}
|
||||||
Lorem ipsum % …
|
Lorem ipsum % …
|
||||||
\subsubsection{Ebene 3}
|
\subsubsection{Level 3}
|
||||||
Lorem ipsum % …
|
Lorem ipsum % …
|
||||||
\paragraph{Ebene 4}
|
\paragraph{Level 4}
|
||||||
Lorem ipsum % …
|
Lorem ipsum % …
|
||||||
\subparagraph{Ebene 5}
|
\subparagraph{Level 5}
|
||||||
Lorem ipsum % …
|
Lorem ipsum % …
|
||||||
|
|||||||
@ -5,5 +5,5 @@
|
|||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\thispagestyle{empty}
|
\thispagestyle{empty}
|
||||||
Hallo, Welt!
|
Hello World!
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage[ngerman]{babel}
|
\usepackage[ngerman]{babel}
|
||||||
|
|
||||||
\title{Die Welt der Trüffel}
|
\title{Die World of Truffles}
|
||||||
\author{Fooboar Rüssel \and Fachschaft WIAI}
|
\author{Fooboar Rüssel \and Fachschaft WIAI}
|
||||||
\date{\today}
|
\date{\today}
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
Schmale Leerzeichen werden z.\,B. in
|
Thin spaces are used quite often, e.\,g.,
|
||||||
Abkürzungen und zwischen Zahlen und
|
in abbreviations and between numbers and
|
||||||
Einheiten verwendet: 10\,s.
|
units: 10\,s. Normal-width non-breaking
|
||||||
Normalbreite, aber geschützte
|
spaces can, i.\,a., help to keep a title
|
||||||
Leerzeichen können u.\,a.
|
and name in one line around a potential
|
||||||
dabei helfen, Titel und Namen in
|
line break: Dr.~Fooboar.
|
||||||
einer Zeile zu halten: Dr.~Fooboar.
|
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
\centering
|
\centering
|
||||||
\begin{tabular}{llr}
|
\begin{tabular}{llr}
|
||||||
\toprule
|
\toprule
|
||||||
Sprache & Autor & Jahr \\
|
Language & Author & Year \\
|
||||||
\midrule
|
\midrule
|
||||||
C++ & Bjarne Stroustrup & 1985 \\
|
C++ & Bjarne Stroustrup & 1985 \\
|
||||||
Java & James Gosling & 1998 \\
|
Java & James Gosling & 1998 \\
|
||||||
Python & Guido van Rossum & 1991 \\
|
Python & Guido van Rossum & 1991 \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption*{Bekannte Programmiersprachen}
|
\caption*{Well-known programming languages}
|
||||||
|
|||||||
@ -2,13 +2,13 @@
|
|||||||
\centering
|
\centering
|
||||||
\begin{tabular}{llr}
|
\begin{tabular}{llr}
|
||||||
\toprule
|
\toprule
|
||||||
Sprache & Autor & Jahr \\
|
Language & Author & Year \\
|
||||||
\midrule
|
\midrule
|
||||||
C++ & Bjarne Stroustrup & 1985 \\
|
C++ & Bjarne Stroustrup& 1985 \\
|
||||||
Java & James Gosling & 1998 \\
|
Java & James Gosling & 1998 \\
|
||||||
Python & Guido van Rossum & 1991 \\
|
Python & Guido van Rossum & 1991 \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Bekannte Programmiersprachen}
|
\caption{Well-known programming languages}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user