From 39851f0148b22e35a644662d7c52387431051340 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 10 Apr 2021 21:11:00 +0000 Subject: profcollege (10apr21) git-svn-id: svn://tug.org/texlive/trunk@58818 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/profcollege/ProfCollege.sty | 100 ++++++++++++++------- 1 file changed, 68 insertions(+), 32 deletions(-) (limited to 'Master/texmf-dist/tex/latex/profcollege') diff --git a/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty b/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty index c3707123143..82333853805 100644 --- a/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty +++ b/Master/texmf-dist/tex/latex/profcollege/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 -- cgit v1.2.3