texlive[58710] Master/texmf-dist: profcollege (3apr21)

commits+preining at tug.org commits+preining at tug.org
Sat Apr 3 16:49:23 CEST 2021


Revision: 58710
          http://tug.org/svn/texlive?view=revision&revision=58710
Author:   preining
Date:     2021-04-03 16:49:22 +0200 (Sat, 03 Apr 2021)
Log Message:
-----------
profcollege (3apr21)

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-04-03 12:05:04 UTC (rev 58709)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2021-04-03 14:49:22 UTC (rev 58710)
@@ -3,7 +3,7 @@
 % or later, see http://www.latex-project.org/lppl.txtf
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfCollege}[2021/03/18 v0.96 Aide pour l'utilisation de LaTeX au collège]
+\ProvidesPackage{ProfCollege}[2021/04/01 v0.98 Aide pour l'utilisation de LaTeX au collège]
 
 \RequirePackage{verbatim}
 
@@ -164,7 +164,7 @@
 }
 
 \newcommand\Lignespointilles[1]{%
-  \xintFor* ##1 in {\xintSeq {1}{#1}}\do{
+  \xintFor* ##1 in {\xintSeq {1}{#1}}\do{%
     \pointilles\par%
   }
 }
@@ -182,12 +182,135 @@
   }%
 }%
 
+\newcount\rappeljour
+
 \newcommand\Demain{%
-  \advance\day by 1%
-  \today%
-  \advance\day by -1%
+  \rappeljour=\day\relax%
+  \advance\day by 1\relax%
+  \ifnum\month=1\relax%
+  \ifnum\day>31\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=2\relax%
+  \ifnum\day>28\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=3\relax%
+  \ifnum\day>31\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=4\relax%
+  \ifnum\day>30\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=5\relax%
+  \ifnum\day>31\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=6\relax%
+  \ifnum\day>30\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=7\relax%
+  \ifnum\day>31\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+    \ifnum\month=8\relax%
+  \ifnum\day>31\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=9\relax%
+  \ifnum\day>30\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=10\relax%
+  \ifnum\day>31\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=11\relax%
+  \ifnum\day>30\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \ifnum\month=12\relax%
+  \ifnum\day>31\relax%
+  \day=\numexpr1\relax%
+  \advance\month by 1\relax%
+  \today\relax%
+  \advance\month by -1\relax%
+  \else%
+  \today\relax%
+  \fi%
+  \fi%
+  \day=\the\rappeljour\relax%
 }
 
+
 %%%
 % Tables Addition-Multiplication
 %%%
@@ -362,69 +485,146 @@
 %%%
 % Labyrinthe
 %%%
-\setKVdefault[Labyrinthe]{Lignes=6,Colonnes=3,Longueur=4,Hauteur=2,Passages=false,EcartH=1,EcartV=1,CouleurF=gray!50,Texte=\color{black}}
+\setKVdefault[Labyrinthe]{Lignes=6,Colonnes=3,Longueur=4,Hauteur=2,Passages=false,EcartH=1,EcartV=1,CouleurF=gray!50,Texte=\color{black},SensImpose=false,Slop}
 
+\tikzset{FDirect/.style={-stealth}}
+\tikzset{FIndirect/.style={stealth-}}
+\tikzset{FBidirect/.style={stealth-stealth}}
+
+
 \newcommand\Labyrinthe[3][]{%
   \useKVdefault[Labyrinthe]%
   \setKV[Labyrinthe]{#1}%
   \setsepchar[*]{,*/}%
   \readlist*\ListeLaby{#2}%
+  \xdef\LabySlop{\ifboolKV[Labyrinthe]{Slop}{sloped}{}}%
   \ifboolKV[Labyrinthe]{Passages}{%
     \readlist*\ListeLabySol{#3}%
   }{}%
   \xdef\LabyLong{\useKV[Labyrinthe]{Longueur}}%
   \xdef\LabyHaut{\useKV[Labyrinthe]{Hauteur}}%
-  \xdef\TotalLaby{\fpeval{3*\useKV[Labyrinthe]{Colonnes}-2}}%
+  \ifboolKV[Labyrinthe]{SensImpose}{%
+    \xdef\TotalLaby{\fpeval{3*\useKV[Labyrinthe]{Colonnes}+1}}%
+  }{%
+    \xdef\TotalLaby{\fpeval{3*\useKV[Labyrinthe]{Colonnes}-2}}%
+  }%
   \xdef\CouleurF{\useKV[Labyrinthe]{CouleurF}}%
   \xdef\MotifTexte{\useKV[Labyrinthe]{Texte}}%
   \xintifboolexpr{\ListeLabylen=\fpeval{\useKV[Labyrinthe]{Lignes}*\useKV[Labyrinthe]{Colonnes}}}{%
-    \begin{tikzpicture}[remember picture]
+    \begin{tikzpicture}[remember picture]%,FDeplacement]
       % on dessine les cadres
       \foreach \compteurv in {1,...,\useKV[Labyrinthe]{Lignes}}{%
         \foreach \compteurh in {1,...,\useKV[Labyrinthe]{Colonnes}}{%
           \xdef\ColorFill{\ListeLaby[\fpeval{\useKV[Labyrinthe]{Colonnes}*(\compteurv-1)+\compteurh},2]}%
           \node[fill=\ColorFill,draw,minimum height=\LabyHaut*1cm,minimum width=\LabyLong*1cm,name=A-\compteurh-\compteurv] at
-          (\fpeval{\LabyLong+\useKV[Labyrinthe]{EcartH}}*\compteurh,-\fpeval{\LabyHaut+\useKV[Labyrinthe]{EcartV}}*\compteurv) {\ListeLaby[\fpeval{\useKV[Labyrinthe]{Colonnes}*(\compteurv-1)+\compteurh},1]};%
+          (\fpeval{\LabyLong+\useKV[Labyrinthe]{EcartH}}*\compteurh,-\fpeval{\LabyHaut+\useKV[Labyrinthe]{EcartV}}*\compteurv) {\ListeLaby[\fpeval{\useKV[Labyrinthe]{Colonnes}*(\compteurv-1)+\compteurh},1]};%\begin{minipage}{\LongLaby}\end{minipage}
         }%
       }%
+      % fin des cadres
       % on dessine les flèches
-      \foreach \compteurv in {1,...,\fpeval{\useKV[Labyrinthe]{Lignes}-1}}{%
-        \foreach \compteurh in {1,...,\useKV[Labyrinthe]{Colonnes}}{%
-          \ifboolKV[Labyrinthe]{Passages}{%
-            \xdef\NomNode{\ListeLabySol[1,\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+2*(\compteurh-1)}]}%
-            \draw[\CouleurF,line width=1pt,stealth-stealth] (A-\compteurh-\compteurv) -- node[fill=white,midway]{\MotifTexte\NomNode}(A-\compteurh-\fpeval{\compteurv+1});%
-          }{%
-            \draw[\CouleurF,line width=1pt,stealth-stealth] (A-\compteurh-\compteurv) -- (A-\compteurh-\fpeval{\compteurv+1});%
+      \ifboolKV[Labyrinthe]{SensImpose}{%
+        %verticales
+        \foreach \compteurv in {1,...,\fpeval{\useKV[Labyrinthe]{Lignes}-1}}{%
+          \foreach \compteurh in {1,...,\useKV[Labyrinthe]{Colonnes}}{%
+            \ifboolKV[Labyrinthe]{Passages}{%
+              \xdef\NomNode{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},1]}%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}%
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,midway,inner sep=2pt]{\MotifTexte\NomNode}(A-\compteurh-\fpeval{\compteurv+1});%
+              }{}%
+            }{%
+              \xdef\NomNode{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},1]}%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}%
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- (A-\compteurh-\fpeval{\compteurv+1});}{}%
+            }%
           }%
-        }
-      }
-      \foreach \compteurv in {1,...,\useKV[Labyrinthe]{Lignes}}{%
-        \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
-          \ifboolKV[Labyrinthe]{Passages}{%
-            \xdef\NomNode{\ListeLabySol[1,\fpeval{\TotalLaby*(\compteurv-1)+\compteurh}]}%
-            \draw[\CouleurF,line width=1pt,stealth-stealth]
-            (A-\compteurh-\compteurv) -- node[fill=white,midway]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\compteurv);
-          }{%
-            \draw[\CouleurF,line width=1pt,stealth-stealth]
-            (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\compteurv);
+        }%
+        % horizontales
+        \foreach \compteurv in {1,...,\useKV[Labyrinthe]{Lignes}}{%
+          \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
+            \ifboolKV[Labyrinthe]{Passages}{%
+              \xdef\NomNode{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\compteurh},1]}%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\compteurh},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\compteurh},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\compteurh},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}%
+              \draw[\CouleurF,line width=3pt,\NomStyle]
+              (A-\compteurh-\compteurv) -- node[fill=white,midway,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\compteurv);}{}
+            }{%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\compteurh},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\compteurh},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\compteurh},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}%
+                \draw[\CouleurF,line width=3pt,\NomStyle]
+                (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\compteurv);}{}
+            }%
           }%
+        }%
+        % diagonales "inverses"
+        \foreach \compteurv in {2,...,\fpeval{\useKV[Labyrinthe]{Lignes}}}{%
+          \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
+            \ifboolKV[Labyrinthe]{Passages}{%
+              \xdef\NomNode{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},1]}%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}%
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
+              }{}
+            }{%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}%
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
+              }{}
+            }%
+          }%
+        }%
+        % diagonales directes
+        \foreach \compteurv in {1,...,\fpeval{\useKV[Labyrinthe]{Lignes}-1}}{%
+          \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
+            \ifboolKV[Labyrinthe]{Passages}{%
+              \xdef\NomNode{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},1]}%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]>0}{%
+                \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
+              }{}%
+            }{%
+              \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]>0}{%
+                \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]=1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]=2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
+              }{}%
+            }%          
+          }%
+        }%
+      }{%
+        \foreach \compteurv in {1,...,\fpeval{\useKV[Labyrinthe]{Lignes}-1}}{%
+          \foreach \compteurh in {1,...,\useKV[Labyrinthe]{Colonnes}}{%
+            \ifboolKV[Labyrinthe]{Passages}{%
+              \xdef\NomNode{\ListeLabySol[1,\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+2*(\compteurh-1)}]}%
+              \draw[\CouleurF,line width=3pt,stealth-stealth] (A-\compteurh-\compteurv) -- node[fill=white,midway]{\MotifTexte\NomNode}(A-\compteurh-\fpeval{\compteurv+1});%
+            }{%
+              \draw[\CouleurF,line width=3pt,stealth-stealth] (A-\compteurh-\compteurv) -- (A-\compteurh-\fpeval{\compteurv+1});%
+            }%
+          }%
+        }%
+        \foreach \compteurv in {1,...,\useKV[Labyrinthe]{Lignes}}{%
+          \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
+            \ifboolKV[Labyrinthe]{Passages}{%
+              \xdef\NomNode{\ListeLabySol[1,\fpeval{\TotalLaby*(\compteurv-1)+\compteurh}]}%
+              \draw[\CouleurF,line width=3pt,stealth-stealth]
+              (A-\compteurh-\compteurv) -- node[fill=white,midway]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\compteurv);
+            }{%
+              \draw[\CouleurF,line width=3pt,stealth-stealth]
+              (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\compteurv);
+            }%
+          }
         }
-      }
-      \foreach \compteurv in {2,...,\fpeval{\useKV[Labyrinthe]{Lignes}}}{%
-        \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
-          \draw[\CouleurF,line width=1pt,stealth-stealth] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
+        \foreach \compteurv in {2,...,\fpeval{\useKV[Labyrinthe]{Lignes}}}{%
+          \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
+            \draw[\CouleurF,line width=3pt,stealth-stealth] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
+          }
         }
+        \foreach \compteurv in {1,...,\fpeval{\useKV[Labyrinthe]{Lignes}-1}}{%
+          \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
+            \ifboolKV[Labyrinthe]{Passages}{%
+              \xdef\NomNode{\ListeLabySol[1,\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+2*(\compteurh-1)+1}]}%
+              \draw[\CouleurF,line width=3pt,stealth-stealth] (A-\compteurh-\compteurv) -- node[fill=white,midway]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
+            }{%
+              \draw[\CouleurF,line width=3pt,stealth-stealth] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
+            }%          
+          }%
+        }%
       }
-      \foreach \compteurv in {1,...,\fpeval{\useKV[Labyrinthe]{Lignes}-1}}{%
-        \foreach \compteurh in {1,...,\fpeval{\useKV[Labyrinthe]{Colonnes}-1}}{%
-          \ifboolKV[Labyrinthe]{Passages}{%
-            \xdef\NomNode{\ListeLabySol[1,\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+2*(\compteurh-1)+1}]}%
-            \draw[\CouleurF,line width=1pt,stealth-stealth] (A-\compteurh-\compteurv) -- node[fill=white,midway]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
-          }{%
-            \draw[\CouleurF,line width=1pt,stealth-stealth] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
-          }%          
-        }%
-      }%
+      %fin des flèches
     \end{tikzpicture}
   }{\textbf{! Le nombre d'informations n'est pas compatible avec les
       définitions de {\ttfamily Colonnes} et {\ttfamily Lignes} !}}%
@@ -2022,7 +2222,7 @@
 % Somme des angles
 %%%
 
-\setKVdefault[ClesSommeAngle]{Detail=true,Isocele=false,Figure=false,FigureSeule=false,Angle=0}%
+\setKVdefault[ClesSommeAngle]{Detail=true,Isocele=false,Figure=false,FigureSeule=false,Angle=0,Perso=false}%
 
 \def\MPFigureSommeAngle#1#2#3#4#5#6#7{
     % #1 Premier sommet
@@ -2159,7 +2359,9 @@
   \fi
 }
 
-\newcommand\RedactionSomme[4][]{%
+\xdef\RedactionSomme{}
+
+\newcommand\RedactionSom[4][]{%
   % #1 : nom du triangle pA pB pC
   % #2 : mesure de l'angle pApBpC
   % #3 : mesure de l'angle pBpCpA
@@ -2170,10 +2372,14 @@
   \StrMid{#2}{1}{1}[\NomA]%
   \StrMid{#2}{2}{2}[\NomB]%
   \StrMid{#2}{3}{3}[\NomC]%
+  \xdef\NomTriangle{\NomA\NomB\NomC}%
+  \xdef\NomSommetB{\NomB}%
+  \xdef\NomSommetA{\NomA}%
+  \xdef\NomSommetC{\NomC}%
   % On rédige
-  Dans le triangle $\NomA\NomB\NomC$,\ifboolKV[ClesSommeAngle]{Isocele}{ isocèle en \NomA,}{} on a :%
+  \ifboolKV[ClesSommeAngle]{Perso}{\RedactionSomme}{Dans le triangle $\NomA\NomB\NomC$,\ifboolKV[ClesSommeAngle]{Isocele}{ isocèle en \NomA,}{} on a :}%
       \ifboolKV[ClesSommeAngle]{Isocele}{%
-        \ifx#4\bla\bla%
+        \ifx\bla#4\bla%
         \begin{align*}%
         \widehat{\NomA\NomB\NomC}+\widehat{\NomB\NomC\NomA}+\widehat{\NomC\NomA\NomB}&=\ang{180}\\%
         2\times\ang{#3}+\widehat{\NomC\NomA\NomB}&=\ang{180}\\%
@@ -2219,11 +2425,11 @@
   \StrMid{#2}{3}{3}[\NomC]%
   % Figure ou pas ?
   \ifboolKV[ClesSommeAngle]{FigureSeule}{%
-    \ifx#3\bla\bla%
+    \ifx\bla#3\bla%
     \xdef\Intermed{\fpeval{0.5*(180-#4)}}%
     \MPFigureSommeAngle{\NomA}{\NomB}{\NomC}{#4}{\Intermed}{0}{\useKV[ClesSommeAngle]{Angle}}%
     \else%
-    \ifx#4\bla\bla%
+    \ifx\bla#4\bla%
     \MPFigureSommeAngle{\NomA}{\NomB}{\NomC}{#3}{#3}{0}{\useKV[ClesSommeAngle]{Angle}}%
     \else%
     \MPFigureSommeAngle{\NomA}{\NomB}{\NomC}{#3}{#4}{1}{\useKV[ClesSommeAngle]{Angle}}%
@@ -2233,11 +2439,11 @@
     \ifboolKV[ClesSommeAngle]{Figure}{%
       \begin{multicols}{2}%
         {\em La figure est donnée à titre indicatif.}%
-        \ifx#3\bla\bla%
+        \ifx\bla#3\bla%
         \xdef\Intermed{\fpeval{0.5*(180-#4)}}%
         \[\MPFigureSommeAngle{\NomA}{\NomB}{\NomC}{#4}{\Intermed}{0}{\useKV[ClesSommeAngle]{Angle}}\]%
         \else%
-        \ifx#4\bla\bla%
+        \ifx\bla#4\bla%
         \[\MPFigureSommeAngle{\NomA}{\NomB}{\NomC}{#3}{#3}{0}{\useKV[ClesSommeAngle]{Angle}}\]%
         \else%
         \[\MPFigureSommeAngle{\NomA}{\NomB}{\NomC}{#3}{#4}{1}{\useKV[ClesSommeAngle]{Angle}}\]%
@@ -2245,10 +2451,10 @@
         \fi%
         \par\columnbreak\par%
         % on rédige
-        \RedactionSomme[#1]{#2}{#3}{#4}%
+        \RedactionSom[#1]{#2}{#3}{#4}%
       \end{multicols}%
     }{% on rédige
-      \RedactionSomme[#1]{#2}{#3}{#4}%
+      \RedactionSom[#1]{#2}{#3}{#4}%
     }%
   }%
 }%
@@ -5391,10 +5597,10 @@
 %%%
 \def\MPFigTrigo#1#2#3#4#5#6#7#8{%
   \ifluatex
-    \mplibcodeinherit{enable}
+  \mplibcodeinherit{enable}
    \mplibforcehmode
   \begin{mplibcode}
-    u:=1cm;
+    u:=\useKV[ClesTrigo]{Echelle};
     pair A,B,C,O,I,D,E,F;%
     % On place les points A,B,C sur le cercle de manière à faciliter la rotation de la figure
     A=u*(1,1);
@@ -5444,13 +5650,13 @@
       if #6=0:
         label(btex ? etex,1.1[B,1/2[A,C]]);
       else:
-        label(btex \num{#6} etex,1.1[B,1/2[A,C]]);
+        label(btex \num{#6} etex,1.2[B,1/2[A,C]]);
       fi;
     else:
       if #6=0:
         label(btex ? etex,1.1[B,1/2[A,C]]);
       else:
-        label(btex \num{#6} etex,1.1[B,1/2[A,C]]);
+        label(btex \num{#6} etex,1.2[B,1/2[A,C]]);
       fi;
     fi;
   fi;   
@@ -5542,13 +5748,13 @@
       if #6=0:
         label(btex ? etex rotated angle(C-A),1.1[B,1/2[A,C]]);
       else:
-        label(btex \num{#6} etex rotated angle(C-A),1.1[B,1/2[A,C]]);
+        label(btex \num{#6} etex rotated angle(C-A),1.2[B,1/2[A,C]]);
       fi;
     else:
       if #6=0:
         label(btex ? etex rotated angle(A-C),1.1[B,1/2[A,C]]);
       else:
-        label(btex \num{#6} etex rotated angle(A-C),1.1[B,1/2[A,C]]);
+        label(btex \num{#6} etex rotated angle(A-C),1.2[B,1/2[A,C]]);
       fi;
     fi;
   fi;   
@@ -5595,11 +5801,12 @@
   % #4 opp
   % #5 adj
   % #6 hyp
+  % #7 angle de rotation
   \ifluatex
     \mplibcodeinherit{enable}
    \mplibforcehmode
   \begin{mplibcode}
-    u:=1cm;
+    u:=\useKV[ClesTrigo]{Echelle};
   pair A,B,C,O,I,D,E,F;%
   % On place les points A,B,C sur le cercle de manière à faciliter la rotation de la figure
   A=u*(1,1);
@@ -5643,9 +5850,9 @@
   label(btex ? etex,A+0.95u*unitvector(I-A));
   decalage:=3mm;
   if angle(1/2[A,C]-B)>0:
-    label(btex \num{#6} etex,1.1[B,1/2[A,C]]);
+    label(btex \num{#6} etex,1.2[B,1/2[A,C]]);
   else:
-  label(btex \num{#6} etex,1.1[B,1/2[A,C]]);
+  label(btex \num{#6} etex,1.2[B,1/2[A,C]]);
   fi;
   if angle(1/2[B,C]-A)>0:
    label(btex \num{#4} etex,1/2[B,C]-decalage*(unitvector(A-B)));
@@ -5705,9 +5912,9 @@
   label(btex ? etex,A+0.95u*unitvector(I-A));
   decalage:=3mm;
   if angle(1/2[A,C]-B)>0:
-    label(btex \num{#6} etex,1.1[B,1/2[A,C]]);
+    label(btex \num{#6} etex,1.2[B,1/2[A,C]]);
   else:
-  label(btex \num{#6} etex,1.1[B,1/2[A,C]]);
+  label(btex \num{#6} etex,1.2[B,1/2[A,C]]);
   fi;
   if angle(1/2[B,C]-A)>0:
    label(btex \num{#4} etex,1/2[B,C]-decalage*(unitvector(A-B)));
@@ -5723,7 +5930,7 @@
 \fi
 }
 
-\setKVdefault[ClesTrigo]{Angle=0,Propor=false,Figure=false,FigureSeule=false,Precision=2,Unite=cm,Sinus=false,Cosinus=false,Tangente=false,Perso=false}%
+\setKVdefault[ClesTrigo]{Angle=0,Propor=false,Figure=false,FigureSeule=false,Precision=2,Unite=cm,Sinus=false,Cosinus=false,Tangente=false,Perso=false,Echelle=1cm}%
 
 \newcommand\RedactionTrigo{}%
 
@@ -5926,7 +6133,7 @@
   \StrMid{#2}{3}{3}[\NomC]%
   % On rédige
   \ifboolKV[ClesTrigo]{FigureSeule}{%
-    \ifx#5\bla\bla%
+    \ifx\bla#5\bla%
     \ifboolKV[ClesTrigo]{Cosinus}{%
       \MPFigTrigoAngle{\NomA}{\NomB}{\NomC}{}{#3}{#4}{\useKV[ClesTrigo]{Angle}}
     }{}%
@@ -5938,7 +6145,7 @@
     }{}%
     \else%}{%figure pour calculer une longueur
     \ifboolKV[ClesTrigo]{Cosinus}{%
-      \ifx#3\bla\bla%adjacent inconnu
+      \ifx\bla#3\bla%adjacent inconnu
       \MPFigTrigo{\NomA}{\NomB}{\NomC}{-1}{0}{#4}{#5}{\useKV[ClesTrigo]{Angle}}
       \else
       \MPFigTrigo{\NomA}{\NomB}{\NomC}{-1}{#3}{0}{#5}{\useKV[ClesTrigo]{Angle}}
@@ -5945,7 +6152,7 @@
       \fi
     }{}%
     \ifboolKV[ClesTrigo]{Sinus}{%
-      \ifx#3\bla\bla%adjacent inconnu
+      \ifx\bla#3\bla%adjacent inconnu
       \MPFigTrigo{\NomA}{\NomB}{\NomC}{0}{-1}{#4}{#5}{\useKV[ClesTrigo]{Angle}}
       \else
       \MPFigTrigo{\NomA}{\NomB}{\NomC}{#3}{-1}{0}{#5}{\useKV[ClesTrigo]{Angle}}
@@ -5952,7 +6159,7 @@
       \fi
     }{}%
     \ifboolKV[ClesTrigo]{Tangente}{%
-      \ifx#3\bla\bla%adjacent inconnu
+      \ifx\bla#3\bla%adjacent inconnu
       \MPFigTrigo{\NomA}{\NomB}{\NomC}{0}{#4}{-1}{#5}{\useKV[ClesTrigo]{Angle}}
       \else%
       \MPFigTrigo{\NomA}{\NomB}{\NomC}{#3}{0}{-1}{#5}{\useKV[ClesTrigo]{Angle}}
@@ -5963,7 +6170,7 @@
     \ifboolKV[ClesTrigo]{Figure}{%
       \begin{multicols}{2}%
         {\em La figure est donnée à titre indicatif.}%
-        \ifx#5\bla\bla%
+        \ifx\bla#5\bla%
         \ifboolKV[ClesTrigo]{Cosinus}{%
           \begin{center}
             \MPFigTrigoAngle{\NomA}{\NomB}{\NomC}{}{#3}{#4}{\useKV[ClesTrigo]{Angle}}
@@ -5981,7 +6188,7 @@
         }{}%
         \else%}{%figure pour calculer une longueur
         \ifboolKV[ClesTrigo]{Cosinus}{%
-          \ifx#3\bla\bla%adjacent inconnu
+          \ifx\bla#3\bla%adjacent inconnu
           \begin{center}
             \MPFigTrigo{\NomA}{\NomB}{\NomC}{-1}{0}{#4}{#5}{\useKV[ClesTrigo]{Angle}}
           \end{center}
@@ -5992,7 +6199,7 @@
           \fi
         }{}%
         \ifboolKV[ClesTrigo]{Sinus}{%
-          \ifx#3\bla\bla%adjacent inconnu
+          \ifx\bla#3\bla%adjacent inconnu
           \begin{center}
             \MPFigTrigo{\NomA}{\NomB}{\NomC}{0}{-1}{#4}{#5}{\useKV[ClesTrigo]{Angle}}
           \end{center}
@@ -6003,7 +6210,7 @@
           \fi
         }{}%
         \ifboolKV[ClesTrigo]{Tangente}{%
-          \ifx#3\bla\bla%adjacent inconnu
+          \ifx\bla#3\bla%adjacent inconnu
           \begin{center}
             \MPFigTrigo{\NomA}{\NomB}{\NomC}{0}{#4}{-1}{#5}{\useKV[ClesTrigo]{Angle}}
           \end{center}
@@ -8128,8 +8335,8 @@
 
 \def\MPFigureDroite#1#2{%
   \ifluatex
-    \mplibcodeinherit{enable}
-   \mplibforcehmode
+  \mplibcodeinherit{enable}
+  \mplibforcehmode
   \begin{mplibcode}
     pair A,B,C,D,E,F,G,H,I,J,K;
     u:=7.5mm;
@@ -12657,8 +12864,8 @@
         \hline
         \multicolumn{3}{|c|}{km$^3$}&\multicolumn{3}{c|}{hm$^3$}&\multicolumn{3}{c|}{dam$^3$}&\multicolumn{3}{c|}{m$^3$}&\multicolumn{3}{c|}{dm$^3$}&\multicolumn{3}{c|}{cm$^3$}&\multicolumn{3}{c|}{mm$^3$}\\
         \ifboolKV[ClesTableaux]{Capacite}{%
-        \cline{10-15}
-        \multicolumn{3}{|c|}{}&\multicolumn{3}{c|}{}&\multicolumn{3}{c|}{}&{\scriptsize hL}&{\scriptsize daL}&{\scriptsize L}&{\scriptsize dL}&{\scriptsize cL}&{\scriptsize mL}&\multicolumn{3}{c|}{}&\multicolumn{3}{c|}{}\\
+        \cline{13-18}
+        \multicolumn{3}{|c|}{}&\multicolumn{3}{c|}{}&\multicolumn{3}{c|}{}&\multicolumn{3}{c|}{}&{\scriptsize hL}&{\scriptsize daL}&{\scriptsize L}&{\scriptsize dL}&{\scriptsize cL}&{\scriptsize mL}&\multicolumn{3}{c|}{}\\
         }{}%
         \hline
         \xintFor* ##1 in {\xintSeq{1}{\useKV[ClesTableaux]{NbLignes}}}\do{%
@@ -13279,4 +13486,353 @@
       \end{tikzpicture}
     }%
   }%
-}
\ No newline at end of file
+}
+
+%%%
+% Papiers
+%%%
+\setKVdefault[Papiers]{Cinq=true,Seyes=false,Isometrique=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,PageEntiere=false,ZoneTexte=false}%
+
+\def\MPGrille#1#2#3#4{%
+  \ifluatex%
+  %\mplibcodeinherit{enable}%
+  \mplibforcehmode%
+  \begin{mplibcode}%
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step (#4*100) until (#1*100):
+    draw verticon shifted(((k/100)*cm,0));
+    endfor;
+    for k=0 step (#4*100) until (#2*100):
+    draw horizon shifted((0,(k/100)*cm));
+    endfor;
+  \end{mplibcode}%
+  %\mplibcodeinherit{disable}%
+  \else%
+  \begin{mpost}%
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 0.5 until #1:
+    draw verticon shifted((k*cm,0));
+    endfor;
+    for k=0 step 0.5 until #2:
+    draw horizon shifted((0,k*cm));
+    endfor;
+  \end{mpost}%
+  \fi%
+}%
+
+\def\MPCinq#1#2#3{%
+  \ifluatex%
+  %\mplibcodeinherit{enable}%
+  \mplibforcehmode%
+  \begin{mplibcode}%
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 0.5 until #1:
+    draw verticon shifted((k*cm,0));
+    endfor;
+    for k=0 step 0.5 until #2:
+    draw horizon shifted((0,k*cm));
+    endfor;
+  \end{mplibcode}%
+  %\mplibcodeinherit{disable}%
+  \else%
+  \begin{mpost}
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 0.5 until #1:
+    draw verticon shifted((k*cm,0));
+    endfor;
+    for k=0 step 0.5 until #2:
+    draw horizon shifted((0,k*cm));
+    endfor;
+  \end{mpost}%
+  \fi%
+}%
+
+\def\MPSeyes#1#2#3{%
+  \ifluatex%
+  %\mplibcodeinherit{enable}%
+  \mplibforcehmode%
+  \begin{mplibcode}%
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 8 until (#1*10):
+    draw verticon shifted(((k/10)*cm,0));
+    endfor;
+    for k=0 step 2 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 0.5;
+    endfor;
+    for k=0 step 8 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 1.25;
+    endfor;
+  \end{mplibcode}%
+  %\mplibcodeinherit{disable}%
+  \else%
+  \begin{mpost}%
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 8 until (#1*10):
+    draw verticon shifted(((k/10)*cm,0));
+    endfor;
+    for k=0 step 2 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 0.5;
+    endfor;
+    for k=0 step 8 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 1.25;
+    endfor;
+  \end{mpost}
+  \fi%
+}%
+
+\def\MPMillimetre#1#2#3{%
+  \ifluatex%
+  %\mplibcodeinherit{enable}%
+  \mplibforcehmode%
+  \begin{mplibcode}%
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 1 until (#1*10):
+    draw verticon shifted(((k/10)*cm,0)) withpen pencircle scaled 0.2;
+    endfor;
+    for k=0 step 5 until (#1*10):
+    draw verticon shifted(((k/10)*cm,0)) withpen pencircle scaled 0.5;
+    endfor;
+    for k=0 step 1 until (#1):
+    draw verticon shifted((k*cm,0)) withpen pencircle scaled 1.25;
+    endfor;
+    for k=0 step 1 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 0.2;
+    endfor;
+    for k=0 step 5 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 0.5;
+    endfor;
+    for k=0 step 1 until (#2):
+    draw horizon shifted((0,k*cm)) withpen pencircle scaled 1.25;
+    endfor;
+  \end{mplibcode}%
+  %\mplibcodeinherit{disable}%
+  \else%
+  \begin{mpost}%
+    path horizon,verticon;
+    horizon=(0,0)--(#1*cm,0);
+    verticon=(0,0)--(0,#2*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 1 until (#1*10):
+    draw verticon shifted(((k/10)*cm,0)) withpen pencircle scaled 0.2;
+    endfor;
+    for k=0 step 5 until (#1*10):
+    draw verticon shifted(((k/10)*cm,0)) withpen pencircle scaled 0.5;
+    endfor;
+    for k=0 step 1 until (#1):
+    draw verticon shifted((k*cm,0)) withpen pencircle scaled 1.25;
+    endfor;
+    for k=0 step 1 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 0.2;
+    endfor;
+    for k=0 step 5 until (#2*10):
+    draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 0.5;
+    endfor;
+    for k=0 step 1 until (#2):
+    draw horizon shifted((0,k*cm)) withpen pencircle scaled 1.25;
+    endfor;
+  \end{mpost}%
+  \fi%
+}%
+
+\def\MPIsometrique#1#2#3{%
+  \ifluatex%
+  %\mplibcodeinherit{enable}%
+  \mplibforcehmode%
+  \begin{mplibcode}%
+    path diagon,antidiagon;
+    diagon=(0,0)--#2*(sqrt(3)*cm,1*cm);
+    antidiagon=(0,0)--#2*(-sqrt(3)*cm,1*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 1 until #1:
+    draw diagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)/3) until (#2):
+    draw diagon shifted((0,k*cm));
+    endfor;
+    for k=0 step 1 until (#1):
+    draw antidiagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)/3) until (#2):
+    draw antidiagon shifted((#1*cm,k*cm));
+    endfor;
+    clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
+  \end{mplibcode}%
+  %\mplibcodeinherit{disable}%
+  \else%
+  \begin{mpost}%
+    path diagon,antidiagon;
+    diagon=(0,0)--#2*(sqrt(3)*cm,1*cm);
+    antidiagon=(0,0)--#2*(-sqrt(3)*cm,1*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 1 until #1:
+    draw diagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)/3) until (#2):
+    draw diagon shifted((0,k*cm));
+    endfor;
+    for k=0 step 1 until (#1):
+    draw antidiagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)/3) until (#2):
+    draw antidiagon shifted((#1*cm,k*cm));
+    endfor;
+    clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
+  \end{mpost}%
+  \fi%
+}%
+
+\def\MPTriangulaire#1#2#3{%
+  \ifluatex%
+  %\mplibcodeinherit{enable}%
+  \mplibforcehmode%
+  \begin{mplibcode}%
+    path horizon,diagon,antidiagon;
+    horizon=(0,0)--(#1*cm,0);
+    diagon=(0,0)--#2*(sqrt(3)*cm/3,1*cm);
+    antidiagon=(0,0)--#2*(-sqrt(3)*cm/3,1*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 1 until #1:
+    draw diagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)) until (#2):
+    draw diagon shifted((0,k*cm));
+    endfor;
+    for k=0 step 1 until (#1):
+    draw antidiagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)) until (#2):
+    draw antidiagon shifted((#1*cm,k*cm));
+    endfor;
+    for k=0 step (sqrt(3)/2) until (#2):
+    draw horizon shifted((0,k*cm));
+    endfor;
+    clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
+  \end{mplibcode}%
+  %\mplibcodeinherit{disable}%
+  \else%
+  \begin{mpost}%
+    path horizon,diagon,antidiagon;
+    horizon=(0,0)--(#1*cm,0);
+    diagon=(0,0)--#2*(sqrt(3)*cm/3,1*cm);
+    antidiagon=(0,0)--#2*(-sqrt(3)*cm/3,1*cm);
+    drawoptions(withcolor #3);
+    for k=0 step 1 until #1:
+    draw diagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)) until (#2):
+    draw diagon shifted((0,k*cm));
+    endfor;
+    for k=0 step 1 until (#1):
+    draw antidiagon shifted((k*cm,0));
+    endfor;
+    for k=0 step (sqrt(3)) until (#2):
+    draw antidiagon shifted((#1*cm,k*cm));
+    endfor;
+    for k=0 step (sqrt(3)/2) until (#2):
+    draw horizon shifted((0,k*cm));
+    endfor;
+    clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
+  \end{mpost}%
+  \fi%
+}%
+
+\RequirePackage{ifoddpage}
+
+\newcommand\Papiers[1][]{%
+  \useKVdefault[Papiers]%
+  \setKV[Papiers]{#1}%
+  \xdef\PapierLargeur{\useKV[Papiers]{Largeur}}%
+  \xdef\PapierHauteur{\useKV[Papiers]{Hauteur}}%
+  \xdef\PapierCouleur{\useKV[Papiers]{Couleur}}%
+  \xdef\PapierGrille{\useKV[Papiers]{Grille}}%
+  \xdef\PapierLeftCurrent{\ifoddpageoroneside\oddsidemargin\else\evensidemargin\fi}%
+  \xdef\PapierLeft{\the\dimexpr1in+\PapierLeftCurrent}%
+  \xdef\PapierBottom{\fpeval{\paperheight-\textheight-\voffset-\headheight-\topmargin-\headsep-1in}}%
+  \ifboolKV[Papiers]{ZoneTexte}{%
+    \xdef\PapierHauteur{\fpeval{\textheight/1cm}}%
+    \xdef\PapierLargeur{\fpeval{\textwidth/1cm}}%
+    \begin{tikzpicture}[remember picture,overlay]%
+      \node[anchor=south west,inner sep=0pt,transform canvas={xshift=\PapierLeft,yshift=\PapierBottom}] at (current page.south west) {%
+        \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
+          \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
+        }{\ifboolKV[Papiers]{Triangle}{%
+            \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+          }{\ifboolKV[Papiers]{Millimetre}{%
+              \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+            }{\ifboolKV[Papiers]{Isometrique}{%
+                \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+              }{\ifboolKV[Papiers]{Seyes}{%
+                  \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+                }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+                }%
+              }%
+            }%
+          }%
+        }%
+      };%
+    \end{tikzpicture}%
+  }{%
+    \ifboolKV[Papiers]{PageEntiere}{%
+      \xdef\PapierHauteur{\fpeval{\paperheight/1cm}}%
+      \xdef\PapierLargeur{\fpeval{\paperwidth/1cm}}%
+      \begin{tikzpicture}[remember picture,overlay]%
+        \node[anchor=south west,inner sep=0pt] at (current page.south west) {%
+          \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
+            \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
+          }{\ifboolKV[Papiers]{Triangle}{%
+              \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+            }{\ifboolKV[Papiers]{Millimetre}{%
+                \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+              }{\ifboolKV[Papiers]{Isometrique}{%
+                  \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+                }{\ifboolKV[Papiers]{Seyes}{%
+                    \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+                  }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+                  }%
+                }%
+              }%
+            }%
+          }%
+        };%
+      \end{tikzpicture}%
+    }{%
+      \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
+        \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
+      }{\ifboolKV[Papiers]{Triangle}{%
+          \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+        }{\ifboolKV[Papiers]{Millimetre}{%
+            \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+          }{\ifboolKV[Papiers]{Isometrique}{%
+              \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+            }{\ifboolKV[Papiers]{Seyes}{%
+                \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+              }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+              }%
+            }%
+          }%
+        }%
+      }%
+    }%
+  }%
+}%
\ No newline at end of file



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