summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-03-08 23:19:35 +0000
committerKarl Berry <karl@freefriends.org>2024-03-08 23:19:35 +0000
commit38e56e6181d9aa8e9e9acf83dcf17425bdd043d8 (patch)
treee02f7d122183ce189458c5b826211add3bb49b4e /Master/texmf-dist
parentc1335dbababbef4762f903cf3751bc085e40e789 (diff)
proflycee (9mar24)
git-svn-id: svn://tug.org/texlive/trunk@70510 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdfbin1572968 -> 1626650 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex6
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zipbin249425 -> 267204 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.pdfbin59463 -> 73899 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex163
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.pdfbin41175 -> 41179 bytes
-rw-r--r--Master/texmf-dist/metapost/proflycee/PfLEspace.mp762
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty10
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex80
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/proflycee-tools-espace.tex284
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex135
11 files changed, 1405 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
index e809c36645a..e51248bb1db 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
index a8aba8bbaef..8c7da1f8464 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
@@ -5,11 +5,11 @@
% 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.02c}
-\def\PLdate{23 février 2024}
+\def\PLversion{3.02f}
+\def\PLdate{7 mars 2024}
\usepackage{amsfonts}
\usepackage{ProfLycee}
-\useproflyclib{piton,minted,pythontex,ecritures}
+\useproflyclib{piton,minted,pythontex,ecritures,espace}
\usepackage[math-style=french]{fourier-otf}
\usepackage{mathrsfs}%pour mathscr
\usepackage{awesomebox}
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip
index f628d1ee6bf..a6db38f942d 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.pdf b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.pdf
index e22fb1e4fa0..8d441bcc5cd 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.pdf
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex
index e1382113175..937fed22c15 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex
@@ -1,8 +1,9 @@
-% !TeX document-id = {fc3853a9-0c9c-4d02-b763-6dc6c85d34db}
-% !TeX TXS-program:compile = txs:///lualatex/[--shell-escape]
+% !TeX TXS-program:compile = txs:///arara
+% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[french,a4paper,10pt]{article}
-\def\PLver{3.01f}
+\def\PLver{3.02e}
\usepackage[margin=1.5cm]{geometry}
\usepackage{ProfLycee}
\useproflyclib{piton}
@@ -10,8 +11,6 @@
\usepackage{babel}
\sisetup{locale=FR,output-decimal-marker={,},group-minimum-digits=4}
\usepackage{codehigh}
-%\usepackage[most]{tcolorbox}
-%\newtcblisting{ShowCodeTeX}[1][]{colback=white,colframe=red!75!black,listing options={style=tcblatex},#1}
\begin{document}
@@ -271,4 +270,158 @@ print(max(liste), min(liste), sum(liste))
[i**2 for i in range(50)]
\end{ConsolePiton}
+\pagebreak
+
+\section{Présentation, et exécution, comme avec Thonny}
+
+\subsection{Préambule, avec le package pyluatex}
+
+{\small \begin{codehigh}
+\documentclass[french,a4paper,10pt]{article}
+\usepackage{ProfLycee}
+\useproflyclib{piton}
+\usepackage[executable=python]{pyluatex} % lua + shell-escape
+\end{codehigh}}
+
+\subsection{Commandes}
+
+{\small \begin{codehigh}
+\begin{PitonThonnyEditor}<clé>[options tcbox]{largeur}
+...
+\end{PitonThonnyEditor}
+\end{codehigh}}
+
+\medskip
+
+La clé, à placer entre \texttt{<...>}, est :
+
+\begin{itemize}
+ \item la clé \textbf{\textsf{$\langle$Gobble$\rangle$}} pour spécifier des options liées au \textsf{gobble}, parmi \textbf{\textsf{$\langle$nb/auto$\rangle$}} ;
+
+ \hfill{}à adapter en fonction des situations (!)
+ \item la clé \textbf{\textsf{$\langle$NomFichier$\rangle$}} pour afficher le nom du fichier dans le cartouche \textit{éditeur}.
+
+ \hfill{}défaut : \textbf{\textsf{$\langle$script.py$\rangle$}}
+\end{itemize}
+
+{\small \begin{codehigh}
+\begin{PitonThonnyConsole}<clés>[options tcbox]{largeur}
+...
+\end{PitonThonnyConsole}
+\end{codehigh}}
+
+\medskip
+
+Les clés, à placer entre \texttt{<...>}, sont :
+
+\begin{itemize}
+ \item la clé \textbf{\textsf{$\langle$NomConsole$\rangle$}} pour afficher le nom de la \textit{console} ; \hfill{}défaut \textbf{\textsf{$\langle$console$\rangle$}}
+ \item la clé \textbf{\textsf{$\langle$IntroConsole$\rangle$}} pour afficher le message d'accueil de la console.
+\end{itemize}
+
+\subsection{Exemples}
+
+{\small\begin{codehigh}
+\begin{python}
+from math import gcd
+
+def est_duffy(n) :
+ nb_div, somme_div = 0, 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+
+\end{python}
+\end{codehigh}}
+
+{\small\begin{codehigh}
+\begin{PitonThonnyEditor}<NomFichier=tpcapytale.py>{12cm}
+#PROJET CAPYTALE
+from math import gcd
+
+def est_duffy(n) :
+ nb_div = 0
+ somme_div = 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+\end{PitonThonnyEditor}
+\end{codehigh}}
+
+\begin{PitonThonnyEditor}<NomFichier=tpcapytale.py>{12cm}
+#PROJET CAPYTALE
+from math import gcd
+
+def est_duffy(n) :
+ nb_div = 0
+ somme_div = 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+\end{PitonThonnyEditor}
+
+{\small\begin{codehigh}
+\begin{PitonThonnyConsole}<IntroConsole={python 3.8.10}>{12cm}
+#Run tpcapytale.py
+est_duffy(6)
+est_duffy(13)
+est_duffy(265)
+
+from random import randint
+nb = randint(1,100000)
+nb, est_duffy(nb)
+\end{PitonThonnyConsole}
+\end{codehigh}}
+
+\begin{python}
+from math import gcd
+
+def est_duffy(n) :
+ nb_div, somme_div = 0, 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+
+\end{python}
+\begin{PitonThonnyConsole}<IntroConsole={python 3.8.10}>{12cm}
+#Run tpcapytale.py
+est_duffy(6)
+est_duffy(13)
+est_duffy(265)
+
+from random import randint
+nb = randint(1,100000)
+nb, est_duffy(nb)
+\end{PitonThonnyConsole}
+
+{\small\begin{codehigh}
+\begin{PitonThonnyConsole}{8cm}
+[i**2 for i in range(50)]
+\end{PitonThonnyConsole}
+\end{codehigh}}
+
+\begin{PitonThonnyConsole}{8cm}
+[i**2 for i in range(50)]
+\end{PitonThonnyConsole}
+
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.pdf b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.pdf
index 9f881fc6104..b52e27de71a 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.pdf
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.pdf
Binary files differ
diff --git a/Master/texmf-dist/metapost/proflycee/PfLEspace.mp b/Master/texmf-dist/metapost/proflycee/PfLEspace.mp
new file mode 100644
index 00000000000..873ebd06844
--- /dev/null
+++ b/Master/texmf-dist/metapost/proflycee/PfLEspace.mp
@@ -0,0 +1,762 @@
+% PfLEspace.mp
+% Copyright 2024 Cédric Pierquet
+% Source David Nivaud (https://melusine.eu.org/syracuse/exemples/)
+% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+
+def repplansimple =
+ %plan simple
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t = (4u,0u);
+ r = (1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0 = (0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2 ;
+ draw z2--z3 ;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ %label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+enddef;
+
+def repinterplan =
+ %intersection de deux plans
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z5 = 0.5[z0,z1];
+ z6 = z5 transformed S;
+ z7 = (2.5u,-1u);
+ z8 = z7 transformed S;
+ z5 = 0.5[z9,z7];
+ z10= z9 transformed S;
+ draw z5--z6;
+ draw z9--z7;
+ draw z9--z10;
+ draw z10--z6;
+ draw z6--z3;
+ draw z6--z8 dashed evenly;
+ p1 = z2--z6;
+ q1= z9--z10;
+ z11 = p1 intersectionpoint q1;
+ draw z11--z6 dashed evenly;
+ draw z2--z11;
+ p2 = z7--z8;
+ q2= z5--z1;
+ z12 = p2 intersectionpoint q2;
+ draw z12--z8 dashed evenly;
+ draw z7--z12;
+ label.rt(btex $d$ etex scaled echelle, 0.5[z5,z6]);
+enddef;
+
+def repplantroispoints =
+ %representation d'un plan defini par trois points
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ dotlabel.top(btex $A$ etex scaled echelle, (2.25u,1.5u));
+ dotlabel.top(btex $B$ etex scaled echelle, (1.25u,.5u));
+ dotlabel.top(btex $C$ etex scaled echelle, (3.25u,1u));
+enddef;
+
+def repplandeuxdroites =
+ %representation d'un plan defini par deux droites secantes
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u);
+ z5 =(4u,1.5u);
+ draw z4--z5;
+ z6 = (1u,1.6u);
+ z7=(3.6u,0.4u);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+enddef;
+
+def repplandroite =
+ %representation d'un plan defini par un point et une droite
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ dotlabel.top(btex $A$ etex scaled echelle, (2.05u,1.35u));
+ z4 = (1u,.5u);
+ z5 = (3.25u,1.05u);
+ draw z4--z5;
+ label.top(btex $d$ etex scaled echelle, z5);
+enddef;
+
+def repplandtespara =
+ %representation d'un plan defini par deux droites parallèles
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (1u,1.15u);
+ z5 =(3u,1.65u);
+ draw z4--z5;
+ z6 = (1.5u,0.2u);
+ z7 = z6 shifted (z5-z4);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+enddef;
+
+def droitesnoncoplan =
+ %representation de deux droites non parallelles et sans point commun
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ path p[];
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.5u,.5u);
+ z5 = (4u,1u);
+ draw z4--z5;
+ label.top(btex $d$ etex scaled echelle, z5);
+ z6 = (2u,1.5u);
+ z7 = (0.2u,1u);
+ dotlabel.rt(btex $A$ etex scaled echelle, z6);
+ z9 = z6 shifted z7;
+ z10 = z6 shifted -2z7;
+ p1 = z6--z10;
+ p2 = z0--z1;
+ z11 = p1 intersectionpoint p2;
+ draw z6--z11 dashed evenly;
+ draw z11--z10;
+ draw z6--z9;
+ label.rt(btex $d'$ etex scaled echelle, z10);
+enddef;
+
+def repincidence =
+ %representation d'un plan
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4=(0u,-2.2u);
+ z5 = z4 transformed T;
+ z6 = z4 transformed S;
+ z7 = z4 transformed T transformed S;
+ draw z4--z6;
+ draw z4--z5 withpen pencircle scaled 0.05u;
+ draw z5--z7 withpen pencircle scaled 0.05u;
+ z8=1/5[z0,z1]+1/2[z0,z2];
+ z9=3/5[z4,z5]+1/2[z6,z4];
+ draw z8--z9;
+ z10 = z8 transformed S;
+ draw z8--z10;
+ z11 = z9 transformed S;
+ p1 = z10--z11;
+ q1 = z2--z3;
+ q2 = z0--z1;
+ q3 = z6--z7;
+ z12 = p1 intersectionpoint q1;
+ z13 = p1 intersectionpoint q2;
+ z14 = p1 intersectionpoint q3;
+ draw z10--z12;
+ draw z12--z13 dashed evenly;
+ draw z13--z14;
+ draw z14--z11
+ dashed evenly;
+ p2 = z8--z10;
+ z15 = p2 intersectionpoint q1;
+ draw z2--z15;
+ draw z15--z12 dashed evenly;
+ draw z12--z3;
+ p3 = z8--z9;
+ z16 = p3 intersectionpoint q2;
+ z17 = p3 intersectionpoint q3;
+ q4 = z4--z5;
+ z18 = p3 intersectionpoint q4;
+ draw z16--z12;
+ draw z6--z17;
+ draw z17--z14 dashed evenly;
+ draw z14--z7;
+ draw z18--z14;
+ p4 = z9--z11;
+ z19 = p4 intersectionpoint q4;
+ draw z9--z19;draw z19--z11 dashed evenly;
+ label.rt(btex $d$ etex scaled echelle, 0.5[z12,z16]);
+ label.rt(btex $d'$ etex scaled echelle, 0.5[z18,z14]);
+enddef;
+
+def repdroiteparaplans =
+ %droite parallele a deux plans secants
+ pair t,r;
+ transform T,S;
+ path p[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,1u); r=(0u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z1--z3;
+ z4=0.5[z0,z1];
+ z5 = z4 transformed S;
+ draw z4--z5;
+ label.lft(btex $\Delta$ etex scaled echelle,0.5[z4,z5]);
+ z6 = z4 shifted (1.5u,-1u);
+ z4=0.5[z6,z7];
+ z8 = z6 transformed S;
+ z9 = z7 transformed S;
+ draw z0--z4;
+ draw z4--z6;
+ draw z6--z8;
+ draw z8--z9;
+ draw z4--z7 dashed evenly;
+ p1= z4--z1;
+ p2 = z6--z8;
+ z10 = p1 intersectionpoint p2;
+ draw z4--z10 dashed evenly;draw z10--z1;
+ p3 = z2--z3;
+ p4 = z9--z7;
+ z11 = p3 intersectionpoint p4;
+ draw z11--z9;
+ draw z11--z7 dashed evenly;
+ draw z7--z4 dashed evenly;
+ z12 = (-1u,0u);
+ z13 = z12 shifted (0u,3u);
+ draw z13--z12;
+ label.lft(btex $d$ etex scaled echelle, z12);
+enddef;
+
+def reptoit =
+ %theoreme du toit
+ pair t,r,v;
+ transform T,S,V;
+ path p[];
+ pickup pencircle scaled 0.025u;
+ t=(3u,2u); r=(-2u,1.5u);v=(-3u,0u);
+ T = identity shifted t;
+ S = identity shifted r;
+ V = identity shifted v;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed S transformed T;
+ z4 = z0 transformed V;
+ z5 = z0 transformed V transformed T;
+ draw z0--z1;
+ draw z2--z3;
+ z101=0.1[z0,z1]; z10=0.9[z0,z1];
+ z23 = z101 transformed S;
+ z32=z10 transformed S;
+ z45 = z101 transformed V;
+ z54=z10 transformed V;
+ draw z101--z23;
+ draw z10--z32;
+ draw z23--z45;
+ draw z32--z54 dashed evenly;
+ p1 = z101--z23;
+ p2 = z4--z5;
+ z11 = p1 intersectionpoint p2;
+ draw z4--z11;
+ draw z11--z5 dashed evenly;
+ label.lft(btex $d$ etex scaled echelle, z0);
+ label.lft(btex $d'$ etex scaled echelle, z4);
+ label.top(btex $\Delta$ etex scaled echelle, z2);
+enddef;
+
+def repplanspara =
+ % plans paralleles a l'aide de droites secantes
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u);
+ z5 =(4u,1.5u);
+ draw z4--z5;
+ z6 = (1u,1.6u);
+ z7=(3.6u,0.4u);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+ z10=(0u,-2.5u);
+ z11 = z10 transformed T;
+ z12 = z10 transformed S;
+ z13 = z10 transformed T transformed S;
+ draw z10--z12;
+ draw z12--z13;
+ draw z10--z11 withpen pencircle scaled 0.05u;
+ draw z11--z13 withpen pencircle scaled 0.05u;
+ z14 = (0.8u,-1.5u); z15 =(4u,-1u);draw z14--z15;
+ z16 = (1u,-0.9u);z17=(3.6u,-2.1u);draw z16--z17;
+ label.rt(btex $d_{1}$ etex scaled echelle, z15);
+ label.rt(btex $d'_{1}$ etex scaled echelle, z17);
+enddef;
+
+def repdteplanpara =
+ % parallelisme plan et droite
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (1u,.5u);
+ z5 = (4u,1u);
+ draw z4--z5;
+ label.top(btex $d'$ etex scaled echelle, z4);
+ z6 = (1u,2.5u);
+ z7 = z6 shifted z5-z4;
+ draw z6--z7;
+ label.top(btex $d$ etex scaled echelle, z6);
+enddef;
+
+def repdtesortho =
+ %droites orthogonales
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(2u,3u); r=(0u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ draw z0--z1;
+ draw z0--z2;
+ label.bot(btex $I$ etex scaled echelle, z0);
+ z3=0.1[z0,z1];
+ z4=0.1[z0,z2];
+ z5=z3 shifted z4-z0;
+ draw z3--z5;
+ draw z4--z5;
+ z6=(0u,-1u);
+ z7 = z6 transformed T;
+ draw z7--z6;
+ label.bot(btex $\Delta$ etex scaled echelle, z7);
+ z8=(-1u,-1u);
+ z9= z8 transformed S;
+ label.lft(btex $d$ etex scaled echelle, z9);
+ draw z9--z8;
+enddef;
+
+def repdroiteorthoplan =
+ %droite orthogonale a un plan
+ pair t,r;
+ transform T,S;
+ path p[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u);
+ z5 =(4u,1.5u);
+ draw z4--z5;
+ z6 = (1u,1.6u);
+ z7=(3.6u,0.4u);
+ draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+ p1 = z4--z5;p2 = z6--z7;
+ z8 = p1 intersectionpoint p2;
+ z9 = z8 shifted (0u,2u);
+ label.rt(btex $\Delta$ etex scaled echelle, z9);
+ draw z8--z9;
+ z10 = z8 shifted (0u,-2u);
+ p3 = z9--z10;
+ p4 = z0--z1;
+ z11 = p3 intersectionpoint p4;
+ draw z8--z11 dashed evenly;
+ draw z11--z10;
+ z12=0.1[z8,z7];
+ z13=0.1[z8,z9];
+ z14= z13 shifted z12-z8;
+ draw z12--z14;
+ draw z13--z14;
+ z15=0.2[z8,z4];
+ z16=0.1[z8,z9];
+ z17= z16 shifted z15-z8;
+ draw z15--z17;
+ draw z16--z17;
+enddef;
+
+def repplansparadroiteortho =
+ %plans paralleles et droite orthogonale
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ path p[];
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4 = (0.8u,1u); z5 =(4u,1.5u);draw z4--z5;
+ z6 = (1u,1.6u);z7=(3.6u,0.4u);draw z6--z7;
+ label.rt(btex $d$ etex scaled echelle, z5);
+ label.rt(btex $d'$ etex scaled echelle, z7);
+ z10=(0u,-2.5u);
+ z11 = z10 transformed T;
+ z12 = z10 transformed S;
+ z13 = z10 transformed T transformed S;
+ draw z10--z12;
+ draw z12--z13;
+ draw z10--z11 withpen pencircle scaled 0.05u;
+ draw z11--z13 withpen pencircle scaled 0.05u;
+ z14 = (0.8u,-1.5u);
+ z15 =(4u,-1u);
+ draw z14--z15;
+ z16 = (1u,-0.9u);
+ z17=(3.6u,-2.1u);
+ draw z16--z17;
+ label.rt(btex $d_{1}$ etex scaled echelle, z15);
+ label.rt(btex $d'_{1}$ etex scaled echelle, z17);
+ p1=z4--z5;
+ p2=z6--z7;
+ p3=z14--z15;
+ p4=z16--z17;
+ p5=z0--z1;
+ p6=z10--z11;
+ z20 = p1 intersectionpoint p2;
+ z21 = p3 intersectionpoint p4;
+ p7 = z20--z21;
+ z22 = p7 intersectionpoint p5;
+ z24 = z20 shifted (0u,1.5u);
+ z25 = z21 shifted (0u,-1.5u);
+ p8 = z21--z25;
+ z23 = p8 intersectionpoint p6;
+ draw z24--z20;
+ draw z20--z22 dashed evenly;
+ draw z22--z21;
+ draw z21--z23
+ dashed evenly;
+ draw z23--z25;
+ label.rt(btex $\Delta$ etex scaled echelle, z24);
+ z30=0.2[z20,z4];
+ z31=0.1[z20,z24];
+ z32 = z31 shifted z30-z20;
+ draw z32--z30;
+ draw z32--z31;
+ z40=0.2[z21,z14];
+ z41=0.1[z21,z22];
+ z42 = z41 shifted z40-z21;
+ draw z42--z40;
+ draw z42--z41;
+ z50=0.1[z20,z7];
+ z51=0.1[z20,z24];
+ z52 = z51 shifted z50-z20;
+ draw z52--z50;
+ draw z52--z51;
+ z60=0.1[z21,z17];
+ z61=0.1[z21,z22];
+ z62 = z61 shifted z60-z21;
+ draw z62--z60;
+ draw z62--z61;
+enddef;
+
+def repdrtoitesorthoplanspara =
+ %droites orthogonales a deux plans paralleles
+ pair t,r;
+ transform T,S;
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ path p[];
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z2--z3;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z10=(0u,-2.5u);
+ z11 = z10 transformed T;
+ z12 = z10 transformed S;
+ z13 = z10 transformed T transformed S;
+ draw z10--z12;
+ draw z12--z13;
+ draw z10--z11 withpen pencircle scaled 0.05u;
+ draw z11--z13 withpen pencircle scaled 0.05u;
+ z20 = (2u,1u);
+ z26 = z20 shifted (0u,-2.5u);
+ z21 = z20 shifted (0u,2u);
+ z22 = z20 shifted (0u,-4.5u);
+ p1 = z21--z22;
+ p2 = z0--z1;
+ p3 = z10--z11;
+ z24 = p1 intersectionpoint p2;
+ z25 = p1 intersectionpoint p3;
+ draw z21--z20;
+ draw z20--z24 dashed evenly;
+ draw z24--z26;
+ draw z26--z25 dashed evenly;
+ draw z25--z22;
+ z30 = (3u,1.5u);
+ z36 = z30 shifted (0u,-2.5u);
+ z31 = z30 shifted (0u,2u);
+ z32 = z30 shifted (0u,-4.5u);
+ p11 = z31--z32;
+ p12 = z0--z1;
+ p13 = z10--z11;
+ z34 = p11 intersectionpoint p12;
+ z35 = p11 intersectionpoint p13;
+ draw z31--z30;
+ draw z30--z34 dashed evenly;
+ draw z34--z36;
+ draw z36--z35 dashed evenly;
+ draw z35--z32;
+ z40=0.1[z20,z30];
+ z41=0.1[z20,z21];
+ z42 = z41 shifted z40-z20;
+ draw z42--z40;
+ draw z42--z41;
+ z50=0.1[z30,z20];
+ z51=0.1[z30,z31];
+ z52 = z51 shifted z50-z30;
+ draw z52--z50;
+ draw z52--z51;
+ z60=0.1[z26,z36];
+ z61=0.1[z26,z24];
+ z62 = z61 shifted z60-z26;
+ draw z62--z60;
+ draw z62--z61;
+ z70=0.1[z36,z26];
+ z71=0.2[z36,z34];
+ z72 = z71 shifted z70-z36;
+ draw z72--z70;
+ draw z72--z71;
+ draw z20--z30;
+ draw z26--z36;
+enddef;
+
+def repplansperp =
+ %intersection de deux plans perpendiculaires
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(4u,0u); r=(1u,2u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z5 = 0.5[z0,z1];
+ z6 = z5 transformed S;
+ z7 = z5 shifted (0u,-2.5u);
+ z8 = z7 transformed S;
+ z5 = 0.5[z9,z7];
+ z10= z9 transformed S;
+ draw z5--z6;
+ draw z9--z7;
+ draw z9--z10;
+ draw z10--z6;
+ draw z6--z3;
+ draw z7--z8;
+ p1 = z2--z6;
+ q1= z5--z9;
+ z11 = p1 intersectionpoint q1;
+ draw z11--z6 dashed evenly;
+ draw z2--z11;
+ p2 = z6--z8;
+ q2= z5--z1;
+ z12 = p2 intersectionpoint q2;
+ draw z12--z6 dashed evenly;
+ draw z8--z12;
+ label.rt(btex $d$ etex scaled echelle, 0.6[z5,z6]);
+ z13=0.5[z5,z6];
+ z14 = z13 shifted (0u,2u);
+ z15 = z13 shifted (0u,-2u);
+ p3 = z0--z1;
+ q3 = z13--z15;
+ z16 = p3 intersectionpoint q3;
+ draw z14--z13;
+ draw z13--z16 dashed evenly;
+ draw z16--z15;
+ z20=0.2[z13,z6];
+ z21=0.2[z13,z14];
+ z22 = z21 shifted z20-z13;
+ draw z22--z20;
+ draw z22--z21;
+ z17 = z13 shifted 0.8(z1-z5);
+ z18 = z13 shifted 0.8(z0-z5);
+ p4 = z13--z18;
+ z19 = q1 intersectionpoint p4;
+ draw z18--z19;
+ draw z19--z13 dashed evenly;
+ draw z13--z17;
+ z30=0.1[z13,z18];z31=0.1[z13,z14];
+ z32 = z31 shifted z30-z13;
+ draw z32--z30;
+ draw z32--z31;
+enddef;
+
+def repplansperpplan =
+ %plans perpendiculaires a un meme plan
+ pair t,r;
+ transform T,S;
+ path p[],q[];
+ pickup pencircle scaled 0.025u;
+ t=(5u,0u); r=(1u,2.3u);
+ T = identity shifted t;
+ S = identity shifted r;
+ z0=(0u,0u);
+ z1 = z0 transformed T;
+ z2 = z0 transformed S;
+ z3 = z0 transformed T transformed S;
+ draw z0--z2;
+ draw z0--z1 withpen pencircle scaled 0.05u;
+ draw z1--z3 withpen pencircle scaled 0.05u;
+ z4= 1/4[z0,z1];
+ z5= 3/4[z0,z1];
+ z6= 1/2[z4,z5];
+ z7 = z6 shifted (0u,1u);
+ draw z4--z7;
+ draw z5--z7;
+ z8 = z4 shifted (0u,2u);
+ z9 = z5 shifted (0u,2u);
+ z10 = z7 shifted (0u,2u);
+ z4=0.5[z8,z11];
+ z5=0.5[z12,z9];
+ z7=0.5[z13,z10];
+ draw z8--z11;
+ draw z8--z10;
+ draw z12--z9;
+ draw z9--z10;
+ draw z7--z10;
+ draw z7--z6 dashed evenly;
+ draw z6--z13;
+ draw z11--z13;
+ draw z13--z12;
+ p1 = z2--z3;
+ q1 = z8--z10;
+ q2=z9--z10;
+ z14= p1 intersectionpoint q1;
+ z15= p1 intersectionpoint q2;
+ draw z2--z14;
+ draw z14--z15 dashed evenly;
+ draw z15--z3;
+ z20=0.1[z7,z10];
+ z21=0.2[z7,z4];
+ z22 = z21 shifted z20-z7;
+ draw z22--z20;
+ draw z22--z21;
+ z30=0.1[z7,z10];
+ z31=0.2[z7,z5];
+ z32 = z31 shifted z30-z7;
+ draw z32--z30;
+ draw z32--z31;
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
index 0c71456d5d8..05945a83b16 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}[2024/02/23 3.02c Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2024/03/07 3.02f Aide pour l'utilisation de LaTeX en lycee]
+% 3.02f Ajout de petits schémas type pour la géométrie dans l'espace + conformité avec piton
+% 3.02e Présentation python dans la style 'thonny' + amélioration dans la gestion du gobble avec piton
+% 3.02d Retenues pour les soustractions dans les opérations posées
% 3.02c Ajout d'une commande pour le calcul d'une congruence (+petite pos / +petite nég) + ligne tkz-convex + Opérations posées
% 3.02b Amélioration du code pour les arbres de probas (tks M. Degrange pour les suggestions)
% 3.02a Ajout des [ecritures] proba conditionnelle, norme, valeur absolue et IF/IC
@@ -152,6 +155,11 @@
\input{proflycee-tools-piton.tex}
}%
{}%
+ \IfSubStr{#1}{espace}%
+ {%
+ \input{proflycee-tools-espace.tex}
+ }%
+ {}%
\IfSubStr{#1}{minted}%
{%
\if@build
diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex
index 1d8b4f28264..eccfd35733b 100644
--- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex
+++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex
@@ -1269,7 +1269,8 @@
Offset=6pt,%
AffEgal=true,%
LimiteCapac=0,%
- CouleurRetenue=red
+ CouleurRetenue=red,%
+ AffRetenues=true
}
\NewDocumentCommand\IntCalcMaxWidth{ m }{%
@@ -1279,20 +1280,22 @@
\StrChar{#1}{##1}[\tmpchar]%
\settowidth{\charwd}{\tmpchar}%
\setlength{\widestcharwd}{\maxof{\widestcharwd}{\charwd}}%
+
+
}%
}
-\NewDocumentCommand\IntCreateBoxNumbers{ m }{%
+\NewDocumentCommand\IntCreateBoxNumbers{ O{c} m }{%
\IfStrEqCase{\PoseOpeBase}{%
{dec}{\IntCalcMaxWidth{0123456789}}%
{bin}{\IntCalcMaxWidth{01}}%
{hex}{\IntCalcMaxWidth{0123456789ABCDEF}}%
}%
\addtolength{\widestcharwd}{\PoseOpeOffset/2}%
- \StrLen{#1}[\tmplennumber]%
+ \StrLen{#2}[\tmplennumber]%
\xintFor* ##1 in {\xintSeq{1}{\tmplennumber}}\do{%
- \StrChar{#1}{##1}[\tmpchiff]%
- \makebox[\the\widestcharwd][c]{\tmpchiff}%
+ \StrChar{#2}{##1}[\tmpchiff]%
+ \makebox[\the\widestcharwd][#1]{\tmpchiff}%
}%
}
@@ -1347,7 +1350,7 @@
\xintifboolexpr{\PoseOpeLimit > 0 }{\StrRight{\rescalcbin}{\PoseOpeLimit}[\rescalcbin]}{}%
%\ensuremath{\begin{array}{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
\ensuremath{\begin{NiceArray}[#3]{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
- \RowStyle[cell-space-limits=0pt]{} & \IntCreateBoxNumbersRetenue{\ListeRetenues} \\[-0.5\heightercharht]
+ \ifboolKV[poseoperation]{AffRetenues}{\RowStyle[cell-space-limits=0pt]{} & \IntCreateBoxNumbersRetenue{\ListeRetenues} \\[-0.5\heightercharht]}{}
\RowStyle[nb-rows=*,cell-space-limits=1pt]{} & \IntCreateBoxNumbers{#1} \\
+ & \IntCreateBoxNumbers{#2} \\
\hline
@@ -1362,8 +1365,72 @@
{bin}{\xdef\rescalcbin{\xintDecToBin{\xinteval{\xintBinToDec{#1}-\xintBinToDec{#2}}}}}%
{hex}{\xdef\rescalcbin{\xintDecToHex{\xinteval{\xintHexToDec{#1}-\xintHexToDec{#2}}}}}%
}%
+ %bourrage de zéros pour les retenues
+ \StrLen{#1}[\lenA]\StrLen{#2}[\lenB]%
+ \xdef\BwithZeros{#2}%
+ \xintifboolexpr{ \lenA > \lenB }%
+ {%
+ \xintFor* ##1 in {\xintSeq{1}{\xinteval{\lenA-\lenB}}}\do{\xdef\BwithZeros{0\BwithZeros}}%
+ }%
+ {}%
+ %suite
\xintifboolexpr{\PoseOpeLimit > 0 }{\StrRight{\rescalcbin}{\PoseOpeLimit}[\rescalcbin]}{}%
%\ensuremath{\begin{array}{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
+ \ifboolKV[poseoperation]{AffRetenues}{%
+ \ensuremath{\begin{NiceArray}[#3]{@{\,}r@{\hspace{\PoseOpeOffset/2}}r@{\,}}
+ \RowStyle[nb-rows=*,cell-space-limits=1pt]{}
+ & \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\IntCalcMaxWidth{0123456789}}%
+ {bin}{\IntCalcMaxWidth{01}}%
+ {hex}{\IntCalcMaxWidth{0123456789ABCDEF}}%
+ }%
+ \addtolength{\widestcharwd}{\PoseOpeOffset/2}%
+ \StrLen{#1}[\tmplennumber]%
+ \xintFor* ##1 in {\xintSeq{1}{\tmplennumber}}\do{%
+ \xdef\tmplenctr{\inteval{\tmplennumber-##1+1}}%
+ \StrChar{#1}{##1}[\tmpchiff]%
+ \StrRight{#1}{\tmplenctr}[\tmpA]%
+ \StrRight{\BwithZeros}{\tmplenctr}[\tmpB]%
+ \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\xdef\rescalctmp{\xinteval{\tmpA-\tmpB}}}%
+ {bin}{\xdef\rescalctmp{\xinteval{\xintBinToDec{\tmpA}-\xintBinToDec{\tmpB}}}}%
+ {hex}{\xdef\rescalctmp{\xinteval{\xintHexToDec{\tmpA}-\xintHexToDec{\tmpB}}}}%
+ }%
+ \xintifboolexpr{ \rescalctmp >= 0 }%
+ {\makebox[\the\widestcharwd][r]{\tmpchiff}}%
+ %{\makebox[\the\widestcharwd][r]{${}_{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}$\kern-0.1em\tmpchiff}}%
+ {\makebox[\the\widestcharwd][r]{\raisebox{-0.5\height}{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}\kern-0.1em\tmpchiff}}%
+ } \\
+ - & \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\IntCalcMaxWidth{0123456789}}%
+ {bin}{\IntCalcMaxWidth{01}}%
+ {hex}{\IntCalcMaxWidth{0123456789ABCDEF}}%
+ }%
+ \addtolength{\widestcharwd}{\PoseOpeOffset/2}%
+ \StrLen{#1}[\tmplennumber]%
+ \StrChar{#2}{\lenB}[\tmplastB]%
+ \xintFor* ##1 in {\xintSeq{1}{\xinteval{\tmplennumber-1}}}\do{%
+ \xdef\tmplenctr{\inteval{\tmplennumber-##1}}%
+ \StrChar{\BwithZeros}{##1}[\tmpchiff]%
+ \StrRight{#1}{\tmplenctr}[\tmpA]%
+ \StrRight{\BwithZeros}{\tmplenctr}[\tmpB]%
+ \IfStrEqCase{\PoseOpeBase}{%
+ {dec}{\xdef\rescalctmp{\xinteval{\tmpA-\tmpB}}}%
+ {bin}{\xdef\rescalctmp{\xinteval{\xintBinToDec{\tmpA}-\xintBinToDec{\tmpB}}}}%
+ {hex}{\xdef\rescalctmp{\xinteval{\xintHexToDec{\tmpA}-\xintHexToDec{\tmpB}}}}%
+ }%
+ \xintifboolexpr{ \rescalctmp >= 0 }%
+ {\makebox[\the\widestcharwd][r]{\xintifboolexpr{ ##1 <= \lenA-\lenB }{}{\tmpchiff}}}%
+ %{\makebox[\the\widestcharwd][r]{${}_{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}$\xintifboolexpr{ ##1 <= \lenA-\lenB }{}{\kern-0.1em\tmpchiff}}}%
+ {\makebox[\the\widestcharwd][r]{\raisebox{-0.5\height}{\textcolor{\PoseOpeColReten}{\scalebox{0.5}[0.5]{\text{1}}}}\xintifboolexpr{ ##1 <= \lenA-\lenB }{\kern0.25em}{\kern-0.1em\tmpchiff}}}%
+ }\makebox[\the\widestcharwd][r]{\tmplastB} \\
+
+ %\IntCreateBoxNumbers{#2} \\
+ \hline
+ \ifboolKV[poseoperation]{AffEgal}{=}{} &\IntCreateBoxNumbers[r]{\rescalcbin} \\
+ \end{NiceArray}}%
+ }%
+ {%
\ensuremath{\begin{NiceArray}[#3]{@{\,}r@{\hspace{\PoseOpeOffset}}r@{\,}}
\RowStyle[nb-rows=*,cell-space-limits=1pt]{}
& \IntCreateBoxNumbers{#1} \\
@@ -1371,6 +1438,7 @@
\hline
\ifboolKV[poseoperation]{AffEgal}{=}{} & \IntCreateBoxNumbers{\rescalcbin} \\
\end{NiceArray}}%
+ }%
%\end{array}}%
}
diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-espace.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-espace.tex
new file mode 100644
index 00000000000..a8b48af2f65
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-espace.tex
@@ -0,0 +1,284 @@
+% proflycee-tools-espace.tex
+% Copyright 2024 Cédric Pierquet
+% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+
+\RequirePackage{iftex}
+
+\ifluatex
+ \RequirePackage{luamplib}%
+ \mplibtextextlabel{enable}%
+ \everymplib{input PfLEspace; beginfig(1);}%
+ \everyendmplib{endfig;}%
+\else%
+ \RequirePackage[shellescape]{gmp}%inclusion de figures metapost "à la volée"%
+ \gmpoptions{everymp={prologues:=3; input PfLEspace;}}%
+\fi%
+
+\defKV[posrelatesp]{Echelle=\def\scaleminischemspace{#1}}
+\setKVdefault[posrelatesp]{Echelle=1}
+
+\NewDocumentCommand\SchemaEspace{ s O{} m }{%
+ \restoreKV[posrelatesp]%
+ \setKV[posrelatesp]{#2}%
+ \ifluatex
+ \IfBooleanTF{#1}%
+ {\def\tmplabelespace##1{\mathscr{##1}}}%
+ {\def\tmplabelespace##1{\mathcal{##1}}}%
+ \mplibforcehmode%
+ \IfStrEqCase{#3}{%
+ {plan}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansimple ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {interplans}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repinterplan ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $\tmplabelespace{Q}$ etex scaled echelle, z9);
+ \end{mplibcode}
+ }%
+ {plan3points}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplantroispoints ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plandroitessecantes}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplandeuxdroites ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plandroitepoint}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplandroite ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plandroitespara}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplandtespara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {droitesnoncopla}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ droitesnoncoplan ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {incidence}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repincidence ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z4+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {droiteparaplans}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdroiteparaplans ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0u,0.025u));
+ label.lft(btex $\tmplabelespace{Q}$ etex scaled echelle, z6+(0u,0.5u));
+ \end{mplibcode}
+ }%
+ {toit}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ reptoit ;
+ \end{mplibcode}
+ }%
+ {planspara}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplanspara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {droiteplanpara}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdteplanpara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {droitesortho}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdtesortho ;
+ \end{mplibcode}
+ }%
+ {droiteorthoplan}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdroiteorthoplan ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mplibcode}
+ }%
+ {plansparadroiteortho}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansparadroiteortho ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {plansparadroitesortho}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repdrtoitesorthoplanspara ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mplibcode}
+ }%
+ {plansperp}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansperp ;
+ label.urt(btex $\tmplabelespace{P}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $\tmplabelespace{Q}$ etex scaled echelle, z9);
+ \end{mplibcode}
+ }%
+ {plansperpplan}{%
+ \begin{mplibcode}
+ u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;
+ repplansperpplan ;
+ label.urt(btex $\tmplabelespace{Q}$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.bot(btex $\tmplabelespace{P}$ etex scaled echelle, z11+(0.2u,0.6u));
+ label.bot(btex $\tmplabelespace{P}'$ etex scaled echelle, z12+(-0.2u,0.8u));
+ \end{mplibcode}
+ }%
+ }%
+ \else
+ \IfStrEqCase{#3}{%
+ {plan}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansimple ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {interplans}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repinterplan ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $Q$ etex scaled echelle, z9);
+ \end{mpost}
+ }%
+ {plan3points}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplantroispoints ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plandroitessecantes}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplandeuxdroites ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plandroitepoint}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplandroite ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plandroitespara}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplandtespara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {droitesnoncopla}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ droitesnoncoplan ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {incidence}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repincidence ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z4+(0.1u,0u));
+ \end{mpost}
+ }%
+ {droiteparaplans}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdroiteparaplans ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0u,0.025u));
+ label.lft(btex $Q$ etex scaled echelle, z6+(0u,0.5u));
+ \end{mpost}
+ }%
+ {toit}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ reptoit ;
+ \end{mpost}
+ }%
+ {planspara}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplanspara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mpost}
+ }%
+ {droiteplanpara}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdteplanpara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {droitesortho}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdtesortho ;
+ \end{mpost}
+ }%
+ {droiteorthoplan}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdroiteorthoplan ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ \end{mpost}
+ }%
+ {plansparadroiteortho}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansparadroiteortho ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mpost}
+ }%
+ {plansparadroitesortho}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repdrtoitesorthoplanspara ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.urt(btex $Q$ etex scaled echelle, z10+(0.1u,0u));
+ \end{mpost}
+ }%
+ {plansperp}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansperp ;
+ label.urt(btex $P$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.rt(btex $Q$ etex scaled echelle, z9);
+ \end{mpost}
+ }%
+ {plansperpplan}{%
+ \begin{mpost}[mpsettings={u=\scaleminischemspace*1cm;echelle=\scaleminischemspace;}]
+ repplansperpplan ;
+ label.urt(btex $Q$ etex scaled echelle, z0+(0.1u,0.025u));
+ label.bot(btex $P$ etex scaled echelle, z11+(0.2u,0.6u));
+ label.bot(btex $P'$ etex scaled echelle, z12+(-0.2u,0.8u));
+ \end{mpost}
+ }%
+ }%
+ \fi
+}
+
+\endinput \ No newline at end of file
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 f0011170eb2..d325b88e744 100644
--- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex
+++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex
@@ -2,6 +2,7 @@
% Copyright 2023-2024 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+%3.02e Thonny via piton + modification clé gobble ?
%3.01f PseudoCode via piton (?)
%3.01e Correction du comportement de la console repl piton/pyluatex
%2.7.6 Correction du comportement de la console, avec une meilleure gestion de la largeur ^^ (merci à ablasz ;-))
@@ -24,14 +25,15 @@
Style=\def\CODPITstyle{#1},%
Titre=\def\CODPITtitre{#1},%
EspacementV=\def\CODPITespV{#1},%
- CouleurNombres=\def\CODPITcolnb{#1}
+ CouleurNombres=\def\CODPITcolnb{#1},%
+ Gobble=\def\CODPITgobble{#1}
}
\setKVdefault[envpiton]{%
Largeur=\linewidth,%
Alignement=center,%
Lignes=true,%
- Gobble=true,%
+ Gobble={tabs},%
TaillePolice=\footnotesize,%
Filigrane=false,%
Style=Classique,%
@@ -87,14 +89,15 @@
TaillePolice=\def\CODPITPCfonte{#1},%
Style=\def\CODPITPCstyle{#1},%
Titre=\def\CODPITPCtitre{#1},%
- EspacementV=\def\CODPITPCespV{#1}
+ EspacementV=\def\CODPITPCespV{#1},%
+ Gobble=\def\CODPITPCgobble{#1}
}
\setKVdefault[envpcpiton]{%
Largeur=\linewidth,%
Alignement=center,%
Lignes=true,%
- Gobble=true,%
+ Gobble={tabs},%
TaillePolice=\footnotesize,%
Filigrane=false,%
Style=Classique,%
@@ -158,12 +161,23 @@
%------les styles piton
\SetPitonStyle{ Number = \color{\CODPITcolnb} }
\ifboolKV[envpiton]{Lignes}%si lignes=true
- {\PitonOptions{left-margin=0.75em,all-line-numbers,line-numbers={#3}}}%left-margin=auto,
- {}%
- \ifboolKV[envpiton]{Gobble}%si gobble=true
- {\PitonOptions{tabs-auto-gobble}}%
+ {\PitonOptions{left-margin=0.75em,line-numbers={skip-empty-lines=false,label-empty-lines=true,#3}}}%left-margin=auto,
{}%
- \PitonOptions{break-lines,indent-broken-lines}%,numbers-sep=0.65em}%language=Python}
+ %\ifboolKV[envpiton]{Gobble}%si gobble=true
+ % {\PitonOptions{}}%
+ % {}%
+ %--gestion du gobble
+ \IfStrEqCase{\CODPITgobble}{%
+ {auto}{\PitonOptions{auto-gobble}}%
+ {env}{\PitonOptions{env-gobble}}%
+ {tabs}{\PitonOptions{tabs-auto-gobble}}%
+ {tabs-auto}{\PitonOptions{tabs-auto-gobble,auto-gobble}}%
+ {auto-tabs}{\PitonOptions{auto-gobble,tabs-auto-gobble}}%
+ {all}{\PitonOptions{auto-gobble,tabs-auto-gobble,env-gobble}}%
+ }
+ \IfInteger{\CODPITgobble}{\PitonOptions{gobble=\CODPITgobble}}{}%
+ %--fin gestion du gobble
+ \PitonOptions{break-lines,indent-broken-lines,continuation-symbol={}}%,numbers-sep=0.65em}%language=Python}
%------les styles tcbox
\IfEq{\CODPITstyle}{Moderne}%style Moderne (défaut)
{%
@@ -213,7 +227,7 @@
\useKVdefault[envpcpiton]%
\setKV[envpcpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
%------les styles piton
- \PitonOptions{break-lines,indent-broken-lines,language=minimal}%,numbers-sep=0.65em}%
+ \PitonOptions{break-lines,indent-broken-lines,language=minimal,continuation-symbol={}}%,numbers-sep=0.65em}%
\SetPitonStyle{ Number = }
\ifboolKV[envpcpiton]{Couleurs}%
{%
@@ -247,9 +261,20 @@
\ifboolKV[envpcpiton]{Lignes}%si lignes=true
{\PitonOptions{left-margin=0.75em,all-line-numbers,line-numbers={#3}}}%left-margin=auto,
{}%
- \ifboolKV[envpcpiton]{Gobble}%si gobble=true
- {\PitonOptions{tabs-auto-gobble}}%
- {}%
+ %\ifboolKV[envpcpiton]{Gobble}%si gobble=true
+ % {\PitonOptions{auto-gobble}}%
+ % {}%
+ %--gestion du gobble
+ \IfStrEqCase{\CODPITPCgobble}{%
+ {auto}{\PitonOptions{auto-gobble}}%
+ {env}{\PitonOptions{env-gobble}}%
+ {tabs}{\PitonOptions{tabs-auto-gobble}}%
+ {tabs-auto}{\PitonOptions{tabs-auto-gobble,auto-gobble}}%
+ {auto-tabs}{\PitonOptions{auto-gobble,tabs-auto-gobble}}%
+ {all}{\PitonOptions{auto-gobble,tabs-auto-gobble,env-gobble}}%
+ }
+ \IfInteger{\CODPITPCgobble}{\PitonOptions{gobble=\CODPITPCgobble}}{}%
+ %--fin gestion du gobble
%------les styles tcbox
\IfEq{\CODPITPCstyle}{Moderne}%style Moderne (défaut)
{%
@@ -295,7 +320,7 @@
%======CONSOLE PYLUATEX (package à charger manuellement !!)
\tcbset{consolepylua/.style={%base de la boîte
enhanced,colback=white,colframe=CouleurVertForet,sharp corners,boxrule=1pt,%
- top=1.5mm,bottom=1.5mm,left=2mm,right=2mm,fontupper=\footnotesize,%
+ top=1.5mm,bottom=1.5mm,left=2mm,right=3mm,fontupper=\footnotesize,%
before skip=0.5\baselineskip,after skip=0.5\baselineskip,%
}
}
@@ -335,7 +360,7 @@
{
\restoreKV[consolepyluatex]% revenir au valeurs par défaut
\setKV[consolepyluatex]{#2}% lit les arguments optionnels
- \PitonOptions{width={\ConsPyluaLarg-4mm},break-lines,end-of-broken-line={},continuation-symbol={},#1}
+ \PitonOptions{width={\ConsPyluaLarg-5mm},break-lines,end-of-broken-line={},continuation-symbol={},#1}
\PyLTVerbatimEnv
\ifboolKV[consolepyluatex]{Logo}
{%
@@ -346,16 +371,86 @@
}%
% {\tcbset{consolepyluatexlogo,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}}
% {\tcbset{consolepyluatex,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}}
- \begin{pythonrepl}%
+ \begin{pythonrepl}%
}
{
\end{pythonrepl}%
\directlua{
- tex.print("\\begin{Piton}")
- tex.print(pyluatex.get_last_output())
- tex.print("\\end{Piton}")
+ tex.print("\\begin{Piton}")
+ tex.print(pyluatex.get_last_output())
+ tex.print("\\end{Piton}"
+ )
+ }%
+ \end{tcolorbox}%
+}
+
+%====PITONTHONNY
+\newlength{\LargeurNumbersThonny}
+
+\defKV[pitonthonny]{%
+ NomFichier=\def\thonnypitonfilename{#1},%
+ NomConsole=\def\thonnypitonshellname{#1},%
+ IntroConsole=\def\thonnypitonintroconsole{#1},%
+ Gobble=\def\thonnypitongobble{#1}
+}
+
+\setKVdefault[pitonthonny]{%
+ NomFichier=script.py,%
+ NomConsole=console,%
+ IntroConsole={Python 3.11.6 /usr/bin/python},%
+ Gobble={tabs}
+}
+
+\NewPitonEnvironment{PitonThonnyEditor}{ D<>{} O{} m }%
+{%
+ \restoreKV[pitonthonny]%
+ \setKV[pitonthonny]{#1}%
+ \settowidth{\LargeurNumbersThonny}{\footnotesize\texttt{00}}%
+ \PitonOptions{left-margin=\LargeurNumbersThonny+1mm,line-numbers={skip-empty-lines=false,label-empty-lines=true},break-lines,indent-broken-lines,continuation-symbol={}}%
+ %--gestion du gobble
+ \IfStrEqCase{\thonnypitongobble}{%
+ {auto}{\PitonOptions{auto-gobble}}%
+ {env}{\PitonOptions{env-gobble}}%
+ {tabs}{\PitonOptions{tabs-auto-gobble}}%
+ {tabs-auto}{\PitonOptions{tabs-auto-gobble,auto-gobble}}%
+ {auto-tabs}{\PitonOptions{auto-gobble,tabs-auto-gobble}}%
+ {all}{\PitonOptions{auto-gobble,tabs-auto-gobble,env-gobble}}%
+ }
+ \IfInteger{\thonnypitongobble}{\PitonOptions{gobble=\thonnypitongobble}}{}%
+ %--fin gestion du gobble
+ \tcbset{tcbthonnypiton/.style={title=\vphantom{pf}\thonnypitonfilename\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
+ %\noindent%
+ \tcolorbox[sharp corners=all,enhanced,size=small,width=#3,colframe=gray,colback=lightgray!5,tcbthonnypiton,fonttitle=\scriptsize\sffamily,coltitle=black,
+ attach boxed title to top left={yshift*=-0.4pt},fontupper=\footnotesize,bottom=-0.25mm,#2,boxed title style={size=tight,colback=lightgray!15,sharp corners=all,boxrule=0.4pt,boxsep=2pt},boxrule=0.4pt,overlay={\begin{tcbclipinterior}\fill[draw=none,gray!25] ([shift={(0.4pt,0.4pt)}]frame.south west) rectangle ([shift={(\LargeurNumbersThonny+1mm+0.8pt,-0.4pt)}]frame.north west) ;\end{tcbclipinterior}}]%
+}%
+{%
+ \endtcolorbox%
+}%
+
+\NewDocumentEnvironment{PitonThonnyConsole}{ D<>{} O{} m }%
+{
+ \restoreKV[pitonthonny]%
+ \setKV[pitonthonny]{#1}%
+ \PyLTVerbatimEnv%
+ \tcbset{tcbthonnypitonconsole/.style={title=\vphantom{pf}\thonnypitonshellname\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
+ \noindent%
+ \PitonOptions{width={#3-5mm},break-lines,end-of-broken-line={},continuation-symbol={}}%
+ \tcolorbox[sharp corners=all,enhanced,size=small,width=#3,colframe=gray,colback=white,tcbthonnypitonconsole,fonttitle=\scriptsize\sffamily,coltitle=black,
+ attach boxed title to top left={yshift*=-0.4pt},fontupper=\footnotesize,bottom=-0.25mm,#2,boxed title style={size=tight,colback=lightgray!15,sharp corners=all,boxrule=0.4pt,boxsep=2pt},boxrule=0.4pt,top=1mm]%
+ \textcolor{gray}{\texttt{\thonnypitonintroconsole}}
+ \begin{pythonrepl}
+}
+{
+ \end{pythonrepl}
+ \directlua
+ {
+ tex.print("\\begin{Piton}")
+ tex.print(pyluatex.get_last_output())
+ tex.print("\\end{Piton}")
+ tex.print("")
}%
- \end{tcolorbox}
+ \ignorespacesafterend%
+ \endtcolorbox%
}
\fi