diff options
author | Karl Berry <karl@freefriends.org> | 2023-04-07 20:52:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-04-07 20:52:12 +0000 |
commit | d0423c83954c22e45edf84971856e193c12df1c3 (patch) | |
tree | a2a25aba61ddaf9ff65f70ec6a36679526fd8fc1 /Master/texmf-dist/tex/latex/proflycee | |
parent | 345569beab9a6d088e2ed3af8db9adb7dcab9155 (diff) |
proflycee (7apr23)
git-svn-id: svn://tug.org/texlive/trunk@66792 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/proflycee')
5 files changed, 475 insertions, 237 deletions
diff --git a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty index b91ab7816da..f553031e8ce 100644 --- a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty +++ b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty @@ -3,8 +3,10 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2023/04/04 2.5.7 Aide pour l'utilisation de LaTeX en lycee] -% 2.5.7 Ajout d'un style classique pour le code python (Piton + ...) + console piton/pyluatex +\ProvidesPackage{ProfLycee}[2023/04/06 2.5.8 Aide pour l'utilisation de LaTeX en lycee] +% 2.5.8 Ajout du style Classique pour PythonLst (externalisation listings) + Modification marges CodePiton (1.5) +% Refonte des commandes pour les codes pour éviter des soucis avec les étoilées +% 2.5.7 Ajout d'un style classique pour le code python (Piton) + console piton/pyluatex % Refonte des commandes tcbset pour les codes % 2.5.6 Ajout d'une clé [Trigo] pour \AxexTikz (avec graduations libres) % "Suppression" de la fenêtre XCas de la documentation @@ -114,22 +116,8 @@ {}% } -%%------PRESENTATIONDECODES -\NewTCBListing{PresentationCode}{ O{ForestGreen} m }{% - sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,% - colback=#1!5!white,colframe=#1!75!black,colbacklower=White,% - attach boxed title to top right={yshift=-\tcboxedtitleheight},title=Code \LaTeX,% - boxed title style={% - colframe=#1!75!black,colback=#1!15!white,% - ,sharp corners=downhill,arc=12pt,% - },% - fonttitle=\color{#1!90!black}\itshape\ttfamily\footnotesize,% - listing options={% - style=tcblatex,basicstyle=\footnotesize\ttfamily,% - keywordstyle=\bfseries\color{Blue},tabsize=2,% - },% - #2 -} +%%------Codes listings +\input{proflycee-tools-listings.tex} %%------SPLINES %commande utile pour extraire des infos d'une liste @@ -318,10 +306,6 @@ \IfStrEq{\CFposcmd}{right}%si poscmd=right {\draw (C3\CFL) node[left,\CFcoulcmd,font=\CFtaille] {#2} ;} {} - %LA LIGNE DE SÉPARATION - %\ifboolKV[paramfenxcas]{Sep}%si sep=true - % {\draw[\CFcouleur] (A1\CFL) -- (A4\CFL);} - % {} %LE RÉSULTAT \IfStrEq{\CFposres}{centre}%si posrep=center {\draw (R2\CFL) node[\CFcoulres,font=\CFtaille] {#3} ;} @@ -347,186 +331,6 @@ {} } -%%------STYLE ALGO LST -\ifluatex - \tcbuselibrary{listings} - \lstdefinelanguage{langnat}{% - keywords={}, - inputencoding=utf8, - comment=[l]{}} - \lstdefinestyle{PLpython}{% - language = python, - inputencoding = utf8, - basicstyle = \ttfamily\footnotesize, - keywordstyle = \color{ForestGreen}, - keywordstyle = [2]\color{magenta}, - commentstyle = \color{gray}\itshape, - stringstyle = \color{red!75}, - numberstyle = \scriptsize\ttfamily\color{Green}, - aboveskip = 0pt, - belowskip = 0pt, - tabsize = 4, - showstringspaces = false, - columns = fullflexible, - keepspaces = true, - breaklines = true, - breakatwhitespace = true - } -\else - \tcbuselibrary{listingsutf8} - \lstdefinelanguage{langnat}{% - keywords={}, - inputencoding=utf8/latin1, - comment=[l]{}} - \lstdefinestyle{PLpython}{% - language = python, - inputencoding = utf8/latin1, - basicstyle = \ttfamily\footnotesize, - keywordstyle = \color{ForestGreen}, - keywordstyle = [2]\color{magenta}, - commentstyle = \color{gray}\itshape, - stringstyle = \color{red!75}, - numberstyle = \scriptsize\ttfamily\color{Green}, - aboveskip = 0pt, - belowskip = 0pt, - tabsize = 4, - showstringspaces = false, - columns = fullflexible, - keepspaces = true, - breaklines = true, - breakatwhitespace = true - } -\fi - -%%------PYTHONLISTINGS -\tcbset{stylepythonlst/.style={% - enhanced,boxrule=1.25pt,% - leftupper=10pt, - sharp corners=downhill,arc=12pt, - before skip=12pt,after skip=12pt,% - top=10pt,bottom=1mm,rightupper=4pt,%leftupper=25pt, - attach boxed title to top right={yshift=-\tcboxedtitleheight}, - boxed title style={ - size=small,colback=ForestGreen!25,boxrule=1.25pt, - colframe=Green,boxsep=1.25pt, - sharp corners=downhill, - arc=12pt, - top=2pt,bottom=1pt,left=6pt,right=6pt - }, - colframe=Green,colback=ForestGreen!5,% - fonttitle=\color{ForestGreen}\itshape\ttfamily\footnotesize, - title={\scriptsize\faPython}\:Code Python\vphantom{p}, - watermark text={\faPython},watermark opacity=0.175,watermark zoom=0.50, - listing only,listing engine=listings,% - } -} - -\tcbset{stylepythonlstnolineos/.style={% - stylepythonlst, - listing options={style=PLpython,xleftmargin=0pt,numbers=none} - } -} - -\tcbset{stylepythonlstlineos/.style={% - stylepythonlst, - listing options={style=PLpython,xleftmargin=16pt,numbers=left} - } -} - -\NewTCBListing{CodePythonLst}{ s O{\linewidth} m }{% * off pour numéros de lignes + {largeur} + <options tcbox> - \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, - width=#2,#3 -} - -\NewTCBInputListing{\CodePythonLstFichier}{ s O{\linewidth} m m }{ - \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, - width=#2,#3, - listing file={#4} -} - -%%------PSEUDOCODE -%language pseudocode listings -\lstdefinestyle{pseudocodePL}{% - language=langnat, - basicstyle=\footnotesize\ttfamily, - numberstyle=\scriptsize\ttfamily\color{gray}, - keywordstyle=\bfseries, - stringstyle=\color{red!75}, - keepspaces=true, - tabsize=4,numbersep=10pt, - xleftmargin=14pt, - numbers=left, - morestring=[b]", - showstringspaces=false, - %showtabs=false, - escapeinside={(*}{*)} -} - -\lstdefinestyle{pseudocodenoPL}{% - language=langnat, - basicstyle=\footnotesize\ttfamily, - numberstyle=\scriptsize\ttfamily\color{gray}, - keywordstyle=\bfseries, - stringstyle=\color{red!75}, - keepspaces=true, - tabsize=4,numbersep=10pt, - numbers=none, - showstringspaces=false, - morestring=[b]", - %showtabs=true, - escapeinside={(*}{*)} -} - -%style tcbox pseudocode avec bannière hautdroite -\tcbset{stylepseudocodePL/.style={% - %fontupper=\small\sffamily,% - enhanced,boxrule=1.25pt,sharp corners=downhill,arc=12pt, - before skip=12pt,after skip=12pt,leftupper=10pt,top=8pt,bottom=2pt,rightupper=4pt,% - attach boxed title to top right={yshift=-\tcboxedtitleheight}, - boxed title style={ - size=small,colback=gray!25,boxrule=1.25pt, - colframe=darkgray,boxsep=1.25pt, - sharp corners=downhill, - arc=12pt, - top=2pt,bottom=1pt,left=6pt,right=6pt - }, - fonttitle=\color{darkgray}\ttfamily\footnotesize, - title={\scriptsize\faFileCode}\:\textit{Pseudo-Code}\vphantom{p}, - watermark text={\faCode},watermark opacity=0.175,watermark zoom=0.50, - } -} - -\ifluatex - \newcommand\algomathttPL[1]{\symtt{#1}} -\else - \newcommand\algomathttPL[1]{\mathtt{#1}} -\fi - -\DeclareTCBListing{PseudoCode}{ s O{12cm} O{} }{% étoilée sans numéro, <taille> puis option... - width=#2,#3, - stylepseudocodePL, - listing only,listing engine=listings, - listing options={ - style=\IfBooleanTF{#1}{pseudocodenoPL}{pseudocodePL},%version étoilée sans numéro de lignes - aboveskip=2pt,belowskip=2pt, - columns=fullflexible, - literate={é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1% - {ú}{{\'u}}1 {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1% - {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1% - {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1% - {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1% - {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1% - {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1% - {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1% - {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1% - {ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1% - {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1% - {€}{{\texteuro}}1 {£}{{\pounds}}1% - {=}{\textleftarrow}1 {==}{=}1% - {*}{$\algomathttPL{\times}$}{1}% - } -} - %%------FakeTerm %couleurs (inspirées par termsim !) \definecolor{PLmpurple}{RGB}{48,10,36} diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex new file mode 100644 index 00000000000..c6d706417a9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex @@ -0,0 +1,333 @@ +% proflycee-tools-piton.tex +% Copyright 2023 Cédric Pierquet +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. + +%2.5.8 Styles alternatifs + Modification marges + +\RequirePackage{iftex} + +%%------STYLE PYTHON LST +\ifluatex +\tcbuselibrary{listings} +\lstdefinelanguage{langnat}{% + keywords={}, + inputencoding=utf8, + comment=[l]{}} +\lstdefinestyle{PLpython}{% + language = python, + inputencoding = utf8, + basicstyle = \ttfamily\footnotesize, + keywordstyle = \color{ForestGreen}, + keywordstyle = [2]\color{magenta}, + commentstyle = \color{gray}\itshape, + stringstyle = \color{red!75}, + numberstyle = \scriptsize\ttfamily\color{darkgray}, + aboveskip = 0pt, + belowskip = 0pt, + tabsize = 4, + showstringspaces = false, + columns = fullflexible, + keepspaces = true, + breaklines = true, + breakatwhitespace = true +} +\else +\tcbuselibrary{listingsutf8} +\lstdefinelanguage{langnat}{% + keywords={}, + inputencoding=utf8/latin1, + comment=[l]{}} +\lstdefinestyle{PLpython}{% + language = python, + inputencoding = utf8/latin1, + basicstyle = \ttfamily\footnotesize, + keywordstyle = \color{ForestGreen}, + keywordstyle = [2]\color{magenta}, + commentstyle = \color{gray}\itshape, + stringstyle = \color{red!75}, + numberstyle = \scriptsize\ttfamily\color{darkgray}, + aboveskip = 0pt, + belowskip = 0pt, + tabsize = 4, + showstringspaces = false, + columns = fullflexible, + keepspaces = true, + breaklines = true, + breakatwhitespace = true +} +\fi + +%%------PYTHONLISTINGS +%v1 +\tcbset{stylepythonlst/.style={% + enhanced,boxrule=1.25pt,% + left=0.6em, + sharp corners=downhill,arc=12pt, + before skip=\baselineskip,after skip=\baselineskip,% + top=\baselineskip,bottom=1mm,right=5mm, + attach boxed title to top right={yshift=-\tcboxedtitleheight}, + boxed title style={ + size=small,colback=ForestGreen!25,boxrule=1.25pt, + colframe=Green,boxsep=1.25pt, + sharp corners=downhill, + arc=12pt, + top=2pt,bottom=1pt,left=6pt,right=6pt + }, + colframe=Green,colback=ForestGreen!5,% + fonttitle=\color{ForestGreen}\itshape\ttfamily\footnotesize, + title={\scriptsize\faPython}\:Code Python\vphantom{p}, + watermark text={\faPython},watermark opacity=0.175,watermark zoom=0.50, + listing only,listing engine=listings,% + } +} + +\tcbset{stylepythonlstnolineos/.style={% + stylepythonlst, + listing options={style=PLpython,xleftmargin=0pt,numbers=none} + } +} + +\tcbset{stylepythonlstlineos/.style={% + stylepythonlst, + listing options={style=PLpython,xleftmargin=16pt,numbers=left} + } +} + +\NewTCBListing{CodePythonLst}{ s O{\linewidth} m }{% * off pour numéros de lignes + {largeur} + <options tcbox> + \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, + width=#2,#3 +} + +\NewTCBInputListing{\CodePythonLstFichier}{ s O{\linewidth} m m }{ + \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, + width=#2,#3, + listing file={#4} +} + +%v2 +\tcbset{StylPythonB/.style={% + enhanced,boxrule=0.75pt,colframe=DarkGray!50!Black,% + sharp corners,top=0mm,bottom=0mm,left=0.2em,right=5mm,% + before skip=\baselineskip,after skip=\baselineskip,% + colback=white, + fontupper=\footnotesize,fontlower=\footnotesize,% + listing only,listing engine=listings,% + watermark text={\faPython},watermark opacity=0.25,watermark zoom=0.50,% + title={{\scriptsize\faCode} Code Python}, + lefttitle=0.4em, + fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!50!Black + } +} + +\tcbset{StylPythonBno/.style={% + StylPythonB, + listing options={style=PLpython,xleftmargin=0pt,numbers=none} + } +} + +\tcbset{StylPythonByes/.style={% + StylPythonB, + listing options={style=PLpython,xleftmargin=16pt,numbers=left},% + underlay={% + \begin{tcbclipinterior} + \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \end{tcbclipinterior}% + } + } +} + +\NewTCBListing{CodePythonLstAlt}{ s O{\linewidth} m }{% * off pour numéros de lignes + {options keys} + <options tcbox> + \IfBooleanTF{#1}{StylPythonBno}{StylPythonByes},width=#2,#3 +} + +\NewTCBInputListing{\CodePythonLstFichierAlt}{ s O{\linewidth} m m }{ + \IfBooleanTF{#1}{StylPythonBno}{StylPythonByes}, + width=#2,#3, + listing file={#4} +} + +%%------PSEUDOCODE +%language pseudocode listings +\lstdefinestyle{pseudocodePL}{% + language = langnat, + basicstyle = \footnotesize\ttfamily, + numberstyle = \scriptsize\ttfamily\color{gray}, + keywordstyle = \bfseries, + stringstyle = \color{red!75}, + keepspaces = true, + tabsize = 4, + numbersep = 10pt, + xleftmargin = 14pt, + numbers = left, + morestring = [b]", + showstringspaces = false, + escapeinside = {(*}{*)} +} + +\lstdefinestyle{pseudocodenoPL}{% + language = langnat, + basicstyle = \footnotesize\ttfamily, + numberstyle = \scriptsize\ttfamily\color{gray}, + keywordstyle = \bfseries, + stringstyle = \color{red!75}, + keepspaces = true, + tabsize = 4, + numbersep = 10pt, + numbers = none, + showstringspaces = false, + morestring = [b]", + escapeinside = {(*}{*)} +} + +%style tcbox pseudocode avec bannière hautdroite +\tcbset{stylepseudocodePL/.style={% + enhanced,boxrule=1.25pt,sharp corners=downhill,arc=12pt, + before skip=\baselineskip,after skip=\baselineskip,leftupper=10pt,top=\baselineskip,bottom=1mm,rightupper=5mm,% + attach boxed title to top right={yshift=-\tcboxedtitleheight}, + boxed title style={ + size=small,colback=gray!25,boxrule=1.25pt, + colframe=darkgray,boxsep=1.25pt, + sharp corners=downhill, + arc=12pt, + top=2pt,bottom=1pt,left=6pt,right=6pt + }, + fonttitle=\color{darkgray}\ttfamily\footnotesize, + title={\scriptsize\faFileCode}\:\textit{Pseudo-Code}\vphantom{p}, + watermark text={\faCode},watermark opacity=0.175,watermark zoom=0.50, + } +} + +\ifluatex + \newcommand\algomathttPL[1]{\symtt{#1}} +\else + \newcommand\algomathttPL[1]{\mathtt{#1}} +\fi + +\DeclareTCBListing{PseudoCode}{ s O{12cm} m }{% étoilée sans numéro, <taille> puis option... + width=#2,#3, + stylepseudocodePL, + listing only,listing engine=listings, + listing options={ + style=\IfBooleanTF{#1}{pseudocodenoPL}{pseudocodePL},%version étoilée sans numéro de lignes + aboveskip=0pt,belowskip=0pt, + columns=fullflexible, + literate={é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1% + {ú}{{\'u}}1 {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1% + {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1% + {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1% + {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1% + {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1% + {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1% + {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1% + {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1% + {ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1% + {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1% + {€}{{\texteuro}}1 {£}{{\pounds}}1% + {=}{\textleftarrow}1 {==}{=}1% + {*}{$\algomathttPL{\times}$}{1}% + } +} + +%style tcbox pseudocode v2 +\lstdefinestyle{pseudocodePLalt}{% + language = langnat, + basicstyle = \footnotesize\ttfamily, + numberstyle = \scriptsize\ttfamily\color{gray}, + keywordstyle = \bfseries, + stringstyle = \color{red!75}, + keepspaces = true, + tabsize = 4, + xleftmargin = 1.5em, + numbers = left, + morestring = [b]", + showstringspaces = false, + escapeinside = {(*}{*)} +} + +\lstdefinestyle{pseudocodenoPLalt}{% + language = langnat, + basicstyle = \footnotesize\ttfamily, + numberstyle = \scriptsize\ttfamily\color{gray}, + keywordstyle = \bfseries, + stringstyle = \color{red!75}, + keepspaces = true, + tabsize = 4, + numbers = none, + showstringspaces = false, + morestring = [b]", + escapeinside = {(*}{*)} +} + +\tcbset{stylepseudocodePLalt/.style={% + enhanced,boxrule=0.75pt,colframe=DarkGray!50!Black,% + sharp corners,top=0mm,bottom=0mm,left=0.4em,right=5mm,% + before skip=\baselineskip,after skip=\baselineskip,% + colback=white, + fontupper=\footnotesize,fontlower=\footnotesize,% + listing only,listing engine=listings,% + watermark text={\faCode},watermark opacity=0.25,watermark zoom=0.50,% + title={{\scriptsize\faCode} PseudoCode}, + lefttitle=0.4em, + fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!50!Black + } +} + +\tcbset{stylepseudocodePLaltlines/.style={% + underlay={% + \begin{tcbclipinterior} + \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \end{tcbclipinterior}% + } + } +} + +\DeclareTCBListing{PseudoCodeAlt}{ s O{12cm} m }{% étoilée sans numéro, <taille> puis option... + width=#2,#3, + stylepseudocodePLalt, + listing only,listing engine=listings, + \IfBooleanTF{#1}{}{stylepseudocodePLaltlines}, + listing options={ + style=\IfBooleanTF{#1}{pseudocodenoPLalt}{pseudocodePLalt},%version étoilée sans numéro de lignes + aboveskip=2pt,belowskip=2pt, + columns=fullflexible, + literate={é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1% + {ú}{{\'u}}1 {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1% + {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1% + {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1% + {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1% + {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1% + {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1% + {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1% + {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1% + {ű}{{\H{u}}}1 {Ű}{{\H{U}}}1 {ő}{{\H{o}}}1 {Ő}{{\H{O}}}1% + {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1% + {€}{{\texteuro}}1 {£}{{\pounds}}1% + {=}{\textleftarrow}1 {==}{=}1% + {*}{$\algomathttPL{\times}$}{1}% + } +} + +%%------PRESENTATIONDECODES CLASSIQUES +\NewTCBListing{PresentationCode}{ O{ForestGreen} m }{% + sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,% + colback=#1!5!white,colframe=#1!75!black,colbacklower=White,% + attach boxed title to top right={yshift=-\tcboxedtitleheight},title=Code \LaTeX,% + boxed title style={% + colframe=#1!75!black,colback=#1!15!white,% + ,sharp corners=downhill,arc=12pt,% + },% + fonttitle=\color{#1!90!black}\itshape\ttfamily\footnotesize,% + listing options={% + style=tcblatex,basicstyle=\footnotesize\ttfamily,% + keywordstyle=\bfseries\color{Blue},tabsize=2,% + },% + #2 +} + +\endinput
\ No newline at end of file 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 1a305445651..da385ed1a1d 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex @@ -8,7 +8,11 @@ % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. +%2.5.8 Style alternatif + Modification marges + %%------PYTHONMINTED + +%v1 \tcbset{pytmintedno/.style={% listing engine=minted,minted style=colorful, minted language=python,listing only, @@ -23,14 +27,14 @@ } } -\DeclareTCBListing{CodePythonMinted}{ s O{12cm} O{} }{% étoilée sans numéro, taille puis options... +\DeclareTCBListing{CodePythonMinted}{ s O{12cm} m }{% étoilée sans numéro, taille puis options... \IfBooleanTF{#1}{pytmintedno}{pytminted}, enhanced,width=#2,#3, colframe=Green,colback=ForestGreen!5,% boxrule=1.25pt, sharp corners=downhill,arc=12pt, - before skip=12pt,after skip=12pt,% - leftupper=8pt,top=10pt,bottom=4pt,rightupper=4pt,% + before skip=\baselineskip,after skip=\baselineskip,% + left=0.6em,top=\baselineskip,bottom=2mm,right=5mm,% attach boxed title to top right={yshift=-\tcboxedtitleheight}, boxed title style={ size=small,colback=ForestGreen!25,boxrule=1.25pt, @@ -42,7 +46,42 @@ fonttitle=\color{ForestGreen}\itshape\ttfamily\footnotesize, title={\scriptsize\faPython}\:Code Python\vphantom{y}, watermark text={\faPython},watermark opacity=0.175,watermark zoom=0.50, - before upper=\renewcommand{\theFancyVerbLine}{\scriptsize\ttfamily\color{Green}\arabic{FancyVerbLine}} + before upper=\renewcommand{\theFancyVerbLine}{\scriptsize\ttfamily\color{DarkGray}\arabic{FancyVerbLine}} +} + +%v2 +\tcbset{pytmintedaltno/.style={% + listing engine=minted,minted style=colorful, + minted language=python,listing only, + minted options={tabsize=4,fontsize=\footnotesize,autogobble}, + } +} + +\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}, + underlay={% + \begin{tcbclipinterior} + \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \end{tcbclipinterior}% + } + } +} + +\DeclareTCBListing{CodePythonMintedAlt}{ s O{12cm} m }{% étoilée sans numéro, taille puis options... + \IfBooleanTF{#1}{pytmintedaltno}{pytmintedalt}, + width=#2,#3, + enhanced,boxrule=0.75pt,colframe=DarkGray!50!Black,% + sharp corners,top=0mm,bottom=0mm,left=0.2em,right=5mm,% + before skip=\baselineskip,after skip=\baselineskip,% + colback=white, + fontupper=\footnotesize,fontlower=\footnotesize,% + watermark text={\faPython},watermark opacity=0.25,watermark zoom=0.50,% + title={{\scriptsize\faCode} Code Python}, + lefttitle=0.4em, + fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!50!Black,% + before upper=\renewcommand{\theFancyVerbLine}{\scriptsize\ttfamily\color{DarkGray}\arabic{FancyVerbLine}} } \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 7503f17894d..f3f00ecd5e4 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,9 @@ % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. +%2.5.8 Modification des marges +%2.5.7 Style alternatif + \RequirePackage{iftex} %%=============PYTHONPITON @@ -55,7 +58,7 @@ %==Style Classique \tcbset{thonnystyle/.style={% - enhanced,boxrule=0.75pt,colframe=DarkGray!25!Black,% + enhanced,boxrule=0.75pt,colframe=DarkGray!50!Black,% sharp corners,top=0mm,bottom=0mm,left=0.4em,right=5mm,% before skip=\baselineskip,after skip=\baselineskip,% colback=white @@ -66,7 +69,7 @@ thonnystyle,% underlay={% \begin{tcbclipinterior} - \filldraw[lightgray!15] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; \end{tcbclipinterior}% } } @@ -75,7 +78,7 @@ %==Création de la boîte \ifluatex \RequirePackage{piton} -\NewPitonEnvironment{CodePiton}{ O{} }% +\NewPitonEnvironment{CodePiton}{ O{} m }% {% \tcbset{reset} \useKVdefault[envpiton]% @@ -91,7 +94,7 @@ %------les styles tcbox \IfEq{\CODPITstyle}{Moderne}%style Moderne (défaut) {% - \tcbset{stylepiton,colframe=Green,colback=ForestGreen!5,width=\CODPITlargeur,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign} + \tcbset{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}}% {}% @@ -100,18 +103,18 @@ \IfEq{\CODPITstyle}{Classique}%style Classique {% \ifboolKV[envpiton]{Lignes}%si lignes=true - {\tcbset{thonnystylelineos,leftupper=0.4em}}% + {\tcbset{thonnystylelineos,leftupper=0.75em}}% {\tcbset{thonnystyle,leftupper=0.4em}}% - \tcbset{width=\CODPITlargeur,colframe=darkgray,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.175,watermark zoom=0.50}}% + {\tcbset{watermark text={\faPython},watermark opacity=0.25,watermark zoom=0.50}}% {}% \ifboolKV[envpiton]{BarreTitre}% {% \ifboolKV[envpiton]{Cadre} {} {\tcbset{boxrule=0pt,frame hidden}} - \tcbset{lefttitle=0.4em,title={\CODPITtitre},fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!25!Black} + \tcbset{lefttitle=0.4em,title={\CODPITtitre},fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!50!Black} }% {% \tcbset{notitle} @@ -122,7 +125,7 @@ } {}% %on crée la boîte - \begin{tcolorbox} + \begin{tcolorbox}[#2] }% {% \end{tcolorbox}% @@ -132,9 +135,9 @@ %======CONSOLE PYLUATEX (package à charger manuellement !!) \tcbset{consolepylua/.style={%base de la boîte - enhanced,colback=white,colframe=ForestGreen,sharp corners,boxrule=1pt,% - top=1.5mm,bottom=1.5mm,left=2mm,right=2mm,fontupper=\small,% - before skip=\baselineskip,after skip=\baselineskip,% + enhanced,colback=white,colframe=ForestGreen,sharp corners,boxrule=1pt,% + top=1.5mm,bottom=1.5mm,left=2mm,right=2mm,fontupper=\small,% + before skip=\baselineskip,after skip=\baselineskip,% } } @@ -176,8 +179,8 @@ \PitonOptions{#1} \PyLTVerbatimEnv \ifboolKV[consolepyluatex]{Logo} - {\tcbset{consolepyluatexlogo,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} - {\tcbset{consolepyluatex,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} + {\tcbset{consolepyluatexlogo,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} + {\tcbset{consolepyluatex,width=\ConsPyluaLarg,\ConsPyluaAlign,#3}} \begin{tcolorbox} \begin{pythonrepl} } @@ -188,8 +191,8 @@ tex.print("\\end{Piton}") tex.print("") } - \end{pythonrepl} -\end{tcolorbox} + \end{pythonrepl} + \end{tcolorbox} } \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 1a4b2c0f94d..30690cb49a9 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex @@ -8,6 +8,8 @@ % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. +%2.5.8 Style alternatif + Modification marges + Modification arguments + %%------CONSOLEPYTHON \defKV[envpythonconsole]{% Largeur=\def\CSPYlargeur{#1},% @@ -20,13 +22,13 @@ \setKVdefault[envpythonconsole]{% Largeur=\linewidth,% - Centre=true,% + Centre=false,% Label=true,% TaillePolice=\footnotesize,% EspacementVertical=1 } -\newenvironment{ConsolePythontex}[1][] +\newenvironment{ConsolePythontex}[2][] {% \useKVdefault[envpythonconsole]% \setKV[envpythonconsole]{#1}% on paramètres les nouvelles clés et on les simplifie @@ -40,7 +42,7 @@ framesep=3mm,frame=single,fontsize=\CSPYfonte,framerule=1pt,rulecolor=\color{ForestGreen},baselinestretch=\CSPYstretch]} }% {% - \end{pyconsole} + \end{pyconsole} \end{minipage} \hookcenterpost } @@ -57,17 +59,19 @@ \setKVdefault[envpythonverb]{% Largeur=\linewidth,% - Centre=true,% + Centre=false,% Lignes=true,% TaillePolice=\footnotesize,% EspacementVertical=1 } +%v1 + \tcbset{stylepythontex/.style={% enhanced,boxrule=1.25pt,% sharp corners=downhill,arc=12pt, - before skip=12pt,after skip=12pt,% - top=10pt,bottom=1mm,rightupper=4pt,%leftupper=25pt, + before skip=\baselineskip,after skip=\baselineskip,% + top=\baselineskip,bottom=1mm,right=5mm,left=0.6em, attach boxed title to top right={yshift=-\tcboxedtitleheight}, boxed title style={ size=small,colback=ForestGreen!25,boxrule=1.25pt, @@ -79,21 +83,18 @@ fonttitle=\color{ForestGreen}\itshape\ttfamily\footnotesize, title={\scriptsize\faPython}\:Code Python\vphantom{p}, watermark text={\faPython},watermark opacity=0.175,watermark zoom=0.50, + colframe=Green,colback=ForestGreen!5,% + before upper=\renewcommand\theFancyVerbLine{\scriptsize\ttfamily\color{darkgray}\arabic{FancyVerbLine}} } } \tcbset{stylepythonnolineos/.style={% - stylepythontex,leftupper=10pt, - colframe=Green,colback=ForestGreen!5,% - before upper=\renewcommand\theFancyVerbLine{\scriptsize\ttfamily\color{Gray}\arabic{FancyVerbLine}} + stylepythontex,leftupper=1em } } \tcbset{stylepythonlineos/.style={% - stylepythontex,leftupper=25pt, - colframe=Green,colback=ForestGreen!5,% - % fontlower=\small,% - before upper=\renewcommand\theFancyVerbLine{\scriptsize\ttfamily\color{Gray}\arabic{FancyVerbLine}} + stylepythontex,leftupper=2em } } @@ -105,7 +106,7 @@ width=#1,stylepythonnolineos } -\newenvironment{CodePythontex}[1][] +\NewDocumentEnvironment{CodePythontex}{ O{} m } {% \useKVdefault[envpythonverb]% \setKV[envpythonverb]{#1}% on paramètres les nouvelles clés et on les simplifie @@ -115,7 +116,7 @@ {\begin{tcpythontexcode}[\CODPYlargeur]} {\begin{tcpythontexcodeno}[\CODPYlargeur]} \ifboolKV[envpythonverb]{Lignes}%si lignes=true - {\begin{pyverbatim}[][fontsize=\CODPYfonte,numbers=left,numbersep=10pt,commandchars=\\\{\},mathescape,baselinestretch=\CODPYstretch]} + {\begin{pyverbatim}[][fontsize=\CODPYfonte,numbers=left,numbersep=0.75em,commandchars=\\\{\},mathescape,baselinestretch=\CODPYstretch]} {\begin{pyverbatim}[][numbers=none,numbersep=0pt,fontsize=\CODPYfonte,commandchars=\\\{\},mathescape,baselinestretch=\CODPYstretch]} }% {% @@ -126,4 +127,62 @@ \verbcenterpost } +%v2 +\tcbset{stylepythontexalt/.style={% + enhanced,boxrule=0.75pt,colframe=DarkGray!50!Black,% + sharp corners,top=0mm,bottom=0mm,left=0.2em,right=5mm,% + before skip=\baselineskip,after skip=\baselineskip,% + colback=white, + fontupper=\footnotesize,fontlower=\footnotesize,% + title={{\scriptsize\faCode} Code Python}, + lefttitle=0.4em, + watermark text={\faPython},watermark opacity=0.25,watermark zoom=0.50, + fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=DarkGray!50!Black, + before upper=\renewcommand\theFancyVerbLine{\scriptsize\ttfamily\color{darkgray}\arabic{FancyVerbLine}} + } +} + +\tcbset{stylepythonnolineosalt/.style={% + stylepythontexalt,leftupper=0.2em, + } +} + +\tcbset{stylepythonlineosalt/.style={% + stylepythontexalt,leftupper=1.35em, + underlay={% + \begin{tcbclipinterior} + \filldraw[lightgray!25] (interior.south west) rectangle ([xshift=1.3em]interior.north west) ; + \end{tcbclipinterior}% + } + } +} + +\newtcolorbox{tcpythontexcodealt}[1][\linewidth]{% + width=#1,stylepythonlineosalt +} + +\newtcolorbox{tcpythontexcodenoalt}[1][\linewidth]{% + width=#1,stylepythonnolineosalt +} +\NewDocumentEnvironment{CodePythontexAlt}{ O{} m } +{% + \useKVdefault[envpythonverb]% + \setKV[envpythonverb]{#1}% on paramètres les nouvelles clés et on les simplifie + \VerbatimEnvironment + \verbcenterpre + \ifboolKV[envpythonverb]{Lignes}%si lignes=true + {\begin{tcpythontexcodealt}[\CODPYlargeur]} + {\begin{tcpythontexcodenoalt}[\CODPYlargeur]} + \ifboolKV[envpythonverb]{Lignes}%si lignes=true + {\begin{pyverbatim}[][fontsize=\CODPYfonte,numbers=left,numbersep=0.75em,commandchars=\\\{\},mathescape,baselinestretch=\CODPYstretch]} + {\begin{pyverbatim}[][numbers=none,numbersep=0pt,fontsize=\CODPYfonte,commandchars=\\\{\},mathescape,baselinestretch=\CODPYstretch]} +}% +{% + \end{pyverbatim} + \ifboolKV[envpythonverb]{Lignes}%si lignes=true + {\end{tcpythontexcodealt}} + {\end{tcpythontexcodenoalt}} + \verbcenterpost +} + \endinput
\ No newline at end of file |