% proflycee-tools-minted.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.

%%------PYTHONMINTED
\tcbset{pytmintedno/.style={%
		listing engine=minted,minted style=colorful,
		minted language=python,listing only,
		minted options={tabsize=4,fontsize=\footnotesize,autogobble},
	}
}

\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},
	}
}

\DeclareTCBListing{CodePythonMinted}{ s O{12cm} O{} }{% é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,%
	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
	},
	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}}
}

\endinput