Adjust exercise

This commit is contained in:
Knoch 2023-04-28 17:00:17 +02:00
parent b4327fc868
commit f83a60b5c0
2 changed files with 3 additions and 5 deletions

View File

@ -162,8 +162,7 @@ Referenzen einfügen
* Ersetzt im Text in der Datei `references.tex` im Ordner `exercises/references` *In the figure* und *The following source code listing* durch eine **Referenz** auf das Bild bzw. auf das Quelltext-Listing. * Ersetzt im Text in der Datei `references.tex` im Ordner `exercises/references` *In the figure* und *The following source code listing* durch eine **Referenz** auf das Bild bzw. auf das Quelltext-Listing.
* Nutzt dafür den Befehl `\Cref`. * Nutzt dafür den Befehl `\Cref`.
* Achtet darauf, zuerst **Labels** für die Elemente, die ihr referenzieren wollt, zu vergeben. * Achtet darauf, zuerst **Labels** für die Elemente, die ihr referenzieren wollt, zu vergeben.
* Packt dafür das Quelltext-Listing in eine **Umgebung** namens `listing`. * Bei **Quelltext-Listings** funktioniert die Angabe von Labels und Captions leicht anders. Nutzt euer bisheriges Wissen und das Internet, um herauszufinden, wie ihr den Befehl `\lstinputlisting` anpassen müsst, um beides zu vergeben.
* Fügt noch eine **Beschriftung** zum Listing hinzu.
@slide(layout=extra-content-and-preview) @slide(layout=extra-content-and-preview)

View File

@ -163,9 +163,8 @@ Inserting references
@content @content
* In file `exercises/references/references.tex`, replace *In the figure* and *The following source code listing* by **references** to the figure and to the source code listing. * In file `exercises/references/references.tex`, replace *In the figure* and *The following source code listing* by **references** to the figure and to the source code listing.
* Use the command `\Cref` for the references. * Use the command `\Cref` for the references.
* Make sure to add **labels** to the elements that you want to create a reference for. * Make sure to add **labels** to the elements that you want to create a reference for.
* To do so, wrap the source code listing in a `listing` **environment**. * 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 `\lstinputlisting` command. Use the Internet, if necessary.
* Additionally, add a **caption** to the source code listing.
@slide(layout=extra-content-and-preview) @slide(layout=extra-content-and-preview)