From 730f4262903243c5d6e26fb2fac920a6dec5a2d9 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 2 Feb 2024 12:07:06 +0100 Subject: improve test with a BE overview table Do not include the BE sum in the border if we have a Table. Only set the table in the schueler version. --- latex/common.tex | 25 +++++++++++++++---------- latex/test.cls | 8 +++++--- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/latex/common.tex b/latex/common.tex index 80c910b1..a94942bf 100644 --- a/latex/common.tex +++ b/latex/common.tex @@ -31,18 +31,23 @@ \newcommand{\pgap}[1]{\uline{\psolution{#1}}} \fi +\newtoggle{betable} + \newcommand{\beTabelle}[1][3cm]{% -\centering -\begin{tikzpicture}[cell/.style={draw, minimum height=1cm, minimum width=#1}] - \node [cell] at (1,0) {Aufgabe}; - \node [cell] at (1,-1) {BEs}; - \node [cell] at (1,-2) {}; - \foreach \x [count=\xi] in {1,...,\theAufg}{% - \node [cell] at ([shift={(1,0)}]\xi*#1,0) {\xi}; - \node [cell] at ([shift={(1,-1)}]\xi*#1,0) {\ref{a:\xi}}; - \node [cell] at ([shift={(1,-2)}]\xi*#1,0) {}; +\toggletrue{betable} +\iftoggle{lehrerversion}{}{ + \centering + \begin{tikzpicture}[cell/.style={draw, minimum height=1cm, minimum width=#1}] + \node [cell] at (1,0) {Aufgabe}; + \node [cell] at (1,-1) {BEs}; + \node [cell] at (1,-2) {}; + \foreach \x [count=\xi] in {1,...,\theAufg}{% + \node [cell] at ([shift={(1,0)}]\xi*#1,0) {\xi}; + \node [cell] at ([shift={(1,-1)}]\xi*#1,0) {\ref{a:\xi}}; + \node [cell] at ([shift={(1,-2)}]\xi*#1,0) {}; + } + \end{tikzpicture} } -\end{tikzpicture} } % Point distribution across subtasks diff --git a/latex/test.cls b/latex/test.cls index 73beae70..bb8d939c 100644 --- a/latex/test.cls +++ b/latex/test.cls @@ -57,9 +57,11 @@ } } \AtEndDocument{ - \begin{tikzpicture}[remember picture, overlay, black] - \node[left] at (current page marginpar area.south east) {\bfseries \ \ \ \ {/}\AnzahlInsgesamtPunkte \ BE}; - \end{tikzpicture} + \iftoggle{betable}{}{ % draw BE sum in border if no betable is present + \begin{tikzpicture}[remember picture, overlay, black] + \node[left] at (current page marginpar area.south east) {\bfseries \ \ \ \ {/}\AnzahlInsgesamtPunkte \ BE}; + \end{tikzpicture} + } } }{} -- cgit v1.2.3