From b1d7ac49bdf78678d5defce43a67afcf8dd7a8a1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 10 Aug 2022 20:36:43 +0000 Subject: proflycee (10aug22) git-svn-id: svn://tug.org/texlive/trunk@64090 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/proflycee/ProfLycee.sty | 79 +++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty index 7e32293bc5a..1f3e210420f 100644 --- a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty +++ b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty @@ -3,7 +3,9 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2022/08/01 - v1.1.8 - Aide pour l'utilisation de LaTeX en lycée] +\ProvidesPackage{ProfLycee}[2022/08/10 - v1.2 - Aide pour l'utilisation de LaTeX en lycée] +% 1.2 Correction d'un méchant bug avec pixelart, erf... +% 1.1.9 Commande pour du pixelart en tikz (avec option csvii pour compatibilité) % 1.1.8 Ajout d'un style mainlevee pour tikz % 1.1.7 Ajout de commandes pour des conversions bin/dec/hex % 1.1.6 Ajout d'une commande pour déterminer les paramètres d'un régression linéaire par moindres carrés @@ -29,6 +31,8 @@ \DeclareOption{nominted}{\@nomintedtrue} \newif\if@build \@buildfalse \DeclareOption{build}{\@buildtrue} +\newif\if@csvii \@csviifalse +\DeclareOption{csvii}{\@csviitrue} \DeclareOption*{} \ProcessOptions\relax @@ -49,6 +53,12 @@ \RequirePackage{listofitems} \RequirePackage{tabularray} \RequirePackage{fontawesome5} +\if@csvii + \RequirePackage[legacy]{csvsimple} +\else + \RequirePackage{expl3} + \RequirePackage[l3]{csvsimple} +\fi %librairies tikz \usetikzlibrary{calc} \usetikzlibrary{decorations} @@ -1444,4 +1454,71 @@ mainlevee/.default={5mm et 0.6pt} } +%==============PixelArt TikZ=========== OK !! +\defKV[pixelarttkz]{% + codes=\def\PATlettres{#1},% + couleurs=\def\PATcouleurs{#1},% + symboles=\def\PATchiffres{#1},% + style=\def\PATtaille{#1} +} + +\setKVdefault[pixelarttkz]{% + style=\scriptsize,% + correction=false,% + symb=false +} + +\newcommand\PLpixelart[2][]{% + \useKVdefault[pixelarttkz] + \setKV[pixelarttkz]{#1} + %affichage du corrigé + \ifboolKV[pixelarttkz]{correction} + {% + \csvloop{file=#2,no head,command={% + \foreach \l [count=\n] in \csvline {% + \setsepchar{,} + \readlist\LCPA\PATcouleurs + \StrPosition{\PATlettres}{\l}[\pixcnt]% + \xintifboolexpr{\pixcnt>0}% + {% + \itemtomacro\LCPA[\pixcnt]\pixcol% + \draw[fill=\pixcol] ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) ;% + }% + {} + } + } + } + } + {% + \ifboolKV[pixelarttkz]{symb} + {%affichage du pixelart versions chiffres si besoin + \csvloop{file=#2,no head,command={% + \foreach \l [count=\n] in \csvline {% + \setsepchar{,} + \readlist\LCNA\PATchiffres + \StrPosition{\PATlettres}{\l}[\pixpos]% + \xintifboolexpr{\pixpos>0}% + {% + \itemtomacro\LCNA[\pixpos]\pixchf% + \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\pixchf} ;% + } + {}% + } + } + } + } + {%affichage du pixelart versions lettres ou chiffres simples (<=9) + \csvloop{file=#2,no head,command={% + \foreach \l [count=\n] in \csvline {% + \IfSubStr{\PATlettres}{\l}% + {% + \draw ({\n-0.5},{-\thecsvrow+0.5}) rectangle ({\n+0.5},{-\thecsvrow-0.5}) node[inner sep=0,midway,font=\PATtaille] {\l};} + {} + } + } + } + } + } +} + \endinput \ No newline at end of file -- cgit v1.2.3