summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex
blob: d25f4e0c9bd52f5ad9e47d96bd8cde46906b5aa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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