From 0ef3dfaccca426fb0f3b06fc106ef9b5b0423dad Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 23 Aug 2021 03:00:54 +0000
Subject: CTAN sync 202108230300

---
 .../profcollege/latex/PfCEquationTerme1.tex        | 39 +++++++++++-----------
 1 file changed, 19 insertions(+), 20 deletions(-)

(limited to 'macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex')

diff --git a/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex b/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex
index 80399dd3f4..3f8a1759e9 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex
@@ -1,6 +1,6 @@
 % Licence    : Released under the LaTeX Project Public License v1.3c
 % or later, see http://www.latex-project.org/lppl.txtf
-\newcommand{\EquaDeuxTerme}[5][]{%type ax+b=d ou b=cx+d$
+\newcommand\EquaDeuxTerme[5][]{%type ax+b=d ou b=cx+d$
   \useKVdefault[ClesEquation]%
   \setKV[ClesEquation]{#1}%
   \ifx\bla#2\bla%On échange en faisant attention à ne pas boucler : c doit être non vide
@@ -14,20 +14,20 @@
       }%
     }{%ELSE
       \xintifboolexpr{#3==0}{%ax+b=d
-        \EquaBase[#1]{#2}{}{}{#5}%
+        \EquaBase[#1]{#2}{0}{0}{#5}%
       }{%ax+b=d$ Ici
         \ifboolKV[ClesEquation]{Decomposition}{\colorlet{Cterme}{\useKV[ClesEquation]{CouleurTerme}}}{}
         \begin{align*}
           \tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\num{#5}\tikzmark{E-\theNbequa}\\
           \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}&=\num{#5}\mathcolor{Cterme}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}\\
           \tikzmark{C-\theNbequa}\xdef\Coeffa{#2}\xdef\Coeffb{\fpeval{#5-#3}}\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}&=\num{\Coeffb}\tikzmark{G-\theNbequa}%\\
-          \xintifboolexpr{\Coeffa==1}{}{\\}
+          %\xintifboolexpr{\Coeffa==1}{}{\\}
           \ifboolKV[ClesEquation]{Fleches}{%
           \leftcomment{A-\theNbequa}{C-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
           \rightcomment{E-\theNbequa}{G-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
           }{}
           \xintifboolexpr{\Coeffa==1}{% 
-          }{%\ifnum\cmtd>1
+          }{\\
           \tikzmark{D-\theNbequa}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\num{\Coeffa}}\tikzmark{H-\theNbequa}%\\
           \ifboolKV[ClesEquation]{Fleches}{%
           \leftcomment{C-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
@@ -52,8 +52,7 @@
           }{}
           \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
         \end{align*}
-        \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\num{#5}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.
-        }{}
+        \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
       }
     }
   \fi
@@ -66,14 +65,14 @@
     \ifx\bla#5\bla%
       %% paramètre oublié
     \else
-      \EquaTroisTerme[#1]{#4}{#5}{#2}{}%
+      \EquaTroisTerme[#1]{#4}{#5}{#2}{0}%
     \fi
   \else
   \xintifboolexpr{#2==0}{%b=cx
-    \EquaBase[#1]{#4}{}{}{#3}
+    \EquaBase[#1]{#4}{0}{0}{#3}
   }{%
     \xintifboolexpr{#4==0}{%ax+b=0
-      \EquaDeuxTerme[#1]{#2}{#3}{}{0}
+      \EquaDeuxTerme[#1]{#2}{#3}{0}{0}
     }{%ax+b=cx
       \xintifboolexpr{#2==#4}{%
         \xintifboolexpr{#3==0}{%ax=ax
@@ -122,7 +121,7 @@
                 }
                 \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
               \end{align*}
-              \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
+              %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
             }{%ax+b=cx+d avec a<c              % Autre cas délicat
               \ifboolKV[ClesEquation]{Decomposition}{\colorlet{Cterme}{\useKV[ClesEquation]{CouleurTerme}}}{}
               \begin{align*}%
@@ -159,15 +158,16 @@
                 }
                 \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
               \end{align*}
-              \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
+              %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
             }%
+            \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
           }%
         }%
       }%
     \fi
   }%
 
-\newcommand{\ResolEquationTerme}[5][]{%
+\newcommand\ResolEquationTerme[5][]{%
   \useKVdefault[ClesEquation]%
   \setKV[ClesEquation]{#1}%
   \xintifboolexpr{#2==0}{%
@@ -183,19 +183,19 @@
     }%
   }{%
     \xintifboolexpr{#4==0}{%ax+b=0x+d
-      \EquaDeuxTerme[#1]{#2}{#3}{}{#5}%
+      \EquaDeuxTerme[#1]{#2}{#3}{0}{#5}%
     }
     {%ax+b=cx+d$
       \xintifboolexpr{#3==0}{%
         \xintifboolexpr{#5==0}{%ax=cx
-          \EquaTroisTerme[#1]{#2}{0}{#4}{}%
+          \EquaTroisTerme[#1]{#2}{0}{#4}{0}%
         }%
         {%ax=cx+d
-          \EquaTroisTerme[#1]{#4}{#5}{#2}{}%
+          \EquaTroisTerme[#1]{#4}{#5}{#2}{0}%
         }%
       }%
       {\xintifboolexpr{#5==0}{%ax+b=cx
-          \EquaTroisTerme[#1]{#2}{#3}{#4}{}%
+          \EquaTroisTerme[#1]{#2}{#3}{#4}{0}%
         }%
         {%ax+b=cx+d -- ici
           \xintifboolexpr{#2==#4}{%
@@ -246,8 +246,7 @@
                 }
                 \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
               \end{align*}
-              \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
-              }{}
+              %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
             }{%ax+b=cx+d avec a<c              % Autre cas délicat
               \ifboolKV[ClesEquation]{Decomposition}{\colorlet{Cterme}{\useKV[ClesEquation]{CouleurTerme}}}{}
               \begin{align*}%
@@ -288,9 +287,9 @@
                 }
                 \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
               \end{align*}
-              \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
-              }{}%
+              %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
             }%
+            \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
           }%
         }%
       }%
-- 
cgit v1.2.3

