/docs/"
2 | uglyurls: true ## use foo.de/bar.html instead of foo.de/bar/ (our new ILIAS 7.x HTML-Lernmodul won't find landing pages else)
3 |
4 | languageCode: "de-DE"
5 | metaDataFormat: "yaml"
6 |
7 | theme:
8 | - "hugo-lecture"
9 | - "hugo-theme-relearn"
10 | #themesDir: ".hugo" ## this is either ${HOME}/.local/share/pandoc/hugo/ (local installation)
11 | ## or ${XDG_DATA_HOME}/pandoc/hugo/ (docker container / GitHub action)
12 |
13 | #contentDir: "temp" ## set via Makefile: $(TEMP_DIR)
14 | #publishDir: "docs" ## set via Makefile: $(WEB_OUTPUT_DIR)
15 |
16 | params:
17 | useDefaultRelref: true ## see https://github.com/McShelby/hugo-theme-relearn/issues/882
18 | titleSeparator: " "
19 | alwaysopen: false
20 | showVisitedLinks: true
21 | externalLinkTarget: "_blank"
22 | disableBreadcrumb: true
23 | disableInlineCopyToClipBoard: true
24 | disableNextPrev: true
25 | disableSearch: false
26 | disableSearchHiddenPages: false
27 | disableLandingPageButton: true
28 | disableLanguageSwitchingButton: true
29 | disableMathJax: false
30 | disableMermaid: true
31 | themeVariant:
32 | - "auto"
33 | - "zen-light"
34 | - "zen-dark"
35 | - "relearn-bright"
36 | - "relearn-light"
37 | - "relearn-dark"
38 |
39 | menu:
40 | shortcuts:
41 | - name: " Zeiten"
42 | url: "/index.html#vorlesung-2-sws"
43 | weight: 10
44 | - name: " Fahrplan"
45 | url: "/index.html#fahrplan"
46 | weight: 20
47 | - name: " Praktikum"
48 | url: "/assignments.html"
49 | weight: 30
50 | - name: " Note/Credits"
51 | url: "/index.html#prüfungsform-note-und-credits"
52 | weight: 40
53 | - name: " FAQ"
54 | url: "/org/faq.html"
55 | weight: 50
56 |
57 | outputs:
58 | home:
59 | - HTML
60 | - PRINT
61 | - SEARCH
62 | - SEARCHPAGE
63 | section:
64 | - HTML
65 | - PRINT
66 | page:
67 | - HTML
68 | - PRINT
69 |
70 | markup:
71 | goldmark:
72 | renderer:
73 | unsafe: true
74 | tableOfContents:
75 | startLevel: 2
76 |
77 | privacy:
78 | disqus:
79 | disable: true
80 | googleAnalytics:
81 | disable: true
82 | instagram:
83 | disable: true
84 | twitter:
85 | disable: true
86 | vimeo:
87 | disable: true
88 | youtube:
89 | disable: true
90 | privacyEnhanced: true
91 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/img/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/img/a.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/orga/.noslides:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/orga/.noslides
--------------------------------------------------------------------------------
/examples/hugo-lecture/orga/grading.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Note und Credits"
3 |
4 | hidden: true
5 | ---
6 |
7 |
8 | ## Prüfungsform
9 |
10 | **Performanzprüfung, 7 ECTS**
11 |
12 | - **Praktische Teilleistung**:
13 | Regelmäßige Bearbeitung der Praktikumsaufgaben,
14 | fristgerechte Abgabe der Lösungen (PDF, ZIP, Link) im ILIAS,
15 | Erstellung von Peer-Feedback im ILIAS,
16 | Vorstellung der Lösungen im Praktikum => Punkte
17 |
18 | Notenspiegel:
19 | - 90 Punkte gesamt erreichbar: Zyklus 1 und 2 je 15 Punkte, Zyklus 3 bis 5 je 15+5 Punkte
20 | - 4.0: ab 50% (45.0 Punkte), alle 5% nächste Teilnote, 1.0: ab 95% (85.5 Punkte)
21 |
22 | - **Theoretische Teilleistung**:
23 | Digitale Klausur in den Prüfungszeiträumen
24 |
25 | - **Gesamtnote**:
26 | 50% Praxis, 50% Theorie
27 |
28 | Wiederholer mit bereits begonnener Parcours-Prüfung absolvieren stattdessen eine Parcours-Prüfung.
29 | Bitte melden Sie sich vor Beginn der Praktika per E-Mail beim Dozenten.
30 |
31 |
32 | ## Hinweise zum Praktikum (praktische Teilleistung)
33 |
34 | ### Bearbeitung der Aufgaben
35 |
36 | Sie bearbeiten alle Aufgaben in festen Teams zu je **drei Personen**. Jedes Team erarbeitet seine
37 | **eigene** Lösung.
38 |
39 | Wer Lösungen ganz oder teilweise von anderen Teams/Studierenden oder anderen Quellen übernimmt
40 | und als eigene Lösung ab-/ausgibt, begeht einen Täuschungsversuch mit entsprechenden Konsequenzen
41 | im Prüfungsverfahren.
42 |
43 | ### 2-Wochen-Zyklen
44 |
45 | Das Praktikum erfolgt in 2-Wochen-Zyklen:
46 |
47 | 1. Erste Zyklus-Woche: Konzeptphase
48 | - Auswahl der zu bearbeitenden Aufgaben (=> Team)
49 | - Erstellung einer Konzeptskizze (PDF) (=> Team)
50 | - Abgabe der Konzeptskizze (PDF) im ILIAS (=> Jede(r) einzeln)
51 | - Peer-Feedback zur Konzeptskizze im ILIAS (=> Jede(r) einzeln)
52 | - Vorstellung der Konzeptskizze im Praktikum (=> Team)
53 | 2. Zweite Zyklus-Woche: Implementierungsphase
54 | - Umsetzung des Konzepts/Implementierung der Lösung (=> Team)
55 | - Abgabe des Quellcodes (ZIP bzw. Link) im ILIAS (=> Jede(r) einzeln)
56 | - Peer-Feedback zum Quellcode im ILIAS (=> Jede(r) einzeln)
57 | - Vorstellung des Quellcodes im Praktikum (=> Team)
58 |
59 | Sie können pro Zyklus Aufgaben im Umfang von 15 Punkten abgeben/vorstellen.
60 |
61 | ### Punktevergabe
62 |
63 | Für die Vergabe der Punkte müssen Sie pro Zyklus jeweils fristgerecht
64 | Ihre Konzeptskizze als PDF eingereicht und im Praktikum vorgestellt haben,
65 | in beiden Zyklen-Hälften das Peer-Feedback erstellt haben und
66 | die Lösung (Quellcode: Abgabe per ZIP oder Link, vgl. Anweisungen auf den
67 | Übungsblättern) eingereicht und im Praktikum vorgestellt haben.
68 |
69 | ### Sonderabgabe letzte Vorlesungswoche
70 |
71 | Zusatztermin für Studierende, die bis dahin unterhalb der Bestehensschwelle für die praktische
72 | Teilleistung liegen oder die wegen Krankheit einen Termin nicht wahrnehmen konnten.
73 |
74 | Für diese Abgabe gibt es keine Konzeptphase und auch kein Peer-Feedback, die Lösung (Link)
75 | ist bis zur Deadline im ILIAS hochzuladen und im nachfolgenden Praktikum vorzustellen.
76 |
77 |
78 | ## Hinweise zur Klausur (theoretische Teilleistung)
79 |
80 | Prüfung Theorie (Termin 1): Die Prüfung zum theoretischen Teil findet am Mittwoch, 05.07.23,
81 | im B40 am Campus Minden als digitale Klausur auf dem HSBI-Prüfungs-ILIAS statt.
82 |
83 | Da in diesem Raum nur 30 Personen gleichzeitig geprüft werden können, werden wir in zwei
84 | Durchläufen arbeiten: 09:00-10:30 Uhr und 11:00-12:30 Uhr. Sie können nur an einer der beiden
85 | Sitzungen teilnehmen.
86 |
87 | Es gibt entsprechend zwei Einträge im Prüfungs-ILIAS. Die Zugangsdaten wurden an alle im LSF
88 | für die Prüfung angemeldeten Studierenden geschickt. Bitte melden Sie sich bis Freitag,
89 | 30.06.23, in einem der beiden Prüfungskursräume an ("Beitritt mit Bestätigung"). Beachten Sie
90 | die Gruppengröße, es können sich max. 30 Personen pro Durchlauf anmelden. Es gibt keine
91 | Wartelisten - wenn einer der beiden Prüfungskursräume voll ist, melden Sie sich bitte beim
92 | anderen Prüfungskursraum an.
93 |
94 | Sie benötigen am Prüfungstag Ihre HSBI-Zugangsdaten (User, Passwort), einen Studierendenausweis
95 | und Personalausweis sowie Ihren DIN-A4-Spickzettel.
96 |
97 | Prüfungsrelevant sind die im "Fahrplan" verlinkten Inhalte.
98 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/orga/img/modulbeschreibung.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/orga/img/modulbeschreibung.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/orga/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: "chapter"
3 | title: "Organisatorisches"
4 |
5 | hidden: true
6 | _build:
7 | render: always
8 | list: never
9 | publishResources: true
10 | ---
11 |
12 |
13 | `{{< children showhidden="true" >}}`{=markdown}
14 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/orga/resources.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Ressourcen"
3 | nocite: |
4 | @Ullenboom2021,@Chacon2014,@Fowler2011,@Bloch2018,@Martin2009,@Passig2013,@Urma2014
5 |
6 | hidden: true
7 | ---
8 |
9 |
10 | ## Was brauche ich? Literatur ...
11 |
12 | ### Basics ("Must Have"!)
13 |
14 | 1. "**Java ist auch eine Insel**": @Ullenboom2021
15 | 2. "**Pro Git** (Second Edition)": @Chacon2014
16 | 3. "**The Java Tutorials**": @Java-SE-Tutorial
17 | 4. "**Learn Java**": @LernJava
18 |
19 | ### Weitere empfohlene Literatur
20 |
21 | Auf [The 2023 Java Programmer RoadMap](https://medium.com/javarevisited/the-java-programmer-roadmap-f9db163ef2c2)
22 | finden Sie eine Art Roadmap zu den verschiedenen Themen rund um die Java-Programmierung, die
23 | beinahe auch die Roadmap für die Veranstaltung "Programmiermethoden" sein könnte ...
24 |
25 | Joshua Bloch, einer der "Väter" von Java, hat eine interessante Sammlung von Rezepten für
26 | typische Probleme und wie man diese am sinnvollsten in Java lösen kann gesammelt: @Bloch2018
27 | bzw. @Bloch2011 (ältere Version). Mit @Inden2013 gibt es ein extrem umfangreiches
28 | Nachschlagewerk zu (fast) allen Themen in Java (wird gelegentlich aktualisiert). Und die
29 | Developer Guides von Oracle [@JDK-Doc] sind ebenfalls eine gute Referenz.
30 |
31 | Mit Java 8 wurden einige interessante Features eingeführt wie etwa Lambda-Ausdrücke und
32 | Funktionsinterfaces. Hierzu ist @Urma2014 eine gute Quelle. Für das Update auf Java 9 kann
33 | man sich @Juneau2017 anschauen. Spätere Features wie Optional und die Stream-API und
34 | Record-Klassen sind sehr gut auf @LernJava dokumentiert.
35 |
36 | Mit @Passig2013 ist ein wunderbar launiges Buch erschienen, wo typische Code-Smells
37 | diskutiert werden (wobei man manche Standpunkte hinterfragen sollte). Ein Standardwerk zu
38 | diesem Thema ist @Martin2009. In @SWEGoogle werden Erfahrungen rund um die
39 | Softwareentwicklung dargestellt und kritisch hinterfragt - hier finden sich interessante
40 | Gedanken zum Thema Git, Testen, Code Style und vieles andere mehr.
41 |
42 | Zum Thema Refactoring ist @Fowler2011 *DIE* Referenz. Auf @RefactoringGuru finden Sie eine
43 | nett aufbereitete Übersicht zum Thema Refactoring, aber auch eine Einbettung in die
44 | Zusammenhänge mit den Themen Bad Smells und Clean Code.
45 |
46 | Wer Interesse an UML und/oder Designpattern hat, sollte in @Oestereich2012 sowie @UML25
47 | und @Gamma2011 sowie @Eilebrecht2013 schauen.
48 |
49 | Zum Thema Unit-Test seien @vogellaJUnit, @junit4, @Osherove2014 und @Beck2014 empfohlen.
50 |
51 | Zum Thema Coding Conventions sind @SunMicrosystems1997 und @googlestyleguide gute
52 | Referenzen.
53 |
54 | Hier noch eine Sammlung von Gedanken zum Berufsverständnis von Informatikern: @AtlassianHelloWorld.
55 |
56 | Anregungen für **Spielideen** können Sie beispielsweise in den folgenden Videos finden:
57 | - [Shattered Pixel Dungeon Rogue Beginners Guide Playthrough](https://youtu.be/qoc_tDN0QC4)
58 | - [Shattered Pixel Dungeon Duelist Update!](https://youtu.be/LgSjUWjQg0s)
59 |
60 | **Hinweis**: Am Ende einer Vorlesung wird noch einmal spezifisch zum Thema passende
61 | Literatur empfohlen.
62 |
63 | ## Was brauche ich noch? Tools ...
64 |
65 | ### Tools
66 |
67 | - JDK: Java SE 17 (LTS) ([Oracle](https://www.oracle.com/java/technologies/downloads/) oder
68 | [Alternativen](https://code.visualstudio.com/docs/languages/java#_install-a-java-development-kit-jdk),
69 | bitte 64-bit Version nutzen)
70 | - IDE: [Eclipse IDE for Java Developers](https://www.eclipse.org/downloads/) oder
71 | [IntelliJ IDEA (Community Edition)](https://www.jetbrains.com/idea/) oder
72 | [Visual Studio Code](https://code.visualstudio.com/) oder [Vim](https://www.vim.org/) oder ...
73 | - [Git](https://git-scm.com/)
74 |
75 | ### Vorgaben für die Aufgaben
76 |
77 | - [Dungeon-Framework](https://github.com/Programmiermethoden/Dungeon)
78 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/orga/syllabus.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Syllabus"
3 |
4 | hidden: true
5 | ---
6 |
7 |
8 | ## Worum geht's hier?
9 |
10 | ::: center
11 | [**Weniger schlecht programmieren**]{.alert} \quad ;-)
12 | :::
13 |
14 |
15 | > ... And, lastly, there's the explosive growth in demand, which has led to many
16 | > people doing it who aren't any good at it. Code is merely a means to an end.
17 | > **Programming is an art and code is merely its medium.**
18 | > Pointing a camera at a subject does not make one a proper photographer. There are
19 | > a lot of self-described coders out there who couldn't program their way out of a
20 | > paper bag.
21 | >
22 | > \hfill -- John Gruber auf [daringfireball.net](https://daringfireball.net/2020/04/cobol_programming_coding)
23 |
24 |
25 | Sie haben letztes Semester in OOP die *wichtigsten* Elemente und Konzepte der
26 | Programmiersprache Java kennen gelernt.
27 |
28 | Java ist neben C und Python derzeit die wichtigste Programmiersprache am Markt
29 | (siehe [TIOBE Index](https://www.tiobe.com/tiobe-index/)).
30 |
31 | Jetzt geht es darum, diese Kenntnisse sowohl auf der Java- als auch auf der
32 | Methoden-Seite so zu erweitern, dass Sie gemeinsam größere Anwendungen erstellen
33 | und pflegen können:
34 |
35 | * **Java**
36 | * Sich sicherer in Java bewegen: Praxiserfahrung und Routine gewinnen
37 | * Wichtigste Konzepte und APIs kennen und beherrschen
38 | * Merkmale größerer Applikationen wie Logging und Konfiguration einsetzen
39 |
40 | \smallskip
41 |
42 | * **Design**
43 | * Basis-Entwurfsmuster (er-)kennen und einsetzen
44 |
45 | \smallskip
46 |
47 | * **Methoden**
48 | * Code erstellen und pflegen wie die Profis
49 | * Build-Tools einsetzen
50 | * Testen von Software
51 | * Refactoring von "stinkendem" Code
52 | * Versionsverwaltung: Git
53 | * Zusammenarbeit in Teams: Verwaltung von Software und Workflows
54 |
55 | [[Warum ist guter Code wichtig?]{.bsp}]{.slides}
56 | [**Warum ist guter Code wichtig?**]{.notes}
57 |
58 | [=> Guter Code ist vor allem wichtig [für den Entwickler]{.alert}!]{.notes}
59 |
60 |
61 | ## Überblick Modulinhalte
62 |
63 | 1. Fortgeschrittene Konzepte in Java
64 | * Funktionale Programmierung: Default-Methoden, Funktionsinterfaces, Methodenreferenzen, Lambdas, Stream-API
65 | * Generische Programmierung: Generics
66 | * Parallele Programmierung: Threads
67 | * Reguläre Ausdrücke, Annotationen, Reflection
68 | * CLI, Konfiguration, Fremde APIs nutzen
69 |
70 | \smallskip
71 |
72 | 2. Fortgeschrittenes OO-Design
73 | * Entwurfsmuster: Strategy, Template-Method, Factory-Method, Singleton, Observer, Visitor, Command, ...
74 |
75 | \smallskip
76 |
77 | 3. Programmiermethoden
78 | * Versionskontrolle: Git
79 | * Testen, Coding Conventions, Refactoring
80 | * Logging, Build-Tools, CI
81 |
82 |
83 | ## Erwartungen an Sie
84 |
85 | {width="80%"}
86 |
87 | * 135h Selbststudium => ca. 9h Arbeitszeit pro Woche!
88 |
89 | Zeiten sind Richtwerte! - Manche brauchen länger, manche sind schneller ...
90 |
91 |
92 | Die Praktikumsaufgaben sollen Ihnen helfen, sich mit den Inhalten der
93 | Vorlesung auseinander zu setzen. Die Abgabeform und die Bedingungen an das
94 | Testat sind bewusst so gewählt, damit Sie im Praktikum untereinander in eine
95 | Diskussion eintreten (können). Nutzen Sie diese Chance und verhalten Sie sich
96 | aktiv - so macht das Praktikum Spaß und bringt allen mehr.
97 |
98 | Studieren Sie! Studieren bedeutet, sich **selbstständig** mit einem Thema
99 | auseinander zu setzen, zu vertiefen, zu üben, Zusammenhänge herzustellen.
100 | Die Lehrveranstaltung unterstützt Sie dabei, indem die wichtigsten Themen
101 | ausgesucht, in eine zeitliche Reihenfolge gebracht und didaktisch aufbereitet
102 | werden, so dass Sie sich die Inhalte leichter erschließen können. Es gibt
103 | aber viele weitere Themen und Dinge, die nicht besprochen werden können (schon
104 | aus rein zeitlichen Gründen), die aber (für Sie und/oder das Themengebiet)
105 | interessant sein können!
106 |
107 | Prüfungsrelevant sind selbstverständlich nur die besprochenen Inhalte. Der
108 | Fokus liegt aber auf dem "Können", also dem **Beherrschen** der jeweiligen
109 | Themen.
110 |
111 |
112 | ## Kognitive Stufen - Einordnung Lernziele
113 |
114 | Kennen (K1)
115 | : Abruf von Informationen (Begriffe, Fakten, Prinzipien)
116 | : (erkennen, nennen, bezeichnen, wiedergeben, kennen)
117 |
118 | Verstehen (K2)
119 | : Begründen und Erläutern von Aussagen zum Thema
120 | : (beschreiben, zusammenfassen, vergleichen, klassifizieren, begründen, erklären)
121 |
122 | Anwenden (K3)
123 | : Übertragung von erworbenem Wissen auf neue Situationen oder Anwendung zur Problemlösung
124 | : (ausführen, anwenden, beurteilen, entwerfen, nutzen)
125 |
126 | Nach *Anderson, Krathwohl (eds)*: "A Taxonomy for Learning, Teaching, and
127 | Assessing: A Revision of Bloom's Taxonomy of Educational Objectives",
128 | Allyn & Bacon, 2001
129 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: "home"
3 | title: "PM S23"
4 | ---
5 |
6 |
7 | ## This should work
8 |
9 | Thanks everyone!
10 |
11 | [File A](file-a.md)
12 |
13 | [File A](file-a.md)
14 |
15 | 
16 |
17 | 
18 |
19 |
20 | ## Different (wrong) format
21 |
22 | - [wrong extension](file-c.png)
23 | - [not local](https://pandoc.org/lua-filters.html)
24 | - [still not local](https://pandoc.org/lua-filters.md)
25 | - [also not local](http://pandoc.org/lua-filters.md)
26 |
27 |
28 | ## Recursive inclusion
29 |
30 | [File B](file-b.md)
31 |
32 |
33 | ## Subdirectories
34 |
35 | [Subdir: File D](subdir/file-d.md)
36 |
37 | [Subdir: File D](./subdir/file-d.md)
38 |
39 |
40 | ## Subdirectories, recursive
41 |
42 | [Subdir: File E](subdir/file-e.md)
43 |
44 |
45 | ## Subdirectories, direct plus recursive
46 |
47 | [Subdir/Leaf: Foo](subdir/leaf/foo.md)
48 |
49 |
50 | ## Links to Landing Pages
51 |
52 | [subdir/readme](subdir/readme.md)
53 |
54 | [readme](readme.md)
55 |
56 |
57 | ## Schedule
58 |
59 | `{{< schedule >}}`{=markdown}
60 |
61 | **Hinweise**: Abgabe der Hausaufgaben (PDF, ZIP, Link) jeweils bis zur angegebenen Deadline im ILIAS.
62 | Peer-Feedback jeweils bis zur angegebenen Deadline im ILIAS.
63 | Vorstellung der Lösungen im jeweiligen nachfolgenden Praktikumstermin.
64 |
65 |
66 | ## Schedule II
67 |
68 | +-----------------------+------------------------------------------------------------------+-----------------------+
69 | | Woche | Vorlesung | Praktikum/Übung |
70 | +=======================+==================================================================+=======================+
71 | | W01 (07. April) | >> Feiertag | >> Feiertag |
72 | +-----------------------+------------------------------------------------------------------+-----------------------+
73 | | W02 (14. April) | - [**Subdir/File-D.md**](subdir/file-d.md)\ | |
74 | | | *Hinweis: Kick-Off/Orga (Zoom)* | |
75 | | | - [**Subdir/File-E.md**](subdir/file-e.md) | |
76 | +-----------------------+------------------------------------------------------------------+-----------------------+
77 | | W03 (21. April) | - [**Single page 'Bar' in a leaf bundle**](subdir/leaf/bar.md) | |
78 | | | - [**Single page 'Foo' in a leaf bundle**](subdir/leaf/foo.md) | |
79 | +-----------------------+------------------------------------------------------------------+-----------------------+
80 |
81 | **Hinweise**: Abgabe der Hausaufgaben (PDF, ZIP, Link) jeweils bis zur angegebenen Deadline im ILIAS.
82 | Peer-Feedback jeweils bis zur angegebenen Deadline im ILIAS.
83 | Vorstellung der Lösungen im jeweiligen nachfolgenden Praktikumstermin.
84 |
85 |
86 | ## Schedule III
87 |
88 | | Woche | Vorlesung | Praktikum/Übung |
89 | |-----------------|--------------------------------------------------------------------------|-----------------|
90 | | W01 (07. April) | Feiertag | Feiertag |
91 | | W02 (14. April) | [**Sub: D**](subdir/file-d.md), [**Sub: E**](subdir/file-e.md) | |
92 | | | *Hinweis: Kick-Off/Orga (Zoom)* | |
93 | | W03 (21. April) | [**Leaf: Bar**](subdir/leaf/bar.md), [**Leaf: Foo**](subdir/leaf/foo.md) | |
94 |
95 |
96 | | Woche | Vorlesung | Praktikum/Übung |
97 | |-----------------|-----------|-----------------|
98 | | W01 (07. April) | Feiertag | Feiertag |
99 | | W02 (14. April) | AAA | |
100 | | | BBB | |
101 | | W03 (21. April) | CCC | |
102 | | | DDD | |
103 |
104 | **Hinweise**: Abgabe der Hausaufgaben (PDF, ZIP, Link) jeweils bis zur angegebenen Deadline im ILIAS.
105 | Peer-Feedback jeweils bis zur angegebenen Deadline im ILIAS.
106 | Vorstellung der Lösungen im jeweiligen nachfolgenden Praktikumstermin.
107 |
108 |
109 |
110 | ::: slides
111 | ## Hidden Parts
112 |
113 | This part will be visible while building the makefile dependencies, but will be removed for building
114 | the website because of being marked as slides content. We can use this to include files in the build
115 | process even if we do not want to have explicit links in the site ...
116 |
117 | Use case: We want to use a Hugo-generated schedule, i.e. we do not provide links to all individual
118 | lections in this readme or elsewhere, but need to define the scope of the semester/offering. So all
119 | links to the lectures to be included can go here and will be hidden in the generated website. The
120 | referenced pages will be available in the site, however.
121 |
122 | - [Syllabus](orga/syllabus.md)
123 | - [Ressourcen](orga/resources.md)
124 | - [Prüfungsvorbereitung](orga/exams.md)
125 | :::
126 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/static/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/static/images/logo.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/static/license.html:
--------------------------------------------------------------------------------
1 | here be dragons ;)
2 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/static/links.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/static/links.html
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/file-d.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Subdir/File-D.md"
3 | ---
4 |
5 | Wuppie!
6 |
7 | [link to ../orga/grading](../orga/grading.md)
8 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/file-e.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Subdir/File-E.md"
3 | ---
4 |
5 | ## Image include
6 |
7 | Image relative path will be updated.
8 |
9 | 
10 |
11 | ## Direct include
12 |
13 | [File D in Subdir](file-d.md)
14 |
15 | ## Recursive include in subdir
16 |
17 | [Leaf/Foo.md](leaf/foo.md)
18 |
19 | [Leaf/Bar.md](leaf/bar.md)
20 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/img/c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/subdir/img/c.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/.noslides:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/subdir/leaf/.noslides
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/bar.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Single page 'Bar' in a leaf bundle"
3 | ---
4 |
5 | # Subdir/Leaf/Bar.md
6 |
7 | This is a "single page" in a "leaf bundle" and should **not** be available.
8 |
9 | 
10 |
11 | 
12 |
13 | ## Recursion: Let's include FOO
14 |
15 | [FOO (will include BAR)](foo.md)
16 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/files/NN1-Das_Perzeptron.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/subdir/leaf/files/NN1-Das_Perzeptron.pdf
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/foo.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: lecture-cy
3 | title: "Single page 'Foo' in a leaf bundle"
4 | attachments:
5 | - link: "files/NN1-Das_Perzeptron.pdf"
6 | name: "NN1-Das_Perzeptron.pdf"
7 | - link: "https://github.com/Compiler-CampusMinden/AnnotatedSlides/blob/master/lr-parser1.ann.ma.pdf"
8 | name: "Annotierte Folien: LR-Parser1"
9 | - link: "https://raw.githubusercontent.com/Compiler-CampusMinden/AnnotatedSlides/master/lr-parser1.ann.ma.pdf"
10 | name: "Annotierte Folien: LR-Parser1 (RAW)"
11 |
12 |
13 | ---
14 |
15 | # Subdir/Leaf/Foo.md
16 |
17 | This is a "single page" in a "leaf bundle" and should **not** be available.
18 |
19 | 
20 |
21 | ## Recursion: Let's include BAR
22 |
23 | [BAR (will include FOO)](bar.md)
24 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/img/b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/subdir/leaf/img/b.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/img/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/subdir/leaf/img/d.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/notlinked.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "This shouldn't show up - Not Linked"
3 | ---
4 |
5 | This page is not linked from "above" and shouldn't show up ...
6 |
7 | # Subdir/Leaf/Bar.md
8 |
9 | This is a "single page" in a "leaf bundle" and should **not** be available.
10 |
11 | 
12 |
13 | 
14 |
15 | ## Recursion: Let's include FOO
16 |
17 | [FOO (will include BAR)](foo.md)
18 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/leaf/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: "chapter"
3 | title: "Thema SubDir/Leaf"
4 | linkTitle: "SubDir/Leaf"
5 | ---
6 |
7 |
8 | `{{< children showhidden="true" >}}`{=markdown}
9 |
10 | 
11 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/notlinked/img/b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/subdir/notlinked/img/b.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/notlinked/img/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/hugo-lecture/subdir/notlinked/img/d.png
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/notlinked/nobar.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Single page - Not Linked"
3 | ---
4 |
5 | This page is not linked from "above" and shouldn't show up ...
6 |
7 |
8 |
9 | # Subdir/Leaf/Bar.md
10 |
11 | This is a "single page" in a "leaf bundle" and should **not** be available.
12 |
13 | 
14 |
15 | 
16 |
17 | ## Recursion: Let's include FOO
18 |
19 | [FOO (will include BAR)](nofoo.md)
20 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/notlinked/nofoo.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Single page - Not Linked"
3 | ---
4 |
5 | This page is not linked from "above" and shouldn't show up ...
6 |
7 |
8 | # Subdir/Leaf/Foo.md
9 |
10 | This is a "single page" in a "leaf bundle" and should **not** be available.
11 |
12 | 
13 |
14 | ## Recursion: Let's include BAR
15 |
16 | [BAR (will include FOO)](nobar.md)
17 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/notlinked/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Thema SubDir - Not Linked"
3 | ---
4 |
5 | Since we don't have any links from "above", this entire directory shouldn't show up.
6 |
7 |
8 | `{{< children showhidden="true" >}}`{=markdown}
9 |
10 | [nofoo](nofoo.md)
11 |
--------------------------------------------------------------------------------
/examples/hugo-lecture/subdir/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: "chapter"
3 | title: "Thema SubDir"
4 | linkTitle: "SubDir"
5 | ---
6 |
7 |
8 | `{{< children showhidden="true" >}}`{=markdown}
9 |
10 | [expliziter link](leaf/foo.md)
11 |
12 | 
13 |
--------------------------------------------------------------------------------
/examples/include-files/Makefile:
--------------------------------------------------------------------------------
1 |
2 | .PHONY: all
3 | ## create a single file using the include-md-filter with sources in a different (sub-) folder
4 | all:
5 | pandoc -L include_mdfiles.lua markdown/summary.md -s -t html -o test.html
6 |
7 | .PHONY: clean
8 | clean:
9 | rm -rf test.html
10 |
--------------------------------------------------------------------------------
/examples/include-files/markdown/chapt1/chapt11.md:
--------------------------------------------------------------------------------
1 | This is the text of "Chapter 1.1: Wuppie" to be included from the main document.
2 |
3 | We even can do some images:
4 |
5 | 
6 |
7 | Also code:
8 |
9 | ```c
10 | int main() {
11 | printf("Hello World from C :-)\n");
12 | }
13 | ```
14 |
--------------------------------------------------------------------------------
/examples/include-files/markdown/chapt1/chapt12.md:
--------------------------------------------------------------------------------
1 | This could be the text of "Chapter 1.2: Fluppie" to be included from the main document ...
2 |
--------------------------------------------------------------------------------
/examples/include-files/markdown/chapt1/img/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/include-files/markdown/chapt1/img/a.png
--------------------------------------------------------------------------------
/examples/include-files/markdown/summary.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Summary
3 | ---
4 |
5 |
6 | This document includes `chapt1/chapt11.md` and `chapt1/chapt12.md` using Markdown links (**on own paragraphs**).
7 |
8 | ## Chapter 1.1: Wuppie
9 |
10 | [Chapter 1.1: Wuppie](chapt1/chapt11.md)
11 |
12 | ## Chapter 1.2: Fluppie
13 |
14 | [Chapter 1.2: Fluppie](chapt1/chapt12.md)
15 |
16 | ## Chapter: Lorum Ipsum
17 |
18 | Hmmm.
19 |
20 | The preview in GitHub and VSCode will work - you can start the preview beginning with this start document and follow the links.
21 |
22 | It should also be possible to compile a complete document using e.g. `pandoc -L include_mdfiles.lua markdown/summary.md -s -t html -o test.html`: All via Markdown link referenced local Markdown files should be included in the resulting file, also all image sources should be adapted automatically.
23 |
24 | **Please note**: Each Markdown link must be in its own paragraph, otherwise it will not be taken into account by the filter.
25 |
--------------------------------------------------------------------------------
/examples/outdated/Makefile.exams:
--------------------------------------------------------------------------------
1 |
2 | ## Working directory
3 | ## In case this doesn't work, set the path manually (use absolute paths).
4 | WORKDIR = $(shell pwd)
5 |
6 |
7 |
8 | ## Pandoc
9 | ## (Defaults to docker. To use pandoc and TeX-Live directly, create an
10 | ## environment variable `PANDOC` pointing to the location of your
11 | ## pandoc installation.)
12 | PANDOC ?= docker run --rm -it -v "$(WORKDIR):/pandoc" -w "/pandoc" -u "$(shell id -u):$(shell id -g)" -e CI=true --entrypoint "pandoc" pandoc-lecture
13 |
14 |
15 |
16 | ## Data-Dir: Path to the working copy of this repository (to be used as git sub-module)
17 | ## (Note: If pandoc is used via docker container, DATADIR must be the working directory
18 | ## or a subdirectory of the working directory, as the working directory is mounted in
19 | ## the docker container! A reference to the parent folder of the working directory like
20 | ## in this example will therefore not work when using the docker container!)
21 | DATADIR = ..
22 | FILTERDIR = $(DATADIR)/filters
23 | RESOURCEDIR = $(DATADIR)/resources
24 | RESOURCEPATH = .:./figs:$(DATADIR)
25 |
26 |
27 |
28 | # Files as defined in Excel sheet
29 | XLS = bla.md blub.md wuppie.md fluppie.md foo.md
30 |
31 | SRC = $(addprefix md/, $(XLS))
32 | META = metadata.yaml
33 |
34 | PDF = exam.pdf solution.pdf
35 | TMP1 = __header.filled.tex
36 | TMP2 = __titlepage.filled.tex
37 |
38 |
39 |
40 | ## Exam options
41 |
42 | PDFOPTIONS = -f markdown
43 | PDFOPTIONS += --metadata-file=$(META)
44 | PDFOPTIONS += --pdf-engine=pdflatex
45 | PDFOPTIONS += --default-image-extension=pdf
46 | PDFOPTIONS += -V documentclass=exam
47 | PDFOPTIONS += -V classoption=addpoints
48 | PDFOPTIONS += -V fontsize=11pt -V papersize=a4
49 | PDFOPTIONS += -V geometry:left=2cm -V geometry:right=2cm -V geometry:top=2cm -V geometry:bottom=2.5cm
50 | # --toc: to compile twice
51 | PDFOPTIONS += --number-sections --toc
52 | PDFOPTIONS += --listings --highlight-style=tango
53 | PDFOPTIONS += --lua-filter=${FILTERDIR}/tex.lua
54 | PDFOPTIONS += --lua-filter=${FILTERDIR}/exams.lua
55 | PDFOPTIONS += --include-in-header=${RESOURCEDIR}/definitions.tex
56 | PDFOPTIONS += --include-after-body=${RESOURCEDIR}/exam_end.tex
57 | PDFOPTIONS += --data-dir=${DATADIR}
58 | PDFOPTIONS += --resource-path=${RESOURCEPATH}
59 |
60 |
61 |
62 | ## Targets
63 |
64 | all: $(PDF)
65 |
66 | solution.pdf: PDFOPTIONS += -V classoption=answers
67 | exam.pdf solution.pdf: $(META) $(SRC)
68 | $(PANDOC) --wrap=preserve --template=${RESOURCEDIR}/exam.tex --metadata-file=$(META) -o ${TMP1} -f markdown $(META)
69 | $(PANDOC) --wrap=preserve --template=${RESOURCEDIR}/exam_begin.tex --metadata-file=$(META) -o ${TMP2} -f markdown $(META)
70 | $(PANDOC) ${PDFOPTIONS} --include-in-header=${TMP1} --include-before-body=${TMP2} -o $@ $(SRC)
71 | rm -f ${TMP1} ${TMP2}
72 |
73 |
74 | clean:
75 | rm -f $(PDF) ${TMP1} ${TMP2}
76 |
77 |
78 | .PHONY: all clean
79 |
--------------------------------------------------------------------------------
/examples/outdated/Makefile.homework:
--------------------------------------------------------------------------------
1 |
2 | ## Working directory
3 | ## In case this doesn't work, set the path manually (use absolute paths).
4 | WORKDIR = $(shell pwd)
5 |
6 |
7 |
8 | ## Pandoc
9 | ## (Defaults to docker. To use pandoc and TeX-Live directly, create an
10 | ## environment variable `PANDOC` pointing to the location of your
11 | ## pandoc installation.)
12 | PANDOC ?= docker run --rm -it -v "$(WORKDIR):/pandoc" -w "/pandoc" -u "$(shell id -u):$(shell id -g)" -e CI=true --entrypoint "pandoc" pandoc-lecture
13 |
14 |
15 |
16 | ## Data-Dir: Path to the working copy of this repository (to be used as git sub-module)
17 | ## (Note: If pandoc is used via docker container, DATADIR must be the working directory
18 | ## or a subdirectory of the working directory, as the working directory is mounted in
19 | ## the docker container! A reference to the parent folder of the working directory like
20 | ## in this example will therefore not work when using the docker container!)
21 | DATADIR = ..
22 | RESDIR = ".:figs:$(DATADIR)"
23 |
24 |
25 |
26 | ## Source files, path prefix to sources, and lecture prefix
27 | ## either defined here (all files) or given at cmd line like `make b02`
28 | MD = md
29 | SRC = $(patsubst $(MD)/%.md,%,$(wildcard $(MD)/b*.md))
30 | ID = pm
31 |
32 |
33 |
34 | ## Options
35 | PANDOCOPTIONS = --data-dir=$(DATADIR) --resource-path=$(RESDIR)
36 | PDFOPTIONS = $(PANDOCOPTIONS) --defaults=homework.yaml
37 | ADDPOINTSOPTIONS = $(PANDOCOPTIONS) --defaults=addpoints.yaml
38 | QUESTIONSOPTIONS = $(PANDOCOPTIONS) --defaults=questions.yaml
39 |
40 |
41 |
42 | ## Targets
43 |
44 | all: $(SRC)
45 |
46 | $(SRC): %: $(ID)_%.pdf $(ID)_%_eval.pdf
47 |
48 | PDF = $(SRC:%=${ID}_%.pdf)
49 | EVAL = $(SRC:%=${ID}_%_eval.pdf)
50 | TMP1 = __titlepage.filled.tex
51 | TMP2 = __questions.filled.md
52 |
53 | $(ID)_%.pdf: $(MD)/%.md
54 | $(PANDOC) $(ADDPOINTSOPTIONS) -o $(TMP1) $<
55 | $(PANDOC) $(PDFOPTIONS) --include-in-header=$(TMP1) -o $@ $<
56 | rm -f $(TMP1)
57 |
58 | $(ID)_%_eval.pdf: $(MD)/%.md
59 | $(PANDOC) $(ADDPOINTSOPTIONS) -o $(TMP1) $<
60 | $(PANDOC) $(QUESTIONSOPTIONS) -o $(TMP2) $<
61 | $(PANDOC) $(PDFOPTIONS) --include-in-header=$(TMP1) -o $@ $(TMP2)
62 | rm -f $(TMP1) $(TMP2)
63 |
64 |
65 | clean:
66 | rm -f $(PDF) $(EVAL) $(TMP1) $(TMP2)
67 |
68 |
69 | .PHONY: all clean
70 |
--------------------------------------------------------------------------------
/examples/outdated/Makefile.lecture:
--------------------------------------------------------------------------------
1 |
2 | ## Working directory
3 | ## In case this doesn't work, set the path manually (use absolute paths).
4 | WORKDIR = $(shell pwd)
5 |
6 |
7 |
8 | ## Pandoc
9 | ## (Defaults to docker. To use pandoc and TeX-Live directly, create an
10 | ## environment variable `PANDOC` pointing to the location of your
11 | ## pandoc installation.)
12 | PANDOC ?= docker run --rm -it -v "$(WORKDIR):/pandoc" -w "/pandoc" -u "$(shell id -u):$(shell id -g)" -e CI=true --entrypoint "pandoc" pandoc-lecture
13 |
14 |
15 |
16 | ## Data-Dir: Path to the working copy of this repository (to be used as git sub-module)
17 | ## (Note: If pandoc is used via docker container, DATADIR must be the working directory
18 | ## or a subdirectory of the working directory, as the working directory is mounted in
19 | ## the docker container! A reference to the parent folder of the working directory like
20 | ## in this example will therefore not work when using the docker container!)
21 | DATADIR = ..
22 | RESDIR = ".:figs:$(DATADIR)"
23 |
24 |
25 |
26 | ## Source files, path prefix to sources, and lecture prefix
27 | ## either defined here (all files) or given at cmd line like `make vl02`
28 | MD = md
29 | SRC = $(patsubst $(MD)/%.md,%,$(wildcard $(MD)/vl*.md))
30 | ID = pm
31 |
32 |
33 |
34 | ## Options
35 | PANDOCOPTIONS = --data-dir=$(DATADIR) --resource-path=$(RESDIR)
36 | SLIDEOPTIONS = $(PANDOCOPTIONS) --defaults=beamer.yaml
37 | HTMLOPTIONS = $(PANDOCOPTIONS) --defaults=html.yaml
38 | HTMLTEMPLATEOPTIONS = $(PANDOCOPTIONS) --defaults=htmltemplate.yaml
39 |
40 |
41 |
42 | ## Targets
43 |
44 | all: $(SRC)
45 |
46 | $(SRC): %: $(ID)_%.pdf $(ID)_%.html
47 |
48 | SLIDES = $(SRC:%=$(ID)_%.pdf)
49 | HTML = $(SRC:%=$(ID)_%.html)
50 |
51 | $(ID)_%.pdf: $(MD)/%.md
52 | $(PANDOC) $(SLIDEOPTIONS) -o $@ $<
53 |
54 | $(ID)_%.html: $(MD)/%.md
55 | $(PANDOC) $(HTMLTEMPLATEOPTIONS) $< | $(PANDOC) $(HTMLOPTIONS) -o $@
56 |
57 |
58 | clean:
59 | rm -f $(SLIDES) $(HTML)
60 |
61 |
62 | .PHONY: all clean
63 |
--------------------------------------------------------------------------------
/examples/outdated/demo.bib:
--------------------------------------------------------------------------------
1 | % This file was created with JabRef 2.10.
2 | % Encoding: UTF8
3 |
4 |
5 | @Book{Aho2008,
6 | Title = {Compiler: Prinzipien, Techniken und Werkzeuge},
7 | Author = {Aho, A. V. and Lam, M. S. and Sethi, R. and Ullman, J. D.},
8 | Publisher = {Pearson Studium},
9 | Year = {2008},
10 |
11 | Url = {http://scikit-learn.org},
12 | ISBN = {978-3-8273-7097-6}
13 | }
14 |
15 | @Book{Ertel2017,
16 | Title = {Introduction to Artificial Intelligence},
17 | Author = {Ertel, Wolfgang},
18 | Publisher = {Springer},
19 | Year = {2017},
20 | Edition = {2nd edition},
21 |
22 | Doi = {10.1007/978-3-319-58487-4},
23 | ISBN = {978-3-319-58487-4}
24 | }
25 |
26 | @Book{Kubat2017,
27 | Title = {An Introduction to Machine Learning},
28 | Author = {Miroslav Kubat},
29 | Publisher = {Springer},
30 | Year = {2017},
31 | Edition = {2nd edition},
32 |
33 | Doi = {10.1007/978-3-319-63913-0},
34 | ISBN = {978-3-319-63913-0}
35 | }
36 |
37 | @Article{Pedregosa2011,
38 | Title = {Scikit-learn: Machine Learning in {P}ython},
39 | Author = {Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V.
40 | and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P.
41 | and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and
42 | Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.},
43 | Journal = {Journal of Machine Learning Research},
44 | Year = {2011},
45 | Pages = {2825--2830},
46 | Volume = {12},
47 |
48 | Url = {http://scikit-learn.org},
49 | Urldate = {2018-07-17}
50 | }
51 |
52 | @Book{Russell2014,
53 | Title = {Artificial Intelligence: A Modern Approach},
54 | Author = {Russell, Stuart, and Norvig, Peter},
55 | Publisher = {Pearson},
56 | Year = {2014},
57 | Edition = {3rd revised edition},
58 |
59 | ISBN = {978-1-292-02420-2},
60 | Url = {http://aima.cs.berkeley.edu},
61 | Urldate = {2018-07-17}
62 | }
63 |
64 | @Book{Witten2011,
65 | Title = {Data Mining: Practical Machine Learning Tools and Techniques},
66 | Author = {I. H. Witten and E. Frank and M. A. Hall},
67 | Publisher = {Morgan Kaufmann},
68 | Year = {2011},
69 |
70 | ISBN = {978-0123748560},
71 | Url = {https://www.cs.waikato.ac.nz/ml/weka/},
72 | Urldate = {2018-07-17}
73 | }
74 |
--------------------------------------------------------------------------------
/examples/outdated/figs/somefig.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/outdated/figs/somefig.pdf
--------------------------------------------------------------------------------
/examples/outdated/figs/somefig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/examples/outdated/figs/somefig.png
--------------------------------------------------------------------------------
/examples/outdated/md/bla.md:
--------------------------------------------------------------------------------
1 |
2 | ## Space for *anwers* using fenced divs with class "solution" {punkte=5}
3 |
4 | Instead of using the TeX notation for starting a question you can use
5 | a markdown header. It will be transformed into a exam question. Add
6 | the points as attribute `punkte` to the header.
7 |
8 | A level 1 header will be translated into a question with an extra
9 | `\clearpage` before.
10 |
11 | That is, the following markdown code
12 | ```markdown
13 | ## Space for *anwers* using fenced divs with class "solution" {punkte=5}
14 | ```
15 | will be transformed by the `exams.lua` filter into
16 | ```latex
17 | \myQuestion[5]{{Space for \emph{anwers} using fenced divs with class
18 | \enquote{solution} and \enquote{streifenend}}
19 | ```
20 |
21 | **Warning**: Don't do any fancy in the header! Results would be unpredictable!
22 | (Emphasis and question marks should be OK, though. Inline code with backticks
23 | does NOT work!)
24 |
25 | \bigskip
26 |
27 |
28 | Here goes the question ...
29 |
30 |
31 | Using a fenced div with class "solution" **without attributes** we can separate
32 | the question part and the answer part. The environment produces a blue/gray bar
33 | on the left side, which length depends on the amount of text within this
34 | environment.
35 |
36 | Also we can use Markdown in there ...
37 |
38 | To produce a sample solution, use `\x{...}` or `[...]{.answer}` and provide
39 | the solution as parameter/content. This will not be printed in the normal exam :)
40 |
41 |
42 | ```markdown
43 | ::: solution
44 | * Zeile 19: \x{12}
45 | \bigskip
46 | * Zeile 20: \x{A}
47 | \bigskip
48 | * Zeile 21: [42]{.answer}
49 | \bigskip
50 | * Zeile 22: \x{X}
51 | \bigskip
52 |
53 | [**je 0.5P** (*Summe 2P*)]{.answer}
54 | :::
55 | ```
56 |
57 | ::: solution
58 | * Zeile 19: \x{12}
59 | \bigskip
60 | * Zeile 20: \x{A}
61 | \bigskip
62 | * Zeile 21: [42]{.answer}
63 | \bigskip
64 | * Zeile 22: \x{X}
65 | \bigskip
66 |
67 | [**je 0.5P** (*Summe 2P*)]{.answer}
68 | :::
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/examples/outdated/md/blub.md:
--------------------------------------------------------------------------------
1 |
2 | # Space for anwers using a fenced div with class "solution" {punkte=5}
3 |
4 | Here goes the question ...
5 |
6 |
7 | Using a fenced div with class "solution" and **attribute "length"** we can separate
8 | the question part and the answer part. The environment produces a blue/gray bar
9 | on the left side, which length depends on the attribute `length` of the div.
10 |
11 | Also we can use Markdown in there ...
12 |
13 | Everything in the div will only appear in the solution sheet.
14 | This requires the `exams.lua` filter.
15 |
16 | ```markdown
17 | ::: {.solution length=60mm}
18 | This text will appear ONLY in the solution ...
19 | :::
20 | ```
21 |
22 | ::: {.solution length=60mm}
23 | This text will appear ONLY in the solution ...
24 | \vspace{50mm}
25 | :::
26 |
27 | *Note*: The `length` attribute is used to determine the length of the blank space
28 | in the exams sheet. However, in the solution sheet, the element is just as long as
29 | needed by the given content. To avoid differences in the page layout between exam
30 | and solution sheet you need to fill the unused solution space with `\vspace` as
31 | shown in the example above ...
32 |
33 |
34 | ### Fenced div with class "solution" without attributes {.unnumbered}
35 |
36 | The same fenced div *without* the attribute `length` will just draw the
37 | blue/gray stripe to the left side and always present the content:
38 |
39 | ```markdown
40 | ::: {.solution}
41 | This text will appear in the exam as well as in the solution ...
42 |
43 | Length Height A Height B Class
44 | -------------- ------------ ------------- --------
45 | \x{2.0} \x{2.0} 10.0 \x{A}
46 | 5.0 4.0 40.0 B
47 | 0.8 \x{0.4} \x{4.5} \x{C}
48 | 1.4 2.0 15.0 A
49 |
50 | :::
51 | ```
52 |
53 | ::: {.solution}
54 | This text will appear in the exam as well as in the solution ...
55 |
56 | Length Height A Height B Class
57 | -------------- ------------ ------------- --------
58 | \x{2.0} \x{2.0} 10.0 \x{A}
59 | 5.0 4.0 40.0 B
60 | 0.8 \x{0.4} \x{4.5} \x{C}
61 | 1.4 2.0 15.0 A
62 |
63 | Unfortunately, Pandoc still uses `longtable`, which cannot be
64 | used inside a minipage (which is used here to produce the
65 | blue/gray marker on the left side). Thus we need to handle
66 | markdown tables in the filter and translate it to simple
67 | LaTeX `tabular` ...
68 |
69 | :::
70 |
71 | This is usefull for "Fill in the blank" questions.
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/examples/outdated/md/fluppie.md:
--------------------------------------------------------------------------------
1 |
2 | # Long questions {punkte=5}
3 |
4 | * You can combine the mentioned environments.
5 |
6 | * In case a question needs to start on a new page, use a level 1 header
7 | (otherwise start a question with a level 2 header).
8 |
9 | * If you want a page break *after* the question, end the question with
10 | `\clearpage`.
11 |
12 |
13 | \Fortsetzung
14 | \clearpage
15 |
16 |
17 | * If the question is really long, you can indicate this using the `\Fortsetzung`
18 | LaTeX macro. This prints the string "Fortsetzung" at the bottom of the page
19 | to indicate the continuation of the question on the next page to the students.
20 |
21 | Note, currently this is not equivalent to a `\clearpage`, i.e. you need to
22 | use an explicit `\clearpage`.
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/examples/outdated/md/foo.md:
--------------------------------------------------------------------------------
1 |
2 | # Support for "choices" {punkte=8}
3 |
4 | There are four environments to create multiple choice questions in the `exam` class: `choices`, `oneparchoices`,
5 | `checkboxes`, and `oneparcheckboxes` (cf.
6 | [exam documentation, Chap. 5 "Multiple choice ..."](http://www-math.mit.edu/~psh/exam/examdoc.pdf)).
7 |
8 | Each of these environments can be created by using a corresponding div, which will be transformed by the `exams.lua`
9 | filter into the LaTeX environment with a blue/gray bar on the left side. Using a fenced div you can use markdown
10 | formatting inside the answers.
11 |
12 | Each line constitutes a possible answer. Use a span with class `ok` (or `CorrectChoice`) for correct answers and
13 | a span with class `nok` (or `choice`) for wrong answers. In the sample solution, all correct answers are marked.
14 |
15 | *Note*: Since the `exam` class is used, you can also use the original environments as raw LaTeX, e.g. `\begin{choices}
16 | ... \end{choices}`. However, Pandoc would not parse any Markdown inside this environments ...
17 |
18 |
19 | * Choices
20 |
21 | ```markdown
22 | ::: choices
23 | [... blablabla.]{.nok}
24 | [... **wuppie** :)]{.choice}
25 | [... *fluppie.*]{.nok}
26 | [... `foobar`.]{.ok}
27 | :::
28 | ```
29 |
30 | ::: choices
31 | [... blablabla.]{.nok}
32 | [... **wuppie** :)]{.choice}
33 | [... *fluppie.*]{.nok}
34 | [... `foobar`.]{.ok}
35 | :::
36 |
37 |
38 | * Oneparchoices
39 |
40 | ```markdown
41 | ::: oneparchoices
42 | [... blablabla.]{.nok}
43 | [... **wuppie** :)]{.choice}
44 | [... *fluppie.*]{.nok}
45 | [... `foobar`.]{.CorrectChoice}
46 | :::
47 | ```
48 |
49 | ::: oneparchoices
50 | [... blablabla.]{.nok}
51 | [... **wuppie** :)]{.choice}
52 | [... *fluppie.*]{.nok}
53 | [... `foobar`.]{.CorrectChoice}
54 | :::
55 |
56 |
57 | * Checkboxes
58 |
59 | ```markdown
60 | ::: checkboxes
61 | [... blablabla.]{.nok}
62 | [... **wuppie** :)]{.choice}
63 | [... *fluppie.*]{.nok}
64 | [... `foobar`.]{.ok}
65 | :::
66 | ```
67 |
68 | ::: checkboxes
69 | [... blablabla.]{.nok}
70 | [... **wuppie** :)]{.choice}
71 | [... *fluppie.*]{.nok}
72 | [... `foobar`.]{.ok}
73 | :::
74 |
75 |
76 | * Oneparcheckboxes
77 |
78 | ```markdown
79 | ::: oneparcheckboxes
80 | [... blablabla.]{.nok}
81 | [... **wuppie** :)]{.choice}
82 | [... *fluppie.*]{.nok}
83 | [... `foobar`.]{.CorrectChoice}
84 | :::
85 | ```
86 |
87 | ::: oneparcheckboxes
88 | [... blablabla.]{.nok}
89 | [... **wuppie** :)]{.choice}
90 | [... *fluppie.*]{.nok}
91 | [... `foobar`.]{.CorrectChoice}
92 | :::
93 |
--------------------------------------------------------------------------------
/examples/outdated/md/lecture_template.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Thema: ggf. Fokus"
3 | keywords: "xxx, xxx, xxx"
4 | ...
5 |
6 |
7 |
8 |
9 |
10 | ---
11 | tldr: |
12 | tbd
13 |
14 | screencast-iframe-url: TODO
15 |
16 | screencast-direct-link: TODO
17 | ...
18 |
19 |
20 |
21 |
22 |
23 | # Thema: Überschrift (kurz)
24 |
25 |
26 |
27 |
28 |
29 |
30 | ## Folie 1
31 |
32 | tbd
33 |
34 |
35 | ## Folie 2
36 |
37 | tbd
38 |
39 |
40 | ## Folie 3
41 |
42 | tbd
43 |
44 |
45 | ## Folie 4
46 |
47 | tbd
48 |
49 |
50 | ## Folie 5
51 |
52 | tbd
53 |
54 |
55 | ::: notes
56 | ## Wrap-Up
57 |
58 |
59 |
60 | tbd
61 | :::
62 |
63 |
64 |
65 |
66 |
67 | ---
68 | bib: |
69 | * tbd
70 | ...
71 |
72 |
73 |
74 | ---
75 | outcomes:
76 | k1: |
77 | * tbd
78 |
79 | k2: |
80 | * tbd
81 |
82 | k3: |
83 | * tbd
84 | ...
85 |
86 |
87 |
88 | ---
89 | quizzes: |
90 | tbd
91 | ...
92 |
93 |
94 |
95 | ---
96 | challenges: |
97 | tbd
98 |
99 | ## "Show me" button to reveal initially hidden content
100 |
101 | * Question 1: Wuppie?
102 |
103 | ::: showme
104 | Wuppie
105 | :::
106 |
107 | * Question 2: Foo!
108 |
109 | ::: {.showme #FOO}
110 | Fluppie
111 |
112 | Bar, too!
113 | :::
114 | ...
115 |
--------------------------------------------------------------------------------
/examples/outdated/md/wuppie.md:
--------------------------------------------------------------------------------
1 |
2 | # Multiple Choice with "mc" div {punkte=8}
3 |
4 | Instead of using the TeX notation for starting a question you can use
5 | a markdown header. It will be transformed into a exam question. Add
6 | the points as attribute `punkte` to the header.
7 |
8 | A level 1 header will be translated into a question with an extra
9 | `\clearpage` before.
10 |
11 | That is, the following markdown code
12 | ```markdown
13 | # Multiple Choice with "mc" div {punkte=8}
14 | ```
15 | will be transformed by the `exams.lua` filter into
16 | ```latex
17 | \clearpage
18 | \myQuestion[8]{Multiple Choice with \enquote{mc} div}
19 | ```
20 |
21 | **Warning**: Don't do any fancy in the header! Results would be unpredictable!
22 | (Emphasis and question marks should be OK, though. Inline code with backticks
23 | does NOT work!)
24 |
25 | \bigskip
26 |
27 |
28 | Here goes the question ...
29 |
30 | ::: center
31 | {width=60mm}\
32 | :::
33 |
34 | For multiple choice questions use a `mc` div, which will be transformed by
35 | the `exams.lua` filter into a customized LaTeX table with a blue/gray bar
36 | on the left side. The parameters are the column headers for correct and wrong
37 | answers/choices.
38 |
39 | Each line constitutes a possible answer. Use a span with class `ok` for
40 | correct answers and a span with class `nok` for wrong answers. The content
41 | will not appear in the normal exam version. In the sample solution, all
42 | correct answers are marked.
43 |
44 | (Keep in mind, in the end it is just a customized LaTeX table).
45 |
46 | ```markdown
47 | ::: {.mc ok="CorrecT" nok="wrOng" points="**je 0.5P** (*Summe 2P*)"}
48 | [... blablabla.]{.nok}
49 | [... **wuppie** :)]{.ok}
50 | [... *fluppie.*]{.nok}
51 | [... `foobar`.]{.nok}
52 | :::
53 | ```
54 |
55 | ::: {.mc ok="CorrecT" nok="wrOng" points="**je 0.5P** (*Summe 2P*)"}
56 | [... blablabla.]{.nok}
57 | [... **wuppie** :)]{.ok}
58 | [... *fluppie.*]{.nok}
59 | [... `foobar`.]{.nok}
60 | :::
61 |
62 | Using a fenced div you can use markdown formatting inside the answers.
63 |
64 | **Warning**: The `mc` div and all contained `ok`/`nok` spans are translated into a
65 | LaTeX table. Make sure to **only** use `ok`/`nok` spans inside the `mc` div! Doing
66 | otherwise will produce TeX errors ...
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/examples/outdated/metadata.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # used for lecture slides and homework sheets
3 | subtitle: "Modulenumber Moduletitle, Year"
4 | author: "Author (Institute)"
5 | lang: de-DE
6 | bibliography: demo.bib
7 | link-citations: true
8 | home: "pm_vl01.html#home-button"
9 |
10 | # additional entries for exams
11 | LVKURZ: "Modulenumber ModuleSHORT, Year"
12 | NR: "Exam No."
13 | ...
14 |
--------------------------------------------------------------------------------
/filters/addpoints.lua:
--------------------------------------------------------------------------------
1 |
2 | -- count of all points
3 | local points = 0
4 |
5 |
6 | -- add points of headers with attributes `{punkte=42}`
7 | function addPoints(el)
8 | points = points + (tonumber(el.attributes["punkte"]) or 0)
9 | end
10 |
11 |
12 | -- check `points` field in global metadata
13 | function checkPoints(meta)
14 | if meta.points or points > 0 then
15 | -- meta.points is either nil, MetaString or MetaInlines
16 | local mpts = (type(meta.points) == "table" and pandoc.utils.stringify(meta.points)) or meta.points or "NO"
17 | if tonumber(mpts) ~= points then
18 | -- check expectation and real value
19 | io.stderr:write("\n\n" .. "Expected " .. mpts .. " points.\n")
20 | io.stderr:write("Found " .. points .. " points!" .. '\n\n\n')
21 | end
22 | end
23 | end
24 |
25 |
26 | return {
27 | { Header = addPoints }, -- First run: add up all points
28 | { Meta = checkPoints } -- Second run: check with points in metadata
29 | }
30 |
--------------------------------------------------------------------------------
/filters/blueArrow.lua:
--------------------------------------------------------------------------------
1 |
2 | -- helper function to create span for blue arrows
3 | local function blueArrow()
4 | -- `return pandoc.Span('=> ', {class = 'blueArrow'})` would be shorter, but
5 | -- results in ugly space with style "blueArrow" after the blue arrow ...
6 | -- now the space is just in normal style and thus much smaller
7 | return { pandoc.Span('=>', {class = 'blueArrow'}), pandoc.Space() }
8 | end
9 |
10 |
11 | -- helper function (DRY)
12 | local function isTexAndArrow(el)
13 | if el.format == "tex" or el.format == "latex" then
14 | if el.text:match("\\blueArrow") then
15 | return true
16 | end
17 | end
18 | return false
19 | end
20 |
21 |
22 | -- handling of `\blueArrow` ... (RawInline, tex)
23 | function Inline(el)
24 | if isTexAndArrow(el) then
25 | return blueArrow()
26 | end
27 | end
28 |
29 |
30 | -- handling of `\blueArrow` ... (RawBlock, tex)
31 | function Block(el)
32 | if isTexAndArrow(el) then
33 | return pandoc.Plain(blueArrow())
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/filters/deprecated.lua:
--------------------------------------------------------------------------------
1 |
2 | -- Issue a warning if users use elements that are no longer supported (spans, divs, classes, ...)
3 |
4 | local function warning(w)
5 | io.stderr:write("\n\n" .. "[WARNING: ]" .. w .. "\n\n")
6 | end
7 |
8 |
9 | function Span(el)
10 | if el.classes[1] == "cbox" then
11 | warning("Span `cbox`: `[...]{.cbox}` is no longer supported => please use Div `cbox` instead (`::: cbox ... :::`)")
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/filters/extract_filewise.lua:
--------------------------------------------------------------------------------
1 | ---@diagnostic disable: lowercase-global
2 | ---@diagnostic disable: undefined-global
3 | --
4 | -- extract_filewise.lua
5 | --
6 | -- This filter will extract the title from a meta block
7 | -- and all headings
8 | --
9 | -- If the file is an "_index.md" file, it is a top-level
10 | -- topic landing page, which can be used to extract the
11 | -- chapter-name
12 |
13 | pandoc.utils = require 'pandoc.utils'
14 | pandoc.path = require 'pandoc.path'
15 | blocks = {}
16 | skip = false
17 |
18 | function header(header)
19 | -- header level 1 is used for topics ("lexer", "parser")
20 | -- header level 2 is used for chapters("LL-Parsing", "LR-Parsing")
21 | header.level = header.level + 2
22 | table.insert(blocks, header)
23 | end
24 |
25 | function meta(meta)
26 | local input_file = PANDOC_STATE.input_files
27 | local input_file_as_str = pandoc.utils.stringify(input_file)
28 | print("Called filewise_filter for: " .. input_file_as_str)
29 |
30 | local split_path = pandoc.path.split(input_file_as_str)
31 | local path_length = 0
32 | for _ in pairs(split_path) do path_length = path_length + 1 end
33 |
34 | local directory = pandoc.path.directory(input_file_as_str)
35 | local file_name = pandoc.path.filename(input_file_as_str)
36 | local is_index = file_name == "_index.md"
37 | local is_index_str = pandoc.utils.stringify(is_index)
38 |
39 | -- "ternary operator"
40 | -- _index.md files are used for topmost chapter names
41 | local level = is_index and 1 or 2
42 |
43 | -- skip files with hidden attribute or no title
44 | if (meta.hidden ~= nil and meta.hidden == true) then
45 | print("Skipping file due to 'hidden' attribute")
46 | skip = true
47 | elseif (meta.title == nil) then
48 | print("Skipping file due to missing title")
49 | skip = true
50 | else
51 | local weight = meta.weight ~= nil and pandoc.utils.stringify(meta.weight) or "0"
52 | local title = meta.title ~= nil and pandoc.utils.stringify(meta.title) or "no title"
53 | local meta_header =
54 | pandoc.Header(
55 | level,
56 | title,
57 | {
58 | chapter_weight=weight,
59 | dir=directory,
60 | is_index=is_index_str
61 | })
62 | table.insert(blocks, meta_header)
63 | end
64 | end
65 |
66 | ---@diagnostic disable-next-line: unused-local
67 | function document(doc)
68 | if (skip) then
69 | return pandoc.Pandoc({})
70 | else
71 | return pandoc.Pandoc(blocks)
72 | end
73 | end
74 |
75 | return {
76 | traverse = 'topdown',
77 | { Meta = meta },
78 | { Header = header},
79 | { Pandoc = document},
80 | }
81 |
--------------------------------------------------------------------------------
/filters/fhbib.lua:
--------------------------------------------------------------------------------
1 |
2 | -- translate ISBN links generated by citeproc
3 | -- (needs to be run *after* citeproc)
4 | --
5 | -- reference to ISBN 12345 would be linked to https://worldcat.org/isbn/12345
6 | -- my students would rather like to know availability in university library,
7 | -- thus change generated URL to https://www.digibib.net/openurl/Bi10?isbn=12345
8 | -- 03/2023: the URL apparently changed to https://fhb-bielefeld.digibib.net/openurl?isbn=12345 (?)
9 | function Link(el)
10 | el.target = el.target:gsub("^https://worldcat.org/isbn/(%d[0-9%-]+%d)$", "https://fhb-bielefeld.digibib.net/openurl?isbn=%1")
11 | return el
12 | end
13 |
--------------------------------------------------------------------------------
/filters/headertotask.lua:
--------------------------------------------------------------------------------
1 |
2 | -- add some TeX code to headers with `{punkte=42}`
3 | function Header(el)
4 | local p = tonumber(el.attributes["punkte"]) or 0
5 |
6 | if p > 0 then
7 | el.content:extend { pandoc.Space(), pandoc.RawInline("latex", "\\hfill"),
8 | pandoc.Space(), pandoc.Str("(" .. p), pandoc.Space(),
9 | pandoc.Str("Punkt" .. (p > 1 and "e" or "") .. ")") }
10 | end
11 |
12 | return el
13 | end
14 |
--------------------------------------------------------------------------------
/filters/home.lua:
--------------------------------------------------------------------------------
1 |
2 | -- add HOME-Button
3 | -- if MetaString/MetaInlines "home" is present, inject a block (para) containing a link to the URI in meta.home
4 | function Pandoc(doc)
5 | local meta = doc.meta
6 | local blocks = doc.blocks
7 |
8 | -- meta.home is either nil, MetaString or MetaInlines
9 | local home = (type(meta.home) == "table" and pandoc.utils.stringify(meta.home)) or meta.home or nil
10 | if home then
11 | blocks:extend { pandoc.Para(pandoc.Link('HOME', home, 'HOME', {class = 'home-btn'})) }
12 | end
13 |
14 | return pandoc.Pandoc(blocks, meta)
15 | end
16 |
--------------------------------------------------------------------------------
/filters/hugo_rewritelinks.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | All 'readme.md' will be transformed into '_index.md', any other Markdown file 'file.md' will be
3 | transformed into 'file/_index.md' (see 'hugo_makedeps.lua').
4 |
5 | This filter will adapt the image sources (1) and the link targets (2) in a Markdown file so that
6 | Hugo can build a web page from it.
7 |
8 | (1) The Hugo Relearn Theme expects all resources on the same level as the '_index.md' for a page.
9 | Thus all local images will be copied to the respective folders (via 'hugo_makedeps.lua' and some
10 | Makefile magic). Here we just need to adjust all image sources and remove any path elements:
11 | replace `` with `` for all local image files.
12 |
13 | (2) Hugo's ref shortcode tries to resolve paths without a leading '/' first relative to the current
14 | page, then to the rest of the site. As long as all pages have a _unique name_, we can also simply
15 | use the name of the page. Index pages ('_index.md') must be referenced via their toplevel folder.
16 |
17 | All files will be transformed during processing (see 'hugo_makedeps.lua'):
18 | - 'subdir/file-a.md' will become 'subdir/file-a/_index.md'
19 | - 'subdir/readme.md' will become 'subdir/_index.md'
20 |
21 | Since "subdir" might contain something like "../", we would have to resolve this first. However,
22 | as Hugo's ref shortcode can also resolve just the filename without a path, we can skip this effort
23 | and just replace the path with the filename. For index files ('readme.md'), we have to extract the
24 | last folder.
25 |
26 | Thus this filter needs to perform for any link in any Markdown file:
27 | - replace `[Y](subdir/file-a.md)` with `[Y]({{< ref "file-a" >}})`
28 | - replace `[Y](subdir/readme.md)` with `[Y]({{< ref "subdir" >}})`
29 | - replace `[Y](readme.md)` with `[Y]({{< ref "/" >}})` (might work with Hugo)
30 |
31 |
32 | Usage: This filter is intended to be used with individual files that are placed either directly in
33 | the working directory or in a subdirectory.
34 | Examples:
35 | pandoc -L hugo_rewritelinks.lua -t markdown readme.md
36 | pandoc -L hugo_rewritelinks.lua -t markdown test/readme.md
37 | pandoc -L hugo_rewritelinks.lua -t markdown test/subdir/leaf/foo.md
38 |
39 |
40 | Caveats (see 'hugo_makedeps.lua'):
41 | (a) All referenced Markdown files must have UNIQUE NAMES.
42 | (b) References to the top index page (landing page) are (presumably) not working.
43 | ]]--
44 |
45 |
46 | -- vars
47 | local INDEX_MD = "readme" -- name of the readme.md files (w/o extension)
48 | local WARP = nil -- string to be removed from path, e.g. 'markdown'
49 |
50 |
51 | -- helper
52 | local function _is_local_path (path)
53 | return pandoc.path.is_relative(path) and -- is relative path
54 | not path:match('https?://.*') -- is not http(s)
55 | end
56 |
57 | local function _is_local_markdown_file_link (inline)
58 | return inline and
59 | inline.t and
60 | inline.t == "Link" and -- is pandoc.Link
61 | inline.target:match('.*%.md') and -- is markdown
62 | _is_local_path(inline.target) -- is relative & not http(s)
63 | end
64 |
65 |
66 | -- filter: replace `` with ``
67 | local function _fix_img_src (img)
68 | if _is_local_path(img.src) then
69 | img.src = pandoc.path.filename(img.src)
70 | return img
71 | end
72 | end
73 |
74 | -- filter: replace `[Y](subdir/file-a.md)` with `[Y]({{< ref "file-a" >}})`
75 | -- filter: replace `[Y](subdir/readme.md)` with `[Y]({{< ref "subdir" >}})`
76 | local function _process_links (link)
77 | local target = link.target
78 | local content = pandoc.utils.stringify(link.content)
79 |
80 | if _is_local_markdown_file_link(link) then
81 | -- remove folder names if requested, e.g. remove 'subdir/' from the target path
82 | if WARP and WARP ~= "" then
83 | target = target:gsub(WARP.."/", "")
84 | end
85 |
86 | -- get file name (w/o extension) and all parts of the path
87 | local dir = pandoc.path.split(pandoc.path.directory(target)) -- 'foo.md' => {'.'}; 'sub/foo.md' => {'sub'}; './sub/foo.md' => {'.', 'sub'};
88 | local name, _ = pandoc.path.split_extension(pandoc.path.filename(target))
89 |
90 | -- resolve 'readme' to name of parent folder or "/"; use file name otherwise
91 | if name == INDEX_MD then
92 | target = (#dir >= 1 and dir[#dir] ~= ".") and dir[#dir] or "/" -- readme.md: use parent folder or '/'
93 | else
94 | target = name -- ordinary file: use it's name w/o extension
95 | end
96 |
97 | -- emit corresponding Hugo shortcode 'ref'
98 | return pandoc.RawInline('markdown', '[' .. content .. ']({{% relref "' .. target .. '" %}})')
99 | end
100 | end
101 |
102 |
103 | -- main filter function
104 | function Pandoc (doc)
105 | INDEX_MD = doc.meta.indexMD or "readme" -- name of the readme.md files (w/o extension): meta.indexMD
106 | WARP = doc.meta.warp or nil -- string to be removed from path, e.g. 'markdown'
107 |
108 | -- process all images and links
109 | return pandoc.Pandoc(doc.blocks:walk({ Image = _fix_img_src, Link = _process_links }), doc.meta)
110 | end
111 |
--------------------------------------------------------------------------------
/filters/include_mdfiles.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | include_mdfiles.lua – filter to include local Markdown files via links
3 |
4 | for each link to local Markdown file in start document:
5 | (1) read file
6 | (2) "fix" links to local images, i.e. prepend include path
7 | (3) process links to local Markdown files in paragraphs and include content (recursively)
8 | - foreach Para:
9 | - prepare new empty block list (result), add new current block (empty Para)
10 | - foreach inline in current Para:
11 | - if not link: append inline to current block's content
12 | - if link:
13 | - read link.target (file), process content and append resulting blocks to block list
14 | - add new current block (empty Para) for remaining inlines of current block
15 | - return block list to replace current Para
16 |
17 |
18 | Usage: This filter is intended to be used with individual files that are placed either directly
19 | in the working directory or in a subdirectory.
20 | Examples:
21 | pandoc -L include_mdfiles.lua -t markdown readme.md
22 | pandoc -L include_mdfiles.lua -t markdown subdir/leaf/readme.md
23 |
24 |
25 | Credits: Work on this filter was partially inspired by some ideas shared in "include-files"
26 | (https://github.com/pandoc/lua-filters/blob/master/include-files/include-files.lua, by Albert
27 | Krewinkel (@tarleb), license: MIT). The 'include_mdfiles.lua' filter has been developed by us
28 | from scratch and is neither based on nor contains any third-party code.
29 |
30 |
31 | Caveats:
32 | The same file cannot be included more than once to avoid potential endless recursion.
33 | ]]--
34 |
35 |
36 | -- vars
37 | local ROOT = "." -- absolute path to working directory when starting
38 | local frontier = {} -- set of visited paths to avoid including the same file several times
39 |
40 |
41 | -- helper
42 | local function _is_local_path (path)
43 | return pandoc.path.is_relative(path) and -- is relative path
44 | not path:match('https?://.*') -- is not http(s)
45 | end
46 |
47 | local function _is_local_markdown_file_link (inline)
48 | return inline and
49 | inline.t and
50 | inline.t == "Link" and -- is pandoc.Link
51 | inline.target:match('.*%.md') and -- is markdown
52 | _is_local_path(inline.target) -- is relative & not http(s)
53 | end
54 |
55 | local function _prepend_include_path (path)
56 | local include_path = pandoc.path.make_relative(pandoc.system.get_working_directory(), ROOT)
57 | return pandoc.path.normalize(pandoc.path.join({ include_path, path }))
58 | end
59 |
60 |
61 | -- filter: prepend current include path to image source
62 | local function _fix_img_src (img)
63 | if _is_local_path(img.src) then
64 | img.src = _prepend_include_path(img.src)
65 | return img
66 | end
67 | end
68 |
69 | -- filter: process any links contained in paragraph
70 | local function _process_links_in_para (para)
71 | local block_list = pandoc.List:new()
72 | local current_block = pandoc.Para({})
73 | block_list:insert(current_block)
74 |
75 | for _,i in ipairs(para.content) do
76 | if _is_local_markdown_file_link(i) then
77 | -- process link target
78 | block_list:extend(_handle_file(i.target))
79 |
80 | -- "close" current block and open new one for any remaining inlines in current block 'para'
81 | current_block = pandoc.Para({})
82 | block_list:insert(current_block)
83 | else
84 | -- copy inline into block content
85 | current_block.content:insert(i)
86 | end
87 | end
88 |
89 | return block_list
90 | end
91 |
92 |
93 | -- process all blocks in context of target's directory
94 | local function _filter_blocks_in_dir (blocks, target)
95 | -- change into directory of 'target' to resolve potential '../' in path
96 | return pandoc.system.with_working_directory(
97 | pandoc.path.directory(target), -- may still contain '../'
98 | function ()
99 | -- same as 'pandoc.path.directory(target)' but w/o '../' since Pandoc cd'ed here
100 | local target = _prepend_include_path(pandoc.path.filename(target))
101 |
102 | if not frontier[target] then
103 | -- remember this file (path w/o '../')
104 | frontier[target] = true
105 | -- process this file, i.e. it's blocks
106 | return blocks:walk({ Image = _fix_img_src, Para = _process_links_in_para })
107 | else
108 | io.stderr:write("\t (_filter_blocks_in_dir) WARNING: file has been included before '" .. target .. "' ... skipping ... \n")
109 | return pandoc.List:new()
110 | end
111 | end)
112 | end
113 |
114 | -- open file and read content (and parse recursively and return list of blocks via '_filter_blocks_in_dir')
115 | function _handle_file (target)
116 | local fh = io.open(target, "r")
117 | if not fh then
118 | io.stderr:write("\t (_handle_file) WARNING: cannot open file '" .. target .. "' ... skipping ... \n")
119 | return pandoc.List:new()
120 | else
121 | local blocks = pandoc.read(fh:read "*all", "markdown", PANDOC_READER_OPTIONS).blocks
122 | fh:close()
123 |
124 | return _filter_blocks_in_dir(blocks, target)
125 | end
126 | end
127 |
128 |
129 | -- main filter function
130 | function Pandoc (doc)
131 | -- remember our project root
132 | ROOT = pandoc.system.get_working_directory()
133 |
134 | -- get filename (input file)
135 | local input_files = PANDOC_STATE.input_files
136 | local file = #input_files >= 1 and input_files[#input_files] or "."
137 |
138 | -- process all images and links (recursively)
139 | return pandoc.Pandoc(_handle_file(file), doc.meta)
140 | end
141 |
--------------------------------------------------------------------------------
/filters/prepareHandout.lua:
--------------------------------------------------------------------------------
1 |
2 | -- prepare HTML handouts:
3 | -- (a) remove any slide Spans or Divs including content
4 | -- (b) remove notes Spans oder Divs, but keep content
5 | -- rationale: w/o this filter content would appear in generated html but not in toc
6 |
7 |
8 | local function prepareHandout(el)
9 | -- completely remove slides
10 | if el.classes[1] == "slides" then
11 | return {}
12 | end
13 |
14 | -- remove notes (Span, Div), return content
15 | if el.classes[1] == "notes" then
16 | return el.content
17 | end
18 | end
19 |
20 |
21 | function Span(el)
22 | return prepareHandout(el)
23 | end
24 |
25 |
26 | function Div(el)
27 | return prepareHandout(el)
28 | end
29 |
--------------------------------------------------------------------------------
/filters/prepareSlides.lua:
--------------------------------------------------------------------------------
1 |
2 | -- prepare Beamer slides:
3 | -- (a) remove any notes Spans or Divs including content
4 | -- (b) remove slides Spans oder Divs, but keep content
5 | -- rationale: w/o this filter TeX content would not be processed correctly
6 |
7 |
8 | local function prepareSlides(el)
9 | -- completely remove notes
10 | if el.classes[1] == "notes" then
11 | return {}
12 | end
13 |
14 | -- remove slides (Span, Div), return content
15 | if el.classes[1] == "slides" then
16 | return el.content
17 | end
18 | end
19 |
20 |
21 | function Span(el)
22 | return prepareSlides(el)
23 | end
24 |
25 |
26 | function Div(el)
27 | return prepareSlides(el)
28 | end
29 |
--------------------------------------------------------------------------------
/filters/questions.lua:
--------------------------------------------------------------------------------
1 |
2 | -- collect all questions
3 | local questions = {}
4 |
5 |
6 | -- generate table of all question headers
7 | function collectQuestionHeaders(el)
8 | local p = tonumber(el.attributes["punkte"]) or 0
9 |
10 | -- collect only questions with points ...
11 | if p > 0 then
12 | questions[#questions + 1] = pandoc.MetaInlines(el.content .. {pandoc.Space(), pandoc.Str("(" .. p .. "P)")})
13 | end
14 | end
15 |
16 |
17 | -- set question metadata (if requested)
18 | function setQuestionMetadata(meta)
19 | meta["questions"] = pandoc.MetaList(questions)
20 |
21 | return meta
22 | end
23 |
24 |
25 | return {
26 | { Header = collectQuestionHeaders }, -- First run: collect all questions
27 | { Meta = setQuestionMetadata } -- Second run: add questions to metadata
28 | }
29 |
--------------------------------------------------------------------------------
/filters/removeMetadata.lua:
--------------------------------------------------------------------------------
1 | -- Remove all metadata from document
2 |
3 | function Pandoc(doc)
4 | return pandoc.Pandoc(doc.blocks)
5 | end
6 |
--------------------------------------------------------------------------------
/filters/showme.lua:
--------------------------------------------------------------------------------
1 |
2 | -- prepare toggle elements in HTML handouts:
3 | -- (a) detect Divs with class "showme"
4 | -- (b) return list of label/input to allow for toggle plus new Div with original content
5 | -- (c) use as label text "Show me" or identifier of Div
6 |
7 |
8 | -- count of toogles
9 | local count = 0
10 |
11 |
12 | function Div(el)
13 | if el.classes[1] == "showme" then
14 | local label = (el.identifier == "" and "Show me") or el.identifier
15 | count = count + 1
16 |
17 | return { pandoc.RawBlock ("html5", ""),
18 | pandoc.RawBlock ("html5", ""),
19 | pandoc.Div(el.content, {class = 'expandable'}) }
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/filters/stripImageAttrs.lua:
--------------------------------------------------------------------------------
1 |
2 | -- strip scaling information from images attrs
3 | --
4 | -- the images are often explicitly scaled based using absolute dimensions in
5 | -- the markdown sources, which is quite usefull when emitting beamer slides (pdf).
6 | -- however, absolute dimensions can cause problems when generating html, as this
7 | -- will not match the rest of the style (e.g. page width).
8 | --
9 | -- we are therefore temporarily using manually scaled png images for more predictable
10 | -- results in html: save png at width=600px (max. 800px), downscaling is done via CSS
11 | --
12 | -- strip also "width" from Div (div.column) to avoid column overlap on small screens
13 |
14 | function Image(el)
15 | el.attributes["scale"] = nil
16 | el.attributes["width"] = nil
17 | el.attributes["height"] = nil
18 |
19 | return el
20 | end
21 |
22 |
23 | function Div(el)
24 | el.attributes["width"] = nil
25 |
26 | return el
27 | end
28 |
--------------------------------------------------------------------------------
/filters/test/bsp_span.md:
--------------------------------------------------------------------------------
1 | ## Vorlesung
2 |
3 | [Badge (non-interactive)]{.bsp}
4 |
5 | [Button (interactive)]{.bsp href="https://github.com/cagix/pandoc-lecture/pull/171"}
6 |
7 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [ILIAS]**)
8 |
9 | [**Badge** (_non-interactive_)]{.bsp}
10 |
11 | [**Button** (_interactive_)]{.bsp href="https://github.com/cagix/pandoc-lecture/pull/171"}
12 |
13 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [Moodle]**)
14 |
--------------------------------------------------------------------------------
/filters/test/cbox_div.md:
--------------------------------------------------------------------------------
1 | ## Vorlesung
2 |
3 | ::: cbox
4 | A simple text to be centred and accentuated
5 | :::
6 |
7 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [ILIAS]**)
8 |
9 | ::: cbox
10 | A **simple** text to be _centred_ and [accentuated]{.alert}
11 | :::
12 |
13 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [Moodle]**)
14 |
--------------------------------------------------------------------------------
/filters/test/codeblocks.md:
--------------------------------------------------------------------------------
1 | wuppie fluppie
2 |
3 | ```java
4 | class Foo {}
5 | ```
6 |
7 | foo bar
8 |
9 | ``` {.haskell size="tiny"}
10 | class Monad m where
11 | (>>=) :: m a -> (a -> m b) -> m b
12 | return :: a -> m a
13 | ```
14 |
15 | lorem ipsum
16 |
17 | `void` is to be expected.
18 |
19 | `void`{.c}: same but highlighting.
20 |
--------------------------------------------------------------------------------
/filters/test/expected_bsp_span.native:
--------------------------------------------------------------------------------
1 | [ Header 2 ( "vorlesung" , [] , [] ) [ Str "Vorlesung" ]
2 | , Para
3 | [ RawInline
4 | (Format "markdown") ""
5 | , RawInline
6 | (Format "markdown") "{{% badge style=\"default\" %}}"
7 | , Str "Badge"
8 | , Space
9 | , Str "(non-interactive)"
10 | , RawInline (Format "markdown") "{{% /badge %}}"
11 | , RawInline (Format "markdown") "
"
12 | ]
13 | , Para
14 | [ RawInline
15 | (Format "markdown") ""
16 | , RawInline
17 | (Format "markdown")
18 | "{{% button style=\"default\" href=\"https://github.com/cagix/pandoc-lecture/pull/171\" %}}"
19 | , Str "Button"
20 | , Space
21 | , Str "(interactive)"
22 | , RawInline (Format "markdown") "{{% /button %}}"
23 | , RawInline (Format "markdown") "
"
24 | ]
25 | , Para
26 | [ Str "Durchf\252hrung"
27 | , Space
28 | , Str "als"
29 | , Space
30 | , Strong [ Str "Flipped" , Space , Str "Classroom" ]
31 | , Str ":"
32 | , Space
33 | , Str "Sitzungen"
34 | , Space
35 | , Str "per"
36 | , Space
37 | , Str "Zoom"
38 | , Space
39 | , Str "("
40 | , Strong
41 | [ Str "Zugangsdaten"
42 | , Space
43 | , Str "siehe"
44 | , Space
45 | , Str "[ILIAS]"
46 | ]
47 | , Str ")"
48 | ]
49 | , Para
50 | [ RawInline
51 | (Format "markdown") ""
52 | , RawInline
53 | (Format "markdown") "{{% badge style=\"default\" %}}"
54 | , Strong [ Str "Badge" ]
55 | , Space
56 | , Str "("
57 | , Emph [ Str "non-interactive" ]
58 | , Str ")"
59 | , RawInline (Format "markdown") "{{% /badge %}}"
60 | , RawInline (Format "markdown") "
"
61 | ]
62 | , Para
63 | [ RawInline
64 | (Format "markdown") ""
65 | , RawInline
66 | (Format "markdown")
67 | "{{% button style=\"default\" href=\"https://github.com/cagix/pandoc-lecture/pull/171\" %}}"
68 | , Strong [ Str "Button" ]
69 | , Space
70 | , Str "("
71 | , Emph [ Str "interactive" ]
72 | , Str ")"
73 | , RawInline (Format "markdown") "{{% /button %}}"
74 | , RawInline (Format "markdown") "
"
75 | ]
76 | , Para
77 | [ Str "Durchf\252hrung"
78 | , Space
79 | , Str "als"
80 | , Space
81 | , Strong [ Str "Flipped" , Space , Str "Classroom" ]
82 | , Str ":"
83 | , Space
84 | , Str "Sitzungen"
85 | , Space
86 | , Str "per"
87 | , Space
88 | , Str "Zoom"
89 | , Space
90 | , Str "("
91 | , Strong
92 | [ Str "Zugangsdaten"
93 | , Space
94 | , Str "siehe"
95 | , Space
96 | , Str "[Moodle]"
97 | ]
98 | , Str ")"
99 | ]
100 | ]
101 |
--------------------------------------------------------------------------------
/filters/test/expected_cbox_div.native:
--------------------------------------------------------------------------------
1 | [ Header 2 ( "vorlesung" , [] , [] ) [ Str "Vorlesung" ]
2 | , RawBlock
3 | (Format "markdown") ""
4 | , RawBlock
5 | (Format "markdown") "{{% badge style=\"primary\" %}}"
6 | , Para
7 | [ Str "A"
8 | , Space
9 | , Str "simple"
10 | , Space
11 | , Str "text"
12 | , Space
13 | , Str "to"
14 | , Space
15 | , Str "be"
16 | , Space
17 | , Str "centred"
18 | , Space
19 | , Str "and"
20 | , Space
21 | , Str "accentuated"
22 | ]
23 | , RawBlock (Format "markdown") "{{% /badge %}}"
24 | , RawBlock (Format "markdown") "
"
25 | , Para
26 | [ Str "Durchf\252hrung"
27 | , Space
28 | , Str "als"
29 | , Space
30 | , Strong [ Str "Flipped" , Space , Str "Classroom" ]
31 | , Str ":"
32 | , Space
33 | , Str "Sitzungen"
34 | , Space
35 | , Str "per"
36 | , Space
37 | , Str "Zoom"
38 | , Space
39 | , Str "("
40 | , Strong
41 | [ Str "Zugangsdaten"
42 | , Space
43 | , Str "siehe"
44 | , Space
45 | , Str "[ILIAS]"
46 | ]
47 | , Str ")"
48 | ]
49 | , RawBlock
50 | (Format "markdown") ""
51 | , RawBlock
52 | (Format "markdown") "{{% badge style=\"primary\" %}}"
53 | , Para
54 | [ Str "A"
55 | , Space
56 | , Strong [ Str "simple" ]
57 | , Space
58 | , Str "text"
59 | , Space
60 | , Str "to"
61 | , Space
62 | , Str "be"
63 | , Space
64 | , Emph [ Str "centred" ]
65 | , Space
66 | , Str "and"
67 | , Space
68 | , RawInline (Format "markdown") ""
69 | , Str "accentuated"
70 | , RawInline (Format "markdown") ""
71 | ]
72 | , RawBlock (Format "markdown") "{{% /badge %}}"
73 | , RawBlock (Format "markdown") "
"
74 | , Para
75 | [ Str "Durchf\252hrung"
76 | , Space
77 | , Str "als"
78 | , Space
79 | , Strong [ Str "Flipped" , Space , Str "Classroom" ]
80 | , Str ":"
81 | , Space
82 | , Str "Sitzungen"
83 | , Space
84 | , Str "per"
85 | , Space
86 | , Str "Zoom"
87 | , Space
88 | , Str "("
89 | , Strong
90 | [ Str "Zugangsdaten"
91 | , Space
92 | , Str "siehe"
93 | , Space
94 | , Str "[Moodle]"
95 | ]
96 | , Str ")"
97 | ]
98 | ]
99 |
--------------------------------------------------------------------------------
/filters/test/expected_codeblocks.native:
--------------------------------------------------------------------------------
1 | [ Para [ Str "wuppie" , Space , Str "fluppie" ]
2 | , CodeBlock ( "" , [ "java" ] , [] ) "class Foo {}"
3 | , Para [ Str "foo" , Space , Str "bar" ]
4 | , CodeBlock
5 | ( "" , [ "haskell" ] , [] )
6 | "class Monad m where\n (>>=) :: m a -> (a -> m b) -> m b\n return :: a -> m a"
7 | , Para [ Str "lorem" , Space , Str "ipsum" ]
8 | , Para
9 | [ Code ( "" , [] , [] ) "void"
10 | , Space
11 | , Str "is"
12 | , Space
13 | , Str "to"
14 | , Space
15 | , Str "be"
16 | , Space
17 | , Str "expected."
18 | ]
19 | , Para
20 | [ Code ( "" , [] , [] ) "void"
21 | , Str ":"
22 | , Space
23 | , Str "same"
24 | , Space
25 | , Str "but"
26 | , Space
27 | , Str "highlighting."
28 | ]
29 | ]
30 |
--------------------------------------------------------------------------------
/filters/test/expected_inludemd3.native:
--------------------------------------------------------------------------------
1 | [ Para
2 | [ RawInline
3 | (Format "markdown") "{{< children showhidden=\"true\" >}}"
4 | ]
5 | , Para []
6 | , Header
7 | 1
8 | ( "subdirleaffoo.md" , [] , [] )
9 | [ Str "Subdir/Leaf/Foo.md" ]
10 | , Para
11 | [ Str "This"
12 | , Space
13 | , Str "is"
14 | , Space
15 | , Str "a"
16 | , Space
17 | , Quoted DoubleQuote [ Str "single" , Space , Str "page" ]
18 | , Space
19 | , Str "in"
20 | , Space
21 | , Str "a"
22 | , Space
23 | , Quoted DoubleQuote [ Str "leaf" , Space , Str "bundle" ]
24 | , Space
25 | , Str "and"
26 | , Space
27 | , Str "should"
28 | , Space
29 | , Strong [ Str "not" ]
30 | , Space
31 | , Str "be"
32 | , Space
33 | , Str "available."
34 | ]
35 | , Figure
36 | ( "" , [] , [] )
37 | (Caption
38 | Nothing
39 | [ Plain
40 | [ Str "This"
41 | , Space
42 | , Str "is"
43 | , Space
44 | , Str "Figure"
45 | , Space
46 | , Str "B"
47 | , Space
48 | , Str "(via"
49 | , Space
50 | , Str "Markdown)"
51 | ]
52 | ])
53 | [ Plain
54 | [ Image
55 | ( "" , [] , [] )
56 | [ Str "This"
57 | , Space
58 | , Str "is"
59 | , Space
60 | , Str "Figure"
61 | , Space
62 | , Str "B"
63 | , Space
64 | , Str "(via"
65 | , Space
66 | , Str "Markdown)"
67 | ]
68 | ( "subdir/leaf/img/b.png" , "" )
69 | ]
70 | ]
71 | , Header
72 | 2
73 | ( "recursion-lets-include-bar" , [] , [] )
74 | [ Str "Recursion:"
75 | , Space
76 | , Str "Let\8217s"
77 | , Space
78 | , Str "include"
79 | , Space
80 | , Str "BAR"
81 | ]
82 | , Para []
83 | , Header
84 | 1
85 | ( "subdirleafbar.md" , [] , [] )
86 | [ Str "Subdir/Leaf/Bar.md" ]
87 | , Para
88 | [ Str "This"
89 | , Space
90 | , Str "is"
91 | , Space
92 | , Str "a"
93 | , Space
94 | , Quoted DoubleQuote [ Str "single" , Space , Str "page" ]
95 | , Space
96 | , Str "in"
97 | , Space
98 | , Str "a"
99 | , Space
100 | , Quoted DoubleQuote [ Str "leaf" , Space , Str "bundle" ]
101 | , Space
102 | , Str "and"
103 | , Space
104 | , Str "should"
105 | , Space
106 | , Strong [ Str "not" ]
107 | , Space
108 | , Str "be"
109 | , Space
110 | , Str "available."
111 | ]
112 | , Figure
113 | ( "" , [] , [] )
114 | (Caption
115 | Nothing
116 | [ Plain
117 | [ Str "This"
118 | , Space
119 | , Str "is"
120 | , Space
121 | , Str "Figure"
122 | , Space
123 | , Str "B"
124 | , Space
125 | , Str "(via"
126 | , Space
127 | , Str "Markdown)"
128 | ]
129 | ])
130 | [ Plain
131 | [ Image
132 | ( "" , [] , [] )
133 | [ Str "This"
134 | , Space
135 | , Str "is"
136 | , Space
137 | , Str "Figure"
138 | , Space
139 | , Str "B"
140 | , Space
141 | , Str "(via"
142 | , Space
143 | , Str "Markdown)"
144 | ]
145 | ( "subdir/leaf/img/b.png" , "" )
146 | ]
147 | ]
148 | , Figure
149 | ( "" , [] , [] )
150 | (Caption
151 | Nothing
152 | [ Plain
153 | [ Str "This"
154 | , Space
155 | , Str "is"
156 | , Space
157 | , Str "Figure"
158 | , Space
159 | , Str "D"
160 | , Space
161 | , Str "(via"
162 | , Space
163 | , Str "Markdown)"
164 | ]
165 | ])
166 | [ Plain
167 | [ Image
168 | ( "" , [] , [] )
169 | [ Str "This"
170 | , Space
171 | , Str "is"
172 | , Space
173 | , Str "Figure"
174 | , Space
175 | , Str "D"
176 | , Space
177 | , Str "(via"
178 | , Space
179 | , Str "Markdown)"
180 | ]
181 | ( "subdir/leaf/img/d.png" , "" )
182 | ]
183 | ]
184 | , Header
185 | 2
186 | ( "recursion-lets-include-foo" , [] , [] )
187 | [ Str "Recursion:"
188 | , Space
189 | , Str "Let\8217s"
190 | , Space
191 | , Str "include"
192 | , Space
193 | , Str "FOO"
194 | ]
195 | , Para []
196 | , Para []
197 | , Para []
198 | , Para []
199 | , Figure
200 | ( "" , [] , [] )
201 | (Caption
202 | Nothing [ Plain [ Str "Image" , Space , Str "title" ] ])
203 | [ Plain
204 | [ Image
205 | ( "" , [] , [] )
206 | [ Str "Image" , Space , Str "title" ]
207 | ( "subdir/img/c.png" , "" )
208 | ]
209 | ]
210 | ]
211 |
--------------------------------------------------------------------------------
/filters/test/expected_inludemd4.native:
--------------------------------------------------------------------------------
1 | [ Para
2 | [ RawInline
3 | (Format "markdown") "{{< children showhidden=\"true\" >}}"
4 | ]
5 | , Figure
6 | ( "" , [] , [] )
7 | (Caption
8 | Nothing
9 | [ Plain
10 | [ Str "This"
11 | , Space
12 | , Str "is"
13 | , Space
14 | , Str "Figure"
15 | , Space
16 | , Str "B"
17 | , Space
18 | , Str "(via"
19 | , Space
20 | , Str "Markdown)"
21 | ]
22 | ])
23 | [ Plain
24 | [ Image
25 | ( "" , [] , [] )
26 | [ Str "This"
27 | , Space
28 | , Str "is"
29 | , Space
30 | , Str "Figure"
31 | , Space
32 | , Str "B"
33 | , Space
34 | , Str "(via"
35 | , Space
36 | , Str "Markdown)"
37 | ]
38 | ( "subdir/leaf/img/b.png" , "" )
39 | ]
40 | ]
41 | ]
42 |
--------------------------------------------------------------------------------
/filters/test/expected_makedeps5.native:
--------------------------------------------------------------------------------
1 | [ Plain
2 | [ RawInline
3 | (Format "markdown") "subdir/c.png: subdir/img/c.png\n"
4 | , RawInline
5 | (Format "markdown") "WEB_IMAGE_TARGETS += subdir/c.png\n\n"
6 | , RawInline
7 | (Format "markdown")
8 | "subdir/leaf/b.png: subdir/leaf/img/b.png\n"
9 | , RawInline
10 | (Format "markdown")
11 | "WEB_IMAGE_TARGETS += subdir/leaf/b.png\n\n"
12 | , RawInline
13 | (Format "markdown")
14 | "subdir/leaf/foo/b.png: subdir/leaf/img/b.png\n"
15 | , RawInline
16 | (Format "markdown")
17 | "WEB_IMAGE_TARGETS += subdir/leaf/foo/b.png\n\n"
18 | , RawInline
19 | (Format "markdown")
20 | "subdir/leaf/bar/b.png: subdir/leaf/img/b.png\n"
21 | , RawInline
22 | (Format "markdown")
23 | "WEB_IMAGE_TARGETS += subdir/leaf/bar/b.png\n\n"
24 | , RawInline
25 | (Format "markdown")
26 | "subdir/leaf/bar/d.png: subdir/leaf/img/d.png\n"
27 | , RawInline
28 | (Format "markdown")
29 | "WEB_IMAGE_TARGETS += subdir/leaf/bar/d.png\n\n"
30 | ]
31 | , Plain
32 | [ RawInline
33 | (Format "markdown") "subdir/_index.md: subdir/readme.md\n"
34 | , RawInline
35 | (Format "markdown") "subdir/_index.md: subdir/c.png\n"
36 | , RawInline
37 | (Format "markdown") "subdir/_index.md: WEIGHT=1\n"
38 | , RawInline
39 | (Format "markdown")
40 | "WEB_MARKDOWN_TARGETS += subdir/_index.md\n\n"
41 | , RawInline
42 | (Format "markdown")
43 | "subdir/leaf/_index.md: subdir/leaf/readme.md\n"
44 | , RawInline
45 | (Format "markdown")
46 | "subdir/leaf/_index.md: subdir/leaf/b.png\n"
47 | , RawInline
48 | (Format "markdown") "subdir/leaf/_index.md: WEIGHT=2\n"
49 | , RawInline
50 | (Format "markdown")
51 | "WEB_MARKDOWN_TARGETS += subdir/leaf/_index.md\n\n"
52 | , RawInline
53 | (Format "markdown")
54 | "subdir/leaf/foo/_index.md: subdir/leaf/foo.md\n"
55 | , RawInline
56 | (Format "markdown")
57 | "subdir/leaf/foo/_index.md: subdir/leaf/foo/b.png\n"
58 | , RawInline
59 | (Format "markdown") "subdir/leaf/foo/_index.md: WEIGHT=3\n"
60 | , RawInline
61 | (Format "markdown")
62 | "WEB_MARKDOWN_TARGETS += subdir/leaf/foo/_index.md\n\n"
63 | , RawInline
64 | (Format "markdown")
65 | "subdir/leaf/bar/_index.md: subdir/leaf/bar.md\n"
66 | , RawInline
67 | (Format "markdown")
68 | "subdir/leaf/bar/_index.md: subdir/leaf/bar/b.png subdir/leaf/bar/d.png\n"
69 | , RawInline
70 | (Format "markdown") "subdir/leaf/bar/_index.md: WEIGHT=4\n"
71 | , RawInline
72 | (Format "markdown")
73 | "WEB_MARKDOWN_TARGETS += subdir/leaf/bar/_index.md\n\n"
74 | ]
75 | ]
76 |
--------------------------------------------------------------------------------
/filters/test/expected_makedeps6.native:
--------------------------------------------------------------------------------
1 | [ Plain
2 | [ RawInline
3 | (Format "markdown")
4 | "subdir/leaf/b.png: subdir/leaf/img/b.png\n"
5 | , RawInline
6 | (Format "markdown")
7 | "WEB_IMAGE_TARGETS += subdir/leaf/b.png\n\n"
8 | ]
9 | , Plain
10 | [ RawInline
11 | (Format "markdown")
12 | "subdir/leaf/_index.md: subdir/leaf/readme.md\n"
13 | , RawInline
14 | (Format "markdown")
15 | "subdir/leaf/_index.md: subdir/leaf/b.png\n"
16 | , RawInline
17 | (Format "markdown") "subdir/leaf/_index.md: WEIGHT=1\n"
18 | , RawInline
19 | (Format "markdown")
20 | "WEB_MARKDOWN_TARGETS += subdir/leaf/_index.md\n\n"
21 | ]
22 | ]
23 |
--------------------------------------------------------------------------------
/filters/test/expected_showme_div.native:
--------------------------------------------------------------------------------
1 | [ Header 2 ( "vorlesung" , [] , [] ) [ Str "Vorlesung" ]
2 | , RawBlock
3 | (Format "markdown") "{{% expand title=\"Show Me\" %}}"
4 | , Para
5 | [ Str "A"
6 | , Space
7 | , Str "simple"
8 | , Space
9 | , Str "text"
10 | , Space
11 | , Str "to"
12 | , Space
13 | , Str "be"
14 | , Space
15 | , Str "centred"
16 | , Space
17 | , Str "and"
18 | , Space
19 | , Str "accentuated"
20 | ]
21 | , RawBlock (Format "markdown") "{{% /expand %}}"
22 | , RawBlock
23 | (Format "markdown")
24 | "{{% expand title=\"Hello **World**\" %}}"
25 | , Para
26 | [ Str "A"
27 | , Space
28 | , Str "simple"
29 | , Space
30 | , Str "text"
31 | , Space
32 | , Str "to"
33 | , Space
34 | , Str "be"
35 | , Space
36 | , Str "centred"
37 | , Space
38 | , Str "and"
39 | , Space
40 | , Str "accentuated"
41 | ]
42 | , RawBlock (Format "markdown") "{{% /expand %}}"
43 | , Para
44 | [ Str "Durchf\252hrung"
45 | , Space
46 | , Str "als"
47 | , Space
48 | , Strong [ Str "Flipped" , Space , Str "Classroom" ]
49 | , Str ":"
50 | , Space
51 | , Str "Sitzungen"
52 | , Space
53 | , Str "per"
54 | , Space
55 | , Str "Zoom"
56 | , Space
57 | , Str "("
58 | , Strong
59 | [ Str "Zugangsdaten"
60 | , Space
61 | , Str "siehe"
62 | , Space
63 | , Str "[ILIAS]"
64 | ]
65 | , Str ")"
66 | ]
67 | , RawBlock
68 | (Format "markdown") "{{% expand title=\"Show Me\" %}}"
69 | , Para
70 | [ Str "A"
71 | , Space
72 | , Strong [ Str "simple" ]
73 | , Space
74 | , Str "text"
75 | , Space
76 | , Str "to"
77 | , Space
78 | , Str "be"
79 | , Space
80 | , Emph [ Str "centred" ]
81 | , Space
82 | , Str "and"
83 | , Space
84 | , RawInline (Format "markdown") ""
85 | , Str "accentuated"
86 | , RawInline (Format "markdown") ""
87 | ]
88 | , RawBlock (Format "markdown") "{{% /expand %}}"
89 | , Para
90 | [ Str "Durchf\252hrung"
91 | , Space
92 | , Str "als"
93 | , Space
94 | , Strong [ Str "Flipped" , Space , Str "Classroom" ]
95 | , Str ":"
96 | , Space
97 | , Str "Sitzungen"
98 | , Space
99 | , Str "per"
100 | , Space
101 | , Str "Zoom"
102 | , Space
103 | , Str "("
104 | , Strong
105 | [ Str "Zugangsdaten"
106 | , Space
107 | , Str "siehe"
108 | , Space
109 | , Str "[Moodle]"
110 | ]
111 | , Str ")"
112 | ]
113 | , RawBlock
114 | (Format "markdown") "{{% expand title=\"_Foo_ **Bar**\" %}}"
115 | , Para
116 | [ Str "A"
117 | , Space
118 | , Strong [ Str "simple" ]
119 | , Space
120 | , Str "text"
121 | , Space
122 | , Str "to"
123 | , Space
124 | , Str "be"
125 | , Space
126 | , Emph [ Str "centred" ]
127 | , Space
128 | , Str "and"
129 | , Space
130 | , RawInline (Format "markdown") ""
131 | , Str "accentuated"
132 | , RawInline (Format "markdown") ""
133 | ]
134 | , RawBlock (Format "markdown") "{{% /expand %}}"
135 | ]
136 |
--------------------------------------------------------------------------------
/filters/test/file-a.md:
--------------------------------------------------------------------------------
1 | # file-a.md
2 |
3 | This is `file-a.md`.
4 |
--------------------------------------------------------------------------------
/filters/test/file-b.md:
--------------------------------------------------------------------------------
1 | # file_b.md
2 |
3 | This is `file-b.md`.
4 |
5 | [](file-a.md)
6 |
7 | [subdir/readme](subdir/readme.md)
8 |
9 | 
10 |
--------------------------------------------------------------------------------
/filters/test/file-c.png:
--------------------------------------------------------------------------------
1 | # File_c.PNG
2 |
3 | This is `file-c.png` - wrong extension.
4 |
--------------------------------------------------------------------------------
/filters/test/img/a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/img/a.png
--------------------------------------------------------------------------------
/filters/test/orga/.noslides:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/orga/.noslides
--------------------------------------------------------------------------------
/filters/test/orga/grading.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Note und Credits"
3 |
4 | hidden: true
5 | ---
6 |
7 |
8 | ## Prüfungsform
9 |
10 | **Performanzprüfung, 7 ECTS**
11 |
12 | - **Praktische Teilleistung**:
13 | Regelmäßige Bearbeitung der Praktikumsaufgaben,
14 | fristgerechte Abgabe der Lösungen (PDF, ZIP, Link) im ILIAS,
15 | Erstellung von Peer-Feedback im ILIAS,
16 | Vorstellung der Lösungen im Praktikum => Punkte
17 |
18 | Notenspiegel:
19 | - 90 Punkte gesamt erreichbar: Zyklus 1 und 2 je 15 Punkte, Zyklus 3 bis 5 je 15+5 Punkte
20 | - 4.0: ab 50% (45.0 Punkte), alle 5% nächste Teilnote, 1.0: ab 95% (85.5 Punkte)
21 |
22 | - **Theoretische Teilleistung**:
23 | Digitale Klausur in den Prüfungszeiträumen
24 |
25 | - **Gesamtnote**:
26 | 50% Praxis, 50% Theorie
27 |
28 | Wiederholer mit bereits begonnener Parcours-Prüfung absolvieren stattdessen eine Parcours-Prüfung.
29 | Bitte melden Sie sich vor Beginn der Praktika per E-Mail beim Dozenten.
30 |
31 |
32 | ## Hinweise zum Praktikum (praktische Teilleistung)
33 |
34 | ### Bearbeitung der Aufgaben
35 |
36 | Sie bearbeiten alle Aufgaben in festen Teams zu je **drei Personen**. Jedes Team erarbeitet seine
37 | **eigene** Lösung.
38 |
39 | Wer Lösungen ganz oder teilweise von anderen Teams/Studierenden oder anderen Quellen übernimmt
40 | und als eigene Lösung ab-/ausgibt, begeht einen Täuschungsversuch mit entsprechenden Konsequenzen
41 | im Prüfungsverfahren.
42 |
43 | ### 2-Wochen-Zyklen
44 |
45 | Das Praktikum erfolgt in 2-Wochen-Zyklen:
46 |
47 | 1. Erste Zyklus-Woche: Konzeptphase
48 | - Auswahl der zu bearbeitenden Aufgaben (=> Team)
49 | - Erstellung einer Konzeptskizze (PDF) (=> Team)
50 | - Abgabe der Konzeptskizze (PDF) im ILIAS (=> Jede(r) einzeln)
51 | - Peer-Feedback zur Konzeptskizze im ILIAS (=> Jede(r) einzeln)
52 | - Vorstellung der Konzeptskizze im Praktikum (=> Team)
53 | 2. Zweite Zyklus-Woche: Implementierungsphase
54 | - Umsetzung des Konzepts/Implementierung der Lösung (=> Team)
55 | - Abgabe des Quellcodes (ZIP bzw. Link) im ILIAS (=> Jede(r) einzeln)
56 | - Peer-Feedback zum Quellcode im ILIAS (=> Jede(r) einzeln)
57 | - Vorstellung des Quellcodes im Praktikum (=> Team)
58 |
59 | Sie können pro Zyklus Aufgaben im Umfang von 15 Punkten abgeben/vorstellen.
60 |
61 | ### Punktevergabe
62 |
63 | Für die Vergabe der Punkte müssen Sie pro Zyklus jeweils fristgerecht
64 | Ihre Konzeptskizze als PDF eingereicht und im Praktikum vorgestellt haben,
65 | in beiden Zyklen-Hälften das Peer-Feedback erstellt haben und
66 | die Lösung (Quellcode: Abgabe per ZIP oder Link, vgl. Anweisungen auf den
67 | Übungsblättern) eingereicht und im Praktikum vorgestellt haben.
68 |
69 | ### Sonderabgabe letzte Vorlesungswoche
70 |
71 | Zusatztermin für Studierende, die bis dahin unterhalb der Bestehensschwelle für die praktische
72 | Teilleistung liegen oder die wegen Krankheit einen Termin nicht wahrnehmen konnten.
73 |
74 | Für diese Abgabe gibt es keine Konzeptphase und auch kein Peer-Feedback, die Lösung (Link)
75 | ist bis zur Deadline im ILIAS hochzuladen und im nachfolgenden Praktikum vorzustellen.
76 |
77 |
78 | ## Hinweise zur Klausur (theoretische Teilleistung)
79 |
80 | Prüfung Theorie (Termin 1): Die Prüfung zum theoretischen Teil findet am Mittwoch, 05.07.23,
81 | im B40 am Campus Minden als digitale Klausur auf dem HSBI-Prüfungs-ILIAS statt.
82 |
83 | Da in diesem Raum nur 30 Personen gleichzeitig geprüft werden können, werden wir in zwei
84 | Durchläufen arbeiten: 09:00-10:30 Uhr und 11:00-12:30 Uhr. Sie können nur an einer der beiden
85 | Sitzungen teilnehmen.
86 |
87 | Es gibt entsprechend zwei Einträge im Prüfungs-ILIAS. Die Zugangsdaten wurden an alle im LSF
88 | für die Prüfung angemeldeten Studierenden geschickt. Bitte melden Sie sich bis Freitag,
89 | 30.06.23, in einem der beiden Prüfungskursräume an ("Beitritt mit Bestätigung"). Beachten Sie
90 | die Gruppengröße, es können sich max. 30 Personen pro Durchlauf anmelden. Es gibt keine
91 | Wartelisten - wenn einer der beiden Prüfungskursräume voll ist, melden Sie sich bitte beim
92 | anderen Prüfungskursraum an.
93 |
94 | Sie benötigen am Prüfungstag Ihre HSBI-Zugangsdaten (User, Passwort), einen Studierendenausweis
95 | und Personalausweis sowie Ihren DIN-A4-Spickzettel.
96 |
97 | Prüfungsrelevant sind die im "Fahrplan" verlinkten Inhalte.
98 |
--------------------------------------------------------------------------------
/filters/test/orga/img/modulbeschreibung.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/orga/img/modulbeschreibung.png
--------------------------------------------------------------------------------
/filters/test/orga/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: "chapter"
3 | title: "Organisatorisches"
4 |
5 | hidden: true
6 | _build:
7 | render: always
8 | list: never
9 | publishResources: true
10 | ---
11 |
12 |
13 | `{{< children showhidden="true" >}}`{=markdown}
14 |
--------------------------------------------------------------------------------
/filters/test/orga/resources.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Ressourcen"
3 | nocite: |
4 | @Ullenboom2021,@Chacon2014,@Fowler2011,@Bloch2018,@Martin2009,@Passig2013,@Urma2014
5 |
6 | hidden: true
7 | ---
8 |
9 |
10 | ## Was brauche ich? Literatur ...
11 |
12 | ### Basics ("Must Have"!)
13 |
14 | 1. "**Java ist auch eine Insel**": @Ullenboom2021
15 | 2. "**Pro Git** (Second Edition)": @Chacon2014
16 | 3. "**The Java Tutorials**": @Java-SE-Tutorial
17 | 4. "**Learn Java**": @LernJava
18 |
19 | ### Weitere empfohlene Literatur
20 |
21 | Auf [The 2023 Java Programmer RoadMap](https://medium.com/javarevisited/the-java-programmer-roadmap-f9db163ef2c2)
22 | finden Sie eine Art Roadmap zu den verschiedenen Themen rund um die Java-Programmierung, die
23 | beinahe auch die Roadmap für die Veranstaltung "Programmiermethoden" sein könnte ...
24 |
25 | Joshua Bloch, einer der "Väter" von Java, hat eine interessante Sammlung von Rezepten für
26 | typische Probleme und wie man diese am sinnvollsten in Java lösen kann gesammelt: @Bloch2018
27 | bzw. @Bloch2011 (ältere Version). Mit @Inden2013 gibt es ein extrem umfangreiches
28 | Nachschlagewerk zu (fast) allen Themen in Java (wird gelegentlich aktualisiert). Und die
29 | Developer Guides von Oracle [@JDK-Doc] sind ebenfalls eine gute Referenz.
30 |
31 | Mit Java 8 wurden einige interessante Features eingeführt wie etwa Lambda-Ausdrücke und
32 | Funktionsinterfaces. Hierzu ist @Urma2014 eine gute Quelle. Für das Update auf Java 9 kann
33 | man sich @Juneau2017 anschauen. Spätere Features wie Optional und die Stream-API und
34 | Record-Klassen sind sehr gut auf @LernJava dokumentiert.
35 |
36 | Mit @Passig2013 ist ein wunderbar launiges Buch erschienen, wo typische Code-Smells
37 | diskutiert werden (wobei man manche Standpunkte hinterfragen sollte). Ein Standardwerk zu
38 | diesem Thema ist @Martin2009. In @SWEGoogle werden Erfahrungen rund um die
39 | Softwareentwicklung dargestellt und kritisch hinterfragt - hier finden sich interessante
40 | Gedanken zum Thema Git, Testen, Code Style und vieles andere mehr.
41 |
42 | Zum Thema Refactoring ist @Fowler2011 *DIE* Referenz. Auf @RefactoringGuru finden Sie eine
43 | nett aufbereitete Übersicht zum Thema Refactoring, aber auch eine Einbettung in die
44 | Zusammenhänge mit den Themen Bad Smells und Clean Code.
45 |
46 | Wer Interesse an UML und/oder Designpattern hat, sollte in @Oestereich2012 sowie @UML25
47 | und @Gamma2011 sowie @Eilebrecht2013 schauen.
48 |
49 | Zum Thema Unit-Test seien @vogellaJUnit, @junit4, @Osherove2014 und @Beck2014 empfohlen.
50 |
51 | Zum Thema Coding Conventions sind @SunMicrosystems1997 und @googlestyleguide gute
52 | Referenzen.
53 |
54 | Hier noch eine Sammlung von Gedanken zum Berufsverständnis von Informatikern: @AtlassianHelloWorld.
55 |
56 | Anregungen für **Spielideen** können Sie beispielsweise in den folgenden Videos finden:
57 | - [Shattered Pixel Dungeon Rogue Beginners Guide Playthrough](https://youtu.be/qoc_tDN0QC4)
58 | - [Shattered Pixel Dungeon Duelist Update!](https://youtu.be/LgSjUWjQg0s)
59 |
60 | **Hinweis**: Am Ende einer Vorlesung wird noch einmal spezifisch zum Thema passende
61 | Literatur empfohlen.
62 |
63 | ## Was brauche ich noch? Tools ...
64 |
65 | ### Tools
66 |
67 | - JDK: Java SE 17 (LTS) ([Oracle](https://www.oracle.com/java/technologies/downloads/) oder
68 | [Alternativen](https://code.visualstudio.com/docs/languages/java#_install-a-java-development-kit-jdk),
69 | bitte 64-bit Version nutzen)
70 | - IDE: [Eclipse IDE for Java Developers](https://www.eclipse.org/downloads/) oder
71 | [IntelliJ IDEA (Community Edition)](https://www.jetbrains.com/idea/) oder
72 | [Visual Studio Code](https://code.visualstudio.com/) oder [Vim](https://www.vim.org/) oder ...
73 | - [Git](https://git-scm.com/)
74 |
75 | ### Vorgaben für die Aufgaben
76 |
77 | - [Dungeon-Framework](https://github.com/Programmiermethoden/Dungeon)
78 |
--------------------------------------------------------------------------------
/filters/test/orga/syllabus.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Syllabus"
3 |
4 | hidden: true
5 | ---
6 |
7 |
8 | ## Worum geht's hier?
9 |
10 | ::: center
11 | [**Weniger schlecht programmieren**]{.alert} \quad ;-)
12 | :::
13 |
14 |
15 | > ... And, lastly, there's the explosive growth in demand, which has led to many
16 | > people doing it who aren't any good at it. Code is merely a means to an end.
17 | > **Programming is an art and code is merely its medium.**
18 | > Pointing a camera at a subject does not make one a proper photographer. There are
19 | > a lot of self-described coders out there who couldn't program their way out of a
20 | > paper bag.
21 | >
22 | > \hfill -- John Gruber auf [daringfireball.net](https://daringfireball.net/2020/04/cobol_programming_coding)
23 |
24 |
25 | Sie haben letztes Semester in OOP die *wichtigsten* Elemente und Konzepte der
26 | Programmiersprache Java kennen gelernt.
27 |
28 | Java ist neben C und Python derzeit die wichtigste Programmiersprache am Markt
29 | (siehe [TIOBE Index](https://www.tiobe.com/tiobe-index/)).
30 |
31 | Jetzt geht es darum, diese Kenntnisse sowohl auf der Java- als auch auf der
32 | Methoden-Seite so zu erweitern, dass Sie gemeinsam größere Anwendungen erstellen
33 | und pflegen können:
34 |
35 | * **Java**
36 | * Sich sicherer in Java bewegen: Praxiserfahrung und Routine gewinnen
37 | * Wichtigste Konzepte und APIs kennen und beherrschen
38 | * Merkmale größerer Applikationen wie Logging und Konfiguration einsetzen
39 |
40 | \smallskip
41 |
42 | * **Design**
43 | * Basis-Entwurfsmuster (er-)kennen und einsetzen
44 |
45 | \smallskip
46 |
47 | * **Methoden**
48 | * Code erstellen und pflegen wie die Profis
49 | * Build-Tools einsetzen
50 | * Testen von Software
51 | * Refactoring von "stinkendem" Code
52 | * Versionsverwaltung: Git
53 | * Zusammenarbeit in Teams: Verwaltung von Software und Workflows
54 |
55 | [[Warum ist guter Code wichtig?]{.bsp}]{.slides}
56 | [**Warum ist guter Code wichtig?**]{.notes}
57 |
58 | [=> Guter Code ist vor allem wichtig [für den Entwickler]{.alert}!]{.notes}
59 |
60 |
61 | ## Überblick Modulinhalte
62 |
63 | 1. Fortgeschrittene Konzepte in Java
64 | * Funktionale Programmierung: Default-Methoden, Funktionsinterfaces, Methodenreferenzen, Lambdas, Stream-API
65 | * Generische Programmierung: Generics
66 | * Parallele Programmierung: Threads
67 | * Reguläre Ausdrücke, Annotationen, Reflection
68 | * CLI, Konfiguration, Fremde APIs nutzen
69 |
70 | \smallskip
71 |
72 | 2. Fortgeschrittenes OO-Design
73 | * Entwurfsmuster: Strategy, Template-Method, Factory-Method, Singleton, Observer, Visitor, Command, ...
74 |
75 | \smallskip
76 |
77 | 3. Programmiermethoden
78 | * Versionskontrolle: Git
79 | * Testen, Coding Conventions, Refactoring
80 | * Logging, Build-Tools, CI
81 |
82 |
83 | ## Erwartungen an Sie
84 |
85 | {width="80%"}
86 |
87 | * 135h Selbststudium => ca. 9h Arbeitszeit pro Woche!
88 |
89 | Zeiten sind Richtwerte! - Manche brauchen länger, manche sind schneller ...
90 |
91 |
92 | Die Praktikumsaufgaben sollen Ihnen helfen, sich mit den Inhalten der
93 | Vorlesung auseinander zu setzen. Die Abgabeform und die Bedingungen an das
94 | Testat sind bewusst so gewählt, damit Sie im Praktikum untereinander in eine
95 | Diskussion eintreten (können). Nutzen Sie diese Chance und verhalten Sie sich
96 | aktiv - so macht das Praktikum Spaß und bringt allen mehr.
97 |
98 | Studieren Sie! Studieren bedeutet, sich **selbstständig** mit einem Thema
99 | auseinander zu setzen, zu vertiefen, zu üben, Zusammenhänge herzustellen.
100 | Die Lehrveranstaltung unterstützt Sie dabei, indem die wichtigsten Themen
101 | ausgesucht, in eine zeitliche Reihenfolge gebracht und didaktisch aufbereitet
102 | werden, so dass Sie sich die Inhalte leichter erschließen können. Es gibt
103 | aber viele weitere Themen und Dinge, die nicht besprochen werden können (schon
104 | aus rein zeitlichen Gründen), die aber (für Sie und/oder das Themengebiet)
105 | interessant sein können!
106 |
107 | Prüfungsrelevant sind selbstverständlich nur die besprochenen Inhalte. Der
108 | Fokus liegt aber auf dem "Können", also dem **Beherrschen** der jeweiligen
109 | Themen.
110 |
111 |
112 | ## Kognitive Stufen - Einordnung Lernziele
113 |
114 | Kennen (K1)
115 | : Abruf von Informationen (Begriffe, Fakten, Prinzipien)
116 | : (erkennen, nennen, bezeichnen, wiedergeben, kennen)
117 |
118 | Verstehen (K2)
119 | : Begründen und Erläutern von Aussagen zum Thema
120 | : (beschreiben, zusammenfassen, vergleichen, klassifizieren, begründen, erklären)
121 |
122 | Anwenden (K3)
123 | : Übertragung von erworbenem Wissen auf neue Situationen oder Anwendung zur Problemlösung
124 | : (ausführen, anwenden, beurteilen, entwerfen, nutzen)
125 |
126 | Nach *Anderson, Krathwohl (eds)*: "A Taxonomy for Learning, Teaching, and
127 | Assessing: A Revision of Bloom's Taxonomy of Educational Objectives",
128 | Allyn & Bacon, 2001
129 |
--------------------------------------------------------------------------------
/filters/test/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | author: me
3 | title: Thesis
4 | ---
5 |
6 | # Summary.md
7 |
8 | ## This should work
9 |
10 | Thanks everyone!
11 |
12 | [File A](file-a.md)
13 |
14 | [File A](file-a.md)
15 |
16 | 
17 |
18 | 
19 |
20 |
21 | ## Different (wrong) format
22 |
23 | - [wrong extension](file-c.png)
24 | - [not local](https://pandoc.org/lua-filters.html)
25 | - [still not local](https://pandoc.org/lua-filters.md)
26 | - [also not local](http://pandoc.org/lua-filters.md)
27 | - [not there and not here](wuppie.md)
28 |
29 |
30 | ## Recursive inclusion
31 |
32 | [File B](file-b.md)
33 |
34 |
35 | ## Subdirectories
36 |
37 | [Subdir: File D](subdir/file-d.md)
38 |
39 | [Subdir: File D](./subdir/file-d.md)
40 |
41 |
42 | ## Subdirectories, recursive
43 |
44 | [Subdir: File E](subdir/file-e.md)
45 |
46 |
47 | ## Subdirectories, direct plus recursive
48 |
49 | [Subdir/Leaf: Foo](subdir/leaf/foo.md)
50 |
51 |
52 | ## Links to Landing Pages
53 |
54 | [subdir/readme](subdir/readme.md)
55 |
56 | [readme](readme.md)
57 |
58 |
59 | ::: slides
60 | ## Hidden Parts
61 |
62 | This part will be visible while building the makefile dependencies, but will be removed for building
63 | the website because of being marked as slides content. We can use this to include files in the build
64 | process even if we do not want to have explicit links in the site ...
65 |
66 | Use case: We want to use a Hugo-generated schedule, i.e. we do not provide links to all individual
67 | lections in this readme or elsewhere, but need to define the scope of the semester/offering. So all
68 | links to the lectures to be included can go here and will be hidden in the generated website. The
69 | referenced pages will be available in the site, however.
70 |
71 | - [Syllabus](orga/syllabus.md)
72 | - [Ressourcen](orga/resources.md)
73 | - [Prüfungsvorbereitung](orga/exams.md)
74 | :::
75 |
--------------------------------------------------------------------------------
/filters/test/showme_div.md:
--------------------------------------------------------------------------------
1 | ## Vorlesung
2 |
3 | ::: showme
4 | A simple text to be centred and accentuated
5 | :::
6 |
7 | ::: {.showme title="Hello **World**"}
8 | A simple text to be centred and accentuated
9 | :::
10 |
11 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [ILIAS]**)
12 |
13 | ::: showme
14 | A **simple** text to be _centred_ and [accentuated]{.alert}
15 | :::
16 |
17 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [Moodle]**)
18 |
19 | ::: {.showme title="_Foo_ **Bar**"}
20 | A **simple** text to be _centred_ and [accentuated]{.alert}
21 | :::
22 |
--------------------------------------------------------------------------------
/filters/test/subdir/file-d.md:
--------------------------------------------------------------------------------
1 | # Subdir/File-D.md
2 |
3 | Wuppie!
4 |
5 | ***
6 |
7 | [link to ../orga/grading](../orga/grading.md)
8 |
9 | ***
10 |
--------------------------------------------------------------------------------
/filters/test/subdir/file-e.md:
--------------------------------------------------------------------------------
1 | # Subdir/File-E.md
2 |
3 | ## Image include
4 |
5 | Image relative path will be updated.
6 |
7 | 
8 |
9 | ## Direct include
10 |
11 | [File D in Subdir](file-d.md)
12 |
13 | ## Recursive include in subdir
14 |
15 | [Leaf/Foo.md](leaf/foo.md)
16 |
17 | [Leaf/Bar.md](leaf/bar.md)
18 |
--------------------------------------------------------------------------------
/filters/test/subdir/img/c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/subdir/img/c.png
--------------------------------------------------------------------------------
/filters/test/subdir/leaf/bar.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Single page 'Bar' in a leaf bundle"
3 | ---
4 |
5 | # Subdir/Leaf/Bar.md
6 |
7 | This is a "single page" in a "leaf bundle" and should **not** be available.
8 |
9 | 
10 |
11 | 
12 |
13 | ## Recursion: Let's include FOO
14 |
15 | [FOO (will include BAR)](foo.md)
16 |
--------------------------------------------------------------------------------
/filters/test/subdir/leaf/foo.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Single page 'Foo' in a leaf bundle"
3 | ---
4 |
5 | # Subdir/Leaf/Foo.md
6 |
7 | This is a "single page" in a "leaf bundle" and should **not** be available.
8 |
9 | 
10 |
11 | ## Recursion: Let's include BAR
12 |
13 | [BAR (will include FOO)](bar.md)
14 |
--------------------------------------------------------------------------------
/filters/test/subdir/leaf/img/b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/subdir/leaf/img/b.png
--------------------------------------------------------------------------------
/filters/test/subdir/leaf/img/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/subdir/leaf/img/d.png
--------------------------------------------------------------------------------
/filters/test/subdir/leaf/notlinked.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "This shouldn't show up - Not Linked"
3 | ---
4 |
5 | This page is not linked from "above" and shouldn't show up ...
6 |
7 | # Subdir/Leaf/Bar.md
8 |
9 | This is a "single page" in a "leaf bundle" and should **not** be available.
10 |
11 | 
12 |
13 | 
14 |
15 | ## Recursion: Let's include FOO
16 |
17 | [FOO (will include BAR)](foo.md)
18 |
--------------------------------------------------------------------------------
/filters/test/subdir/leaf/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Thema SubDir/Leaf
3 | ---
4 |
5 |
6 | `{{< children showhidden="true" >}}`{=markdown}
7 |
8 | 
9 |
--------------------------------------------------------------------------------
/filters/test/subdir/notlinked/img/b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/subdir/notlinked/img/b.png
--------------------------------------------------------------------------------
/filters/test/subdir/notlinked/img/d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/filters/test/subdir/notlinked/img/d.png
--------------------------------------------------------------------------------
/filters/test/subdir/notlinked/nobar.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Single page - Not Linked"
3 | ---
4 |
5 | This page is not linked from "above" and shouldn't show up ...
6 |
7 |
8 |
9 | # Subdir/Leaf/Bar.md
10 |
11 | This is a "single page" in a "leaf bundle" and should **not** be available.
12 |
13 | 
14 |
15 | 
16 |
17 | ## Recursion: Let's include FOO
18 |
19 | [FOO (will include BAR)](nofoo.md)
20 |
--------------------------------------------------------------------------------
/filters/test/subdir/notlinked/nofoo.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Single page - Not Linked"
3 | ---
4 |
5 | This page is not linked from "above" and shouldn't show up ...
6 |
7 |
8 | # Subdir/Leaf/Foo.md
9 |
10 | This is a "single page" in a "leaf bundle" and should **not** be available.
11 |
12 | 
13 |
14 | ## Recursion: Let's include BAR
15 |
16 | [BAR (will include FOO)](nobar.md)
17 |
--------------------------------------------------------------------------------
/filters/test/subdir/notlinked/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Thema SubDir - Not Linked"
3 | ---
4 |
5 | Since we don't have any links from "above", this entire directory shouldn't show up.
6 |
7 |
8 | `{{< children showhidden="true" >}}`{=markdown}
9 |
10 | [nofoo](nofoo.md)
11 |
--------------------------------------------------------------------------------
/filters/test/subdir/readme.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Thema SubDir
3 | ---
4 |
5 |
6 | `{{< children showhidden="true" >}}`{=markdown}
7 |
8 | [expliziter link](leaf/foo.md)
9 |
10 | 
11 |
--------------------------------------------------------------------------------
/filters/test/summary.md:
--------------------------------------------------------------------------------
1 | ---
2 | author: me
3 | title: Thesis
4 | ---
5 |
6 | # Summary.md
7 |
8 | ## This should work
9 |
10 | Thanks everyone!
11 |
12 | ***
13 |
14 | [File A](file-a.md)
15 |
16 | ***
17 |
18 | 
19 |
20 | 
21 |
22 |
23 | ## Different (wrong) format
24 |
25 | - [wrong extension](file-c.png)
26 | - [not local](https://pandoc.org/lua-filters.html)
27 | - [still not local](https://pandoc.org/lua-filters.md)
28 | - [also not local](http://pandoc.org/lua-filters.md)
29 | - [not there and not here](wuppie.md)
30 |
31 | ***
32 |
33 | since our filter works for `pandoc.Para` only, let's put these links into a paragraph:
34 | [not there and not here](wuppie.md) and [still not local](https://pandoc.org/lua-filters.md).
35 |
36 | ***
37 |
38 | ## Recursive inclusion
39 |
40 | ***
41 |
42 | [Subdir: File D](subdir/file-d.md)
43 |
44 | ***
45 |
46 | [Subdir: Readme](subdir/leaf/readme.md)
47 |
48 | ***
49 |
50 | ::: slides
51 | ## Hidden Parts
52 |
53 | This part will be visible while building the makefile dependencies, but will be removed for building
54 | the website because of being marked as slides content. We can use this to include files in the build
55 | process even if we do not want to have explicit links in the site ...
56 |
57 | Use case: We want to use a Hugo-generated schedule, i.e. we do not provide links to all individual
58 | lections in this readme or elsewhere, but need to define the scope of the semester/offering. So all
59 | links to the lectures to be included can go here and will be hidden in the generated website. The
60 | referenced pages will be available in the site, however.
61 |
62 | This itemize will not be recognized and included:
63 |
64 | - [Syllabus](orga/syllabus.md)
65 | - [Ressourcen](orga/resources.md)
66 | - [Prüfungsvorbereitung](orga/exams.md)
67 |
68 | But this will because of the new lines between each item:
69 |
70 | - [Syllabus](orga/syllabus.md)
71 |
72 | - [Ressourcen](orga/resources.md)
73 |
74 | - [Prüfungsvorbereitung](orga/exams.md)
75 |
76 | :::
77 |
--------------------------------------------------------------------------------
/filters/test/tabs_group.md:
--------------------------------------------------------------------------------
1 | ### Vorlesung: 2 SWS
2 |
3 | :::::: {.tabs groupid="hochschule"}
4 | ::: tab
5 |
6 | | 09.10.23 - 27.10.23 | 30.10.23 - 26.01.24 |
7 | |:---------------------------|:---------------------------|
8 | | Mo, 10:00 - 11:30 Uhr (DE) | Mo, 09:00 - 10:30 Uhr (DE) |
9 | | online/XXXX | online/XXXX |
10 |
11 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [ILIAS]**)
12 |
13 | :::
14 | ::: tab
15 | | 18.09.23 - 22.12.23 |
16 | |:---------------------------|
17 | | Mo, 11:00 - 12:30 Uhr (TR) |
18 | | online |
19 |
20 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [Moodle]**)
21 | :::
22 | ::::::
23 |
24 | ### Praktikum/Übung: 2 SWS
25 |
26 | foo bar wuppie fluppie 42
27 |
--------------------------------------------------------------------------------
/filters/test/tabs_plain.md:
--------------------------------------------------------------------------------
1 | ### Vorlesung: 2 SWS
2 |
3 | :::::: tabs
4 | ::: tab
5 |
6 | | 09.10.23 - 27.10.23 | 30.10.23 - 26.01.24 |
7 | |:---------------------------|:---------------------------|
8 | | Mo, 10:00 - 11:30 Uhr (DE) | Mo, 09:00 - 10:30 Uhr (DE) |
9 | | online/XXXX | online/XXXX |
10 |
11 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [ILIAS]**)
12 |
13 | :::
14 | ::: tab
15 | | 18.09.23 - 22.12.23 |
16 | |:---------------------------|
17 | | Mo, 11:00 - 12:30 Uhr (TR) |
18 | | online |
19 |
20 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [Moodle]**)
21 | :::
22 | ::::::
23 |
24 | ### Praktikum/Übung: 2 SWS
25 |
26 | foo bar wuppie fluppie 42
27 |
--------------------------------------------------------------------------------
/filters/test/tabs_title.md:
--------------------------------------------------------------------------------
1 | ### Vorlesung: 2 SWS
2 |
3 | :::::: {.tabs groupid="hochschule"}
4 | ::: {.tab title="HSBI"}
5 |
6 | | 09.10.23 - 27.10.23 | 30.10.23 - 26.01.24 |
7 | |:---------------------------|:---------------------------|
8 | | Mo, 10:00 - 11:30 Uhr (DE) | Mo, 09:00 - 10:30 Uhr (DE) |
9 | | online/XXXX | online/XXXX |
10 |
11 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [ILIAS]**)
12 |
13 | :::
14 | ::: {.tab title="TDU"}
15 | | 18.09.23 - 22.12.23 |
16 | |:---------------------------|
17 | | Mo, 11:00 - 12:30 Uhr (TR) |
18 | | online |
19 |
20 | Durchführung als **Flipped Classroom**: Sitzungen per Zoom (**Zugangsdaten siehe [Moodle]**)
21 | :::
22 | ::::::
23 |
24 | ### Praktikum/Übung: 2 SWS
25 |
26 | foo bar wuppie fluppie 42
27 |
--------------------------------------------------------------------------------
/filters/tex.lua:
--------------------------------------------------------------------------------
1 |
2 | -- LaTeX commands to be handled (matching definitions needed!)
3 | local latexCmds = pandoc.List:new {'alert', 'bsp', 'hinweis', 'origin', 'thema'}
4 |
5 | -- LaTeX environments to be handled (matching definitions needed!)
6 | local latexEnvs = pandoc.List:new {'cbox', 'center'}
7 |
8 | -- handle selected Spans: embed content into a RawInline with matching LaTeX command
9 | function Span(el)
10 | local cmd = el.classes[1]
11 |
12 | -- should we handle this command?
13 | if latexCmds:includes(cmd) then
14 | return {pandoc.RawInline("latex", "\\" .. cmd .. "{")} .. el.content .. {pandoc.RawInline("latex", "}")}
15 | end
16 | end
17 |
18 | -- handle selected Divs: embed content into a RawBlock with matching LaTeX environment
19 | function Div(el)
20 | local env = el.classes[1]
21 |
22 | -- should we handle this environment?
23 | if latexEnvs:includes(env) then
24 | return {pandoc.RawBlock("latex", "\\begin{" .. env .. "}")} .. el.content .. {pandoc.RawBlock("latex", "\\end{" .. env .. "}")}
25 | end
26 | end
27 |
28 |
29 | -- center images without captions too (like "real" images w/ caption aka figures)
30 | --
31 | -- remove as a precaution a possibly existing parameter `web_width`, which
32 | -- should only be respected in the web version.
33 | --
34 | -- note: images w/ caption will be parsed (implicitly) as figures instead - no need to check for empty caption here
35 | function Image(el)
36 | el.attributes["web_width"] = nil
37 | return { pandoc.RawInline('latex', '\\begin{center}'), el, pandoc.RawInline('latex', '\\end{center}') }
38 | end
39 |
40 |
41 | -- wrap inline code in `inlinecode` LaTeX command
42 | function Code(el)
43 | return { pandoc.RawInline("latex", "\\inlinecode{"), el, pandoc.RawInline("latex", "}") }
44 | end
45 |
46 |
47 | -- wrap listings (code block) in `codeblock` LaTeX environment
48 | -- set font size to "small" (default) or use attribute "size"
49 | function CodeBlock(el)
50 | local size = el.attributes.size or "small"
51 | return { pandoc.RawBlock("latex", "\\" .. size),
52 | pandoc.RawBlock("latex", "\\begin{codeblock}"),
53 | el,
54 | pandoc.RawBlock("latex", "\\end{codeblock}"),
55 | pandoc.RawBlock("latex", "\\normalsize") }
56 | end
57 |
58 |
59 | -- do not remove "`el`{=markdown}", convert it to raw "LaTeX" instead
60 | -- see https://github.com/KI-Vorlesung/kitest/issues/80
61 | function RawInline(el)
62 | if el.format:match 'markdown' then
63 | return pandoc.RawInline('latex', el.text)
64 | end
65 | end
66 |
--------------------------------------------------------------------------------
/filters/title2h1.lua:
--------------------------------------------------------------------------------
1 | -- Convert metadata title to (first) H1 header in document
2 |
3 | function Pandoc(doc)
4 | if doc.meta.title then
5 | return pandoc.Pandoc({ pandoc.Header(1, doc.meta.title) } .. doc.blocks, doc.meta)
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/hugo/README.md:
--------------------------------------------------------------------------------
1 | # Hugo Theme
2 |
3 | The folder [`hugo-lecture`](hugo-lecture/) contains additional partials and shortcodes
4 | to create a HTML version of markdown lecture materials using Hugo.
5 |
6 | To be used with [Hugo Relearn Theme](https://github.com/McShelby/hugo-theme-relearn),
7 | which will be added to [`hugo-theme-relearn`](hugo-theme-relearn/) when building the Docker image.
8 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021-2022 Carsten Gips, Canan Yıldız
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/README.md:
--------------------------------------------------------------------------------
1 | # Hugo-Lecture
2 |
3 | ## Overview
4 |
5 | This project defines a selection of [Hugo](https://gohugo.io/)
6 | [archetypes](https://gohugo.io/content-management/archetypes/),
7 | [layouts](https://gohugo.io/templates/),
8 | [partials](https://gohugo.io/templates/partials/) and
9 | [shortcodes](https://gohugo.io/content-management/shortcodes/)
10 | for creating and publishing teaching materials on
11 | [GitHub](https://docs.github.com/en/pages).
12 |
13 | This repo is intended to be included in the target project as a
14 | [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
15 | to partially overwrite the main theme, i.e. [Hugo Relearn Theme](https://github.com/McShelby/hugo-theme-relearn).
16 |
17 | _Note_: This is a merge of the
18 | [Hugo-Lecture-Archetypes](https://github.com/cagix/Hugo-Lecture-Archetypes)
19 | and [Hugo-Lecture-Layouts](https://github.com/cagix/Hugo-Lecture-Layouts)
20 | repositories, which won't receive any further maintenance now.
21 |
22 |
23 | ## Contributing
24 |
25 | Questions, bug reports, feature requests and pull requests are very welcome.
26 | Please be sure to read the [contributor guidelines](CONTRIBUTING.md) before
27 | opening a new issue.
28 |
29 |
30 | ---
31 |
32 | ## License
33 |
34 | This [work](https://github.com/cagix/Hugo-Lecture) by
35 | [Carsten Gips](https://github.com/cagix),
36 | [Canan Yıldız](https://github.com/cyildiz), and
37 | [contributors](https://github.com/cagix/Hugo-Lecture/graphs/contributors)
38 | is licensed under [MIT](LICENSE.md).
39 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/archetypes/README.md:
--------------------------------------------------------------------------------
1 | # Archetypes
2 |
3 | Use either "page bundles" or "single markdown files" for individual lectures. Lectures are "leafs"
4 | in the branch hierarchy.
5 |
6 | Folders which do not represent leafs must contain a "landing page", i.e. a file "`_index.md`".
7 |
8 | **Do not use underscore ("`_`") nor blanks ("` `") in file names nor in folder names.**
9 |
10 | Folders which contain an empty text file "`.noslides`" will be ignored when generating slides.
11 |
12 |
13 | ## Page Bundles
14 |
15 | **Support for page bundles has been dropped. Please use single markdown files!**
16 |
17 | ```
18 | content/
19 | |___ _index.md <= Landing Page
20 | |___ mypage/ <= Page Bundle for Lecture "mypage"
21 | |___ index.md <= Lecture
22 | |___ images/
23 | |___ wuppie.png <= use ""
24 | |___ files/
25 | |___ annotated.pdf <= will be included automatically (lecture-bc, lecture-cy)
26 | ```
27 |
28 | To reference images in `index.md` use ``. This works in GH preview, and in
29 | slides and generated pages.
30 |
31 |
32 | ## Single Markdown Files
33 |
34 | ```
35 | content/
36 | |___ _index.md <= Landing Page
37 | |___ mypage.md <= Lecture "mypage" (Single Markdown File)
38 | |___ mypage.images/
39 | |___ wuppie.png <= use ""
40 | |___ mypage.files/
41 | |___ annotated.pdf <= will be included automatically (lecture-bc, lecture-cy)
42 | |___ images/
43 | |___ wuppie.png <= use ""
44 | |___ files/
45 | |___ annotated.pdf <= will be included automatically (lecture-bc, lecture-cy)
46 | ```
47 |
48 | To reference images in `mypage.md` use ``. This works in GH preview,
49 | and in slides.
50 |
51 | For generated pages we need to transform this to `` via Lua filter
52 | or use a (new) custom shortcode. (to be done in https://github.com/PM-Dungeon/PM-Lecture/issues/128)
53 |
54 | You could also just use `images/` and/or `files/`. Those folders are reachable from all pages in
55 | this chapter ...
56 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/archetypes/algorithm.tex:
--------------------------------------------------------------------------------
1 | \documentclass[
2 | border=0.2cm,
3 | convert={density=600}
4 | ]{standalone}
5 |
6 | \usepackage{listings}
7 | \usepackage{standalone}
8 | \usepackage{color}
9 |
10 | \begin{document}
11 |
12 | %%
13 | %% 1. Copy this template into an image folder of your page: "images/my-algorithm.tex".
14 | %% 2. Paste the algorithm or listing with math escaping here and replace this comment.
15 | %% 3. Include the image with the same name in your page "index.md": "[My Algorithm](images/my-algorithm.png)".
16 | %%
17 | %% When generating the slide sets and the website, "images/my-algorithm.png" is
18 | %% automatically generated from "images/my-algorithm.tex" during pre-processing.
19 | %%
20 |
21 | \end{document}
22 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/archetypes/assignment.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: assignment
3 | title: "{{ replace .Name '-' ' ' | title }}"
4 | author: "NAME (INSTITUT)"
5 | points: 10
6 | weight: 1
7 | hidden: true
8 | sketch: true
9 | ---
10 |
11 |
12 | ## Aufgabe 1: XYZ (2P)
13 |
14 | tbd
15 |
16 |
17 | ## Aufgabe 2: XYZ (3P)
18 |
19 | tbd
20 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/archetypes/chapter.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: default
3 | title: "{{ replace .Name '-' ' ' | title }}"
4 | linkTitle: "{{ replace .Name '-' ' ' | title }}"
5 | weight: 5
6 | #hidden: true
7 | ---
8 |
9 |
10 | # {{ replace .Name '-' ' ' | title }}
11 |
12 |
13 | `{{< children showhidden="true" >}}`{=markdown}
14 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/archetypes/lecture-bc.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: lecture-bc
3 | title: "{{ replace .Name '-' ' ' | title }}"
4 | linkTitle: "{{ replace .Name '-' ' ' | title }}"
5 | author: "BC George (HSBI)"
6 | weight: 5
7 | readings:
8 | - key: "aho2013compilers"
9 | comment: "Kapitel 2 und 3"
10 | - key: "Mogensen2017"
11 | outcomes:
12 | - k1: "**wuppie**"
13 | - k2: "*foo*"
14 | - k1: "fluppie"
15 | quizzes:
16 | - link: "XYZ"
17 | name: "Testquizz"
18 | assignments:
19 | - topic: sheet01
20 | - topic: sheet02
21 | attachments:
22 | - link: "https://www.hsbi.de"
23 | name: "Extra Material, e.g. annotated slides"
24 | sketch: true
25 | ---
26 |
27 |
28 | # Wiederholung
29 |
30 | ## Folie: Frage
31 | Lorem Ipsum.
32 |
33 |
34 |
35 | # Motivation
36 |
37 | ## Folie: Idee/Problem
38 | Lorem Ipsum.
39 |
40 | ## Themen für heute
41 | Lorem Ipsum.
42 |
43 |
44 |
45 | # Thema I
46 |
47 | ## Folie 1
48 | ...
49 |
50 | ## Folie 2
51 | ...
52 |
53 | ## Folie 3
54 | ...
55 |
56 |
57 |
58 | # Thema II
59 |
60 | ## Folie 1
61 | ...
62 |
63 | ## Folie 2
64 | ...
65 |
66 | ## Folie 3
67 | ...
68 |
69 |
70 |
71 | # Wrap-Up
72 | ## Wrap-Up
73 | Lorem Ipsum.
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | ::: slides
83 | ## LICENSE
84 | 
85 |
86 | Unless otherwise noted, this work is licensed under CC BY-SA 4.0.
87 |
88 | \bigskip
89 |
90 | ### Exceptions
91 | * TODO (what, where, license)
92 | :::
93 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/archetypes/lecture-cg.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: lecture-cg
3 | title: "{{ replace .Name '-' ' ' | title }}"
4 | linkTitle: "{{ replace .Name '-' ' ' | title }}"
5 | author: "Carsten Gips (HSBI)"
6 | weight: 5
7 | readings:
8 | - key: "Russell2020"
9 | comment: "Kapitel 2 und 3"
10 | - key: "Ertel2017"
11 | tldr: |
12 | hier kommt eine tolle inline-zusammenfassung!
13 | Formatierung _könnte_ auch **gehen**?
14 | outcomes:
15 | - k1: "**wuppie**"
16 | - k2: "*foo*"
17 | - k1: "fluppie"
18 | quizzes:
19 | - link: "XYZ"
20 | name: "Testquizz"
21 | assignments:
22 | - topic: sheet01
23 | - topic: sheet02
24 | youtube:
25 | - link: "https://youtu.be/XYZ"
26 | name: "Use This As Link Text (Direkt-Link)"
27 | fhmedia:
28 | - link: "https://www.hsbi.de/medienportal/m/XYZ"
29 | name: "Use This As Link Text (Direkt-Link)"
30 | tibav:
31 | - link: "https://av.tib.eu/media/XYZ"
32 | name: "Use This As Link Text (Direkt-Link)"
33 | sketch: true
34 | ---
35 |
36 |
37 | ## Motivation
38 | Lorem Ipsum. Starte mit H2-Level.
39 | ...
40 |
41 | ## Folie 2
42 | ...
43 |
44 | ## Folie 3
45 | ...
46 |
47 | ## Folie 4
48 | ...
49 |
50 | ## Folie 5
51 | ...
52 |
53 | ## Folie 6
54 | ...
55 |
56 | ## Wrap-Up
57 | ...
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | ::: slides
67 | ## LICENSE
68 | 
69 |
70 | Unless otherwise noted, this work is licensed under CC BY-SA 4.0.
71 |
72 | \bigskip
73 |
74 | ### Exceptions
75 | * TODO (what, where, license)
76 | :::
77 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/archetypes/lecture-cy.md:
--------------------------------------------------------------------------------
1 | ---
2 | archetype: lecture-cy
3 | title: "{{ replace .Name '-' ' ' | title }}"
4 | linkTitle: "{{ replace .Name '-' ' ' | title }}"
5 | author: "Canan Yıldız (Türkisch-Deutsche Universität)"
6 | weight: 5
7 | readings:
8 | - key: "Russell2020"
9 | comment: "Kapitel 2 und 3"
10 | - key: "Ertel2017"
11 | outcomes:
12 | - k1: "**wuppie**"
13 | - k2: "*foo*"
14 | - k1: "fluppie"
15 | quizzes:
16 | - link: "XYZ"
17 | name: "Testquizz"
18 | assignments:
19 | - topic: sheet01
20 | - topic: sheet02
21 | youtube:
22 | - link: "https://youtu.be/XYZ"
23 | name: "Use This As Link Text"
24 | attachments:
25 | - link: "files/MyAnnotatedSlides.pdf"
26 | name: "Extra Material, e.g. annotated slides"
27 | sketch: true
28 | ---
29 |
30 |
31 | ## Zusammenfassung / Recap
32 |
33 | ...
34 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/archetypes/assignment/article.html:
--------------------------------------------------------------------------------
1 | {{- $page := .page }}
2 | {{- $content := .content }}
3 | {{- with $page }}
4 |
5 | {{ partial "heading-pre.html" . }}{{ .Title }}
{{ partial "heading-post.html" . }}
6 |
7 |
8 | {{ $topic := .Page.File.TranslationBaseName }}
9 |
10 | {{ $schedule := .Site.Data.schedule }}
11 |
12 | {{ $due := "" }}
13 | {{ range $schedule }}
14 | {{ range index . "assignment" }}
15 | {{ if eq ($topic) (index . "topic") }}
16 | {{ with index . "due" }}{{ $due = . }}{{ end }}
17 | {{ end }}
18 | {{ end }}
19 | {{ end }}
20 | {{ $points := .Params.points }}
21 |
22 |
23 | {{ if .Params.sketch }}
24 | {{ partial "sketch.html" . }}
25 | {{ else }}
26 | {{ if and $points $due}}
27 | {{- printf "(%s; %s)" $points $due -}}
28 | {{ else if $points }}
29 | {{- printf "(%s)" $points -}}
30 | {{ else if $due }}
31 | {{- printf "(%s)" $due -}}
32 | {{ else }}
33 | {{ end }}
34 |
35 | {{ $content | safeHTML }}
36 |
37 | {{ partial "bib.html" . }}
38 | {{ end }}
39 |
40 |
41 |
44 |
45 | {{- end }}
46 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/archetypes/lecture-bc/article.html:
--------------------------------------------------------------------------------
1 | {{- $page := .page }}
2 | {{- $content := .content }}
3 | {{- with $page }}
4 |
5 | {{ partial "heading-pre.html" . }}{{ .Title }}
{{ partial "heading-post.html" . }}
6 |
7 |
8 | {{ if .Params.sketch }}
9 | {{ partial "sketch.html" . }}
10 | {{ else }}
11 | {{ .Scratch.Set "attachments_title" "Annotierte Folien" }}
12 | {{ partial "attachments.html" . }}
13 |
14 | {{ $content | safeHTML }}
15 |
16 | {{ partial "bib.html" . }}
17 | {{ partial "outcomes.html" . }}
18 | {{ partial "assignments.html" . }}
19 | {{ end }}
20 |
21 |
22 |
25 |
26 | {{- end }}
27 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/archetypes/lecture-cg/article.html:
--------------------------------------------------------------------------------
1 | {{- $page := .page }}
2 | {{- $content := .content }}
3 | {{- with $page }}
4 |
5 | {{ partial "heading-pre.html" . }}{{ .Title }}
{{ partial "heading-post.html" . }}
6 |
7 |
8 | {{ if .Params.sketch }}
9 | {{ partial "sketch.html" . }}
10 | {{ else }}
11 | {{ partial "tldr.html" . }}
12 |
13 | {{ .Scratch.Set "videos_params" .Params.youtube }}
14 | {{ .Scratch.Set "videos_title" "Videos (YouTube)" }}
15 | {{ .Scratch.Set "videos_linktext" "Direkt-Link YouTube" }}
16 | {{ partial "videos.html" . }}
17 |
18 | {{ .Scratch.Set "videos_params" .Params.fhmedia }}
19 | {{ .Scratch.Set "videos_title" "Videos (HSBI-Medienportal)" }}
20 | {{ .Scratch.Set "videos_linktext" "Direkt-Link HSBI-Medienportal" }}
21 | {{ partial "videos.html" . }}
22 |
23 | {{ .Scratch.Set "videos_params" .Params.tibav }}
24 | {{ .Scratch.Set "videos_title" "Videos (TIB AV-Portal)" }}
25 | {{ .Scratch.Set "videos_linktext" "Direkt-Link TIB AV-Portal" }}
26 | {{ partial "videos.html" . }}
27 |
28 | {{ .Scratch.Set "attachments_title" "Slides" }}
29 | {{ partial "attachments.html" . }}
30 |
31 | {{ partial "outcomes.html" . }}
32 |
33 | {{ $content | safeHTML }}
34 |
35 | {{ partial "quizzes.html" . }}
36 | {{ partial "challenges.html" . }}
37 | {{ partial "assignments.html" . }}
38 | {{ partial "bib.html" . }}
39 | {{ end }}
40 |
41 |
42 |
45 |
46 | {{- end }}
47 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/archetypes/lecture-cy/article.html:
--------------------------------------------------------------------------------
1 | {{- $page := .page }}
2 | {{- $content := .content }}
3 | {{- with $page }}
4 |
5 | {{ partial "heading-pre.html" . }}{{ .Title }}
{{ partial "heading-post.html" . }}
6 |
7 |
8 | {{ if .Params.sketch }}
9 | {{ partial "sketch.html" . }}
10 | {{ else }}
11 | {{ .Scratch.Set "videos_params" .Params.youtube }}
12 | {{ .Scratch.Set "videos_title" "Videos" }}
13 | {{ .Scratch.Set "videos_linktext" "Direkt-Link YouTube" }}
14 | {{ partial "videos.html" . }}
15 |
16 | {{ .Scratch.Set "attachments_title" "Folien" }}
17 | {{ partial "attachments.html" . }}
18 |
19 |
20 | {{ $content | safeHTML }}
21 |
22 |
23 | {{ partial "assignments.html" . }}
24 | {{ partial "outcomes.html" . }}
25 | {{ partial "quizzes.html" . }}
26 | {{ partial "challenges.html" . }}
27 | {{ partial "bib.html" . }}
28 | {{ end }}
29 |
30 |
31 |
34 |
35 | {{- end }}
36 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/assignments.html:
--------------------------------------------------------------------------------
1 | {{ $assignments := .Params.assignments }}
2 | {{ $schedule := .Site.Data.schedule }}
3 |
4 | {{ if $assignments }}
5 |
6 | {{ $c := "" }}
7 | {{ range $assignments }}
8 | {{ $topic := index . "topic" }}
9 | {{ $due := "" }}
10 | {{ range $schedule }}
11 | {{ range index . "assignment" }}
12 | {{ if eq ($topic) (index . "topic") }}
13 | {{ with index . "due" }}{{ $due = . }}{{ end }}
14 | {{ end }}
15 | {{ end }}
16 | {{ end }}
17 |
18 | {{ with $.Site.GetPage $topic }}
19 | {{ $c = printf "%s - %s" $c (.Permalink | safeURL) .Title }}
20 | {{ with $due }}{{ $c = printf "%s (Abgabe: %s)" $c . }}{{ end }}
21 | {{ $c = printf "%s
" $c }}
22 | {{ end }}
23 | {{ end }}
24 | {{ $c = printf "%s
" $c }}
25 |
26 | {{ partial "shortcodes/notice.html" (dict
27 | "page" .
28 | "style" "note"
29 | "icon" "fas fa-laptop-code"
30 | "title" "Übungsblätter/Aufgaben"
31 | "content" $c
32 | )}}
33 |
34 | {{ end }}
35 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/attachments.html:
--------------------------------------------------------------------------------
1 | {{ $attachments := .Params.attachments }}
2 | {{ $title := .Scratch.Get "attachments_title" | default "Materialien" }}
3 |
4 | {{ if $attachments }}
5 |
6 | {{ $c := "" }}
7 | {{ range $attachments }}
8 | {{ $n := index . "name" | default "(annotierter) Foliensatz" }}
9 | {{ with index . "link" }}
10 | {{ $url := urls.Parse . }}
11 | {{ if $url.Scheme }}
12 | {{ $url = $url.String }}
13 | {{ else }}
14 | {{ $url = $url.Path }}
15 | {{ with (strings.TrimPrefix "/" $.Page.File.Dir) }}
16 | {{/* if not on "home" page: use path to file */}}
17 | {{ $url = printf "%s/%s" . $url }}
18 | {{ end }}
19 | {{ $url = $url | path.Clean | absURL }}
20 | {{ end }}
21 | {{ $c = printf "%s - %s
" $c ($url | safeURL) $n }}
22 | {{ end }}
23 | {{ end }}
24 | {{ $c = printf "%s
" $c }}
25 |
26 | {{ partial "shortcodes/notice.html" (dict
27 | "page" .
28 | "style" "info"
29 | "icon" "far fa-file-powerpoint"
30 | "title" $title
31 | "content" $c
32 | )}}
33 |
34 | {{ end }}
35 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/bib.html:
--------------------------------------------------------------------------------
1 | {{ $readings := .Params.readings }}
2 | {{ $data := .Site.Data.readings.references }}
3 |
4 | {{ if $readings }}
5 |
6 | {{ $c := "" }}
7 | {{ range sort $readings "key" }}
8 | {{ $key := index . "key" }}
9 | {{ $comment := index . "comment" }}
10 |
11 | {{ range where $data "id" $key }}
12 | {{ $title := index . "title" }}
13 | {{ $author := index . "author" }}
14 | {{ $url := index . "url" }}
15 | {{ $isbn := index . "isbn" }}
16 | {{ $doi := index . "doi" }}
17 |
18 | {{ $details := slice "" }}
19 | {{ range $i, $v := $author }}
20 | {{ if eq $i 0 }}
21 | {{ $details = slice (delimit $v ", ") }}
22 | {{ else }}
23 | {{ $details = $details | append (delimit $v ", ") }}
24 | {{ end }}
25 | {{ end }}
26 | {{ $details = delimit $details " und " }}
27 | {{ $details = slice ($details) }}
28 | {{ with index . "publisher" }}{{ $details = $details | append . }}{{ end }}
29 | {{ with index . "issued" }}{{ $details = $details | append . }}{{ end }}
30 | {{ $details = delimit $details ", " }}
31 |
32 | {{ $c = printf "%s - " $c $key }}
33 | {{ if $url }}
34 | {{ $c = printf "%s[%s] %s" $c $key ($url | safeURL) $title }}
35 | {{ else }}
36 | {{ $c = printf "%s[%s] %s" $c $key $title }}
37 | {{ end }}
38 | {{ if $details }}
39 | {{ $c = printf "%s
%s." $c $details }}
40 | {{ if $isbn }}
41 | {{ $c = printf "%s ISBN %s." $c ($isbn | safeURL) $isbn }}
42 | {{ end }}
43 | {{ if $doi }}
44 | {{ $c = printf "%s DOI %s." $c ($doi | safeURL) $doi }}
45 | {{ end }}
46 | {{ end }}
47 | {{ if $comment }}
48 | {{ $c = printf "%s
%s" $c $comment }}
49 | {{ end }}
50 | {{ $c = printf "%s " $c }}
51 | {{ end }}
52 | {{ end }}
53 | {{ $c = printf "%s
" $c }}
54 |
55 | {{ partial "shortcodes/notice.html" (dict
56 | "page" .
57 | "style" "info"
58 | "icon" "fas fa-book-reader"
59 | "title" "Quellen"
60 | "content" $c
61 | )}}
62 |
63 | {{ end }}
64 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/challenges.html:
--------------------------------------------------------------------------------
1 | {{ $challenges := .Params.challenges }}
2 |
3 | {{ if $challenges }}
4 |
5 | {{ $c := $challenges | markdownify }}
6 |
7 | {{ partial "shortcodes/notice.html" (dict
8 | "page" .
9 | "style" "note"
10 | "icon" "fas fa-puzzle-piece"
11 | "title" "Challenges"
12 | "content" $c
13 | )}}
14 |
15 | {{ end }}
16 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/content-footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ readFile "static/license.html" | safeHTML }}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/custom-header.html:
--------------------------------------------------------------------------------
1 |
168 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/due.html:
--------------------------------------------------------------------------------
1 | {{ $due := "" }}
2 |
3 | {{ range $.Scratch.Get "schedule" }}
4 | {{ range index . "assignment" }}
5 | {{ if eq ($.Scratch.Get "topic") (index . "topic") }}
6 | {{ with index . "due" }}{{ $due = . }}{{ end }}
7 | {{ end }}
8 | {{ end }}
9 | {{ end }}
10 |
11 | {{ return $due }}
12 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/favicon.html:
--------------------------------------------------------------------------------
1 | {{- $assetBusting := not .Site.Params.disableAssetsBusting }}
2 |
3 | {{ $logo := "images/logo.png" }}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/logo.html:
--------------------------------------------------------------------------------
1 | {{ $logo := "images/logo.png" }}
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/menu-footer.html:
--------------------------------------------------------------------------------
1 |
2 | {{ readFile "static/links.html" | safeHTML }}
3 |
4 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/outcomes.html:
--------------------------------------------------------------------------------
1 | {{ $outcomes := .Params.outcomes }}
2 |
3 | {{ if (and $outcomes (reflect.IsSlice $outcomes)) }} {{/* do not engage unless it's a list: workaround for use in lecture-cy */}}
4 |
5 | {{ $c := "" }}
6 | {{ range $outcomes }}
7 | {{ with index . "k1" }}{{ $c = printf "%s - (K1) %s
" $c (. | markdownify) }}{{ end }}
8 | {{ with index . "k2" }}{{ $c = printf "%s - (K2) %s
" $c (. | markdownify) }}{{ end }}
9 | {{ with index . "k3" }}{{ $c = printf "%s - (K3) %s
" $c (. | markdownify) }}{{ end }}
10 | {{ with index . "k4" }}{{ $c = printf "%s - (K4) %s
" $c (. | markdownify) }}{{ end }}
11 | {{ end }}
12 | {{ $c = printf "%s
" $c }}
13 |
14 | {{ partial "shortcodes/notice.html" (dict
15 | "page" .
16 | "style" "tip"
17 | "icon" "fas fa-lightbulb"
18 | "title" "Lernziele"
19 | "content" $c
20 | )}}
21 |
22 | {{ end }}
23 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/quizzes.html:
--------------------------------------------------------------------------------
1 | {{ $quizzes := .Params.quizzes }}
2 |
3 | {{ if $quizzes }}
4 |
5 | {{ $c := "" }}
6 | {{ range $quizzes }}
7 | {{ $name := index . "name" }}
8 | {{ $link := index . "link" }}
9 | {{ if $link }}
10 | {{ $c = printf "%s - %s
" $c ($link | safeURL) (default $link $name) }}
11 | {{ end }}
12 | {{ end }}
13 | {{ $c = printf "%s
" $c }}
14 |
15 | {{ partial "shortcodes/notice.html" (dict
16 | "page" .
17 | "style" "tip"
18 | "icon" "fas fa-user-check"
19 | "title" "Quizzes"
20 | "content" $c
21 | )}}
22 |
23 | {{ end }}
24 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/sketch.html:
--------------------------------------------------------------------------------
1 |
2 | Inhalt befindet sich im Aufbau
3 | und wird rechtzeitig bereitgestellt.
4 |
5 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/tldr.html:
--------------------------------------------------------------------------------
1 | {{ $tldr := .Params.tldr }}
2 |
3 | {{ if $tldr }}
4 |
5 | {{ $c := $tldr | markdownify }}
6 |
7 | {{ partial "shortcodes/notice.html" (dict
8 | "page" .
9 | "style" "info"
10 | "icon" "fas fa-graduation-cap"
11 | "title" "TL;DR"
12 | "content" $c
13 | )}}
14 |
15 | {{ end }}
16 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/partials/videos.html:
--------------------------------------------------------------------------------
1 | {{ $videos := .Scratch.Get "videos_params" }}
2 | {{ $title := .Scratch.Get "videos_title" | default "Videos" }}
3 | {{ $linktext := .Scratch.Get "videos_linktext" | default "Direkt-Link" }}
4 |
5 | {{ if $videos }}
6 |
7 | {{ $c := "" }}
8 | {{ range $videos }}
9 | {{ $n := index . "name" | default $linktext }}
10 | {{ with index . "link" }}
11 | {{ $c = printf "%s - %s
" $c (. | safeURL) $n }}
12 | {{ end }}
13 | {{ end }}
14 | {{ $c = printf "%s
" $c }}
15 |
16 | {{ partial "shortcodes/notice.html" (dict
17 | "page" .
18 | "style" "info"
19 | "icon" "fas fa-podcast"
20 | "title" $title
21 | "content" $c
22 | )}}
23 |
24 | {{ end }}
25 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/shortcodes/img.html:
--------------------------------------------------------------------------------
1 | {{ $src := .Get "src" | default "" }}
2 | {{ $caption := .Get "caption" | default "" }}
3 | {{ $width := .Get "width" | default "auto"}}
4 | {{ $height := .Get "height" | default "auto"}}
5 | {{ $class := .Get "class" | default "" }}
6 |
7 | {{ $src = urls.Parse $src }}
8 | {{ if $src.Scheme }}
9 | {{ $src = $src.String }}
10 | {{ else }}
11 | {{ $src = $src.Path }}
12 | {{ with (strings.TrimPrefix "/" $.Page.File.Dir) }}
13 | {{/* if not on "home" page: use path to file */}}
14 | {{ $src = printf "%s/%s" . $src }}
15 | {{ end }}
16 | {{ $src = $src | path.Clean | absURL }}
17 | {{ end }}
18 |
19 | {{/*
20 | Emulating the native Hugo shortcode "{{% figure src="..." caption="..." width="..." height="..." class="..." %}}"
21 | */}}
22 | {{ with $src }}
23 |
24 |
25 | {{- $caption | markdownify -}}
26 |
27 | {{ end }}
28 |
--------------------------------------------------------------------------------
/hugo/hugo-lecture/layouts/shortcodes/schedule.html:
--------------------------------------------------------------------------------
1 | {{ $file := .Get "file" | default "schedule" }}
2 | {{ $plan := index .Site.Data $file }}
3 |
4 | {{ $if_misc_column := false }}
5 | {{ range $plan }}{{ with index . "misc_column" }}{{ $if_misc_column = true }}{{ end }}{{ end }}
6 |
7 |
8 | {{ if $plan }}
9 |
10 |
11 |
12 |
13 | Woche |
14 | Vorlesung |
15 | Praktikum/Übung |
16 | {{ with $if_misc_column }}Verschiedenes | {{ end }}
17 |
18 |
19 |
20 |
21 | {{ range $i, $w := $plan }}
22 | {{ $week := index $w "week" | default (add $i 1 | printf "%d") }}
23 | {{ $datel := index $w "date" }}
24 | {{ $lecture := index $w "lecture" }}
25 | {{ $assignment := index $w "assignment" }}
26 | {{ $misc_column := index $w "misc_column" }}
27 | {{ $misc_lecture := index $w "misc_lecture" }}
28 | {{ $misc_assignment := index $w "misc_assignment" }}
29 |
30 | {{ printf "%s" $week }} |
31 |
32 |
33 | {{ if $datel }}{{- $datel -}}{{ end }}
34 |
35 | {{ range $lecture }}
36 | {{ $topic := index . "topic" }}
37 | {{ $leader := index . "leader" }}
38 | {{ $notes := index . "notes" }}
39 | {{ if $topic }}
40 | {{ with $.Site.GetPage $topic }}
41 | -
42 | {{ $path := .File.Dir | path.Clean }}
43 | {{ $path = replace ($path | path.Clean) "/" " > " | upper }}
44 | {{if gt (len $path) 1}}{{ printf "%s > " $path }}{{end}}
45 | {{ $title := .Params.linkTitle | default .Title }}
46 | {{- $title -}}
47 | {{ if $leader }}{{ printf " (%s)" $leader }}{{ end }}
48 | {{ if $notes }}
{{ printf "Hinweis: %s" $notes }}{{ end }}
49 |
50 | {{ end }}
51 | {{ end }}
52 | {{ end }}
53 |
54 | {{ range $misc_lecture }}
55 | {{ with index . "notes" }}{{- . -}} {{ end }}
56 | {{ end }}
57 | |
58 |
59 |
60 |
61 | {{ range $assignment }}
62 | {{ $topic := index . "topic" }}
63 | {{ $due := index . "due" }}
64 | {{ if $topic }}
65 | {{ with $.Site.GetPage $topic }}
66 | -
67 | {{ $title := .Params.linkTitle | default .Title }}
68 | {{- $title -}}
69 | {{ if $due }}
{{ printf "(%s)" $due }}{{ end }}
70 |
71 | {{ end }}
72 | {{ end }}
73 | {{ end }}
74 |
75 | {{ range $misc_assignment }}
76 | {{ with index . "notes" }}{{- . -}} {{ end }}
77 | {{ end }}
78 | |
79 |
80 | {{ if $if_misc_column }}
81 |
82 | {{ range $misc_column }}
83 | {{ with index . "notes" }}{{- . -}} {{ end }}
84 | {{ end }}
85 | |
86 | {{ end }}
87 |
88 |
89 | {{ end }}
90 |
91 |
92 |
93 | {{ end }}
94 |
--------------------------------------------------------------------------------
/hugo/hugo-theme-relearn/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/hugo/hugo-theme-relearn/.gitkeep
--------------------------------------------------------------------------------
/metadata.yml:
--------------------------------------------------------------------------------
1 | '@context': https://schema.org/
2 | creativeWorkStatus: Published
3 | type: LearningResource
4 | name: Pandoc Markdown Lecture Template
5 | description: >-
6 | This project defines a skeleton repo for creating lecture material, i.e.
7 | slides and handouts including lecture notes, homework sheets plus the
8 | corresponding evaluation sheets and exams plus solution sheets out of Pandoc
9 | Markdown using a single source approach.
10 | license: https://opensource.org/licenses/MIT
11 | id: https://github.com/cagix/pandoc-lecture
12 | creator:
13 | - givenName: Carsten
14 | familyName: Gips
15 | id: https://orcid.org/0000-0002-4230-9060
16 | type: Person
17 | affiliation:
18 | name: Hochschule Bielefeld
19 | type: Organization
20 | keywords:
21 | - markdown
22 | - pandoc
23 | - lecture material
24 | - teaching material
25 | - slides
26 | - handouts
27 | - lecture website
28 | - oer
29 | inLanguage:
30 | - de
31 | about:
32 | - https://w3id.org/kim/hochschulfaechersystematik/n079
33 | learningResourceType:
34 | - https://w3id.org/kim/hcrt/application
35 | educationalLevel:
36 | - https://w3id.org/kim/educationalLevel/level_A
37 | - https://w3id.org/kim/educationalLevel/level_6
38 | - https://w3id.org/kim/educationalLevel/level_7
39 | datePublished: '2024-02-28'
40 |
--------------------------------------------------------------------------------
/resources/beamer.tex:
--------------------------------------------------------------------------------
1 |
2 | %------------------------------------- Packages ----------------
3 | %\usepackage{xcolor} %% already included by beamer
4 | \usepackage{listings} %% see https://github.com/cagix/pandoc-lecture/issues/6
5 | %------------------------------------- Packages ----------------
6 |
7 | %------------------------------------- Beamer Settings ----------------
8 | % Default: 128mm x 96mm => 120mm text width
9 | \setbeamersize{text margin left=4mm}
10 | \setbeamersize{text margin right=4mm}
11 |
12 | %% Chance color theme (cf. metropolis theme manual)
13 | %\useoutertheme{metropolis}
14 | %\useinnertheme{metropolis}
15 | %\usefonttheme{metropolis}
16 | %\usecolortheme{seahorse}
17 | %------------------------------------- Beamer Settings ---------------------
18 |
19 | %------------------------------------- CMDs ---------------------
20 | \newcommand{\bsp}[1]{\vfill\hfill\beamerbutton{#1}}
21 | %------------------------------------- CMDs ---------------------
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/resources/definitions.tex:
--------------------------------------------------------------------------------
1 |
2 | %------------------------------------- Packages ----------------
3 | \usepackage[babel]{csquotes}
4 | \usepackage{xspace}
5 | \usepackage{tcolorbox}
6 | \tcbuselibrary{skins}
7 | %------------------------------------- Packages ----------------
8 |
9 | %------------------------------------- Fonts and Colors ---------------------
10 | \usepackage{xcolor} %% already included by beamer
11 |
12 | \definecolor{midnightblue}{rgb}{0.2,0.2,0.7}
13 |
14 | \definecolor{dkblue}{rgb}{0,0,0.6}
15 | \definecolor{dkgreen}{rgb}{0,0.6,0}
16 | \definecolor{dkred}{rgb}{0.6,0,0}
17 |
18 | \definecolor{listinggray}{gray}{0.92}
19 |
20 | \definecolor{headcolor}{rgb}{0.25,0.44,0.63} % #4070a0 as in html.css
21 | \definecolor{origin}{rgb}{0.93,0.93,0.93} % #ededed as in html.css
22 |
23 | \definecolor{code}{HTML}{F2F2F2} % #f2f2f2 as in html.css
24 | \definecolor{border}{HTML}{555555} % #555 as in html.css
25 | %------------------------------------- Fonts and Colors ---------------------
26 |
27 | %------------------------------------- CMDs ---------------------
28 | \newcommand{\blueArrow}{{\color{midnightblue}$\pmb{\Rightarrow}$}\xspace}
29 |
30 | \newcommand{\hinweis}[1]{\smallskip\emph{Hinweis}: #1} % `[...]{.hinweis}` in document will be converted by `tex.lua` filter to `\hinweis{...}`
31 | \newcommand{\thema}[1]{\medskip\textbf{Thema}: #1} % `[...]{.thema}` in document will be converted by `tex.lua` filter to `\thema{...}`
32 |
33 | \newcommand{\origin}[1]{\colorbox{origin}{{\tiny #1 }}}
34 | \newenvironment{cbox}{\begin{center}\begin{minipage}{0.6\textwidth}\begin{tcolorbox}[colback=listinggray,colframe=dkblue,halign=center]}{\end{tcolorbox}\end{minipage}\end{center}}
35 |
36 | \newtcolorbox{codeblock}{enhanced,frame hidden,colback=code,borderline={1pt}{1pt}{border,dotted}}
37 | \newtcbox{\inlinecode}{on line,frame hidden,colback=code,boxsep=0pt,left=1pt,right=1pt,top=2pt,bottom=2pt,boxrule=0pt}
38 | %------------------------------------- CMDs ---------------------
39 |
--------------------------------------------------------------------------------
/resources/dummy.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cagix/pandoc-lecture/3117bbe519659671ca57706d3a8802637b4c03b5/resources/dummy.js
--------------------------------------------------------------------------------
/resources/evaluation.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Evaluation"
3 | ...
4 |
5 |
6 |
7 |
8 | # Gruppeninformationen
9 |
10 | \begin{minipage}{118mm}
11 | \begin{tabular}{cp{52mm}p{36mm}}\hline
12 | Nr. & Name & Vorname \\\hline
13 | 1. &&\\[11pt]
14 | 2. &&\\[11pt]
15 | 3. &&\\[11pt]\hline
16 | \end{tabular}
17 | \end{minipage}
18 | \begin{minipage}{70mm}
19 | \begin{tabular}{|l|l|}\hline
20 | Teil & Summe \\\hline\hline
21 | Formale Bewertung (max. -10P) & \\[11pt]
22 | Inhaltliche Bewertung $if(points)$(max. $points$P)$endif$ & \\[11pt]\hline
23 | \textbf{GESAMT} (min. 0P) & \\[11pt]\hline
24 | \end{tabular}
25 | \end{minipage}
26 |
27 | \bigskip
28 | Bewertet durch:
29 |
30 |
31 |
32 |
33 | # Formale Bewertung
34 |
35 | \begin{tabular}{|p{58mm}|l|p{93mm}|l|}\hline
36 | Kriterium & bis zu & Notiz & Abzüge \\\hline\hline
37 | Einheitliche Formatierung des gesamten Codes (zB. K\&R) & -2P &&\\[11pt]\hline
38 | Doxygen-Dokumentation gemäß VL01/Orga vorhanden & -4P &&\\[11pt]\hline
39 | Makefile mit Standard-Targets gemäß VL01/Orga vorhanden & -2P &&\\[11pt]\hline
40 | Code lässt sich nicht kompilieren (`make all`) & -6P &&\\[11pt]
41 | \qquad Warnungen bei `-std=` (vgl. Vorgabe) & -2P && \\
42 | \qquad und `-Wall -pedantic` (\textbf{nur falls Code kompilierbar}) &&&\\[11pt]
43 | \qquad Test kompilieren nicht (\textbf{nur falls Code kompilierbar}) & -4P &&\\[5pt]\hline
44 | \end{tabular}
45 |
46 | Anmerkung: Cut-Off bei 10P: max. -10P Abzug
47 |
48 |
49 |
50 |
51 | # Inhaltliche Bewertung
52 |
53 | $if(questions)$
54 | $for(questions)$
55 |
56 | \begin{tabular}{|p{58mm}|p{107mm}|l|}\hline
57 | \textbf{$questions$} & Notiz & Punkte \\\hline\hline
58 | Testsuite: Alles OK? Tests rot (welche)? & & \\
59 | Code-Review (Befunde) & & \\
60 | Bemerkungen & & \\[5pt]
61 | && \\[22pt]\hline
62 | Nachfragen für Abnahme & & \\[22pt]\hline
63 | \end{tabular}
64 |
65 | $endfor$
66 | $endif$
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/resources/exam.tex:
--------------------------------------------------------------------------------
1 |
2 | %------------------------------------- Packages ----------------
3 | \usepackage[absolute]{textpos}
4 | \usepackage{colortbl}
5 | \usepackage{wasysym} % \Square
6 | \usepackage{ifoddpage}
7 | %------------------------------------- Packages ----------------
8 |
9 | %------------------------------------- Settings ---------------------
10 | \extrawidth{.5in}
11 | %------------------------------------- Settings ---------------------
12 |
13 | %------------------------------------- CMDs ---------------------
14 | \newcommand{\hsfont} {\fontfamily{phv}\fontseries{m}\fontshape{n}\selectfont}
15 | \newcommand{\hsheadfont}{\fontfamily{phv}\fontseries{b}\fontshape{n}\selectfont}
16 |
17 | %% `[...]{.answer}` will be translated by the lua filter into `\x{...}`
18 | \newcommand{\x}[1]{\ifprintanswers{\color{red}\bfseries#1\xspace}\fi}
19 |
20 | \newcommand{\Fortsetzung}{\begin{textblock*}{54mm}(80mm,276mm)\textsl{\textbf{Fortsetzung nächste Seite}}\end{textblock*}}
21 | \newcommand{\Leerseite}{\newpage\centerline{\textsl{\textbf{Leerseite}}}\newpage}
22 | %------------------------------------- CMDs ---------------------
23 |
24 | %------------------------------------- Listings ---------------------
25 | %% settings for pandoc option `--listings`
26 | \usepackage{listings}
27 | \lstset{basicstyle=\footnotesize\ttfamily\mdseries, xleftmargin=\bigskipamount, keywordstyle=\bfseries\color{dkblue}, identifierstyle=\ttfamily, commentstyle=\bfseries\color{gray}\textsl, stringstyle=\color{magenta}\upshape, emphstyle=\color{red}, emphstyle={[2]\color{blue}}, texcl=false, showspaces=false, showstringspaces=false, numbers=left, numberstyle=\footnotesize, breaklines=true, tabsize=4, backgroundcolor=\color{listinggray}, frame=shadowbox}
28 | %------------------------------------- Listings ---------------------
29 |
30 | %------------------------------------- Tables (left column gray background) --------------------------------
31 | \newenvironment{streifenenv}
32 | {
33 | \smallskip
34 | \begin{tabular}{>{\columncolor{headcolor}}p{1pt}p{0.94\textwidth}}
35 | &
36 | \begin{minipage}{0.94\textwidth}
37 | }
38 | {
39 | \end{minipage}
40 | \end{tabular}
41 | \smallskip
42 | }
43 |
44 | % use more space for table rows in exams to allow students to fill out blank cells
45 | % use less space in solutions: tables often fills a page, but we need to add grading information to the table
46 | \newcommand{\rowstretch}{\ifprintanswers \renewcommand{\arraystretch}{0.6} \else \renewcommand{\arraystretch}{2.0} \fi}
47 | % use a little more space for table rows in multiple choice questions
48 | \newcommand{\mcstretch}{\renewcommand{\arraystretch}{1.2}}
49 | % reset the table row settings
50 | \newcommand{\rowrelax}{\renewcommand{\arraystretch}{1.0}}
51 | % definitions for multiple choice questions
52 | \newcommand{\antwort}{\ifprintanswers \ensuremath{\blacksquare} \else \ensuremath{\Box} \fi}
53 | \newcommand{\wahr}{\antwort & \ensuremath{\Box} & }
54 | \newcommand{\falsch}{\ensuremath{\Box} & \antwort & }
55 | %------------------------------------- Tables (left column gray background) --------------------------------
56 |
57 | %------------------------------------- Answers --------------------------------
58 | \CorrectChoiceEmphasis{\color{red}\bfseries}
59 | \checkboxchar{\ensuremath{\Box}}
60 | \checkedchar{\ensuremath{\blacksquare}}
61 | \shadedsolutions
62 | \definecolor{SolutionColor}{rgb}{0.9,0.8,0.8}
63 | %------------------------------------- Answers --------------------------------
64 |
65 | %------------------------------------- Grading Table --------------------------------
66 | \hqword{\textbf{Aufgabe}}
67 | \hpword{\textbf{Punkte}}
68 | \hsword{\raisebox{-1mm}[6mm][4mm]{\textbf{Erreicht}}}
69 | \htword{\raisebox{-1mm}[6mm][4mm]{\textcolor{headcolor}{\LARGE\ensuremath{\;\;\;\pmb{\Sigma}\;\;\;}}}}
70 | %------------------------------------- Grading Table --------------------------------
71 |
72 | %------------------------------------- Custom Title Page ----------------
73 | \renewcommand{\maketitle}{} % we use "coverpage" from the exam package instead
74 | \renewcommand{\tableofcontents}{} % we have to use --toc to compile the exam twice, but we do not want really a toc
75 | %------------------------------------- Custom Title Page ----------------
76 |
77 | %------------------------------------- Custom Header ----------------
78 | \pagestyle{headandfoot} %% from exam.cls
79 | \headrule
80 | \ifprintanswers
81 | \header{}{\textcolor{dkred}{\textbf{\Huge MUSTER}}}{}
82 | \else
83 | \header{Name:}{Matrikelnummer:}{}
84 | \fi
85 | \footrule
86 | %% footer-definition for single-sided printing (empty backside)
87 | %\footer{$LVKURZ$}{Klausur $if(PART)$$PART$ \xspace$endif$ $NR$}{Seite \thepage\ von \numpages}
88 | %% footer-definition for double-sided printing
89 | \lfoot{\oddeven{Seite \thepage\ von \numpages}{$LVKURZ$}}
90 | \rfoot{\oddeven{$LVKURZ$}{Seite \thepage\ von \numpages}}
91 | \cfoot{Klausur $if(PART)$$PART$ \xspace$endif$ $NR$}
92 | %------------------------------------- Custom Header ---------------------
93 |
94 | %------------------------------------- Questions --------------------------------
95 | \providecommand{\theMyQuestionTitle}{}
96 | \providecommand{\myQuestion}[2][0]{\vskip11pt\renewcommand{\theMyQuestionTitle}{#2}\question[#1]{\ }\vskip5pt}
97 | \qformat{\textbf{\textcolor{headcolor}{\Large $if(PART)$$PART$.$endif$\thequestion: \theMyQuestionTitle\hfill \fbox{\thepoints}}}} % add only question points
98 | \boxedpoints % no effect w/ qformat
99 | \pointpoints{Punkt}{Punkte}
100 | %------------------------------------- Questions --------------------------------
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/resources/exam_begin.tex:
--------------------------------------------------------------------------------
1 |
2 | %------------------------------------- Custom Title Page ----------------
3 | \begin{coverpages}
4 | \begin{minipage}[c]{0.75\textwidth}
5 | \parindent0pt
6 | \textcolor{headcolor}{\large\scshape{$subtitle$}}\\[1ex]
7 | \textcolor{headcolor}{\Large\textbf{Klausur $if(PART)$$PART$ \xspace$endif$ $NR$}}\\[2ex]
8 | $if(TAG)$
9 | \textbf{$TAG$}\\[2ex]
10 | $endif$
11 | \parindent0pt
12 | $author$
13 | \end{minipage}
14 | \begin{minipage}[c]{0.25\textwidth}
15 | \ifprintanswers
16 | \hfill\textcolor{dkred}{\textbf{\Huge MUSTER}}\hfill\hfill
17 | \fi
18 | \end{minipage}
19 | \vspace{10mm}
20 | \par\hrulefill\par
21 | %
22 | \begin{minipage}[c]{0.5\textwidth}
23 | \begin{minipage}[c]{0.96\textwidth}
24 | \vspace{2mm}
25 | {\textbf{Bearbeitungszeit}: {\ }90 Minuten}\par
26 | \bigskip
27 | \begin{itemize}
28 | \item Bitte kontrollieren Sie die Vollständigkeit des an Sie
29 | ausgegebenen Klausurexemplars.
30 | \medskip
31 | \item Tragen Sie auf dem Deckblatt Ihren Namen und die
32 | Matrikelnummer ein und unterschreiben Sie die Klausur.
33 | \medskip
34 | \item Achten Sie auf Lesbarkeit und Nachvollziehbarkeit Ihrer
35 | Antworten und Lösungswege.
36 | \medskip
37 | \item \textbf{Erlaubte Hilfsmittel}: Ein handschriftlich
38 | angefertigter DIN-A4-Zettel mit Notizen.
39 |
40 | \smallskip
41 | Andere/Weitere Hilfsmittel sind \textbf{nicht} zugelassen. Die
42 | Nutzung nicht zugelassener Hilfsmittel führt zur Bewertung
43 | \enquote{nicht bestanden}.
44 | \end{itemize}
45 | \bigskip
46 | \medskip
47 | \textbf{Gutes Gelingen!}
48 | \smallskip
49 | \vspace{2mm}
50 | \end{minipage}
51 | \end{minipage}
52 | \vrule
53 | \begin{minipage}[c]{0.5\textwidth}
54 | \bigskip
55 | \begin{center}
56 | \textcolor{headcolor}
57 | {\textbf{--- vom Studierenden auszufüllen ---}} \\[6mm]
58 | \end{center}
59 | \begin{center}
60 | \renewcommand{\arraystretch}{1.5}
61 | \begin{tabular}{@{\bfseries}lp{5cm}}
62 | Name: & \dotfill \\[1mm]
63 | Vorname: & \dotfill \\[1mm]
64 | Matr.-Nr.:& \dotfill \\[6mm]
65 |
66 | \multicolumn{2}{l}{\begin{minipage}[c]{76mm}
67 | Ich erkläre, daß ich mich zur Prüfung ordnungsgemäß angemeldet habe,
68 | zur Prüfung zugelassen bin und mich prüfungsfähig fühle.
69 | Ich werde die Klausur eigenständig bearbeiten und aus\-schließlich die
70 | zugelassenen Hilfsmittel nutzen.
71 | \end{minipage}
72 | }\\[22mm]
73 |
74 | Unterschrift:& \dotfill
75 | \end{tabular}
76 | \end{center}
77 | \smallskip
78 | \end{minipage}
79 | \par\hrulefill\par
80 | \vspace{10mm}
81 |
82 | \begin{center}
83 | \textcolor{headcolor}
84 | {\textbf{--- vom Prüfer auszufüllen ---}}
85 | \end{center}
86 | \begin{center}
87 | \begin{small}
88 | \gradetable[h][questions]
89 | \end{small}
90 | \end{center}
91 | \vspace{12mm}
92 | \begin{center}
93 | \ifprintanswers
94 | \textcolor{dkred}{\textbf{\Huge MUSTER}}
95 | \else
96 | \begin{tabular}{lp{1cm}lp{3cm}lp{3cm}}
97 | Note: & \dotfill & Minden, den & \dotfill & Unterschrift Erstprüfer: &
98 | \dotfill
99 | \end{tabular}
100 | \fi
101 | \end{center}
102 | \vfill
103 | \clearpage
104 | \pagebreak
105 | \end{coverpages}
106 | %------------------------------------- Custom Title Page ----------------
107 |
108 | %------------------------------------- Blank page after title page -----------------------------
109 | \Leerseite
110 | %------------------------------------- Blank page after title page -----------------------------
111 |
112 | %------------------------------------- Begin of Questions --------------------------------------
113 | \begin{questions}
114 | %------------------------------------- Begin of Questions --------------------------------------
115 |
116 |
117 |
--------------------------------------------------------------------------------
/resources/exam_end.tex:
--------------------------------------------------------------------------------
1 |
2 | %------------------------------------- End of Questions --------------------------------------
3 | \end{questions}
4 | %------------------------------------- End of Questions --------------------------------------
5 |
6 | %------------------------------------- Blank page at the end of the exam sheet ----------
7 | %% if the last page is a front side, lets use the back side as "Leerseite"
8 | \checkoddpage
9 | \ifoddpage
10 | \Leerseite
11 | \else
12 | %
13 | \fi
14 | %------------------------------------- Two blank pages at the end of the exam sheet ----------
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/resources/homework.tex:
--------------------------------------------------------------------------------
1 |
2 | %------------------------------------- Packages ----------------
3 | \usepackage{fancyhdr}
4 | %------------------------------------- Packages ----------------
5 |
6 | %------------------------------------- CMDs ---------------------
7 | \newcommand{\alert}[1]{\textcolor{dkred}{#1}} % `[...]{.alert}` in document will be converted by `tex.lua` filter to `\alert{...}`
8 |
9 | \newcommand{\xmas}{\vfill\begin{center}\LARGE\textcolor{dkred}{Frohe Weihnachten und einen guten Start ins nächste Jahr!}\end{center}}
10 | %------------------------------------- CMDs ---------------------
11 |
12 | %------------------------------------- Use color in headers ---------------------
13 | \addtokomafont{disposition}{\color{headcolor}} % works only for KOMA script
14 | %------------------------------------- Use color in headers ---------------------
15 |
16 | %------------------------------------- Custom Header ----------------
17 | \pagestyle{fancy}
18 | \fancyhead{} % clear all header fields
19 | \fancyhead[RO,RE]{$subtitle$ $title$ \quad \thepage} % more general than rhead
20 | %\rhead{$subtitle$ $title$ \quad \thepage} % in case there are any problems with fancyhead
21 | \fancyfoot{}
22 | \renewcommand{\headrulewidth}{0pt} % no separating line
23 | \renewcommand{\footrulewidth}{0pt} % no separating line
24 | %------------------------------------- Custom Header ---------------------
25 |
26 | %------------------------------------- Custom Title Page ----------------
27 | \renewcommand{\maketitle}{
28 | \thispagestyle{empty}
29 |
30 | \parindent=0pt
31 | \begin{minipage}[c]{0.72\textwidth}
32 | \parindent=0pt
33 | \textcolor{headcolor}{\large\scshape{$subtitle$}}\\[1ex]
34 | \textcolor{headcolor}{\Large\textbf{$title$ $if(points)$ ($points$ Punkte)$endif$}}\\[1ex]
35 | $author$
36 | \end{minipage}
37 | \hfill
38 | \begin{minipage}[c]{0.24\textwidth}
39 | \parindent=0pt
40 | $if(date)$
41 | \textbf{Praktikum: $date$}\\[1ex]
42 | $endif$
43 | $if(ilias)$
44 | \textbf{ILIAS: $ilias$}
45 | $endif$
46 | \end{minipage}
47 |
48 | \parindent=0pt
49 | \par\hrulefill\par
50 | \vspace{2ex}
51 | }
52 | %------------------------------------- Custom Title Page ----------------
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/resources/mathjaxurl.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/resources/nojswarning.html:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/templates/bib.md:
--------------------------------------------------------------------------------
1 | $-- h4 intentionally used wrongly: yields nice formatting in HTML compared to using pure bold
2 | $-- formatted text; also it won't show up in TOC
3 | $--
4 | $-- if meta variable "bib" is set, use it as extra content (this would be the standard case)
5 | $-- otherwise if meta variable "references" is set, just emit H1 to get a TOC entry and formatted
6 | $-- text block (this would be the case for syllabus / orga material)
7 | $-- in both cases emit a references div as target for pandoc to generate a list of references
8 |
9 |
10 |
11 | $if(bib)$
12 |
13 |
14 | # Literatur {.bib}
15 | $bib$
16 |
17 | #### Bibliographie
18 | ${ references.md() }
19 |
20 |
21 | $elseif(references)$
22 |
23 |
24 | # Literatur {.bib}
25 | ${ references.md() }
26 |
27 |
28 | $else$
29 |
30 | $-- nothing, just to complete pandoc's template syntax
31 |
32 | $endif$
33 |
--------------------------------------------------------------------------------
/templates/challenges.md:
--------------------------------------------------------------------------------
1 | $if(challenges)$
2 |
3 | # Challenges ... {.challenges}
4 | $challenges$
5 |
6 | $endif$
7 |
--------------------------------------------------------------------------------
/templates/htmltemplate.md:
--------------------------------------------------------------------------------
1 | $-- custom template to structure the HTML handouts
2 |
3 |
4 |
5 | $if(titleblock)$
6 | $titleblock$
7 | $endif$
8 |
9 |
10 | ${ tldr.md() }
11 | ${ outcomes.md() }
12 |
13 |
14 | $body$
15 |
16 |
17 | ${ quizzes.md() }
18 | ${ challenges.md() }
19 | ${ bib.md() }
20 |
--------------------------------------------------------------------------------
/templates/outcomes.md:
--------------------------------------------------------------------------------
1 | $-- h4 intentionally used wrongly: yields nice formatting in HTML compared
2 | $-- to using pure bold formatted text; also it won't show up in TOC
3 |
4 |
5 |
6 | $if(outcomes)$
7 |
8 |
9 | # Lernziele {.outcomes}
10 |
11 | $if(outcomes.k1)$
12 | #### Kennen (K1)
13 | $outcomes.k1$
14 | $endif$
15 |
16 | $if(outcomes.k2)$
17 | #### Verstehen (K2)
18 | $outcomes.k2$
19 | $endif$
20 |
21 | $if(outcomes.k3)$
22 | #### Anwenden (K3)
23 | $outcomes.k3$
24 | $endif$
25 |
26 |
27 | $endif$
28 |
--------------------------------------------------------------------------------
/templates/quizzes.md:
--------------------------------------------------------------------------------
1 | $if(quizzes)$
2 |
3 | # Quizzes ... {.quizzes}
4 | $quizzes$
5 |
6 | $endif$
7 |
--------------------------------------------------------------------------------
/templates/references.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/templates/screencast.md:
--------------------------------------------------------------------------------
1 | $if(screencast-iframe-url)$
2 |
3 |
4 |
5 |
6 | $if(screencast-direct-link)$
7 | [Direkt-Link HSBI-Medienportal]($screencast-direct-link$)
8 | $endif$
9 |
10 |
11 |
12 | $endif$
13 |
--------------------------------------------------------------------------------
/templates/tldr.md:
--------------------------------------------------------------------------------
1 | $-- if meta variable "tldr" is set, use it as extra content (this would be the standard case)
2 | $-- otherwise if meta variable "screencast-iframe-url" is set, just emit H1 to get a TOC entry
3 | $-- and formatted text block (this would be the case for syllabus / orga material)
4 |
5 |
6 |
7 | $if(tldr)$
8 |
9 |
10 | # TL;DR {.tldr}
11 | $tldr$
12 |
13 | ${ screencast.md() }
14 |
15 |
16 | $elseif(screencast-iframe-url)$
17 |
18 |
19 | # TL;DR {.tldr}
20 | ${ screencast.md() }
21 |
22 |
23 | $else$
24 |
25 | $-- nothing, just to complete pandoc's template syntax
26 |
27 | $endif$
28 |
--------------------------------------------------------------------------------