summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp')
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp7
1 files changed, 3 insertions, 4 deletions
diff --git a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
index daae0553f7..28252f90bf 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
@@ -40,7 +40,7 @@ decahoriz:=0;
vardef Test(expr cptk)(text cptnt)=
pair Decalage;
- if nblignes mod 2=0:
+ if nblignes>1:
Decalage:=u*((LargeurEcran,-8*(nblignes-1))-6*(length(cptnt)-cptk,0));
else:
Decalage:=u*(decahoriz,-8*(nblignes-1));
@@ -186,12 +186,11 @@ vardef LCD(text nt)(text rep)(expr NB)=
endfor;
fi;
for k=1 upto NB:
- nblignes:=nblignes+1;
- Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
+ Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(k+nblignes-1)));
fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
endfor;
- nblignes:=nblignes+1;
+ nblignes:=nblignes+NB+1;
Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;