Hack für addtotoc in Übungen

This commit is contained in:
André Hilbig 2015-06-28 14:51:23 +02:00
parent 7bc45064e6
commit 252fb5f90a

View File

@ -719,6 +719,7 @@
\mode<article>
\newif\ifbonus
\newif\ifexaddtotoc
\pgfkeys{
/ddi/exercise/title/.initial=,
@ -730,6 +731,9 @@
/ddi/exercise/solution/.style={@solution=mit~Lösung},
/ddi/exercise/@examtext/.initial=,
/ddi/exercise/exam/.is choice,
%new key by ahilbig
/ddi/exercise/addtotoc/.is if=exaddtotoc,
%
/ddi/exercise/exam/no/.style={@examtext=nicht~klausurrelevant},
/ddi/exercise/exam/used/.style={@examtext=original~Klausuraufgabe},
/ddi/exercise/exam/typical/.style={@examtext=typische~Klausuraufgabe},
@ -791,6 +795,12 @@
\llap{\box\mybox}%
\def\infostring{}%
\possiblyuse{title}%
% added by ahilbig --
% it's a dirty hack: mymacro keeps its value from the last key
\ifexaddtotoc
\addcontentsline{toc}{subsection}{\insertexercisetext\ \theexercisenumber\ -- \mymacro}
\fi
% ----------------
\possiblyuse{level}%
\possiblyuse{@credits}%
\possiblyuse{how}%