summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-11-04 19:59:10 +0000
committerKarl Berry <karl@freefriends.org>2022-11-04 19:59:10 +0000
commit4e9d6ecaf1ba5eab5073913c855ab2a5a267f12e (patch)
treeb9f29662720ea90dcd2baf446ac9b92769428066 /Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
parentec15621ba0703851d4eb60c85e0ebe016192ed03 (diff)
proflycee (4nov22)
git-svn-id: svn://tug.org/texlive/trunk@64932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty')
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty29
1 files changed, 28 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
index 43391bc2b5b..3b5cce2d142 100644
--- a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
+++ b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2022/10/18 v1.3.6 - Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2022/11/02 v1.3.7 - Aide pour l'utilisation de LaTeX en lycee]
+% 1.3.7 Ajout d'un environnement simplifié pour du code python via piton
% 1.3.6 Ajout d'un "générateur" de trinômes (ou mise en forme basique)
% 1.3.5 Correction de bugs sur les calculs de probas (loi géométrique)
% 1.3.4 Ajout des calculs de probas geomtriques et hypergeometriques + petits schémas probas
@@ -99,6 +100,7 @@
%divers
\RequirePackage{ifluatex}
%python
+\RequirePackage{piton}
\RequirePackage{fancyvrb}
\RequirePackage[gobble=auto]{pythontex}
\setpythontexlistingenv{pythont} %pour ne pas télescoper lstlistings (?)
@@ -573,6 +575,31 @@
width=#2,#3,
listing file={#4}}
+%=========PYTHONPITON========== OK !!
+\defKV[envpiton]{%
+ Largeur=\def\CODPITlargeur{#1},%
+ Alignement=\def\CODPITalign{#1}
+}
+
+\setKVdefault[envpiton]{%
+ Largeur=\linewidth,%
+ Alignement=center,%
+ Lignes=true
+}
+
+\NewPitonEnvironment{envcodepiton}{ O{} }%
+ {%
+ \useKVdefault[envpiton]%
+ \setKV[envpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
+ \ifboolKV[envpiton]{Lignes}%si lignes=true
+ {\PitonOptions{left-margin=12.75pt,line-numbers}}%
+ {\PitonOptions{}}%
+ \begin{tcolorbox}[stylepythontex,leftupper=8pt,colframe=Green,colback=ForestGreen!5,width=\CODPITlargeur,fontlower=\small,\CODPITalign]
+ }%
+ {%
+ \end{tcolorbox}%
+ }
+
%=========PSEUDOCODE=========== OK !!
%language pseudocode listings
\lstdefinestyle{pseudocodePL}{%