diff options
author | Norbert Preining <norbert@preining.info> | 2023-12-01 03:00:49 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-12-01 03:00:49 +0000 |
commit | cddec35d9b4df3b6e5a4ebb36db9bab6fd409269 (patch) | |
tree | c5c35e2bd772a5f43a4ed3ef3410a49bad1a6829 /macros/latex/contrib/proflycee/tex | |
parent | ff7e60f3d1af3d5bbcc9c125c01a063391a30cc5 (diff) |
CTAN sync 202312010300
Diffstat (limited to 'macros/latex/contrib/proflycee/tex')
4 files changed, 34 insertions, 15 deletions
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index cd11a8d3d5..1a9535be02 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/18 3.00f Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2023/11/30 3.00g Aide pour l'utilisation de LaTeX en lycee] +% 3.00g Amélioration de la marge Gauche dans le PseudoCode % 3.00f Conversion d'une écriture décimale périodique en fraction (avec rédaction éventuelle) % 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 diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex index c6be201f71..81495669ba 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-listings.tex @@ -2,6 +2,7 @@ % Copyright 2023 Cédric Pierquet % Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt +%3.00g Amélioration marge gauche PseudoCode %2.7.5 Ajout de clés pour PythonLst + Couleurs optionnelles pour PseudoCode %2.7.3 Correction de la couleur des bordures %2.5.8 Styles alternatifs + Modification marges @@ -91,19 +92,24 @@ \tcbset{stylepythonlstlineos/.style={% stylepythonlst, - listing options={style=PLpython,xleftmargin=16pt,numbers=left} + listing options={style=PLpython,xleftmargin=\PythonCodeXLeft,numbers=left} } } +\newlength{\PythonCodeXLeft} +\setlength{\PythonCodeXLeft}{14pt} + %test v3 avec simplekv \defKV[CodePythonLst]{% Largeur=\def\CodePythonLstLarg{#1},% - PremLigne=\def\CodePythonLstFirstLine{#1} + PremLigne=\def\CodePythonLstFirstLine{#1}, + EspaceNum=\setlength{\PythonCodeXLeft}{#1} } \setKVdefault[CodePythonLst]{% Largeur=\linewidth,% - PremLigne=1 + PremLigne=1,% + EspaceNum=14pt } \NewDocumentEnvironment{CodePythonLst}{ s O{} m }%nouvelle version avec clés listings @@ -115,7 +121,7 @@ \tcblisting{stylepythonlst,listing options={style=PLpython,xleftmargin=0pt,numbers=none},width=\CodePythonLstLarg,#3} }% {% - \tcblisting{stylepythonlst,listing options={style=PLpython,xleftmargin=16pt,numbers=left,firstnumber=\CodePythonLstFirstLine},width=\CodePythonLstLarg,#3} + \tcblisting{stylepythonlst,listing options={style=PLpython,xleftmargin=\PythonCodeXLeft,numbers=left,firstnumber=\CodePythonLstFirstLine},width=\CodePythonLstLarg,#3} }% }% {% @@ -194,7 +200,7 @@ }% {% \tcblisting{StylPythonB, - listing options={style=PLpython,xleftmargin=16pt,numbers=left,firstnumber=\CodePythonLstFirstLine},% + listing options={style=PLpython,xleftmargin=\PythonCodeXLeft,numbers=left,firstnumber=\CodePythonLstFirstLine},% underlay={% \begin{tcbclipinterior} \draw[draw=none,fill=lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; @@ -245,7 +251,7 @@ keepspaces = true, tabsize = 4, numbersep = 10pt, - xleftmargin = 14pt, + xleftmargin = \PseudoCodeXLeft, numbers = left, morestring = [b]", showstringspaces = false, @@ -267,15 +273,20 @@ escapeinside = {(*}{*)} } +\newlength{\PseudoCodeXLeft} +\setlength{\PseudoCodeXLeft}{14pt} + \defKV[CodePseudoCodeLst]{% Largeur=\def\CodePseudoCodeLstLarg{#1},% - PremLigne=\def\CodePseudoCodeLstFirstLine{#1} + PremLigne=\def\CodePseudoCodeLstFirstLine{#1},% + EspaceNum=\setlength{\PseudoCodeXLeft}{#1} } \setKVdefault[CodePseudoCodeLst]{% Largeur=\linewidth,% PremLigne=1,% - Couleur=false + Couleur=false,% + EspaceNum=14pt } %style tcbox pseudocode avec bannière hautdroite @@ -406,7 +417,7 @@ %stringstyle = \color{red!75}, keepspaces = true, tabsize = 4, - xleftmargin = 1.5em, + xleftmargin = \PseudoCodeXLeft, numbers = left, morestring = [b]", showstringspaces = false, diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex index 87c152c191..98bf736609 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex @@ -2,13 +2,17 @@ % Copyright 2023 Cédric Pierquet % Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt -% 2.7.5 Argument optionnel pour les numéros de lignes + changement déclaration environnements +%3.00g Modif mineure pour la marge gauche +%2.7.5 Argument optionnel pour les numéros de lignes + changement déclaration environnements %2.7.3 Correction de la couleur des bordures %2.5.8 Style alternatif + Modification marges %%------PYTHONMINTED %clés +%\newlength{\MintedCodeXLeft} +%\setlength{\MintedCodeXLeft}{14pt} + \defKV[CodePythonMinted]{% Largeur=\def\CodePythonMintedLarg{#1},% PremLigne=\def\CodePythonMintedPremLigne{#1} @@ -30,7 +34,7 @@ \tcbset{pytminted/.style={% listing engine=minted,minted style=colorful, minted language=python,listing only, - minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=16pt,linenos,numbersep=10pt}, + minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=14pt,linenos,numbersep=10pt}, } } @@ -57,7 +61,7 @@ } }% {% - \tcblisting{listing engine=minted,minted style=colorful,minted language=python,listing only,minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=16pt,linenos,numbersep=10pt,firstnumber=\CodePythonMintedPremLigne},,enhanced,width=\CodePythonMintedLarg,#3,colframe=CouleurVertForet,colback=CouleurVertForet!5,boxrule=1.25pt,sharp corners=downhill,arc=12pt,before skip=0.5\baselineskip,after skip=0.5\baselineskip,% + \tcblisting{listing engine=minted,minted style=colorful,minted language=python,listing only,minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=14pt,linenos,numbersep=10pt,firstnumber=\CodePythonMintedPremLigne},,enhanced,width=\CodePythonMintedLarg,#3,colframe=CouleurVertForet,colback=CouleurVertForet!5,boxrule=1.25pt,sharp corners=downhill,arc=12pt,before skip=0.5\baselineskip,after skip=0.5\baselineskip,% left=0.6em,top=\baselineskip,bottom=2mm,right=5mm,% attach boxed title to top right={yshift=-\tcboxedtitleheight}, boxed title style={ @@ -111,7 +115,7 @@ \tcbset{pytmintedalt/.style={% listing engine=minted,minted style=colorful, minted language=python,listing only, - minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=16pt,linenos,numbersep=10pt}, + minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=14pt,linenos,numbersep=10pt}, underlay={% \begin{tcbclipinterior} \draw[draw=none,fill=lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; @@ -131,7 +135,7 @@ {% \tcblisting{listing engine=minted,minted style=colorful, minted language=python,listing only, - minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=16pt,linenos,numbersep=10pt,firstnumber=\CodePythonMintedPremLigne}, + minted options={tabsize=4,fontsize=\footnotesize,autogobble,xleftmargin=14pt,linenos,numbersep=10pt,firstnumber=\CodePythonMintedPremLigne}, underlay={% \begin{tcbclipinterior} \draw[draw=none,fill=lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex index ba19e70223..8f865f0020 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-pythontex.tex @@ -24,6 +24,9 @@ EspacementVertical=1 } +\newlength{\PythontexCodeXLeft} +\setlength{\PythontexCodeXLeft}{14pt} + \newenvironment{ConsolePythontex}[2][] {% \useKVdefault[envpythonconsole]% |