aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--latex/common.tex32
-rw-r--r--templates/test/Aufgaben/aufgabe1.tex2
-rw-r--r--templates/test/_test.tex2
3 files changed, 18 insertions, 18 deletions
diff --git a/latex/common.tex b/latex/common.tex
index f64f3e6c..87ede1c4 100644
--- a/latex/common.tex
+++ b/latex/common.tex
@@ -25,18 +25,19 @@
\newcommand{\gap}[1]{\underLine{\solution{#1}}}
-\newtheoremstyle{Aufg}% name of the style to be used
-{2pt}% measure of space to leave above the theorem. E.g.: 3pt
-{}% measure of space to leave below the theorem. E.g.: 3pt
-{}% name of font to use in the body of the theorem
-{}% measure of space to indent
-{}% name of head font
-{}% punctuation between head and body
-{\newline }% space after theorem head; " " = normal interword space
-{\textbf{\thmname{#1} \thmnumber{#2}\thmnote{ (#3)}\ifdefined\Verteilung{}: \ \Verteilung \hfill {/}\ref{a:\thmnumber{#2}} \ BE\fi}}
+% Point distribution across subtasks
+\newcommand{\Verteilung}{}
-\theoremstyle{Aufg}
-\newtheorem{Aufg}{Aufgabe}
+\newcounter{Aufg}
+\newenvironment{Aufg}[1][]{
+\refstepcounter{Aufg}%
+\noindent\textbf{Aufgabe \theAufg\ifstrempty{#1}{}{\ #1}:%
+\ifdefempty{\Verteilung}{}{\ \Verteilung} \hfill {/}\ref{a:\theAufg} \ BE}%
+\newline
+}{%
+\renewcommand{\Verteilung}{}% reset the distribution after each exercise
+\global\let\Verteilung\Verteilung%
+}
% Total amount of point * 2 in order to track half points in an integer counter
\newcounter{be} % Total amount of points in the document
@@ -45,15 +46,12 @@
\setcounter{beAManuell}{-1}
\newcommand{\BE}[1]{%
-\iftoggle{erwartungshorizont}{% Typeset the points only if we are creating a horzon of expectation
+\iftoggle{erwartungshorizont}{% Typeset the points only if we are creating a horizon of expectation
#1 BE}{}% TODO: better typesetting
\addtocounter{beA}{\fpeval{#1*2}}}
\newcommand{\AnzahlInsgesamtPunkte}{\fpeval{\value{be} / 2}}
-% Point distribution across subtasks
-\newcommand{\Verteilung}{}
-
% Manually override the points
\newcommand{\AnzahlPunkte}[1]{\setcounter{beAManuell}{\fpeval{#1*2}}}
@@ -67,7 +65,7 @@
}
}
{%end_def
-\iftoggle{lehrerversion}{}{\end{adjustbox}\vspace{-\baselineskip}}
+\iftoggle{lehrerversion}{}{\end{adjustbox}\vspace{-0.5\baselineskip}}
% Overwrite the beA counter
\ifthenelse{\arabic{beAManuell} > -1}%
{\setcounter{beA}{\value{beAManuell}}}%
@@ -77,7 +75,7 @@
\addtocounter{be}{\value{beA}}
% Persist the current exercise count
\setcounter{beA}{\fpeval{\value{beA} / 2}}%
-\addtocounter{beA}{-1}% decrement beA count because refstepcount will increment it
+\addtocounter{beA}{-1}% decrement beA count because refstepcounter will increment it
\refstepcounter{beA}% make the beA available for the ref and label mechanisms
\expandafter\label{a:\theAufg}% create a label for this exercise
}
diff --git a/templates/test/Aufgaben/aufgabe1.tex b/templates/test/Aufgaben/aufgabe1.tex
index 7cc4d741..74141b05 100644
--- a/templates/test/Aufgaben/aufgabe1.tex
+++ b/templates/test/Aufgaben/aufgabe1.tex
@@ -3,7 +3,7 @@
%% Punkte im Erwartungshorizont
\AnzahlPunkte{1}
-\begin{Aufg}
+\begin{Aufg}[Tolles Beispiel]
Berechne $1+1-2$
\end{Aufg}
diff --git a/templates/test/_test.tex b/templates/test/_test.tex
index 89316dbc..dde32d91 100644
--- a/templates/test/_test.tex
+++ b/templates/test/_test.tex
@@ -15,6 +15,8 @@
\liniert[0.5cm]{10}
\end{Bearbeitung}
+\input{Aufgaben/aufgabe1}
+
%%%Hier die Darstellung am Ende
%%Falls es das ganze auf eine andere Seite Schiebt und man alles komprimieren will
%\newcommand{\PlatzKnapp}{}