[hwa] Rewrite definition of \newproblem

Fixes #23Signed-off-by: Adrian C. Hinrichs's avatarAdrian C. Hinrichs <adrian.hinrichs@rwth-aachen.de>
parent af01bc0a
......@@ -265,14 +265,17 @@
\newcounter{subsubproblem}[subproblem] \setcounter{subsubproblem}{0}
\DeclareDocumentCommand\newproblem{O{} g}{
\stepcounter{problem}% to reset the lower counters
\ifthenelse{\equal{#1}{}}{
% empty
}{
\setcounter{problem}{#1}
}
\IfNoValueTF{#2}{
\newproblem*[#1]
\problem{\GetTranslation{aufgabe} \hwa@problemno}
\addToGradingTable{\# \hwa@problemno}
}{
\IfNoValueF{#1}{
\stepcounter{problem}% to reset the lower counters
\setcounter{problem}{#1}
}
\problem{\GetTranslation{aufgabe} \hwa@problemno}[#2]
\addToGradingTable{\# \hwa@problemno}{/#2}
}
......
......@@ -608,14 +608,17 @@
% \end{macrocode}
% \begin{macrocode}
\DeclareDocumentCommand\newproblem{O{} g}{
\stepcounter{problem}% to reset the lower counters
\ifthenelse{\equal{#1}{}}{
% empty
}{
\setcounter{problem}{#1}
}
\IfNoValueTF{#2}{
\newproblem*[#1]
\problem{\GetTranslation{aufgabe} \hwa@problemno}
\addToGradingTable{\# \hwa@problemno}
}{
\IfNoValueF{#1}{
\stepcounter{problem}% to reset the lower counters
\setcounter{problem}{#1}
}
\problem{\GetTranslation{aufgabe} \hwa@problemno}[#2]
\addToGradingTable{\# \hwa@problemno}{/#2}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment