aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-08-29 12:38:36 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-08-29 12:38:36 +0200
commite478854027a22096ef4d3aed422b8b47a1b3aa59 (patch)
tree8af48829ca7aef15bf6ba096cf1e8ae4af6b1602
parent21fa7ee63a23c27bc234eebe4a1f77ea88793887 (diff)
downloadunterricht-e478854027a22096ef4d3aed422b8b47a1b3aa59.tar.gz
unterricht-e478854027a22096ef4d3aed422b8b47a1b3aa59.zip
use latex instead of markdown for planning documents
The used markdown was mostly latex anyway. This allows to reuse a lot of code and reduce the boilerplate.
-rw-r--r--latex/common_planning.tex32
-rw-r--r--latex/map.cls24
-rw-r--r--latex/sequence.cls25
-rw-r--r--templates/map.tex17
-rw-r--r--templates/map_old.md (renamed from templates/map.md)0
-rw-r--r--templates/sequence.tex18
-rw-r--r--templates/sequence_old.md (renamed from templates/sequence.md)0
7 files changed, 116 insertions, 0 deletions
diff --git a/latex/common_planning.tex b/latex/common_planning.tex
new file mode 100644
index 00000000..3f607a40
--- /dev/null
+++ b/latex/common_planning.tex
@@ -0,0 +1,32 @@
+\geometry{a4paper, margin=2cm}
+\pagestyle{empty}
+
+\rowcolors{2}{gray!10}{gray!25}
+
+\newcommand{\SectionColor}{green!30}
+\newcommand{\HolidayColor}{blue!30}
+\newcommand{\CancellationColor}{red!30}
+
+\newcommand{\SectionRowColor}{\rowcolor{\SectionColor}}
+\newcommand{\HolidayRowColor}{\rowcolor{\HolidayColor}}
+\newcommand{\CancellationRowColor}{\rowcolor{\CancellationColor}}
+
+\newcommand{\PlanningKlasse}{X}
+\newcommand{\PlanningLehrbuch}{?}
+\newcommand{\PlanningStart}{?}
+\newcommand{\PlanningEnd}{?}
+
+\newcommand{\Klasse}[1]{\renewcommand{\PlanningKlasse}{#1}}
+\newcommand{\Lehrbuch}[1]{\renewcommand{\PlanningLehrbuch}{#1}}
+\newcommand{\Start}[1]{\renewcommand{\PlanningStart}{#1}}
+\newcommand{\End}[1]{\renewcommand{\PlanningEnd}{#1}}
+
+\newcommand{\PlanningIntro}[1]{%
+\section*{#1 der Klasse \PlanningKlasse{}}
+\begin{itemize}
+ \item \textbf{Lehrbuch}: \PlanningLehrbuch
+ \item \textbf{Start}: \PlanningStart
+ \item \textbf{End}: \PlanningEnd
+\end{itemize}
+}
+
diff --git a/latex/map.cls b/latex/map.cls
new file mode 100644
index 00000000..410b3610
--- /dev/null
+++ b/latex/map.cls
@@ -0,0 +1,24 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{map}[muhq's simple map class]
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass{scrartcl}
+
+\input{common_packages.tex}
+\input{common_planning.tex}
+
+\newenvironment{map}{
+\PlanningIntro{Grober Verlaufsplan}
+
+\begin{center}
+\begin{tabular}{c c c}
+Woche & LP-Abschnitt & Thema \\
+\hline
+}{
+\end{tabular}
+\end{center}
+}
+
+\newcommand{\Holiday}[2]{\HolidayRowColor #1 & \multicolumn{2}{c}{#2} \\}
+\newcommand{\Cancellation}[1]{\CancellationRowColor #1 & \multicolumn{2}{c}{Ausfall} \\}
diff --git a/latex/sequence.cls b/latex/sequence.cls
new file mode 100644
index 00000000..defd043d
--- /dev/null
+++ b/latex/sequence.cls
@@ -0,0 +1,25 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{sequence}[muhq's simple sequence class]
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions\relax
+\LoadClass{scrartcl}
+
+\input{common_packages.tex}
+\input{common_planning.tex}
+
+\newenvironment{sequence}{
+\PlanningIntro{Sequenzplan}
+
+\begin{center}
+\begin{tabular}{c c c c c}
+Woche & Datum & LP-Abschnitt & Std. LP-A. & Unterrichtseinheit \\
+\hline
+}{
+\end{tabular}
+\end{center}
+}
+
+\newcommand{\Holiday}[3]{\HolidayRowColor #1 & #2 & \multicolumn{3}{c}{#3} \\}
+\newcommand{\Section}[1]{\SectionRowColor\multicolumn{5}{c}{#1} \\}
+\newcommand{\Cancellation}[2]{\CancellationRowColor #1 & #2 & \multicolumn{3}{c}{Ausfall} \\}
diff --git a/templates/map.tex b/templates/map.tex
new file mode 100644
index 00000000..b1f06a37
--- /dev/null
+++ b/templates/map.tex
@@ -0,0 +1,17 @@
+\documentclass{map}
+
+\Klasse{X}
+\Lehrbuch{?}
+\Start{?}
+\End{?}
+
+\begin{document}
+\begin{map}
+% Woche & LP-Abschnitt & Thema \\
+16 & 1 & Arrays \\
+16 & 1 & Listen \\
+\Holiday{17}{19.04}{Ferien!!}
+\Cancellation{17}{03.05}
+... & & \\
+\end{sequence}
+\end{document}
diff --git a/templates/map.md b/templates/map_old.md
index 9d60e6fa..9d60e6fa 100644
--- a/templates/map.md
+++ b/templates/map_old.md
diff --git a/templates/sequence.tex b/templates/sequence.tex
new file mode 100644
index 00000000..bee29df8
--- /dev/null
+++ b/templates/sequence.tex
@@ -0,0 +1,18 @@
+\documentclass{sequence}
+
+\Klasse{X}
+\Lehrbuch{?}
+\Start{?}
+\End{?}
+
+\begin{document}
+\begin{sequence}
+\Section{Tolle Lerninhalte}
+% Woche & Datum & LP-Abschnitt & Std. LP-A. & Unterrichtseinheit \\
+16 & 19.04 & foo & 1 & Arrays \\
+16 & 19.04 & foo & 2 & Arrays \\
+\Holiday{17}{19.04}{Ferien!!}
+\Cancellation{17}{03.05}
+... & & & & \\
+\end{sequence}
+\end{document}
diff --git a/templates/sequence.md b/templates/sequence_old.md
index 1acd1cdf..1acd1cdf 100644
--- a/templates/sequence.md
+++ b/templates/sequence_old.md