Compare commits

...

17 Commits

Author SHA1 Message Date
Florian
a5e40be5da Update instructions on LuaLaTeX and LaTeX Workshop in VS Code/Codium 2025-11-23 14:01:06 +01:00
Florian
a4ad98c7c0 Add note on MikTeX Console already running 2025-11-23 13:08:31 +01:00
f99adf1020 Add install-verification aux files to make clean 2025-11-20 23:47:49 +01:00
ed33856b8f Fix file extensions 2025-11-20 19:09:16 +01:00
Florian
4737feb243 Update imprint 2025-11-17 23:45:17 +01:00
Florian
e73ae72880 Fix sample solution 2025-11-17 22:48:31 +01:00
Florian
124e178fd8 Update references task 2025-11-17 22:10:28 +01:00
Florian
734854d234 Make footnotes task timeless 2025-11-17 22:00:54 +01:00
Florian
28d7ed348c Add note on path relative to root document 2025-11-17 21:43:23 +01:00
Florian
2d16ae0147 Adjust text markup task 2025-11-17 21:34:14 +01:00
Florian
39035df668 Fix typo 2025-11-17 21:33:56 +01:00
Florian
f9b7569eb1 Add some more advice 2025-11-17 11:49:23 +01:00
Florian
d5dd7f0dbd Include files via code block 2025-11-17 11:49:15 +01:00
Florian
8586397afc Add basic CoCalc instructions 2025-11-16 19:52:24 +01:00
Florian
68e5f9d4f0 Add FAQ 2025-11-16 19:15:56 +01:00
Florian
1ea1c70aec Add docs folder 2025-11-16 17:38:09 +01:00
Florian
eafef80230 Fix releases link 2025-11-16 17:37:41 +01:00
19 changed files with 149 additions and 36 deletions

View File

@ -12,6 +12,7 @@ clean:
@rm -rf temp/*
@rm -f main-{script,exercises,solutions}.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
@rm -f exercises/*/*.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
@rm -f install-verification/*.{aux,loc,log,out,pdf,soc,toc,synctex.gz}
# Compile listings (only needed when listings have changed)
listings: listings/**/*
@ -68,14 +69,14 @@ publication-pdf-with-solutions: clean publication-dir main-solutions.tex
# 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/* graphics/* listings/**/*.{tex,pdf,bib,java,txt} titlepage.tex imprint.tex temp/
cp --parents main-script.tex praeamble.tex commands.tex setup.tex content/* docs/* graphics/* install-verification/* listings/**/*.{tex,pdf,bib,java,txt} titlepage.tex imprint.tex temp/
cd temp && zip ../public/project-without-exercises * **/* **/**/*
# Build a ZIP file with tasks and without solutions
publication-zip-with-exercises: clean publication-dir
rm -rf temp/* exercises/**/_*
cp --parents main-exercises.tex praeamble.tex commands.tex setup.tex graphics/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex 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/
rm -f temp/exercises/**/*.done.{tex,bib,synctex.gz}
rm -f temp/exercises/**/*.rend.tex
@ -88,7 +89,7 @@ publication-zip-with-exercises: clean publication-dir
# Build a ZIP file with tasks and solutions
publication-zip-with-solutions: clean publication-dir
rm -rf temp/* exercises/**/_*
cp --parents main-solutions.tex praeamble.tex commands.tex setup.tex graphics/* listings/**/*.{tex,pdf,bib,java,txt} titlepage-exercises.tex imprint.tex first-steps-with-latex.tex 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/
rm -f temp/exercises/**/*.raw.{tex,bib,synctex.gz}
rm -f temp/exercises/**/*.aux

View File

@ -29,7 +29,7 @@ This project contains three different documents:
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://github.com/fs-wiai/latex-script/releases). You may use the script to delve into the realms of LaTeX on your own. It will give you an overview of how to approach any, but especially this LaTeX project. To get your hands dirty, have a look at the exercise script, especially the “First steps with LaTeX” section.
A PDF version of 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.
@ -69,6 +69,10 @@ latex-script/
│   ├── basic-document-structure.tex
│   ├── basic-functionality.tex
│   └── …
├── docs
│   ├── vs-code-instructions.md
│   ├── faq.md
│   └── …
├── exercises
│   ├── basic-document-structure
│   ├── footnotes
@ -112,7 +116,7 @@ Besides the exercise part, we also provide the script detailing all of the infor
* 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://github.com/fs-wiai/latex-script/releases) or our workshop. What's more, by using this larger project you get accustomed to the complexity of real LaTeX projects bachelor's/master's theses and the like.
Please don't feel overwhelmed by the amount of files in this repository. You will get to know the most important parts of the project step by step by [following the script](https://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

View File

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

View File

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

66
docs/faq.md Normal file
View File

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

View File

@ -13,7 +13,7 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
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.
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": [
@ -25,12 +25,12 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
]
},
{
"name": "pdflatex -> biber -> pdflatex × 2",
"name": "lualatex -> biber -> lualatex × 2",
"tools": [
"pdflatex",
"lualatex",
"biber",
"pdflatex",
"pdflatex"
"lualatex",
"lualatex"
]
},
// EXISTING ENTRIES GO HERE
@ -51,6 +51,17 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
],
"env": {}
},
{
"name": "lualatex",
"command": "lualatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
],
"env": {}
},
// EXISTING ENTRIES GO HERE
]
```
@ -60,20 +71,22 @@ LaTeX Workshop uses so-called recipes to compile documents. A recipe refers to a
## Compiling
1. Open the unzipped project archive (available in the [Releases section](https://github.com/fs-wiai/latex-script/releases)).
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 will always try to compile the file your cursor is currently in. If you are working in sub-files, then this will result in errors. You can **specify the document root** by adding a magic TeX root comment. Press `Ctrl + Shift + P` and select “Insert !TeX magic root command.” Then simply select your root document and compile again. We provided these comments for you in all exercise files:
+ 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
```
% !TeX root = ../../main-exercises.tex
```
This plugin offers a couple of other handy features:
+ 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.

View File

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

View File

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

View File

@ -2,5 +2,5 @@
\subsection{Inserting footnotes}
Make the text \enquote{released in September 2023} of the file \file{exercises/footnotes/footnotes.tex} appear as a footnote instead of in parentheses.
Additionally, insert a clickable URL to the Java Development Kit as footnote: \\ \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/}

View File

@ -1,7 +1,7 @@
% Preamble adjustments
% Literature
\usepackage[style=numeric, citestyle=alpha, backend=biber]{biblatex}
\usepackage[style=numeric, citestyle=alphabetic, backend=biber]{biblatex}
\addbibresource{exercises/literature/literature.bib}
% Actual content

View File

@ -1,13 +1,14 @@
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.
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]
\label{fig:csharp}
\centering
\includegraphics[width=2cm]{exercises/references/csharp.png}
\caption{The logo of C\#}
\label{fig:csharp}
\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.
Listing \ref{lst:csharphelloworld} shows a program that prints the text \enquote{Hello LaTeX friends!} to the console. Like Java, C\# makes use of classes and main methods to build executable applications.
\lstset{language=csharp}
\lstinputlisting[label=lst:csharphelloworld, caption=Hello World in C\#]{exercises/references/HelloLateXFriends.cs}

View File

@ -1,6 +1,6 @@
% !TeX root = ../../main-exercises.tex
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.
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]
\centering

View File

@ -4,7 +4,7 @@
In file \file{exercises/references/references.tex}, replace \enquote{in the
figure} and \enquote{the following source code listing} with suited references.
Use the command \code{latex}{\textbackslash cref}. Do not forget to first
introduce labels for the elements that you want to reference.
introduce labels and captions for the elements that you want to reference.
Make sure to use suitable prefixes before the labels.
For source code listings, adding labels and captions is a bit different.

View File

@ -1,5 +1,5 @@
``\emph{Recursion} (adjective: \emph{recursive}) occurs when a thing is defined in terms of itself or of its type.
\emph{Recursion} is used in a variety of disciplines ranging from linguistics to logic.
The most common application of \emph{recursion} is in mathematics and computer science, where a function being defined is applied within its own definition.''
Source and more information: \url{https://en.wikipedia.org/wiki/Recursion}
\blockquote[Source and more information: \url{https://en.wikipedia.org/wiki/Recursion}]{
\emph{Recursion} (adjective: \emph{recursive}) occurs when a thing is defined in terms of itself or of its type.
\emph{Recursion} is used in a variety of disciplines ranging from linguistics to logic.
The most common application of \emph{recursion} is in mathematics and computer science, where a function being defined is applied within its own definition.
}

View File

@ -4,6 +4,7 @@
\item In \file{exercies/text-markup/markup.tex}, emphasize the words
``recursion'' and ``recursive.''
\item Make the \textsc{url} clickable.
\item Find a proper way to display the whole \textbf{paragraph as a quote}. Have a look at the \mono{csquotes} package.
\item Of course, you can also experiment with the other commands that you learned for text markup. However, you might want to remove them afterwards to keep your document nice and tidy.
\end{enumerate}

View File

@ -5,7 +5,7 @@
\chapter*{First steps with \LaTeX}
\addcontentsline{toc}{section}{First steps with \LaTeX}
This document\footnote{Find the latest version of this document on Github: \url{https://github.com/fs-wiai/latex-script/releases}} contains exercises to practically apply learnings from the Fachschaft \acro{WIAI}'s \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.
The following instructions will equip you with the programs necessary to create documents with \LaTeX{}---they are explained in the workshop and the main script.
Please, make sure to install the \emph{compiler first} and the \emph{editor afterwards}\textit{.}

View File

@ -6,7 +6,7 @@
\begin{tabular}{@{}lp{9cm}}
& \subsubsection*{Imprint} \\
& The \LaTeX{} Script (version 1.4.2 from May 15th, 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. \\
& 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.

View File

@ -31,12 +31,12 @@
\input{exercises/basic-document-structure/task}
\subsubsection*{Modify the content below}
\input{exercises/basic-document-structure/document-structure.raw}
\codeblock{latex}{exercises/basic-document-structure/document-structure.raw.tex}
\newpage
\input{exercises/project-structure/task}
\subsubsection*{Modify the content below}
\input{exercises/project-structure/tasks.raw}
\codeblock{latex}{exercises/project-structure/main.raw.tex}
\newpage
\input{exercises/special-characters/task}

View File

@ -1,3 +1,4 @@
% !TeX root = ./main-exercises.tex
\documentclass[a4paper,english]{report}
% Language and font encoding