Explorar el Código

improve punkte macro to adapt to exercise numbers not starting from 1

master
flavis hace 5 años
padre
commit
3bd25450fa
Se han modificado 3 ficheros con 18 adiciones y 9 borrados
  1. +17
    -6
      lecture.cls
  2. BIN
      sose2020/la/uebungen/la1.pdf
  3. +1
    -3
      sose2020/la/uebungen/la1.tex

+ 17
- 6
lecture.cls Ver fichero

@@ -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


BIN
sose2020/la/uebungen/la1.pdf Ver fichero


+ 1
- 3
sose2020/la/uebungen/la1.tex Ver fichero

@@ -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)]


Cargando…
Cancelar
Guardar