Compare commits

...

101 Commits

Author SHA1 Message Date
Florian
a5e40be5da Update instructions on LuaLaTeX and LaTeX Workshop in VS Code/Codium 2025-11-23 14:01:06 +01:00
Florian
a4ad98c7c0 Add note on MikTeX Console already running 2025-11-23 13:08:31 +01:00
f99adf1020 Add install-verification aux files to make clean 2025-11-20 23:47:49 +01:00
ed33856b8f Fix file extensions 2025-11-20 19:09:16 +01:00
Florian
4737feb243 Update imprint 2025-11-17 23:45:17 +01:00
Florian
e73ae72880 Fix sample solution 2025-11-17 22:48:31 +01:00
Florian
124e178fd8 Update references task 2025-11-17 22:10:28 +01:00
Florian
734854d234 Make footnotes task timeless 2025-11-17 22:00:54 +01:00
Florian
28d7ed348c Add note on path relative to root document 2025-11-17 21:43:23 +01:00
Florian
2d16ae0147 Adjust text markup task 2025-11-17 21:34:14 +01:00
Florian
39035df668 Fix typo 2025-11-17 21:33:56 +01:00
Florian
f9b7569eb1 Add some more advice 2025-11-17 11:49:23 +01:00
Florian
d5dd7f0dbd Include files via code block 2025-11-17 11:49:15 +01:00
Florian
8586397afc Add basic CoCalc instructions 2025-11-16 19:52:24 +01:00
Florian
68e5f9d4f0 Add FAQ 2025-11-16 19:15:56 +01:00
Florian
1ea1c70aec Add docs folder 2025-11-16 17:38:09 +01:00
Florian
eafef80230 Fix releases link 2025-11-16 17:37:41 +01:00
89c2d46463 Update version 2025-05-13 13:34:54 +02:00
9594555c6b Re-order sections 2025-05-13 13:33:17 +02:00
8984674b28 Merge branches 'master' and 'master' of git.stuve-bamberg.de:latex/latex-skript 2025-05-10 13:13:15 +02:00
a49f819d2e Add installation verification file 2025-05-10 13:10:30 +02:00
Florian
a50c4bf8fb Update VS Code instructions 2025-05-09 00:18:39 +02:00
Florian
3e3d168b79 Adapt literature task for biber 2025-05-09 00:10:32 +02:00
Florian
9e827a19d6 Add extra document customization task 2025-05-08 23:24:48 +02:00
Florian
4aa827cd20 Add extra list task instructions 2025-05-08 22:28:38 +02:00
Florian
1a39161dd4 Remove the commenting-out task 2025-05-08 22:13:09 +02:00
Florian
d1458eca95 Add extra tasks for lists 2025-05-08 22:08:42 +02:00
Florian
ce6d806495 Adjust exercise numbers 2025-05-01 22:15:42 +02:00
Florian
e39f7eca69 Replace fake ellipses 2025-05-01 22:15:31 +02:00
c0fb9341d9 Fix curly braces 2025-04-30 16:45:04 +02:00
08bd6674bc Adjust imprint for v1.4.1 release 2024-11-23 21:22:57 +01:00
ba3de5fc2d Add clean to make publication 2024-11-23 21:12:30 +01:00
ae59df6855 Remove more aux files on make clean 2024-11-23 21:11:04 +01:00
315a83fda9 Add note on compiler 2024-11-23 20:49:31 +01:00
479823d6e6 Add a tutorial on how to integrate LaTeX and VS Code 2024-11-23 20:47:55 +01:00
7fdac83f02 Fix task description 2024-11-23 18:53:08 +01:00
62fbaf1bf3 Fix LaTeX companion date 2024-11-23 18:26:56 +01:00
7ecc90b22d Move caption below image 2024-11-23 18:23:57 +01:00
b87f06f4d3 Replace scrartcl 2024-11-23 17:27:37 +01:00
25273d056c Fix outdated Java version in task 11a 2024-11-23 16:15:43 +01:00
1ca170d111 Add magic TeX comments 2024-11-23 16:08:50 +01:00
58df0cc4dc Remove the euro sign from the special character task 2024-04-01 11:31:18 +02:00
Uni Seme4ki Arbeit
9a439157ae remove typo 2023-11-26 17:53:18 +01:00
0b60aee8a8 Fix \sh commands 2023-11-08 22:06:59 +01:00
e0e694f900 Fix listings task 2023-04-28 17:26:58 +02:00
8f9ef296fd Adjust reference exercise 2023-04-28 16:57:04 +02:00
8ea59e8656 Fix date 2023-04-28 16:14:02 +02:00
4a9f04a652 Increase release number 2023-04-28 13:27:30 +02:00
4abe1f3ccb Remove ToDo 2023-04-28 13:21:10 +02:00
fe7d63f9f3 Add solution cover 2023-04-28 13:07:06 +02:00
1cc6d96ed3 Minor refactoring 2023-04-28 12:42:36 +02:00
bb2db7a0dc Update first chapters section 2023-04-28 12:28:33 +02:00
a029095b65 Reorder sections 2023-04-26 10:02:21 +02:00
b52d346a39 Fix Makefile: both project zips should work again 2023-04-23 14:54:42 +02:00
381d1845d0 add caption information 2023-04-21 11:22:05 +02:00
63e7f42658 Remove references to Citavi 2023-04-09 17:48:42 +02:00
4187e79408 Fix author names in author tag 2023-03-01 13:29:29 +01:00
5c9b705960 Add contributors 2023-03-01 13:25:35 +01:00
a78fe6e336 Replace occurrences of main.tex 2023-01-28 16:46:15 +01:00
f206d75505 Add new cover pages 2023-01-28 15:53:38 +01:00
d9238159dd Update README 2023-01-28 15:53:22 +01:00
9a99c0aee9 Start fixing the Makefile 2023-01-13 18:21:53 +01:00
5731eb3c45 Add exercise versions 2023-01-13 17:18:30 +01:00
3c699d5dd0 Remove exercise command 2023-01-13 16:35:09 +01:00
e4e731f044 Split script 2023-01-13 16:03:41 +01:00
6dfd17dc46 Add details on the literate option for listings 2023-01-03 11:08:25 +01:00
a074052ab7 Fix literate ß in listings 2023-01-03 10:58:00 +01:00
f3e18adcb4 Replace \mathrm by \text 2023-01-03 10:55:24 +01:00
9b9940af27 Add new image crops 2022-11-14 10:48:55 +01:00
5a93acbeaa adjust exercise numbers to presentation 2022-11-12 00:36:53 +01:00
7338bb65e5 Merge paragraph formatting chapter into text markup chapter 2022-11-04 15:14:40 +01:00
cc0eef7ef6 Replace fontawesome icons 2022-10-29 18:25:22 +02:00
8ff9cd19d2 Remove compact lists from exercise 2022-10-11 21:06:04 +02:00
e9263d7efd Add citeauthor command 2022-10-11 20:18:46 +02:00
cf7a34585b Remove dblp part 2022-10-11 20:06:30 +02:00
5846df3590 Adjust project structure exercise 2022-10-11 20:06:23 +02:00
d08bb59517 Drop hyphens from the exercise 2022-09-26 10:28:14 +02:00
50914a0953 Remove minipages breaking exercises (by more more or less undoing 68b43dcc5a, and thereby rendering the special characters exercise partly useless) 2022-09-23 16:40:26 +02:00
b5ad8b380b Merge branch 'master' of git.stuve-bamberg.de:latex/latex-skript 2022-06-18 22:32:24 +02:00
49ef46c24d Move cover to parent folder 2022-06-18 22:32:00 +02:00
402cc5275a Move cover to titlepage 2022-06-18 22:29:15 +02:00
3dd100ee3e Merge branch '2022-refactor-script' 2022-06-18 22:01:05 +02:00
68ea193e66 Add cover 2022-06-18 21:59:14 +02:00
68b43dcc5a revise special characters exercise. 2022-06-16 15:48:05 +02:00
d433b1611e escaping latex code 2022-06-07 20:27:53 +02:00
3da04c663b include examples for different hyphens 2022-06-07 20:21:56 +02:00
47fd4ac4da Merge branch '2022-refactor-script' of git.stuve-bamberg.de:latex/latex-skript into 2022-refactor-script 2022-05-22 10:38:05 +02:00
cae9575704 Move source code listings chapter after graphics and tables. 2022-05-22 10:37:44 +02:00
0581584181 Update project structure exercises 2022-05-09 16:01:22 +02:00
eb580eca60 Remove one book 2022-04-11 14:32:14 +02:00
0a9086eb92 Replace the codeblock command 2022-04-11 14:09:12 +02:00
a26138023c Fix strange line breaks 2022-04-11 13:58:43 +02:00
4350ac3f0c Remove code listings that are part of solutions 2022-04-11 13:56:17 +02:00
5d4ae70397 use same font size for listings 2022-04-11 10:18:03 +02:00
7b4a4d1ef1 remove euro sign in task solution (special characters) 2022-04-11 10:11:36 +02:00
e3a8c976f5 remove eurosym from script 2022-04-10 20:22:10 +02:00
e2663134a1 delete todo note in task 13 2022-03-27 18:43:45 +02:00
11981baa80 Use autogobble in minted exercise 2022-03-13 19:22:33 +01:00
f71ca7f887 Check with Barilla 2022-03-13 19:17:54 +01:00
f3a4141776 Fix typo 2022-03-13 19:01:07 +01:00
918ea4d7e1 Change desired citation style 2022-03-13 18:55:38 +01:00
108 changed files with 969 additions and 537 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,7 +10,9 @@ clean:
@echo Cleaning up temporary files.
@rm -rf public/*
@rm -rf temp/*
@rm -f {main,script-only}.{aux,loc,log,out,pdf,soc,toc}
@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}
# Compile listings (only needed when listings have changed)
listings: listings/**/*
@ -21,16 +23,15 @@ tasks: exercises/**/*
./compile_tasks
# Compile a preview PDF containing all contents
preview: main.tex
echo "\newcommand\exercisemode{any}" > exercise-mode.tex
preview: main-script.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
pdflatex -shell-escape main.tex
pdflatex -shell-escape main-script.tex
@echo
@echo
@echo Run \'make publication\' to generate PDF and ZIP file for publication.
# Build all PDF and ZIP variants
publication: publication-pdf-without-exercises publication-pdf-with-exercises publication-pdf-with-solutions publication-zip-with-exercises publication-zip-with-solutions
publication: clean 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:
@ -42,51 +43,60 @@ publication-dir:
mkdir -p temp/
# Compile a printable PDF without exercises
publication-pdf-without-exercises: clean publication-dir main.tex
echo "\newcommand\exercisemode{none}" > exercise-mode.tex
publication-pdf-without-exercises: clean publication-dir main-script.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
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/
pdflatex -shell-escape main-script.tex
pdflatex -shell-escape main-script.tex
pdflatex -shell-escape main-script.tex
mv main-script.pdf public/
# Compile a printable PDF with exercises and without solutions
publication-pdf-with-exercises: clean publication-dir main.tex
echo "\newcommand\exercisemode{exercises}" > exercise-mode.tex
publication-pdf-with-exercises: clean publication-dir main-exercises.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
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/
pdflatex -shell-escape main-exercises.tex
pdflatex -shell-escape main-exercises.tex
pdflatex -shell-escape main-exercises.tex
mv main-exercises.pdf public/
# Compile a printable PDF with exercises and solutions
publication-pdf-with-solutions: clean publication-dir main.tex
echo "\newcommand\exercisemode{solutions}" > exercise-mode.tex
# Compile a printable PDF with solutions
publication-pdf-with-solutions: clean publication-dir main-solutions.tex
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
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/
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 * **/* **/**/*
# Build a ZIP file with tasks and without solutions
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/
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/
cp --parents exercises/**/* temp/
rm -f temp/exercises/**/*.done.{tex,bib}
rm -f temp/exercises/**/*.done.{tex,bib,synctex.gz}
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 main.tex
rm -rf temp/*
cp --parents main.tex praeamble.tex commands.tex setup.tex content/* graphics/* listings/**/*.{tex,pdf,bib,java,txt} temp/
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/
cp --parents exercises/**/* temp/
rm -f temp/exercises/**/*.raw.{tex,bib}
rm -f temp/exercises/**/*.raw.{tex,bib,synctex.gz}
rm -f temp/exercises/**/*.aux
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
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:
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:
* general introduction to the LaTeX system
* basic document structure
@ -10,45 +10,54 @@ This script introduces the most fundamental LaTeX mechanisms to get learners sta
* 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 be performed within the script itself, practically teaching the aspects that are introduced by the text.
Most chapters contain exercises to practically apply the aspects that are introduced by the text.
## Getting started
### For beginners
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.
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.
**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
The project can be compiled by running a LaTeX compiler on `main.tex`. A simple command would be:
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:
```sh
$ pdflatex main.tex
$ pdflatex main-script.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.tex
$ bibtex main.aux
$ pdflatex main.tex
$ pdflatex main.tex
$ pdflatex main-script.tex
$ bibtex main-script.aux
$ pdflatex main-script.tex
$ pdflatex main-script.tex
```
If you decide to use the optional `minted` package (see section above), don't forget to add the `--shell-escape` flag:
If you decide to use the optional `minted` package (see section above), don't forget to add the `--shell-escape` flag:
```sh
$ pdflatex --shell-escape main.tex
```
Read more about the potentially dangerous implications of this flag in the script.
## Project Structure
```
@ -60,32 +69,54 @@ 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.tex
├── main-exercises.tex
├── main-script.tex
├── main-solutions.tex
├── Makefile
├── praeamble.tex
├── public
├── setup.tex
└── README.md
├── README.md
├── titlepage-exercises.tex
├── titlepage-solutions.tex
└── titlepage.tex
```
## 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.
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.
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.
## Further information for maintainers
@ -108,9 +139,12 @@ 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=\footnotesize\ttfamily,
basicstyle=\small\ttfamily,
breaklines=true,
keywordstyle=\color{ForestGreen}\bfseries,
emph={%
@ -146,7 +146,7 @@
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}2
{ß}{{\ss}}1
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
@ -163,7 +163,7 @@
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}2
{ß}{{\ss}}1
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
@ -241,69 +241,3 @@
\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

@ -1,5 +1,6 @@
\chapter{Footnotes}
\label{sec:footnotes}
\chapter{References and footnotes}
\section{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
@ -16,3 +17,62 @@ 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

@ -1,32 +0,0 @@
\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,6 +14,8 @@ 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/}.} 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 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 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,6 +50,7 @@ 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 mathrm\{\}} command (\enquote{math roman}, c.\,f. \cref{lst:set-builder-notation}).
For this case, there is the \code{latex}{\textbackslash text\{\}} command (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,26 +1,25 @@
\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 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}).
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.
\example{lst:main-file}{project-structure/main-file}{Typical structure in a main file \LaTeX{}}
\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.
\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.

View File

@ -1,41 +0,0 @@
\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{UTF8} special characters to break.
If this happens to you, have a look at the \mono{literate} option of the \pkg{listings} commands.
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.

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: \faWindows\ + 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: \includegraphics[width=.7em]{graphics/faWindows.png} + 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.tex}
\shell{pdflatex main-exercises.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,17 +42,18 @@ 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.}
\begin{longtable}{@{}lp{11cm}@{}}
\setlength\LTleft{-2cm}
\begin{longtable}{@{}lp{8cm}p{3cm}p{3cm}@{}}
\toprule
Code & Explanation \\
Code & Explanation & English example & German example \\
\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). \\
\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}} \\
\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
\bottomrule
\caption{Exceptions for hyphenation}
\label{tbl:separators}
@ -71,10 +72,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}
@ -132,8 +133,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 \\
\euro & \code{latex}{\textbackslash euro} & requires the \pkg{eurosym} package \\
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths
environments \\
\textteshlig & \code{latex}{\textbackslash textteshlig} & requires the \pkg{tipa} package \\
\textmusicalnote & \code{latex}{\textbackslash textmusicalnote} & requires the \pkg{textcomp} package \\
\bottomrule

View File

@ -1,5 +1,7 @@
\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.
@ -66,4 +68,35 @@ 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.

View File

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

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

66
docs/faq.md Normal file
View File

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

@ -0,0 +1,94 @@
# 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,11 +1,38 @@
% \documentclass{scrartcl}
% \usepackage[utf8]{inputenc}
% \usepackage[T1]{fontenc}
% \usepackage[english]{babel}
% \usepackage[hidelinks]{hyperref}
% twocolumn parameter adds second column
\documentclass[twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,italian]{babel}
\usepackage[hidelinks]{hyperref}
% for headers and footers
\usepackage{fancyhdr}
% configure title components
\title{Recipes}
\date{\today}
\author{It's you!}
% \begin{document}
% \tableofcontents
\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
\section{Beverages}
@ -27,15 +54,16 @@ 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!
\subsection{Hot Chocolate}
% short title for the table of contents via optional parameter
\subsection[Chocoho!]{Hot Chocolate}
Coming soon!
\section{Breakfast}
% asterisk (*) hides the section title in the table of contents
\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.tex}
\codeblock{latex}{./exercises/basic-document-structure/document-structure.code.done.tex}

View File

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

View File

@ -1,6 +1,9 @@
\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. Afterwards, compile the document.
\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.
\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
@ -8,10 +11,18 @@
\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.
\item Afterwards, comment out the preamble, the document environment, and the table of contents.
Also, include a table of contents for your document.
\end{enumerate}
\exercisematerial{exercises/basic-document-structure/document-structure}
\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}

View File

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

@ -1,7 +0,0 @@
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.tex}
\codeblock{latex}{./exercises/footnotes/footnotes.code.done.tex}

View File

@ -1 +1,6 @@
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.
% !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.

View File

@ -1,10 +1,6 @@
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.
\section{Footnotes and references}
\todo{Sollten wir dieses Beispiel aus Faulheitsgründen vielleicht ersetzen?}
\subsection{Inserting footnotes}
\texttt{https://www.oracle.com/java/technologies/javase-downloads.html}
\exercisematerial{exercises/footnotes/footnotes}
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/}

View File

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

View File

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

View File

@ -1,9 +1,8 @@
\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}).
\exercisematerial{exercises/graphics/graphics}
(\code{latex}{\textbackslash textwidth}). On top of that, add a caption to the image.

View File

@ -3,22 +3,45 @@ 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 sirup
\item 50 ml maple syrup
\item 4 lemons
\item 1 l cold water
\item 400 g ice cubes
\end{compactitem}
\item Instructions:
\begin{compactenum}
\begin{enumerate}[label=\roman*]
\setcounter{enumi}{6}
\item boil and shred the berries
\item add maple sirup
\item add maple syrup
\item squeeze the lemons and add their juice
\item add the remaining ingredients
\item scramble thoroughly
\end{compactenum}
\end{enumerate}
\end{itemize}

View File

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

View File

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

View File

@ -1,9 +1,15 @@
% TODO:
\section{Adding enumerations}
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 a compact, unordered list
(\code{latex}{compactitem}) of ingredients and a compact, ordered list of
Within these, there shall be an unordered list of ingredients and an ordered list of
instructions, respectively.
\exercisematerial{exercises/lists/lists}
\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}

View File

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

@ -0,0 +1,12 @@
% 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,15 +1,3 @@
@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
@ -23,13 +11,13 @@
bibsource = {dblp computer science bibliography,
https://dblp.org}
}
@book{goossensmittelbach2002,
@book{goossensmittelbach2010,
author = {Michel Goossens and
Frank Mittelbach and
Alexander Samarin},
title = {Der LaTeX Begleiter},
publisher = {Addison-Wesley},
year = {2002},
year = {2010},
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,4 +1,3 @@
%\inputminted[breaklines]{bibtex}{exercises/literature/literature.done.bib}
\codeblock{bibtex}{./exercises/literature/literature.done.bib}
\codeblock{latex}{./exercises/literature/exercise-solution.tex}
\codeblock{latex}{./exercises/literature/literature.code.done.tex}

View File

@ -1,5 +1,6 @@
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).
% !TeX root = ../../main-exercises.tex
An introductory \LaTeX{} course can be found in \enquote{\LaTeX{} in 24 Hours} (Datta, 2017).
There is a plethora of further handbooks (e.\,g., Goossens, Mittelbach and Samarin, 2002).
~\\
@ -8,6 +9,4 @@ 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. 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
\noindent [Goossens u. a. 2010] Goossens, Michel ; Mittelbach, Frank ; Samarin, Alexander: Der LaTeX Begleiter. Addison-Wesley, 2010. ISBN 9783827370440

View File

@ -1,22 +1,19 @@
\section{Creating and inserting references}
\begin{enumerate}
\item Use Google Scholar to retrieve Bib\TeX{} entries for the following \LaTeX{}
\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{}
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 (2002): Der \LaTeX-Begleiter.
\item Frank Mittelbach / Michel Goossens (2010): Der \LaTeX-Begleiter.
\end{itemize}
\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 Add the Bib\TeX{} entries to the newly created Bib\TeX{} file.
\item Assign unique and meaningful Bib\TeX{} keys.
\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.
\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.
\end{enumerate}
\exercisematerial{exercises/literature/literature}
\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.

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}, \mathrm{odd}(x) \}$$
$$\{ x \mid x \in \mathds{N}, \text{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.tex}
\codeblock{latex}{./exercises/maths/math-formulas.code.done.tex}

View File

@ -1,2 +1,6 @@
% Replace this graphic by the corresponding formulas:
% !TeX root = ../../main-exercises.tex
Replace this graphic by the corresponding formulas:
\vspace{1cm} % some additional spacing before the image
\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}, \mathrm{odd}(x) \}$$
$$\{ x \mid x \in \mathds{N}, \text{odd}(x) \}$$
~ \\
\textbf{Elimination $\neg\exists x$}

View File

@ -1,4 +1,4 @@
Use \LaTeX{} math mode to typeset the following formulas.
Pay attention to the size of brackets.
\section{Typesetting mathematics}
\exercisematerial{exercises/maths/math-formulas}
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.

View File

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

View File

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

View File

@ -26,15 +26,4 @@ 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

@ -1,9 +0,0 @@
\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,49 +1,24 @@
\begin{enumerate}
\item
\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.}
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.})
\begin{figure}[H]
\codeblock{latex}{exercises/project-structure/main-with-preamble.done.tex}
\codeblock{latex}{exercises/project-structure/main.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 \textbf{Can the preamble also be excluded? If no, why? If yes, when
can outsourcing the preamble be useful?}
\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?
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
The preamble can also be outsourced. 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,13 +1,5 @@
\begin{enumerate}
\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? }
\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?
\end{enumerate}

View File

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

@ -1,17 +0,0 @@
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.tex}
\codeblock{latex}{./exercises/references/references.code.done.tex}

View File

@ -1,15 +1,14 @@
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.
% !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.
\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.
\codeblock{csharp}{exercises/references/HelloLateXFriends.cs}
\lstset{language=csharp}
\lstinputlisting{exercises/references/HelloLateXFriends.cs}

View File

@ -1,10 +1,11 @@
% 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 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.
introduce labels and captions for the elements that you want to reference.
Make sure to use suitable prefixes before the labels.
\exercisematerial{exercises/references/references}
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.

View File

@ -3,5 +3,6 @@
numbers=left, % line numbers
showstringspaces=false, % spaces in strings
keywordstyle=\color{blue}, % keyword color
basicstyle=\ttfamily\small % overall font and size
basicstyle=\ttfamily\small, % overall font and size
literate={ä}{{\"a}}1 {ß}{{\ss}}1 % special characters
]{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
gobble=4 % remove leading spaces
autogobble=true % remove leading spaces
]{java}{exercises/source-code-listings/Source.java}
\usemintedstyle{default}

View File

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

View File

@ -1,3 +1,5 @@
\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.
@ -7,13 +9,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 by using a suitable
option. (Hint: The documentation speaks of \code{latex}{gobble}.)
\item Delete the spaces at the beginning of the lines. (Hint: The documentation speaks of \code{latex}{autogobble}.)
\end{enumerate}
\section*{Listings tasks}
@ -28,8 +30,6 @@ 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

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

@ -1,7 +0,0 @@
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.tex}
\codeblock{latex}{./exercises/special-characters/special-characters.code.done.tex}

View File

@ -1,7 +1,9 @@
% !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 (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 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

@ -1,17 +1,13 @@
% breakanywhere doesn't seem to work.
\section{Insert special characters}
For this task, we are using the file \file{exercises/special-characters.tex}.
To be able to see your results here within the script,
compile the \file{main.tex} file.
To be able to see your results here within the exercise script,
compile the \file{main-exercises.tex} file.
This applies for the subsequent tasks, as well.
\begin{enumerate}
\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 spaces within abbreviations (e.\,g., i.\,a.) by thin spaces.
\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).
\emph{Studi-Karte} using the \code{latex}{\textbackslash enquote} command.
\end{enumerate}
\exercisematerial{exercises/special-characters/special-characters}

View File

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

View File

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

View File

@ -1,10 +1,8 @@
\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

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

@ -1,5 +0,0 @@
``\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.tex}
\codeblock{latex}{./exercises/text-markup/markup.code.done.tex}

View File

@ -1,3 +1,5 @@
% !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,9 +1,10 @@
\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}

View File

@ -5,10 +5,8 @@
\chapter*{First steps with \LaTeX}
\addcontentsline{toc}{section}{First steps with \LaTeX}
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.
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.
Please, make sure to install the \emph{compiler first} and the \emph{editor afterwards}\textit{.}
\section*{Compiler}
@ -26,9 +24,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.tex} in \TeX{}studio.
Open up the file \file{main-exercises.tex} in \TeX{}studio.
It can be found in our project directory.
By pressing \faForward, it is converted into a a file called \file{main.pdf}.
By pressing \includegraphics[width=.8em]{graphics/faForward.png}, it is converted into a a file called \file{main-exercises.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}.}

Binary file not shown.

BIN
graphics/cover-script.pdf Executable file

Binary file not shown.

Binary file not shown.

BIN
graphics/faForward.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

1
graphics/faForward.svg Normal file
View File

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

After

Width:  |  Height:  |  Size: 553 B

BIN
graphics/faWindows.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

1
graphics/faWindows.svg Normal file
View File

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

After

Width:  |  Height:  |  Size: 383 B

13
imprint.tex Normal file
View File

@ -0,0 +1,13 @@
\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}

1
install-verification/.gitignore vendored Normal file
View File

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

View File

@ -0,0 +1,67 @@
\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 lasagne noodles
\item lasagna 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 \mathrm{tiefe}(x) \geq 20 \right\rbrace
\left\lbrace x \mid \text{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=\footnotesize
basicstyle=\small
\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