diff --git a/slides/chapter-04.de.md b/slides/chapter-04.de.md index 10a6c6d..56da57d 100644 --- a/slides/chapter-04.de.md +++ b/slides/chapter-04.de.md @@ -245,23 +245,7 @@ Ein einfacher Weg, um die Hauptdatei noch übersichtlicher zu halten. Ein strukturiertes Projekt @content -* Entfernt die Präambel, die beiden `document`-Zeilen und das Inhaltsverzeichnis aus `allgemeines.tex`. -* ++ Kompiliert stattdessen `l2kurz.tex` – das ist ab sofort unsere **Hauptdatei.** Die Datei `allgemeines.tex` ist bereits eingebunden und wird mit kompiliert. -* ++ Die Hauptdatei ist sehr unübersichtlich. Lagert alle Befehle, die vor der Dokumentumgebung (`\begin{document}`) aufgerufen werden, in eine neue Datei `praeambel.tex` aus und bindet diese mit `\input{praeambel}` ein. -* ++ **Technischer Hinweis:** Wählt beim Kompilieren bitte die Option »(c) nutze das vorgegebene Kommando«, wenn sich ein entsprechendes Pop-up öffnet. - - -@slide(layout=task) - -@task-number -3 - -@title -Ein strukturiertes Projekt - -@content -* Um lange Kompilierzeiten zu verhindern, sollten vorerst nur noch die Abschnitte `einleitung.tex` und `allgemeines.tex` eingebunden werden. -* ++ Ersetzt hierzu in der Datei `l2kurz.tex` alle **anderen** `\input`-Statements durch `\include`-Statements und verwendet den Befehl `\includeonly`. -* ++ **Achtung:** Die Präambel sollte weiterhin durch `\input` eingebunden werden. -* ++ Setzt das `\includeonly`-Statement direkt über `\begin{document}`. +Im Ordner `exercises/project-structure` findet ihr eine Datei namens `main.tex`. +* ++ Lagert die einzelnen Abschnitte in eigene Dateien `section1.tex`, `section2.tex` und `section3.tex` aus und bindet sie mittels `\include` ein. +* ++ Welcher Befehl wird durch `\include` überflüssig? diff --git a/slides/chapter-04.en.md b/slides/chapter-04.en.md index 3e11b2b..0820677 100644 --- a/slides/chapter-04.en.md +++ b/slides/chapter-04.en.md @@ -238,7 +238,6 @@ A simple way of keeping the main file even more organised. @preview ![](svg/chapter-04/main-parts-preamble-crop.svg){.thin-padding} - @slide(layout=task) @task-number @@ -248,23 +247,8 @@ A simple way of keeping the main file even more organised. A structured project @content -* Remove the preamble, both of the `document` lines, and the table of contents from `allgemeines.tex`. -* ++ Compile `l2kurz.tex` instead. This is going to be our **main file** from now on. The file `allgemeines.tex` is already included and will be compiled automatically. -* ++ The main file is very complex. Outsource all the commands that come before the document environment (`\begin{document}`) into a new file `preamble.tex` and include it using `\input{preamble}`. -* ++ **Technical note:** When a popup opens during compilation, please choose option “(c) use the default command.” +You will find a file named `main.tex` in the folder `exercises/project-structure`. - -@slide(layout=task) - -@task-number -3 - -@title -A structured project - -@content -* To avoid long compilation times, you should should only include the sections `einleitung.tex` and `allgemeines.tex` for now. -* ++ For this purpose, replace all of the **other** `\input` statements inside `l2kurz.tex` by `\include` statements. -* ++ Place the `\includeonly` statement directly **before** `\begin{document}`. -* ++ **Caution:** The preamble still needs to be included via `\input`. +* ++ Extract the sections into their own files (`section1.tex`, `section2.tex`, and `section3.tex`) and insert them using the `\include` command. +* ++ Which command is rendered superfluous by `\include`?