Reviewed sections 10–16.

This commit is contained in:
Kremitzl 2021-09-23 23:24:19 +02:00
parent 6f7554f748
commit d66cd35472
10 changed files with 32 additions and 30 deletions

View File

@ -6,7 +6,7 @@ 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
clickable\footnote{if we use the command \mintinline{latex}{\url{}}}.
clickable.\footnote{if we use the command \mintinline{latex}{\url{}}}
We can see examples for that in the whole document.
The package \mintinline{latex}{footmisc} provides us with additional options for how to display footnotes. They can be passed as optional parameters to the command \mintinline{latex}{\usepackage}:

View File

@ -1,7 +1,7 @@
\chapter{Reference management}
\label{sec:literature}
For typesetting our first theses in \LaTeX{}, the last core functionality to learn is citing literature.
For typesetting our first thes\replaced[id=C]{i}{e}s 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
@ -31,7 +31,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 entry type.
Whether they are required or not depends on the \added[id=C]{type of the }entry\deleted[id=C]{ type}.
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 +42,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 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 \replaced[id=C]{\acro{DBLP}}{dblp} Computer Science Library.\footnote{Available at \url{https://dblp.org/search}.}
\begin{figure}[H]
\includegraphics[width=\textwidth]{graphics/google_bibtex1.jpg}
@ -71,7 +71,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.
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 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

@ -1,7 +1,7 @@
\chapter{Prospects}
\label{sec:prospects}
Obviously, in this script we were not able to show you the least of what \LaTeX{} has to offer.
Obviously, in this script, we were not able to show you the least of what \LaTeX{} has to offer.
Therefore, in this last section, we gathered some information to help you to go further into depth by yourself.
\section{Packages}
@ -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 their index. With \mintinline{tex}{\printindex} they are assembled within index with references.
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}.
\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/}}.
For certain use cases, there are special packages that are easier to handle than \enquote{raw} TikZ:
\replaced[id=C]{Also, f}{F}or 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[Notes,]
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, one can mark what they still \todo{Please do not change. This is an example.} have to change within their document.
\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[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 within the appendix.
It comes in very handy whenever one needs the output of external programs in the document, for example, in\deleted[id=C]{ 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.
\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 flexible than what we have shown here.
can be designed much more flexibl\replaced[id=C]{y}{e} 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}}
@ -112,15 +112,16 @@ We already have presented a selection of packages. However, there are thousands
\end{description}
\noindent \texttt{beamer}, which is not a package, but another document class, can be used to create \textbf{slide shows}
with \LaTeX{}. Information on the document class and examples are available at Overleaf\footnote{\url{https://www.overleaf.com/learn/latex/Beamer}}, which brings us to the next section:
with \LaTeX{}. Information on the document class and examples are available at Overleaf,\footnote{\url{https://www.overleaf.com/learn/latex/Beamer}} which brings us to the next section:
\section{Help and information}
\textbf{Wikibooks} provides you with a much more detailed introduction into \LaTeX{}. Note that the German version\footnote{\url{https://de.wikibooks.org/wiki/LaTeX-Kompendium}} is less complete than the English one.\footnote{\url{https://en.wikibooks.org/wiki/LaTeX}}
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. The official documentation as \acro{PDF} for each package can be found there.
Within this file, the first paragraphs are the most interesting. They are
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
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.
@ -130,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/}}
Needless to say, you can always contact us with your questions:
\replaced[id=C]{Of course}{Needless to say}, 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,15 +1,15 @@
\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 as 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
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 its 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.
\Example{lst:fooboar-learning-latex}{references/ref}{references/ref_crop}{Example for a reference}
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 text like \enquote{sections 1 to 3, and 5}.\footnote{for the source code \mintinline{latex}{\cref{sec:section1,sec:section2,
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,
sec:section3,sec:section5}}}
Furthermore \mintinline{latex}{\cref{label}} automatically inserts a suited abbreviaton, e.\,g., \enquote{fig.} for figures.
@ -21,23 +21,23 @@ For this reason, it is common to insert a prefix before each label (\cref{lst:re
\centering
\begin{tabular}{@{}llll@{}}
\toprule
Prefix & Object Type & Prefix & Object Type \\ \midrule
Prefix & Object type & Prefix & Object type \\ \midrule
fig: & figures & tbl: & tables \\
sec: & sections & subsec: & subsections \\
ch: & chapters & itm: & items \\
eq: & equations & lst: & source Code Listings \\ \bottomrule
eq: & equations & lst: & source code listings \\ \bottomrule
\end{tabular}
\caption{Prefixes for labels}
\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:
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.}
\begin{minted}{latex}
\documentclass[ngerman]{article}
\end{minted}
\noindent Except for sections, captions\footnote{\mintinline{latex}{\caption{}}} \emph{always need to be specified and positioned before the label}. Otherwise, they cannot be referenced later on in the text.
\noindent Except for sections, captions\footnote{\mintinline{latex}{\caption{}}} \emph{always need to be specified and positioned before the label}\textit{.} Otherwise, they cannot be referenced later on in the text.
Labels for sections are inserted directly after the command:
\begin{minted}{latex}

View File

@ -2,7 +2,7 @@
\label{sec:tables}
There are two fundamental environments for tables.
The first one called \texttt{table} is responsible for integrating the table as a whole into the document.
The first one, called \texttt{table}, is responsible for integrating the table as a whole into the document.
Positioning is done the same way as it is with graphics.
The \mintinline{tex}{\caption} command is the same, as well.
@ -19,7 +19,7 @@ Table rows are separated by \mintinline{tex}{\\}, just like line breaks, and cel
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.}
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.
Vertical lines can be inserted as a vertical bar character (\texttt{|}) in the column definition, but this is not recommended.\footnote{The
Vertical lines can be inserted as a vertical bar character (\texttt{|}) in the column definition, but this is \emph{not} recommended.\footnote{The
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.

View File

@ -1,4 +1,4 @@
Make the text \enquote{(March 2021)} of the file \texttt{exercises/footnotes/footnotes.tex} appear as footnote. Additionally, insert a clickable URL to the Java Development Kit as footnote.
Make the text \enquote{March 2021} of the file \texttt{exercises/footnotes/footnotes.tex} appear as a footnote instead of in parentheses. Additionally, insert a clickable URL to the Java Development Kit as footnote.
\texttt{https://www.oracle.com/java/technologies/javase-downloads.html}

View File

@ -2,7 +2,7 @@
\begin{minted}[breaklines]{latex}
The first-mentioned book \citep{lamport1994} has been written by the creator of \LaTeX{}, Leslie Lamport himself.
A more recent publication is \glqq{}\LaTeX\ in 24 Hours\grqq{} \citep{datta2017}.
A more recent publication is \enquote{\LaTeX\ in 24 Hours} \citep{datta2017}.
There is a plethora of further handbooks \citep*[e.\,g.,][]{goossensmittelbach2002}.
\bibliographystyle{natdin}

View File

@ -1,5 +1,5 @@
The first-mentioned book (Lamport, 1994) has been written by the creator of \LaTeX{}, Leslie Lamport himself.
A more recent publication is \glqq{}\LaTeX\ in 24 Hours\grqq{} (Datta, 2017).
A more recent publication is \enquote{\LaTeX\ in 24 Hours} (Datta, 2017).
There is a plethora of further handbooks (e.\,g., Goossens, Mittelbach and Samarin, 2002).
~\\

View File

@ -1,4 +1,4 @@
In file \texttt{exercises/references/references.tex}, replace \enquote{in the figure}, and \enquote{the following source code listing} with suited references. Use the command \mintinline{latex}{\cref}. Do not forget to first introduce labels for the elements that you want to reference. To do so, first of all, wrap the source code listing in a \mintinline{latex}{listing} environment. Also insert a caption for the source code listing.
In file \texttt{exercises/references/references.tex}, replace \enquote{in the figure} and \enquote{the following source code listing} with suited references. Use the command \mintinline{latex}{\cref}. Do not forget to first introduce labels for the elements that you want to reference. To do so, first of all, wrap the source code listing in a \mintinline{latex}{listing} environment. Also insert a caption for the source code listing.
Make sure to use suitable prefixes before the labels.
\exercisematerial{exercises/references/references}

View File

@ -5,6 +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?}
\exercisematerial{exercises/tables/tables}