diff options
author | Karl Berry <karl@freefriends.org> | 2023-12-18 20:55:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-12-18 20:55:50 +0000 |
commit | 6202caa4dd7f11097123efdc8f0bd3d0a5f07b50 (patch) | |
tree | 2ce29dbefc52bb05b009c2beb79963e0dfadf728 /Master | |
parent | cf68068a52192064a0f40b2658276b13eb478088 (diff) |
thematicpuzzle (18dec23)
git-svn-id: svn://tug.org/texlive/trunk@69159 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/thematicpuzzle/README.md | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.pdf | bin | 0 -> 200040 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex | 218 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.pdf | bin | 0 -> 195676 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex | 247 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty | 254 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 3 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-games.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/thematicpuzzle.tlpsrc | 0 |
10 files changed, 730 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/thematicpuzzle/README.md b/Master/texmf-dist/doc/latex/thematicpuzzle/README.md new file mode 100644 index 00000000000..c90dc5348fd --- /dev/null +++ b/Master/texmf-dist/doc/latex/thematicpuzzle/README.md @@ -0,0 +1,7 @@ +thematicpuzzle is a package to present a 'puzzle' of different themes. +------------------------------------------------------------------------------ +thematicpuzzle est un package pour présenter un 'puzzle' de différents thèmes. +------------------------------------------------------------------------------ +Author : Cédric Pierquet +email : cpierquet@outlook.fr +Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.pdf b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.pdf Binary files differnew file mode 100644 index 00000000000..d61e0bcadf9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.pdf diff --git a/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex new file mode 100644 index 00000000000..e47d51601c1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-en.tex @@ -0,0 +1,218 @@ +% !TeX TXS-program:compile = txs:///arara +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') + +\documentclass[11pt,a4paper]{ltxdoc} +\usepackage{thematicpuzzle} +\usepackage{fancyvrb} +\usepackage{fancyhdr} +\usepackage{hyperref} +\usepackage{tcolorbox} +\tcbuselibrary{listings,listingsutf8} +\fancyhf{} +\renewcommand{\headrulewidth}{0pt} +\lfoot{\sffamily\small [thematicpuzzle]} +\rfoot{\sffamily\small - \thepage{} -} +\usepackage{hologo} +\usepackage{xspace} +\providecommand\tikzlogo{Ti\textit{k}Z} +\providecommand\TeXLive{\TeX{}Live\xspace} +\providecommand\PSTricks{\textsf{PSTricks}\xspace} +\let\pstricks\PSTricks +\let\TikZ\tikzlogo + +\urlstyle{same} +\hypersetup{pdfborder=0 0 0} +\usepackage[margin=2cm]{geometry} +\setlength{\parindent}{0pt} +\def\TPversion{0.1.0} +\def\TPdate{17/12/2023} +\usepackage{soul} +\usepackage{codehigh} +\usepackage{tabularray} +\sethlcolor{lightgray!25} +\NewDocumentCommand\MontreCode{ m }{% + \hl{\vphantom{\texttt{pf}}\texttt{#1}}% +} +\usepackage[english]{babel} + +\begin{document} + +\pagestyle{fancy} + +\thispagestyle{empty} + +\begin{center} + \begin{minipage}{0.88\linewidth} + \begin{tcolorbox}[colframe=yellow,colback=yellow!15] + \begin{center} + \begin{tabular}{c} + {\Huge \texttt{thematicpuzzle [en]}}\\ + \\ + {\LARGE Present a horizontal 'puzzle',} \\ + {\LARGE with different themes.} \\ + \\ + {\small \texttt{Version \TPversion{} -- \TPdate}} + \end{tabular} + \end{center} + \end{tcolorbox} +\end{minipage} +\end{center} + +\begin{center} + \begin{tabular}{c} + \texttt{Cédric Pierquet}\\ + {\ttfamily c pierquet -- at -- outlook . fr}\\ + \texttt{\url{https://github.com/cpierquet/thematicpuzzle}} \\ +\end{tabular} +\end{center} + +\hrule + +\vfill + +\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center] +\ThematicPuzzle{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~ + +\pagebreak + +\phantomsection + +\hypertarget{matoc}{} + +\tableofcontents + +\vspace*{5mm} + +\hrule + +\vspace*{5mm} + +\section{Introduction} + +\subsection{Description} + +With this package, it is possible to create a \textit{horizontal banner}, in the form of a puzzle, with different themes. + +The styles are \textit{globally} fixed, but it is possible to configure: + +\begin{itemize} + \item colors; + \item icons; + \item labels. +\end{itemize} + +The interior \textit{borders} are randomly oriented to the left or to the right, and the code takes care of coloring (if applicable) the parts satisfactorily. + +\subsection{Decorations} + +For the moment, the \textit{decorations} of the parts must be declared as characters, for example with icons from the \MontreCode{fontawesome5} package (loaded by the package). + +\smallskip + +Ultimately, it may be possible to insert images or \TikZ\ codes, this is one of the areas for improvement. + +\subsection{Loading} + +To load the package, simply add in the preamble : + +\begin{quote} +\begin{verbatim} +\usepackage{thematicpuzzle} +\end{verbatim} +\end{quote} + +The useful and loaded packages are: + +\begin{itemize} + \item \MontreCode{tikz}; + \item \MontreCode{fontawesome5}; + \item \MontreCode{simplekv}, \MontreCode{listofitems} and \MontreCode{xstring}. +\end{itemize} + +\vfill + +\subsection{History} + +\begin{quote} +\begin{verbatim} +0.1.0: Initial release +\end{verbatim} +\end{quote} + +\pagebreak + +\section{The macro} + +\subsection{General usage, keyx and options} + +In order to create a \textit{theme puzzle}, the command is: + +\begin{quote} +\begin{verbatim} +%----thematic puzzle +\ThematicPuzzle[keys]<tikz options>{decoration list} +\end{verbatim} +\end{quote} + +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{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). +\end{itemize} + +\medskip + +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{Examples} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\ThematicPuzzle{\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\ThematicPuzzle[Labels={Maths,History,Geo,Chemistry}]% + {\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\ThematicPuzzle% + [Scale=2,BgColors=yellow!25,Labels={Maths,History,Geo,Chemistry}]% + {\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\ThematicPuzzle% + [Scale=3,BgColors={yellow!10,orange!10,red!10,teal!10}, + Labels={Maths,History,Geo,Chemistry}]% + {\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\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!50!black]% + {P,Y,T,H,O,N} +\end{tcblisting} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.pdf b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.pdf Binary files differnew file mode 100644 index 00000000000..17569a6dd3f --- /dev/null +++ b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.pdf diff --git a/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex new file mode 100644 index 00000000000..427ce2fdc49 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thematicpuzzle/thematicpuzzle-doc-fr.tex @@ -0,0 +1,247 @@ +% !TeX TXS-program:compile = txs:///arara +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') + +\documentclass[11pt,a4paper]{ltxdoc} +\usepackage{thematicpuzzle} +\usepackage{fancyvrb} +\usepackage{fancyhdr} +\usepackage{hyperref} +\usepackage{tcolorbox} +\tcbuselibrary{listings,listingsutf8} +\fancyhf{} +\renewcommand{\headrulewidth}{0pt} +\lfoot{\sffamily\small [thematicpuzzle]} +\rfoot{\sffamily\small - \thepage{} -} +\usepackage{hologo} +\providecommand\tikzlogo{Ti\textit{k}Z} +\providecommand\TeXLive{\TeX{}Live\xspace} +\providecommand\PSTricks{\textsf{PSTricks}\xspace} +\let\pstricks\PSTricks +\let\TikZ\tikzlogo + +\urlstyle{same} +\hypersetup{pdfborder=0 0 0} +\usepackage[margin=2cm]{geometry} +\setlength{\parindent}{0pt} +\def\TPversion{0.1.0} +\def\TPdate{17/12/2023} +\usepackage{soul} +\usepackage{codehigh} +\usepackage{tabularray} +\sethlcolor{lightgray!25} +\NewDocumentCommand\MontreCode{ m }{% + \hl{\vphantom{\texttt{pf}}\texttt{#1}}% +} +\usepackage[french]{babel} + +\begin{document} + +\pagestyle{fancy} + +\thispagestyle{empty} + +\begin{center} + \begin{minipage}{0.88\linewidth} + \begin{tcolorbox}[colframe=yellow,colback=yellow!15] + \begin{center} + \begin{tabular}{c} + {\Huge \texttt{thematicpuzzle [fr]}}\\ + \\ + {\LARGE Présenter un 'puzzle' horizontal,} \\ + {\LARGE avec différents thèmes.} \\ + \\ + {\small \texttt{Version \TPversion{} -- \TPdate}} + \end{tabular} + \end{center} + \end{tcolorbox} +\end{minipage} +\end{center} + +\begin{center} + \begin{tabular}{c} + \texttt{Cédric Pierquet}\\ + {\ttfamily c pierquet -- at -- outlook . fr}\\ + \texttt{\url{https://github.com/cpierquet/thematicpuzzle}} \\ +\end{tabular} +\end{center} + +\hrule + +\vfill + +\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5,halign=center] +\PuzzleThemes{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} +\end{tcolorbox} + +\vfill~ + +\pagebreak + +\phantomsection + +\hypertarget{matoc}{} + +\tableofcontents + +\vspace*{5mm} + +\hrule + +\vspace*{5mm} + +\section{Introduction} + +\subsection{Description} + +Avec ce package, il est possible de créer un \textit{bandeau horizontal}, sous forme de puzzle, avec différentes thématiques. + +Les styles sont \textit{globalement} fixés, mais il est possible de configurer : + +\begin{itemize} + \item les couleurs ; + \item les icones ; + \item les labels. +\end{itemize} + +Les \textit{bordures} intérieures sont aléatoirement orientées vers la gauche ou vers la droite, et le code se charge de colorier (le cas échéant) les pièces de manière satisfaisante. + +\subsection{Décorations} + +Pour le moment, les \textit{décorations} des pièces sont à déclarer comme des caractères, par exemple avec des icônes du package \MontreCode{fontawesome5} (chargé par le package). + +\smallskip + +À terme, il sera peut-être possible d'insérer des images ou des codes \TikZ, cela fait partie des pistes d'améliorations. + +\subsection{Chargement} + +Pour charger le package, il suffit d'ajouter dans le préambule : + +\begin{quote} +\begin{verbatim} +\usepackage{thematicpuzzle} +\end{verbatim} +\end{quote} + +Les packages utiles, et chargés sont : + +\begin{itemize} + \item \MontreCode{tikz} ; + \item \MontreCode{fontawesome5} ; + \item \MontreCode{simplekv}, \MontreCode{listofitems} et \MontreCode{xstring}. +\end{itemize} + +\vfill + +\subsection{Historique} + +\begin{quote} +\begin{verbatim} +0.1.0 : Version initiale +\end{verbatim} +\end{quote} + +\pagebreak + +\section{La commande} + +\subsection{Fonctionnement global} + +Dans le but de créer un \textit{puzzle de thèmes}, la commande est : + +\begin{quote} +\begin{verbatim} +%----puzzle de thèmes +\PuzzleThemes[clés]<options tikz>{liste des décorations} +\end{verbatim} +\end{quote} + +\subsection{Clés, arguments} + +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{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). +\end{itemize} + +\medskip + +L'argument optionnel, entre \MontreCode{<...>}, correspond à des options spécifiques (en langage \TikZ) à passer à l'environnement créé. + +\smallskip + +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{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 : + +\begin{center} + \begin{tblr}{hlines,colspec={Q[m,l]Q[m,l]}} + \fakeverb{\ThemProbas} & \ThemProbas \\ + \fakeverb{\ThemStats} & \ThemStats \\ + \fakeverb{\ThemChimie} & \ThemChimie \\ + \fakeverb{\ThemArithm} & \ThemArithm \\ + \fakeverb{\ThemGraphes} & \ThemGraphes \\ + \fakeverb{\ThemComplexes} & \ThemComplexes \\ + \fakeverb{\ThemMPM} & \ThemMPM \\ + \fakeverb{\ThemCalculs} & \ThemCalculs \\ + \fakeverb{\ThemMatrices} & \ThemMatrices \\ + \fakeverb{\ThemGeometrie} & \ThemGeometrie \\ + \fakeverb{\ThemEspace} & \ThemEspace \\ + \fakeverb{\ThemPhysique} & \ThemPhysique \\ + \fakeverb{\ThemFonctions} & \ThemFonctions \\ + \fakeverb{\ThemSuites} & \ThemSuites \\ + \fakeverb{\ThemTableur} & \ThemTableur \\ + \fakeverb{\ThemAlgo} & \ThemAlgo \\ + \fakeverb{\ThemEco} & \ThemEco \\ + \fakeverb{\ThemPython} & \ThemPython \\ + \fakeverb{\ThemLogique} & \ThemLogique \\ + \end{tblr} +\end{center} + +\subsection{Exemples} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\PuzzleThemes{\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\PuzzleThemes[Labels={Maths,Histoire,Géo,Chimie}]{\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\PuzzleThemes% + [Echelle=2,CouleursFond=yellow!25,Labels={Maths,Histoire,Géo,Chimie}]% + {\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\PuzzleThemes% + [Echelle=3,CouleursFond={yellow!10,orange!10,red!10,teal!10}, + Labels={Maths,Histoire,Géo,Chimie}]% + {\faAngry,\faArchway,\faAtlas,\faAtom} +\end{tcblisting} + +\begin{tcblisting}{colframe=lightgray,colback=lightgray!5} +\PuzzleThemes% + [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]% + {\ThemProbas,\ThemStats,\ThemPython,\ThemSuites,\ThemMatrices} +\end{tcblisting} + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty b/Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty new file mode 100644 index 00000000000..96576c24f3e --- /dev/null +++ b/Master/texmf-dist/tex/latex/thematicpuzzle/thematicpuzzle.sty @@ -0,0 +1,254 @@ +% Author : C. Pierquet +% 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] +% 0.1.0 Initial version + +%====PACKAGES +\RequirePackage{tikz} +\RequirePackage{simplekv} +\RequirePackage{xstring} +\RequirePackage{listofitems} +\RequirePackage{fontawesome5} + +%====ALIASES FA5 FRENCH +\newcommand\ThemProbas{\faDice} +\newcommand\ThemStats{\faChartBar} +\newcommand\ThemChimie{\faBong} +\newcommand\ThemArithm{\faListOl} +\newcommand\ThemGraphes{\faProjectDiagram} +\newcommand\ThemComplexes{\faInfo} +\newcommand\ThemMPM{\faSitemap} +\newcommand\ThemCalculs{\faIcon{square-root-alt}} +\newcommand\ThemMatrices{\faTh} +\newcommand\ThemGeometrie{\faPencilRuler} +\newcommand\ThemEspace{\faCube} +\newcommand\ThemPhysique{\faRocket} +\newcommand\ThemFonctions{\faChartArea} +\newcommand\ThemSuites{\faSignal} +\newcommand\ThemTableur{\faTable} +\newcommand\ThemAlgo{\faCode} +\newcommand\ThemEco{\faIcon{money-bill-wave}} +\newcommand\ThemPython{\faPython} +\newcommand\ThemLogique{\faYinYang} +\newcommand\VAlignTikz{current bounding box.center} + +%====FRENCH VERSION +\defKV[puzzlethemes]{% + Epaisseur=\def\puzzthmthick{#1},% + Echelle=\def\puzzthmscale{#1},% + CouleursFond=\def\puzzthmbg{#1},% + CouleurBord=\def\puzzthmbc{#1},% + Labels=\def\puzzthmlab{#1},% + EchelleLabels=\def\puzzthmscalab{#1},% + PoliceLabels=\def\puzzthmfontlab{#1},% + CouleurIcones=\def\puzzthmcolicon{#1} +} +\setKVdefault[puzzlethemes]{% + Epaisseur=1pt,% + Echelle=1,% + CouleursFond={},% + CouleurBord=black, + Labels={},% + EchelleLabels=1.15,% + PoliceLabels=\tiny\sffamily,% + CouleurIcones=black +} + +\NewDocumentCommand\PuzzleThemes{ O{} D<>{} m }{% + \def\tmprounded{0.05}% + \useKVdefault[puzzlethemes]% + \setKV[puzzlethemes]{#1}% + \readlist*\PuzzleListeThemes{#3}% + \xdef\puzzthmnb{\PuzzleListeThemeslen}% + \xdef\puzztmpalea{\fpeval{2*randint(1,2)-3}}% + \foreach \i in {2,...,\inteval{\PuzzleListeThemeslen-1}}{% + \xdef\puzztmpalea{\puzztmpalea,\fpeval{2*randint(1,2)-3}}% + }% + \readlist*\PuzzleListeAlea{\puzztmpalea}% + \IfSubStr{\puzzthmbg}{,}% + {% + \readlist*\PuzzleListeCouleurs{\puzzthmbg}% + }% + {% + \xdef\puzzthmbgcol{\puzzthmbg}% + }% + \begin{tikzpicture}[scale=\puzzthmscale,transform shape,#2]% + %styles + \tikzset{bordure/.style={\puzzthmbc,line width={0.5*\puzzthmscale*\puzzthmthick}}}% + \tikzset{label/.style={font=\puzzthmfontlab,text=\puzzthmcolicon}}% + \IfEq{\puzzthmbg}{}% + {\tikzset{fond/.style={}}}% + {\tikzset{fond/.style={fill=\puzzthmbgcol}}}% + %1ère pièce + \IfSubStr{\puzzthmbg}{,}% + {% + \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) .. + (1+\tmprand*0.66*0.26,0.5) .. controls (1+\tmprand*0.66*0.26,0.8) and (1+\tmprand*0.66*0.11,0.6) .. + (1+\tmprand*0.66*0.04,0.6) .. controls (1+\tmprand*0.66*-0.04,0.6) and (1+\tmprand*0.66*0.00,1.0) .. + (1+\tmprand*0.66*0.00,1.0) -- (1,1) -- (\tmprounded,1) to[out=180,in=90] (0,1-\tmprounded) -- (0,\tmprounded) to[out=-90,in=180] (\tmprounded,0) ; + %les pièces du milieu + \foreach \i in {1,...,\inteval{\PuzzleListeThemeslen-2}}{% + \xdef\ipu{\inteval{\i+1}}% + \itemtomacro\PuzzleListeAlea[\i]{\tmprandg}% + \itemtomacro\PuzzleListeAlea[\ipu]{\tmprandd}% + \IfSubStr{\puzzthmbg}{,}% + {% + \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) .. + (\i+\tmprandg*0.66*0.04,0.6) .. controls (\i+\tmprandg*0.66*-0.04,0.6) and (\i+\tmprandg*0.66*0.00,1.0) .. + (\i+\tmprandg*0.66*0.00,1.0) -- (\ipu,1) + .. controls (\ipu-\tmprandd*0.66*0.00,1.0) and (\ipu+\tmprandd*0.66*-0.04,0.6) .. + (\ipu+\tmprandd*0.66*0.04,0.6) .. controls (\ipu+\tmprandd*0.66*0.11,0.6) and (\ipu+\tmprandd*0.66*0.26,0.8) .. + (\ipu+\tmprandd*0.66*0.26,0.5) .. controls (\ipu+\tmprandd*0.66*0.26,0.2) and (\ipu+\tmprandd*0.66*0.11,0.4) .. + (\ipu+\tmprandd*0.66*0.04,0.4) .. controls (\ipu+\tmprandd*0.66*-0.04,0.4) and (\ipu+\tmprandd*0.66*0.00,0.0) .. + (\ipu+\tmprandd*0.66*0.00,0.0) -- (\ipu,0) -- (\i,0); + }% + %dernière pièce + \IfSubStr{\puzzthmbg}{,}% + {% + \itemtomacro\PuzzleListeCouleurs[-1]{\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) .. + (\puzzthmnb-1+\tmprand*0.66*0.26,0.5) .. controls (\puzzthmnb-1+\tmprand*0.66*0.26,0.8) and (\puzzthmnb-1+\tmprand*0.66*0.11,0.6) .. + (\puzzthmnb-1+\tmprand*0.66*0.04,0.6) .. controls (\puzzthmnb-1+\tmprand*0.66*-0.04,0.6) and (\puzzthmnb-1+\tmprand*0.66*0.00,1.0) .. + (\puzzthmnb-1+\tmprand*0.66*0.00,1.0) -- (\puzzthmnb-1,1) -- (\puzzthmnb-\tmprounded,1) to[out=0,in=90] (\puzzthmnb,1-\tmprounded) -- (\puzzthmnb,\tmprounded) to[out=-90,in=0] (\puzzthmnb-\tmprounded,0) -- (\puzzthmnb-1,0) ; + %icones + \foreach \i in {1,...,\PuzzleListeThemeslen}{% + \draw ({\i-0.5},0.5) node[scale=1.25,text=\puzzthmcolicon] {\PuzzleListeThemes[\i]} ; + }% + %labels dessous + \IfEq{\puzzthmlab}{}% + {}% + {% + \readlist*\PuzzleListeLabels{\puzzthmlab}% + \foreach \i in {1,...,\PuzzleListeLabelslen}{% + \draw ({\i-0.5},0) node[below,inner sep=1pt,scale=\puzzthmscalab,label] {\PuzzleListeLabels[\i]} ; + }% + }% + \end{tikzpicture}% +} + +%====ENGLISH VERSION +\defKV[themepuzzle]{% + Thickness=\def\puzzthmthick{#1},% + Scale=\def\puzzthmscale{#1},% + BgColors=\def\puzzthmbg{#1},% + BorderColor=\def\puzzthmbc{#1},% + Labels=\def\puzzthmlab{#1},% + ScaleLabels=\def\puzzthmscalab{#1},% + FontLabels=\def\puzzthmfontlab{#1},% + IconsColor=\def\puzzthmcolicon{#1} +} +\setKVdefault[themepuzzle]{% + Thickness=1pt,% + Scale=1,% + BgColors={},% + BorderColor=black, + Labels={},% + ScaleLabels=1.15,% + FontLabels=\tiny\sffamily,% + IconsColor=black +} + +\NewDocumentCommand\ThematicPuzzle{ O{} D<>{} m }{% + \def\tmprounded{0.05}% + \useKVdefault[themepuzzle]% + \setKV[themepuzzle]{#1}% + \readlist*\PuzzleListeThemes{#3}% + \xdef\puzzthmnb{\PuzzleListeThemeslen}% + \xdef\puzztmpalea{\fpeval{2*randint(1,2)-3}}% + \foreach \i in {2,...,\inteval{\PuzzleListeThemeslen-1}}{% + \xdef\puzztmpalea{\puzztmpalea,\fpeval{2*randint(1,2)-3}}% + }% + \readlist*\PuzzleListeAlea{\puzztmpalea}% + \IfSubStr{\puzzthmbg}{,}% + {% + \readlist*\PuzzleListeCouleurs{\puzzthmbg}% + }% + {% + \xdef\puzzthmbgcol{\puzzthmbg}% + }% + \begin{tikzpicture}[scale=\puzzthmscale,transform shape,#2]% + %styles + \tikzset{border/.style={\puzzthmbc,line width={0.5*\puzzthmscale*\puzzthmthick}}}% + \tikzset{label/.style={font=\puzzthmfontlab,text=\puzzthmcolicon}}% + \IfEq{\puzzthmbg}{}% + {\tikzset{background/.style={}}}% + {\tikzset{background/.style={fill=\puzzthmbgcol}}}% + %1ère pièce + \IfSubStr{\puzzthmbg}{,}% + {% + \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) .. + (1+\tmprand*0.66*0.26,0.5) .. controls (1+\tmprand*0.66*0.26,0.8) and (1+\tmprand*0.66*0.11,0.6) .. + (1+\tmprand*0.66*0.04,0.6) .. controls (1+\tmprand*0.66*-0.04,0.6) and (1+\tmprand*0.66*0.00,1.0) .. + (1+\tmprand*0.66*0.00,1.0) -- (1,1) -- (\tmprounded,1) to[out=180,in=90] (0,1-\tmprounded) -- (0,\tmprounded) to[out=-90,in=180] (\tmprounded,0) ; + %les pièces du milieu + \foreach \i in {1,...,\inteval{\PuzzleListeThemeslen-2}}{% + \xdef\ipu{\inteval{\i+1}}% + \itemtomacro\PuzzleListeAlea[\i]{\tmprandg}% + \itemtomacro\PuzzleListeAlea[\ipu]{\tmprandd}% + \IfSubStr{\puzzthmbg}{,}% + {% + \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) .. + (\i+\tmprandg*0.66*0.04,0.6) .. controls (\i+\tmprandg*0.66*-0.04,0.6) and (\i+\tmprandg*0.66*0.00,1.0) .. + (\i+\tmprandg*0.66*0.00,1.0) -- (\ipu,1) + .. controls (\ipu-\tmprandd*0.66*0.00,1.0) and (\ipu+\tmprandd*0.66*-0.04,0.6) .. + (\ipu+\tmprandd*0.66*0.04,0.6) .. controls (\ipu+\tmprandd*0.66*0.11,0.6) and (\ipu+\tmprandd*0.66*0.26,0.8) .. + (\ipu+\tmprandd*0.66*0.26,0.5) .. controls (\ipu+\tmprandd*0.66*0.26,0.2) and (\ipu+\tmprandd*0.66*0.11,0.4) .. + (\ipu+\tmprandd*0.66*0.04,0.4) .. controls (\ipu+\tmprandd*0.66*-0.04,0.4) and (\ipu+\tmprandd*0.66*0.00,0.0) .. + (\ipu+\tmprandd*0.66*0.00,0.0) -- (\ipu,0) -- (\i,0); + }% + %dernière pièce + \IfSubStr{\puzzthmbg}{,}% + {% + \itemtomacro\PuzzleListeCouleurs[-1]{\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) .. + (\puzzthmnb-1+\tmprand*0.66*0.26,0.5) .. controls (\puzzthmnb-1+\tmprand*0.66*0.26,0.8) and (\puzzthmnb-1+\tmprand*0.66*0.11,0.6) .. + (\puzzthmnb-1+\tmprand*0.66*0.04,0.6) .. controls (\puzzthmnb-1+\tmprand*0.66*-0.04,0.6) and (\puzzthmnb-1+\tmprand*0.66*0.00,1.0) .. + (\puzzthmnb-1+\tmprand*0.66*0.00,1.0) -- (\puzzthmnb-1,1) -- (\puzzthmnb-\tmprounded,1) to[out=0,in=90] (\puzzthmnb,1-\tmprounded) -- (\puzzthmnb,\tmprounded) to[out=-90,in=0] (\puzzthmnb-\tmprounded,0) -- (\puzzthmnb-1,0) ; + %icones + \foreach \i in {1,...,\PuzzleListeThemeslen}{% + \draw ({\i-0.5},0.5) node[scale=1.25,text=\puzzthmcolicon] {\PuzzleListeThemes[\i]} ; + }% + %labels dessous + \IfEq{\puzzthmlab}{}% + {}% + {% + \readlist*\PuzzleListeLabels{\puzzthmlab}% + \foreach \i in {1,...,\PuzzleListeLabelslen}{% + \draw ({\i-0.5},0) node[below,inner sep=1pt,scale=\puzzthmscalab,label] {\PuzzleListeLabels[\i]} ; + }% + }% + \end{tikzpicture}% +} + + +\endinput
\ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index d5a989419ab..a2ffdaefecf 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -824,7 +824,8 @@ my @TLP_working = qw( textcsc textualicomma texvc textcase textfit textglos textgreek textmerg textopo textpath textpos tfrupee thaienum thaispec thalie - theanodidot theanomodern theanooldstyle theatre theoremref thermodynamics + theanodidot theanomodern theanooldstyle theatre + thematicpuzzle theoremref thermodynamics thesis-ekf thesis-gwu thesis-qom thesis-titlepage-fhac thinsp thmbox thmtools threadcol threeddice threeparttable threeparttablex diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index d85f6ecb6b4..b4eaac595ca 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1862,6 +1862,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`); 'texdoc' => '&POSTtexdoc', 'texdraw' => '&POSTtexdraw', 'tex-ps' => '&POSTtex_ps', + 'thematicpuzzle' => '&POST_onelevel', 'thumbpdf' => '&POST_preserve_man', 'tikz2d-fr' => '&POST_onelevel', 'tikz3d-fr' => '&POST_onelevel', diff --git a/Master/tlpkg/tlpsrc/collection-games.tlpsrc b/Master/tlpkg/tlpsrc/collection-games.tlpsrc index 38d9451d6f8..92bef3b4b30 100644 --- a/Master/tlpkg/tlpsrc/collection-games.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-games.tlpsrc @@ -51,6 +51,7 @@ depend soup depend sudoku depend sudokubundle depend tangramtikz +depend thematicpuzzle depend trivialpursuit depend wargame depend wordle diff --git a/Master/tlpkg/tlpsrc/thematicpuzzle.tlpsrc b/Master/tlpkg/tlpsrc/thematicpuzzle.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/thematicpuzzle.tlpsrc |