summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-01-10 03:03:23 +0000
committerNorbert Preining <norbert@preining.info>2024-01-10 03:03:23 +0000
commitcdb8117b8f1ac752d1927b82759c5be9f0ec0ab5 (patch)
treeebd07d36ab12076de3523b744cc87f975747f3e0 /graphics/pgf/contrib
parent140e2f7f1509acd423172e2895d0d7839e5b88c6 (diff)
CTAN sync 202401100303
Diffstat (limited to 'graphics/pgf/contrib')
-rw-r--r--graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.pdfbin200040 -> 213685 bytes
-rw-r--r--graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.tex48
-rw-r--r--graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.pdfbin195676 -> 214166 bytes
-rw-r--r--graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.tex86
-rw-r--r--graphics/pgf/contrib/thematicpuzzle/tex/thematicpuzzle.sty80
5 files changed, 151 insertions, 63 deletions
diff --git a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.pdf b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.pdf
index d61e0bcadf..e06746fada 100644
--- a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.pdf
+++ b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.tex b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.tex
index e47d51601c..48abe55779 100644
--- a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.tex
+++ b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-en.tex
@@ -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,14 +72,16 @@
\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]
\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
@@ -132,9 +134,8 @@ To load the package, simply add in the preamble :
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 @@ The useful and loaded packages are:
\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 @@ The useful and loaded packages are:
\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 @@ The \textsf{keys}, optional and between \MontreCode{[...]}, are:
\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 @@ The \textsf{keys}, optional and between \MontreCode{[...]}, are:
\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 @@ The obligatory argument, between \MontreCode{\{...\}}, corresponds to the list o
\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}
diff --git a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.pdf b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.pdf
index 17569a6dd3..191204c1b1 100644
--- a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.pdf
+++ b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.tex b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.tex
index 427ce2fdc4..e8d4a20d01 100644
--- a/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.tex
+++ b/graphics/pgf/contrib/thematicpuzzle/doc/thematicpuzzle-doc-fr.tex
@@ -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,14 +71,18 @@
\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
@@ -131,8 +135,7 @@ Pour charger le package, il suffit d'ajouter dans le préambule :
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 @@ Les packages utiles, et chargés sont :
\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 @@ Les \textsf{clés}, optionnelles et entre \MontreCode{[...]}, sont :
\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 optionnel, entre \MontreCode{<...>}, correspond à des options spéci
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 @@ Des \textit{raccourcis} francisés ont été créés dans le package, pour des s
\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 @@ Des \textit{raccourcis} francisés ont été créés dans le package, pour des s
\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 @@ Des \textit{raccourcis} francisés ont été créés dans le package, pour des s
[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
diff --git a/graphics/pgf/contrib/thematicpuzzle/tex/thematicpuzzle.sty b/graphics/pgf/contrib/thematicpuzzle/tex/thematicpuzzle.sty
index 96576c24f3..763fa906ee 100644
--- a/graphics/pgf/contrib/thematicpuzzle/tex/thematicpuzzle.sty
+++ b/graphics/pgf/contrib/thematicpuzzle/tex/thematicpuzzle.sty
@@ -2,13 +2,15 @@
% 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
\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) ..