From e478854027a22096ef4d3aed422b8b47a1b3aa59 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 29 Aug 2023 12:38:36 +0200 Subject: 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. --- latex/common_planning.tex | 32 ++++++++++++++++++++++++++++++++ latex/map.cls | 24 ++++++++++++++++++++++++ latex/sequence.cls | 25 +++++++++++++++++++++++++ templates/map.md | 25 ------------------------- templates/map.tex | 17 +++++++++++++++++ templates/map_old.md | 25 +++++++++++++++++++++++++ templates/sequence.md | 24 ------------------------ templates/sequence.tex | 18 ++++++++++++++++++ templates/sequence_old.md | 24 ++++++++++++++++++++++++ 9 files changed, 165 insertions(+), 49 deletions(-) create mode 100644 latex/common_planning.tex create mode 100644 latex/map.cls create mode 100644 latex/sequence.cls delete mode 100644 templates/map.md create mode 100644 templates/map.tex create mode 100644 templates/map_old.md delete mode 100644 templates/sequence.md create mode 100644 templates/sequence.tex create mode 100644 templates/sequence_old.md 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.md b/templates/map.md deleted file mode 100644 index 9d60e6fa..00000000 --- a/templates/map.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -lang: de -papersize: a4 -pagestyle: empty -geometry: margin=2cm -classoption: table -header-includes: - - \rowcolors{2}{gray!10}{gray!25} ---- -# Grober Verlaufsplan der Klasse X - -* **Start**: -* **End**: -* **Lehrbuch**: - -\begin{center} -\begin{tabular}{c c c} -Woche & LP-Abschnitt & Thema \\ -\hline -16 & 1 & Arrays \\ -16 & 2 & Arrays \\ -\rowcolor{red!30} 17 & & Ausfall \\ -... & & \\ -\end{tabular} -\end{center} 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_old.md b/templates/map_old.md new file mode 100644 index 00000000..9d60e6fa --- /dev/null +++ b/templates/map_old.md @@ -0,0 +1,25 @@ +--- +lang: de +papersize: a4 +pagestyle: empty +geometry: margin=2cm +classoption: table +header-includes: + - \rowcolors{2}{gray!10}{gray!25} +--- +# Grober Verlaufsplan der Klasse X + +* **Start**: +* **End**: +* **Lehrbuch**: + +\begin{center} +\begin{tabular}{c c c} +Woche & LP-Abschnitt & Thema \\ +\hline +16 & 1 & Arrays \\ +16 & 2 & Arrays \\ +\rowcolor{red!30} 17 & & Ausfall \\ +... & & \\ +\end{tabular} +\end{center} diff --git a/templates/sequence.md b/templates/sequence.md deleted file mode 100644 index 1acd1cdf..00000000 --- a/templates/sequence.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -lang: de -papersize: a4 -geometry: margin=2cm -classoption: table -header-includes: - - \rowcolors{2}{gray!10}{gray!25} ---- -# Sequenzplan der Klasse X - -* **Lehrbuch**: -* **Start**: -* **End**: - -\begin{center} -\begin{tabular}{c c c c c} -Woche & Datum & LP-Abschnitt & Std. LP-A. & Unterrichtseinheit \\ -\hline -16 & 19.04 & foo & 1 & Arrays \\ -16 & 19.04 & foo & 2 & Arrays \\ -\rowcolor{red!30} 17 & 26.04 & & & Ausfall \\ -... & & & & \\ -\end{tabular} -\end{center} 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_old.md b/templates/sequence_old.md new file mode 100644 index 00000000..1acd1cdf --- /dev/null +++ b/templates/sequence_old.md @@ -0,0 +1,24 @@ +--- +lang: de +papersize: a4 +geometry: margin=2cm +classoption: table +header-includes: + - \rowcolors{2}{gray!10}{gray!25} +--- +# Sequenzplan der Klasse X + +* **Lehrbuch**: +* **Start**: +* **End**: + +\begin{center} +\begin{tabular}{c c c c c} +Woche & Datum & LP-Abschnitt & Std. LP-A. & Unterrichtseinheit \\ +\hline +16 & 19.04 & foo & 1 & Arrays \\ +16 & 19.04 & foo & 2 & Arrays \\ +\rowcolor{red!30} 17 & 26.04 & & & Ausfall \\ +... & & & & \\ +\end{tabular} +\end{center} -- cgit v1.2.3