summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/latex/PfCPythagore.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/profcollege/latex/PfCPythagore.tex')
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCPythagore.tex38
1 files changed, 19 insertions, 19 deletions
diff --git a/macros/latex/contrib/profcollege/latex/PfCPythagore.tex b/macros/latex/contrib/profcollege/latex/PfCPythagore.tex
index 4af4528b81..0ebc259286 100644
--- a/macros/latex/contrib/profcollege/latex/PfCPythagore.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCPythagore.tex
@@ -1,10 +1,10 @@
%%%
% Le th\'eor\`eme de Pythagore
%%%
-\setKVdefault[ClesPythagore]{Exact=false,AvantRacine=false,Racine=false,Entier=false,Egalite=false,Precision=2,Soustraction=false,Figure=false,FigureSeule=false,Angle=0,Echelle=1cm,Reciproque=false,ReciColonnes=false,Faible=false,Unite=cm,EnchaineA=false,EnchaineB=false,EnchaineC=false,Perso=false,AllPerso=false,SansMots=false}
-\defKV[ClesPythagore]{ValeurA=\setKV[ClesPythagore]{EnchaineA}}
-\defKV[ClesPythagore]{ValeurB=\setKV[ClesPythagore]{EnchaineB}}
-\defKV[ClesPythagore]{ValeurC=\setKV[ClesPythagore]{EnchaineC}}
+\setKVdefault[ClesPythagore]{Exact=false,AvantRacine=false,Racine=false,Entier=false,Egalite=false,Precision=2,Soustraction=false,Figure=false,FigureSeule=false,Angle=0,Echelle=1cm,Reciproque=false,ReciColonnes=false,Faible=false,Unite=cm,EnchaineA=false,EnchaineB=false,EnchaineC=false,Perso=false,AllPerso=false,SansMots=false}%
+\defKV[ClesPythagore]{ValeurA=\setKV[ClesPythagore]{EnchaineA}}%
+\defKV[ClesPythagore]{ValeurB=\setKV[ClesPythagore]{EnchaineB}}%
+\defKV[ClesPythagore]{ValeurC=\setKV[ClesPythagore]{EnchaineC}}%
% On d\'efinit les figures \`a utiliser
\def\MPFigurePytha#1#2#3#4#5#6{%
% #1 Premier sommet
@@ -14,8 +14,8 @@
% #5 2eme longueur
% #6 angle de rotation de la figure
\ifluatex
- \mplibforcehmode
- \begin{mplibcode}
+ \mplibforcehmode%
+ \begin{mplibcode}
u:=\useKV[ClesPythagore]{Echelle};
pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
O=u*(2.5,2.5);
@@ -107,7 +107,7 @@
label(btex #1 etex,1.2[O,C]);
\end{mpost}
\fi
-}
+}%
\def\MPFigureReciPytha#1#2#3#4#5#6#7{%
% #1 Premier sommet
@@ -182,7 +182,7 @@
label(btex #3 etex,1.2[O,C]);
\end{mpost}
\fi
-}
+}%
\def\MPFigurePythaSansMots#1#2#3#4#5#6{%
% #1 Premier sommet
@@ -264,7 +264,7 @@
label(btex #1 etex,1.2[O,C]);
\end{mplibcode}
\fi
-}
+}%
\newcommand\RedactionPythagore{}%
\newcommand\RedactionReciPythagore{}%
@@ -272,7 +272,7 @@
\newcommand\RedactionCalculsReciPythagore{}%
\newcommand\RedactionConclusionReciPythagore{}%
-\NewDocumentCommand\CalculsPythagore{o m m m m}{
+\NewDocumentCommand\CalculsPythagore{o m m m m}{%
\xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
\xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
\begin{align*}
@@ -312,7 +312,7 @@
\end{align*}
}%
}%\fi%
-}
+}%
\NewDocumentCommand\PfCCalculsReciPythagore{ommmm}{%
\ifboolKV[ClesPythagore]{ReciColonnes}{%
@@ -430,8 +430,8 @@
\ifboolKV[ClesPythagore]{Perso}{%
\RedactionReciPythagore%
}{%
- Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
- }
+ Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
+ }%
\PfCCalculsReciPythagore[#1]{#2}{#3}{#4}{#5}%
\ifboolKV[ClesPythagore]{Egalite}{%
\xintifboolexpr{\PfCRetiensReciHypo==\PfCRetiensReciSomme}{%
@@ -455,7 +455,7 @@
}{%
\ifboolKV[ClesPythagore]{Perso}{\RedactionReciPythagore}{%
Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
- }
+ }%
\PfCCalculsReciPythagore[#1]{#2}{#3}{#4}{#5}%
\ifboolKV[ClesPythagore]{Egalite}{%
\xintifboolexpr{\PfCRetiensReciHypo==\PfCRetiensReciSomme}{%
@@ -477,7 +477,7 @@
\opcopy{#3}{A1}%
\opcopy{#4}{A2}%
\opcopy{\useKV[ClesPythagore]{Precision}}{pres}%
- \xintifboolexpr{#3<#4 || #3==#4}{
+ \xintifboolexpr{#3<#4 || #3==#4}{%
\xdef\PetitCote{#3}%
\xdef\MoyenCote{#4}%
\xdef\GrandCote{}%
@@ -485,7 +485,7 @@
\xdef\GrandCote{#3}%
\xdef\MoyenCote{#4}%
\xdef\PetitCote{}% Pour la personnalisation
- }
+ }%
% On retient les noms des sommets
\StrMid{#2}{1}{1}[\NomA]%
\StrMid{#2}{2}{2}[\NomB]%
@@ -501,7 +501,7 @@
}{%
\xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
}%
- \MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}
+ \MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}%
}{%
\ifboolKV[ClesPythagore]{Figure}{%
\begin{multicols}{2}%
@@ -518,7 +518,7 @@
}{%
\ifboolKV[ClesPythagore]{Egalite}{Comme le triangle $#2$ est rectangle en $\NomB$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee :}{Dans le triangle $#2$ rectangle en $\NomB$, le th\'eor\`eme de Pythagore permet d'\'ecrire :%
}%
- }
+ }%
\CalculsPythagore[#1]{#2}{#3}{#4}{}
}%
\end{multicols}
@@ -533,7 +533,7 @@
}{%
\ifboolKV[ClesPythagore]{Perso}{\RedactionPythagore}{\ifboolKV[ClesPythagore]{Egalite}{Comme le triangle $#2$ est rectangle en $\NomB$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee :}{Dans le triangle $#2$ rectangle en $\NomB$, le th\'eor\`eme de Pythagore permet d'\'ecrire :%
}}%
- \CalculsPythagore[#1]{#2}{#3}{#4}{}
+ \CalculsPythagore[#1]{#2}{#3}{#4}{}%
}%
}%
}%