Browse Source

improve punkte command to automatically create correct number of exercises

master
flavis 5 years ago
parent
commit
5a1385f05b
3 changed files with 23 additions and 10 deletions
  1. +22
    -4
      lecture.cls
  2. BIN
      sose2020/ana/uebungen/ana1.pdf
  3. +1
    -6
      sose2020/ana/uebungen/ana1.tex

+ 22
- 4
lecture.cls View File

@@ -20,6 +20,8 @@
\RequirePackage[nobottomtitles]{titlesec}
\RequirePackage{listings}
\RequirePackage{mathtools}
\RequirePackage{forloop}
\RequirePackage{totcount}

\usetikzlibrary{quotes, angles}

@@ -54,6 +56,9 @@
\newtheorem{bem}[satz]{Bemerkung}
\newtheorem{aufgabe}{Aufgabe}

% enable aufgaben counting
\regtotcounter{aufgabe}

\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
@@ -76,11 +81,24 @@
}

% punkte tabelle
\newcommand\punkte{
\begin{tabular}{|c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|@{}m{0cm}@{}}
\newcommand{\punkte}{
\@punkten{\totvalue{aufgabe}}
}

\def\@punkten#1{
\newcounter{n}
\begin{tabular}{|c|*{#1}{m{1cm}|}m{1cm}|@{}m{0cm}@{}}
\hline
Aufgabe & \centering A1 & \centering A2 & \centering A3 & \centering A4 & \centering $\sum$ & \\[5mm] \hline
Punkte & & & & & & \\[5mm] \hline
Aufgabe
\forloop{n}{1}{\not{\value{n} > #1}}{
& \centering A\then
}
& \centering $\sum$ & \\[5mm] \hline
Punkte
\forloop{n}{1}{\not{\value{n} > #1}}{
&
}
& & \\[5mm] \hline
\end{tabular}
}



BIN
sose2020/ana/uebungen/ana1.pdf View File


+ 1
- 6
sose2020/ana/uebungen/ana1.tex View File

@@ -2,12 +2,7 @@

\begin{document}

% punkte tabelle
\begin{tabular}{|c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|@{}m{0cm}@{}}
\hline
Aufgabe & \centering A1 & \centering A2 & \centering A3 & \centering A4 & \centering A5 & \centering $\sum$ & \\[5mm] \hline
Punkte & & & & & & & \\[5mm] \hline
\end{tabular}
\punkte

\title{Analysis II: Übungsblatt 1}
\author{Leon Burgard, Christian Merten}


Loading…
Cancel
Save