diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.pdf | bin | 210026 -> 210064 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.pdf | bin | 1475123 -> 1484043 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex | 92 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.pdf | bin | 148026 -> 149933 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.tex | 20 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/customenvs/customenvs.sty | 153 |
7 files changed, 251 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.pdf b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.pdf Binary files differindex cc05bf618ab..1ad60cdfb4b 100644 --- a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.pdf +++ b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.pdf diff --git a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex index 6c09fb0f57b..d02570a569d 100644 --- a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex +++ b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex @@ -34,8 +34,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.2.0} -\def\TPdate{26/08/2024} +\def\TPversion{0.2.1} +\def\TPdate{01/09/2024} \usepackage{tcolorbox} \sethlcolor{lightgray!25} \NewDocumentCommand\MontreCode{ m }{% @@ -111,7 +111,9 @@ \section{History} -\verb|v0.1.9|~:~~~~Skills with stars (\textsf{fontawesome5} or \TikZ) +\verb|v0.2.1|~:~~~Enhancements for \textit{stars skills} + AutoGrid for \TikZ\ (see \textsf{[fr]} doc) + +\verb|v0.2.0|~:~~~~Skills with stars (\textsf{fontawesome5} or \TikZ) \verb|v0.1.9|~:~~~~Title banner diff --git a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.pdf b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.pdf Binary files differindex 4059d5dfa20..7f6eb4c950d 100644 --- a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.pdf +++ b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.pdf diff --git a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex index 13058113c22..a33fdbb8e29 100644 --- a/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex +++ b/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex @@ -39,8 +39,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.2.0} -\def\TPdate{26 août 2024} +\def\TPversion{0.2.1} +\def\TPdate{01 septembre 2024} \usepackage{tcolorbox} \tcbuselibrary{listingsutf8} \newtcblisting{DemoCode}[1]{% @@ -66,10 +66,10 @@ keywordstyle={\color{violet}},% classoffset=2,% alsoletter={-},% - morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri,\NiveauDiffExos,\tkzEtoiles},% + morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri,\NiveauDiffExos,\tkzEtoiles,\tkzGrilleAuto,\tkzAutoGridLocal,\tkzAutoGridActivate},% keywordstyle={\color{green!50!black}},% classoffset=3,% - morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype,Couleur,AlignV,Offset,NiveauMax},% + morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype,Couleur,AlignV,Offset,NiveauMax,pasX,pasY,grilleauto},% keywordstyle={\color{orange}} },% #1 @@ -149,6 +149,8 @@ \section{Historique} +\verb|v0.2.1|~:~~~Amélioration de la gestion des étoiles pour des niveaux de difficultés + Grille auto pour \TikZ\ + \verb|v0.2.0|~:~~~Étoiles pour des niveaux de difficultés (compatible avec \texttt{EnvtExo}) \verb|v0.1.9|~:~~~Bannière de titre + Insertion d'images en remplissage vertical @@ -1520,4 +1522,86 @@ La clé \MontreCode{vCentrer} (parmi \MontreCode{m/h/b/n} permet de spécifier u \InsererImage<vRemplir,vOffset=5mm,vCentrer=m>{example-image} +\subsection{Grille automatique pour les environnements tikzpicture} + +L'idée est de proposer de quoi afficher, en \textit{surimpression}, une grille automatique sur une figure \MontreCode{tikzpicture}. + +Cela peut-être utile dans la construction de graphes ou de figures géométriques pour placer plus facilement des objets. + +\smallskip + +Il est possible de : + +\begin{itemize} + \item demander ponctuellement l'affichage avec une macro à placer en fin d'environnement ; + \item automatiser l'affichage pour une figure avec une \MontreCode{clé} et une macro locale ; + \item automatiser l'affichage pour toutes les figures avec une macro globale et une \MontreCode{clé}. +\end{itemize} + +\textbf{\large Version manuelle} + +\begin{DemoCode}{listing only} +%macro locale, utilisation ponctuelle +\begin{tikzpicture} + %codes + \tkzGrilleAuto(*){pasX§pasY} +\end{tikzpicture} +\end{DemoCode} + +La version étoilée marque également l'origine $(0;0)$. + +L'argument obligatoire permet de spécifier les pas (\texttt{H§V}) pour la grille. + +\begin{DemoCode}{} +\begin{tikzpicture} + %population + \draw[very thick,purple] (0,0) circle[x radius=3cm,y radius=2cm] ; + \draw[purple] (0.5,1.25) node[font=\small] {Population E} ; + %ss population + \draw[very thick,teal] (-0.75,-0.25) circle[x radius=1.75cm,y radius=1cm] ; + \draw[teal] (-0.75,-0.25) node[font=\small] {Sous-population A} ; + %grille auto manuelle, avec origine + \tkzGrilleAuto*{0.5§0.5} +\end{tikzpicture} +\end{DemoCode} + +\textbf{\large Version automatique locale, avec clé} + +\begin{DemoCode}{listing only} +%clé locale, utilisation ponctuelle +\begin{tikzpicture}[grilleauto=pasX§pasY] + \tkzAutoGridLocal(*) + %codes +\end{tikzpicture} +\end{DemoCode} + +La version étoilée marque également l'origine $(0;0)$. + +\begin{DemoCode}{} +\begin{tikzpicture}[x=0.5cm,y=0.5cm,grilleauto=0.25§0.25] + %grille (qui sera affichée en dernier) + \tkzAutoGridLocal* + %triangle + \draw[very thick,red] (-4,-2)--(0,7)--(6,1)--cycle ; + %cercle + \draw[very thick,blue] (0,0) circle[radius=5] ; + %segment + \draw[very thick,orange] (-1.75,1.25)--(1,-7); +\end{tikzpicture} +\end{DemoCode} + +\textbf{\large Version automatique globale, avec clé} + +\begin{DemoCode}{listing only} +%préambule, la commande sera active pour tous les environnements tikz +\tkzAutoGridActivate(*) + +%document +\begin{tikzpicture}[grilleauto=pasX§pasY] + %codes +\end{tikzpicture} +\end{DemoCode} + +La version étoilée marquera également l'origine $(0;0)$. + \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.pdf b/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.pdf Binary files differindex 16a8d7d3e6b..aed4fe853c8 100644 --- a/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.pdf +++ b/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.pdf diff --git a/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.tex b/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.tex index a91733525b5..d32d06230a2 100644 --- a/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.tex +++ b/Master/texmf-dist/doc/latex/customenvs/envtexo_exemples.tex @@ -15,7 +15,7 @@ \setlength{\parindent}{0pt} \begin{document} - + \pagestyle{empty} \begin{EnvtExo}%exo1 @@ -42,7 +42,7 @@ \ipsum<Lang=FR,Type=sent> \end{EnvtExo} -\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7 +\begin{EnvtExo}[Etoiles=2,Decoration=Image/goku_ssj4]%exo7 \ipsum<Lang=FR,Type=sent> \end{EnvtExo} @@ -50,36 +50,36 @@ \ipsum<Lang=FR,Type=sent> \end{EnvtExo} -\begin{EnvtExo}[Decoration=tkzEtoiles/3.5§5]%exo8 +\begin{EnvtExo}[Decoration=tkzEtoiles/3.5§5]%exo9 \ipsum<Lang=FR,Type=sent> \end{EnvtExo} -\begin{EnvtExo}[Decoration=Points/7]%exo9 +\begin{EnvtExo}[Decoration=Points/7]%exo10 \ipsum<Lang=FR,Type=sent> \end{EnvtExo} -\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10 +\begin{EnvtExo}[Type=Perso/{Titre perso },Etoiles={2.5§5}]%exo11 \ipsum<Lang=FR,Type=sent> \end{EnvtExo} -\StyleEnvtExo[Couleur=red,,CouleurDeco=teal,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] +\StyleEnvtExo[Couleur=red,CouleurDeco=teal,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] -\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11 +\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo12 \ipsum<Lang=FR,Type=sent> \end{EnvtExo} -\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Trait=dashilles]%exo12 +\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Trait=dashilles,Etoiles=0.5]%exo13 \ipsum<Lang=FR,Type=sent> \end{EnvtExo} \StyleEnvtExoDefaut \begin{EnvtExo}% - [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13 + [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo14 \ipsum<Lang=FR,Type=sent> \end{EnvtExo} -\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14 +\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo15 \ipsum<Lang=FR,Type=sent> diff --git a/Master/texmf-dist/tex/latex/customenvs/customenvs.sty b/Master/texmf-dist/tex/latex/customenvs/customenvs.sty index 4c90d39b3dc..ee87f340d2d 100644 --- a/Master/texmf-dist/tex/latex/customenvs/customenvs.sty +++ b/Master/texmf-dist/tex/latex/customenvs/customenvs.sty @@ -3,9 +3,10 @@ % source pencil...: CC-BY-SA 4.0 https://tex.stackexchange.com/questions/504092/replicating-a-fancy-bordered-text-style-in-latex/504145#504145 \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{customenvs}[2024/08/26 0.2.0 Custom classic environments] +\ProvidesPackage{customenvs}[2024/09/01 0.2.1 Custom classic environments] %====HISTORIQUE +% v 0.2.1 Modification mineure de la gestion des étoiles tikz (baseline) + grille auto tikzpicture % v 0.2.0 Ajout d'étoiles pour les difficultés d'exercices (2 versions) % v 0.1.9 tkzBanner + tkzBannerTri + includegraphicsfill % v 0.1.8 Nutriscore @@ -712,10 +713,11 @@ \setKV[levelstars]{#1}% %dimensions \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \setlength{\tmphauteuretoiles}{0.95\tmphauteuretoiles}% \ifboolKV[levelstars]{valign}% {% \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% - \begin{tikzpicture}[baseline={-\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] + \begin{tikzpicture}[baseline={-1.25\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] }% {% \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] @@ -749,10 +751,11 @@ \setKV[tkznivetoiles]{#1}% %dimensions \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \setlength{\tmphauteuretoiles}{0.95\tmphauteuretoiles}% \ifboolKV[tkznivetoiles]{AlignV}% {% \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% - \begin{tikzpicture}[baseline={-\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] + \begin{tikzpicture}[baseline={-1.25\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] }% {% \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}] @@ -876,7 +879,8 @@ CodeDebut=\def\EnvtExoCodeAvant{#1},% EchelleImage=\def\EnvtExoScaleImg{#1},% Decoration=\def\EnvtExoDeco{#1},% - Trait=\def\EnvtExoTrait{#1} + Trait=\def\EnvtExoTrait{#1},% + Etoiles=\def\EnvtExoEtoiles{#1} } \setKVdefault[EnvtExercice]{ Type=Classique,% @@ -885,7 +889,8 @@ EchelleImage=1.15,% Compteur=true,% Decoration={},% - Trait=plein + Trait=plein,% + Etoiles={} } \NewDocumentEnvironment{EnvtExo}{ !O{} }% @@ -900,6 +905,19 @@ {% %label avec numéro et complément \tmpstyleexo\tmplabelexo\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre% + %étoiles eventuelles + \IfStrEq{\EnvtExoEtoiles}{}{}% + {% + \,(\IfSubStr{\EnvtExoEtoiles}{§}% + {% + \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}% + }% + )% + }% %trait éventuel \IfStrEqCase{\EnvtExoTrait}{% {plein}{\,\hrulefill}% @@ -966,6 +984,19 @@ \StrBehind{\EnvtExoType}{/}[\EnvtExoLabel]% %label avec numéro et complément \tmpstyleexo\EnvtExoLabel\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre% + %étoiles eventuelles + \IfStrEq{\EnvtExoEtoiles}{}{}% + {% + \,(\IfSubStr{\EnvtExoEtoiles}{§}% + {% + \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}% + }% + )% + }% %trait éventuel \IfStrEqCase{\EnvtExoTrait}{% {plein}{\,\hrulefill}% @@ -1044,6 +1075,19 @@ {% %label avec numéro et complément \tmpstyleexo\tmplabelexo\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre% + %étoiles eventuelles + \IfStrEq{\EnvtExoEtoiles}{}{}% + {% + \,(\IfSubStr{\EnvtExoEtoiles}{§}% + {% + \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}% + }% + )% + }% %trait éventuel \IfStrEqCase{\EnvtExoTrait}{% {plein}{\,\hrulefill}% @@ -1079,12 +1123,49 @@ \settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}% \,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$% }{}% + \IfSubStr{\EnvtExoDeco}{faEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSuStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}% + }% + {% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}% + }% + }{}% + \IfSubStr{\EnvtExoDeco}{tkzEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSubStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}% + }% + }{}% }{}% \IfSubStr{\EnvtExoType}{Perso}%OK perso____déco {% \StrBehind{\EnvtExoType}{/}[\EnvtExoLabel]% %label avec numéro et complément \tmpstyleexo\EnvtExoLabel\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre% + %étoiles eventuelles + \IfStrEq{\EnvtExoEtoiles}{}{}% + {% + \,(\IfSubStr{\EnvtExoEtoiles}{§}% + {% + \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}% + }% + )% + }% %trait éventuel \IfStrEqCase{\EnvtExoTrait}{% {plein}{\,\hrulefill}% @@ -1120,6 +1201,30 @@ \settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}% \,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$% }{}% + \IfSubStr{\EnvtExoDeco}{faEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSuStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}% + }% + {% + \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}% + }% + }{}% + \IfSubStr{\EnvtExoDeco}{tkzEtoiles}% + {% + \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]% + \IfSubStr{\EnvtExoStars}{§}% + {% + \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}% + }% + {% + \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}% + }% + }{}% }{}% \endgroup% \def\hrulefill{\leavevmode\leaders\hrule height 0.4pt\hfill\kern\z@}% @@ -2569,5 +2674,43 @@ \end{tikzpicture}% } +%====grille automatique tikz ? +\NewDocumentCommand\tkzGrilleAuto{ s O{thin,lightgray} m }{% + \IfBooleanT{#1}{\filldraw (0,0) circle[radius=2pt] ;} + \StrCut{#3}{§}{\tkzautogridx}{\tkzautogridy}% + \draw[xstep=\tkzautogridx,ystep=\tkzautogridy,#2] (current bounding box.south west) grid (current bounding box.north east) ; +} +\NewDocumentCommand\tkzAutoGrid{ s O{thin,lightgray} m }{% + \IfBooleanT{#1}{\filldraw (0,0) circle[radius=2pt] ;} + \StrCut{#3}{§}{\tkzautogridx}{\tkzautogridy}% + \draw[xstep=\tkzautogridx,ystep=\tkzautogridy,#2] (current bounding box.south west) grid (current bounding box.north east) ; +} + +\tikzset{grilleauto/.store in=\tkzautogrid,grilleauto/.default={},grilleauto={}} +\tikzset{autogrid/.store in=\tkzautogrid,autogrid/.default={},autogrid={}} + +\NewDocumentCommand\tkzAutoGridActivate{ s }{% + \@ifundefined{tkzautogrid}% + {}% + {% + \tikzset{every picture/.style={% + execute at end picture={% + \IfEq{\tkzautogrid}{}{}{\IfBooleanTF{#1}{\tkzGrilleAuto*{\tkzautogrid}}{\tkzGrilleAuto{\tkzautogrid}}}% + }, + }, + }% + }% +} + +\NewDocumentCommand\tkzAutoGridLocal{ s }{% + \@ifundefined{tkzautogrid}% + {}% + {% + \tikzset{execute at end picture={% + \IfEq{\tkzautogrid}{}{}{\IfBooleanTF{#1}{\tkzGrilleAuto*{\tkzautogrid}}{\tkzGrilleAuto{\tkzautogrid}}}% + }, + }, + }% +} \endinput
\ No newline at end of file |