summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex')
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex b/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex
index 634baa969e..1c42d433a6 100644
--- a/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCMotsEmpiles.tex
@@ -5,7 +5,7 @@
\newcounter{CompteurMotEmpile}
-\newcommand\MotsEmpiles[2][]{%
+\NewDocumentCommand\MotsEmpiles{om}{%
\useKVdefault[ClesMotEmpile]%
\setKV[ClesMotEmpile]{#1}%
\setcounter{CompteurMotEmpile}{0}%
@@ -18,17 +18,17 @@
\xintifboolexpr{\ListeMotsEmpilesMax<\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}{\xdef\ListeMotsEmpilesMax{\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}}{}%
}%
\begin{NiceTabular}{c|*{\fpeval{\ListeMotsEmpilesMax}}{m{10pt}}}%
- \Block{1-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}}{}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesMotEmpile]{Colonne}}}}\do{&}&$\downarrow$\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpilesMax-\useKV[ClesMotEmpile]{Colonne}-1}}}\do{&}\\
+ \Block{1-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}}{}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesMotEmpile]{Colonne}}}}\do{&}&\Block{}{$\downarrow$}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpilesMax-\useKV[ClesMotEmpile]{Colonne}-1}}}\do{&}\\
\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpileslen}}}\do{%
\rule[-1.2ex]{0pt}{3.8ex}\stepcounter{CompteurMotEmpile}\Alph{CompteurMotEmpile}&\Block{1-\fpeval{\ListeMotsEmpiles[##1,1]}}{}\xintFor* ##2 in {\xintSeq {1}{\fpeval{\ListeMotsEmpiles[##1,1]}}}\do{%
&
}%
\StrLen{\ListeMotsEmpiles[##1,2]}[\LongueurMot]%
\xintFor* ##3 in {\xintSeq {1}{\fpeval{\LongueurMot}}}\do{%
- \xintifForFirst{}{&}\Block[draw=black]{1-1}{\ifboolKV[ClesMotEmpile]{Solution}{\centering\arraybackslash\StrMid{\ListeMotsEmpiles[##1,2]}{##3}{##3}}{}}%%
+ \xintifForFirst{}{&}\Block[draw=black,b]{1-1}{\ifboolKV[ClesMotEmpile]{Solution}{\StrMid{\ListeMotsEmpiles[##1,2]}{##3}{##3}}{}}%
}%
\\
}%
- \CodeAfter\tikz\draw[line width=1.5pt,MotEmpileCouleur](row-2-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}) rectangle (row-\fpeval{\ListeMotsEmpileslen+2}-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+3});
+ \CodeAfter\tikz\draw[line width=1.5pt,MotEmpileCouleur](row-2-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}) rectangle (row-\fpeval{\ListeMotsEmpileslen+2}-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+3});%
\end{NiceTabular}%
}% \ No newline at end of file