소스 검색

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

master
flavis 5 년 전
부모
커밋
3bd25450fa
3개의 변경된 파일18개의 추가작업 그리고 9개의 파일을 삭제
  1. +17
    -6
      lecture.cls
  2. BIN
      sose2020/la/uebungen/la1.pdf
  3. +1
    -3
      sose2020/la/uebungen/la1.tex

+ 17
- 6
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


BIN
sose2020/la/uebungen/la1.pdf 파일 보기


+ 1
- 3
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)]


불러오는 중...
취소
저장