Procházet zdrojové kódy

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

master
flavis před 5 roky
rodič
revize
3bd25450fa
3 změnil soubory, kde provedl 18 přidání a 9 odebrání
  1. +17
    -6
      lecture.cls
  2. binární
      sose2020/la/uebungen/la1.pdf
  3. +1
    -3
      sose2020/la/uebungen/la1.tex

+ 17
- 6
lecture.cls Zobrazit soubor

@@ -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ární
sose2020/la/uebungen/la1.pdf Zobrazit soubor


+ 1
- 3
sose2020/la/uebungen/la1.tex Zobrazit soubor

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


Načítá se…
Zrušit
Uložit