diff options
author | Karl Berry <karl@freefriends.org> | 2023-06-15 20:07:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-06-15 20:07:19 +0000 |
commit | 8c169bba44521ca22da32bb44ace07196b3aefc2 (patch) | |
tree | 138cc2319fbdd9538ec6e748b7fb357dbab74b90 /Master/texmf-dist/tex/latex/proflycee | |
parent | 3af05609ba113ecf61e1ebc2a35fa7c5583f4fb7 (diff) |
proflycee (15jun23)
git-svn-id: svn://tug.org/texlive/trunk@67374 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/proflycee')
8 files changed, 190 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty index 3e3d3cd558f..bed6473ccab 100644 --- a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty +++ b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty @@ -3,7 +3,10 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2023/06/02 2.6.7 Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2023/06/15 2.7.0 Aide pour l'utilisation de LaTeX en lycee] +% 2.7.0 Ajout de la clé [Frac] pour \AxeyTikz + \FonctionRepartTikz +% 2.6.9 Correction de bugs et améliorations des boîtes de codes +% 2.6.8 Ajout d'une grille (manuelle) pour les histogrammes non réguliers % 2.6.7 Correction de bugs mineurs + Histogramme (classes régulières ou non) % 2.6.6 Externalisation du style Tikz mainlevee (dans tikz2d-fr) % 2.6.5 Ajout d'une option[noamssymb] pour éviter les clashs avec fourier (merci PfC) + Corections de bugs diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex index fbcc1910e1b..200461710b4 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex @@ -255,7 +255,8 @@ HautGrad=4pt,% AffGrad=true,% AffOrigine=true,% - Annee=false + Annee=false,% + Frac=false } \DeclareDocumentCommand\AxeyTikz{ O{} m }{% @@ -264,26 +265,42 @@ \IfSubStr{\axeytickwidth}{/} {\StrCut{\axeytickwidth}{/}{\axeytickwidthA}{\axeytickwidthB}} {\def\axeytickwidthA{\axeytickwidth}\def\axeytickwidthB{\axeytickwidth}} - \foreach \y in {#2}{% - \draw[line width=\axeywidth] ({\axeytickwidthA},{\y-\axeyOy}) -- ({-\axeytickwidthB},{\y-\axeyOy})% - \ifboolKV[PLaxeytkz]{AffGrad}%on affiche les graduations + \ifboolKV[PLaxeytkz]{Frac}% {% - \ifboolKV[PLaxeytkz]{AffOrigine}%si on demande d'afficher l'origine - {node[\axeyposlabel,font=\axeyfont] - {\ifboolKV[PLaxeytkz]{Annee}% - {\num[group-digits=none]{\y}}% - {\num[text-family-to-math=true,text-series-to-math=true]{\y}}% - } - } - {\xintifboolexpr{\y==\axeyOy}{}{node[\axeyposlabel,font=\axeyfont] {\ifboolKV[PLaxeytkz]{Annee}% - {\num[group-digits=none]{\y}}% - {\num[text-family-to-math=true,text-series-to-math=true]{\y}}% - } - } - } - } - {} - ;} + \ifboolKV[PLaxeytkz]{AffGrad}%on affiche les graduations + {% + \foreach \y in {#2} + {\draw[line width=\axeywidth] ({\axeytickwidthA},{\y-\axeyOy}) -- ({-\axeytickwidthB},{\y-\axeyOy}) % + \xintifboolexpr{\y==\axeyOy}{}{node[\axeyposlabel,font=\axeyfont] {\ConversionFraction{\y}}} ;} + }% + {% + \foreach \y in {#2} + {\draw[line width=\axeywidth] ({\axeytickwidthA},{\y-\axeyOy}) -- ({-\axeytickwidthB},{\y-\axeyOy}) ;} + }% + }% + {% + \foreach \y in {#2}{% + \draw[line width=\axeywidth] ({\axeytickwidthA},{\y-\axeyOy}) -- ({-\axeytickwidthB},{\y-\axeyOy})% + \ifboolKV[PLaxeytkz]{AffGrad}%on affiche les graduations + {% + \ifboolKV[PLaxeytkz]{AffOrigine}%si on demande d'afficher l'origine + {node[\axeyposlabel,font=\axeyfont] + {% + \ifboolKV[PLaxeytkz]{Annee}% + {\num[group-digits=none]{\y}}% + {\num[text-family-to-math=true,text-series-to-math=true]{\y}}% + }% + } + {\xintifboolexpr{\y==\axeyOy}{}{node[\axeyposlabel,font=\axeyfont] {\ifboolKV[PLaxeytkz]{Annee}% + {\num[group-digits=none]{\y}}% + {\num[text-family-to-math=true,text-series-to-math=true]{\y}}% + } + } + }% + }% + {} + ;} + }% } %axes diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex index 5a098314f79..228639439a2 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex @@ -136,7 +136,7 @@ listing options={style=PLpython,xleftmargin=16pt,numbers=left},% underlay={% \begin{tcbclipinterior} - \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \draw[draw=none,fill=lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; \end{tcbclipinterior}% } } diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex index 4fcf8b8c927..9f8e2735b14 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex @@ -63,7 +63,7 @@ minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=16pt,linenos,numbersep=10pt}, underlay={% \begin{tcbclipinterior} - \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \draw[draw=none,fill=lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; \end{tcbclipinterior}% } } diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex index 8456b1601e9..89f363b9433 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex @@ -8,6 +8,7 @@ % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. +%2.6.9 Amalioration de la gestion des style := intégration directe dans la tcbox ! %2.5.9 Ajout d'une clé pour la couleur des nombres %2.5.8 Modification des marges %2.5.7 Style alternatif @@ -74,13 +75,13 @@ thonnystyle,% underlay={% \begin{tcbclipinterior} - \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \draw[draw=none,fill=lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; \end{tcbclipinterior}% } } } -%==Création de la boîte +%==Création de la boîte (essai v2 ?) \ifluatex \RequirePackage{piton} \NewPitonEnvironment{CodePiton}{ O{} m }% @@ -100,38 +101,40 @@ %------les styles tcbox \IfEq{\CODPITstyle}{Moderne}%style Moderne (défaut) {% - \tcbset{stylepiton,colframe=Green,colback=ForestGreen!5,width=\CODPITlargeur,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign,leftupper=0.75em} + \tcbset{cadre/.style={}} + \tcbset{titre/.style={}} + \tcbset{stylebase/.style={stylepiton,colframe=Green,colback=ForestGreen!5,width=\CODPITlargeur,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign,leftupper=0.75em}} \ifboolKV[envpiton]{Filigrane}%si filigrane - {\tcbset{watermark text={\faPython},watermark opacity=0.175,watermark zoom=0.50}}% - {}% + {\tcbset{filigrane/.style={watermark text={\faPython},watermark opacity=0.175,watermark zoom=0.50}}}% + {\tcbset{filigrane/.style={}}}% } {}% \IfEq{\CODPITstyle}{Classique}%style Classique {% \ifboolKV[envpiton]{Lignes}%si lignes=true - {\tcbset{thonnystylelineos,leftupper=0.75em}}% - {\tcbset{thonnystyle,leftupper=0.4em}}% - \tcbset{width=\CODPITlargeur,colframe=DarkGray!50!Black,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign} + {\tcbset{stylebase/.style={thonnystylelineos,leftupper=0.75em,width=\CODPITlargeur,colframe=DarkGray!50!Black,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign}}}% + {\tcbset{stylebase/.style={thonnystyle,leftupper=0.4em,width=\CODPITlargeur,colframe=DarkGray!50!Black,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign}}}% + %\tcbset{width=\CODPITlargeur,colframe=DarkGray!50!Black,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign} \ifboolKV[envpiton]{Filigrane}%si filigrane - {\tcbset{watermark text={\faPython},watermark opacity=0.25,watermark zoom=0.50}}% - {}% + {\tcbset{filigrane/.style={watermark text={\faPython},watermark opacity=0.25,watermark zoom=0.50}}}% + {\tcbset{filigrane/.style={}}}% \ifboolKV[envpiton]{BarreTitre}% {% \ifboolKV[envpiton]{Cadre} - {} - {\tcbset{boxrule=0pt,frame hidden}} - \tcbset{lefttitle=0.4em,title={\CODPITtitre},fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!50!Black} + {\tcbset{cadre/.style={}}}% + {\tcbset{cadre/.style={boxrule=0pt,frame hidden}}}% + \tcbset{titre/.style={lefttitle=0.4em,title={\CODPITtitre},fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!50!Black}} }% {% - \tcbset{notitle} + \tcbset{titre/.style={notitle}} \ifboolKV[envpiton]{Cadre} - {} - {\tcbset{boxrule=0pt,frame hidden}} + {\tcbset{cadre/.style={}}} + {\tcbset{cadre/.style={boxrule=0pt,frame hidden}}} } } {}% %on crée la boîte - \begin{tcolorbox}[#2] + \begin{tcolorbox}[stylebase,filigrane,cadre,titre] }% {% \end{tcolorbox}% @@ -185,9 +188,15 @@ \PitonOptions{#1} \PyLTVerbatimEnv \ifboolKV[consolepyluatex]{Logo} - {\tcbset{consolepyluatexlogo,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} - {\tcbset{consolepyluatex,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} - \begin{tcolorbox} + {% + \begin{tcolorbox}[consolepyluatexlogo,width=\ConsPyluaLarg,\ConsPyluaAlign,#3] + }% + {% + \begin{tcolorbox}[consolepyluatex,width=\ConsPyluaLarg,\ConsPyluaAlign,#3] + }% +% {\tcbset{consolepyluatexlogo,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} +% {\tcbset{consolepyluatex,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} + %\begin{tcolorbox} \begin{pythonrepl} } { diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex index 2d7e0716e63..b66996a7a69 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex @@ -745,4 +745,75 @@ {\num{\xinteval{\CalculCnp{#3}{#4}}}}%formaté } +%%------Fonction de répartition +\NewDocumentCommand\CrochetFctRepart{ m m }{ + \draw[red,\FctRepartThickness] ({#1 + 0.1}, {#2 + 0.025}) -- (#1,#2 + 0.025) -- (#1,#2 - 0.025) -- ({#1 + 0.1}, {#2 - 0.025}); +} + +\defKV[fctrepart]{% + Couleur=\def\FctRepartColor{#1},% + Epaisseur=\def\FctRepartThickness{#1},% + Extremite=\def\FctRepartExtremite{#1} +} + +\setKVdefault[fctrepart]{% + Couleur=red,% + Epaisseur=thick,% + Pointilles=true,% + Extremite=crochet +} + +\NewDocumentCommand\FonctionRepartTikz{ O{} m }{% + \restoreKV[fctrepart]% + \setKV[fctrepart]{#1}% + \setsepchar[.]{/.,}% + \readlist*\ListeFonctRepart{#2}% + \def\NbPortions{\ListeFonctRepartlen} + \foreach \i in {1,2,...,\ListeFonctRepartlen} + {% + \IfStrEq{\ListeFonctRepart[\i,2]}{*}% + {% + \def\valxdeb{\xmin}% + }% + {% + \itemtomacro\ListeFonctRepart[\i,2]\valxdeb% + \IfStrEq{\FctRepartExtremite}{crochet}% + { + \CrochetFctRepart{\ListeFonctRepart[\i,2]}{\ListeFonctRepart[\i,1]}% + }{}% + \IfStrEq{\FctRepartExtremite}{point}% + { + \filldraw[\FctRepartColor] ({\valxdeb},{\ListeFonctRepart[\i,1]}) circle[radius=1.5pt] ;% + }{}% + }% + \IfStrEq{\ListeFonctRepart[\i,3]}{*}% + {% + \def\valxfin{\xmax}% + }% + {% + \itemtomacro\ListeFonctRepart[\i,3]\valxfin% + \IfStrEq{\FctRepartExtremite}{crochet}% + { + \CrochetFctRepart{\ListeFonctRepart[\i,3]}{\ListeFonctRepart[\i,1]}% + }{}% + \IfStrEq{\FctRepartExtremite}{point}% + { + \draw[\FctRepartColor,fill=white] ({\valxfin},{\ListeFonctRepart[\i,1]}) circle[radius=1.5pt] ;% + }{}% + }% + \ifboolKV[fctrepart]{Pointilles}% + {% + \xintifboolexpr{\valxdeb * \valxfin > 0 'and' \valxdeb > 0}% + {% + \draw[semithick,dashed] (0,{\ListeFonctRepart[\i,1]})--({\valxdeb},{\ListeFonctRepart[\i,1]}) ;% + }{}% + \xintifboolexpr{\valxdeb * \valxfin > 0 'and' \valxdeb < 0}% + {% + \draw[semithick,dashed] (0,{\ListeFonctRepart[\i,1]})--({\valxfin},{\ListeFonctRepart[\i,1]}) ;% + }{}% + }{}% + \draw[\FctRepartThickness,\FctRepartColor] ({\valxdeb},{\ListeFonctRepart[\i,1]})--({\valxfin},{\ListeFonctRepart[\i,1]}) ;% + }% +} + \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex index 1394813fdfc..e58bdf29011 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex @@ -151,7 +151,7 @@ stylepythontexalt,leftupper=1.35em, underlay={% \begin{tcbclipinterior} - \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \draw[draw=none,fill=lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; \end{tcbclipinterior}% } } diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex index 519783285a7..26c12c2c135 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex @@ -8,6 +8,7 @@ % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. +%2.6.8 Grille histogrammes non réguliers %2.6.7 Histogrammes %%------RegressionLinéaire @@ -214,7 +215,10 @@ Opacite=\def\HistoOpac{#1},% DebutOx=\def\HistoDebX{#1},% FinOx=\def\HistoFinX{#1},% - EpaisseurTraits=\def\HistoEptraits{#1} + EpaisseurTraits=\def\HistoEptraits{#1},% + Grille=\def\HistoGrille{#1},% + ExtraGrilleY=\def\HistoExtraGridY{#1},% + PosLegende=\def\HistoPosLeg{#1} } \setKVdefault[histostats]{% @@ -237,7 +241,10 @@ GrilleV=true,% DebutOx={},% FinOx={},% - EpaisseurTraits=semithick + EpaisseurTraits=semithick,% + Grille={},% + ExtraGrilleY=0,% + PosLegende={} } \NewDocumentCommand\Histogramme{ s O{} m }{% @@ -255,16 +262,48 @@ \IfBooleanTF{#1}%étoilé := classe d'amplitudes différentes {% - \xdef\ListeHauteurs{\fpeval{(\LISTDONNEES[1,3])/(\LISTDONNEES[1,2]-\LISTDONNEES[1,1])}} + \xdef\ListeHauteurs{\xintfloateval{(\LISTDONNEES[1,3])/(\LISTDONNEES[1,2]-\LISTDONNEES[1,1])}} \foreach \i in {2,...,\LISTDONNEESlen} {% - \xdef\ListeHauteurs{\ListeHauteurs,\fpeval{(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}}% + \xdef\ListeHauteurs{\ListeHauteurs,\xintfloateval{(\LISTDONNEES[\i,3])/(\LISTDONNEES[\i,2]-\LISTDONNEES[\i,1])}}% }% - \xdef\maxhauteurs{\xinteval{round(max(\ListeHauteurs),3)}}% - \xdef\HistoUniteY{\xinteval{round(\HistoHauteur/max(\ListeHauteurs),3)}}% - \xdef\HistoUniteX{\xinteval{round(\HistoLargeur/(\HistoFinX-\HistoDebX),3)}}% + \IfEq{\HistoGrille}{}%on lit les infos de la grille PasX/UniteAire + {}% + {% + \StrCut{\HistoGrille}{/}{\HistoPasX}{\HistoUnAire}% + \def\HistoPasY{\xintfloateval{\HistoUnAire/\HistoPasX}}% + }% + \xdef\maxhauteurs{\xintfloateval{round(max(\ListeHauteurs),3)}}% + + \IfEq{\HistoGrille}{}% + {% + \xdef\HistoUniteY{\xintfloateval{round(\HistoHauteur/max(\ListeHauteurs),3)}}% + }% + {% + \xdef\maxhauteurgrille{\xinteval{(floor((\maxhauteurs)/(\HistoPasY))+1+\HistoExtraGridY)*\HistoPasY}}% + \xdef\HistoUniteY{\xintfloateval{round((\HistoHauteur)/(\maxhauteurgrille),3)}}% + }% + \xdef\HistoUniteX{\xintfloateval{round(\HistoLargeur/(\HistoFinX-\HistoDebX),3)}}% %fenêtre graphique \begin{tikzpicture}[x=\HistoUniteX cm,y=\HistoUniteY cm] + %Essai de grille + \IfEq{\HistoGrille}{}% + {}% + {% + \draw[line width=0.4pt,lightgray,xstep=\HistoPasX,ystep=\HistoPasY] ({\HistoDebX},0) grid ({\HistoFinX},{\xinteval{floor((\maxhauteurs)/(\HistoPasY))+1+\HistoExtraGridY}*\HistoPasY}) ; + \IfSubStr{\HistoPosLeg}{/}% + {% + \StrCut{\HistoPosLeg}{/}{\HistoPosLegX}{\HistoPosLegY}% + \draw[\HistoEptraits,fill=lightgray,fill opacity=\HistoOpac] ({\HistoDebX+(\HistoPosLegX)*(\HistoPasX)},{(\HistoPasY)*(\HistoPosLegY)}) rectangle++ ({\HistoPasX},{\HistoPasY}) ; % + \draw ({\HistoDebX+(\HistoPosLegX+1)*(\HistoPasX)},{(\HistoPasY)*(\HistoPosLegY+0.5)}) node[right,font=\HistoFonteEff] {\num{\HistoUnAire}} ;% + }% + {}% + %\draw ({\HistoDebX},{0}) node[below left] {\xinteval{floor((\maxhauteurs)/(\HistoPasY))+1}} ; + %\draw ({\HistoDebX},{\HistoPasY}) node[left] {\num{\HistoPasY}} ; + %\draw ({\HistoDebX},{\maxhauteurs}) node[left] {\num{\maxhauteurs}} ; + + }% + %rectangles \foreach \i in {1,...,\LISTDONNEESlen} {% \xintifboolexpr{\LISTCOULlen == 1}% |