From b2d145b6436849ba232c25637dfcf0232aacbc2e Mon Sep 17 00:00:00 2001 From: Yann Salmon Date: Tue, 16 Oct 2018 22:24:42 +0200 Subject: [PATCH] fin du hack moche --- latex/inputTD.tex | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/latex/inputTD.tex b/latex/inputTD.tex index 42d870c..320639c 100644 --- a/latex/inputTD.tex +++ b/latex/inputTD.tex @@ -47,6 +47,11 @@ {\IfValueT{##1}{\begingroup\setlength\columnseprule{0pt}\begin{multicols}{##1}}\begin{enumerate}\renewcommand\theenumi{\Alph{enumi}}}{\end{enumerate}\IfValueT{##1}{\end{multicols}\endgroup}}} +\def\setthe#1{\@ifnextchar[{\setthei{#1}}{}} +\def\setthei#1[#2]{% +\expandafter\let\expandafter\@temp\csname the#1\endcsname +\toks@\expandafter{\@temp}% +\expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand\csname the#2\endcsname\@thmcountersep\the\toks@}} @@ -74,7 +79,7 @@ \edef\@temp{\noexpand\newcounter{question}\resetlevel}\@temp \specialcomment{question}{\refstepcounter{question}\begingroup\def\ProcessCutFile{}}{\endgroup} \newtheorem{corrige}{Question} - \def\thequestion{\thesection.\arabic{question}} %% hack moche à améliorer + \edef\@temp{\noexpand\setthe{question}\resetlevel}\@temp \let\thecorrige\thequestion % \newcounter{qcm}