From 8c8920c432f1129b634d22ef8cde29d23c14b2ee Mon Sep 17 00:00:00 2001 From: Evelyn Fradtschuk Date: Mon, 26 Apr 2021 23:16:14 +0200 Subject: [PATCH] update tasks on source code listings --- slides/chapter-10.de.md | 16 ++++++++++------ slides/chapter-10.en.md | 15 +++++++++------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/slides/chapter-10.de.md b/slides/chapter-10.de.md index 2a0e14e..a714b6f 100644 --- a/slides/chapter-10.de.md +++ b/slides/chapter-10.de.md @@ -114,14 +114,18 @@ breaklines=true, @slide(layout=task) @task-number -9 +8 @title Quelltext einbinden @content -* Abschnitt 2.4 enthält zwei auskommentierte **Listings**. -* ++ Bindet zunächst das **Paket `minted`** an der richtigen Stelle ein. -* ++ Nutzt die **`minted`-Umgebung**, um das erste Listing mit Syntax Highlighting zu versehen. -* ++ Lagert das zweite Listing in eine **neue Datei** aus und bindet sie mit `\inputminted` ein. -* ++ Ändert das **Farbschema** zu `borland`. +* Im Ordner `exercises/source-code-listings` findet ihr eine Datei namens `Source.java`. Wir werden diese im Folgenden in unser Dokument einbinden und das Aussehen unseren Wünschen anpassen. +* ++ **Bindet** den Java-Quelltext in der Datei `task-1.raw.tex` **ein**. +* ++ Aktiviert das **Syntax-Highlighting** durch Angabe der Sprache Java. +* ++ Verwendet eine Option, um die Zeilen zu **nummerieren**. +* ++ Nutzt das **Theme** `native`. +* ++ Ändert die **Hintergrundfarbe** des Themes zu dunkelblau. +* ++ Bindet jetzt nur die **Zeilen 5 bis 7** ein. +* ++ Entfernt die **Leerzeichen** am Anfang der Zeilen durch die passende Option (Tipp: Die Dokumentation spricht hier von `gobble`). +* ++ Seht bei Fragen in der Dokumentation des Paketes *Minted* nach. diff --git a/slides/chapter-10.en.md b/slides/chapter-10.en.md index 0e0a3d1..b81c518 100644 --- a/slides/chapter-10.en.md +++ b/slides/chapter-10.en.md @@ -114,14 +114,17 @@ breaklines=true, @slide(layout=task) @task-number -9 +8 @title Listing source code @content -* Section 2.4 contains two **listings** that are currently commented out. -* ++ Include the **`minted` package** in the right place. -* ++ Make use of the **`minted` environment** to activate syntax highlighting for the first listing. -* ++ Move the second listing to a **new file** and include it using `\inputminted`. -* ++ Change the **color scheme** to `borland`. +* In the directory `exercises/source-code-listings` you can find a file named `Source.java`, which we want to include in our document. +* ++ **Include** the java code in the file `task-1.raw.tex1`. +* ++ **Number** the code lines. +* ++ Use the **theme** `native`. +* ++ Change the **background colour** to dark blue. +* ++ Now only include **lines 5 to 7**. +* ++ Delete the **spaces** at the beginning of the lines by using a suitable option (Hint: The documentation speaks of `gobble`). +* ++ If you have questions, try to consult the documentation of the Minted package.