Compare commits

..

No commits in common. "master" and "2021-translate-script" have entirely different histories.

108 changed files with 538 additions and 970 deletions

2
.gitignore vendored
View File

@ -79,7 +79,7 @@ _minted*
*.swp
*.swo
main-*.pdf
main.pdf
listings-mode.tex
exercise-mode.tex
public

View File

@ -10,9 +10,7 @@ clean:
@echo Cleaning up temporary files.
@rm -rf public/*
@rm -rf temp/*
@rm -f main-{script,exercises,solutions}.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
@rm -f exercises/*/*.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
@rm -f install-verification/*.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
@rm -f {main,script-only}.{aux,loc,log,out,pdf,soc,toc}
# Compile listings (only needed when listings have changed)
listings: listings/**/*
@ -23,15 +21,16 @@ tasks: exercises/**/*
./compile_tasks
# Compile a preview PDF containing all contents
preview: main-script.tex
preview: main.tex
echo "\newcommand\exercisemode{any}" > exercise-mode.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
pdflatex -shell-escape main-script.tex
pdflatex -shell-escape main.tex
@echo
@echo
@echo Run \'make publication\' to generate PDF and ZIP file for publication.
# Build all PDF and ZIP variants
publication: clean publication-pdf-without-exercises publication-pdf-with-exercises publication-pdf-with-solutions publication-zip-with-exercises publication-zip-with-solutions
publication: publication-pdf-without-exercises publication-pdf-with-exercises publication-pdf-with-solutions publication-zip-with-exercises publication-zip-with-solutions
#
# Building blocks from here on:
@ -43,60 +42,51 @@ publication-dir:
mkdir -p temp/
# Compile a printable PDF without exercises
publication-pdf-without-exercises: clean publication-dir main-script.tex
publication-pdf-without-exercises: clean publication-dir main.tex
echo "\newcommand\exercisemode{none}" > exercise-mode.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
pdflatex -shell-escape main-script.tex
pdflatex -shell-escape main-script.tex
pdflatex -shell-escape main-script.tex
mv main-script.pdf public/
pdflatex -shell-escape -jobname=script-only main.tex
pdflatex -shell-escape -jobname=script-only main.tex
pdflatex -shell-escape -jobname=script-only main.tex
mv script-only.pdf public/
# Compile a printable PDF with exercises and without solutions
publication-pdf-with-exercises: clean publication-dir main-exercises.tex
publication-pdf-with-exercises: clean publication-dir main.tex
echo "\newcommand\exercisemode{exercises}" > exercise-mode.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
pdflatex -shell-escape main-exercises.tex
pdflatex -shell-escape main-exercises.tex
pdflatex -shell-escape main-exercises.tex
mv main-exercises.pdf public/
pdflatex -shell-escape -jobname=script-with-exercises main.tex
pdflatex -shell-escape -jobname=script-with-exercises main.tex
pdflatex -shell-escape -jobname=script-with-exercises main.tex
mv script-with-exercises.pdf public/
# Compile a printable PDF with solutions
publication-pdf-with-solutions: clean publication-dir main-solutions.tex
# Compile a printable PDF with exercises and solutions
publication-pdf-with-solutions: clean publication-dir main.tex
echo "\newcommand\exercisemode{solutions}" > exercise-mode.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
pdflatex -shell-escape main-solutions.tex
pdflatex -shell-escape main-solutions.tex
pdflatex -shell-escape main-solutions.tex
mv main-solutions.pdf public/
# Build a ZIP file without tasks
publication-zip-without-exercises: clean publication-dir
rm -rf temp/*
cp --parents main-script.tex praeamble.tex commands.tex setup.tex content/* docs/* graphics/* install-verification/* listings/**/*.{tex,pdf,bib,java,txt} titlepage.tex imprint.tex temp/
cd temp && zip ../public/project-without-exercises * **/* **/**/*
pdflatex -shell-escape -jobname=script-with-solutions main.tex
pdflatex -shell-escape -jobname=script-with-solutions main.tex
pdflatex -shell-escape -jobname=script-with-solutions main.tex
mv script-with-solutions.pdf public/
# Build a ZIP file with tasks and without solutions
publication-zip-with-exercises: clean publication-dir
rm -rf temp/* exercises/**/_*
cp --parents main-exercises.tex praeamble.tex commands.tex setup.tex docs/* graphics/* install-verification/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex temp/
publication-zip-with-exercises: clean publication-dir main.tex
rm -rf temp/*
cp --parents main.tex praeamble.tex commands.tex setup.tex content/* graphics/* listings/**/*.{tex,pdf,bib,java,txt} temp/
cp --parents exercises/**/* temp/
rm -f temp/exercises/**/*.done.{tex,bib,synctex.gz}
rm -f temp/exercises/**/*.done.{tex,bib}
rm -f temp/exercises/**/*.rend.tex
rm -f temp/exercises/**/*.aux
find temp/ -name '*.raw.*' -exec bash -c 'sed "s/\.raw\./\./g" <<<{} | xargs mv {}' \;
find temp/ -name '*.tex' -exec sed -i -e 's/\.raw\./\./g' {} \;
sed -i 's/\.raw//g' temp/main-exercises.tex
cd temp && zip ../public/project-with-exercises * **/* **/**/*
# Build a ZIP file with tasks and solutions
publication-zip-with-solutions: clean publication-dir
rm -rf temp/* exercises/**/_*
cp --parents main-solutions.tex praeamble.tex commands.tex setup.tex docs/* graphics/* install-verification/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex temp/
publication-zip-with-solutions: clean publication-dir main.tex
rm -rf temp/*
cp --parents main.tex praeamble.tex commands.tex setup.tex content/* graphics/* listings/**/*.{tex,pdf,bib,java,txt} temp/
cp --parents exercises/**/* temp/
rm -f temp/exercises/**/*.raw.{tex,bib,synctex.gz}
rm -f temp/exercises/**/*.aux
rm -f temp/exercises/**/*.raw.{tex,bib}
find temp/ -name '*.done.*' -exec bash -c 'sed "s/\.done\./\./g" <<<{} | xargs mv {}' \;
find temp/ -name '*.tex' -exec sed -i -e 's/(raw|done)//g' {} \;
sed -i 's/\.done//g' temp/main-solutions.tex
sed -i 's/\.done//g' temp/exercises/*/*.tex
cd temp && zip ../public/project-with-solutions * **/* **/**/*

View File

@ -1,6 +1,6 @@
# LaTeX Script by Fachschaft WIAI
The material contained in this repository introduces the most fundamental LaTeX mechanisms to get learners started. It comprises both a script and hands-on exercises for our [LaTeX workshop](https://wiai.stuve-bamberg.de/latex-weekend), a **LaTeX introduction aimed at students from various backgrounds**. The following topics are covered:
This script introduces the most fundamental LaTeX mechanisms to get learners started. It is used both as a reference and as exercise material for our [LaTeX workshop](https://wiai.stuve-bamberg.de/latex-weekend), a **two-day tutorial aimed at students from various backgrounds**. The following topics are covered:
* general introduction to the LaTeX system
* basic document structure
@ -10,44 +10,37 @@ The material contained in this repository introduces the most fundamental LaTeX
* formatting paragraphs
* lists
* maths and formulas
* source code listings (`minted` + `listings`)
* graphics
* tables
* footnotes
* references
* literature management
* source code listings (`listings` with an optional `minted` part)
Most chapters contain exercises to practically apply the aspects that are introduced by the text.
Most chapters contain exercises to be performed within the script itself, practically teaching the aspects that are introduced by the text.
## Getting started
### For beginners
This project contains three different documents:
1. a **script** containing all of the chapters we cover in the workshop (`main-script`),
2. an **exercise script** with practical tasks to apply what you have learned (`main-exercises`), and
3. a **solution script** that you can refer to for your self-study (`main-solutions`).
A PDF version of all of these documents can be found [in the “releases” section](https://git.stuve-bamberg.de/latex/latex-skript/releases). You may use the script to delve into the realms of LaTeX on your own. It will give you an overview of how to approach any, but especially this LaTeX project. To get your hands dirty, have a look at the exercise script, especially the “First steps with LaTeX” section.
A PDF version of the script can be found [in the “releases” section](https://github.com/fs-wiai/latex-script/releases). It will give you an overview of how to approach any, but especially this LaTeX project. For this, have a look at the “First steps with LaTeX” section.
**Optionally**, the `minted` package can be used for source code listings. This requires some additional configuration (including the installation of [Python3](https://www.python.org/)). Please refer to the chapter on “Source code listings” in the aforementioned PDF file.
### Command line usage
Each document in this project can be compiled by running a LaTeX compiler on `main-script.tex` (or any of the other two main files, respectively). A simple command would be:
The project can be compiled by running a LaTeX compiler on `main.tex`. A simple command would be:
```sh
$ pdflatex main-script.tex
$ pdflatex main.tex
```
Run the command twice to generate the table of contents and other registers. Once the literature tasks are being worked on, compilation requires an additional call to BibTeX:
```sh
$ pdflatex main-script.tex
$ bibtex main-script.aux
$ pdflatex main-script.tex
$ pdflatex main-script.tex
$ pdflatex main.tex
$ bibtex main.aux
$ pdflatex main.tex
$ pdflatex main.tex
```
If you decide to use the optional `minted` package (see section above), don't forget to add the `--shell-escape` flag:
@ -56,8 +49,6 @@ If you decide to use the optional `minted` package (see section above), don't fo
$ pdflatex --shell-escape main.tex
```
Read more about the potentially dangerous implications of this flag in the script.
## Project Structure
```
@ -69,54 +60,32 @@ latex-script/
│   ├── basic-document-structure.tex
│   ├── basic-functionality.tex
│   └── …
├── docs
│   ├── vs-code-instructions.md
│   ├── faq.md
│   └── …
├── exercises
│   ├── basic-document-structure
│   ├── footnotes
│   └── …
├── first-steps-with-latex.tex
├── graphics
│   ├── benzene-ring.pdf
│   ├── cc-by-sa.png
│   └── …
├── imprint.tex
├── LICENSE
├── listings
│   ├── basic-document-structure
│   ├── formatting-paragraphs
│   └── …
├── main-exercises.tex
├── main-script.tex
├── main-solutions.tex
├── main.tex
├── Makefile
├── praeamble.tex
├── public
├── setup.tex
├── README.md
├── titlepage-exercises.tex
├── titlepage-solutions.tex
└── titlepage.tex
└── README.md
```
## Relevant files for learners
* **`main.tex`** is the entry point. It includes the preamble (`preamble.tex`), our custom commands (`commands.tex`) as well as all sections.
* **`content`** comprises the individual chapters of this script.
* Most chapters include a task that can be found in the **`exercises`** folder.
In this repository, we provide an exercise script in which you can practically apply what you have learned. These files will be needed:
* **`main-exercises.tex`** is the entry point for the exercise part. It includes the preamble (`preamble.tex`), our custom commands (`commands.tex`) as well as all sections.
* **`exercises`** contains one sub-folder for each chapter. Within these folders, there are the LaTeX files you will have to modify to complete an exercise.
## Additional material
Besides the exercise part, we also provide the script detailing all of the information we give you during our workshop. This script can be used as a reference, a refresher, and a source of inspiration. Moreover, it is a practical example of how LaTeX can be brought to good use. This is why we offer you the full source code, structured like this:
* The **`content`** folder comprises the individual chapters of the script.
* They are bound together by **`main-script.tex`**, which also includes our preamble (`preamble.tex`) and our custom commands (`commands.tex`).
* Further folders (e.g., `listings` and `graphics`) contain additional resources like images and source code listings used in the script.
Please don't feel overwhelmed by the amount of files in this repository. You will get to know the most important parts of the project step by step by [following the script](https://git.stuve-bamberg.de/latex/latex-skript/releases) or our workshop. What's more, by using this larger project you get accustomed to the complexity of real LaTeX projects bachelor's/master's theses and the like.
Please don't feel overwhelmed by the amount of files in this repository. You will get to know the most important parts of the project step by step by [following the script](https://github.com/fs-wiai/latex-script/releases) or our workshop. What's more, by using this larger projects you get accustomed to the complexity of real LaTeX projects bachelor's/master's theses and the like.
## Further information for maintainers
@ -139,12 +108,9 @@ You are welcome to contribute to this project by creating issues, opening pull r
These are the main contributors so far:
* Evelyn Fradtschuk
* Jessica Klarmann
* Florian Knoch
* Theresa Knoll
* Christian Kremitzl
* Bernhard Luedtke
* Jochen Mehlich
## License

View File

@ -86,12 +86,12 @@
% ===========
% Code snippets with syntax highlighting.
% TODO: Fix special character mess.
% Caution: Must not be used inside `\textbf{}'
%
% Arguments:
% 1. Language.
% 2. Source code.
\newcommand\code[2]{%
% \mintinline{#1}{#2}
\texttt{#2}%
}
@ -128,7 +128,7 @@
\ifthenelse{\equal{#1}{latex}}{%
\lstset{language=#1,
basicstyle=\small\ttfamily,
basicstyle=\footnotesize\ttfamily,
breaklines=true,
keywordstyle=\color{ForestGreen}\bfseries,
emph={%
@ -146,7 +146,7 @@
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}1
{ß}{{\ss}}2
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
@ -163,7 +163,7 @@
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}1
{ß}{{\ss}}2
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
@ -241,3 +241,69 @@
\end{figure}
}
% Exercise mode
% =============
% The exercise mode can be chosen by writing one of the following to the exercise-mode.tex file before compilation:
% \newcommand\exercisemode{none} % for a blank script without exercises
% \newcommand\exercisemode{exercises} % for a script with exercises only
% \newcommand\exercisemode{solutions} % for a script with solutions only
% \newcommand\exercisemode{any} % for a script containing all available material
% The following lines include that file or make \exercisemode default to 'any' so that any derivatives of this project will work even without the file.
\IfFileExists{exercise-mode.tex}{
\input{exercise-mode.tex}
}{
\newcommand\exercisemode{any}
}
% Exercises
% =========
% Includes the task.tex file within the given subfolder of exercises and adds a heading.
\newcommand\exercise[1]{
\ifthenelse{\equal{\exercisemode}{none}}{
% Exercises disabled.
}{
\newpage
\definecolor{latexblue}{rgb}{0.9,0.925,0.95}
\pagecolor{latexblue}
%\definecolor{latexblue}{rgb}{0.73,0.84,0.92}
\section*{Exercise \thechapter}
\addcontentsline{toc}{section}{Exercise}%
\input{exercises/#1/task.tex}
\newpage
\nopagecolor
}
}
% Exercise Material
% =================
% Takes a project-relative path, and inserts matching exercise material and/or solutions, depending on the exercise mode.
\newcommand\exercisematerial[1]{
% Mode 'exercises': raw material only
\ifthenelse{\equal{\exercisemode}{exercises}}{
\IfFileExists{#1.raw.tex}{
\input{#1.raw.tex}
}{}
}{}
% Mode 'solutions': completed material only
\ifthenelse{\equal{\exercisemode}{solutions}}{
\IfFileExists{#1.done.tex}{
\input{#1.done.tex}
}{}
}{}
% Mode 'any': all existing material. If both raw and completed material exist, headings are added for each.
\ifthenelse{\equal{\exercisemode}{any}}{
\IfFileExists{#1.raw.tex}{
\IfFileExists{#1.done.tex}{
\subsubsection*{Preview of the raw material}
}{}
\input{#1.raw.tex}
}{}
\IfFileExists{#1.done.tex}{
\IfFileExists{#1.raw.tex}{
\subsubsection*{Preview of the solution}
}{}
\input{#1.done.tex}
}{}
}{}
}

View File

@ -5,8 +5,10 @@
\chapter*{First steps with \LaTeX}
\addcontentsline{toc}{section}{First steps with \LaTeX}
This document\footnote{Find the latest version of this document on Gitea: \url{https://git.stuve-bamberg.de/latex/latex-skript/releases}} contains exercises to practically apply learnings from the Fachschaft \acro{WIAI}'s \LaTeX{} workshop.
The following instructions will equip you with the programs necessary to create documents with \LaTeX{}---they are explained in the workshop and the main script.
This script serves as a short \LaTeX{} reference and as exercise material for the Fachschaft \acro{WIAI} \LaTeX{} workshop.
All of the source files and the latest version of this script can be found on Github.\footnote{\url{https://github.com/fs-wiai/latex-script/releases}}
The following instructions will equip you with the programs necessary to create documents with \LaTeX{}---they will be explained in the following chapters.
Please, make sure to install the \emph{compiler first} and the \emph{editor afterwards}\textit{.}
\section*{Compiler}
@ -24,9 +26,9 @@ Any editor will do (notepad++, Atom, VS Code, etc.).
However, for beginners, we recommend using \TeX{}studio,\footnote{You find the latest version on \url{https://www.texstudio.org/}.} a program that supports you with \LaTeX-specific features.
\section*{Compiling for the first time}
Open up the file \file{main-exercises.tex} in \TeX{}studio.
Open up the file \file{main.tex} in \TeX{}studio.
It can be found in our project directory.
By pressing \includegraphics[width=.8em]{graphics/faForward.png}, it is converted into a a file called \file{main-exercises.pdf}.
By pressing \faForward, it is converted into a a file called \file{main.pdf}.
You should be able to find the latter by looking at the project directory in your file explorer.
If your installation is not working yet, \TeX{}studio will show you an error message.
Feel free to contact us in this case.\footnote{Find us at \url{https://www.uni-bamberg.de/wiai/fs}.}

View File

@ -1,6 +1,5 @@
\chapter{References and footnotes}
\section{Footnotes}\label{sec:footnotes}
\chapter{Footnotes}
\label{sec:footnotes}
Whenever we want to include footnotes into our \LaTeX{} document, we can use
the command \code{latex}{\textbackslash footnote{<text>}}. At the position where we use
@ -17,62 +16,3 @@ The package \pkg{footmisc} provides us with additional options for how to displa
\item \code{latex}{\textbackslash usepackage[symbol]\{footmisc\}} causes a numbering with symbols (e.\,g., \textdagger, \textdaggerdbl) instead of numbers.
\end{itemize}
\section{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
\code{latex}{\textbackslash 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.
\Example{lst:fooboar-learning-latex}{references/ref}{references/ref_crop}{Example
for a reference}
A smarter package for references is \pkg{cleveref}.\footnote{with only one
\enquote{r}!}
It provides us with the command \code{latex}{\textbackslash cref\{<label>\}},
which can also handle multiple labels separated by commas.
This automatically generates elegant references like \enquote{sections 1 to 3,
and 5.}\footnote{for the source code \code{latex}{\textbackslash
cref\{sec:section1,sec:section2,
sec:section3,sec:section5\}}}
Furthermore, \code{latex}{\textbackslash 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.
For this reason, it is common to insert a prefix before each label
(\cref{lst:reference-prefixes}).
\begin{table}[H]
\centering
\begin{tabular}{@{}llll@{}}
\toprule
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
\end{tabular}
\caption{Prefixes for labels}
\label{lst:reference-prefixes}
\end{table}
Note that if we use \code{latex}{\textbackslash 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:
\codeblock{latex}{listings/references/set-language.tex}
\noindent Except for sections, captions\footnote{\code{latex}{\textbackslash
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:
\codeblock{latex}{listings/references/sections.tex}

View File

@ -0,0 +1,32 @@
\chapter{Formatting Paragraphs} % (fold)
\label{sec:formatting-paragraphs}
\section*{Ragged alignment}
\label{sec:ragged-alignment}
By default, \LaTeX{} sets continuous text in full justification.
However, we can also switch to ragged alignment by using the commands
\code{latex}{\textbackslash raggedright}, \code{latex}{\textbackslash raggedleft}, and
\code{latex}{\textbackslash centering}.
These commands influence the environment that they are used in, e.\,g., the
\mono{document} environment. Correspondingly, the text within the whole
document is affected.
Alternatively, we can use dedicated environments in order to influence the
formatting
of certain paragraphs (\cref{lst:ragged-alignment}).
\example{lst:ragged-alignment}{formatting-paragraphs/ragged-alignment}{Ragged
alignment}
\section*{Indentation and spacing}
\label{sec:indents-and-parskips}
Usually, we illustrate a new paragraph by indenting the first line of it
(\code{latex}{\textbackslash parindent}).
Alternatively, paragraph spacing, i.\,e., vertical space between paragraphs,
can be used (\code{latex}{\textbackslash parskip}).
For both variants, there are adjustable parameters:
\codeblock{latex}{listings/formatting-paragraphs/indentation.tex}
\noindent We can use \code{latex}{\textbackslash noindent} to turn off the indentation for only one
paragraph.
For the first paragraph after a heading, there is usually no indentation.

View File

@ -14,8 +14,6 @@ In order to be able to reference graphics, the package \texttt{graphicx} has to
\codeblock{latex}{listings/graphics/image-size.tex}
With the \mono{caption} command you can also add a caption to the image. Note that you can provide an alternative caption in square brackets, if you want.
\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.

View File

@ -15,7 +15,7 @@ Moreover, the items need to be extended by the term to be defined, put in bracke
\Example{lst:description-list}{lists/description-list}{lists/description-list_crop}{Exemplary description list}
The exuberant spacing between list items can be reduced by utilizing the \mono{paralist}\footnote{\url{https://www.ctan.org/pkg/paralist}} package.
To do so, we simply adjust the environment name: \sh{compactitem} replaces \sh{itemize}, \sh{compactenum} replaces \sh{enumerate}, and \sh{compactdesc} replaces \sh{description}.
To do so, we simply adjust the environment name: sh{compactitem} replaces sh{itemize}, sh{compactenum} replaces sh{enumerate}, and sh{compactdesc} replaces sh{description}.
If the list ought to appear within a text body, \pkg{paralist} provides the extra environments \mono{inparaenum} and \mono{inparaitem}.
We can customize bullet and list numbering styles via the \pkg{enumitem}\footnote{\url{https://www.ctan.org/pkg/enumitem}} package.

View File

@ -27,8 +27,8 @@ This is the identifier that we will use to reference the entry in our \LaTeX{} d
Bib\TeX{} keys can be chosen freely, but have to be unique.
Typically, they will consist of a combination of authors, publication dates, and topics.\newpage
\textbf{Bibliography files} can be compiled manually, yet it is more common to use programs like JabRef\footnote{Cf. \url{https://www.jabref.org/}.} or Zotero\footnote{Cf. \url{https://www.zotero.org/}.}.
While JabRef operates directly on your bibliography file, Zotero projects\footnote{Vgl. \url{https://guides.library.iit.edu/c.php?g=720120&p=6296986}.} can be exported to bibliography files to use them in \LaTeX{} documents.
\textbf{Bibliography files} can be compiled manually, yet it is more common to use programs like JabRef,\footnote{Cf. \url{https://www.jabref.org/}.} Zotero\footnote{Cf. \url{https://www.zotero.org/}.} or the widely-used software Citavi\footnote{Vgl. \url{https://www.citavi.com/de}.}.
While JabRef operates directly on your bibliography file, Zotero and Citavi projects\footnote{Vgl. \url{https://www1.citavi.com/sub/manual5/de/exporting_to_bibtex.html}.} can be exported to bibliography files to use them in \LaTeX{} documents.
\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.
@ -50,7 +50,6 @@ Make sure to include the \pkg{natbib} package for this purpose.
\begin{tabular}{ll}
\toprule
Function & Command \\ \midrule
Citing authors & \code{latex}{\textbackslash citeauthor\{<source>\}} \\
Citing sources & \code{latex}{\textbackslash cite\{<source>\}} \\
Citing pages & \code{latex}{\textbackslash cite[p. 15]\{<source>\}} \\
Custom citations & \code{latex}{\textbackslash cite[<prefix>][<suffix>]\{<source>\}} \\

View File

@ -78,6 +78,6 @@ Line breaks are denoted by two backslashes.
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.
For this case, there is the \code{latex}{\textbackslash text\{\}} command (c.\,f. \cref{lst:set-builder-notation}).
For this case, there is the \code{latex}{\textbackslash mathrm\{\}} command (\enquote{math roman}, c.\,f. \cref{lst:set-builder-notation}).
\example{lst:set-builder-notation}{maths/set-builder-notation}{Problems arising from intensional set notation and their solution}

View File

@ -1,25 +1,26 @@
\chapter{Project structure}
\label{sec:project-structure}
In the previous chapters, we have only seen very short \LaTeX{} examples.
\LaTeX{} can of course also be used to create larger documents and projects, such as a thesis.
In order not to lose the overview in the source code and to avoid that source files become too long, a reasonable structuring of a larger \LaTeX{} project is advisable.
For this purpose, the source code is divided into different files, which will be discussed in more detail in the following sections.
In the previous chapters, we have only seen very short \LaTeX{} examples. \LaTeX{} can of course also be used to create larger documents and projects, such as a thesis.
In order not to lose the overview in the source code and to avoid that source files become too long, a reasonable structuring of a larger \LaTeX{} project is advisable. For this purpose, the source code is divided into different files, which will be discussed in more detail in the following sections.
\section{Main file}
In large projects, we typically use one main file, which is often called \file{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 is typically done by the \code{latex}{\textbackslash input\{...\}} command
\footnote{There exists another command called \code{latex}{\textbackslash include\{\textellipsis\}} that works slightly differently. It requires you to specify the file to be included without a file extension. Besides this, a line break is added before the content of the partial file. Lastly, you cannot nest \code{latex}{\textbackslash include\{\textellipsis\}} statements. When you try to include a file that also includes a file, a compiler error will be thrown. \code{latex}{\textbackslash input\{\textellipsis\}} on the other hand is capable of such nested imports. In this script, we will present the \code{latex}{\textbackslash input\{\textellipsis\}} command only.}
with the file to be included as an argument.
In large projects, we typically use one main file, which is often called \file{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 \code{latex}{\textbackslash input\{...\}} or \code{latex}{\textbackslash include\{\textellipsis\}}. 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{}}
\section{Partial files}
Partial files are files that are included within another file, most often the main file.
In a thesis, for example, these can represent individual chapters.
You are free to decide how granular the division of the content into individual files should be.
The files that are included by the main file do not contain a preamble, since this is already present in the main file.
Neither do the commands \code{latex}{\textbackslash begin\{document\}} and \code{latex}{\textbackslash end\{document\}} appear again.
\section{Section files}
Section files are files that are included within the main file. In a thesis, for example, these can be individual chapters. You are free to decide how granular the division of the content into individual files should be.
The files that are included by the main file do not contain a preamble, since this is already present in the main file. Neither do the commands \code{latex}{\textbackslash begin\{document\}} and \code{latex}{\textbackslash end\{document\}} appear again.
\section{Input or include?}
\label{sec:input-vs-include}
Let us now turn to the differences between the two possible commands for including \LaTeX{} files. Briefly summarized, \code{latex}{\textbackslash include} and \code{latex}{\textbackslash input} have differences in the following three aspects: The way in which the path to the file to be included is specified, the possibility of nesting inclusions, and whether a new page is started for each section.
If you use the command \code{latex}{\textbackslash input}, you can specify the file extension \mono{.tex}, but it is not mandatory. It is also possible to nest the inclusion of files: A file included with \code{latex}{\textbackslash input} can in turn include another file with the same command. The files that have been included are inserted in the finished document without starting a new page for the included section (cf. \cref{lst:main-file}).
The command \code{latex}{\textbackslash include} behaves differently: Here, the file
extension \mono{.tex} \emph{must} be omitted. Nesting of embeddings is not
possible. Also, a new page is created for each included file.

41
content/references.tex Normal file
View File

@ -0,0 +1,41 @@
\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 \code{latex}{\textbackslash 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.
\Example{lst:fooboar-learning-latex}{references/ref}{references/ref_crop}{Example for a reference}
A smarter package for references is \pkg{cleverref}.\footnote{with only one \enquote{r}!}
It provides us with the command \code{latex}{\textbackslash cref\{<label>\}}, which can also handle multiple labels separated by commas.
This automatically generates elegant references like \enquote{sections 1 to 3, and 5.}\footnote{for the source code \code{latex}{\textbackslash cref\{sec:section1,sec:section2,
sec:section3,sec:section5\}}}
Furthermore, \code{latex}{\textbackslash 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.
For this reason, it is common to insert a prefix before each label (\cref{lst:reference-prefixes}).
\begin{table}[H]
\centering
\begin{tabular}{@{}llll@{}}
\toprule
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
\end{tabular}
\caption{Prefixes for labels}
\label{lst:reference-prefixes}
\end{table}
Note that if we use \code{latex}{\textbackslash 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:
\codeblock{latex}{listings/references/set-language.tex}
\noindent Except for sections, captions\footnote{\code{latex}{\textbackslash 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:
\codeblock{latex}{listings/references/sections.tex}

View File

@ -28,5 +28,5 @@ Its renderings are of rather peculiar appearance.
With some amount of configuration, we can overcome the most disturbing default settings.
Although \pkg{listings} is not shipped with any pre-defined themes, you can define your own and use them throughout your project with the \mono{lstdefinestyle} command.\footnote{Have a look at it in the package documentation. For the very impatient, here is a solarized theme for \pkg{listings}: \url{https://github.com/jez/latex-solarized}}
The package is also a bit older than its alternative, causing \acro{UTF-8} special characters to break.
If this happens to you, have a look at the \mono{literate} option of the \pkg{listings}\footnote{The \LaTeX{} WikiBook offers a good starter for the \mono{literate} option covering the most frequent special characters: \url{https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings\#Encoding_issue}} commands.
The package is also a bit older than its alternative, causing \acro{UTF8} special characters to break.
If this happens to you, have a look at the \mono{literate} option of the \pkg{listings} commands.

View File

@ -2,7 +2,7 @@
\subsection{Installation}
Using \pkg{minted} requires a working installation of the programming language Python 3 (henceforth referred to as Python).
On some operating systems, Python comes pre-installed, in which case entering the command \sh{python -{}-version} or \sh{python3 -{}-version} in a terminal of your choice\footnote{Opening a terminal on Windows: \includegraphics[width=.7em]{graphics/faWindows.png} + R → Type \enquote{cmd} → Enter} should print out the installed Python version.
On some operating systems, Python comes pre-installed, in which case entering the command \sh{python -{}-version} or \sh{python3 -{}-version} in a terminal of your choice\footnote{Opening a terminal on Windows: \faWindows\ + R → Type \enquote{cmd} → Enter} should print out the installed Python version.
If Python is yet to be installed, then you can find the installation files on the project website\footnote{Available at \url{https://www.python.org/downloads/}.}.
There are extensive articles that cover all relevant steps to install Python on
@ -26,7 +26,7 @@ Once the installation is complete, you are ready to include the \LaTeX{} package
There is one last adjustment needed before you can actually compile your documents---we will have to adjust the compile command.
Out of the box, your editor will probably execute the following command after you clicked the green compile arrow:
\shell{pdflatex main-exercises.tex}
\shell{pdflatex main.tex}
\noindent The exact command can be found and configured in \TeX{}studio under Options\,\,Configure \TeX{}studio\,\,Commands.
It is stated next to the Pdf\LaTeX{} label.

View File

@ -28,11 +28,11 @@ as shown in \cref{tbl:bars}.
\begin{longtable}{@{}llp{7.8cm}@{}}
\toprule
Code & Character & Usage \\
Code & Character & Usage \\
\midrule
\code{latex}{-} & Hyphen & a small-sized stroke \\
\code{latex}{-{}-} & 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) \\
\code{latex}{-{}-{}-} & Em dash & an interrupter at sentence level\,---\,mostly used in American English and without or with thin spaces \\
\code{latex}{-} & Hyphen & a small-sized stroke \\
\code{latex}{--} & 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) \\
\code{latex}{---} & Em dash & an interrupter at sentence level\,---\,mostly used in American English and without or with thin spaces \\
\bottomrule
\caption{Hyphens and dashes in \LaTeX}
\label{tbl:bars}
@ -42,18 +42,17 @@ The hyphen is obviously also used for hyphenation, but for this purpose, we shou
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.}
\setlength\LTleft{-2cm}
\begin{longtable}{@{}lp{8cm}p{3cm}p{3cm}@{}}
\begin{longtable}{@{}lp{11cm}@{}}
\toprule
Code & Explanation & English example & German example \\
Code & Explanation \\
\midrule
\endhead
\code{latex}{\textbackslash -} & 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). & & $\qquad\qquad\qquad$~Vers\-endung, Ver\-sendung \\
\code{latex}{"-} & Additional hyphenation: The word may be hyphenated here, as well as at the default positions. & & $\qquad\quad$~Mecklen- burg-Vorpommern \\
\code{latex}{-} & Exclusive hyphen: Is only used for compound words and prevents the automatic hyphenation for the rest of the word (which is typographically desirable). & $\qquad\qquad\quad$~stand-by & Hals-Nasen-Ohren-Arzt \\
\code{latex}{"=} & Non-exclusive hyphen: Is used for long compound words when the text wrapping would not work without additional automatic hyphenation. & & $\qquad\qquad$~Sonnen-auf- und -untergang \\
\code{latex}{""} & Cut-off point without a hyphen: Allows something like a \acro{url} to wrap without inserting a potentially misleading hyphen. Also useful in combination with parentheses. & $\qquad\qquad$~(sub-) module & $\qquad\qquad$~(Teil-) Prüfung \\
\code{latex}{"\textasciitilde} & Non-wrapping hyphen: Keeps the hyphen together with the following word, very useful for suspended hyphens when parts of compound words are omitted. & high-quality and \mbox{-priced products} & von Satzanfang bis \mbox{-ende} \\ % cannot be reproduced without german babel
\code{latex}{\textbackslash -} & 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). \\
\code{latex}{"-} & Additional hyphenation: The word may be hyphenated here, as well as at the default positions. \\
\code{latex}{-} & Exclusive hyphen: Is only used for compound words and prevents the automatic hyphenation for the rest of the word (which is typographically desirable). \\
\code{latex}{"=} & Non-exclusive hyphen: Is used for long compound words when the text wrapping would not work without additional automatic hyphenation. \\
\code{latex}{""} & Cut-off point without a hyphen: Allows something like a \acro{url} to wrap without inserting a potentially misleading hyphen. \\
\code{latex}{"~} & Non-wrapping hyphen: Keeps the hyphen together with the following word, very useful in German: \foreignlanguage{ngerman}{\emph{Vorlesungszeit und "~raum}} \\
\bottomrule
\caption{Exceptions for hyphenation}
\label{tbl:separators}
@ -72,10 +71,10 @@ The decisive factor is the appearance, not the semantics, which is why the Frenc
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
& Code & Result & Code & Result \\
\midrule
English (\acro{A.\,E.}) & \code{latex}{``''} & ``…'' & \code{latex}{`'} & `…' \\
English (\acro{B.\,E.}) & \code{latex}{`…'} & `…' & \code{latex}{``…''} & ``…'' \\
German & \code{latex}{\glqq\grqq} & \glqq\grqq & \code{latex}{\glq\grq} & \glq\grq \\
German (alternatively) & \code{latex}{\frqq\flqq} & \frqq\flqq & \code{latex}{\frq\flq} & \frq\flq \\
English (\acro{A.\,E.}) & \code{latex}{``...''} & ``…'' & \code{latex}{`...'} & `…' \\
English (\acro{B.\,E.}) & \code{latex}{`...'} & `…' & \code{latex}{``...''} & ``…'' \\
German & \code{latex}{\glqq...\grqq} & \glqq\grqq & \code{latex}{\glq\grq} & \glq\grq \\
German (alternatively) & \code{latex}{\frqq...\flqq} & \frqq\flqq & \code{latex}{\frq\flq} & \frq\flq \\
\bottomrule
\end{tabular}
\caption{Quotation marks}
@ -133,8 +132,8 @@ Please note that some of them only work in maths environments (c.\,f. \cref{sec:
\textless/\textgreater & \code{latex}{\textbackslash textless/\textbackslash textgreater} & \\
\textperthousand & \code{latex}{\textbackslash textperthousand} & \\
\textsection & \code{latex}{\textbackslash textsection} & \\
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths
environments \\
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths environments \\
\euro & \code{latex}{\textbackslash euro} & requires the \pkg{eurosym} package \\
\textteshlig & \code{latex}{\textbackslash textteshlig} & requires the \pkg{tipa} package \\
\textmusicalnote & \code{latex}{\textbackslash textmusicalnote} & requires the \pkg{textcomp} package \\
\bottomrule

View File

@ -1,7 +1,5 @@
\chapter{Text markup}
\section*{Text highlighting}
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 special and entrusts to \LaTeX{} \emph{how} it is going to look.
@ -68,35 +66,4 @@ For the rest, you can trust the default settings and avoid the visual clutter.
\label{tbl:type-sizes}
\end{table}
\newpage
\section*{Paragraph alignment}
\label{sec:ragged-alignment}
By default, \LaTeX{} sets continuous text in full justification.
However, we can also switch to ragged alignment by using the commands
\code{latex}{\textbackslash raggedright}, \code{latex}{\textbackslash raggedleft}, and
\code{latex}{\textbackslash centering}.
These commands influence the environment that they are used in, e.\,g., the
\mono{document} environment. Correspondingly, the text within the whole
document is affected.
Alternatively, we can use dedicated environments in order to influence the
formatting
of certain paragraphs (\cref{lst:ragged-alignment}).
\example{lst:ragged-alignment}{formatting-paragraphs/ragged-alignment}{Ragged
alignment}
\section*{Indentation and spacing}
\label{sec:indents-and-parskips}
Usually, we illustrate a new paragraph by indenting the first line of it
(\code{latex}{\textbackslash parindent}).
Alternatively, paragraph spacing, i.\,e., vertical space between paragraphs,
can be used (\code{latex}{\textbackslash parskip}).
For both variants, there are adjustable parameters:
\codeblock{latex}{listings/formatting-paragraphs/indentation.tex}
\noindent We can use \code{latex}{\textbackslash noindent} to turn off the indentation for only one
paragraph.
For the first paragraph after a heading, there is usually no indentation.

29
content/titlepage.tex Normal file
View File

@ -0,0 +1,29 @@
\thispagestyle{empty}
\begin{center}
\fslogo \\
\vspace{3em}
\rule{\textwidth}{1pt}\par
\vspace{0.8\baselineskip}
\Huge\bfseries Script for the Fachschaft \acro{WIAI} \LaTeX{} Workshop
\rule{\textwidth}{1pt}\par
%{\large \today}
\vfill
\vfill
{\Large{ Evelyn Fradtschuk, Florian Knoch,\\
Christian Kremitzl, Bernhard Luedtke}}\\
\vfill
\end{center}
\newpage
\thispagestyle{empty}
\mbox{}
\vfill
\begin{tabular}{@{}lp{9cm}}
& \subsubsection*{Imprint} \\
& The \LaTeX{} Script (version 1.1 from January 21st, 2022) has been assembled by the Student Council of the Information Systems and Applied Computer Sciences Faculty (Fachschaft \acro{WIAI}) at the University of Bamberg. \\
& It is licensed under Creative Commons \enquote{Attribution-ShareAlike 4.0 International} (CC BY-SA 4.0): \\
\href{http://creativecommons.org/licenses/by-sa/4.0/}{\includegraphics[height=.5cm]{graphics/cc-by-sa}} & \url{http://creativecommons.org/licenses/by-sa/4.0/} \\ \\
& Upon request, allowances exceeding the limitations of this license may be granted.
\end{tabular}

View File

@ -1,24 +0,0 @@
# Instructions for compiling this project in CoCalc
> [CoCalc](https://academiccloud.de/services/cocalc/) is a web service for data scientists. As part of the [AcademicCloud](https://academiccloud.de/), it is available to students at University of Bamberg. CoCalc is useful for collaboration on $\LaTeX$ documents, Jupyter Notebooks, and much more. CoCalc provides an [extensive documentation](https://doc.cocalc.com/latex.html).
>
> **Please note**: The Academic Cloud version is currently in preview, causing limited resources, no backups, and changes without prior notice. Use at your own risk.
This tutorial demonstrates how to set up CoCalc to compile the LaTeX script.
## Project setup
1. Open CoCalc. Students at University of Bamberg may use [this instance](https://academiccloud.de/services/cocalc/).
2. Click the blue button to go to your projects.
3. Click on “Create Project …”.
+ Add a title (e.g., “latex-workshop”).
+ Click on “Customize software environment” and choose “TeXLive” from the dropdown.
+ Create the project and wait for the initialization to finish. It is done when you see a blue button allowing you to “Create or Upload Files …”
4. Choose “Explorer” on the left side and click on “Upload.” Select your compressed project archive. Once uploaded, click on the name and proceed to “Extract Files …”
5. Back in the Explorer, you can now navigate through our project directory. Go to the file `main-exercises.tex`. It should load a familiar $\LaTeX$ work environment and automatically build the document for you. Compilation will be triggered whenever you hit `Ctrl + S`.
## Some general advice
+ Use the dropdown next to the three colorful buttons to **switch between source code files** related to the same root document. Do not open them in separate tabs via the Explorer.
+ CoCalc **projects stop on inactivity**. You will be prompted to restart the project.
+ When you **add new .tex documents**, CoCalc automatically fills them with some content you may want to use. For our purposes, you may delete this so-called boilerplate code.

View File

@ -1,66 +0,0 @@
# Frequently asked questions
- [Frequently asked questions](#frequently-asked-questions)
- [Error: “File 'setup.tex' not found. \\input{setup.tex}”](#error-file-setuptex-not-found-inputsetuptex)
- [Error: “File \`latex-logo.png' not found: using draft setting.”](#error-file-latex-logopng-not-found-using-draft-setting)
- [Error: “Unable to find xyz.sty”](#error-unable-to-find-xyzsty)
- [I accidentally dismissed the prompt asking me to install a missing package.](#i-accidentally-dismissed-the-prompt-asking-me-to-install-a-missing-package)
- [MikTeX Console is already running](#miktex-console-is-already-running)
- [I want to use my own tools.](#i-want-to-use-my-own-tools)
- [I need more help.](#i-need-more-help)
## Error: “File 'setup.tex' not found. \input{setup.tex}”
**Windows-specific diagnosis**:
If this error shows up when you compile the script for the first time, you may have opened the $\LaTeX$ file without unzipping the project archive first. To resolve the error, go back to the folder where you store your downloads. Locate the project archive (something like `latex-project-….zip`). Do not double-click it. Instead, right-click and select “Unzip”, “Extract”, or similar. This will extract the ZIP archive to a new folder. Open this folder and proceed with opening the file you were looking for.
**Generic hints**:
The compiler complains that a file called `setup.tex` cannot be found in the same folder as the file you are compiling. Make sure the file exists and there are no typos in your file name.
## Error: “File `latex-logo.png' not found: using draft setting.”
This is a common error when including any images or other media. Remember to specify the path to the image relative to your root document (i.&thinsp;e., your `main.tex`).
## Error: “Unable to find xyz.sty”
**Windows-specific diagnosis**:
This error typically relates to packages missing from your $\LaTeX$ installation. On Windows, it can typically be solved like this:
1. Open the Mik$\TeX$ Console, a program that comes with your $\LaTeX$ installation.
2. In there, you will find the “Packages” tab.
3. Click the button to search for package updates. This should resolve the error.
**Generic hints**:
The compiler complains that a package, particularly the corresponding .sty document, is missing. Typically, there is a `\usepackage{xyz}` command that loads the package xyz. Make sure there are no typos in the package name. If you do not use $\TeX$live-full (Linux), try to install the package via the Mik$\TeX$ Console (Windows) or your $\LaTeX$ distribution's helper tools.
## I accidentally dismissed the prompt asking me to install a missing package.
Try re-opening $\TeX$studio. If this does not help, there is still the option to manually install the required packages from the Mik$\TeX$ Console or similar distribution-specific management software.
## MikTeX Console is already running
If this error occurs while opening the MikTeX Console, open the Task Manager, search for “MikTeX Console”, select the entry in the table, and terminate the task by a click on the respective button. Then, open MikTeX Console again.
## I want to use my own tools.
Sure, feel free. We provide instructions for [CoCalc](./cocalc-instructions.md) and [VS Code/Codium](./vs-code-instructions.md). Any other editor will do if you know your ways around the terminal. In essence, all we do here is this:
```bash
lualatex main.tex
biber main
lualatex main.tex
lualatex main.tex
```
Just run `pdflatex main.tex` twice if you do not have any citations. Or have a look at XeTeX, … ([numerous other tools available](https://www.tug.org/interest.html#free)).
## I need more help.
Please refer to our various resources:
- the workshop's [presentation](https://wiai.de/latex-weekend)
- the [Moodle course](https://wiai.de/latex)
- the Git project containing the [script](https://git.stuve-bamberg.de/latex/latex-skript)
- the WIAI Student Council's [website](https://www.uni-bamberg.de/wiai/fs)

View File

@ -1,94 +0,0 @@
# Instructions for compiling LaTeX documents in Visual Studio Code
This tutorial demonstrates how to set up VS Code to compile the LaTeX script. Make sure to have a [LaTeX compiler installed](./README.md) before continuing.
## Software installation
1. Download and install [VS Code](https://code.visualstudio.com/) or its open-source version [VS Codium](https://vscodium.com/).
2. Install the [LaTeX Workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) plugin.
## Build recipes
LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a list of commands that are executed one after the other. For our exercises, we will need one basic recipe which simply runs the compiler twice. Later on, we will need a second recipe to deal with bibliographic data.
1. Launch the VS Code settings and search for “recipes.”
2. In the “Latex-workshop > LaTeX: Recipes” section, click on “Edit in settings.json.”
3. Go ahead and add the following two entries to the list. The first one just uses the `pdflatex` compiler twice to build our document, whereas the second one adds an intermediate round of `biber` compilation and changes the LaTeX compiler to `lualatex`.
```json
"latex-workshop.latex.recipes": [
{
"name": "pdflatex × 2",
"tools": [
"pdflatex",
"pdflatex"
]
},
{
"name": "lualatex -> biber -> lualatex × 2",
"tools": [
"lualatex",
"biber",
"lualatex",
"lualatex"
]
},
// EXISTING ENTRIES GO HERE
]
```
4. Now search for “latex tools” in the settings search.
5. In the “Latex-workshop > LaTeX: Tools section, click on “Edit in settings.json.”
6. Make sure the following entry is part of the list.
```json
"latex-workshop.latex.tools": [
{
"name": "biber",
"command": "biber",
"args": [
"%DOC%"
],
"env": {}
},
{
"name": "lualatex",
"command": "lualatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
],
"env": {}
},
// EXISTING ENTRIES GO HERE
]
```
7. Save and close the settings file.
8. For later convenience, set the “Latex-workshop > Latex > Recipe: Default” option to `lastUsed`.
## Compiling
1. Open the unzipped project archive (available in the [Releases section](https://git.stuve-bamberg.de/latex/latex-skript/releases)).
2. To test your installation, open `main-exercises.tex`.
3. In the left side bar, click on the TeX symbol, open the “Build LaTeX project entry” (clicking on the little arrow on the left) and choose the “pdflatex × 2” recipe. For the duration of the compilation, you should see a spinning icon in the bottom row next to the Git icons. Any errors will appear in the problems tab.
4. To open the resulting document, click on “View LaTeX PDF” in the TeX section below the recipes. If this succeeded, you are ready to work on the exercises. The document will compile again once you save it.
## Some useful notes
+ LaTeX Workshop has a [process of deciding which file to compile](https://github.com/James-Yu/LaTeX-Workshop/wiki/Compile#latex-workshoplatexbuildforceRecipeUsage). Unfortunately, our project archive tends to confuse the plugin, resulting in compiler errors. You can **specify the document root** by adding a magic TeX root comment. We provided these comments for you in all exercise files:
```
% !TeX root = ../../main-exercises.tex
```
+ However, by default, **LaTeX Workshop ignores them** because they may pose a security threat if you cannot trust the project you are compiling. See [this issue](https://github.com/James-Yu/LaTeX-Workshop/issues/3027) for more details. To enable them anyway, go to your settings and deactivate the “Force Recipe Usage” checkbox.
The **LaTeX Workshop** plugin offers a couple of other handy features:
+ Sometimes, it is helpful to kill all compiler processes and **clean up the auxiliary files** afterwards.
+ If you need to **find a certain section** in the PDF or in the source document, you can use the “Navigate, select and edit” menu.
+ In the left sidebar, you will also find the entire **document structure** and **snippets** that will make your life easier.

View File

@ -1,38 +1,11 @@
% twocolumn parameter adds second column
\documentclass[twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,italian]{babel}
\usepackage[hidelinks]{hyperref}
% \documentclass{scrartcl}
% \usepackage[utf8]{inputenc}
% \usepackage[T1]{fontenc}
% \usepackage[english]{babel}
% \usepackage[hidelinks]{hyperref}
% for headers and footers
\usepackage{fancyhdr}
% configure title components
\title{Recipes}
\date{\today}
\author{It's you!}
\begin{document}
% set headers and footers
\pagestyle{fancy} % activate headers and footers in general
\thispagestyle{fancy} % apply to the first page as well
% clear and configure headers
\fancyhead{}
\fancyhead[R]{Recipes}
% clear and configure footers
\fancyfoot{}
\fancyfoot[R]{\thepage}
% switch language (needs optional parameter where the babel package is added), display title, then switch back
\selectlanguage{italian}
\maketitle
\selectlanguage{english}
\tableofcontents
% \begin{document}
% \tableofcontents
\section{Beverages}
@ -54,16 +27,15 @@ Place a sieve over the container that you want to store the lemonade in. Put the
When the liquid is cold, add the lemon juice, the cold water, and the ice cubes and stir everything.
Your lemonade is now ready to enjoy!
% short title for the table of contents via optional parameter
\subsection[Chocoho!]{Hot Chocolate}
\subsection{Hot Chocolate}
Coming soon!
% asterisk (*) hides the section title in the table of contents
\section*{Breakfast}
\section{Breakfast}
\subsubsection{Buckwheat Overnight Oats}
Coming soon!
\end{document}
% \end{document}

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/basic-document-structure/document-structure.code.done.tex}
\codeblock{latex}{./exercises/basic-document-structure/document-structure.code.tex}

View File

@ -1,4 +1,4 @@
\documentclass{article}
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

View File

@ -1,9 +1,6 @@
\section{Structure your document and text}
\begin{enumerate}
\item In the directory \file{exercises/basic-document-structure}, you can find a file named \file{document-structure.tex}. Wrap the text of the file in a \code{latex}{document} environment and add the following preamble.
\item In the directory \file{exercises/basic-document-structure}, you can find a file named \file{document-structure.tex}. Wrap the text of the file in a \code{latex}{document} environment and add the following preamble. Afterwards, compile the document.
\codeblock{latex}{./exercises/basic-document-structure/preamble.code.tex}
\item In TeXstudio, right click on the file and select \enquote{Set as explicit root document.} Next, compile the file.
\item Congratulations! You have created and compiled your first \LaTeX{}
document. Maybe you have noticed that paragraphs within the text were
created by using \code{latex}{\textbackslash\textbackslash}. Replace the
@ -11,18 +8,10 @@
\item It is time to structure your first document. Use the \LaTeX{}
commands \code{latex}{\textbackslash section},
\code{latex}{\textbackslash subsection}, etc. to structure the text.
Also, include a table of contents for your document.
Also,
include
a table of contents for your document.
\item Afterwards, comment out the preamble, the document environment, and the table of contents.
\end{enumerate}
\subsection*{Extra tasks: Make it fit your needs}
\begin{itemize}
\item Add a \textbf{title} to the document.
\item Make today's date appear in a \textbf{language of your choice}.
\item \textbf{Hide} one section title in the table of contents.
\item Add a \textbf{short title} to a different section title.
\item Split the text in \textbf{two columns} (keyword: \texttt{twocolumn}).
\item Add a \textbf{header} with the title on the right and a \textbf{footer} with the page number on the left.
\item Try out what changes when you change the \textbf{document class}.
\item Research the possibilities of traditional\footnote{\url{https://hartwork.org/beamer-theme-matrix/}} and modern\footnote{\url{https://gitlab.cs.fau.de/i4/tex/i4neo}} \textbf{beamer presentation templates}.
\end{itemize}
\exercisematerial{exercises/basic-document-structure/document-structure}

View File

@ -1,4 +0,0 @@
Java is an object-oriented programming language that appeared in 1995.
It still counts as one of the most dominant programming languages.\footnote{As of 2025, see \url{https://github.blog/news-insights/octoverse/octoverse-a-new-developer-joins-github-every-second-as-ai-leads-typescript-to-1/} (last accessed: 17/11/2025)}
In order to write Java programs, one needs to install the so-called \emph{Java Development Kit (JDK)}.
Java programs can be written independently from the operating system that one uses.

View File

@ -0,0 +1,7 @@
Java is an object-oriented programming language, that appeared in
1995. The most recent version of the programming language is
version 16\footnote{March 2021}. In order to write Java programs,
one needs to install the so-called \emph{Java Development Kit
(JDK)}.\footnote{\url{https://www.oracle.com/java/technologies/javase-downloads.html}}
Java programs can be written independently from the operating
system that one uses.

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/footnotes/footnotes.code.done.tex}
\codeblock{latex}{./exercises/footnotes/footnotes.code.tex}

View File

@ -1,6 +1 @@
% !TeX root = ../../main-exercises.tex
Java is an object-oriented programming language that appeared in 1995.
It still counts as one of the most dominant programming languages (as of 2025).
In order to write Java programs, one needs to install the so-called \emph{Java Development Kit (JDK)}.
Java programs can be written independently from the operating system that one uses.
Java is an object-oriented programming language, that appeared in 1995. The most recent version of the programming language is version 16 (March 2021). In order to write Java programs, one needs to install the so-called \emph{Java Development Kit (JDK)}. Java programs can be written independently from the operating system that one uses.

View File

@ -1,6 +1,10 @@
\section{Footnotes and references}
Make the text \enquote{March 2021} of the file
\file{exercises/footnotes/footnotes.tex} appear as a footnote instead of in
parentheses. Additionally, insert a clickable URL to the Java Development Kit
as footnote.
\subsection{Inserting footnotes}
\todo{Sollten wir dieses Beispiel aus Faulheitsgründen vielleicht ersetzen?}
Make the text \enquote{as of 2025} of the file \file{exercises/footnotes/footnotes.tex} appear as a footnote instead of in parentheses.
Additionally, reference the corresponding blog post in the footnote: \\ \texttt{https://github.blog/news-insights/octoverse/octoverse-a-new-developer-joins-github-every-second-as-ai-leads-typescript-to-1/}
\texttt{https://www.oracle.com/java/technologies/javase-downloads.html}
\exercisematerial{exercises/footnotes/footnotes}

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/graphics/graphics.code.done.tex}
\codeblock{latex}{./exercises/graphics/graphics.code.tex}

View File

@ -1,3 +1 @@
% !TeX root = ../../main-exercises.tex
Please insert the image here.

View File

@ -1,8 +1,9 @@
\section{Inserting graphics}
In the \file{exercises/graphics} directory you can find an image file
\file{latex-logo.png}. Insert the image into the
\file{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
(\code{latex}{\textbackslash textwidth}). On top of that, add a caption to the image.
(\code{latex}{\textbackslash textwidth}).
\exercisematerial{exercises/graphics/graphics}

View File

@ -3,45 +3,22 @@ Ingredients:
\noindent Instructions: Boil and shred the berries, add maple syrup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly
\begin{itemize}
\item Ingredients:
\begin{itemize}
\item 400 g berries
\item 50 ml maple syrup
\item 4 lemons
\item 1 l cold water
\item 400 g ice cubes
\end{itemize}
\item Instructions:
\begin{enumerate}
\item boil and shred the berries
\item add maple syrup
\item squeeze the lemons and add their juice
\item add the remaining ingredients
\item scramble thoroughly
\end{enumerate}
\end{itemize}
% With all extra tasks:
\begin{itemize}
\item Ingredients:
\begin{compactitem}
\item 400 g berries
\item 50 ml maple syrup
\item 50 ml maple sirup
\item 4 lemons
\item 1 l cold water
\item 400 g ice cubes
\end{compactitem}
\item Instructions:
\begin{enumerate}[label=\roman*]
\setcounter{enumi}{6}
\begin{compactenum}
\item boil and shred the berries
\item add maple syrup
\item add maple sirup
\item squeeze the lemons and add their juice
\item add the remaining ingredients
\item scramble thoroughly
\end{enumerate}
\end{compactenum}
\end{itemize}

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/lists/lists.code.done.tex}
\codeblock{latex}{./exercises/lists/lists.code.tex}

View File

@ -1,6 +1,4 @@
% !TeX root = ../../main-exercises.tex
Ingredients:
400~g berries, 50~ml maple syrup, 4~lemons, 1~l cold water, 400~g ice cubes
400~g berries, 50~ml maple sirup, 4~lemons, 1~l cold water, 400~g ice cubes
\noindent Instructions: Boil and shred the berries, add maple syrup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly
\noindent Instructions: Boil and shred the berries, add maple sirup, squeeze the lemons and add their juice, add the remaining ingredients, scramble thoroughly

View File

@ -1,15 +1,9 @@
\section{Adding enumerations}
% TODO:
Format the recipe you can find in \file{exercises/lists/lists.tex} as an
unordered list (\code{latex}{itemize}) with sub-lists \emph{Ingredients}
and \emph{Instructions}.
Within these, there shall be an unordered list of ingredients and an ordered list of
Within these, there shall be a compact, unordered list
(\code{latex}{compactitem}) of ingredients and a compact, ordered list of
instructions, respectively.
\subsection*{Extra tasks: Special enumerations}
\begin{itemize}
\item Try using \textbf{Roman numerals} in the ordered list.
\item Make the ordered list \textbf{start at 7} (keyword: \texttt{\textbackslash setcounter}).
\item Reduce the \textbf{white space} between the items in the unordered list.
\end{itemize}
\exercisematerial{exercises/lists/lists}

View File

@ -0,0 +1,4 @@
The first-mentioned book \citep{lamport1994} has been written by the creator of \LaTeX{}, Leslie Lamport himself. 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}
\bibliography{exercises/literature/literature.done.bib}

View File

@ -1,12 +0,0 @@
% Preamble adjustments
% Literature
\usepackage[style=numeric, citestyle=alphabetic, backend=biber]{biblatex}
\addbibresource{exercises/literature/literature.bib}
% Actual content
An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} \parencite{datta2017}.
There is a plethora of further handbooks \cite*[e.\,g.,][]{goossensmittelbach2010}.
\printbibliography

View File

@ -1,3 +1,15 @@
@book{lamport1994,
author = {Leslie Lamport},
title = {LaTeX - {A} Document Preparation System: User's
Guide and Reference Manual, Second Edition},
publisher = {Pearson / Prentice Hall},
year = {1994},
isbn = {978-0-201-52983-8},
timestamp = {Fri, 08 Apr 2011 18:21:00 +0200},
biburl = {https://dblp.org/rec/books/daglib/0023602.bib},
bibsource = {dblp computer science bibliography,
https://dblp.org}
}
@book{datta2017,
author = {Dilip Datta},
title = {LaTeX in 24 Hours - {A} Practical Guide for
@ -11,13 +23,13 @@
bibsource = {dblp computer science bibliography,
https://dblp.org}
}
@book{goossensmittelbach2010,
@book{goossensmittelbach2002,
author = {Michel Goossens and
Frank Mittelbach and
Alexander Samarin},
title = {Der LaTeX Begleiter},
publisher = {Addison-Wesley},
year = {2010},
year = {2002},
isbn = {978-3-8273-7044-0},
timestamp = {Fri, 15 Apr 2011 13:37:33 +0200},
biburl = {https://dblp.org/rec/books/daglib/0011922.bib},

View File

@ -1,3 +1,4 @@
%\inputminted[breaklines]{bibtex}{exercises/literature/literature.done.bib}
\codeblock{bibtex}{./exercises/literature/literature.done.bib}
\codeblock{latex}{./exercises/literature/literature.code.done.tex}
\codeblock{latex}{./exercises/literature/exercise-solution.tex}

View File

@ -1,6 +1,5 @@
% !TeX root = ../../main-exercises.tex
An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} (Datta, 2017).
The first-mentioned book (Lamport, 1994) has been written by the creator of \LaTeX{}, Leslie Lamport himself.
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).
~\\
@ -9,4 +8,6 @@ There is a plethora of further handbooks (e.\,g., Goossens, Mittelbach and Samar
\noindent [Datta 2017] Datta, Dilip: LaTeX in 24 Hours - A Practical Guide for Scientific Writing. Springer, 2017. \url{http://dx.doi.org/10.1007/978-3-319-47831-9}. ISBN 9783319478302
\noindent [Goossens u. a. 2010] Goossens, Michel ; Mittelbach, Frank ; Samarin, Alexander: Der LaTeX Begleiter. Addison-Wesley, 2010. ISBN 9783827370440
\noindent [Goossens u. a. 2002] Goossens, Michel ; Mittelbach, Frank ; Samarin, Alexander: Der LaTeX Begleiter. Addison-Wesley, 2002. ISBN 9783827370440
\noindent [Lamport 1994] Lamport, Leslie: LaTeX - A Document Preparation System: Users Guide and Reference Manual, Second Edition. Pearson / Prentice Hall, 1994. ISBN 9780201529838

View File

@ -1,19 +1,22 @@
\section{Creating and inserting references}
\begin{enumerate}
\item Create a new Bib\TeX{} file called \file{literature.bib} in the \file{exercises/literature} folder.
\item Use Google Scholar or \url{dblp.org} to retrieve Bib\TeX{} entries for the following \LaTeX{}
\item Use Google Scholar to retrieve Bib\TeX{} entries for the following \LaTeX{}
handbooks:
\begin{itemize}
\item Leslie Lamport (1994): \LaTeX. A Document Preparation System.
\item Dilip Datta (2017): \LaTeX\ in 24 Hours. A Practical Guide for Scientific Writing.
\item Frank Mittelbach / Michel Goossens (2010): Der \LaTeX-Begleiter.
\item Frank Mittelbach / Michel Goossens (2002): Der \LaTeX-Begleiter.
\end{itemize}
\item Add the Bib\TeX{} entries to the newly created Bib\TeX{} file.
\item Compare the entries with the results that \url{dblp.org} finds for the same titles.
\item Create a new Bib\TeX{} file called \file{literature.bib} in the
\file{exercises/literature} folder.
\item Add the Bib\TeX{} entries to the newly created Bib\TeX{} files. For this, select your preferred source among Google Scholar and dblp.
\item Assign unique and meaningful Bib\TeX{} keys.
\item Add the bibliography file to the project's preamble.
\item Make use of the \mono{alpha} bibliography style.
\item Cite the two handbooks in the file\\\file{exercises/literature/literature.tex}.
\item Ensure that the bibliography is listed.
\item Include the Bib\TeX{} file in a suitable location, where later on the references should be listed.
\item Cite the three handbooks in the
file\\\file{exercises/literature/literature.tex}.
\item Make use of the \mono{natdin} biliography style.
\item \textbf{Note}: If compiling fails, it may help to remove all auxiliary
files \\(\mono{main.aux/bbl/blg/loc/out/pdf/soc/toc}) before compiling again.
\end{enumerate}
\noindent \textbf{Note}: If compiling fails, it may help to remove all auxiliary files \\(\mono{main.aux/bbl/blg/loc/out/pdf/soc/toc}) before compiling again.
\exercisematerial{exercises/literature/literature}

View File

@ -16,7 +16,7 @@ $$x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
$$n! = \prod_{i=1}^{n} i$$
% Set of all odd natural numbers
$$\{ x \mid x \in \mathds{N}, \text{odd}(x) \}$$
$$\{ x \mid x \in \mathds{N}, \mathrm{odd}(x) \}$$
% Elimination $\neg\exists x$
$$\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$$

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/maths/math-formulas.code.done.tex}
\codeblock{latex}{./exercises/maths/math-formulas.code.tex}

View File

@ -1,6 +1,2 @@
% !TeX root = ../../main-exercises.tex
Replace this graphic by the corresponding formulas:
\vspace{1cm} % some additional spacing before the image
% Replace this graphic by the corresponding formulas:
\includegraphics{graphics/math-formulas.rend-crop.pdf}

View File

@ -36,7 +36,7 @@ $$n! = \prod_{i=1}^{n} i$$ \\
~ \\
\textbf{Set of all odd natural numbers}
$$\{ x \mid x \in \mathds{N}, \text{odd}(x) \}$$
$$\{ x \mid x \in \mathds{N}, \mathrm{odd}(x) \}$$
~ \\
\textbf{Elimination $\neg\exists x$}

View File

@ -1,4 +1,4 @@
\section{Typesetting mathematics}
Use \LaTeX{} math mode to typeset the following formulas.
Pay attention to the size of brackets.
Use \LaTeX{}'s math mode to typeset the following formulas.
Pay attention to the size of brackets. Prioritize those formulas that appear to be most useful and/or interesting to you.
\exercisematerial{exercises/maths/math-formulas}

View File

@ -9,9 +9,8 @@
\maketitle
\tableofcontents
\newpage
\input{section1}
\newpage
\input{section2}
\include{section1}
\include{section2}
\include{section3}
\end{document}

View File

@ -4,9 +4,8 @@
\maketitle
\tableofcontents
\newpage
\input{section1.done}
\newpage
\input{section2.done}
\include{section1.done}
\include{section2.done}
\include{section3.done}
\end{document}

View File

@ -26,4 +26,15 @@ Marzipan marzipan cupcake pastry tart sesame snaps sweet roll pie. Marshmallow p
Carrot cake cotton candy toffee jelly-o chocolate toffee cookie sweet roll. Pastry tootsie roll marzipan apple pie lollipop gingerbread sweet. Fruitcake gummies bear claw croissant. Pie cotton candy cheesecake powder bonbon candy canes lemon drops sweet.
\newpage
\section{Third ection}
Tart dragée bear claw icing fruitcake. Caramels marzipan jujubes bonbon. Fruitcake danish cookie halvah cake. Cheesecake sesame snaps jelly beans. Macaroon powder pie biscuit biscuit croissant cotton candy. Chocolate bar chupa chups tart cheesecake gingerbread tart. Ice cream muffin chupa chups sugar plum dragée topping marshmallow dragée.
Brownie chocolate cake oat cake soufflé ice cream brownie soufflé pudding. Wafer toffee topping bonbon. Croissant cheesecake halvah ice cream pudding. Jelly pastry carrot cake dragée. Jelly-o cotton candy croissant.
Halvah pie donut sweet pudding sweet roll soufflé tart tiramisu. Fruitcake soufflé lemon drops croissant croissant sweet lemon drops icing. Jelly cheesecake cotton candy jujubes candy canes. Gummi bears gummies pie pudding sweet roll cake wafer. Icing powder ice cream carrot cake pudding sesame snaps. Caramels brownie lemon drops macaroon. Oat cake sesame snaps chocolate cake bear claw muffin chocolate fruitcake pie.
Bear claw wafer jelly-o jujubes donut powder jelly-o soufflé gummi bears. Carrot cake gummies gummi bears chocolate cake. Soufflé dessert jelly beans wafer. Sugar plum liquorice icing. Gummies marzipan lemon drops apple pie. Jelly-o icing lemon drops cake. Chupa chups chocolate sesame snaps gingerbread pastry bear claw carrot cake apple pie.
\end{document}

View File

@ -0,0 +1,9 @@
\section{Third section}
Tart dragée bear claw icing fruitcake. Caramels marzipan jujubes bonbon. Fruitcake danish cookie halvah cake. Cheesecake sesame snaps jelly beans. Macaroon powder pie biscuit biscuit croissant cotton candy. Chocolate bar chupa chups tart cheesecake gingerbread tart. Ice cream muffin chupa chups sugar plum dragée topping marshmallow dragée.
Brownie chocolate cake oat cake soufflé ice cream brownie soufflé pudding. Wafer toffee topping bonbon. Croissant cheesecake halvah ice cream pudding. Jelly pastry carrot cake dragée. Jelly-o cotton candy croissant.
Halvah pie donut sweet pudding sweet roll soufflé tart tiramisu. Fruitcake soufflé lemon drops croissant croissant sweet lemon drops icing. Jelly cheesecake cotton candy jujubes candy canes. Gummi bears gummies pie pudding sweet roll cake wafer. Icing powder ice cream carrot cake pudding sesame snaps. Caramels brownie lemon drops macaroon. Oat cake sesame snaps chocolate cake bear claw muffin chocolate fruitcake pie.
Bear claw wafer jelly-o jujubes donut powder jelly-o soufflé gummi bears. Carrot cake gummies gummi bears chocolate cake. Soufflé dessert jelly beans wafer. Sugar plum liquorice icing. Gummies marzipan lemon drops apple pie. Jelly-o icing lemon drops cake. Chupa chups chocolate sesame snaps gingerbread pastry bear claw carrot cake apple pie.

View File

@ -1,4 +1,4 @@
\section{A structured project}
Within the directory \file{exercises/project-structure} you can find the file
\file{main.tex}.
\exercisematerial{exercises/project-structure/tasks}

View File

@ -1,24 +1,49 @@
\begin{enumerate}
\item
Put the sections of the file into separate files, named
\file{section1.tex}, \file{section2.tex}, and \file{section3.tex} and insert them using the \code{latex}{\textbackslash input} command. (In TeXstudio, make sure that you select the main file as the file to be compiled by right-clicking on it and selecting \enquote{Select as explicit root document.})
\textbf{Put the sections of the file into separate files, named
\file{section1.tex}, \file{section2.tex}, and \file{section3.tex}. Include
them using the \code{latex}{\textbackslash include} command.}
\begin{figure}[H]
\codeblock{latex}{exercises/project-structure/main.done.tex}
\codeblock{latex}{exercises/project-structure/main-with-preamble.done.tex}
\caption{\file{main.tex}}
\end{figure}
\begin{figure}[H]
\codeblock{latex}{exercises/project-structure/section1.done.tex}
\caption{\file{section1.tex} (analogous for the other
sections)}
\end{figure}
\item \textbf{Which command becomes superfluous when you use
\code{latex}{\textbackslash include}?} \\
\code{latex}{\textbackslash include} makes every included file appear on a
new page. Hence the command \code{latex}{\textbackslash newpage} becomes
superfluous.
\item Can the preamble also live in its own file? Find out by moving it analogously to the sections. If no, why? If yes, why can outsourcing the preamble be useful?
\item \textbf{Can the preamble also be excluded? If no, why? If yes, when
can outsourcing the preamble be useful?}
The preamble can also be outsourced. In real-world \LaTeX{} projects, we often make use of numerous packages that need to be
The preamble can also be outsourced, like in task 1. In real-world
\LaTeX{} projects we often make use of numerous packages that need to be
configured by additional commands within the preamble. Therefore, it is
advisable to outsource the preamble. On top of that, this is useful
because the file with the most-commonly used packages can be moved from
one project to another without needing to rewrite the preamble every time.
\item
\textbf{Add the command \code{latex}{\textbackslash
includeonly\{section2\}} to the preamble. Compile the document again, and
check what has changed. What does the command do and how can it be helpful
in a larger project? }
The command \code{latex}{\textbackslash includeonly\{section2\}} does
exactly what the name already says. During compilation, only the
\code{latex}{\textbackslash include} statements that contain file names
that appear in \code{latex}{\textbackslash includeonly\{file1,file2, …\}}
are included.
This can be useful for larger projects, when the compile time becomes
longer since by using the \code{latex}{\textbackslash includeonly} only the
files can be included which we are currently working in. Before the final
compilation we can delete the \code{latex}{\textbackslash includeonly}
command and end up with our complete \acro{PDF}.
\end{enumerate}

View File

@ -1,5 +1,13 @@
\begin{enumerate}
\item Put the sections of the file into separate files, named \file{section1.tex} and \file{section2.tex}.
Include them using the \code{latex}{\textbackslash input} command. (In TeXstudio, make sure that you select the main file as the file to be compiled by right-clicking on it and selecting \enquote{Select as explicit root document.})
\item Can the preamble also live in its own file? Find out by moving it analogously to the sections. If no, why? If yes, why can outsourcing the preamble be useful?
\item \textbf{Put the sections of the file into separate files, named
\texttt{section1.tex}, \texttt{section2.tex}, and \texttt{section3.tex}.
Include them using the \code{\textbackslash include} command.}
\item \textbf{Which command becomes superfluous when you use
\code{\textbackslash include}}
\item \textbf{Can the preamble also be excluded? If no, why? If yes, why can
outsourcing the preamble be useful?}
\item \textbf{Add the command \code{\textbackslash includeonly\{section2\}} to
the
preamble. Compile the document again, and check what has changed. What does
the command do and why can it be helpful in a larger project? }
\end{enumerate}

View File

@ -1,14 +0,0 @@
C\# is an object-oriented programming language that was developed by Microsoft in 2011.
\Cref{fig:csharp} displays the logo of the programming language.
\begin{figure}[H]
\centering
\includegraphics[width=2cm]{exercises/references/csharp.png}
\caption{The logo of C\#}
\label{fig:csharp}
\end{figure}
Listing \ref{lst:csharphelloworld} shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
\lstset{language=csharp}
\lstinputlisting[label=lst:csharphelloworld, caption=Hello World in C\#]{exercises/references/HelloLateXFriends.cs}

View File

@ -0,0 +1,17 @@
C\# is an object-oriented programming language that was developed by Microsoft in 2011. In \cref{fig:csharp} we can see the logo of the programming language.
\begin{figure}[H]
\caption{The logo of C\#}
\label{fig:csharp}
\centering
\includegraphics[width=2cm]{exercises/references/csharp.png}
\end{figure}
\cref{lst:csharphelloworld} shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
\begin{listing}[H]
\caption{A simple C\# program}
\label{lst:csharphelloworld}
\inputminted[breaklines,
linenos=true]{csharp}{exercises/references/HelloLateXFriends.cs}
\end{listing}

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/references/references.code.done.tex}
\codeblock{latex}{./exercises/references/references.code.tex}

View File

@ -1,14 +1,15 @@
% !TeX root = ../../main-exercises.tex
C\# is an object-oriented programming language that was developed by Microsoft in 2011. The figure displays the logo of the programming language.
C\# is an object-oriented programming language that was developed by Microsoft in 2011. In the figure we can see the logo of the programming language.
\begin{figure}[H]
\caption{The logo of C\#}
\centering
\includegraphics[width=2cm]{exercises/references/csharp.png}
\caption{The logo of C\#}
\end{figure}
The following source code listing shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
\lstset{language=csharp}
\lstinputlisting{exercises/references/HelloLateXFriends.cs}
\codeblock{csharp}{exercises/references/HelloLateXFriends.cs}

View File

@ -1,11 +1,10 @@
% same chapter as footnotes
\subsection{Inserting references}
In file \file{exercises/references/references.tex}, replace \enquote{in the
figure} and \enquote{the following source code listing} with suited references.
Use the command \code{latex}{\textbackslash cref}. Do not forget to first
introduce labels and captions for the elements that you want to reference.
introduce
labels for the elements that you want to reference. To do so, first of all,
wrap the source code listing in a \code{latex}{listing} environment. Also
insert a caption for the source code listing.
Make sure to use suitable prefixes before the labels.
For source code listings, adding labels and captions is a bit different.
Try to apply the knowledge you gained so far to retrieve the correct version of the \code{\lstinputlisting} command.
\exercisematerial{exercises/references/references}

View File

@ -3,6 +3,5 @@
numbers=left, % line numbers
showstringspaces=false, % spaces in strings
keywordstyle=\color{blue}, % keyword color
basicstyle=\ttfamily\small, % overall font and size
literate={ä}{{\"a}}1 {ß}{{\ss}}1 % special characters
basicstyle=\ttfamily\small % overall font and size
]{exercises/source-code-listings/Source.java}

View File

@ -7,7 +7,7 @@
bgcolor=ourBackgroundColor, % background color
firstline=5, % first line to be included
lastline=7, % last line to be included
autogobble=true % remove leading spaces
gobble=4 % remove leading spaces
]{java}{exercises/source-code-listings/Source.java}
\usemintedstyle{default}

View File

@ -1,3 +0,0 @@
% !TeX root = ../../main-exercises.tex
Your listings go here.

View File

@ -1,5 +1,3 @@
\section{Listings}
In the folder \file{exercises/source-code-listings}, you will find a file called \file{Source.java}.
We will now include it into our document and adjust its display to fit our needs.
If you have questions, consult the \pkg{minted} or \pkg{listings} package documentation.
@ -9,13 +7,13 @@ If you have questions, consult the \pkg{minted} or \pkg{listings} package docume
\begin{enumerate}
\item Include the file into \\
\file{exercises/source-code-listings/source-code-listings.tex}.
\item Enable special characters via the \code{latex}{literate} option.
\item Activate syntax highlighting by stating the programming language Java.
\item Add line breaks and line numbers.
\item Use the theme \code{latex}{native}.
\item This theme is optimized for a dark background. Change the background color to dark blue.
\item Include only lines 5 to 7.
\item Delete the spaces at the beginning of the lines. (Hint: The documentation speaks of \code{latex}{autogobble}.)
\item Delete the spaces at the beginning of the lines by using a suitable
option. (Hint: The documentation speaks of \code{latex}{gobble}.)
\end{enumerate}
\section*{Listings tasks}
@ -30,6 +28,8 @@ If you have questions, consult the \pkg{minted} or \pkg{listings} package docume
\item Don't show special characters for spaces in strings.
\end{enumerate}
\exercisematerial{exercises/source-code-listings/source-code-listings}
% Reset experiments from exercise material if minted is used
\ifthenelse{\equal{\listingsmode}{minted}}{%
\usemintedstyle{default}

View File

@ -1,7 +0,0 @@
What is a semester ticket?
It is also known as \enquote{Studi-Ticket} or \enquote{Studi-Karte} in German and allows you to use the local public transport around Bamberg for free.
In Bamberg, the semester ticked is embodied in your student card (Studierendenausweis).
To be able to use it, you have to validate the student card in one of the university buildings.
This is possible after you have paid the semester fees.
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.

View File

@ -0,0 +1,7 @@
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.

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/special-characters/special-characters.code.done.tex}
\codeblock{latex}{./exercises/special-characters/special-characters.code.tex}

View File

@ -1,9 +1,7 @@
% !TeX root = ../../main-exercises.tex
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.
Validation printers are located in multiple university buildings, e. g., in the foyer of the Erba building, in front of the library.
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.

View File

@ -1,13 +1,17 @@
\section{Insert special characters}
% breakanywhere doesn't seem to work.
For this task, we are using the file \file{exercises/special-characters.tex}.
To be able to see your results here within the exercise script,
compile the \file{main-exercises.tex} file.
To be able to see your results here within the script,
compile the \file{main.tex} file.
This applies for the subsequent tasks, as well.
\begin{enumerate}
\item Replace the spaces within abbreviations (e.\,g., i.\,a.) by thin spaces.
\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 Replace the hyphens within the Erba opening hours by en dashes.
\item Restrict the hyphenation of word \emph{Studierendenausweis} to one position: \\\emph{Studierenden-ausweis}.
\item Add quotation marks around the words \emph{Studi-Ticket} and
\emph{Studi-Karte} using the \code{latex}{\textbackslash enquote} command.
\item Replace the word \emph{EUR} by a Euro symbol (hence the thin space).
\end{enumerate}
\exercisematerial{exercises/special-characters/special-characters}

View File

@ -1,4 +1,4 @@
\codeblock{latex}{./exercises/tables/tables.code.done.tex}
\codeblock{latex}{./exercises/tables/tables.code.tex}
\begin{table}[h]
\centering

View File

@ -1,5 +1,3 @@
% !TeX root = ../../main-exercises.tex
\begin{itemize}
\item Foundations of Software Engineering
\subitem abbreviation: SWT-FSE-B

View File

@ -1,8 +1,10 @@
\section{Typesetting tables}
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 \file{exercises/tables/tables.tex}.
\exercisematerial{exercises/tables/tables}

View File

@ -1,5 +0,0 @@
\blockquote[Source and more information: \url{https://en.wikipedia.org/wiki/Recursion}]{
\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.
The most common application of \emph{recursion} is in mathematics and computer science, where a function being defined is applied within its own definition.
}

View File

@ -0,0 +1,5 @@
``\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.
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}

View File

@ -1 +1 @@
\codeblock{latex}{./exercises/text-markup/markup.code.done.tex}
\codeblock{latex}{./exercises/text-markup/markup.code.tex}

View File

@ -1,5 +1,3 @@
% !TeX root = ../../main-exercises.tex
``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,

View File

@ -1,10 +1,9 @@
\section{Emphasising text}
\begin{enumerate}
\item In \file{exercies/text-markup/markup.tex}, emphasize the words
``recursion'' and ``recursive.''
\item Make the \textsc{url} clickable.
\item Find a proper way to display the whole \textbf{paragraph as a quote}. Have a look at the \mono{csquotes} package.
\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}
\exercisematerial{exercises/text-markup/markup}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 809 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96C0 83.6 7.2 72.3 18.4 67s24.5-3.6 34.1 4.4L224 214.3V256v41.7L52.5 440.6zM256 352V256 128 96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4s-18.4-16.6-18.4-29V352z"/></svg>

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 863 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"/></svg>

Before

Width:  |  Height:  |  Size: 383 B

View File

@ -1,13 +0,0 @@
\newpage
\thispagestyle{empty}
\mbox{}
\vfill
\begin{tabular}{@{}lp{9cm}}
& \subsubsection*{Imprint} \\
& The \LaTeX{} Script (version 1.4.3 from November 2025) has been assembled by the Student Council of the Information Systems and Applied Computer Sciences Faculty (Fachschaft \acro{WIAI}) at the University of Bamberg. \\
& It is licensed under Creative Commons \enquote{Attribution-ShareAlike 4.0 International} (CC BY-SA 4.0): \\
\href{http://creativecommons.org/licenses/by-sa/4.0/}{\includegraphics[height=.5cm]{graphics/cc-by-sa}} & \url{http://creativecommons.org/licenses/by-sa/4.0/} \\ \\
& Upon request, allowances exceeding the limitations of this license may be granted.
\end{tabular}

View File

@ -1 +0,0 @@
*.pdf

View File

@ -1,67 +0,0 @@
\documentclass[a4paper,english]{report}
\IfFileExists{listings-mode.tex}{
\input{listings-mode.tex}
}{
\newcommand\listingsmode{default}
}
% Language and font encoding
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
% Special characters
\usepackage{eurosym, tipa, textcomp, textgreek, upgreek}
% Mathematical symbols
\usepackage{amssymb, amsfonts, amsmath, dsfont}
% References and URLs
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
% Images
\usepackage{graphicx}
\usepackage{float}
% Text color
\usepackage[usenames,dvipsnames]{xcolor}
% Multiple captions in one figure
\usepackage{subcaption}
% Compact lists
\usepackage{paralist}
% Tables
\usepackage{longtable, array, tabularx, booktabs, colortbl}
% PDF imports
\usepackage{pdfpages}
% ToDos
\usepackage{todonotes}
\usepackage{changes}
% Source code listings
\usepackage{listings}
\ifthenelse{\equal{\listingsmode}{minted}}{\usepackage{minted}}{}
% Quotes (\enquote)
\usepackage[autostyle,autopunct=false]{csquotes}
% Literature
\usepackage{natbib}
% Line wraps in monospace font
\usepackage[htt]{hyphenat}
% Tracking changes
\usepackage{changes}
\begin{document}
It works.
\end{document}

View File

@ -1,5 +1,5 @@
\begin{itemize}
\item lasagna noodles
\item lasagne noodles
\item crushed tomatoes
\item herbs \begin{enumerate}
\item oregano

View File

@ -1,4 +1,4 @@
\begin{align*}
\left\lbrace x \mid tiefe(x) \geq 20 \right\rbrace \\
\left\lbrace x \mid \text{tiefe}(x) \geq 20 \right\rbrace
\left\lbrace x \mid \mathrm{tiefe}(x) \geq 20 \right\rbrace
\end{align*}

Binary file not shown.

View File

@ -11,7 +11,7 @@
keywordstyle=\color{codeblue},
identifierstyle=\color{codegreen},
stringstyle=\color{codeyellow},
basicstyle=\small
basicstyle=\footnotesize
\ttfamily\color{white},
commentstyle=\color{codegray},
numberstyle=\tiny\color{codegray},

Some files were not shown because too many files have changed in this diff Show More