update tasks on source code listings
This commit is contained in:
parent
bd4d7ec6fc
commit
8c8920c432
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user