Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 2
optimisation code

04 Avr '20, 03:42

floyd973's gravatar image

floyd973
1211815

Ou encore enter code here \newif\ifcorrige %\corrigetrue % decommenter pour afficher les réponses \newcounter{nbrlignespointilles} \newcommand{\lpointilles}[1]{% \setcounter{nbrlignespointilles}{0} \loop \ifnum\value{nbrlignespointilles}<#1 \stepcounter{nbrlignespointilles}% \dotfill\par \repeat} \newcounter{nbrlignestotal} \newcounter{lignesparag} \newcommand{\lpointilles}[1]{% \setcounter{nbrlignespointilles}{0} \loop \ifnum\value{nbrlignespointilles}<#1 \stepcounter{nbrlignespointilles}% \dotfill\par \repeat} \ifcorrige \newenvironment{reponse}[1] {% \parindent=0pt \blue \par \setcounter{nbrlignestotal}{#1} } {% \par\setcounter{lignesparag}{\prevgraf}% \par% \lpointilles{\number\numexpr \value{nbrlignestotal}-\value{lignesparag}}% \value{nbrlignestotal}-\prevgraf}% } \else \newenvironment{reponse}[1] {% \parindent=0pt \lpointilles{#1}% \comment} {\endcomment \par} \fi
cliquez ici pour masquer/afficher la révision 1

04 Avr '20, 03:31

floyd973's gravatar image

floyd973
1211815

Ou encore enter code here \newif\ifcorrige %\corrigetrue % decommenter pour afficher les réponses \newcounter{nbrlignespointilles} \newcounter{nbrlignestotal} \newcounter{lignesparag} \newcommand{\lpointilles}[1]{% \setcounter{nbrlignespointilles}{0} \loop \ifnum\value{nbrlignespointilles}<#1 \stepcounter{nbrlignespointilles}% \dotfill\par \repeat} \ifcorrige \newenvironment{reponse}[1] {% \parindent=0pt \blue \par \setcounter{nbrlignestotal}{#1} } {% \par\setcounter{lignesparag}{\prevgraf}% \lpointilles{\number\numexpr \value{nbrlignestotal}-\value{lignesparag}}% } \else \newenvironment{reponse}[1] {% \parindent=0pt \lpointilles{#1}% \comment} {\endcomment \par} \fi

C'est votre première visite ici ? Consultez la FAQ !

×