texlive[69356] Master/texmf-dist: thematicpuzzle (9jan24)

commits+karl at tug.org commits+karl at tug.org
Tue Jan 9 22:07:16 CET 2024


Revision: 69356
          https://tug.org/svn/texlive?view=revision&revision=69356
Author:   karl
Date:     2024-01-09 22:07:16 +0100 (Tue, 09 Jan 2024)
Log Message:
-----------
thematicpuzzle (9jan24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.pdf
    trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex
    trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.pdf
    trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex
    trunk/Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty

Modified: trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex	2024-01-09 21:06:56 UTC (rev 69355)
+++ trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex	2024-01-09 21:07:16 UTC (rev 69356)
@@ -25,8 +25,8 @@
 \hypersetup{pdfborder=0 0 0}
 \usepackage[margin=2cm]{geometry}
 \setlength{\parindent}{0pt}
-\def\TPversion{0.1.0}
-\def\TPdate{17/12/2023}
+\def\TPversion{0.1.1}
+\def\TPdate{09/01/2024}
 \usepackage{soul}
 \usepackage{codehigh}
 \usepackage{tabularray}
@@ -72,7 +72,7 @@
 \vfill
 
 \begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
-\ThematicPuzzle{A,B,C,D,E,F,G,H}
+\ThematicPuzzle[BgColors={yellow!50,purple!50}]{A,B,C,D,E,F,G,H}
 \end{tcolorbox}
 
 \begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
@@ -79,8 +79,10 @@
 \ThematicPuzzle[Thickness=1.25pt,Scale=2.75,BgColors={yellow!10,orange!10,green!10,teal!10,purple!10},Labels={Angry,Python,Cool,Apple,Battery},BorderColor=darkgray,IconsColor=teal!50!black]{\faAngry,\faPython,\faAngellist,\faApple*,\faBatteryHalf}
 \end{tcolorbox}
 
-\vfill~
+\vfill
 
+\hfill{\footnotesize\itshape Tks to quark67 for his feedbacks.}
+
 \pagebreak
 
 \phantomsection
@@ -132,9 +134,8 @@
 The useful and loaded packages are:
 
 \begin{itemize}
-	\item \MontreCode{tikz};
-	\item \MontreCode{fontawesome5};
-	\item \MontreCode{simplekv}, \MontreCode{listofitems} and \MontreCode{xstring}.
+	\item \MontreCode{tikz}, \MontreCode{fontawesome5} et \MontreCode{xintexpr} ;
+	\item \MontreCode{simplekv}, \MontreCode{listofitems} et \MontreCode{xstring}.
 \end{itemize}
 
 \vfill
@@ -143,7 +144,8 @@
 
 \begin{quote}
 \begin{verbatim}
-0.1.0: Initial release
+0.1.1 : Enhancements for colors
+0.1.0 : Initial release
 \end{verbatim}
 \end{quote}
 
@@ -151,7 +153,7 @@
 
 \section{The macro}
 
-\subsection{General usage, keyx and options}
+\subsection{General usage, keys and options}
 
 In order to create a \textit{theme puzzle}, the command is:
 
@@ -167,9 +169,9 @@
 \begin{itemize}
 	\item \MontreCode{Thickness} := thickness of the lines (\MontreCode{1pt} by default);
 	\item \MontreCode{Scale} := global scale of the figure (\MontreCode{1} by default);
-	\item \MontreCode{BgColors} := background color (\MontreCode{empty} by default);
-	\item \MontreCode{BorderColor} := color(s) (if necessary separated by \MontreCode{,}) of the borders (\MontreCode{black} by default);
-	\item \MontreCode{Labels} := (optional) labels of the themes (\MontreCode{empty} by default);
+	\item \MontreCode{BgColors} := background color(s) (see paragraph on colors);
+	\item \MontreCode{BorderColor} := color(s) of the borders (\MontreCode{black} by default);
+	\item \MontreCode{Labels} := (optional) labels of the themes (\MontreCode{\{\}} by default);
 	\item \MontreCode{ScaleLabels} := label scale (\MontreCode{1.15} by default);
 	\item \MontreCode{FontLabels} := label font (\MontreCode{\textbackslash tiny\textbackslash sffamily} by default);
 	\item \MontreCode{IconsColor} := color of icons and labels (\MontreCode{black} by default).
@@ -177,12 +179,30 @@
 
 \medskip
 
-The optional argument, between \MontreCode{<...>}, corresponds to specific options (in \TikZ language) to pass to the created environment.
+The optional argument, between \MontreCode{<...>}, corresponds to specific options (in \TikZ\ language) to pass to the created environment.
 
 \smallskip
 
 The obligatory argument, between \MontreCode{\{...\}}, corresponds to the list of decorations (in the form of \textit{characters}) of the different puzzle pieces, within form \MontreCode{\{deco<1>,deco<2>,...,deco<n>\}}
 
+\subsection{The colors of the boxes}
+
+Concerning the color of the boxes, it's the key \MontreCode{BgColors} which is in charge.
+
+It can work in several ways:
+
+\begin{itemize}
+	\item by default it is empty, which does not color the boxes ;
+	\item it can be given in a single form, via \MontreCode{BgColors=mycolor}, in which case all the boxes are of the same color;
+	\item we can give it in the form of a list \MontreCode{BgColors=\{mycolorA,mycolorB,...\}} and:
+	\begin{itemize}
+		\item in the case where the number of colors is sufficient, they are used one after the other;
+		\item otherwise, the code takes care of \textit{repeating} the pattern of the proposed colors.
+	\end{itemize}
+\end{itemize}
+
+\pagebreak
+
 \subsection{Examples}
 
 \begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
@@ -190,7 +210,7 @@
 \end{tcblisting}
 
 \begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
-\ThematicPuzzle[Labels={Maths,History,Geo,Chemistry}]%
+\ThematicPuzzle[Labels={Maths,History,Geo,Chemistry},BgColors={yellow!25,red!25}]%
   {\faAngry,\faArchway,\faAtlas,\faAtom}
 \end{tcblisting}
 

Modified: trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex	2024-01-09 21:06:56 UTC (rev 69355)
+++ trunk/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex	2024-01-09 21:07:16 UTC (rev 69356)
@@ -24,8 +24,8 @@
 \hypersetup{pdfborder=0 0 0}
 \usepackage[margin=2cm]{geometry}
 \setlength{\parindent}{0pt}
-\def\TPversion{0.1.0}
-\def\TPdate{17/12/2023}
+\def\TPversion{0.1.1}
+\def\TPdate{09/01/2024}
 \usepackage{soul}
 \usepackage{codehigh}
 \usepackage{tabularray}
@@ -71,15 +71,19 @@
 \vfill
 
 \begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
-\PuzzleThemes{A,B,C,D,E,F,G,H}
+\PuzzleThemes[CouleursFond={yellow!50,purple!50}]{A,B,C,D,E,F,G,H}
 \end{tcolorbox}
 
 \begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center]
-\PuzzleThemes[Epaisseur=1.25pt,Echelle=2.75,CouleursFond={yellow!10,orange!10,green!10,teal!10,purple!10},Labels={Probas,Stats,Python,Suites,Matrices},CouleurBord=darkgray,CouleurIcones=teal!50!black]{\ThemProbas,\ThemStats,\ThemPython,\ThemSuites,\ThemMatrices}
+\PuzzleThemes[Epaisseur=1.25pt,Echelle=2.75,CouleursFond={yellow!10,orange!10,green!10,teal!10,purple!10},Labels={Probas,Stats,Python,Suites,Matrices},CouleurBord=darkgray,CouleurIcones=teal!75!black]{\ThemProbas,\ThemStats,\ThemPython,\ThemSuites,\ThemMatrices}
 \end{tcolorbox}
 
-\vfill~
+\vfill
 
+\hfill{\footnotesize\itshape Merci à quark67 pour ses retours.}
+
+\vspace*{5mm}
+
 \pagebreak
 
 \phantomsection
@@ -131,8 +135,7 @@
 Les packages utiles, et chargés sont :
 
 \begin{itemize}
-	\item \MontreCode{tikz} ;
-	\item \MontreCode{fontawesome5} ;
+	\item \MontreCode{tikz}, \MontreCode{fontawesome5} et \MontreCode{xintexpr} ;
 	\item \MontreCode{simplekv}, \MontreCode{listofitems} et \MontreCode{xstring}.
 \end{itemize}
 
@@ -142,6 +145,7 @@
 
 \begin{quote}
 \begin{verbatim}
+0.1.1 : Amélioration de la gestion des couleurs
 0.1.0 : Version initiale
 \end{verbatim}
 \end{quote}
@@ -168,9 +172,9 @@
 \begin{itemize}
 	\item \MontreCode{Epaisseur} := épaisseur des traits (\MontreCode{1pt} par défaut) ;
 	\item \MontreCode{Echelle} := échelle globale de la figure (\MontreCode{1} par défaut) ;
-	\item \MontreCode{CouleursFond} := couleur de fond (\MontreCode{vide} par défaut) ;
-	\item \MontreCode{CouleurBord} := couleur(s) (si besoin séparées par des \MontreCode{,}) des bordures (\MontreCode{black} par défaut) ;
-	\item \MontreCode{Labels} := libellés (optionnels) des thèmes (\MontreCode{vide} par défaut) ;
+	\item \MontreCode{CouleursFond} := couleur(s) de fond (voir paragraphe sur les couleurs) ;
+	\item \MontreCode{CouleurBord} := couleur des bordures (\MontreCode{black} par défaut) ;
+	\item \MontreCode{Labels} := libellés (optionnels) des thèmes (\MontreCode{\{\}} par défaut) ;
 	\item \MontreCode{EchelleLabels} := échelle des libellés (\MontreCode{1.15} par défaut) ;
 	\item \MontreCode{PoliceLabels} := police des libellés (\MontreCode{\textbackslash tiny\textbackslash sffamily} par défaut) ;
 	\item \MontreCode{CouleurIcones} := couleur des icônes et les libellés (\MontreCode{black} par défaut).
@@ -184,12 +188,28 @@
 
 L'argument obligatoire, entre \MontreCode{\{...\}}, correspond à la liste des décorations (sous forme de \textit{caractères}) des différentes pièces de puzzle, sous la forme \MontreCode{\{Déco<1>,Déco<2>,...,Déco<n>\}}
 
+\subsection{Les couleurs des cases}
+
+Concernant la couleur de cases, c'est la clé \MontreCode{CouleursFond} qui en est en charge.
+
+Elle peut fonctionner de plusieurs manières :
+
+\begin{itemize}
+	\item par défaut elle est vide, ce qui ne colorie pas les cases ;
+	\item on peut la donner sous forme unique, via \MontreCode{CouleursFond=macouleur}, au quel cas toutes les cases sont de la même couleur ;
+	\item on peut la donner sous forme d'une liste \MontreCode{CouleursFond=\{macouleurA,macouleurB,...\}} et :
+	\begin{itemize}
+		\item dans le cas où le nombre de couleurs est suffisant, elles sont utilisées l'une après l'autre ;
+		\item dans le cas contraire, le code se charge de \textit{répéter} le motif des couleurs proposées.
+	\end{itemize}
+\end{itemize}
+
 \subsection{Raccourcis pour certaines décorations}
 
-Des \textit{raccourcis} francisés ont été créés dans le package, pour des saisies simplifiées d décoration :
+Des \textit{raccourcis} francisés ont été créés dans le package, pour des saisies simplifiées des décorations :
 
 \begin{center}
-	\begin{tblr}{hlines,colspec={Q[m,l]Q[m,l]}}
+	\begin{tblr}{hlines,colspec={Q[m,l]Q[m,c]}}
 		\fakeverb{\ThemProbas} & \ThemProbas \\
 		\fakeverb{\ThemStats} & \ThemStats \\
 		\fakeverb{\ThemChimie} & \ThemChimie \\
@@ -200,6 +220,9 @@
 		\fakeverb{\ThemCalculs} & \ThemCalculs \\
 		\fakeverb{\ThemMatrices} & \ThemMatrices \\
 		\fakeverb{\ThemGeometrie} & \ThemGeometrie \\
+	\end{tblr}
+	\hspace{1cm}
+	\begin{tblr}{hlines,colspec={Q[m,l]Q[m,c]}}
 		\fakeverb{\ThemEspace} & \ThemEspace \\
 		\fakeverb{\ThemPhysique} & \ThemPhysique \\
 		\fakeverb{\ThemFonctions} & \ThemFonctions \\
@@ -219,7 +242,8 @@
 \end{tcblisting}
 
 \begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
-\PuzzleThemes[Labels={Maths,Histoire,Géo,Chimie}]{\faAngry,\faArchway,\faAtlas,\faAtom}
+\PuzzleThemes[Labels={Maths,Histoire,Géo,Chimie},CouleursFond={yellow!25,red!25}]%
+  {\faAngry,\faArchway,\faAtlas,\faAtom}
 \end{tcblisting}
 
 \begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
@@ -240,8 +264,42 @@
   [Epaisseur=2pt,Echelle=1.25,
   CouleursFond={yellow!10,orange!10,red!10,teal!10,purple!10},
   Labels={Probas,Stats,Python,Suites,Matrices},CouleurBord=brown,
-  CouleurIcones=teal!50!black]%
+  CouleurIcones=teal!75!black]%
   {\ThemProbas,\ThemStats,\ThemPython,\ThemSuites,\ThemMatrices}
 \end{tcblisting}
 
+\pagebreak
+
+\section{La commande en anglais}
+
+Le package propose également la commande et ses clés en version anglaise.
+
+\begin{quote}
+\begin{verbatim}
+%----commande anglaise
+\ThematicPuzzle[clés]<options tikz>{liste des décorations}
+\end{verbatim}
+\end{quote}
+
+Les \textsf{clés}, toujours optionnelles et entre \MontreCode{[...]}, sont :
+
+\begin{itemize}
+	\item \MontreCode{Thickness} ;
+	\item \MontreCode{Scale} ;
+	\item \MontreCode{BgColors} ;
+	\item \MontreCode{BorderColor} ;
+	\item \MontreCode{Labels} ;
+	\item \MontreCode{ScaleLabels} ;
+	\item \MontreCode{FontLabels} ;
+	\item \MontreCode{IconsColor}.
+\end{itemize}
+
+\begin{tcblisting}{colframe=lightgray,colback=lightgray!5}
+\ThematicPuzzle%
+  [Thickness=2pt,Scale=1.25,
+  BgColors={yellow!10,orange!10,red!10,teal!10,purple!10,gray!10},
+  IconsColor=teal!75!black]%
+  {P,Y,T,H,O,N}
+\end{tcblisting}
+
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty	2024-01-09 21:06:56 UTC (rev 69355)
+++ trunk/Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty	2024-01-09 21:07:16 UTC (rev 69356)
@@ -2,7 +2,8 @@
 % licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{thematicpuzzle}[2023/12/17 0.1.0 Present 'puzzle' with different thematics, in TikZ]
+\ProvidesPackage{thematicpuzzle}[2024/01/09 0.1.1 Present 'puzzle' with different thematics, in TikZ]
+% 0.1.1	Enhancments for colors
 % 0.1.0	Initial version
 
 %====PACKAGES
@@ -9,6 +10,7 @@
 \RequirePackage{tikz}
 \RequirePackage{simplekv}
 \RequirePackage{xstring}
+\RequirePackage{xintexpr}
 \RequirePackage{listofitems}
 \RequirePackage{fontawesome5}
 
@@ -69,11 +71,27 @@
 	\readlist*\PuzzleListeAlea{\puzztmpalea}%
 	\IfSubStr{\puzzthmbg}{,}%
 		{%
-			\readlist*\PuzzleListeCouleurs{\puzzthmbg}%
+			\StrCount{\puzzthmbg}{,}[\puzznbvirg]%
+			\xintifboolexpr{\puzznbvirg < \PuzzleListeThemeslen}%
+				{%
+					\xdef\nbrepet{\fpeval{round(\PuzzleListeThemeslen/(\puzznbvirg+1),0,1)}}%
+					\xdef\puzzlstcol{\puzzthmbg}%
+					\foreach \i in {2,...,\nbrepet}{%
+						\xdef\puzzlstcol{\puzzlstcol,\puzzthmbg}%
+					}%
+				}%
+				{%
+					\xdef\puzzlstcol{\puzzthmbg}%
+				}%
 		}%
 		{%
-			\xdef\puzzthmbgcol{\puzzthmbg}%
+			\xdef\puzzlstcol{\puzzthmbg}%
+			\foreach \i in {2,...,\PuzzleListeThemeslen}{%
+				\xdef\puzzlstcol{\puzzlstcol,\puzzthmbg}%
+			}%
 		}%
+	\readlist*\PuzzleListeCouleurs{\puzzlstcol}%
+	%environnement tikz
 	\begin{tikzpicture}[scale=\puzzthmscale,transform shape,#2]%
 		%styles
 		\tikzset{bordure/.style={\puzzthmbc,line width={0.5*\puzzthmscale*\puzzthmthick}}}%
@@ -82,11 +100,7 @@
 			{\tikzset{fond/.style={}}}%
 			{\tikzset{fond/.style={fill=\puzzthmbgcol}}}%
 		%1ère pièce
-		\IfSubStr{\puzzthmbg}{,}%
-			{%
-				\itemtomacro\PuzzleListeCouleurs[1]{\puzzthmbgcol}%
-			}%
-			{}%
+		\itemtomacro\PuzzleListeCouleurs[1]{\puzzthmbgcol}%
 		\itemtomacro\PuzzleListeAlea[1]{\tmprand}%
 		\draw[bordure,fond] (\tmprounded,0) -- (1,0) .. controls (1+\tmprand*0.66*0.00,0.0) and (1+\tmprand*0.66*-0.04,0.4) ..
 		(1+\tmprand*0.66*0.04,0.4) .. controls (1+\tmprand*0.66*0.11,0.4) and (1+\tmprand*0.66*0.26,0.2) .. 
@@ -98,11 +112,7 @@
 			\xdef\ipu{\inteval{\i+1}}%
 			\itemtomacro\PuzzleListeAlea[\i]{\tmprandg}%
 			\itemtomacro\PuzzleListeAlea[\ipu]{\tmprandd}%
-			\IfSubStr{\puzzthmbg}{,}%
-				{%
-					\itemtomacro\PuzzleListeCouleurs[\ipu]{\puzzthmbgcol}%
-				}%
-				{}%
+			\itemtomacro\PuzzleListeCouleurs[\ipu]{\puzzthmbgcol}%
 			\draw[bordure,fond] (\i,0) .. controls (\i+\tmprandg*0.66*0.00,0.0) and (\i+\tmprandg*0.66*-0.04,0.4) ..
 			(\i+\tmprandg*0.66*0.04,0.4) .. controls (\i+\tmprandg*0.66*0.11,0.4) and (\i+\tmprandg*0.66*0.26,0.2) .. 
 			(\i+\tmprandg*0.66*0.26,0.5) .. controls (\i+\tmprandg*0.66*0.26,0.8) and (\i+\tmprandg*0.66*0.11,0.6) .. 
@@ -115,11 +125,7 @@
 			(\ipu+\tmprandd*0.66*0.00,0.0) -- (\ipu,0) -- (\i,0);
 		}%
 		%dernière pièce
-		\IfSubStr{\puzzthmbg}{,}%
-			{%
-				\itemtomacro\PuzzleListeCouleurs[-1]{\puzzthmbgcol}%
-			}%
-			{}%
+		\itemtomacro\PuzzleListeCouleurs[\PuzzleListeThemeslen]{\puzzthmbgcol}%
 		\itemtomacro\PuzzleListeAlea[-1]{\tmprand}%
 		\draw[bordure,fond] (\puzzthmnb-1,0) .. controls (\puzzthmnb-1+\tmprand*0.66*0.00,0.0) and (\puzzthmnb-1+\tmprand*0.66*-0.04,0.4) ..
 		(\puzzthmnb-1+\tmprand*0.66*0.04,0.4) .. controls (\puzzthmnb-1+\tmprand*0.66*0.11,0.4) and (\puzzthmnb-1+\tmprand*0.66*0.26,0.2) .. 
@@ -177,11 +183,27 @@
 	\readlist*\PuzzleListeAlea{\puzztmpalea}%
 	\IfSubStr{\puzzthmbg}{,}%
 		{%
-			\readlist*\PuzzleListeCouleurs{\puzzthmbg}%
+			\StrCount{\puzzthmbg}{,}[\puzznbvirg]%
+			\xintifboolexpr{\puzznbvirg < \PuzzleListeThemeslen}%
+				{%
+					\xdef\nbrepet{\fpeval{round(\PuzzleListeThemeslen/(\puzznbvirg+1),0,1)}}%
+					\xdef\puzzlstcol{\puzzthmbg}%
+					\foreach \i in {2,...,\nbrepet}{%
+						\xdef\puzzlstcol{\puzzlstcol,\puzzthmbg}%
+					}%
+				}%
+				{%
+					\xdef\puzzlstcol{\puzzthmbg}%
+				}%
 		}%
 		{%
-			\xdef\puzzthmbgcol{\puzzthmbg}%
+			\xdef\puzzlstcol{\puzzthmbg}%
+			\foreach \i in {2,...,\PuzzleListeThemeslen}{%
+				\xdef\puzzlstcol{\puzzlstcol,\puzzthmbg}%
+			}%
 		}%
+	\readlist*\PuzzleListeCouleurs{\puzzlstcol}%
+	%environnement tikz
 	\begin{tikzpicture}[scale=\puzzthmscale,transform shape,#2]%
 		%styles
 		\tikzset{border/.style={\puzzthmbc,line width={0.5*\puzzthmscale*\puzzthmthick}}}%
@@ -190,11 +212,7 @@
 			{\tikzset{background/.style={}}}%
 			{\tikzset{background/.style={fill=\puzzthmbgcol}}}%
 		%1ère pièce
-		\IfSubStr{\puzzthmbg}{,}%
-			{%
-				\itemtomacro\PuzzleListeCouleurs[1]{\puzzthmbgcol}%
-			}%
-			{}%
+		\itemtomacro\PuzzleListeCouleurs[1]{\puzzthmbgcol}%
 		\itemtomacro\PuzzleListeAlea[1]{\tmprand}%
 		\draw[border,background] (\tmprounded,0) -- (1,0) .. controls (1+\tmprand*0.66*0.00,0.0) and (1+\tmprand*0.66*-0.04,0.4) ..
 		(1+\tmprand*0.66*0.04,0.4) .. controls (1+\tmprand*0.66*0.11,0.4) and (1+\tmprand*0.66*0.26,0.2) .. 
@@ -206,11 +224,7 @@
 			\xdef\ipu{\inteval{\i+1}}%
 			\itemtomacro\PuzzleListeAlea[\i]{\tmprandg}%
 			\itemtomacro\PuzzleListeAlea[\ipu]{\tmprandd}%
-			\IfSubStr{\puzzthmbg}{,}%
-				{%
-					\itemtomacro\PuzzleListeCouleurs[\ipu]{\puzzthmbgcol}%
-				}%
-				{}%
+			\itemtomacro\PuzzleListeCouleurs[\ipu]{\puzzthmbgcol}%
 			\draw[border,background] (\i,0) .. controls (\i+\tmprandg*0.66*0.00,0.0) and (\i+\tmprandg*0.66*-0.04,0.4) ..
 			(\i+\tmprandg*0.66*0.04,0.4) .. controls (\i+\tmprandg*0.66*0.11,0.4) and (\i+\tmprandg*0.66*0.26,0.2) .. 
 			(\i+\tmprandg*0.66*0.26,0.5) .. controls (\i+\tmprandg*0.66*0.26,0.8) and (\i+\tmprandg*0.66*0.11,0.6) .. 
@@ -223,11 +237,7 @@
 			(\ipu+\tmprandd*0.66*0.00,0.0) -- (\ipu,0) -- (\i,0);
 		}%
 		%dernière pièce
-		\IfSubStr{\puzzthmbg}{,}%
-			{%
-				\itemtomacro\PuzzleListeCouleurs[-1]{\puzzthmbgcol}%
-			}%
-			{}%
+		\itemtomacro\PuzzleListeCouleurs[\PuzzleListeThemeslen]{\puzzthmbgcol}%
 		\itemtomacro\PuzzleListeAlea[-1]{\tmprand}%
 		\draw[border,background] (\puzzthmnb-1,0) .. controls (\puzzthmnb-1+\tmprand*0.66*0.00,0.0) and (\puzzthmnb-1+\tmprand*0.66*-0.04,0.4) ..
 		(\puzzthmnb-1+\tmprand*0.66*0.04,0.4) .. controls (\puzzthmnb-1+\tmprand*0.66*0.11,0.4) and (\puzzthmnb-1+\tmprand*0.66*0.26,0.2) .. 



More information about the tex-live-commits mailing list.