diff --git a/lecture.cls b/lecture.cls index 0edddc7..147516b 100644 --- a/lecture.cls +++ b/lecture.cls @@ -22,6 +22,7 @@ \RequirePackage{mathtools} \RequirePackage{forloop} \RequirePackage{totcount} +\RequirePackage{calc} \usetikzlibrary{quotes, angles} @@ -59,6 +60,9 @@ % enable aufgaben counting \regtotcounter{aufgabe} +% temporary calculation counter +\newcounter{var} + \newcommand{\N}{\mathbb{N}} \newcommand{\R}{\mathbb{R}} \newcommand{\Z}{\mathbb{Z}} @@ -81,21 +85,28 @@ } % punkte tabelle -\newcommand{\punkte}{ - \@punkten{\totvalue{aufgabe}} +\newcommand{\punkte}[1][1]{ + \newcounter{k} + \setcounter{k}{#1} + \@punkten{\value{k}}{\totvalue{aufgabe}} + \setcounter{k}{#1-1} + \setcounter{aufgabe}{\value{k}} + \vspace{5mm} } -\def\@punkten#1{ +\def\@punkten#1#2{ \newcounter{n} - \begin{tabular}{|c|*{#1}{m{1cm}|}m{1cm}|@{}m{0cm}@{}} + % create a temporary calculation counter + \setcounter{var}{#2-#1+1} + \begin{tabular}{|c|*{\value{var}}{m{1cm}|}m{1cm}|@{}m{0cm}@{}} \hline Aufgabe - \forloop{n}{1}{\not{\value{n} > #1}}{ + \forloop{n}{#1}{\not{\value{n} > #2}}{ & \centering A\then } & \centering $\sum$ & \\[5mm] \hline Punkte - \forloop{n}{1}{\not{\value{n} > #1}}{ + \forloop{n}{#1}{\not{\value{n} > #2}}{ & } & & \\[5mm] \hline diff --git a/sose2020/la/uebungen/la1.pdf b/sose2020/la/uebungen/la1.pdf index 99d8715..b74fb85 100644 Binary files a/sose2020/la/uebungen/la1.pdf and b/sose2020/la/uebungen/la1.pdf differ diff --git a/sose2020/la/uebungen/la1.tex b/sose2020/la/uebungen/la1.tex index 60717f8..575ea01 100644 --- a/sose2020/la/uebungen/la1.tex +++ b/sose2020/la/uebungen/la1.tex @@ -5,9 +5,7 @@ \author{Dominik Daniel, Christian Merten} \title{Lineare Algebra II: Übungsblatt 1} -\punkte - -\setcounter{aufgabe}{3} +\punkte[4] \begin{aufgabe} \begin{enumerate}[(a)]