diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-11-23 16:33:26 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-11-23 16:38:05 +0100 |
| commit | 444b6e80283d9fa72496bc2dbac1f1d48a9ff4d8 (patch) | |
| tree | d0a62dd3d4c68750921785d789ecbafdf1ccda0f | |
| parent | 3f00251277fc4f4aded5f8df0a37b5e6f5fccedc (diff) | |
| download | unterricht-444b6e80283d9fa72496bc2dbac1f1d48a9ff4d8.tar.gz unterricht-444b6e80283d9fa72496bc2dbac1f1d48a9ff4d8.zip | |
improve test attribute commands
Now most commands that specify a test's attribute work like
their normal TeX equivalents, like \title or \author.
They no longer need to be renewed in the document.
| -rw-r--r-- | Info/22_23/10D/2_Kurzarbeit/_test.tex | 10 | ||||
| -rw-r--r-- | Info/23_24/11/08/9AC/_test.tex | 9 | ||||
| -rw-r--r-- | Info/23_24/11/14/9B/_test.tex | 8 | ||||
| -rw-r--r-- | Info/23_24/11/20/10B/_test.tex | 8 | ||||
| -rw-r--r-- | Mathe/22_23/10D/3_Schulaufgabe/_test.tex | 10 | ||||
| -rw-r--r-- | Mathe/22_23/10D/KAL_300623/_test.tex | 8 | ||||
| -rw-r--r-- | Mathe/22_23/10D/KAL_300623_Nachschrift/_test.tex | 8 | ||||
| -rw-r--r-- | Mathe/23_24/10/11/7A/_test.tex | 6 | ||||
| -rw-r--r-- | Mathe/23_24/10/23/9A/_test.tex | 6 | ||||
| -rw-r--r-- | Mathe/23_24/11/16/9A/_test.tex | 4 | ||||
| -rw-r--r-- | Mathe/23_24/11/28/7A/_test.tex | 4 | ||||
| -rw-r--r-- | Mathe/9/Leistungsnachweise/1_SA_NS_20231121/_test.tex | 5 | ||||
| -rw-r--r-- | latex/test.cls | 64 | ||||
| -rw-r--r-- | templates/test/_test.tex | 16 | ||||
| -rw-r--r-- | templates/test/test_loesung.tex | 1 |
15 files changed, 94 insertions, 73 deletions
diff --git a/Info/22_23/10D/2_Kurzarbeit/_test.tex b/Info/22_23/10D/2_Kurzarbeit/_test.tex index bb5e6525..8d5cd5a4 100644 --- a/Info/22_23/10D/2_Kurzarbeit/_test.tex +++ b/Info/22_23/10D/2_Kurzarbeit/_test.tex @@ -1,8 +1,8 @@ -\renewcommand{\TestArt}{Kurzarbeit} -\renewcommand{\Fach}{Informatik} -\renewcommand{\TestNummer}{2} -\renewcommand{\Klasse}{10D} -\renewcommand{\Datum}{3. Mai 2023} +\TestArt{Kurzarbeit} +\Fach{Informatik} +\TestNummer{2} +\Klasse{10D} +\Datum{3. Mai 2023} \renewcommand{\baselinestretch}{1.2} diff --git a/Info/23_24/11/08/9AC/_test.tex b/Info/23_24/11/08/9AC/_test.tex index 5378f798..336b315a 100644 --- a/Info/23_24/11/08/9AC/_test.tex +++ b/Info/23_24/11/08/9AC/_test.tex @@ -1,8 +1,7 @@ -\renewcommand{\Klasse}{9AC} -\renewcommand{\Datum}{08.11.2023} -\renewcommand{\TestArt}{Kurzarbeit} -\renewcommand{\Fach}{Informatik} - +\Klasse{9AC} +\Datum{08.11.2023} +\TestArt{Kurzarbeit} +\Fach{Informatik} \usepackage[shortlabels]{enumitem} \begin{document} diff --git a/Info/23_24/11/14/9B/_test.tex b/Info/23_24/11/14/9B/_test.tex index 83e95967..131b2229 100644 --- a/Info/23_24/11/14/9B/_test.tex +++ b/Info/23_24/11/14/9B/_test.tex @@ -1,7 +1,7 @@ -\renewcommand{\TestArt}{Stegreifaufgabe} -\renewcommand{\Klasse}{9B} -\renewcommand{\Datum}{14.11.2023} -\renewcommand{\Fach}{Informatik} +\TestArt{Stegreifaufgabe} +\Klasse{9B} +\Datum{14.11.2023} +\Fach{Informatik} \begin{document} \Intro \input{Aufgaben/finden_funktion.tex} diff --git a/Info/23_24/11/20/10B/_test.tex b/Info/23_24/11/20/10B/_test.tex index 65961458..dc7a02e4 100644 --- a/Info/23_24/11/20/10B/_test.tex +++ b/Info/23_24/11/20/10B/_test.tex @@ -1,10 +1,10 @@ % \newcommand{\dashnode}[1]{\node[inner sep=1pt,outer sep=0pt] (todotted) {#1}; \draw[dashed] ([yshift=-2pt]todotted.south west) -- ([yshift=-2pt]todotted.south east); } % \newcommand{\mydash}[1]{\tikz[baseline=(todotted.base)]{ \dashnode{#1} }} \newcommand{\mydash}[1]{\dashuline{#1}} -\renewcommand{\Datum}{20.11.2023} -\renewcommand{\Klasse}{10B} -\renewcommand{\Fach}{Informatik} -\renewcommand{\TestArt}{Kurzarbeit} +\Datum{20.11.2023} +\Klasse{10B} +\Fach{Informatik} +\TestArt{Kurzarbeit} \begin{document} \Intro diff --git a/Mathe/22_23/10D/3_Schulaufgabe/_test.tex b/Mathe/22_23/10D/3_Schulaufgabe/_test.tex index 89ecde40..db245a06 100644 --- a/Mathe/22_23/10D/3_Schulaufgabe/_test.tex +++ b/Mathe/22_23/10D/3_Schulaufgabe/_test.tex @@ -1,6 +1,5 @@ \usepackage{pgfplots} \usepgfplotslibrary{groupplots} -\usetikzlibrary{calc} \geometry{top=20mm, bottom=20mm, headsep=5mm, footskip=10mm} @@ -11,10 +10,9 @@ \fancyhead[R]{Name: \hspace{6cm}} } -\renewcommand{\Datum}{11. Mai 2023} -\renewcommand{\Klasse}{10D} -\renewcommand{\TestNummer}{3} - +\Datum{11. Mai 2023} +\Klasse{10D} +\TestNummer{3} \begin{document} \thispagestyle{ErsteSeite} @@ -34,7 +32,7 @@ %%%Hier die Darstellung am Ende %%Falls es das ganze auf eine andere Seite Schiebt und man alles komprimieren will -\newcommand{\PlatzKnapp}{} +\PlatzKnapp %%Bindet Kleeblatt mit Viel Erfolg ein und erstellt Platz darunter \Ende diff --git a/Mathe/22_23/10D/KAL_300623/_test.tex b/Mathe/22_23/10D/KAL_300623/_test.tex index 1755c20a..6b0580ed 100644 --- a/Mathe/22_23/10D/KAL_300623/_test.tex +++ b/Mathe/22_23/10D/KAL_300623/_test.tex @@ -7,10 +7,10 @@ \fancyhead[R]{Name: \hspace{6cm}} } -\renewcommand{\TestArt}{{\normalsize kleiner Leistungsnachweis}} -\renewcommand{\TestNummer}{3} -\renewcommand{\Datum}{30. Juni 2023} -\renewcommand{\Klasse}{10D} +\TestArt{{\normalsize kleiner Leistungsnachweis}} +\TestNummer{3} +\Datum{30. Juni 2023} +\Klasse{10D} \begin{document} diff --git a/Mathe/22_23/10D/KAL_300623_Nachschrift/_test.tex b/Mathe/22_23/10D/KAL_300623_Nachschrift/_test.tex index 7f97c4c9..632c0b53 100644 --- a/Mathe/22_23/10D/KAL_300623_Nachschrift/_test.tex +++ b/Mathe/22_23/10D/KAL_300623_Nachschrift/_test.tex @@ -7,10 +7,10 @@ \fancyhead[R]{Name: \hspace{6cm}} } -\renewcommand{\TestArt}{{\normalsize kleiner Leistungsnachweis}} -\renewcommand{\TestNummer}{NS 3} -\renewcommand{\Datum}{10. Juli 2023} -\renewcommand{\Klasse}{10D} +\TestArt{{\normalsize kleiner Leistungsnachweis}} +\TestNummer{NS 3} +\Datum{10. Juli 2023} +\Klasse{10D} \begin{document} diff --git a/Mathe/23_24/10/11/7A/_test.tex b/Mathe/23_24/10/11/7A/_test.tex index 6dca3c56..85e1db41 100644 --- a/Mathe/23_24/10/11/7A/_test.tex +++ b/Mathe/23_24/10/11/7A/_test.tex @@ -1,6 +1,6 @@ -\renewcommand{\Datum}{11. Oktober 2023} -\renewcommand{\TestArt}{Stegreifaufgabe} -\renewcommand{\Klasse}{7A} +\Datum{11. Oktober 2023} +\TestArt{Stegreifaufgabe} +\Klasse{7A} \begin{document} \thispagestyle{ErsteSeite} diff --git a/Mathe/23_24/10/23/9A/_test.tex b/Mathe/23_24/10/23/9A/_test.tex index 9db8cff2..f18f50b5 100644 --- a/Mathe/23_24/10/23/9A/_test.tex +++ b/Mathe/23_24/10/23/9A/_test.tex @@ -1,8 +1,8 @@ \begin{document} -\renewcommand{\Datum}{23.10.23} -\renewcommand{\TestArt}{Stegreifaufgabe} -\renewcommand{\Klasse}{9A} +\Datum{23.10.23} +\TestArt{Stegreifaufgabe} +\Klasse{9A} \thispagestyle{ErsteSeite} \Intro \input{Aufgaben/quadratwurzel_terme_vereinfachen} diff --git a/Mathe/23_24/11/16/9A/_test.tex b/Mathe/23_24/11/16/9A/_test.tex index dff859c3..bdcbb3cc 100644 --- a/Mathe/23_24/11/16/9A/_test.tex +++ b/Mathe/23_24/11/16/9A/_test.tex @@ -1,7 +1,7 @@ +\Datum{16.11.2023} +\Klasse{9A} \begin{document} -\renewcommand{\Datum}{16.11.2023} -\renewcommand{\Klasse}{9A} \Intro \input{Aufgaben/heron_verfahren.tex} diff --git a/Mathe/23_24/11/28/7A/_test.tex b/Mathe/23_24/11/28/7A/_test.tex index 45a9536b..abaf5238 100644 --- a/Mathe/23_24/11/28/7A/_test.tex +++ b/Mathe/23_24/11/28/7A/_test.tex @@ -1,5 +1,5 @@ -\renewcommand{\Klasse}{7A} -\renewcommand{\Datum}{28.11.2023} +\Klasse{7A} +\Datum{28.11.2023} \begin{document} \Intro diff --git a/Mathe/9/Leistungsnachweise/1_SA_NS_20231121/_test.tex b/Mathe/9/Leistungsnachweise/1_SA_NS_20231121/_test.tex index 0d1f532e..d4baddf1 100644 --- a/Mathe/9/Leistungsnachweise/1_SA_NS_20231121/_test.tex +++ b/Mathe/9/Leistungsnachweise/1_SA_NS_20231121/_test.tex @@ -1,7 +1,6 @@ +\Datum{21.11.2023} +\Klasse{9A} \begin{document} - -\renewcommand{\Datum}{21.11.2023} -\renewcommand{\Klasse}{9A} \Intro \input{Aufgaben/heron_verfahren.tex} diff --git a/latex/test.cls b/latex/test.cls index a17621ef..a8e7f927 100644 --- a/latex/test.cls +++ b/latex/test.cls @@ -2,8 +2,11 @@ \ProvidesClass{test}[muhq's test class] % etoolbox is needed for our common options +\RequirePackage{kvoptions} \RequirePackage{etoolbox} +\DeclareStringOption{nachschrift} + \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} \newtoggle{drawborder} @@ -12,12 +15,17 @@ \newtoggle{sigfooter} \DeclareOption{sigfooter}{\toggletrue{sigfooter}} +\newtoggle{keinlogo} +\DeclareOption{keinlogo}{\toggletrue{keinlogo}} +\newcommand{\KeinLogo}{\toggletrue{keinlogo}} + \newtoggle{erwartungshorizont} \newcommand{\ifeh}[1]{\iftoggle{erwartungshorizont}{#1}{}} \DeclareOption{erwartungshorizont}{\toggletrue{erwartungshorizont}} \DeclareOption{eh}{\toggletrue{erwartungshorizont}} \input{common_options.tex} +\ProcessKeyvalOptions{} \LoadClass[a4paper,12pt]{scrartcl} @@ -57,14 +65,27 @@ \renewcommand{\baselinestretch}{1,5} -\newcommand{\Datum}{\today} -\newcommand{\Klasse}{TODO} -\newcommand{\TestNummer}{1} -\newcommand{\TestArt}{Schulaufgabe} -\newcommand{\Fach}{Mathemathik} -\newcommand{\HeaderText}{\TestArt{} im Fach \Fach} -%\newcommand{\KeinLogo}{} %%FALLS Kein Logo erwünscht -\newcommand{\EinleitungsSatz}{\textit{Achte auf eine korrekte Schreibweise und eine ordentliche äußere Form!}} +\newcommand{\dasDatum}{\today} +\newcommand{\Datum}[1]{\renewcommand{\dasDatum}{#1}} + +\newcommand{\dieKlasse}{TODO} +\newcommand{\Klasse}[1]{\renewcommand{\dieKlasse}{#1}} + +\newcommand{\dieTestNummer}{1} +\newcommand{\TestNummer}[1]{\renewcommand{\dieTestNummer}{#1}} + +\newcommand{\dieTestArt}{Schulaufgabe} +\newcommand{\TestArt}[1]{\renewcommand{\dieTestArt}{#1}} + +\newcommand{\dasFach}{Mathematik} +\newcommand{\Fach}[1]{\renewcommand{\dasFach}{#1}} + +\newcommand{\derHeaderText}{\dieTestArt{} im Fach \dasFach} +\newcommand{\HeaderText}[1]{\renewcommand{\derHeaderText}{#1}} + + +\newcommand{\derEinleitungsSatz}{\textit{Achte auf eine korrekte Schreibweise und eine ordentliche äußere Form!}} +\newcommand{\EinleitungsSatz}[1]{\renewcommand{\derEinleitungsSatz}{#1}} \definecolor{testgrauRGB}{rgb}{0.9,0.9,0.9} \definecolor{testgrauCMYK}{cmyk}{0.0,0.0,0.0,0.30} @@ -72,37 +93,40 @@ \newcommand{\Intro}{ \fcolorbox{black}{testgrauRGB}{% \parbox{14.3cm}{ - \centerline{\Large \bfseries \TestNummer{}. \HeaderText{}} + \centerline{\Large \bfseries \dieTestNummer{}. \derHeaderText{}} \medskip - \centerline{\bfseries Klasse \Klasse} - \centerline{\bfseries -- am \Datum \ --} + \centerline{\bfseries Klasse \dieKlasse} + \centerline{\bfseries -- am \dasDatum \ --} } } \medskip \newline - \centerline{\EinleitungsSatz} + \centerline{\derEinleitungsSatz} \newline } +\newcommand{\PlatzKnapp}{\newcommand{\platzknapp}} +\newcommand{\KeinKleeblatt}{\newcommand{\keinkleeblatt}} + \newcommand{\centeredgraphics}[2][]{\[\includegraphics[#1]{images/#2}\]} \newcommand{\Ende}{ - \ifdefined\PlatzKnapp \makebox(100,25)[c]{} + \ifdefined\platzknapp \makebox(100,25)[c]{} \else \vspace*{\fill} \fi - \ifdefined\KeinKleeblatt + \ifdefined\keinkleeblatt \else - \ifdefined\PlatzKnapp \centeredgraphics[height=1.5cm]{Kleeblatt.jpg} + \ifdefined\platzknapp \centeredgraphics[height=1.5cm]{Kleeblatt.jpg} \else \centeredgraphics[height=2.5cm]{Kleeblatt.jpg} \fi \centerline{\textbf{Viel Erfolg! \Signatur}} - \ifdefined\PlatzKnapp \makebox(1,10)[c]{} + \ifdefined\platzknapp \makebox(1,10)[c]{} \else \makebox(1,50)[c]{} \fi %%Erstellt Summenzeichen und Erreichte Punktzahl \centerline{\Large \bfseries $\sum$ \ \ \ \ \ \ \ \ \ \ {/}\AnzahlInsgesamtPunkte \ BE} - \ifdefined\PlatzKnapp \makebox(1,10)[c]{} + \ifdefined\platzknapp \makebox(1,10)[c]{} \else \makebox(100,100)[c]{} \fi } @@ -114,12 +138,12 @@ \pagestyle{fancy} \setlength{\headheight}{25 pt} \fancyhf{} -\fancyhead[L]{\ifnumcomp{\value{page}}{=}{1}{\ifdefined\KeinLogo \else \includegraphics[width=0.3\textwidth,height=1.5cm]{\LogoSchule} \newline \fi}{}\Schule} -\fancyhead[R]{\ifnumcomp{\value{page}}{=}{1}{\Large Name: \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }{\HeaderText}} +\fancyhead[L]{\ifnumcomp{\value{page}}{=}{1}{\iftoggle{keinlogo}{}{\includegraphics[width=0.3\textwidth,height=1.5cm]{\LogoSchule} \newline}}{}\Schule} +\fancyhead[R]{\ifnumcomp{\value{page}}{=}{1}{\Large Name: \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }{\derHeaderText}} \fancypagestyle{ErsteSeite}{% \fancyhf{}% - \fancyhead[L]{\ifdefined\KeinLogo \else \includegraphics[width=0.3\textwidth,height=1.5cm]{\LogoSchule} \newline \fi \Schule} + \fancyhead[L]{\iftoggle{keinlogo}{}{\includegraphics[width=0.3\textwidth,height=1.5cm]{\LogoSchule} \newline} \Schule} \fancyhead[R]{\Large Name: \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } } diff --git a/templates/test/_test.tex b/templates/test/_test.tex index dde32d91..6dc48445 100644 --- a/templates/test/_test.tex +++ b/templates/test/_test.tex @@ -1,6 +1,11 @@ -\begin{document} +\Datum{13.12.2000} +\TestNummer{15} +\TestArt{Testitest} +\Klasse{XYz} +\Fach{Archäologie} -\thispagestyle{ErsteSeite} +\begin{document} +%% Erzeugt den Intro Header \Intro %% Beispiel Aufgabe mit karierter Bearbeitung @@ -15,14 +20,9 @@ \liniert[0.5cm]{10} \end{Bearbeitung} -\input{Aufgaben/aufgabe1} - %%%Hier die Darstellung am Ende %%Falls es das ganze auf eine andere Seite Schiebt und man alles komprimieren will -%\newcommand{\PlatzKnapp}{} - -%%Optional neue Seite -\newpage +%\PlatzKnapp %%Bindet Kleeblatt mit Viel Erfolg ein und erstellt Platz darunter \Ende diff --git a/templates/test/test_loesung.tex b/templates/test/test_loesung.tex index 0e45e262..d0bb5cf9 100644 --- a/templates/test/test_loesung.tex +++ b/templates/test/test_loesung.tex @@ -1,6 +1,7 @@ \documentclass[ lehrerversion, sigfooter, +keinlogo, ]{test} \input{_test} |
