diff options
Diffstat (limited to 'macros/latex/contrib/proflycee')
-rw-r--r-- | macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf | bin | 1395090 -> 1413877 bytes | |||
-rw-r--r-- | macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex | 4 | ||||
-rw-r--r-- | macros/latex/contrib/proflycee/tex/ProfLycee.sty | 3 | ||||
-rw-r--r-- | macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex | 4 | ||||
-rw-r--r-- | macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex | 140 |
5 files changed, 143 insertions, 8 deletions
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf Binary files differindex bbc0a4960d..511b284af0 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex index 60aef1b154..44ae53a48c 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex @@ -5,8 +5,8 @@ % arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') \documentclass[a4paper,french,11pt]{article} -\def\PLversion{3.00d} -\def\PLdate{5 novembre 2023} +\def\PLversion{3.00e} +\def\PLdate{10 novembre 2023} \usepackage{amsfonts} \usepackage{ProfLycee} \useproflyclib{piton,minted,pythontex,ecritures} diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index 42e9227e59..555bc5c125 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -3,7 +3,8 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2023/11/05 3.00d Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2023/11/10 3.00e Aide pour l'utilisation de LaTeX en lycee] +% 3.00e Ajout des 'machines à transformer' + Correction d'un nom de commande (cc ProfCollege ^^) % 3.00d Ajout de commandes pour des chateaux de cartes et des allumettes % 3.00c Ajout de chiffrements (César + Affine + Hill) % 3.00b Amélioration de la commande des intervalles (spécifier un label pour les bornes) diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex index 280970d88c..adcc03f028 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex @@ -328,7 +328,7 @@ columns=fullflexible,firstnumber=\CodePseudoCodeLstFirstLine,% stringstyle=\color{MotsClesPseudoCodeChaine}, classoffset=0,% - keywords={Pour,Fonction,Début,Debut,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% + keywords={Algorithme,Pour,Fonction,Début,Paramètre,Parametre,Debut,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% keywordstyle=\color{MotsClesPseudoCodeA},% classoffset=1,% morekeywords={Afficher,Retourner,Saisir},% @@ -473,7 +473,7 @@ columns=fullflexible,firstnumber=\CodePseudoCodeLstFirstLine, stringstyle=\color{MotsClesPseudoCodeChaine}, classoffset=0,% - keywords={Pour,Fonction,Debut,Début,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% + keywords={Algorithme,Pour,Fonction,Debut,Début,Paramètre,Parametre,allant,Fin,Si,alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables},% keywordstyle=\color{MotsClesPseudoCodeA},% classoffset=1,% morekeywords={Afficher,Retourner,Saisir},% diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex index 89a1c83801..880ac4cbb3 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex @@ -452,7 +452,7 @@ \defKV[allumettes]{CouleurBois=\def\MatchWoodColor{#1},CouleurBout=\def\MatchEndColor{#1},Decal=\def\MatchOffset{#1}} \setKVdefault[allumettes]{CouleurBois=BoisAllumette,CouleurBout=GratteAllumette,Decal={0.8*\LongueurGratte},NoirBlanc=false} -\NewDocumentCommand\Allumette{ O{} m }{%1 offset,%2 = ptA>ptB +\NewDocumentCommand\PfLAllumette{ O{} m }{%1 offset,%2 = ptA>ptB \useKVdefault[allumettes]% \setKV[allumettes]{#1}% \ifboolKV[allumettes]{NoirBlanc}% @@ -471,13 +471,147 @@ \end{scope} } -\NewDocumentCommand\Allumettes{ O{} m }{% +\NewDocumentCommand\PfLAllumettes{ O{} m }{% \setsepchar{ }% \readlist*\listeptsalum{#2}% \xintFor* ##1 in {\xintSeq{1}{\listeptsalumlen}}\do{% \itemtomacro\listeptsalum[##1]{\diralum} - \Allumette[#1]{\diralum} + \PfLAllumette[#1]{\diralum} }% } +%====MACHINE À TRANSFORMER +\defKV[machtransf]{% + Couleur=\def\MachTransfCol{#1},% + CouleurFct=\def\MachTransfColF{#1},% + Hauteur=\def\MachTransfHt{#1},% + Largeur=\def\MachTransfWd{#1},% + Offset=\def\MachTransfOffset{#1},% + CouleurBloc=\def\MachTransfColBl{#1},% + PoliceTbl=\def\MachTransfFontTbl{#1},% + Fct=\def\MachTransfFct{#1},% + Formule=\def\MachTransfFormule{#1},% + Echelle=\def\MatchTransfScale{#1} +} + +\setKVdefault[machtransf]{% + Couleur=lightgray,% + CouleurFct=white,% + Bordure=false,% + AffFleche=true,% + Hauteur=3,% + Largeur=2,% + Offset=4pt,% + CouleurBloc=red,% + Tableau=false,% + PoliceTbl=\footnotesize,% + Logo=true,% + Fct={},% + Auto=false,% + Formule={},% + ES=false,% + Echelle=1 +} + +\NewDocumentCommand\MachineTransformer{ O{} m D<>{} }{% + \useKVdefault[machtransf]% + \setKV[machtransf]{#1}% + \tikzset{MachTransfBlocVal/.style={draw=none,fill=\MachTransfColBl,rounded corners=3pt}}% + \tikzset{MachTransfVal/.style={text=white}}% + \begin{tikzpicture}[line join=bevel,scale=\MatchTransfScale,every node/.style={scale=\MatchTransfScale},#3] + \ifboolKV[machtransf]{Bordure}% + {% + \fill[draw=black,semithick,fill=\MachTransfCol] (0,0) rectangle (\MachTransfWd,\MachTransfHt) ; + \fill[draw=black,fill=\MachTransfCol] ({0.25*\MachTransfWd},{0.3*\MachTransfHt}) --++ (150:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + \fill[draw=black,fill=\MachTransfCol] ({0.75*\MachTransfWd},{0.7*\MachTransfHt}) --++ (30:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + \fill[fill=\MachTransfCol] (0,0) rectangle (\MachTransfWd,\MachTransfHt) ; + }% + {% + \fill[draw=none,semithick,fill=\MachTransfCol] (0,0) rectangle (\MachTransfWd,\MachTransfHt) ; + \fill[draw=none,semithick,fill=\MachTransfCol] ({0.25*\MachTransfWd},{0.3*\MachTransfHt}) --++ (150:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + \fill[draw=none,semithick,fill=\MachTransfCol] ({0.75*\MachTransfWd},{0.7*\MachTransfHt}) --++ (30:{0.4*\MachTransfHt}) --++ (0,{-0.4*\MachTransfHt}) --cycle ; + }% + \ifboolKV[machtransf]{Logo}% + {% + \node[scale={2*\MachTransfWd},text=\MachTransfCol!75!black] at ({0.5*\MachTransfWd},{0.5*\MachTransfHt}) {\faIcon{cog}}; + }% + {}% + \ifboolKV[machtransf]{AffFleche}% + {% + \draw[line width=2.5pt,\MachTransfColF,->,>=latex] ({0},{0.3*\MachTransfHt}) to[out=0,in=180] ({\MachTransfWd},{0.7*\MachTransfHt}) ; + }% + {}% + \ifboolKV[machtransf]{ES}% + {% + \node[draw,MachTransfBlocVal,MachTransfVal,left=\MachTransfOffset] at ({0.25*\MachTransfWd-0.346*\MachTransfHt},{0.3*\MachTransfHt}) {\phantom{9}} ; + \node[draw,MachTransfBlocVal,MachTransfVal,right=\MachTransfOffset] at ({0.75*\MachTransfWd+0.346*\MachTransfHt},{0.7*\MachTransfHt}) {\phantom{9}} ; + }% + {}% + \ifboolKV[machtransf]{Auto}% + {% + \IfStrEq{#2}{}% + {}% + {% + \setsepchar{,}% + \readlist*\machtransflst{#2}% + %1ère valeur + \itemtomacro\machtransflst[1]\tmpvaldeb% + \IfEq{\tmpvaldeb}{}% + {\xdef\tmpvaldeb{\phantom{9}}\xdef\tmpvalfin{\phantom{9}}}% + {\StrSubstitute{\MachTransfFormule}{X}{(\tmpvaldeb)}[\tmpvalfin]} + \node[draw,MachTransfBlocVal,MachTransfVal,left=\MachTransfOffset] at ({0.25*\MachTransfWd-0.346*\MachTransfHt},{0.3*\MachTransfHt}) {$\tmpvaldeb$} ; + \node[draw,MachTransfBlocVal,MachTransfVal,right=\MachTransfOffset] at ({0.75*\MachTransfWd+0.346*\MachTransfHt},{0.7*\MachTransfHt}) {$\xinteval{\tmpvalfin}$} ; + \ifboolKV[machtransf]{Tableau}% + {% + \node[below=\MachTransfOffset] at ({0.5*\MachTransfWd},0) {\begin{NiceTabular}[hvlines]{|c|c|} + \CodeBefore + \rowcolor{lightgray!25}{1} + \Body + \texttt{\MachTransfFontTbl{}Entrée}&\texttt{\MachTransfFontTbl{}Sortie}\\ + \xintFor* ##1 in {\xintSeq{1}{\machtransflstlen}}\do{% + \itemtomacro\machtransflst[##1]\tmpvaldeb$\tmpvaldeb$ & % + \itemtomacro\machtransflst[##1]\tmpvaldeb\IfEq{\tmpvaldeb}{}% + {\xdef\tmpvaldeb{\phantom{9}}\xdef\tmpvalfin{\phantom{9}}}% + {\StrSubstitute{\MachTransfFormule}{X}{(\tmpvaldeb)}[\tmpvalfin]\xdef\tmpvalfin{\xinteval{\tmpvalfin}}}$\tmpvalfin$ \\% + } + \end{NiceTabular}} ;% + }% + {}% + }% + }% + {% + \IfStrEq{#2}{}% + {}% + {% + \setsepchar[.]{,./}% + \readlist*\machtransflst{#2}% + %1ère valeur + \itemtomacro\machtransflst[1,1]\tmpvaldeb% + \itemtomacro\machtransflst[1,2]\tmpvalfin% + \node[draw,MachTransfBlocVal,MachTransfVal,left=\MachTransfOffset] at ({0.25*\MachTransfWd-0.346*\MachTransfHt},{0.3*\MachTransfHt}) {\IfEq{\tmpvaldeb}{}{\phantom{9}}{\tmpvaldeb}} ; + \node[draw,MachTransfBlocVal,MachTransfVal,right=\MachTransfOffset] at ({0.75*\MachTransfWd+0.346*\MachTransfHt},{0.7*\MachTransfHt}) {\IfEq{\tmpvalfin}{}{\phantom{9}}{\tmpvalfin}} ; + \ifboolKV[machtransf]{Tableau}% + {% + \node[below=\MachTransfOffset] at ({0.5*\MachTransfWd},0) {\begin{NiceTabular}[hvlines]{|c|c|} + \CodeBefore + \rowcolor{lightgray!25}{1} + \Body + \texttt{\MachTransfFontTbl{}Entrée}&\texttt{\MachTransfFontTbl{}Sortie}\\ + \xintFor* ##1 in {\xintSeq{1}{\machtransflstlen}}\do{% + \itemtomacro\machtransflst[##1,1]{\tmpvaldeb}\tmpvaldeb & % + \itemtomacro\machtransflst[##1,2]{\tmpvalfin}\tmpvalfin\\% + } + \end{NiceTabular}} ;% + }% + {}% + }% + }% + \IfStrEq{\MachTransfFct}{}% + {}% + {% + \node[text=black,above=0pt] at ({0.5*\MachTransfWd},0) {\MachTransfFct} ; + }% + \end{tikzpicture} +} + \endinput
\ No newline at end of file |