texlive[60380] Master/texmf-dist: profcollege (31aug21)

commits+karl at tug.org commits+karl at tug.org
Tue Aug 31 22:51:46 CEST 2021


Revision: 60380
          http://tug.org/svn/texlive?view=revision&revision=60380
Author:   karl
Date:     2021-08-31 22:51:45 +0200 (Tue, 31 Aug 2021)
Log Message:
-----------
profcollege (31aug21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf
    trunk/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip
    trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty

Modified: trunk/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2021-08-31 20:51:18 UTC (rev 60379)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2021-08-31 20:51:45 UTC (rev 60380)
@@ -3,7 +3,7 @@
 % or later, see http://www.latex-project.org/lppl.txtf
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfCollege}[2021/08/22 v0.99-f Aide pour l'utilisation de LaTeX au collège]
+\ProvidesPackage{ProfCollege}[2021/09/01 v0.99-g Aide pour l'utilisation de LaTeX au collège]
 
 \RequirePackage{verbatim}
 
@@ -99,6 +99,8 @@
 \RequirePackage{stackengine}
 \RequirePackage[thicklines]{cancel}
 
+\RequirePackage{fontawesome5}%Pour l'environnement Twitter
+
 \RequirePackage{nicematrix}%pour le tableur
 
 \let\myoldmulticolumn\multicolumn
@@ -155,6 +157,17 @@
 \end{tikzpicture}%
 }
 
+\newcommand\LogoTW[2]{%
+\setbox1=\hbox{\includegraphics[scale=#2]{#1}}
+\begin{tikzpicture}%
+  \clip (0,0) circle (4mm);
+  \draw (0,0) circle (4mm);
+  \node[xshift=0mm, yshift=0mm, inner xsep=0pt, inner ysep=0pt] (0,0) {%
+    \includegraphics[scale=#2]{#1}%
+  };%
+\end{tikzpicture}%
+}%
+
 \makeatletter
 \def\Dotfill{%
 \leavevmode
@@ -506,6 +519,166 @@
 }
 
 %%%
+% Twitter
+%%%
+\setKVdefault[Twitter]{Largeur=0.95\linewidth,Auteur=Christophe,Date=\today,Url=ViveLaTeX,EchelleLogo=0.035,Logo=DrStrange,Publie=false}
+
+\NewEnviron{Twitter}[1][]{%
+  \useKVdefault[Twitter]%
+  \setKV[Twitter]{#1}%
+  \xdef\EchelleLogo{\useKV[Twitter]{EchelleLogo}}%
+  \begin{tcolorbox}[%
+    enhanced,%
+    overlay unbroken and first={%
+      \node[anchor=west,xshift=3em,yshift=-2em] at (frame.north west) {\textbf{\useKV[Twitter]{Auteur}}~{\color{gray}@\ttfamily \useKV[Twitter]{Url} - \useKV[Twitter]{Date}}};
+      \node[anchor=center,xshift=1em+2mm,yshift=-2em] at (frame.north west) {\LogoTW{\useKV[Twitter]{Logo}}{\EchelleLogo}};
+      \node[xshift=-1em,yshift=-2em] at (frame.north east) {\color{gray}...};
+      \coordinate[yshift=1em] (A) at (frame.south west);
+      \coordinate[yshift=1em] (B) at (frame.south east);
+      \node[] (C1) at ($(A)!0.1!(B)$) {\faComment[regular]\ifboolKV[Twitter]{Publie}{~\fpeval{randint(1,10)}}{}};
+      \node[] (C2) at ($(A)!0.325!(B)$) {\faRetweet\ifboolKV[Twitter]{Publie}{~\fpeval{randint(1,10)}}{}};
+      \node[] (C3) at ($(A)!0.55!(B)$) {\faHeart[regular]\ifboolKV[Twitter]{Publie}{~\fpeval{randint(1,10)}}{}};
+      \node[] (C4) at ($(A)!0.775!(B)$) {\faShareSquare};
+    },
+    colback=white,
+    colframe=gray!15,
+    top=2em,
+    left=3em,
+    bottom=2em]
+    \vspace*{0.5em}\par
+    \BODY%
+  \end{tcolorbox}
+}
+
+%%%
+% Facebook
+%%%
+\setKVdefault[Facebook]{Largeur=0.95\linewidth,Auteur=Christophe,Date=\today,Heure=3:14,EchelleLogo=0.035,Logo=DrStrange,Publie=false}
+
+\NewEnviron{Facebook}[1][]{%
+  \useKVdefault[Facebook]%
+  \setKV[Facebook]{#1}%
+  \xdef\EchelleLogo{\useKV[Facebook]{EchelleLogo}}%
+  \begin{tcolorbox}[%
+    enhanced,%
+    overlay unbroken and first={%
+      \node[anchor=west,xshift=3em,yshift=-1em] at (frame.north west) {\textbf{\useKV[Facebook]{Auteur}}};
+      \node[anchor=west,xshift=3em,yshift=-2em] at (frame.north west) {\scriptsize\color{gray}\useKV[Facebook]{Date}, \useKV[Facebook]{Heure}};
+      \node[anchor=center,xshift=1em+2mm,yshift=-1.5em] at (frame.north west) {\LogoTW{\useKV[Facebook]{Logo}}{\EchelleLogo}};
+      \node[xshift=-1em,yshift=-1.5em] at (frame.north east) {\bfseries\color{gray}...};
+      \coordinate[yshift=1.15em] (A) at (frame.south west);
+      \coordinate[yshift=1.15em] (B) at (frame.south east);
+      \coordinate[xshift=0.5em,yshift=1.8em] (A1) at (frame.south west);
+      \coordinate[xshift=-0.5em,yshift=1.8em] (B1) at (frame.south east);
+      \coordinate[xshift=0.5em,yshift=0.5em] (A2) at (frame.south west);
+      \coordinate[xshift=-0.5em,yshift=0.5em] (B2) at (frame.south east);
+      \ifboolKV[Facebook]{Publie}{%
+        \coordinate[xshift=1em,yshift=1em] (A3) at (A1);
+        \draw[blue,fill=blue] (A3) circle (1.5mm);
+        \node[] at (A3) {\tiny\color{white}\faThumbsUp};
+        \node[anchor=west] at (A3) {~\scriptsize\fpeval{randint(1,150)}};
+        \node[anchor=east,xshift=-1em,yshift=1em] at (B1) {\scriptsize\fpeval{randint(2,20)} commentaires~\fpeval{randint(2,10)} partages};
+      }{}
+      \draw[gray] (A1)--(B1);
+      \draw[gray] (A2)--(B2);
+      \node[] (C1) at ($(A)!0.15!(B)$) {\footnotesize\faThumbsUp{}~\bfseries J'aime};
+      \node[] (C2) at ($(A)!0.5!(B)$) {\footnotesize\faComment*[regular]~\bfseries Commenter};     \node[] (C3) at ($(A)!0.85!(B)$) {\footnotesize\faShareSquare~\bfseries Partager};
+    },
+    colback=white,
+    colframe=gray!15,
+    top=2em,
+    left=3em,
+    bottom=4em]
+    %\vspace*{0.5em}\par
+    \BODY%
+  \end{tcolorbox}
+}
+
+%%%
+% Instagram
+%%%
+\setKVdefault[Instagram]{Largeur=0.95\linewidth,Auteur=Christophe,Expediteur=Pierre,Date=\today,Temps=34,Publie=false,Logo=DrStrange,LogoEx=tiger,EchelleLogo=0.035,Texte={}}
+
+\NewEnviron{Instagram}[1][]{%
+  \useKVdefault[Instagram]%
+  \setKV[Instagram]{#1}%
+  \xdef\EchelleLogo{\useKV[Instagram]{EchelleLogo}}%
+  \begin{tcolorbox}[%
+    enhanced,%
+    underlay unbroken and first={%
+      \node[anchor=west,xshift=3em,yshift=-1.5em] at (frame.north west) {\textbf{\useKV[Instagram]{Expediteur}}};
+      \node[anchor=center,xshift=1em+2mm,yshift=-1.5em] at (frame.north west) {\LogoTW{\useKV[Instagram]{LogoEx}}{\EchelleLogo}};
+      \node[xshift=-1em,yshift=-1.5em,rotate=90] at (frame.north east) {\bfseries\color{gray}...};
+      \coordinate[yshift=-3em] (HA) at (frame.north west);
+      \coordinate[yshift=-3em] (HB) at (frame.north east);
+      \draw[gray!15] (HA)--(HB);
+      \coordinate[yshift=7em] (BA) at (frame.south west);
+      \coordinate[yshift=7em] (BB) at (frame.south east);
+      \draw[gray!15] (BA)--(BB);
+      \coordinate[xshift=1em,yshift=6em] (A) at (frame.south west);
+      \node[anchor=west] at (A) {\bfseries\faHeart[regular]\quad\faComment[regular]\quad\faPaperPlane};
+      \coordinate[xshift=-1em,yshift=6em] (A1) at (frame.south east);
+      \node[anchor=east] at (A1) {\bfseries\faBookmark[regular]};
+      \coordinate[xshift=1em,yshift=5em] (B) at (frame.south west);
+      \node[anchor=west] at (B) {\footnotesize\bfseries\fpeval{randint(10,30)} J'aime};
+      \coordinate[xshift=1em,yshift=4em] (C) at (frame.south west);
+      \node[anchor=west] at (C) {\textbf{\useKV[Instagram]{Expediteur}}~\useKV[Instagram]{Texte}};
+      \node[anchor=center,xshift=2em,yshift=2.25em] at (frame.south west) {\LogoTW{\useKV[Instagram]{Logo}}{\EchelleLogo}};
+      \node[anchor=west,xshift=4em,yshift=2.25em] at (frame.south west) {\textcolor{gray!50}{Ajouter un commentaire\dots}};
+      \node[anchor=east,xshift=-1em,yshift=2.25em] at (frame.south east) {\textcolor{red}{\faHeart}\quad\textcolor{Gold}{\faHandSpock}\quad\textcolor{gray!50}{\faPlusCircle}};
+      \node[anchor=west,xshift=1em,yshift=0.5em] at (frame.south west) {\scriptsize\color{gray} Il y a \useKV[Instagram]{Temps} secondes};
+    },
+    colback=white,
+    colframe=gray!15,
+    top=3em,
+    left=3em,
+    bottom=7em]
+    \BODY%
+  \end{tcolorbox}
+}
+
+%%%
+% Snapchat
+%%%
+\setKVdefault[Snapchat]{Largeur=0.95\linewidth,Auteur=Christophe,Date=\today,Temps=34,Logo=DrStrange,EchelleLogo=0.035,Texte=Envoyer un Chat}
+
+\NewEnviron{Snapchat}[1][]{%
+  \useKVdefault[Snapchat]%
+  \setKV[Snapchat]{#1}%
+  \xdef\EchelleLogo{\useKV[Snapchat]{EchelleLogo}}%
+  \begin{tcolorbox}[%
+    enhanced,%
+    underlay unbroken and first={%
+      \node[anchor=west,xshift=3em,yshift=-1em] at (frame.north west) {\textbf{\useKV[Snapchat]{Auteur}}};
+      \node[anchor=west,xshift=3em,yshift=-2em] at (frame.north west) {\scriptsize\color{gray} il y a \useKV[Snapchat]{Temps}~min};
+      \node[anchor=center,xshift=1em+2mm,yshift=-1.5em] at (frame.north west) {\LogoTW{\useKV[Snapchat]{Logo}}{\EchelleLogo}};
+      \node[xshift=-1em,yshift=-1.5em,rotate=90] at (frame.north east) {\bfseries...};
+      \node[xshift=-3em,yshift=-1.5em] at (frame.north east) {\faBell[regular]};
+      \coordinate[xshift=2em,yshift=2em] (P1) at (frame.south west);
+      \coordinate[xshift=4.5em,yshift=2em] (P2) at (frame.south west);
+      \coordinate[xshift=-3em,yshift=2em] (P4) at (frame.south west);
+      \coordinate[xshift=-2em,yshift=2em] (P3) at (frame.south east);
+      \coordinate[xshift=4.5em,yshift=1em] (P5) at (frame.south west);
+      \coordinate[xshift=4.5em,yshift=3em] (P8) at (frame.south west);
+      \coordinate[xshift=-4.5em,yshift=1em] (P6) at (frame.south east);
+      \coordinate[xshift=-4.5em,yshift=3em] (P7) at (frame.south east);
+      \draw (P1) circle (1em);
+      \node at (P1) {\faCamera};
+      \draw (P3) circle (1em);
+      \node[xshift=-0.125em,rotate=-45] at (P3) {\faLocationArrow};
+      \node[anchor=west,inner sep=0pt] at (P2) {\useKV[Snapchat]{Texte}};
+      \draw (P5) -- (P6) arc(270:450:1em) -- (P7) -- (P8) arc(90:270:1em) -- cycle;
+    },
+    colback=white,
+    colframe=gray!15,
+    top=3em,
+    left=3em,
+    bottom=3em]
+    \BODY%
+  \end{tcolorbox}
+}
+
+%%%
 % Bon de sortie
 %%%
 \newtcolorbox{Sortie}{%
@@ -1189,6 +1362,151 @@
 }
 
 %%%
+% Triominos
+%%%
+\setKVdefault[ClesTriomino]{Longueur=5cm,Etages=3,AffichagePiece=false}
+\defKV[ClesTriomino]{Piece=\setKV[ClesTriomino]{AffichagePiece=true}}%
+
+\def\TraceTriomino#1{%
+  \ifluatex
+  \mplibforcehmode
+  \begin{mplibcode}
+    u:=\useKV[ClesTriomino]{Longueur};
+    Rayon:=0.75*u*sqrt(3)/6;
+    Etages:=\useKV[ClesTriomino]{Etages};
+    pair A,B,C,D,E,F;
+    A=(0,0);
+    B-A=Etages*u*(1,0);
+    C=rotation(B,A,60);
+    D=(1/Etages)[C,A];
+    E=(1/Etages)[C,B];
+    F=C;
+    trace polygone(A,B,C);
+    for k=1 upto Etages-1:
+    trace (k/Etages)[C,A]--(k/Etages)[C,B];
+    trace (k/Etages)[A,C]--(k/Etages)[A,B];
+    trace (k/Etages)[B,A]--(k/Etages)[B,C];
+    endfor;
+    pair G[];color H[];%Couleur pour garder l'orientation des textes...
+    G[1]=iso(D,E,F);
+    H1=blue;
+    n=1;
+    for k=1 upto Etages-1:
+    for l=0 upto (2*k):
+    n:=n+1;
+    if (l mod 2=0):
+    G[n]=G[1] shifted(k*(D-F)+(l div 2)*(E-D));
+    H[n]=blue;
+    else:
+    G[n]=symetrie(G[1],D,E) shifted((k-1)*(D-F)+(l div 2)*(E-D));
+    H[n]=green;
+    fi;
+    endfor;
+    endfor;
+    % affichage des textes
+    nba=0;
+    for p_=#1:
+    if (nba mod 3)=1:
+    if H[(nba div 3)+1]=blue:
+    label(TEX(p_) rotated 120,pointarc(cercles(G[(nba div 3)+1],Rayon),30));
+    else:
+    label(TEX(p_) rotated 180,pointarc(cercles(G[(nba div 3)+1],Rayon),90));
+    fi;
+    elseif (nba mod 3)=2:
+    if H[(nba div 3)+1]=blue:
+    label(TEX(p_),pointarc(cercles(G[(nba div 3)+1],Rayon),270));
+    else:
+    label(TEX(p_) rotated 60,pointarc(cercles(G[(nba div 3)+1],Rayon),330));
+    fi;
+    else:
+    if H[(nba div 3)+1]=blue:
+    label(TEX(p_) rotated 240,pointarc(cercles(G[(nba div 3)+1],Rayon),150));
+    else:
+    label(TEX(p_) rotated 300,pointarc(cercles(G[(nba div 3)+1],Rayon),210));
+    fi;
+    fi;
+    nba:=nba+1;
+    endfor;
+  \end{mplibcode}
+  \else
+  \begin{mpost}[mpsettings={u:=\useKV[ClesTriomino]{Longueur}; Etages:=\useKV[ClesTriomino]{Etages};}]
+    Rayon:=0.75*u*sqrt(3)/6;
+    pair A,B,C,D,E,F;
+    A=(0,0);
+    B-A=Etages*u*(1,0);
+    C=rotation(B,A,60);
+    D=(1/Etages)[C,A];
+    E=(1/Etages)[C,B];
+    F=C;
+    trace polygone(A,B,C);
+    for k=1 upto Etages-1:
+    trace (k/Etages)[C,A]--(k/Etages)[C,B];
+    trace (k/Etages)[A,C]--(k/Etages)[A,B];
+    trace (k/Etages)[B,A]--(k/Etages)[B,C];
+    endfor;
+    pair G[];color H[];%Couleur pour garder l'orientation des textes...
+    G[1]=iso(D,E,F);
+    H1=blue;
+    n=1;
+    for k=1 upto Etages-1:
+    for l=0 upto (2*k):
+    n:=n+1;
+    if (l mod 2=0):
+    G[n]=G[1] shifted(k*(D-F)+(l div 2)*(E-D));
+    H[n]=blue;
+    else:
+    G[n]=symetrie(G[1],D,E) shifted((k-1)*(D-F)+(l div 2)*(E-D));
+    H[n]=green;
+    fi;
+    endfor;
+    endfor;
+    % affichage des textes
+    nba=0;
+    for p_=#1:
+    if (nba mod 3)=1:
+    if H[(nba div 3)+1]=blue:
+    label(LATEX(p_) rotated 120,pointarc(cercles(G[(nba div 3)+1],Rayon),30));
+    else:
+    label(LATEX(p_) rotated 180,pointarc(cercles(G[(nba div 3)+1],Rayon),90));
+    fi;
+    elseif (nba mod 3)=2:
+    if H[(nba div 3)+1]=blue:
+    label(LATEX(p_),pointarc(cercles(G[(nba div 3)+1],Rayon),270));
+    else:
+    label(LATEX(p_) rotated 60,pointarc(cercles(G[(nba div 3)+1],Rayon),330));
+    fi;
+    else:
+    if H[(nba div 3)+1]=blue:
+    label(LATEX(p_) rotated 240,pointarc(cercles(G[(nba div 3)+1],Rayon),150));
+    else:
+    label(LATEX(p_) rotated 300,pointarc(cercles(G[(nba div 3)+1],Rayon),210));
+    fi;
+    fi;
+    nba:=nba+1;
+    endfor;    
+  \end{mpost}
+  \fi
+}
+
+\newtoks\toklisteTriomino%
+\def\UpdatetoksTriomino#1\nil{\addtotok\toklisteTriomino{"#1",}}%
+  
+\newcommand\Triomino[2][]{%
+  \useKVdefault[ClesTriomino]%
+  \setKV[ClesTriomino]{#1}%
+  \setsepchar{§}%\ignoreemptyitems%
+  \readlist*\ListeTriominos{#2}%
+  \toklisteTriomino{}
+  \ifboolKV[ClesTriomino]{AffichagePiece}{%
+    \setKV[ClesTriomino]{Etages=1}%
+    \TraceTriomino{"\ListeTriominos[\fpeval{3*\useKV[ClesTriomino]{Piece}-2}]","\ListeTriominos[\fpeval{3*\useKV[ClesTriomino]{Piece}-1}]","\ListeTriominos[\fpeval{3*\useKV[ClesTriomino]{Piece}}]"}%
+  }{%
+    \foreachitem\compteur\in\ListeTriominos{\expandafter\UpdatetoksTriomino\compteur\nil}%
+    \TraceTriomino{\the\toklisteTriomino}%
+  }%
+}%
+
+%%%
 % Labyrinthe Nombre
 %%%
 
@@ -3042,6 +3360,76 @@
 }%
 
 %%%
+% Rapido
+%%%
+%% D'après https://www.facebook.com/groups/994675223903586/user/100017057226847
+%% et une programmation de Laurent Lassale-Carrere
+\newcounter{nexo}
+\newtcolorbox[use counter=nexo,number format=\arabic]{RapidoBox}{%
+  % Titre
+  colbacktitle=white,
+  fonttitle=\color{black}\Large\bfseries,
+  toptitle=1mm,
+  bottomtitle=1mm,
+  bottom=1mm,
+  title={Rapido n°\thetcbcounter\hfill Date :\hspace*{2.5cm}},
+  %% Cadre principal
+  enhanced,
+  %nobeforeafter,
+  width=\WidthRapido,
+  colback=white,
+  valign=top,
+  drop lifted shadow%,
+  %grow to left by=5mm
+}
+\newtcolorbox{QuestionBox}{enhanced,nobeforeafter,size=small,sidebyside adapt=left}
+\newtcolorbox{QuestionReponse}{enhanced,nobeforeafter,upperbox=invisible,colback=white,width=1.5cm,grow to left by=3mm,grow to right by=3mm,height=10mm}
+
+\setKVdefault[ClesRapido]{Debut=false,Largeur=0.9\linewidth}%
+\defKV[ClesRapido]{Numero=\setKV[ClesRapido]{Debut=true}}
+
+\newlength{\WidthRapido}
+
+\newcommand\Rapido[2][]{% numéro
+\useKVdefault[ClesRapido]%
+\setKV[ClesRapido]{#1}%
+%
+\ifboolKV[ClesRapido]{Debut}{%
+  \setcounter{nexo}{\fpeval{\useKV[ClesRapido]{Numero}-1}}
+}{}%
+\setlength{\WidthRapido}{\useKV[ClesRapido]{Largeur}}%
+%
+\setsepchar[*]{§*/}%
+\readlist*\ListeRapido{#2}%
+\begin{RapidoBox}
+	\xintFor* ##1 in {\xintSeq {1}{\ListeRapidolen}}\do{%
+	 \tcbsidebyside[
+	 sidebyside adapt=right,
+	 bicolor,
+	 colback=white,colbacklower=yellow!10!white,
+	 nobeforeafter,
+	 top=0mm,left=1mm,
+	 grow to left by=3mm,
+	 grow to right by=3mm,
+	 bottom=0mm,
+	 ]{%
+	 \ListeRapido[##1,1]
+    }{%
+      \ListeRapido[##1,2]
+    }
+}
+\end{RapidoBox}
+}
+
+\newcommand\BoiteRapido[1]{%
+  \ifx\bla#1\bla%
+  \tcbox[BoiteExpression]{\phantom{100000}}%
+  \else
+  \tcbox[BoiteExpression]{#1}%
+  \fi
+}
+
+%%%
 % Fractions
 %%%
 \setKVdefault[ClesFraction]{Rayon=2cm,Disque,Regulier=false,Segment=false,Rectangle=false,Longueur=5cm,Largeur=2cm,Cotes=5,Triangle=false,Parts=3,Couleur=green,Reponse=false,Multiple=1,Hachures=false,Epaisseur=1}
@@ -4454,7 +4842,7 @@
 %%%
 % 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,ValeurA=0,ValeurB=0,ValeurC=0,Perso=false}
+\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,ValeurA=0,ValeurB=0,ValeurC=0,Perso=false,AllPerso=false}
 
 % On d\'efinit les figures \`a utiliser
 \def\MPFigurePytha#1#2#3#4#5#6{%
@@ -4635,9 +5023,13 @@
   \fi
 }
 
-\newcommand\RedactionPythagore{}
+\newcommand\RedactionPythagore{}%
+\newcommand\RedactionReciPythagore{}%
+\newcommand\RedactionCalculsPythagore{}%
+\newcommand\RedactionCalculsReciPythagore{}%
+\newcommand\RedactionConclusionReciPythagore{}%
 
-\newcommand{\Pythagore}[5][]{%
+\newcommand\Pythagore[5][]{%
   % #1 Param\`etres sous forme de cl\'es
   % #2 Nom "complet" du triangle : ABC par exemple
   % #3 Premi\`ere longueur
@@ -4650,10 +5042,14 @@
     \StrMid{#2}{1}{1}[\NomA]%
     \StrMid{#2}{2}{2}[\NomB]%
     \StrMid{#2}{3}{3}[\NomC]%
+    \xdef\NomTriangle{\NomA\NomB\NomC}%
     % on stocke les valeurs donn\'ees
     \opcopy{#3}{A1}%
     \opcopy{#4}{A2}%
     \opcopy{#5}{A3}%
+    \xdef\GrandCote{#3}%
+    \xdef\PetitCote{#4}%
+    \xdef\MoyenCote{#5}%
     % On trace une figure ou pas ?
     \ifboolKV[ClesPythagore]{FigureSeule}{%
       \MPFigureReciPytha{\NomA}{\NomB}{\NomC}{#3}{#4}{#5}{\useKV[ClesPythagore]{Angle}}%
@@ -4663,8 +5059,56 @@
           {\em La figure est donn\'ee \`a titre indicatif.}%
           \[\MPFigureReciPytha{\NomA}{\NomB}{\NomC}{#3}{#4}{#5}{\useKV[ClesPythagore]{Angle}}\]%
           \par\columnbreak\par%
-          % on r\'edige
-          Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
+          \ifboolKV[ClesPythagore]{AllPerso}{%
+            \RedactionReciPythagore%
+            \RedactionCalculsReciPythagore%
+            \RedactionConclusionReciPythagore%
+          }{%
+            % on r\'edige
+            \ifboolKV[ClesPythagore]{Perso}{%
+              \RedactionReciPythagore%
+            }{%
+              Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
+            }
+            \ifboolKV[ClesPythagore]{ReciColonnes}{%
+              \[
+                \begin{array}{cccc|cccc}
+                  &&\NomA\NomC^2&&&\NomA\NomB^2&+&\NomB\NomC^2\\
+                  &&\opexport{A1}{\Aun}\num{\Aun}^2&&&\opexport{A2}{\Adeux}\num{\Adeux}^2&+&\opexport{A3}{\Atrois}\num{\Atrois}^2\\
+                  &&\opmul*{A1}{A1}{a1}&&&\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}&+&\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}\\
+                  &&\opexport{a1}{\Aun}\num{\Aun}&&&\multicolumn{3}{c}{\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}}\\
+                \end{array}
+              \]
+            }{%
+              \[\left.
+                  \begin{array}{l}
+                    \NomA\NomC^2=\opexport{A1}{\Aun}\num{\Aun}^2=\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}\\
+                    \\
+                    \NomA\NomB^2+\NomB\NomC^2=\opexport{A2}{\Adeux}\num{\Adeux}^2+\opexport{A3}{\Atrois}\num{\Atrois}^2=\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}+\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}=\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}\\
+                  \end{array}
+                \right\}\opcmp{a1}{a4}\ifopeq\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2\fi\opcmp{a1}{a4}\ifopneq\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2\fi
+              \]
+            }
+            \ifboolKV[ClesPythagore]{Egalite}{%
+              \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee. Donc le triangle $#2$ est rectangle en $\NomB$.\fi%
+              \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore n'est pas v\'erifi\'ee. Donc le triangle $#2$ n'est pas rectangle.\fi%
+            }{%
+              \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors le triangle $#2$ est rectangle
+              en $\NomB$ d'apr\`es la r\'eciproque du th\'eor\`eme de Pythagore.\fi%
+              \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors le
+              triangle $#2$ n'est pas rectangle\ifboolKV[ClesPythagore]{Faible}{.}{ d'apr\`es la contrapos\'ee du th\'eor\`eme de Pythagore.}\fi%
+            }
+          }
+        \end{multicols}
+      }{%
+        \ifboolKV[ClesPythagore]{AllPerso}{%
+          \RedactionReciPythagore%
+          \RedactionCalculsReciPythagore%
+          \RedactionConclusionReciPythagore%
+        }{%
+          \ifboolKV[ClesPythagore]{Perso}{\RedactionReciPythagore}{%
+            Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
+          }
           \ifboolKV[ClesPythagore]{ReciColonnes}{%
             \[
               \begin{array}{cccc|cccc}
@@ -4683,7 +5127,7 @@
                 \end{array}
               \right\}\opcmp{a1}{a4}\ifopeq\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2\fi\opcmp{a1}{a4}\ifopneq\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2\fi
             \]
-          }
+          }%
           \ifboolKV[ClesPythagore]{Egalite}{%
             \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee. Donc le triangle $#2$ est rectangle en $\NomB$.\fi%
             \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore n'est pas v\'erifi\'ee. Donc le triangle $#2$ n'est pas rectangle.\fi%
@@ -4692,38 +5136,8 @@
             en $\NomB$ d'apr\`es la r\'eciproque du th\'eor\`eme de Pythagore.\fi%
             \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors le
             triangle $#2$ n'est pas rectangle\ifboolKV[ClesPythagore]{Faible}{.}{ d'apr\`es la contrapos\'ee du th\'eor\`eme de Pythagore.}\fi%
-          }
-        \end{multicols}
-      }{%
-        Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
-        \ifboolKV[ClesPythagore]{ReciColonnes}{%
-          \[
-            \begin{array}{cccc|cccc}
-              &&\NomA\NomC^2&&&\NomA\NomB^2&+&\NomB\NomC^2\\
-              &&\opexport{A1}{\Aun}\num{\Aun}^2&&&\opexport{A2}{\Adeux}\num{\Adeux}^2&+&\opexport{A3}{\Atrois}\num{\Atrois}^2\\
-              &&\opmul*{A1}{A1}{a1}&&&\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}&+&\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}\\
-              &&\opexport{a1}{\Aun}\num{\Aun}&&&\multicolumn{3}{c}{\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}}\\
-            \end{array}
-          \]
-        }{%
-          \[\left.
-              \begin{array}{l}
-                \NomA\NomC^2=\opexport{A1}{\Aun}\num{\Aun}^2=\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}\\
-                \\
-                \NomA\NomB^2+\NomB\NomC^2=\opexport{A2}{\Adeux}\num{\Adeux}^2+\opexport{A3}{\Atrois}\num{\Atrois}^2=\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}+\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}=\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}\\
-              \end{array}
-            \right\}\opcmp{a1}{a4}\ifopeq\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2\fi\opcmp{a1}{a4}\ifopneq\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2\fi
-          \]
+          }%
         }%
-        \ifboolKV[ClesPythagore]{Egalite}{%
-          \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee. Donc le triangle $#2$ est rectangle en $\NomB$.\fi%
-          \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore n'est pas v\'erifi\'ee. Donc le triangle $#2$ n'est pas rectangle.\fi%
-        }{%
-          \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors le triangle $#2$ est rectangle
-          en $\NomB$ d'apr\`es la r\'eciproque du th\'eor\`eme de Pythagore.\fi%
-          \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors le
-          triangle $#2$ n'est pas rectangle\ifboolKV[ClesPythagore]{Faible}{.}{ d'apr\`es la contrapos\'ee du th\'eor\`eme de Pythagore.}\fi%
-        }%
       }%
     }%
   }{%
@@ -4731,6 +5145,13 @@
     \opcopy{#3}{A1}%
     \opcopy{#4}{A2}%
     \opcopy{\useKV[ClesPythagore]{Precision}}{pres}%
+    \xintifboolexpr{#3<#4 || #3==#4}{
+      \xdef\PetitCote{#3}%
+      \xdef\MoyenCote{#4}%
+    }{%
+      \xdef\GrandCote{#3}%
+      \xdef\MoyenCote{#4}%
+    }
     % On retient les noms des sommets
     \StrMid{#2}{1}{1}[\NomA]%
     \StrMid{#2}{2}{2}[\NomB]%
@@ -4754,12 +5175,55 @@
           \[\MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}\]
           \par\columnbreak\par%
           % On d\'emarre la r\'esolution
+          \ifboolKV[ClesPythagore]{AllPerso}{%
+            \RedactionPythagore%
+            \RedactionCalculsPythagore%
+          }{%
+            \ifboolKV[ClesPythagore]{Perso}{%
+              \RedactionCalculsPythagore%
+            }{%
+              \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 :%
+              }%
+            }
+            \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
+              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+              % \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+              \begin{align*}
+                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+              \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+              \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                               \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
+                }%
+              \end{align*}
+            }{%\else%
+              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
+              \begin{align*}
+                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+                \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+                \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                                 \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
+                }%
+              \end{align*}
+            }%\fi%
+          }
+        \end{multicols}
+      }{%
+        % On d\'emarre la r\'esolution
+        \ifboolKV[ClesPythagore]{AllPerso}{%
+          \RedactionPythagore%
+          \RedactionCalculsPythagore%
+        }{%
           \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 :%
-            }%
-          }%
+            }}%
           \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
             \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
-            %\xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
             \begin{align*}
               \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
               \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
@@ -4767,67 +5231,37 @@
               \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
               \ifboolKV[ClesPythagore]{AvantRacine}{}{%
               \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-            \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
-              }%
+                                                               \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
+              }
             \end{align*}
-          }{%\else%
+          }{%\else
             \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
-            \begin{align*}
-              \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
-              \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-              \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-              \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-              \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-              \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-              \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-            \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
-              }%
-            \end{align*}
+            \ifboolKV[ClesPythagore]{Soustraction}{%
+              \begin{align*}
+                \NomA\NomB^2&=\NomA\NomC^2-\NomB\NomC^2\\
+                \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}-\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+                \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+                \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                                 \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
+                }
+              \end{align*}
+            }{%
+              \begin{align*}
+                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+                \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+                \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}%
+                                                                 \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
+                }
+              \end{align*}
+            }%
           }%\fi%
-        \end{multicols}
-      }{%
-        % On d\'emarre la r\'esolution
-        \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 :%
-        }}%
-        \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
-          \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
-          \begin{align*}
-            \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
-            \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-            \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-            \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-          \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-            \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-          \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
-            }
-          \end{align*}
-        }{%\else
-          \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
-          \ifboolKV[ClesPythagore]{Soustraction}{%
-            \begin{align*}
-              \NomA\NomB^2&=\NomA\NomC^2-\NomB\NomC^2\\
-              \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}-\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-              \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-              \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-              \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-              \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-                                                               \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
-              }
-            \end{align*}
-          }{%
-            \begin{align*}
-              \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
-              \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-              \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-              \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-              \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-              \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-              \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}%
-                                                               \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}~\text{\useKV[ClesPythagore]{Unite}}}}%\\
-              }
-            \end{align*}
-          }%
-        }%\fi%
+        }%
       }%
     }%
   }%
@@ -6853,7 +7287,7 @@
   \ppcm=\numexpr#1*#2/\pgcd\relax
 }
 
-\setKVdefault[ClesThales]{Calcul=true,Droites=false,Propor=false,Segment=false,Figure=false,FigureSeule=false,Figurecroisee=false,FigurecroiseeSeule=false,Angle=0,Precision=2,Entier=false,Unite=cm,Reciproque=false,Produit=false,ChoixCalcul=0,Simplification,Redaction=false,Remediation=false,Echelle=1cm}
+\setKVdefault[ClesThales]{Calcul=true,Droites=false,Propor=false,Segment=false,Figure=false,FigureSeule=false,Figurecroisee=false,FigurecroiseeSeule=false,Angle=0,Precision=2,Entier=false,Unite=cm,Reciproque=false,Produit=false,ChoixCalcul=0,Simplification,Redaction=false,Remediation=false,Echelle=1cm,Perso=false,CalculsPerso=false}
 
 %On d\'efinit la figure \`a utiliser
 \def\MPFigThales#1#2#3#4#5#6{
@@ -6862,6 +7296,7 @@
     % #3 Troisi\`eme sommet
     % #4 point sur le segment #1#2
     % #5 point sur le segment #1#3
+    % #6 angle de rotation
   \ifluatex
   \mplibcodeinherit{enable}
   \mplibforcehmode
@@ -7263,33 +7698,39 @@
   \fi
 }
 
+\newcommand\RedactionThales{}%
+\newcommand\EcritureCalculs{}%
+\newcommand\EcritureQuotients{}%
+
 %%%
 \newcommand{\TTThales}[6][]{%
   \useKVdefault[ClesThales]%
   \setKV[ClesThales]{#1}%
-  \ifboolKV[ClesThales]{Droites}{%
-    Les droites \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#3#5)$} et \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#4#6)$} sont s\'ecantes en \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$#2$}.%
-  }{%
-    Dans le triangle \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$#2#3#4$}, \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{$#5$} est un point \ifboolKV[ClesThales]{Segment}{du segment}{de la
-      droite}
-    \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{\ifboolKV[ClesThales]{Segment}{$[#2#3]$}{$(#2#3)$}},
-    \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{$#6$} est un
-    point \ifboolKV[ClesThales]{Segment}{du segment}{de la droite}
-    \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{\ifboolKV[ClesThales]{Segment}{$[#2#4]$}{$(#2#4)$}}.%
-  }
-  \\Comme les droites \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#5#6)$} et \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#3#4)$} sont parall\`eles, alors \ifboolKV[ClesThales]{Propor}{le tableau%
-    \[\begin{array}{c|c|c}
-        \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#5}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#6}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#5#6}\\
-        \hline
-        \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#3}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#4}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#3#4}\\
-      \end{array}
-    \]
-    est un tableau de proportionnalit\'e\ifboolKV[ClesThales]{Segment}{.}{ d'apr\`es le th\'eor\`eme de Thal\`es.}%
-  }{%
-    \ifboolKV[ClesThales]{Segment}{on a :}{le th\'eor\`eme de Thal\`es permet d'\'ecrire :}%
-    \[\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#5}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#3}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#6}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#4}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#5#6}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#3#4}}\]%
-  }
-}
+  \ifboolKV[ClesThales]{Perso}{\RedactionThales}{%
+    \ifboolKV[ClesThales]{Droites}{%
+      Les droites \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#3#5)$} et \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#4#6)$} sont s\'ecantes en \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$#2$}.%
+    }{%
+      Dans le triangle \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$#2#3#4$}, \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{$#5$} est un point \ifboolKV[ClesThales]{Segment}{du segment}{de la
+        droite}
+      \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{\ifboolKV[ClesThales]{Segment}{$[#2#3]$}{$(#2#3)$}},
+      \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{$#6$} est un
+      point \ifboolKV[ClesThales]{Segment}{du segment}{de la droite}
+      \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{\ifboolKV[ClesThales]{Segment}{$[#2#4]$}{$(#2#4)$}}.%
+    }
+    \\Comme les droites \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#5#6)$} et \ifboolKV[ClesThales]{Remediation}{\pointilles[2cm]}{$(#3#4)$} sont parall\`eles, alors \ifboolKV[ClesThales]{Propor}{le tableau%
+      \[\begin{array}{c|c|c}
+          \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#5}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#6}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#5#6}\\
+          \hline
+          \ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#3}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#4}&\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#3#4}\\
+        \end{array}
+      \]
+      est un tableau de proportionnalit\'e\ifboolKV[ClesThales]{Segment}{.}{ d'apr\`es le th\'eor\`eme de Thal\`es.}%
+    }{%
+      \ifboolKV[ClesThales]{Segment}{on a :}{le th\'eor\`eme de Thal\`es permet d'\'ecrire :}%
+      \[\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#5}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#3}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#6}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#2#4}}=\frac{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#5#6}}{\ifboolKV[ClesThales]{Remediation}{\pointilles[1cm]}{#3#4}}\]%
+    }%
+  }%
+}%
 
 \newcommand{\TThalesCalculsD}[8][]{%
   \setKV[ClesThales]{#1}%
@@ -7422,23 +7863,30 @@
 \ifboolKV[ClesThales]{Calcul}{%
   %%%%%%%%%%%%%%%%%%%%%%%%%%%
   On remplace par les longueurs connues :%
-  \ifboolKV[ClesThales]{Propor}{%
-    \[\begin{array}{c|c|c}
-        \IfDecimal{#3}{\num{#3}}{#3}&\IfDecimal{#4}{\num{#4}}{#4}&\IfDecimal{#5}{\num{#5}}{#5}\\
-        \hline
-        \IfDecimal{#6}{\num{#6}}{#6}&\IfDecimal{#7}{\num{#7}}{#7}&\IfDecimal{#8}{\num{#8}}{#8}
-      \end{array}
-    \]
+  \ifboolKV[ClesThales]{CalculsPerso}{%
+    \EcritureQuotients%
   }{%
-    \[\frac{\IfDecimal{#3}{\num{#3}}{#3}}{\IfDecimal{#6}{\num{#6}}{#6}}=\frac{\IfDecimal{#4}{\num{#4}}{#4}}{\IfDecimal{#7}{\num{#7}}{#7}}=\frac{\IfDecimal{#5}{\num{#5}}{#5}}{\IfDecimal{#8}{\num{#8}}{#8}}\]
+    \ifboolKV[ClesThales]{Propor}{%
+      \[\begin{array}{c|c|c}
+          \IfDecimal{#3}{\num{#3}}{#3}&\IfDecimal{#4}{\num{#4}}{#4}&\IfDecimal{#5}{\num{#5}}{#5}\\
+          \hline
+          \IfDecimal{#6}{\num{#6}}{#6}&\IfDecimal{#7}{\num{#7}}{#7}&\IfDecimal{#8}{\num{#8}}{#8}
+        \end{array}
+      \]
+    }{%
+      \[\frac{\IfDecimal{#3}{\num{#3}}{#3}}{\IfDecimal{#6}{\num{#6}}{#6}}=\frac{\IfDecimal{#4}{\num{#4}}{#4}}{\IfDecimal{#7}{\num{#7}}{#7}}=\frac{\IfDecimal{#5}{\num{#5}}{#5}}{\IfDecimal{#8}{\num{#8}}{#8}}\]
+    }%
   }%
   % On choisit \'eventuellement le calcul \`a faire s'il y en a plusieurs.
   \xdef\CompteurCalcul{\useKV[ClesThales]{ChoixCalcul}}%
   \xintifboolexpr{\CompteurCalcul>0}{\xintifboolexpr{\CompteurCalcul==1}{\xdef\cmya{0}\xdef\cmza{0}}{\xintifboolexpr{\CompteurCalcul==2}{\xdef\cmxa{0}\xdef\cmza{0}}{\xdef\cmxa{0}\xdef\cmya{0}}}}{}%
-  %%on fait les calculs
-\begin{align*}
-    %Premier compteur \xxx
-    \ifnum\cmxa>0
+  %% on fait les calculs
+  \ifboolKV[ClesThales]{CalculsPerso}{%
+    \EcritureCalculs%
+  }{%
+    \begin{align*}
+      % Premier compteur \xxx
+      \ifnum\cmxa>0
       \Nomx\uppercase{&}=\frac{\opexport{valx}{\valx}\num{\valx}\times\opexport{Valx}{\Valx}\num{\Valx}}{\opexport{denox}{\denox}\num{\denox}}\relax%\global\numx=\numexpr\opprint{valx}*\opprint{Valx}\relax
     \fi
     %    % Deuxi\`eme compteur \yyy
@@ -7517,7 +7965,8 @@
         \uppercase{&}\Nomz\uppercase{&}\opdiv*{numz}{denoz}{resultatz}{restez}\opcmp{restez}{0}\ifopeq=\num{\ResultatThalesz}\else\approx\num{\fpeval{round(\ResultatThalesz,\useKV[ClesThales]{Precision})}}\fi~\text{\useKV[ClesThales]{Unite}}%
       \fi
     \fi
-\end{align*}
+    \end{align*}
+    }
 }{}
 }
 
@@ -7638,7 +8087,7 @@
 \StrMid{\the\xxx}{1}{1}[\cmxa]%
 \ifboolKV[ClesThales]{Calcul}{%
   %%%%%%%%%%%%%%%%%%%%%%%%%%%
-    On remplace par les longueurs connues :
+  On remplace par les longueurs connues :
   \ifboolKV[ClesThales]{Propor}{%
     \[\begin{array}{c|c|c}
         \IfDecimal{#3}{\num{#3}}{#3}&\IfDecimal{#4}{\num{#4}}{#4}&\IfDecimal{#5}{\num{#5}}{#5}\\
@@ -7875,7 +8324,7 @@
 }%
 %%%%
 
-\newcommand{\ReciThales}[6][]{%
+\newcommand\ReciThales[6][]{%
   \ifboolKV[ClesThales]{Droites}{%
     Les droites $(#3#5)$ et $(#4#6)$ sont s\'ecantes en $#2$.
   }{%
@@ -8004,9 +8453,18 @@
   }%
 }%
 
-\newcommand{\Thales}[8][]{%
+\newcommand\Thales[8][]{%
   \useKVdefault[ClesThales]%
   \setKV[ClesThales]{#1}%
+  %Définir les points pour une utilisation perso
+  \StrMid{#2}{1}{1}[\NomA]\StrMid{#2}{2}{2}[\NomB]\StrMid{#2}{3}{3}[\NomC]\StrMid{#2}{4}{4}[\NomM]\StrMid{#2}{5}{5}[\NomN]%
+  \xdef\NomPointA{\NomA}%
+  \xdef\NomPointB{\NomB}%
+  \xdef\NomPointC{\NomC}%
+  \xdef\NomTriangle{\NomA\NomB\NomC}%
+  \xdef\NomPointM{\NomM}%
+  \xdef\NomPointN{\NomN}%
+  %
   \ifboolKV[ClesThales]{Reciproque}{%
     \ReciproqueThales[#1]{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
   }{%



More information about the tex-live-commits mailing list.