From 252fb5f90a80001e4a403dad3f59d25bc94a72bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hilbig?= Date: Sun, 28 Jun 2015 14:51:23 +0200 Subject: [PATCH] =?UTF-8?q?Hack=20f=C3=BCr=20addtotoc=20in=20=C3=9Cbungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ahilbig-common.sty | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ahilbig-common.sty b/ahilbig-common.sty index 3855194..7a96678 100644 --- a/ahilbig-common.sty +++ b/ahilbig-common.sty @@ -719,6 +719,7 @@ \mode
\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}%