Add a project structure task
This commit is contained in:
parent
b89bb05ce9
commit
d936b83f36
@ -245,23 +245,7 @@ Ein einfacher Weg, um die Hauptdatei noch übersichtlicher zu halten.
|
|||||||
Ein strukturiertes Projekt
|
Ein strukturiertes Projekt
|
||||||
|
|
||||||
@content
|
@content
|
||||||
* Entfernt die Präambel, die beiden `document`-Zeilen und das Inhaltsverzeichnis aus `allgemeines.tex`.
|
Im Ordner `exercises/project-structure` findet ihr eine Datei namens `main.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}`.
|
|
||||||
|
|
||||||
|
* ++ 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?
|
||||||
|
|||||||
@ -238,7 +238,6 @@ A simple way of keeping the main file even more organised.
|
|||||||
@preview
|
@preview
|
||||||
{.thin-padding}
|
{.thin-padding}
|
||||||
|
|
||||||
|
|
||||||
@slide(layout=task)
|
@slide(layout=task)
|
||||||
|
|
||||||
@task-number
|
@task-number
|
||||||
@ -248,23 +247,8 @@ A simple way of keeping the main file even more organised.
|
|||||||
A structured project
|
A structured project
|
||||||
|
|
||||||
@content
|
@content
|
||||||
* Remove the preamble, both of the `document` lines, and the table of contents from `allgemeines.tex`.
|
You will find a file named `main.tex` in the folder `exercises/project-structure`.
|
||||||
* ++ 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.”
|
|
||||||
|
|
||||||
|
* ++ Extract the sections into their own files (`section1.tex`, `section2.tex`, and `section3.tex`) and insert them using the `\include` command.
|
||||||
@slide(layout=task)
|
* ++ Which command is rendered superfluous by `\include`?
|
||||||
|
|
||||||
@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`.
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user