Integrated corrections as discussed, chapters 5–16.

This commit is contained in:
Kremitzl 2021-09-30 20:01:19 +02:00
parent bfb3fee06c
commit fc15b0a296
14 changed files with 52 additions and 54 deletions

View File

@ -2,7 +2,7 @@
\label{sec:footnotes}
Whenever we want to include footnotes into our \LaTeX{} document, we can use
the command \replaced[id=F]{\mintinline{latex}{\footnote{<text>}}}{\mintinline{latex}{\footnote{text}}}. At the position where we use
the command \mintinline{latex}{\footnote{<text>}}. At the position where we use
the command, the correct number will be inserted automatically, and the text
within the curly braces will appear in the footer. In combination with the
package \mintinline{latex}{hyperref}, \acro{URL}s within footnotes become

View File

@ -11,8 +11,8 @@ These commands influence the environment that they are used in, e.\,g., the
\texttt{document} environment. Correspondingly, the text within the whole
document is affected.
Alternatively, we can use dedicated environments in order to influence the
format\added[id=C]{ting}
of \replaced[id=C]{certain}{our} paragraph\added[id=C]{s} (\cref{lst:ragged-alignment}).
formatting
of certain paragraphs (\cref{lst:ragged-alignment}).
\example{lst:ragged-alignment}{formatting-paragraphs/ragged-alignment}{Ragged
alignment}

View File

@ -1,7 +1,7 @@
\chapter{Graphics}
\label{sec:graphics}
Since in \LaTeX{} we work with plain text, we cannot simply embed graphics into our text as we may be used to from other \deleted[id=F]{text} word processing programs.
Since in \LaTeX{} we work with plain text, we cannot simply embed graphics into our text as we may be used to from other word processing programs.
Instead, we reference external image files by a command. The figure is then embedded and positioned at compile time.
\section{Inserting graphics}
@ -15,7 +15,7 @@ In order to be able to reference graphics, the package \texttt{graphicx} has to
\end{figure}
\end{minted}
\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, \replaced[id=F]{as}{like} illustrated by the following example:
\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, as illustrated by the following example:
\begin{minted}{latex}
\includegraphics[width=0.5\textwidth,height=5cm]{<file path>}
@ -24,7 +24,9 @@ In order to be able to reference graphics, the package \texttt{graphicx} has to
\section{Positioning}
\label{sec:graphics-placement}
One interesting aspect of the what-you-get-is-what-you-mean paradigm is the way how graphics can be positioned.
By default, the graphic is placed at the potentially optimal position that is calculated by the compiler. \todo{Bezüge etwas unklar. Evtl. Reihenfolge der Sätze überdenken?}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.
The compiler creates multiple layouts and evaluates them.
By default, graphics are placed at the potentially optimal position that is calculated by the compiler.
By moving them around, 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.
As a consequence, graphics are not necessarily placed between the two text blocks that we specify, but at another position.
In order to reference a picture, that possibly is placed on another page, we can use labels, which are covered in \cref{sec:references}.
@ -40,13 +42,12 @@ On top of that, we can limit the positioning of our image more or less rigorousl
t & on top of the page \emph{(top)} \\
b & at the bottom of the page \emph{(bottom)} \\
p & on its own page \emph{(page)} \\
H & Definitely here! (requires package \texttt{float}) \\
H & definitely here (requires package \texttt{float}) \\
\bottomrule
\end{tabular}
\caption{Shortcuts for positioning graphics}
\label{tbl:placement-abbreviations}
\end{table}
\todo{Entweder alles als Satz oder nichts}
\begin{minted}[tabsize=4]{latex}
\begin{figure}[<position shortcut>]
@ -58,5 +59,4 @@ On top of that, we can limit the positioning of our image more or less rigorousl
Besides the vertical positioning, also the horizontal orientation may be of importance.
By default, graphics are left-justified.
The command \mintinline{latex}{\centering} centers all following objects in the current environment.
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}}.
\todo{In Figures ist das ja eigentlich nicht notwendig, oder?}
If we want the centering to affect only one object, we can alternatively wrap it with \mintinline{latex}{\begin{center}} and \mintinline{latex}{\end{center}}.

View File

@ -1,12 +1,11 @@
\chapter{Reference management}
\label{sec:literature}
For typesetting our first thes\replaced[id=C]{i}{e}s in \LaTeX{}, the last core functionality to learn is citing literature.
For typesetting our first thesis in \LaTeX{}, the last core functionality to learn is citing literature.
Our references are gathered in a bibliography file.
Once we reference one of its entries from our \LaTeX{} document, Bib\TeX{} (a
program similar to the standard \acro{PDF}\LaTeX{} compiler)\todo{either adjust
PdfLaTeX here or in the other locations where it is used, so that it is
consistent } can insert automatically generated citations.
program similar to the standard \texttt{pdflatex} compiler)
can insert automatically generated citations.
It will format them in a bibliography style of our choice.
\section{The bibliography file}
@ -31,7 +30,7 @@ An exemplary item can be seen in \cref{lst:bibfile-sample-entry}.
The type of the bibliography entry is specified after the opening \texttt{@} sign (e.\,g., article, book, proceedings, …).
What follows is a list of important attributes like title and author.
Whether they are required or not depends on the \added[id=C]{type of the }entry\deleted[id=C]{ type}.
Whether they are required or not depends on the type of the entry.
In any case, we will need the first entry after the opening braces: the Bib\TeX{} key.
This is the identifier that we will use to reference the entry in our \LaTeX{} document.
Bib\TeX{} keys can be chosen freely, but have to be unique.
@ -42,7 +41,7 @@ While JabRef operates directly on your bibliography file, Zotero and Citavi proj
\textbf{Bibliography entries} are provided by many academic search engines, including Google Scholar (cf. \cref{fig:google-scholar-bibtex}).
When using them, make sure that the entries are cohesive across your reference collection and complete with regard to their attributes.
A high-quality (although, unfortunately, incomplete) source for Bib\TeX{} entries is the \replaced[id=C]{\acro{DBLP}}{dblp} Computer Science Library.\footnote{Available at \url{https://dblp.org/search}.}
A high-quality (although, unfortunately, incomplete) source for Bib\TeX{} entries is the dblp computer science bibliography.\footnote{Available at \url{https://dblp.org/search}.}
\begin{figure}[H]
\includegraphics[width=\textwidth]{graphics/google_bibtex1.jpg}
@ -71,7 +70,7 @@ Make sure to include the \mintinline{sh}{natbib} package for this purpose.
\end{table}
The \mintinline{latex}{<source>} of a citation is always a Bib\TeX key.
The list of available citation styles\footnote{Head to Overleaf for a rather complete list: \url{https://www.overleaf.com/learn/latex/Biblatex_citation_styles}} includes alpha, natdin, and apa\todo{Großschreiben oder dicktengleich?}.
The list of available citation styles\footnote{Head to Overleaf for a rather complete list: \url{https://www.overleaf.com/learn/latex/Biblatex_citation_styles}} includes \texttt{alpha}, \texttt{natdin}, and \texttt{apa}.
The table of references will always appear where the \mintinline{latex}{\bibliography{}} command was put.
The \mintinline{latex}{\cite} command comes with many variants.\footnote{cf. \url{https://www.economics.utoronto.ca/osborne/latex/BIBTEX.HTM}}

View File

@ -12,7 +12,6 @@ As with many other environments, adding an asterisk turns off the numbering.
\section{A few examples}
%Die \cref{tbl:maths-common-commands,tbl:maths-logic-sets-braces} listen einige häufig in Formeln verwendeten Befehle auf.
\todo{In diesem und dem nächsten Abschnitt fehlt mir ein bisschen die Orientierung durch Fließtext. Könnten wir nicht den Text der Tabellenunterschrift in einen Absatz vor der Tabelle umwandeln und die Tabellenunterschrift entsprechend kürzer halten?}
\begin{table}[H]
\centering
@ -54,28 +53,28 @@ As with many other environments, adding an asterisk turns off the numbering.
\section{Growing brackets}
Especially in combination with fractions, brackets should grow according to their content.
This can be achieved by pre-pendingnot each bracket (\mintinline{latex}{(}, \mintinline{latex}{)}, \mintinline{latex}{[}, \mintinline{latex}{]}, \mintinline{latex}{\lbrace} and \mintinline{latex}{\rbrace}) with a position marker (\mintinline{latex}{\left} oder \mintinline{latex}{\right}).
This can be achieved by pre-pending each bracket (\mintinline{latex}{(}, \mintinline{latex}{)}, \mintinline{latex}{[}, \mintinline{latex}{]}, \mintinline{latex}{\lbrace} and \mintinline{latex}{\rbrace}) with a position marker (\mintinline{latex}{\left} or \mintinline{latex}{\right}).
\example{lst:growing-brackets}{maths/growing-brackets}{Example for growing brackets}
\section{Lower and upper bounds}
The \mintinline{latex}{\limits} command renders lower and upper bounds of integrals above and below the integral sign.
Sums, products, and \todo{quite confusing in English}limits do this
automatically (c.\,f. \cref{lst:limits}).
For inline formulas, \mintinline{latex}{\limits} are of limited suitability.
Sums, products, and limits do this
automatically (cf. \cref{lst:limits}).
For inline formulas, \mintinline{latex}{\limits} are of bounded suitability.
\example{lst:limits}{maths/limits}{Lower and upper bounds of sums, products, limits and integrals}
\section{Aligning equations}
The \texttt{align} environment allows to align multiple equations horizontally, e.\,g. at the \texttt{=} sign (\cref{lst:math-alignment-example}).
The \texttt{align} environment allows to align multiple equations horizontally, e.\,g., at the \texttt{=} sign (\cref{lst:math-alignment-example}).
As in tables, the \texttt{\&} sign is used to specify anchorage points.
Line breaks are denoted by two backslashes.
\Example{lst:math-alignment-example}{maths/align-example}{maths/align-example_crop}{Equations aligned at equals signs}
\section{Intensional set notation}\todo{Is that really what this section is about? Looks rather like a “text within maths” section to me.}\todo{Ich kenne es nur als »Set-builder notation«, »text within maths« ist natürlich auch nicht falsch.}\todo{Diese Syntax mit den geschweifen Klammern und dem Strich, ja. Aber hier geht es doch eher um das mathrm, oder? Und das braucht man ja zum Beispiel auch für so ne Formeldefintion mit Fallunterscheidung und verbaler Beschreibung.}
\section{Text in math mode}
Sometimes sets have to be defined in terms of textual descriptions or longer function names.
The \LaTeX{} math mode assumes that letters are variables rather than text, which creates problems when they are indeed supposed to be entire words.

View File

@ -75,13 +75,13 @@ We already have presented a selection of packages. However, there are thousands
\begin{description}
\item[Indices]
can be created automatically with \texttt{makeidx}.\footnote{\url{https://www.ctan.org/pkg/makeidx}}
By using \mintinline{tex}{\index{}}, one can mark entries for the index. With \mintinline{tex}{\printindex}, \replaced[id=C]{an index with references is compiled out of them}{they are assembled within index with references}.
By using \mintinline{tex}{\index{}}, one can mark entries for the index. With \mintinline{tex}{\printindex}, an index with references is compiled out of them.
\item[Vector graphics]
(\cref{fig:tikz-example})
can be \enquote{drawn} directly in the \LaTeX{} source code with \texttt{TikZ} (recursive acronym for \emph{TikZ ist kein Zeichenprogramm}, in English: \emph{TikZ is not a drawing program}).\footnote{\url{https://www.ctan.org/pkg/pgf}}
Caution: This package is very powerful, but not necessarily beginner-friendly.
Before creating vector graphics from sratch, we recommend you to experiment with some of the examples at \TeX{}ample\footnote{\url{https://texample.net/tikz/examples/}}.
\replaced[id=C]{Also, f}{F}or certain use cases, there are special packages that are easier to handle than \enquote{raw} TikZ:
Before creating vector graphics from scratch, we recommend you to experiment with some of the examples at \TeX{}ample\footnote{\url{https://texample.net/tikz/examples/}}.
Also, for certain use cases, there are special packages that are easier to handle than \enquote{raw} TikZ:
\item[Parse trees]
that divide sentences into their grammatical components (\cref{fig:qtree-example}) can be created with \texttt{qtree}.\footnote{\url{https://ctan.org/pkg/qtree}}
\item[Proof trees,]
@ -91,19 +91,19 @@ We already have presented a selection of packages. However, there are thousands
can, amongst others, be created with \texttt{chemfig}.\footnote{\url{https://www.ctan.org/pkg/chemfig}}
\item[Colors]
for your documents are provided by \texttt{xcolor}.\footnote{\url{https://www.ctan.org/pkg/xcolor}}
\item[Note]
\deleted[id=C]{that you have made in your source code and} that you cannot overlook can be created with \texttt{todonotes}.\footnote{\url{https://www.ctan.org/pkg/todonotes}}
With the package, \replaced[id=C]{you}{one} can mark what \replaced[id=C]{you}{they} still \todo{Please do not change. This is an example.} have to change within \replaced[id=C]{your}{their} document.
\item[Notes]
that you cannot overlook can be created with \texttt{todonotes}.\footnote{\url{https://www.ctan.org/pkg/todonotes}}
With this package, you can mark what you still \todo{Please do not change. This is an example.} have to change within your document.
\item[Pages of other \acro{PDF} files]
can be integrated into the source code with \texttt{pdfpages}.\footnote{\url{https://www.ctan.org/pkg/pdfpages}}
It comes in very handy whenever one needs the output of external programs in the document, for example, in\deleted[id=C]{ within} within the appendix.
Just compile the document one more time and the appendix is up-to-date again, if the external program has changed something.
It comes in very handy whenever one needs the output of external programs in the document, for example, in the appendix.
Just compile the document one more time and the appendix is up to date again, if the external program has changed something.
\item[Nested graphics]
and the positioning of captions at almost any place are provided by
\texttt{subcaption}.\footnote{\url{https://www.ctan.org/pkg/subcaption}}
We also made extensive use of this package.
\item[Tables]
can be designed much more flexibl\replaced[id=C]{y}{e} than what we have shown here.
can be designed much more flexibly than what we have shown here.
The following packages can help you with that:
\texttt{colortbl},\footnote{\url{https://www.ctan.org/pkg/colortbl}}
\texttt{tabularx},\footnote{\url{https://www.ctan.org/pkg/tabularx}}
@ -120,8 +120,8 @@ with \LaTeX{}. Information on the document class and examples are available at O
If required, both refer to additional packages.
Whenever you need information on certain packages, \acro{\textbf{CTAN}}\footnote{\url{https://ctan.org/}} is your place to go.
\replaced[id=C]{For each package, you can find the official documentation as a \acro{PDF} file there.}{The official documentation as \acro{PDF} for each package can be found there.}
Within this file, the first paragraphs are \added[id=C]{usually }the most interesting. They are
For each package, you can find the official documentation as a \acro{PDF} file there.
Within this file, the first paragraphs are usually the most interesting. They are
followed by implementation details, that you normally do not need.
If the official documentation is too theoretical, and you prefer a more hands-on approach, \textbf{Overleaf}\footnote{\url{https://www.overleaf.com/}} can help you out.
@ -131,7 +131,7 @@ If you are looking for examples dedicated to TikZ, \textbf{\TeX{}ample}\footnote
For concrete questions, the question-answering platform \textbf{Stackexchange} is a good place to go: There even is a \TeX{} community there.\footnote{\url{https://tex.stackexchange.com/}}
\replaced[id=C]{Of course}{Needless to say}, you can always contact us with your questions:
Of course, you can always contact us with your questions:
\begin{compactitem}
\item via mail to \href{mailto:fachschaft-wiai.stuve@uni-bamberg.de}{fachschaft-wiai.stuve@uni-bamberg.de},
\item via phone at +49951\,863\,1219,

View File

@ -1,7 +1,7 @@
\chapter{References}
\label{sec:references}
If we want to make references, like \enquote{\textellipsis , which you can see in figure 21, \textellipsis}, \LaTeX{} by default provides us with the command \replaced[id=F]{\mintinline{latex}{\ref{<label>}}}{\mintinline{latex}{\ref{label}}}. No more adapting of the numbering for graphics, tables, etc. needed!
If we want to make references, like \enquote{\textellipsis , which you can see in figure 21, \textellipsis}, \LaTeX{} by default provides us with the command \mintinline{latex}{\ref{<label>}}. No more adapting of the numbering for graphics, tables, etc. needed!
The command expects a unique label as argument, that needs to be assigned to
the referenced element. After that, wherever we call the command, the number of
our referenced object appears in the text.
@ -9,9 +9,9 @@ our referenced object appears in the text.
A smarter package for references is \texttt{cleverref}.\footnote{with only one \enquote{r}!}
It provides us with the command \mintinline{latex}{\cref{label}}, which can also handle multiple labels separated by commas.
This automatically generates \replaced[id=C]{elegant references}{text} like \enquote{sections 1 to 3, and 5.}\footnote{for the source code \mintinline{latex}{\cref{sec:section1,sec:section2,
This automatically generates elegant references like \enquote{sections 1 to 3, and 5.}\footnote{for the source code \mintinline{latex}{\cref{sec:section1,sec:section2,
sec:section3,sec:section5}}}
Furthermore, \replaced[id=F]{\mintinline{latex}{\ref{<label>}}}{\mintinline{latex}{\ref{label}}} automatically inserts a suited abbreviation, e.\,g., \enquote{fig.} for figures.
Furthermore, \mintinline{latex}{\ref{<label>}} automatically inserts a suited abbreviation, e.\,g., \enquote{fig.} for figures.
We can reference graphics, tables, sections, chapters, source code listings, and equations.
Many packages use the label in order to find out the object type of the referenced element.
@ -31,7 +31,7 @@ For this reason, it is common to insert a prefix before each label (\cref{lst:re
\label{lst:reference-prefixes}
\end{table}
Note that, if we use \mintinline{latex}{\cref{label}}, for some document classes, the generated passages only appear in the desired language (e.\,g., German) when the language is specified already within the document class command:\todo{Stimmen in dem Absatz die Kommas? Das ist zu komplex für mich.}
Note that if we use \mintinline{latex}{\cref{label}}\,---\,for some document classes\,---\,the generated passages only appear in the desired language (e.\,g., German) when the language is specified already within the document class command:
\begin{minted}{latex}
\documentclass[ngerman]{article}

View File

@ -75,12 +75,9 @@ To accomplish this, we only have to pass the programming language and the file p
\example{lst:minted-external}{source-code-listings/minted-import}{Including from a separate file}
\todo{Fix overflow issue in the listing}
\section{Configuring minted}
Optional parameters allow us to add line numbers, line breaks, and colors.
Moreover, there are numerous themes available (\todo{Anscheinend sind crefs nicht wirklich mit english spacing kompatibel. Können wir das abschalten? Gibt eigentlich eh keinen guten Grund dafür.)}\cref{lst:minted-external-styled}).
Moreover, there are numerous themes available (\cref{lst:minted-external-styled}).
The introduction on Overleaf and the package documentation\footnote{Available at \url{https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted} and \url{https://ctan.kako-dev.de/macros/latex/contrib/minted/minted.pdf}, respectively.} give an extensive overview.
\example{lst:minted-external-styled}{source-code-listings/minted-import-styled}{Themes and further options}

View File

@ -39,7 +39,7 @@ as shown in \cref{tbl:bars}.
\end{longtable}
The hyphen is obviously also used for hyphenation, but for this purpose, we should not insert it explicitly in our source code.
In most places, \LaTeX{} does the hyphenation automatically if we are using the correct \texttt{babel} \replaced[id=F]{configuration}{package}.\footnote{c.\,f. \cref{sec:language}.}
In most places, \LaTeX{} does the hyphenation automatically if we are using the correct \texttt{babel} configuration.\footnote{c.\,f. \cref{sec:language}.}
In case something goes wrong, we can intervene using the codes from \cref{tbl:separators}:\footnote{Those also require the \texttt{babel} package.}
\begin{longtable}{@{}lp{11cm}@{}}
@ -81,12 +81,12 @@ The decisive factor is the appearance, not the semantics, which is why the Frenc
\label{tbl:quotation-marks}
\end{table}
We can \deleted[id=C]{also }get more flexibility using the \mintinline{tex}{csquote} package, which provides the \mintinline{tex}|\enquote{<quote>}| command.
We can get more flexibility using the \mintinline{tex}{csquote} package, which provides the \mintinline{tex}|\enquote{<quote>}| command.
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.
When enabling the \mintinline{tex}|autostyle=true| option on package import, \mintinline{tex}|\foreignquote{<language>}{<quote>}| selects varying quotation marks for each quotation.
\section{Diacritics}
If we are able to insert letters with diacritics via our keyboard\,---\,e.\,g., the German Umlauts or common accents\,---\,we can \deleted[id=C]{also }do this within our source code\added[id=C]{, as well}:
If we are able to insert letters with diacritics via our keyboard\,---\,e.\,g., the German Umlauts or common accents\,---\,we can do this within our source code, as well:
The characters will remain intact in the output.
If not, we can also create the diacritics via escape codes.
\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.

View File

@ -33,13 +33,14 @@ the \texttt{longtable} package can be used additionally (also supported by \text
The \texttt{longtable} environment combines the \texttt{table} and \texttt{tabular} environments.
With it, you get the following basic structure:
\begin{samepage}
\begin{minted}{latex}
\begin{longtable}
% content
\caption{<caption>}
\end{longtable}
\end{minted}
\todo{Sollte nicht durch das Bild getrennt werden.}
\end{samepage}
\paragraph{Excess width}
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{}.

View File

@ -2,7 +2,7 @@
Text markup can be done in two ways: semantically or visually.
We recommend that you use semantic markup whenever possible.
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.
In contrast to visual markup, it only states \emph{why} something is special and entrusts to \LaTeX{} \emph{how} it is going to look.
The simplest semantic markup, that was also used in the previous sentence, is an emphasis: \mintinline{latex}{\emph{}}.
By default, this command sets text in italics.
When it is nested, the second level of emphasis is set straight again.
@ -11,8 +11,8 @@ This kind of formatting is only perceived when reading the text and does not att
Some types of visual markup are listed in \cref{tbl:visual-markup}, but you should use them very carefully.
In principle, they can also be nested, however, for some combinations, the corresponding fonts will be missing.
Many other programs try to distort existing fonts to imitate the missing one.
As this \todo{Are we doing synaereses?}doesnt look particularly good, \LaTeX{} will not do it.
So dont be surprised when your carefully nested selection of four different markups is just ignored and doesnt do anything at all.
As this does not look particularly good, \LaTeX{} will not do it.
So do not be surprised when your carefully nested selection of four different markups is just ignored and does not do anything at all.
\begin{table}[H]
\center

View File

@ -5,7 +5,7 @@ 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}.
\todo{Beispieldaten übersetzen?}
\todo{Durch englisch\-sprachige Veranstaltungen ersetzen}
\exercisematerial{exercises/tables/tables}

View File

@ -1 +1,3 @@
\inputminted{java}{listings/source-code-listings/Test.java}
\inputminted{java}
{listings/source-code-listings/Test.java}

View File

@ -4,8 +4,8 @@
\author{Evelyn Fradtschuk \and Florian Knoch \and Christian Kremitzl \and Bernhard Luedtke}
\begin{document}
\frenchspacing
\selectlanguage{english}
\frenchspacing
% Title page
\input{content/titlepage.tex}