Merge branch '2021-translate-script' of git.stuve-bamberg.de:latex/latex-skript into 2021-translate-script
This commit is contained in:
commit
984b492dfb
@ -150,13 +150,13 @@
|
||||
\ifthenelse{\equal{\exercisemode}{any}}{
|
||||
\IfFileExists{#1.raw.tex}{
|
||||
\IfFileExists{#1.done.tex}{
|
||||
\subsubsection*{Vorschau des ungelösten Materials}
|
||||
\subsubsection*{Preview of the raw material}
|
||||
}{}
|
||||
\input{#1.raw.tex}
|
||||
}{}
|
||||
\IfFileExists{#1.done.tex}{
|
||||
\IfFileExists{#1.raw.tex}{
|
||||
\subsubsection*{Vorschau des gelösten Materials}
|
||||
\subsubsection*{Preview of the solution}
|
||||
}{}
|
||||
\input{#1.done.tex}
|
||||
}{}
|
||||
|
||||
@ -20,13 +20,13 @@ Furthermore, you can use \mintinline{latex}{book} for books, \mintinline{latex}{
|
||||
|
||||
In addition to the standard document classes, the \acro{KOMA} script classes have been developed.
|
||||
They provide alternatives to the document classes mentioned above:
|
||||
In lieu of \mintinline{latex}{article} you can use \mintinline{latex}{scrartcl}, \mintinline{latex}{report} is replaced by \mintinline{latex}{scrreport}, and \mintinline{latex}{scrbook} can be used instead of \mintinline{latex}{book}.
|
||||
In lieu of \mintinline{latex}{article} you can use \mintinline{latex}{scrartcl}, \mintinline{latex}{report} is replaced by \mintinline{latex}{scrreprt},\todo{Auf die fehlenden Vokale hinweisen? Anscheinend führt das zu Fehlern …} and \mintinline{latex}{scrbook} can be used instead of \mintinline{latex}{book}.
|
||||
As a replacement for \mintinline{latex}{letter}, one can use \mintinline{latex}{scrlttr2}.
|
||||
A complete list of all \acro{KOMA} script classes is available online.\footnote{Available at: \url{https://komascript.de/omascriptbestandteile}}
|
||||
By using \acro{KOMA} document classes, the layout of the generated \acro{PDF} document is changed.
|
||||
On top of that, they provide additional functionalities.
|
||||
The standard document classes are designed according to the American-English
|
||||
standards whereas \acro{KOMA} classes adhere to European norms, e.\,g., for
|
||||
The standard document classes are designed according to \replaced[id=C]{US-American conventions}{the American-English standards}
|
||||
whereas \acro{KOMA} classes adhere to European norms, e.\,g., for
|
||||
writing letters.
|
||||
|
||||
Each \mintinline{latex}{\documentclass} command can hold optional parameters in
|
||||
@ -37,29 +37,28 @@ The language can be passed as an optional parameter, too (cf. \cref{sec:language
|
||||
\subsection{Digression: packages}
|
||||
\label{sec:packages}
|
||||
\todo{Muss ``packages'' hier jetzt groß oder klein?}
|
||||
\todo{Sollte beides gehen}
|
||||
|
||||
\begin{minted}{latex}
|
||||
\usepackage[<options>]{<packagename>}
|
||||
\end{minted}
|
||||
|
||||
Packages provide additional commands and functionalities that we can use within our \LaTeX{} source code.
|
||||
There are numerous packages for different use cases (e.\,g., typesetting formulas, lists, \textellipsis).
|
||||
In order to use a package, it must be included within the preamble.
|
||||
\replaced[id=C]{For a package to be used}{In order to use a package}, it must be included within the preamble.
|
||||
To do so, the above-mentioned command is used.
|
||||
The most important \LaTeX{} packages can be found in the Comprehensive \TeX\ Archive Network,\footnote{Available at: \url{https://www.ctan.org/}} short: \acro{CTAN}.
|
||||
You can also find the documentation for the packages there.
|
||||
The most important \LaTeX{} packages can be found in the Comprehensive \TeX\ Archive Network, short: \acro{CTAN}.\footnote{Available at: \url{https://www.ctan.org/}}
|
||||
You can also find \deleted[id=C]{the }documentation for the packages there.
|
||||
|
||||
\subsection{Encoding}
|
||||
\begin{minted}{latex}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[t1]
|
||||
\end{minted}
|
||||
|
||||
One use case for packages is specifying the encoding of our \LaTeX{} document.
|
||||
The character encoding\footnote{cf. \url{https://en.wikipedia.org/wiki/Character_encoding}} determines the available character set.
|
||||
The standard encoding in \LaTeX{} is \acro{ASCII}.\footnote{cf. \url{https://en.wikipedia.org/wiki/ASCII}}
|
||||
It is an American character encoding and therefore does, for instance, not contain German umlauts, or other special characters, which makes it unsuitable for most use cases.
|
||||
As a consequence, \acro{UTF-8}\footnote{cf. \url{https://en.wikipedia.org/wiki/UTF-8}} can be used as a universal character encoding.
|
||||
It is an American character encoding and therefore does\deleted[id=C]{, for instance,} not contain German umlauts\deleted[id=C]{,} or \added[id=C]{most }other special characters, which makes it unsuitable \replaced[id=C]{at least for non-english}{for most} use cases.
|
||||
\replaced[id=C]{Instead}{As a consequence}, \acro{UTF-8}\footnote{cf. \url{https://en.wikipedia.org/wiki/UTF-8}} can be used as a universal character encoding.
|
||||
|
||||
In \LaTeX{}, we need to specify two character encodings:
|
||||
The input encoding (short: \mintinline{latex}{inputenc}), which refers to our 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 \acro{PDF} document, since we also need special characters there.
|
||||
@ -72,8 +71,7 @@ The input encoding (short: \mintinline{latex}{inputenc}), which refers to our so
|
||||
\begin{minted}{latex}
|
||||
\usepackage[ngerman]{babel}
|
||||
\end{minted}
|
||||
|
||||
The package \mintinline{latex}{babel} provides language-specific information (e.\,g., on hyphenation, special characters, changing fonts, translation of labels\footnote{cf. \cref{sec:references}} like \enquote{Chapter}, \enquote{Table of Contents}, or \enquote{Figure}, \textellipsis).
|
||||
The package \mintinline{latex}{babel} provides language-specific information (e.\,g., on hyphenation, special characters, changing fonts, translation of labels\footnote{cf. \cref{sec:references}} like \enquote{Chapter,} \enquote{Table of Contents,} or \enquote{Figure.}
|
||||
The desired language can be passed as an optional parameter.
|
||||
\mintinline{latex}{ngerman}, for instance, is used for the new German spelling.
|
||||
Some packages require that the language is already passed as an optional parameter in the \mintinline{latex}{\documentclass} command.
|
||||
@ -95,20 +93,21 @@ The actual content of the \acro{PDF} document needs to be put between \mintinlin
|
||||
The easiest content that we can integrate into the document environment is continuous text.
|
||||
We can write it directly into our source code.
|
||||
Line breaks and multiple \added[id=F]{consecutive} spaces are ignored by \LaTeX{}.
|
||||
Blank lines create a new paragraph, that is indented by default.
|
||||
\footnote{The automatic indentation of new paragraphs can be prevented by using the command \mintinline{latex}{\noindent}.}
|
||||
Blank lines create a new paragraph, that is indented by default.\footnote{The automatic indentation of new paragraphs can be prevented by using the command \mintinline{latex}{\noindent}.}
|
||||
Manual line breaks can be enforced with two backslashes (\textbackslash\textbackslash).
|
||||
This should be avoided, though.
|
||||
|
||||
\subsection{Comments}
|
||||
Some characters are reserved for \LaTeX-specific commands, for instance, the percent sign.
|
||||
Using a percent sign tells the \LaTeX{} compiler to ignore the rest of the line, i.\,e., the text after the percent character will not appear in the generated \acro{PDF} document.
|
||||
Using a percent sign tells the \LaTeX{} compiler to ignore the rest of the line, \replaced[id=C]{so}{i.\,e.,} the text after the percent character will not appear in the generated \acro{PDF} document.
|
||||
This can be useful in order to take notes while working on a document without affecting the document itself.
|
||||
\replaced[id=F]{It}{This} is called a comment.
|
||||
\replaced[id=F]{It}{This} is called a \emph{comment}\textit{.}
|
||||
|
||||
\todo{Ab da wird es redundant zu Abschnitt 5.5. Reicht da nicht ein Verweis?}
|
||||
However, if we want the percent sign to actually appear in the text, we can achieve this by using a backslash: \mintinline{latex}{\%}.
|
||||
This solution is called escaping and also works for other reserved characters, like \#, \$, \&, \_, \{ and \}.
|
||||
|
||||
\todo{Und spätestens hier hat es nichts mehr mit Kommentaren zu tun :D}
|
||||
In order to escape the backslash, the command \mintinline{latex}{\textbackslash} must be used.
|
||||
\footnote{An overview of additional special characters can be found in \cref{sec:special-characters}.}
|
||||
|
||||
@ -120,7 +119,10 @@ The commands that are depicted in \cref{lst:headlines} can be used with any docu
|
||||
\Example{lst:headlines}{basic-document-structure/headlines}{basic-document-structure/headlines_crop}{Heading Levels}
|
||||
\todo{Beispiele neu generieren.}
|
||||
|
||||
Depending on your specified document class, the commands \mintinline{latex}{\chapter{Chapter}} and \mintinline{latex}{\part{Part}} are additionally available -- for instance in books.
|
||||
\added[id=C]{Komisches Konstrukt, weil \texttt{replaced} nicht mit enthaltenen mint-Dingen klarkommt. Geändert:} Some document classes provide additional commands. In a \texttt{report}, you get \mintinline{latex}{\chapter{Chapter}}, and in a \texttt{book}, additionally \mintinline{latex}{\part{Part}}.
|
||||
\added[id=C]{Vorher:}
|
||||
Depending on your specified document class, the commands \mintinline{latex}{\chapter{Chapter}} and \mintinline{latex}{\part{Part}} are additionally available -- for instance in books.
|
||||
\added[id=C]{Ende der Änderung.}
|
||||
You can mark the command with an asterisk if you want to omit the numbering of a section and exclude it from the table of contents:\footnote{cf. \cref{sec:table-of-contents}}
|
||||
|
||||
\begin{minted}{latex}
|
||||
@ -146,10 +148,8 @@ The design of the front matter depends on the specified document class.
|
||||
|
||||
The command \mintinline{latex}{\tableofcontents} generates an automatically numbered table of contents by making use of the above-mentioned commands for dividing our text into sections and chapters (this can bee seen in \cref{lst:main-file} on \cpageref{lst:main-file}).
|
||||
|
||||
The numbering style and depth, and many other options can, of course, be specified manually.
|
||||
\footnote{We recommend the following blogpost: \url{https://texblog.org/2011/09/09/10-ways-to-customize-tocloflot/}}
|
||||
The numbering style and depth, and many other options can, of course, be specified manually.\footnote{We recommend the following blogpost: \url{https://texblog.org/2011/09/09/10-ways-to-customize-tocloflot/}}
|
||||
For \LaTeX{} to create our table of contents properly, the project has to be compiled twice.
|
||||
|
||||
Besides the table of contents, you can also generate a \mintinline{latex}{\listoffigures} (list of figures) and a \mintinline{latex}{\listoftables} (list of tables).
|
||||
The captions of your figures and tables will appear within those indices.
|
||||
\footnote{cf. \cref{sec:graphics} (Graphics) and \cref{sec:tables} (Tables) for more information on captions}
|
||||
The captions of your figures and tables will appear within those indices.\footnote{cf. \cref{sec:graphics} (Graphics) and \cref{sec:tables} (Tables) for more information on captions}
|
||||
|
||||
@ -6,7 +6,7 @@ the command \replaced[id=F]{\mintinline{latex}{\footnote{<text>}}}{\mintinline{l
|
||||
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}:
|
||||
|
||||
@ -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
|
||||
of our paragraph (\cref{lst:ragged-alignment}).
|
||||
format\added[id=C]{ting}
|
||||
of \replaced[id=C]{certain}{our} paragraph\added[id=C]{s} (\cref{lst:ragged-alignment}).
|
||||
|
||||
\example{lst:ragged-alignment}{formatting-paragraphs/ragged-alignment}{Ragged
|
||||
alignment}
|
||||
@ -23,7 +23,6 @@ Usually, we illustrate a new paragraph by indenting the first line of it
|
||||
(\mintinline{tex}{\parindent}).
|
||||
Alternatively, paragraph spacing, i.\,e., vertical space between paragraphs,
|
||||
can be used (\mintinline{tex}{\parskip}).
|
||||
|
||||
For both variants, there are adjustable parameters:
|
||||
\begin{minted}{tex}
|
||||
\setlength{\parindent}{0pt}
|
||||
@ -33,7 +32,7 @@ For both variants, there are adjustable parameters:
|
||||
}
|
||||
\end{minted}
|
||||
|
||||
We can use \mintinline{tex}{\noindent} to turn off the indentation for only one
|
||||
\noindent We can use \mintinline{tex}{\noindent} to turn off the indentation for only one
|
||||
paragraph.
|
||||
For the first paragraph after a heading, there is usually no indentation.
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ 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. 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.
|
||||
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.
|
||||
|
||||
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}.
|
||||
|
||||
@ -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}
|
||||
@ -70,8 +70,8 @@ Make sure to include the \mintinline{sh}{natbib} package for this purpose.
|
||||
\label{tbl:bibtex-commands}
|
||||
\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 \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 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}}
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ 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
|
||||
@ -74,7 +75,7 @@ Line breaks are denoted by two backslashes.
|
||||
|
||||
\Example{lst:math-alignment-example}{maths/align-example}{maths/align-example_crop}{Equations aligned at equals signs}
|
||||
|
||||
\section{Intensional set notation}\todo{Is that really what this section is about? Looks rather like a “text within maths” section to me.}\todo{Ich kenne es nur als »Set-builder notation«, »text within maths« ist natürlich auch nicht falsch.}
|
||||
\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.}
|
||||
|
||||
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.
|
||||
|
||||
@ -8,7 +8,7 @@ In order not to lose the overview in the source code and to avoid that source fi
|
||||
|
||||
\section{Main file}
|
||||
|
||||
In large projects, we typically use one main file, which is often called \texttt{main.tex}. It is, in a sense, the structural skeleton of the project, as it contains the basic structure including the preamble. The title, table of contents, as well as the individual chapters of a work are integrated in this main file (cf. \cref{lst:main-file}). The inclusion of the individual sections can be done either by \mintinline{latex}{\input{...}} or \mintinline{latex}{\include{...}}. Both require the path to the file to be included as an argument. We will discuss the differences between the two commands later (see \cref{sec:input-vs-include}).
|
||||
In large projects, we typically use one main file, which is often called \texttt{main.tex}. It is, in a sense, the structural skeleton of the project, as it contains the basic structure including the preamble. The title, table of contents, as well as the individual chapters of a work are integrated in this main file (cf.\ \cref{lst:main-file}). The inclusion of the individual sections can be done either by \mintinline{latex}{\input{...}} or \mintinline{latex}{\include{...}}. Both require the path to the file to be included as an argument. We will discuss the differences between the two commands later (see \cref{sec:input-vs-include}).
|
||||
|
||||
\example{lst:main-file}{project-structure/main-file}{Typical structure in a main file \LaTeX{}}
|
||||
|
||||
@ -25,4 +25,4 @@ If you use the command \mintinline{latex}{\input}, you can specify the file exte
|
||||
|
||||
The command \mintinline{latex}{\include} behaves differently: Here, the file
|
||||
extension \texttt{.tex} \emph{must} be omitted. Nesting of embeddings is not
|
||||
possible. Also, a new page is created for each included file.
|
||||
possible. Also, a new page is created for each included 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, \deleted[id=F]{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} 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 flexibly 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,
|
||||
|
||||
@ -7,9 +7,9 @@ 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{cleveref}.\footnote{with only one \enquote{r}!}
|
||||
It provides us with the command \replaced[id=F]{\mintinline{latex}{\ref{<label>}}}{\mintinline{latex}{\ref{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,
|
||||
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,
|
||||
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.
|
||||
|
||||
@ -21,7 +21,7 @@ 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 \\
|
||||
@ -31,13 +31,13 @@ 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:
|
||||
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}
|
||||
|
||||
@ -38,7 +38,7 @@ Out of the box, your editor will probably execute the following command after yo
|
||||
$ pdflatex main.tex
|
||||
\end{minted}
|
||||
|
||||
\noindent The exact command can be found and configured in \TeX{}studio under \enquote{Options → Configure \TeX{}studio → Commands}.
|
||||
\noindent The exact command can be found and configured in \TeX{}studio under Options → Configure \TeX{}studio → Commands.
|
||||
It is stated next to the label Pdf\LaTeX{}.
|
||||
The file that is to be compiled will replace the placeholder \mintinline{bash}{%.tex} upon compilation.
|
||||
Additionally, there are typically two additional options configured.
|
||||
@ -69,9 +69,9 @@ You can define listings using a dedicated environment:
|
||||
|
||||
\example{lst:minted-variants}{source-code-listings/minted-variants}{Shorthand and inline listing}
|
||||
|
||||
\noindent There is also a shorthand and an inline variant of the command (cf. \cref{lst:minted-variants}).
|
||||
\noindent There is also a shorthand and an inline variant of the command (cf.\ \cref{lst:minted-variants}).
|
||||
To avoid redundancy, it may be practical to import source code directly from the source file.
|
||||
To accomplish this, we only have to pass the programming language and the file path to the \mintinline{latex}{\inputminted} command (cf. \cref{lst:minted-external}).
|
||||
To accomplish this, we only have to pass the programming language and the file path to the \mintinline{latex}{\inputminted} command (cf.\ \cref{lst:minted-external}).
|
||||
|
||||
\example{lst:minted-external}{source-code-listings/minted-import}{Including from a separate file}
|
||||
|
||||
@ -80,7 +80,7 @@ To accomplish this, we only have to pass the programming language and the file p
|
||||
\section{Configuring minted}
|
||||
|
||||
Optional parameters allow us to add line numbers, line breaks, and colors.
|
||||
Moreover, there are numerous themes available (\cref{lst:minted-external-styled}).
|
||||
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}).
|
||||
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}
|
||||
|
||||
@ -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 also get more flexibility using the \mintinline{tex}{csquote} package, which provides the \mintinline{tex}|\enquote{<quote>}| command.
|
||||
We can \deleted[id=C]{also }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 also do this within our source code:
|
||||
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}:
|
||||
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.
|
||||
@ -142,5 +142,5 @@ Please note that some of them only work in maths environments (c.\,f. \cref{sec:
|
||||
\label{tbl:special-characters}
|
||||
\end{table}
|
||||
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.
|
||||
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}}
|
||||
From cuneiforms to technical symbols, there is absolutely \emph{everything}\textit{,} as you can see scrolling through the \emph{Comprehensive \LaTeX{} Symbol List}\textit{.}\footnote{\url{http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}}
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
|
||||
@ -5,6 +5,4 @@
|
||||
\item Afterwards, comment out the preamble, the document environment, and the table of contents.
|
||||
\end{enumerate}
|
||||
|
||||
\todo{Text übersetzen}
|
||||
|
||||
\exercisematerial{exercises/basic-document-structure/document-structure}
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -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).
|
||||
|
||||
~\\
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -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}
|
||||
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
\usepackage{minted}
|
||||
|
||||
% Quotes (\enquote)
|
||||
\usepackage{csquotes}
|
||||
\usepackage[autostyle,autopunct=false]{csquotes}
|
||||
|
||||
% Icons
|
||||
\usepackage{fontawesome5}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user