summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/latex/ProfCollege.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-11 03:01:03 +0000
committerNorbert Preining <norbert@preining.info>2021-04-11 03:01:03 +0000
commit9b552e1a4637af098a01847c97658f65bc505356 (patch)
tree5fdca147f23bfe92704e86bbcac8e13521185c6c /macros/latex/contrib/profcollege/latex/ProfCollege.sty
parent5960076e4c9c15e2a052cf015dd697a65db3150d (diff)
CTAN sync 202104110301
Diffstat (limited to 'macros/latex/contrib/profcollege/latex/ProfCollege.sty')
-rw-r--r--macros/latex/contrib/profcollege/latex/ProfCollege.sty100
1 files changed, 68 insertions, 32 deletions
diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index c370712314..8233385380 100644
--- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty
+++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
@@ -3,7 +3,7 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfCollege}[2021/04/01 v0.98 Aide pour l'utilisation de LaTeX au collège]
+\ProvidesPackage{ProfCollege}[2021/04/09 v0.99 Aide pour l'utilisation de LaTeX au collège]
\RequirePackage{verbatim}
@@ -504,20 +504,20 @@
\xdef\LabyLong{\useKV[Labyrinthe]{Longueur}}%
\xdef\LabyHaut{\useKV[Labyrinthe]{Hauteur}}%
\ifboolKV[Labyrinthe]{SensImpose}{%
- \xdef\TotalLaby{\fpeval{3*\useKV[Labyrinthe]{Colonnes}+1}}%
+ \xdef\TotalLaby{\fpeval{4*(\useKV[Labyrinthe]{Colonnes}-1)+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]%,FDeplacement]
+ \begin{tikzpicture}[remember picture]%
% 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]};%\begin{minipage}{\LongLaby}\end{minipage}
+ (\fpeval{\LabyLong+\useKV[Labyrinthe]{EcartH}}*\compteurh,-\fpeval{\LabyHaut+\useKV[Labyrinthe]{EcartV}}*\compteurv) {\ListeLaby[\fpeval{\useKV[Labyrinthe]{Colonnes}*(\compteurv-1)+\compteurh},1]};%
}%
}%
% fin des cadres
@@ -527,14 +527,11 @@
\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]}%
+ \xdef\NomNode{\noexpand\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});%
- }{}%
+ \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});}{}%
+ \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- (A-\compteurh-\fpeval{\compteurv+1});%
}%
}%
}%
@@ -542,46 +539,39 @@
\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]}%
+ \xdef\NomNode{\noexpand\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);}{}
+ \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);}{}
+ \draw[\CouleurF,line width=3pt,FBidirect](A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\compteurv);%
}%
}%
}%
- % diagonales "inverses"
+% % 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]}%
+ \xdef\NomNode{\noexpand\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});
- }{}
+ \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
}%
}%
}%
- % diagonales directes
+% % 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]}%
+ \xdef\NomNode{\noexpand\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});
- }{}%
+ \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
+% }{}%
}%
}%
}%
@@ -589,7 +579,7 @@
\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)}]}%
+ \xdef\NomNode{\noexpand\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});%
@@ -623,8 +613,8 @@
}%
}%
}%
- }
- %fin des flèches
+ % 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} !}}%
@@ -9236,7 +9226,8 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Origine=0,Angl
\setKV[ClesFonction]{#1}
\ifboolKV[ClesFonction]{Points}{%
\toklistePtsFn{}%
- \setsepchar[*]{,*/}%\ignoreemptyitems%
+ % \setsepchar[*]{,*/}%\ignoreemptyitems%
+ \setsepchar[*]{§*/}%\ignoreemptyitems%
\readlist*\ListePoints{#2}%
\ifboolKV[ClesFonction]{Tangentes}{%
\foreachitem\compteur\in\ListePoints{%
@@ -13835,4 +13826,49 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Origine=0,Angl
}%
}%
}%
-}% \ No newline at end of file
+}%
+
+%%%%
+% Scratch
+%%%%
+\newlength{\longbarreheight}
+\setlength{\longbarreheight}{2.1ex+3pt}
+
+\newlength{\longbarredepth}
+\setlength{\longbarredepth}{0.9ex+3pt}
+\def\longbarre{\vrule height\longbarreheight depth\longbarredepth width0pt}%
+
+\def\barre{\vrule height2.1ex depth.9ex width0pt}%
+\def\demibarre{\vrule height1.4ex depth.6ex width0pt}%
+
+\setKVdefault[Scratch]{Impression=false,Numerotation=false,Echelle=1}
+
+\ifluatex
+\NewEnviron{Scratch}[1][]{%
+ \useKVdefault[Scratch]%
+ \setKV[Scratch]{#1}%
+ \mplibforcehmode%
+ \myfontScratch%
+ \begin{mplibcode}%
+ input PfC-Scratch;%
+ print:=\useKV[Scratch]{Impression};%
+ NumeroteLignes:=\useKV[Scratch]{Numerotation};%
+ \BODY
+ picture recap;%
+ recap:=currentpicture scaled \useKV[Scratch]{Echelle};%
+ currentpicture:=nullpicture;
+ draw recap;
+ \end{mplibcode}
+}%
+\else
+\NewEnviron{Scratch}[1][]{%
+ \setKV[Scratch]{#1}%
+ \begin{mpost}[mpsettings={input PfC-Scratch-pdf;print:=\useKV[Scratch]{Impression};NumeroteLignes:=\useKV[Scratch]{Numerotation};Echelle:=\useKV[Scratch]{Echelle};}]%
+ \BODY
+ picture recap;%
+ recap:=currentpicture scaled Echelle;%
+ currentpicture:=nullpicture;
+ draw recap;
+ \end{mpost}
+}%
+\fi \ No newline at end of file