Compare commits
101 Commits
2021-trans
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5e40be5da | ||
|
|
a4ad98c7c0 | ||
| f99adf1020 | |||
| ed33856b8f | |||
|
|
4737feb243 | ||
|
|
e73ae72880 | ||
|
|
124e178fd8 | ||
|
|
734854d234 | ||
|
|
28d7ed348c | ||
|
|
2d16ae0147 | ||
|
|
39035df668 | ||
|
|
f9b7569eb1 | ||
|
|
d5dd7f0dbd | ||
|
|
8586397afc | ||
|
|
68e5f9d4f0 | ||
|
|
1ea1c70aec | ||
|
|
eafef80230 | ||
| 89c2d46463 | |||
| 9594555c6b | |||
| 8984674b28 | |||
| a49f819d2e | |||
|
|
a50c4bf8fb | ||
|
|
3e3d168b79 | ||
|
|
9e827a19d6 | ||
|
|
4aa827cd20 | ||
|
|
1a39161dd4 | ||
|
|
d1458eca95 | ||
|
|
ce6d806495 | ||
|
|
e39f7eca69 | ||
| c0fb9341d9 | |||
| 08bd6674bc | |||
| ba3de5fc2d | |||
| ae59df6855 | |||
| 315a83fda9 | |||
| 479823d6e6 | |||
| 7fdac83f02 | |||
| 62fbaf1bf3 | |||
| 7ecc90b22d | |||
| b87f06f4d3 | |||
| 25273d056c | |||
| 1ca170d111 | |||
| 58df0cc4dc | |||
|
|
9a439157ae | ||
| 0b60aee8a8 | |||
| e0e694f900 | |||
| 8f9ef296fd | |||
| 8ea59e8656 | |||
| 4a9f04a652 | |||
| 4abe1f3ccb | |||
| fe7d63f9f3 | |||
| 1cc6d96ed3 | |||
| bb2db7a0dc | |||
| a029095b65 | |||
| b52d346a39 | |||
| 381d1845d0 | |||
| 63e7f42658 | |||
| 4187e79408 | |||
| 5c9b705960 | |||
| a78fe6e336 | |||
| f206d75505 | |||
| d9238159dd | |||
| 9a99c0aee9 | |||
| 5731eb3c45 | |||
| 3c699d5dd0 | |||
| e4e731f044 | |||
| 6dfd17dc46 | |||
| a074052ab7 | |||
| f3e18adcb4 | |||
| 9b9940af27 | |||
| 5a93acbeaa | |||
| 7338bb65e5 | |||
| cc0eef7ef6 | |||
| 8ff9cd19d2 | |||
| e9263d7efd | |||
| cf7a34585b | |||
| 5846df3590 | |||
| d08bb59517 | |||
| 50914a0953 | |||
| b5ad8b380b | |||
| 49ef46c24d | |||
| 402cc5275a | |||
| 3dd100ee3e | |||
| 68ea193e66 | |||
| 68b43dcc5a | |||
| d433b1611e | |||
| 3da04c663b | |||
| 47fd4ac4da | |||
| cae9575704 | |||
| 0581584181 | |||
| eb580eca60 | |||
| 0a9086eb92 | |||
| a26138023c | |||
| 4350ac3f0c | |||
| 5d4ae70397 | |||
| 7b4a4d1ef1 | |||
| e3a8c976f5 | |||
| e2663134a1 | |||
| 11981baa80 | |||
| f71ca7f887 | |||
| f3a4141776 | |||
| 918ea4d7e1 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -79,7 +79,7 @@ _minted*
|
|||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
|
|
||||||
main.pdf
|
main-*.pdf
|
||||||
listings-mode.tex
|
listings-mode.tex
|
||||||
exercise-mode.tex
|
exercise-mode.tex
|
||||||
public
|
public
|
||||||
|
|||||||
74
Makefile
74
Makefile
@ -10,7 +10,9 @@ clean:
|
|||||||
@echo Cleaning up temporary files.
|
@echo Cleaning up temporary files.
|
||||||
@rm -rf public/*
|
@rm -rf public/*
|
||||||
@rm -rf temp/*
|
@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)
|
# Compile listings (only needed when listings have changed)
|
||||||
listings: listings/**/*
|
listings: listings/**/*
|
||||||
@ -21,16 +23,15 @@ tasks: exercises/**/*
|
|||||||
./compile_tasks
|
./compile_tasks
|
||||||
|
|
||||||
# Compile a preview PDF containing all contents
|
# Compile a preview PDF containing all contents
|
||||||
preview: main.tex
|
preview: main-script.tex
|
||||||
echo "\newcommand\exercisemode{any}" > exercise-mode.tex
|
|
||||||
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
||||||
pdflatex -shell-escape main.tex
|
pdflatex -shell-escape main-script.tex
|
||||||
@echo
|
@echo
|
||||||
@echo
|
@echo
|
||||||
@echo Run \'make publication\' to generate PDF and ZIP file for publication.
|
@echo Run \'make publication\' to generate PDF and ZIP file for publication.
|
||||||
|
|
||||||
# Build all PDF and ZIP variants
|
# 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:
|
# Building blocks from here on:
|
||||||
@ -42,51 +43,60 @@ publication-dir:
|
|||||||
mkdir -p temp/
|
mkdir -p temp/
|
||||||
|
|
||||||
# Compile a printable PDF without exercises
|
# Compile a printable PDF without exercises
|
||||||
publication-pdf-without-exercises: clean publication-dir main.tex
|
publication-pdf-without-exercises: clean publication-dir main-script.tex
|
||||||
echo "\newcommand\exercisemode{none}" > exercise-mode.tex
|
|
||||||
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
||||||
pdflatex -shell-escape -jobname=script-only main.tex
|
pdflatex -shell-escape main-script.tex
|
||||||
pdflatex -shell-escape -jobname=script-only main.tex
|
pdflatex -shell-escape main-script.tex
|
||||||
pdflatex -shell-escape -jobname=script-only main.tex
|
pdflatex -shell-escape main-script.tex
|
||||||
mv script-only.pdf public/
|
mv main-script.pdf public/
|
||||||
|
|
||||||
# Compile a printable PDF with exercises and without solutions
|
# Compile a printable PDF with exercises and without solutions
|
||||||
publication-pdf-with-exercises: clean publication-dir main.tex
|
publication-pdf-with-exercises: clean publication-dir main-exercises.tex
|
||||||
echo "\newcommand\exercisemode{exercises}" > exercise-mode.tex
|
|
||||||
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
||||||
pdflatex -shell-escape -jobname=script-with-exercises main.tex
|
pdflatex -shell-escape main-exercises.tex
|
||||||
pdflatex -shell-escape -jobname=script-with-exercises main.tex
|
pdflatex -shell-escape main-exercises.tex
|
||||||
pdflatex -shell-escape -jobname=script-with-exercises main.tex
|
pdflatex -shell-escape main-exercises.tex
|
||||||
mv script-with-exercises.pdf public/
|
mv main-exercises.pdf public/
|
||||||
|
|
||||||
# Compile a printable PDF with exercises and solutions
|
# Compile a printable PDF with solutions
|
||||||
publication-pdf-with-solutions: clean publication-dir main.tex
|
publication-pdf-with-solutions: clean publication-dir main-solutions.tex
|
||||||
echo "\newcommand\exercisemode{solutions}" > exercise-mode.tex
|
|
||||||
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
echo "\newcommand\listingsmode{minted}" > listings-mode.tex
|
||||||
pdflatex -shell-escape -jobname=script-with-solutions main.tex
|
pdflatex -shell-escape main-solutions.tex
|
||||||
pdflatex -shell-escape -jobname=script-with-solutions main.tex
|
pdflatex -shell-escape main-solutions.tex
|
||||||
pdflatex -shell-escape -jobname=script-with-solutions main.tex
|
pdflatex -shell-escape main-solutions.tex
|
||||||
mv script-with-solutions.pdf public/
|
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
|
# Build a ZIP file with tasks and without solutions
|
||||||
publication-zip-with-exercises: clean publication-dir main.tex
|
publication-zip-with-exercises: clean publication-dir
|
||||||
rm -rf temp/*
|
rm -rf temp/* exercises/**/_*
|
||||||
cp --parents main.tex praeamble.tex commands.tex setup.tex content/* graphics/* listings/**/*.{tex,pdf,bib,java,txt} temp/
|
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/
|
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/**/*.rend.tex
|
||||||
|
rm -f temp/exercises/**/*.aux
|
||||||
find temp/ -name '*.raw.*' -exec bash -c 'sed "s/\.raw\./\./g" <<<{} | xargs mv {}' \;
|
find temp/ -name '*.raw.*' -exec bash -c 'sed "s/\.raw\./\./g" <<<{} | xargs mv {}' \;
|
||||||
find temp/ -name '*.tex' -exec sed -i -e 's/\.raw\./\./g' {} \;
|
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 * **/* **/**/*
|
cd temp && zip ../public/project-with-exercises * **/* **/**/*
|
||||||
|
|
||||||
# Build a ZIP file with tasks and solutions
|
# Build a ZIP file with tasks and solutions
|
||||||
publication-zip-with-solutions: clean publication-dir main.tex
|
publication-zip-with-solutions: clean publication-dir
|
||||||
rm -rf temp/*
|
rm -rf temp/* exercises/**/_*
|
||||||
cp --parents main.tex praeamble.tex commands.tex setup.tex content/* graphics/* listings/**/*.{tex,pdf,bib,java,txt} temp/
|
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/
|
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 '*.done.*' -exec bash -c 'sed "s/\.done\./\./g" <<<{} | xargs mv {}' \;
|
||||||
find temp/ -name '*.tex' -exec sed -i -e 's/(raw|done)//g' {} \;
|
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 * **/* **/**/*
|
cd temp && zip ../public/project-with-solutions * **/* **/**/*
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
68
README.md
68
README.md
@ -1,6 +1,6 @@
|
|||||||
# LaTeX Script by Fachschaft WIAI
|
# 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
|
* general introduction to the LaTeX system
|
||||||
* basic document structure
|
* basic document structure
|
||||||
@ -10,45 +10,54 @@ This script introduces the most fundamental LaTeX mechanisms to get learners sta
|
|||||||
* formatting paragraphs
|
* formatting paragraphs
|
||||||
* lists
|
* lists
|
||||||
* maths and formulas
|
* maths and formulas
|
||||||
* source code listings (`minted` + `listings`)
|
|
||||||
* graphics
|
* graphics
|
||||||
* tables
|
* tables
|
||||||
* footnotes
|
* footnotes
|
||||||
* references
|
* references
|
||||||
* literature management
|
* 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
|
## Getting started
|
||||||
|
|
||||||
### For beginners
|
### 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.
|
**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
|
### 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
|
```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:
|
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
|
```sh
|
||||||
$ pdflatex main.tex
|
$ pdflatex main-script.tex
|
||||||
$ bibtex main.aux
|
$ bibtex main-script.aux
|
||||||
$ pdflatex main.tex
|
$ pdflatex main-script.tex
|
||||||
$ pdflatex main.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
|
```sh
|
||||||
$ pdflatex --shell-escape main.tex
|
$ pdflatex --shell-escape main.tex
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Read more about the potentially dangerous implications of this flag in the script.
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -60,32 +69,54 @@ latex-script/
|
|||||||
│ ├── basic-document-structure.tex
|
│ ├── basic-document-structure.tex
|
||||||
│ ├── basic-functionality.tex
|
│ ├── basic-functionality.tex
|
||||||
│ └── …
|
│ └── …
|
||||||
|
├── docs
|
||||||
|
│ ├── vs-code-instructions.md
|
||||||
|
│ ├── faq.md
|
||||||
|
│ └── …
|
||||||
├── exercises
|
├── exercises
|
||||||
│ ├── basic-document-structure
|
│ ├── basic-document-structure
|
||||||
│ ├── footnotes
|
│ ├── footnotes
|
||||||
│ └── …
|
│ └── …
|
||||||
|
├── first-steps-with-latex.tex
|
||||||
├── graphics
|
├── graphics
|
||||||
│ ├── benzene-ring.pdf
|
│ ├── benzene-ring.pdf
|
||||||
│ ├── cc-by-sa.png
|
│ ├── cc-by-sa.png
|
||||||
│ └── …
|
│ └── …
|
||||||
|
├── imprint.tex
|
||||||
|
├── LICENSE
|
||||||
├── listings
|
├── listings
|
||||||
│ ├── basic-document-structure
|
│ ├── basic-document-structure
|
||||||
│ ├── formatting-paragraphs
|
│ ├── formatting-paragraphs
|
||||||
│ └── …
|
│ └── …
|
||||||
├── main.tex
|
├── main-exercises.tex
|
||||||
|
├── main-script.tex
|
||||||
|
├── main-solutions.tex
|
||||||
├── Makefile
|
├── Makefile
|
||||||
├── praeamble.tex
|
├── praeamble.tex
|
||||||
├── public
|
├── public
|
||||||
├── setup.tex
|
├── setup.tex
|
||||||
└── README.md
|
├── README.md
|
||||||
|
├── titlepage-exercises.tex
|
||||||
|
├── titlepage-solutions.tex
|
||||||
|
└── titlepage.tex
|
||||||
```
|
```
|
||||||
|
|
||||||
## Relevant files for learners
|
## 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
|
## 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:
|
These are the main contributors so far:
|
||||||
* Evelyn Fradtschuk
|
* Evelyn Fradtschuk
|
||||||
|
* Jessica Klarmann
|
||||||
* Florian Knoch
|
* Florian Knoch
|
||||||
|
* Theresa Knoll
|
||||||
* Christian Kremitzl
|
* Christian Kremitzl
|
||||||
* Bernhard Luedtke
|
* Bernhard Luedtke
|
||||||
|
* Jochen Mehlich
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
74
commands.tex
74
commands.tex
@ -86,12 +86,12 @@
|
|||||||
% ===========
|
% ===========
|
||||||
% Code snippets with syntax highlighting.
|
% Code snippets with syntax highlighting.
|
||||||
% TODO: Fix special character mess.
|
% TODO: Fix special character mess.
|
||||||
|
% Caution: Must not be used inside `\textbf{}'
|
||||||
%
|
%
|
||||||
% Arguments:
|
% Arguments:
|
||||||
% 1. Language.
|
% 1. Language.
|
||||||
% 2. Source code.
|
% 2. Source code.
|
||||||
\newcommand\code[2]{%
|
\newcommand\code[2]{%
|
||||||
% \mintinline{#1}{#2}
|
|
||||||
\texttt{#2}%
|
\texttt{#2}%
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +128,7 @@
|
|||||||
\ifthenelse{\equal{#1}{latex}}{%
|
\ifthenelse{\equal{#1}{latex}}{%
|
||||||
|
|
||||||
\lstset{language=#1,
|
\lstset{language=#1,
|
||||||
basicstyle=\footnotesize\ttfamily,
|
basicstyle=\small\ttfamily,
|
||||||
breaklines=true,
|
breaklines=true,
|
||||||
keywordstyle=\color{ForestGreen}\bfseries,
|
keywordstyle=\color{ForestGreen}\bfseries,
|
||||||
emph={%
|
emph={%
|
||||||
@ -146,7 +146,7 @@
|
|||||||
{Ö}{{\"O}}1
|
{Ö}{{\"O}}1
|
||||||
{Ä}{{\"A}}1
|
{Ä}{{\"A}}1
|
||||||
{Ü}{{\"U}}1
|
{Ü}{{\"U}}1
|
||||||
{ß}{{\ss}}2
|
{ß}{{\ss}}1
|
||||||
{ü}{{\"u}}1
|
{ü}{{\"u}}1
|
||||||
{ä}{{\"a}}1
|
{ä}{{\"a}}1
|
||||||
{ö}{{\"o}}1
|
{ö}{{\"o}}1
|
||||||
@ -163,7 +163,7 @@
|
|||||||
{Ö}{{\"O}}1
|
{Ö}{{\"O}}1
|
||||||
{Ä}{{\"A}}1
|
{Ä}{{\"A}}1
|
||||||
{Ü}{{\"U}}1
|
{Ü}{{\"U}}1
|
||||||
{ß}{{\ss}}2
|
{ß}{{\ss}}1
|
||||||
{ü}{{\"u}}1
|
{ü}{{\"u}}1
|
||||||
{ä}{{\"a}}1
|
{ä}{{\"a}}1
|
||||||
{ö}{{\"o}}1
|
{ö}{{\"o}}1
|
||||||
@ -241,69 +241,3 @@
|
|||||||
\end{figure}
|
\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}
|
|
||||||
}{}
|
|
||||||
}{}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
\chapter{Footnotes}
|
\chapter{References and footnotes}
|
||||||
\label{sec:footnotes}
|
\section{Footnotes}\label{sec:footnotes}
|
||||||
|
|
||||||
|
|
||||||
Whenever we want to include footnotes into our \LaTeX{} document, we can use
|
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
|
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.
|
\item \code{latex}{\textbackslash usepackage[symbol]\{footmisc\}} causes a numbering with symbols (e.\,g., \textdagger, \textdaggerdbl) instead of numbers.
|
||||||
\end{itemize}
|
\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}
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
|
||||||
|
|
||||||
@ -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}
|
\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}
|
\section{Positioning}
|
||||||
\label{sec:graphics-placement}
|
\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.
|
One interesting aspect of the what-you-get-is-what-you-mean paradigm is the way how graphics can be positioned.
|
||||||
|
|||||||
@ -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}
|
\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.
|
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}.
|
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.
|
We can customize bullet and list numbering styles via the \pkg{enumitem}\footnote{\url{https://www.ctan.org/pkg/enumitem}} package.
|
||||||
|
|||||||
@ -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.
|
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
|
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}.}.
|
\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 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.
|
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}).
|
\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.
|
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}
|
\begin{tabular}{ll}
|
||||||
\toprule
|
\toprule
|
||||||
Function & Command \\ \midrule
|
Function & Command \\ \midrule
|
||||||
|
Citing authors & \code{latex}{\textbackslash citeauthor\{<source>\}} \\
|
||||||
Citing sources & \code{latex}{\textbackslash cite\{<source>\}} \\
|
Citing sources & \code{latex}{\textbackslash cite\{<source>\}} \\
|
||||||
Citing pages & \code{latex}{\textbackslash cite[p. 15]\{<source>\}} \\
|
Citing pages & \code{latex}{\textbackslash cite[p. 15]\{<source>\}} \\
|
||||||
Custom citations & \code{latex}{\textbackslash cite[<prefix>][<suffix>]\{<source>\}} \\
|
Custom citations & \code{latex}{\textbackslash cite[<prefix>][<suffix>]\{<source>\}} \\
|
||||||
|
|||||||
@ -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.
|
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.
|
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}
|
\example{lst:set-builder-notation}{maths/set-builder-notation}{Problems arising from intensional set notation and their solution}
|
||||||
|
|||||||
@ -1,26 +1,25 @@
|
|||||||
\chapter{Project structure}
|
\chapter{Project structure}
|
||||||
\label{sec: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 the previous chapters, we have only seen very short \LaTeX{} examples.
|
||||||
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.
|
\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}
|
\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{}}
|
\example{lst:main-file}{project-structure/main-file}{Typical structure in a main file \LaTeX{}}
|
||||||
|
|
||||||
\section{Section files}
|
\section{Partial 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.
|
Partial files are files that are included within another file, most often the main file.
|
||||||
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.
|
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.
|
||||||
\section{Input or include?}
|
The files that are included by the main file do not contain a preamble, since this is already present in the main file.
|
||||||
\label{sec:input-vs-include}
|
Neither do the commands \code{latex}{\textbackslash begin\{document\}} and \code{latex}{\textbackslash end\{document\}} appear again.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|||||||
@ -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}
|
|
||||||
@ -28,5 +28,5 @@ Its renderings are of rather peculiar appearance.
|
|||||||
With some amount of configuration, we can overcome the most disturbing default settings.
|
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}}
|
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.
|
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} commands.
|
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.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
\subsection{Installation}
|
\subsection{Installation}
|
||||||
Using \pkg{minted} requires a working installation of the programming language Python 3 (henceforth referred to as Python).
|
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/}.}.
|
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
|
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.
|
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:
|
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.
|
\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.
|
It is stated next to the Pdf\LaTeX{} label.
|
||||||
|
|||||||
@ -28,11 +28,11 @@ as shown in \cref{tbl:bars}.
|
|||||||
|
|
||||||
\begin{longtable}{@{}llp{7.8cm}@{}}
|
\begin{longtable}{@{}llp{7.8cm}@{}}
|
||||||
\toprule
|
\toprule
|
||||||
Code & Character & Usage \\
|
Code & Character & Usage \\
|
||||||
\midrule
|
\midrule
|
||||||
\code{latex}{-} & Hyphen & a small-sized stroke \\
|
\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}{-{}-} & 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}{-{}-{}-} & Em dash & an interrupter at sentence level\,---\,mostly used in American English and without or with thin spaces \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\caption{Hyphens and dashes in \LaTeX}
|
\caption{Hyphens and dashes in \LaTeX}
|
||||||
\label{tbl:bars}
|
\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 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.}
|
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
|
\toprule
|
||||||
Code & Explanation \\
|
Code & Explanation & English example & German example \\
|
||||||
\midrule
|
\midrule
|
||||||
\endhead
|
\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}{\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. \\
|
\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). \\
|
\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. \\
|
\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. \\
|
\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}{"~} & Non-wrapping hyphen: Keeps the hyphen together with the following word, very useful in German: \foreignlanguage{ngerman}{\emph{Vorlesungszeit und "~raum}} \\
|
\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
|
\bottomrule
|
||||||
\caption{Exceptions for hyphenation}
|
\caption{Exceptions for hyphenation}
|
||||||
\label{tbl:separators}
|
\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}
|
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
|
||||||
& Code & Result & Code & Result \\
|
& Code & Result & Code & Result \\
|
||||||
\midrule
|
\midrule
|
||||||
English (\acro{A.\,E.}) & \code{latex}{``...''} & ``…'' & \code{latex}{`...'} & `…' \\
|
English (\acro{A.\,E.}) & \code{latex}{``…''} & ``…'' & \code{latex}{`…'} & `…' \\
|
||||||
English (\acro{B.\,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 & \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 \\
|
German (alternatively) & \code{latex}{\frqq…\flqq} & \frqq…\flqq & \code{latex}{\frq…\flq} & \frq…\flq \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\caption{Quotation marks}
|
\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} & \\
|
\textless/\textgreater & \code{latex}{\textbackslash textless/\textbackslash textgreater} & \\
|
||||||
\textperthousand & \code{latex}{\textbackslash textperthousand} & \\
|
\textperthousand & \code{latex}{\textbackslash textperthousand} & \\
|
||||||
\textsection & \code{latex}{\textbackslash textsection} & \\
|
\textsection & \code{latex}{\textbackslash textsection} & \\
|
||||||
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths environments \\
|
$\delta, \pi, \Sigma$ & \verb|\delta, \pi, \Sigma|, … & only in maths
|
||||||
\euro & \code{latex}{\textbackslash euro} & requires the \pkg{eurosym} package \\
|
environments \\
|
||||||
\textteshlig & \code{latex}{\textbackslash textteshlig} & requires the \pkg{tipa} package \\
|
\textteshlig & \code{latex}{\textbackslash textteshlig} & requires the \pkg{tipa} package \\
|
||||||
\textmusicalnote & \code{latex}{\textbackslash textmusicalnote} & requires the \pkg{textcomp} package \\
|
\textmusicalnote & \code{latex}{\textbackslash textmusicalnote} & requires the \pkg{textcomp} package \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
\chapter{Text markup}
|
\chapter{Text markup}
|
||||||
|
|
||||||
|
\section*{Text highlighting}
|
||||||
|
|
||||||
Text markup can be done in two ways: semantically or visually.
|
Text markup can be done in two ways: semantically or visually.
|
||||||
We recommend that you use semantic markup whenever possible.
|
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.
|
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}
|
\label{tbl:type-sizes}
|
||||||
\end{table}
|
\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.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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}
|
|
||||||
24
docs/cocalc-instructions.md
Normal file
24
docs/cocalc-instructions.md
Normal 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
66
docs/faq.md
Normal 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. 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)
|
||||||
|
|
||||||
|
|
||||||
94
docs/vs-code-instructions.md
Normal file
94
docs/vs-code-instructions.md
Normal 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.
|
||||||
|
|
||||||
@ -1,11 +1,38 @@
|
|||||||
% \documentclass{scrartcl}
|
% twocolumn parameter adds second column
|
||||||
% \usepackage[utf8]{inputenc}
|
\documentclass[twocolumn]{article}
|
||||||
% \usepackage[T1]{fontenc}
|
\usepackage[utf8]{inputenc}
|
||||||
% \usepackage[english]{babel}
|
\usepackage[T1]{fontenc}
|
||||||
% \usepackage[hidelinks]{hyperref}
|
\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}
|
\begin{document}
|
||||||
% \tableofcontents
|
|
||||||
|
% 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}
|
\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.
|
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!
|
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!
|
Coming soon!
|
||||||
|
|
||||||
\section{Breakfast}
|
% asterisk (*) hides the section title in the table of contents
|
||||||
|
\section*{Breakfast}
|
||||||
|
|
||||||
\subsubsection{Buckwheat Overnight Oats}
|
\subsubsection{Buckwheat Overnight Oats}
|
||||||
Coming soon!
|
Coming soon!
|
||||||
|
|
||||||
% \end{document}
|
\end{document}
|
||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/basic-document-structure/document-structure.code.tex}
|
\codeblock{latex}{./exercises/basic-document-structure/document-structure.code.done.tex}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
\documentclass{scrartcl}
|
\documentclass{article}
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage[english]{babel}
|
\usepackage[english]{babel}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
|
\section{Structure your document and text}
|
||||||
|
|
||||||
\begin{enumerate}
|
\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}
|
\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{}
|
\item Congratulations! You have created and compiled your first \LaTeX{}
|
||||||
document. Maybe you have noticed that paragraphs within the text were
|
document. Maybe you have noticed that paragraphs within the text were
|
||||||
created by using \code{latex}{\textbackslash\textbackslash}. Replace the
|
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{}
|
\item It is time to structure your first document. Use the \LaTeX{}
|
||||||
commands \code{latex}{\textbackslash section},
|
commands \code{latex}{\textbackslash section},
|
||||||
\code{latex}{\textbackslash subsection}, etc. to structure the text.
|
\code{latex}{\textbackslash subsection}, etc. to structure the text.
|
||||||
Also,
|
Also, include a table of contents for your document.
|
||||||
include
|
|
||||||
a table of contents for your document.
|
|
||||||
\item Afterwards, comment out the preamble, the document environment, and the table of contents.
|
|
||||||
\end{enumerate}
|
\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}
|
||||||
4
exercises/footnotes/footnotes.code.done.tex
Normal file
4
exercises/footnotes/footnotes.code.done.tex
Normal 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.
|
||||||
@ -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.
|
|
||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/footnotes/footnotes.code.tex}
|
\codeblock{latex}{./exercises/footnotes/footnotes.code.done.tex}
|
||||||
|
|||||||
@ -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.
|
||||||
@ -1,10 +1,6 @@
|
|||||||
Make the text \enquote{March 2021} of the file
|
\section{Footnotes and references}
|
||||||
\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.
|
|
||||||
|
|
||||||
\todo{Sollten wir dieses Beispiel aus Faulheitsgründen vielleicht ersetzen?}
|
\subsection{Inserting footnotes}
|
||||||
|
|
||||||
\texttt{https://www.oracle.com/java/technologies/javase-downloads.html}
|
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/}
|
||||||
\exercisematerial{exercises/footnotes/footnotes}
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/graphics/graphics.code.tex}
|
\codeblock{latex}{./exercises/graphics/graphics.code.done.tex}
|
||||||
|
|||||||
@ -1 +1,3 @@
|
|||||||
|
% !TeX root = ../../main-exercises.tex
|
||||||
|
|
||||||
Please insert the image here.
|
Please insert the image here.
|
||||||
@ -1,9 +1,8 @@
|
|||||||
|
\section{Inserting graphics}
|
||||||
|
|
||||||
In the \file{exercises/graphics} directory you can find an image file
|
In the \file{exercises/graphics} directory you can find an image file
|
||||||
\file{latex-logo.png}. Insert the image into the
|
\file{latex-logo.png}. Insert the image into the
|
||||||
\file{exercises/graphics/graphics.tex} file. Make sure that the image is placed
|
\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
|
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
|
centered, and a caption shall be added. Adapt the image width to the text width
|
||||||
(\code{latex}{\textbackslash textwidth}).
|
(\code{latex}{\textbackslash textwidth}). On top of that, add a caption to the image.
|
||||||
|
|
||||||
|
|
||||||
\exercisematerial{exercises/graphics/graphics}
|
|
||||||
|
|||||||
@ -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
|
\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}
|
\begin{itemize}
|
||||||
\item Ingredients:
|
\item Ingredients:
|
||||||
\begin{compactitem}
|
\begin{compactitem}
|
||||||
\item 400 g berries
|
\item 400 g berries
|
||||||
\item 50 ml maple sirup
|
\item 50 ml maple syrup
|
||||||
\item 4 lemons
|
\item 4 lemons
|
||||||
\item 1 l cold water
|
\item 1 l cold water
|
||||||
\item 400 g ice cubes
|
\item 400 g ice cubes
|
||||||
\end{compactitem}
|
\end{compactitem}
|
||||||
|
|
||||||
\item Instructions:
|
\item Instructions:
|
||||||
\begin{compactenum}
|
\begin{enumerate}[label=\roman*]
|
||||||
|
\setcounter{enumi}{6}
|
||||||
\item boil and shred the berries
|
\item boil and shred the berries
|
||||||
\item add maple sirup
|
\item add maple syrup
|
||||||
\item squeeze the lemons and add their juice
|
\item squeeze the lemons and add their juice
|
||||||
\item add the remaining ingredients
|
\item add the remaining ingredients
|
||||||
\item scramble thoroughly
|
\item scramble thoroughly
|
||||||
\end{compactenum}
|
\end{enumerate}
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/lists/lists.code.tex}
|
\codeblock{latex}{./exercises/lists/lists.code.done.tex}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
Ingredients:
|
% !TeX root = ../../main-exercises.tex
|
||||||
400~g berries, 50~ml maple sirup, 4~lemons, 1~l cold water, 400~g ice cubes
|
|
||||||
|
|
||||||
\noindent Instructions: Boil and shred the berries, add maple 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
|
||||||
|
|||||||
@ -1,9 +1,15 @@
|
|||||||
% TODO:
|
\section{Adding enumerations}
|
||||||
|
|
||||||
Format the recipe you can find in \file{exercises/lists/lists.tex} as an
|
Format the recipe you can find in \file{exercises/lists/lists.tex} as an
|
||||||
unordered list (\code{latex}{itemize}) with sub-lists \emph{Ingredients}
|
unordered list (\code{latex}{itemize}) with sub-lists \emph{Ingredients}
|
||||||
and \emph{Instructions}.
|
and \emph{Instructions}.
|
||||||
Within these, there shall be a compact, unordered list
|
Within these, there shall be an unordered list of ingredients and an ordered list of
|
||||||
(\code{latex}{compactitem}) of ingredients and a compact, ordered list of
|
|
||||||
instructions, respectively.
|
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}
|
||||||
@ -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}
|
|
||||||
12
exercises/literature/literature.code.done.tex
Normal file
12
exercises/literature/literature.code.done.tex
Normal 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
|
||||||
@ -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,
|
@book{datta2017,
|
||||||
author = {Dilip Datta},
|
author = {Dilip Datta},
|
||||||
title = {LaTeX in 24 Hours - {A} Practical Guide for
|
title = {LaTeX in 24 Hours - {A} Practical Guide for
|
||||||
@ -23,13 +11,13 @@
|
|||||||
bibsource = {dblp computer science bibliography,
|
bibsource = {dblp computer science bibliography,
|
||||||
https://dblp.org}
|
https://dblp.org}
|
||||||
}
|
}
|
||||||
@book{goossensmittelbach2002,
|
@book{goossensmittelbach2010,
|
||||||
author = {Michel Goossens and
|
author = {Michel Goossens and
|
||||||
Frank Mittelbach and
|
Frank Mittelbach and
|
||||||
Alexander Samarin},
|
Alexander Samarin},
|
||||||
title = {Der LaTeX Begleiter},
|
title = {Der LaTeX Begleiter},
|
||||||
publisher = {Addison-Wesley},
|
publisher = {Addison-Wesley},
|
||||||
year = {2002},
|
year = {2010},
|
||||||
isbn = {978-3-8273-7044-0},
|
isbn = {978-3-8273-7044-0},
|
||||||
timestamp = {Fri, 15 Apr 2011 13:37:33 +0200},
|
timestamp = {Fri, 15 Apr 2011 13:37:33 +0200},
|
||||||
biburl = {https://dblp.org/rec/books/daglib/0011922.bib},
|
biburl = {https://dblp.org/rec/books/daglib/0011922.bib},
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
%\inputminted[breaklines]{bibtex}{exercises/literature/literature.done.bib}
|
|
||||||
\codeblock{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}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
The first-mentioned book (Lamport, 1994) has been written by the creator of \LaTeX{}, Leslie Lamport himself.
|
% !TeX root = ../../main-exercises.tex
|
||||||
A more recent publication is \enquote{\LaTeX\ in 24 Hours} (Datta, 2017).
|
|
||||||
|
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).
|
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 978–3–319–47830–2
|
\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 978–3–319–47830–2
|
||||||
|
|
||||||
\noindent [Goossens u. a. 2002] Goossens, Michel ; Mittelbach, Frank ; Samarin, Alexander: Der LaTeX Begleiter. Addison-Wesley, 2002. – ISBN 978–3–8273–7044–0
|
\noindent [Goossens u. a. 2010] Goossens, Michel ; Mittelbach, Frank ; Samarin, Alexander: Der LaTeX Begleiter. Addison-Wesley, 2010. – ISBN 978–3–8273–7044–0
|
||||||
|
|
||||||
\noindent [Lamport 1994] Lamport, Leslie: LaTeX - A Document Preparation System: User’s Guide and Reference Manual, Second Edition. Pearson / Prentice Hall, 1994. – ISBN 978–0–201–52983–8
|
|
||||||
|
|||||||
@ -1,22 +1,19 @@
|
|||||||
|
\section{Creating and inserting references}
|
||||||
|
|
||||||
\begin{enumerate}
|
\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:
|
handbooks:
|
||||||
\begin{itemize}
|
\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 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}
|
\end{itemize}
|
||||||
\item Compare the entries with the results that \url{dblp.org} finds for the same titles.
|
\item Add the Bib\TeX{} entries to the newly created Bib\TeX{} file.
|
||||||
\item Create a new Bib\TeX{} file called \file{literature.bib} in the
|
|
||||||
\file{exercises/literature} folder.
|
|
||||||
\item Add the Bib\TeX{} entries to the newly created Bib\TeX{} files. For this, select your preferred source among Google Scholar and dblp.
|
|
||||||
\item Assign unique and meaningful Bib\TeX{} keys.
|
\item 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 Add the bibliography file to the project's preamble.
|
||||||
\item Cite the three handbooks in the
|
\item Make use of the \mono{alpha} bibliography style.
|
||||||
file\\\file{exercises/literature/literature.tex}.
|
\item Cite the two handbooks in the file\\\file{exercises/literature/literature.tex}.
|
||||||
\item Make use of the \mono{natdin} biliography style.
|
\item Ensure that the bibliography is listed.
|
||||||
\item \textbf{Note}: If compiling fails, it may help to remove all auxiliary
|
|
||||||
files \\(\mono{main.aux/bbl/blg/loc/out/pdf/soc/toc}) before compiling again.
|
|
||||||
\end{enumerate}
|
\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.
|
||||||
@ -16,7 +16,7 @@ $$x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
|
|||||||
$$n! = \prod_{i=1}^{n} i$$
|
$$n! = \prod_{i=1}^{n} i$$
|
||||||
|
|
||||||
% Set of all odd natural numbers
|
% 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$
|
% Elimination $\neg\exists x$
|
||||||
$$\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$$
|
$$\neg\exists x . p(x) \Leftrightarrow \forall x . \neg p(x)$$
|
||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/maths/math-formulas.code.tex}
|
\codeblock{latex}{./exercises/maths/math-formulas.code.done.tex}
|
||||||
@ -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}
|
\includegraphics{graphics/math-formulas.rend-crop.pdf}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ $$n! = \prod_{i=1}^{n} i$$ \\
|
|||||||
~ \\
|
~ \\
|
||||||
|
|
||||||
\textbf{Set of all odd natural numbers}
|
\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$}
|
\textbf{Elimination $\neg\exists x$}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Use \LaTeX{} math mode to typeset the following formulas.
|
\section{Typesetting mathematics}
|
||||||
Pay attention to the size of brackets.
|
|
||||||
|
|
||||||
\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.
|
||||||
@ -9,8 +9,9 @@
|
|||||||
\maketitle
|
\maketitle
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
||||||
\include{section1}
|
\newpage
|
||||||
\include{section2}
|
\input{section1}
|
||||||
\include{section3}
|
\newpage
|
||||||
|
\input{section2}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
@ -4,8 +4,9 @@
|
|||||||
\maketitle
|
\maketitle
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
||||||
\include{section1.done}
|
\newpage
|
||||||
\include{section2.done}
|
\input{section1.done}
|
||||||
\include{section3.done}
|
\newpage
|
||||||
|
\input{section2.done}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
@ -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.
|
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}
|
\end{document}
|
||||||
|
|||||||
@ -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.
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
|
\section{A structured project}
|
||||||
|
|
||||||
Within the directory \file{exercises/project-structure} you can find the file
|
Within the directory \file{exercises/project-structure} you can find the file
|
||||||
\file{main.tex}.
|
\file{main.tex}.
|
||||||
|
|
||||||
\exercisematerial{exercises/project-structure/tasks}
|
|
||||||
|
|||||||
@ -1,49 +1,24 @@
|
|||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item
|
\item
|
||||||
\textbf{Put the sections of the file into separate files, named
|
Put the sections of the file into separate files, named
|
||||||
\file{section1.tex}, \file{section2.tex}, and \file{section3.tex}. Include
|
\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.})
|
||||||
them using the \code{latex}{\textbackslash include} command.}
|
|
||||||
|
|
||||||
\begin{figure}[H]
|
\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}}
|
\caption{\file{main.tex}}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
\begin{figure}[H]
|
\begin{figure}[H]
|
||||||
\codeblock{latex}{exercises/project-structure/section1.done.tex}
|
\codeblock{latex}{exercises/project-structure/section1.done.tex}
|
||||||
\caption{\file{section1.tex} (analogous for the other
|
\caption{\file{section1.tex} (analogous for the other
|
||||||
sections)}
|
sections)}
|
||||||
\end{figure}
|
\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
|
\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?
|
||||||
can outsourcing the preamble be useful?}
|
|
||||||
|
|
||||||
The preamble can also be outsourced, like in task 1. In real-world
|
The preamble can also be outsourced. In real-world \LaTeX{} projects, we often make use of numerous packages that need to be
|
||||||
\LaTeX{} projects we often make use of numerous packages that need to be
|
|
||||||
configured by additional commands within the preamble. Therefore, it is
|
configured by additional commands within the preamble. Therefore, it is
|
||||||
advisable to outsource the preamble. On top of that, this is useful
|
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
|
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.
|
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}
|
\end{enumerate}
|
||||||
@ -1,13 +1,5 @@
|
|||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item \textbf{Put the sections of the file into separate files, named
|
\item Put the sections of the file into separate files, named \file{section1.tex} and \file{section2.tex}.
|
||||||
\texttt{section1.tex}, \texttt{section2.tex}, and \texttt{section3.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.})
|
||||||
Include them using the \code{\textbackslash include} command.}
|
\item Can the preamble also live in its own file? Find out by moving it analogously to the sections. If no, why? If yes, why can outsourcing the preamble be useful?
|
||||||
\item \textbf{Which command becomes superfluous when you use
|
|
||||||
\code{\textbackslash include}}
|
|
||||||
\item \textbf{Can the preamble also be excluded? If no, why? If yes, why can
|
|
||||||
outsourcing the preamble be useful?}
|
|
||||||
\item \textbf{Add the command \code{\textbackslash includeonly\{section2\}} to
|
|
||||||
the
|
|
||||||
preamble. Compile the document again, and check what has changed. What does
|
|
||||||
the command do and why can it be helpful in a larger project? }
|
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|||||||
14
exercises/references/references.code.done.tex
Normal file
14
exercises/references/references.code.done.tex
Normal 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}
|
||||||
@ -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}
|
|
||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/references/references.code.tex}
|
\codeblock{latex}{./exercises/references/references.code.done.tex}
|
||||||
@ -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]
|
\begin{figure}[H]
|
||||||
\caption{The logo of C\#}
|
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=2cm]{exercises/references/csharp.png}
|
\includegraphics[width=2cm]{exercises/references/csharp.png}
|
||||||
|
\caption{The logo of C\#}
|
||||||
\end{figure}
|
\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.
|
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}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
|
% same chapter as footnotes
|
||||||
|
\subsection{Inserting references}
|
||||||
|
|
||||||
In file \file{exercises/references/references.tex}, replace \enquote{in the
|
In file \file{exercises/references/references.tex}, replace \enquote{in the
|
||||||
figure} and \enquote{the following source code listing} with suited references.
|
figure} and \enquote{the following source code listing} with suited references.
|
||||||
Use the command \code{latex}{\textbackslash cref}. Do not forget to first
|
Use the command \code{latex}{\textbackslash cref}. Do not forget to first
|
||||||
introduce
|
introduce labels and captions for the elements that you want to reference.
|
||||||
labels for the elements that you want to reference. To do so, first of all,
|
|
||||||
wrap the source code listing in a \code{latex}{listing} environment. Also
|
|
||||||
insert a caption for the source code listing.
|
|
||||||
Make sure to use suitable prefixes before the labels.
|
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.
|
||||||
|
|||||||
@ -3,5 +3,6 @@
|
|||||||
numbers=left, % line numbers
|
numbers=left, % line numbers
|
||||||
showstringspaces=false, % spaces in strings
|
showstringspaces=false, % spaces in strings
|
||||||
keywordstyle=\color{blue}, % keyword color
|
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}
|
]{exercises/source-code-listings/Source.java}
|
||||||
@ -7,7 +7,7 @@
|
|||||||
bgcolor=ourBackgroundColor, % background color
|
bgcolor=ourBackgroundColor, % background color
|
||||||
firstline=5, % first line to be included
|
firstline=5, % first line to be included
|
||||||
lastline=7, % last 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}
|
]{java}{exercises/source-code-listings/Source.java}
|
||||||
|
|
||||||
\usemintedstyle{default}
|
\usemintedstyle{default}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
% !TeX root = ../../main-exercises.tex
|
||||||
|
|
||||||
|
Your listings go here.
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
\section{Listings}
|
||||||
|
|
||||||
In the folder \file{exercises/source-code-listings}, you will find a file called \file{Source.java}.
|
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.
|
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.
|
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}
|
\begin{enumerate}
|
||||||
\item Include the file into \\
|
\item Include the file into \\
|
||||||
\file{exercises/source-code-listings/source-code-listings.tex}.
|
\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 Activate syntax highlighting by stating the programming language Java.
|
||||||
\item Add line breaks and line numbers.
|
\item Add line breaks and line numbers.
|
||||||
\item Use the theme \code{latex}{native}.
|
\item Use the theme \code{latex}{native}.
|
||||||
\item This theme is optimized for a dark background. Change the background color to dark blue.
|
\item This theme is optimized for a dark background. Change the background color to dark blue.
|
||||||
\item Include only lines 5 to 7.
|
\item Include only lines 5 to 7.
|
||||||
\item Delete the spaces at the beginning of the lines by using a suitable
|
\item Delete the spaces at the beginning of the lines. (Hint: The documentation speaks of \code{latex}{autogobble}.)
|
||||||
option. (Hint: The documentation speaks of \code{latex}{gobble}.)
|
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
\section*{Listings tasks}
|
\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.
|
\item Don't show special characters for spaces in strings.
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
\exercisematerial{exercises/source-code-listings/source-code-listings}
|
|
||||||
|
|
||||||
% Reset experiments from exercise material if minted is used
|
% Reset experiments from exercise material if minted is used
|
||||||
\ifthenelse{\equal{\listingsmode}{minted}}{%
|
\ifthenelse{\equal{\listingsmode}{minted}}{%
|
||||||
\usemintedstyle{default}
|
\usemintedstyle{default}
|
||||||
|
|||||||
@ -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.
|
||||||
@ -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.
|
|
||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/special-characters/special-characters.code.tex}
|
\codeblock{latex}{./exercises/special-characters/special-characters.code.done.tex}
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
|
% !TeX root = ../../main-exercises.tex
|
||||||
|
|
||||||
What is a semester ticket?
|
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.
|
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.
|
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.
|
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).
|
This is possible after you have paid the semester fees.
|
||||||
A validation printers are located in multiple university buildings, e. g., in the foyer of the Erba building, in front of the library.
|
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.
|
This building is opened Monday - Friday, 7am - 10pm.
|
||||||
|
|||||||
@ -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}.
|
For this task, we are using the file \file{exercises/special-characters.tex}.
|
||||||
To be able to see your results here within the script,
|
To be able to see your results here within the exercise script,
|
||||||
compile the \file{main.tex} file.
|
compile the \file{main-exercises.tex} file.
|
||||||
This applies for the subsequent tasks, as well.
|
This applies for the subsequent tasks, as well.
|
||||||
|
|
||||||
\begin{enumerate}
|
\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 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
|
\item Add quotation marks around the words \emph{Studi-Ticket} and
|
||||||
\emph{Studi-Karte} using the \code{latex}{\textbackslash enquote} command.
|
\emph{Studi-Karte} using the \code{latex}{\textbackslash enquote} command.
|
||||||
\item Replace the word \emph{EUR} by a Euro symbol (hence the thin space).
|
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
|
|
||||||
\exercisematerial{exercises/special-characters/special-characters}
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
\codeblock{latex}{./exercises/tables/tables.code.tex}
|
\codeblock{latex}{./exercises/tables/tables.code.done.tex}
|
||||||
|
|
||||||
\begin{table}[h]
|
\begin{table}[h]
|
||||||
\centering
|
\centering
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
% !TeX root = ../../main-exercises.tex
|
||||||
|
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Foundations of Software Engineering
|
\item Foundations of Software Engineering
|
||||||
\subitem abbreviation: SWT-FSE-B
|
\subitem abbreviation: SWT-FSE-B
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
|
\section{Typesetting tables}
|
||||||
|
|
||||||
The following list shows some key data about a few courses of the \acro{WIAI} faculty.
|
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.
|
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}.
|
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.
|
Insert an additional \emph{centered column} that numbers the courses.
|
||||||
Add a caption to the table.
|
Add a caption to the table.
|
||||||
You find the table in \file{exercises/tables/tables.tex}.
|
You find the table in \file{exercises/tables/tables.tex}.
|
||||||
|
|
||||||
\exercisematerial{exercises/tables/tables}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
5
exercises/text-markup/markup.code.done.tex
Normal file
5
exercises/text-markup/markup.code.done.tex
Normal 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.
|
||||||
|
}
|
||||||
@ -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}
|
|
||||||
@ -1 +1 @@
|
|||||||
\codeblock{latex}{./exercises/text-markup/markup.code.tex}
|
\codeblock{latex}{./exercises/text-markup/markup.code.done.tex}
|
||||||
|
|||||||
@ -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 (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.
|
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,
|
The most common application of recursion is in mathematics and computer science,
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
|
\section{Emphasising text}
|
||||||
|
|
||||||
\begin{enumerate}
|
\begin{enumerate}
|
||||||
\item In \file{exercies/text-markup/markup.tex}, emphasize the words
|
\item In \file{exercies/text-markup/markup.tex}, emphasize the words
|
||||||
``recursion'' and ``recursive.''
|
``recursion'' and ``recursive.''
|
||||||
\item Make the \textsc{url} clickable.
|
\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.
|
\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}
|
\end{enumerate}
|
||||||
|
|
||||||
\exercisematerial{exercises/text-markup/markup}
|
|
||||||
|
|
||||||
|
|||||||
@ -5,10 +5,8 @@
|
|||||||
\chapter*{First steps with \LaTeX}
|
\chapter*{First steps with \LaTeX}
|
||||||
\addcontentsline{toc}{section}{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.
|
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.
|
||||||
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 are explained in the workshop and the main script.
|
||||||
|
|
||||||
The following instructions will equip you with the programs necessary to create documents with \LaTeX{}---they will be explained in the following chapters.
|
|
||||||
Please, make sure to install the \emph{compiler first} and the \emph{editor afterwards}\textit{.}
|
Please, make sure to install the \emph{compiler first} and the \emph{editor afterwards}\textit{.}
|
||||||
|
|
||||||
\section*{Compiler}
|
\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.
|
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}
|
\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.
|
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.
|
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.
|
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}.}
|
Feel free to contact us in this case.\footnote{Find us at \url{https://www.uni-bamberg.de/wiai/fs}.}
|
||||||
BIN
graphics/cover-exercises.pdf
Normal file
BIN
graphics/cover-exercises.pdf
Normal file
Binary file not shown.
BIN
graphics/cover-script.pdf
Executable file
BIN
graphics/cover-script.pdf
Executable file
Binary file not shown.
BIN
graphics/cover-solutions.pdf
Normal file
BIN
graphics/cover-solutions.pdf
Normal file
Binary file not shown.
BIN
graphics/faForward.png
Normal file
BIN
graphics/faForward.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 809 B |
1
graphics/faForward.svg
Normal file
1
graphics/faForward.svg
Normal 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
BIN
graphics/faWindows.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 863 B |
1
graphics/faWindows.svg
Normal file
1
graphics/faWindows.svg
Normal 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
13
imprint.tex
Normal 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
1
install-verification/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.pdf
|
||||||
67
install-verification/main.tex
Normal file
67
install-verification/main.tex
Normal 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}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item lasagne noodles
|
\item lasagna noodles
|
||||||
\item crushed tomatoes
|
\item crushed tomatoes
|
||||||
\item herbs \begin{enumerate}
|
\item herbs \begin{enumerate}
|
||||||
\item oregano
|
\item oregano
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
\begin{align*}
|
\begin{align*}
|
||||||
\left\lbrace x \mid tiefe(x) \geq 20 \right\rbrace \\
|
\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*}
|
\end{align*}
|
||||||
Binary file not shown.
Binary file not shown.
@ -11,7 +11,7 @@
|
|||||||
keywordstyle=\color{codeblue},
|
keywordstyle=\color{codeblue},
|
||||||
identifierstyle=\color{codegreen},
|
identifierstyle=\color{codegreen},
|
||||||
stringstyle=\color{codeyellow},
|
stringstyle=\color{codeyellow},
|
||||||
basicstyle=\footnotesize
|
basicstyle=\small
|
||||||
\ttfamily\color{white},
|
\ttfamily\color{white},
|
||||||
commentstyle=\color{codegray},
|
commentstyle=\color{codegray},
|
||||||
numberstyle=\tiny\color{codegray},
|
numberstyle=\tiny\color{codegray},
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user