summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/latex/PfCLego.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/profcollege/latex/PfCLego.tex')
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCLego.tex12
1 files changed, 6 insertions, 6 deletions
diff --git a/macros/latex/contrib/profcollege/latex/PfCLego.tex b/macros/latex/contrib/profcollege/latex/PfCLego.tex
index 86811da4ad..901eb0a54b 100644
--- a/macros/latex/contrib/profcollege/latex/PfCLego.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCLego.tex
@@ -22,7 +22,7 @@
\NewDocumentCommand\Lego{o}{%
\useKVdefault[Lego]%
\setKV[Lego]{#1}%
- \xintifboolexpr{\useKV[Lego]{Unite}==1}{%
+ \xintifboolexpr{\useKV[Lego]{Unite}==1 || \useKV[Lego]{Unique}}{%
\xdef\PfCNbCouleurs{1}%
}{%
\xdef\PfCNbCouleurs{\fpeval{floor(\useKV[Lego]{Unite}/\useKV[Lego]{Diviseur})}}%
@@ -38,7 +38,7 @@
\NewDocumentCommand\BuildBarreLego{mm}{%
\ifluatex%
\mplibforcehmode%
- \begin{mplibcode}
+ \begin{mplibcode}%
boolean Plaque,Unique;
Plaque=\useKV[Lego]{Plaque};
Unique=\useKV[Lego]{Unique};
@@ -105,9 +105,9 @@
RetiensLego=currentpicture;
currentpicture:=nullpicture;
draw RetiensLego scaled Echelle;
- \end{mplibcode}
- \else
- \begin{mpost}
+ \end{mplibcode}%
+ \else%
+ \begin{mpost}%
input PfCLego;
%
vardef ChoixCouleur(text t)=
@@ -153,6 +153,6 @@
Lego_box(Diviseur,2,Brique[k]);
endfor;
fi;
- \end{mpost}
+ \end{mpost}%
\fi%
}% \ No newline at end of file