diff options
Diffstat (limited to 'macros/latex/contrib/proflycee/tex/ProfLycee.sty')
-rw-r--r-- | macros/latex/contrib/proflycee/tex/ProfLycee.sty | 100 |
1 files changed, 97 insertions, 3 deletions
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index 8da7dca149..02a08e392f 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}[2022/08/15 - v1.2.2 - Aide pour l'utilisation de LaTeX en lycée] +\ProvidesPackage{ProfLycee}[2022/08/24 v1.2.3 - Aide pour l'utilisation de LaTeX en lycee] +% 1.2.3 Ajout d'un environnement simplifié pour du code python % 1.2.2 Ajouts de commandes pour des stats à 2 variables % 1.2.1 Amélioration de la gestion du csv pour les pixelart % 1.2 Correction d'un méchant bug avec pixelart, erf... @@ -54,6 +55,16 @@ \RequirePackage{simplekv} \RequirePackage{listofitems} \RequirePackage{tabularray} +\RequirePackage{siunitx} %test avec v3 +\sisetup{% + locale=FR,% + mode = match, propagate-math-font = true,% + reset-math-version = false, reset-text-family = false,% + reset-text-series = false, reset-text-shape = false,% + text-family-to-math = true, text-series-to-math = true,% + output-decimal-marker={,},% + group-minimum-digits=4% +}% \RequirePackage{fontawesome5} \if@csvii \RequirePackage[legacy]{csvsimple} @@ -451,21 +462,103 @@ before upper = \renewcommand{\theFancyVerbLine}{\scriptsize\ttfamily\color{Green}\arabic{FancyVerbLine}} } -%=========PSEUDOCODE=========== OK !! +%=======STYLE ALGO LST========= OK ! \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 = 4pt, + belowskip = 1pt, + 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 = 4pt, + belowskip = 1pt, + tabsize = 4, + showstringspaces = false, + columns = fullflexible, + keepspaces = true, + breaklines = true, + breakatwhitespace = true + } \fi +%=======PYTHONLISTINGS========= OK !! +\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} + } +} + +\DeclareTCBListing{envcodepython}{ s O{\linewidth} m }{% * off pour numéros de lignes + {largeur} + <options tcbox> + \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, + width=#2,#3 +} + +\NewTCBInputListing{\envcodepythonfichier}{ s O{\linewidth} m m }{ + \IfBooleanTF{#1}{stylepythonlstnolineos}{stylepythonlstlineos}, + width=#2,#3, + listing file={#4}} + +%=========PSEUDOCODE=========== OK !! %language pseudocode listings \lstdefinestyle{pseudocodePL}{% language=langnat, @@ -693,7 +786,8 @@ } %============CartoucheCapytale========= OK !! -\definecolor{vertcapyt}{HTML}{008000} +\definecolor{vertcapyt}{rgb}{0.0,0.5,0.0} +%\definecolor{vertcapyt}{HTML}{008000} \DeclareTotalTCBox{\liencapytale}{ s O{} m } {enhanced,size=fbox,on line,arc=3pt,colback=vertcapyt,colframe=vertcapyt,fontupper=\IfBooleanTF{#1}{\ttfamily}{\sffamily}\bfseries,colupper=white}% {#3#2~{\scriptsize\faLink}} |