From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 .../xsim.style.schule-tabelle-kurz.code.tex        | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex

(limited to 'macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex')

diff --git a/macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex b/macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex
new file mode 100644
index 0000000000..d25f4e0c9b
--- /dev/null
+++ b/macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex
@@ -0,0 +1,77 @@
+\ExplSyntaxOn
+
+\DeclareExerciseTableTemplate{kurz}
+{ \renewcommand{\arraystretch}{1.5}
+	\XSIMputright \ExerciseTableCode
+	{
+		\hline % toprule
+		\XSIMifblankTF {\ExerciseType}
+		{Aufgabe }
+		{ \XSIMmixedcase { \GetExerciseParameter {exercise-name} } }
+		&
+	}
+	\ForEachUsedExerciseByType
+	{
+		\XSIMifeqTF {#1} { \ExerciseTableType {#1} }
+		{
+			\XSIMifblankTF { \ExerciseType }
+			{ 
+				\XSIMputright \ExerciseTableCode
+				{
+					{ % Kurzfassung für Aufgabe, Zusatzaufgabe und Übung
+					\XSIMifeqT{\ExerciseParameterGet {#1} {exercise-name}}{Aufgabe}{A\,}
+					\XSIMifeqT{\ExerciseParameterGet {#1} {exercise-name}}{Zusatzaufgabe}{Z\,}
+					\XSIMifeqT{\ExerciseParameterGet {#1} {exercise-name}}{Übung}{Ü\,}
+					}
+				}
+			}
+			{}
+			\XSIMputright  \ExerciseTableCode { #3 & }
+		}
+		{}
+	}
+	\XSIMputright \ExerciseTableCode
+	{
+		\XSIMtranslate {total} \\ \hline %midrule
+
+		\XSIMmixedcase { \XSIMtranslate {points} } &
+	}
+	\ForEachUsedExerciseByType
+	{
+		\XSIMifeqTF {#1} { \ExerciseTableType {#1} }
+		{
+			\XSIMputright \ExerciseTableCode
+			{ \XSIMifblankTF {#5} {\printgoal{0}} {\printgoal{#5}} & }
+		}
+		{}
+	}
+	\XSIMputright \ExerciseTableCode
+	{
+		\XSIMifblankTF {\ExerciseType}
+		{ \TotalExerciseGoal {points} {} {} }
+		{ \TotalExerciseTypeGoal {\ExerciseType} {points} {} {} }
+		\\ \hline %midrule
+		\XSIMtranslate {reached} &
+	}
+	\ForEachUsedExerciseByType
+	{
+		\XSIMifeqTF {#1} { \ExerciseTableType {#1} }
+		{ \XSIMputright \ExerciseTableCode {&} }
+		{}
+	}
+	\XSIMputright \ExerciseTableCode { \\ \hline %\bottomrule
+	 }
+	\def\numberofcolumns{
+		\XSIMifblankTF {\ExerciseType}
+		{\numberofusedexercises}
+		{\csname numberof \ExerciseType s\endcsname}
+	}
+	\XSIMifeqF{\numberofcolumns}{0}
+	{
+		\begin {longtable} {l|*{\numberofcolumns}{c}|c}
+		\ExerciseTableCode
+		\end {longtable}
+	}
+}
+
+\ExplSyntaxOff
-- 
cgit v1.2.3

