summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex
Initial commit
Diffstat (limited to 'macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex')
-rw-r--r--macros/latex/contrib/schule/data/xsim-style/xsim.style.schule-tabelle-kurz.code.tex77
1 files changed, 77 insertions, 0 deletions
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