texlive[74713] Master/texmf-dist: scrabble (20mar25)
commits+karl at tug.org
commits+karl at tug.org
Thu Mar 20 20:59:51 CET 2025
Revision: 74713
https://tug.org/svn/texlive?view=revision&revision=74713
Author: karl
Date: 2025-03-20 20:59:51 +0100 (Thu, 20 Mar 2025)
Log Message:
-----------
scrabble (20mar25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.pdf
trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex
trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.pdf
trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex
trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty
Modified: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex 2025-03-20 19:59:41 UTC (rev 74712)
+++ trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex 2025-03-20 19:59:51 UTC (rev 74713)
@@ -46,10 +46,11 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.6}
-\def\TPdate{26/01/2024}
+\def\TPversion{0.1.7}
+\def\TPdate{19/03/2025}
\usepackage[most]{tcolorbox}
+\usepackage{minted2}
\tcbuselibrary{minted}
\NewTCBListing{PresentationCode}{ O{blue} m }{%
sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,%
@@ -103,7 +104,7 @@
\begin{tabular}{c}
\texttt{Cédric Pierquet}\\
{\ttfamily c pierquet -- at -- outlook . fr}\\
- \texttt{\url{https://github.com/cpierquet/Scrabble}}
+ \texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}}
\end{tabular}
\end{center}
@@ -172,30 +173,30 @@
\subsection{Loading of the package, used packages}
-The package \textsf{Scrabble} loads within the preamble :
+The package \textsf{Scrabble} loads within the preamble:
\begin{PresentationCode}{listing only}
\usepackage{Scrabble}
\end{PresentationCode}
-It's mostly compatible with \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex} compilation !
+It's mostly compatible with \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex} compilation!
\medskip
-It loads the following packages and libraries :
+It loads the following packages and libraries:
\begin{itemize}
- \item \texttt{tikz} with \Cle{calc} with the tikzlibraries \Cle{calc} and \Cle{shapes.geometric} ;
- \item \texttt{pgf} and \texttt{pgffor} ;
+ \item \texttt{tikz} with \Cle{calc} with the tikzlibraries \Cle{calc} and \Cle{shapes.geometric};
+ \item \texttt{pgf} and \texttt{pgffor};
\item \texttt{xstring}, \texttt{xparse}, \texttt{simplekv} and \texttt{listofitems}.
\end{itemize}
\subsection{The package itself}
-The idea is to, thanks to \TikZ, propose commands or environments to display a Scrabble\texttrademark{} board :
+The idea is to, thanks to \TikZ, propose commands or environments to display a Scrabble\texttrademark{} board:
\begin{itemize}
- \item \textit{independent} ;
+ \item \textit{independent};
\item in an \textit{environment} with words.
\end{itemize}
@@ -211,12 +212,12 @@
\subsection{Languages}
-The \textsf{commands}, \textsf{environments} et \textsf{keys} are in english, but cells can be displayed in :
+The \textsf{commands}, \textsf{environments} et \textsf{keys} are in english, but cells can be displayed in:
\begin{itemize}
- \item english (code ISO 639-1 EN) ;
- \item french (code ISO 639-1 FR) ;
- \item german (code ISO 639-1 DE) ;
+ \item english (code ISO 639-1 EN);
+ \item french (code ISO 639-1 FR);
+ \item german (code ISO 639-1 DE);
\item spanish (code ISO 639-1 ES).
\end{itemize}
@@ -226,20 +227,20 @@
\subsection{The board, standalone}
-The first argument, \textit{optional}, between \texttt{<...>} is the \Cle{langage} of the display, form the list :
+The first argument, \textit{optional}, between \texttt{<...>} is the \Cle{langage} of the display, form the list:
\hfill\Cle{EN} (english, default), \Cle{FR} (french), \Cle{DE} (german) et \Cle{ES} (spanish).\hfill~
\smallskip
-The second argument, \textit{optional}, between \texttt{[...]} give the \Cle{keys} :
+The second argument, \textit{optional}, between \texttt{[...]} give the \Cle{keys}:
\begin{itemize}
- \item \Cle{Scale} for the display (the initial unit is 1~cm) ; \hfill~default : \Cle{1}
- \item \Cle{ScaleLabels} for the cell's names ; \hfill~défaut : \Cle{1}
- \item the boolean \Cle{Border} pour print a border outside the board ; \hfill~default : \Cle{true}
- \item the boolean \Cle{Labels} to print \textit{names} of the special cells ;\hfill~default : \Cle{true}
- \item the boolean \Cle{Help} pour print numbers to reperate th cells ;\hfill~default : \Cle{false}
+ \item \Cle{Scale} for the display (the initial unit is 1~cm); \hfill~default: \Cle{1}
+ \item \Cle{ScaleLabels} for the cell's names; \hfill~défaut: \Cle{1}
+ \item the boolean \Cle{Border} pour print a border outside the board; \hfill~default: \Cle{true}
+ \item the boolean \Cle{Labels} to print \textit{names} of the special cells;\hfill~default: \Cle{true}
+ \item the boolean \Cle{Help} pour print numbers to reperate th cells;\hfill~default: \Cle{false}
\end{itemize}
\begin{PresentationCode}{}
@@ -255,23 +256,23 @@
\smallskip
-For the \textit{environment}, the options are the same as for the independent \textsf{command} !
+For the \textit{environment}, the options are the same as for the independent \textsf{command}!
\smallskip
-For putting word on the board :
+For putting word on the board:
\begin{itemize}
- \item the first argument, \textit{optional}, between \texttt{[...]} is the orientation of the word, \Cle{H} (by default) or \Cle{V} ;
- \item the second argument, \textit{mandatory}, between \texttt{\{...\}}, is the word, with uppercase or lowercase letters ;
+ \item the first argument, \textit{optional}, between \texttt{[...]} is the orientation of the word, \Cle{H} (by default) or \Cle{V};
+ \item the second argument, \textit{mandatory}, between \texttt{\{...\}}, is the word, with uppercase or lowercase letters;
\item the last argument, \textit{mandatory}, between \texttt{\{...\}}, is the coordinates of the first cell for fisrt lettre (the cell \texttt{(1,1)} is south-west corner).
\end{itemize}
-\textbf{Observation 1 :} the chosen language will display the right points in the til !
+\textbf{Observation 1:} the chosen language will display the right points in the til!
\smallskip
-\textbf{Observation 2 :} the \textit{white} (or \textit{joker}) is coded by the character \texttt{*}.
+\textbf{Observation 2:} the \textit{white} (or \textit{joker}) is coded by the character \texttt{*}.
\begin{PresentationCode}{}
\begin{EnvScrabble}[Scale=0.75,Labels=false,Help]
@@ -321,35 +322,36 @@
The first argument, \textit{optional}, between \texttt{[...]} allows you to configure the \Cle{keys}:
\begin{itemize}
- \item \Cle{Colback} for the color of the pieces ; \hfill~default: \Cle{yellow!40}
- \item \Cle{Font} for the font ; \hfill~default: \Cle{\textbackslash bfseries\textbackslash sffamily}
- \item \Cle{Colfonte} for the color of the characters ; \hfill~default: \Cle{black}
- \item \Cle{Lang} to choose the language (for the number of points) ; \hfill~default: \Cle{EN}
- \item \Cle{Offset} to specify horizontal spacing between pieces ; \hfill~default: \Cle{0.1pt}
- \item \Cle{Scale} to specify a base scale for texts ; \hfill~default: \Cle{0.6}
+ \item \Cle{Colback} for the color of the pieces \hfill~default: \Cle{yellow!40}
+ \item \Cle{Font} for the font; \hfill~default: \Cle{\textbackslash bfseries\textbackslash sffamily}
+ \item \Cle{Colfonte} for the color of the characters; \hfill~default: \Cle{black}
+ \item \Cle{Lang} to choose the language (for the number of points); \hfill~default: \Cle{EN}
+ \item \Cle{Offset} to specify horizontal spacing between pieces; \hfill~default: \Cle{0.1pt}
+ \item \Cle{Scale} to specify a base scale for texts; \hfill~default: \Cle{0.6}
+ \item \Cle{Shuffle} (boolean) to mix letters; \hfill~default: \Cle{false}
\item \Cle{Score} which is a boolean to display the score of each piece. \hfill~default: \Cle{true}
\end{itemize}
-\textbf{Note 1 :} the code is responsible for positioning the pieces for \textit{satisfactory} alignment and scaling based on the active font.
+\textbf{Note 1:} the code is responsible for positioning the pieces for \textit{satisfactory} alignment and scaling based on the active font.
\smallskip
-\textbf{Note 2 :} the \textit{blank} (or \textit{wildcard}) is obtained by the character \texttt{*}.
+\textbf{Note 2:} the \textit{blank} (or \textit{wildcard}) is obtained by the character \texttt{*}.
\begin{PresentationCode}{}
-Online Scrabble word test positioning \ScrabbleWord{TE*ST} to see !
+Online Scrabble word test positioning \ScrabbleWord{TE*ST} to see!
\end{PresentationCode}
\begin{PresentationCode}{}
-{\Huge\sffamily Test positioning \ScrabbleWord[Colback=teal!5,Colfonte=orange]{PYTHAG*RE} to see !}
+{\Huge\sffamily Test positioning \ScrabbleWord[Colback=teal!5,Colfonte=orange]{PYTHAG*RE} to see!}
\end{PresentationCode}
\begin{PresentationCode}{}
-\scalebox{3}[3]{Positioning \ScrabbleWord[Lang=DE,Font=\ttfamily,Scale=0.75]{PYTHAG*RE} to see !}
+\scalebox{3}[3]{Positioning \ScrabbleWord[Lang=DE,Font=\ttfamily,Scale=0.75,Shuffle]{PYTHAG*RE} to see!}
\end{PresentationCode}
\begin{PresentationCode}{}
-{\LARGE Test positioning \ScrabbleWord[Score=false,Offset=1pt,Colback=orange!50]{PSTRICKS} to see !}
+{\LARGE Test positioning \ScrabbleWord[Score=false,Offset=1pt,Colback=orange!50]{PSTRICKS} to see!}
\end{PresentationCode}
\newpage
@@ -356,15 +358,15 @@
\subsection{Special letters}
-It is possible to use special characters, for the languages \textsf{<DE>} and \textsf{<ES>}, but for compatibility reasons, special characters are \textit{coded} by numbers :
+It is possible to use special characters, for the languages \textsf{<DE>} and \textsf{<ES>}, but for compatibility reasons, special characters are \textit{coded} by numbers:
\begin{itemize}
- \item \texttt{0} code the letter \fbox{\"O} with 8 points ;
- \item \texttt{1} code the letter \fbox{\"A} with 6 points ;
- \item \texttt{4} code the letter \fbox{\"U} with 6 points ;
- \item \texttt{6} code the \textit{letter} \fbox{CH} with 5 points ;
- \item \texttt{7} code the letter \fbox{\~{N}} with 8 points ;
- \item \texttt{8} code the \textit{letter} \fbox{RR} with 8 points ;
+ \item \texttt{0} code the letter \fbox{\"O} with 8 points;
+ \item \texttt{1} code the letter \fbox{\"A} with 6 points;
+ \item \texttt{4} code the letter \fbox{\"U} with 6 points;
+ \item \texttt{6} code the \textit{letter} \fbox{CH} with 5 points;
+ \item \texttt{7} code the letter \fbox{\~{N}} with 8 points;
+ \item \texttt{8} code the \textit{letter} \fbox{RR} with 8 points;
\item \texttt{9} code the \textit{letter} \fbox{LL} with 8 points.
\end{itemize}
@@ -378,6 +380,8 @@
\part*{History}
+\verb|v0.1.7|~:~~~~Key \textsf{[Shuffle]} for inline words
+
\verb|v0.1.6|~:~~~~Bugfix with \textit{joker} ; enhancements for \textsf{<DE>} board
\verb|v0.1.5|~:~~~~Special letters for \textsf{<DE>} and \textsf{<ES>}
Modified: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex 2025-03-20 19:59:41 UTC (rev 74712)
+++ trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex 2025-03-20 19:59:51 UTC (rev 74713)
@@ -48,10 +48,11 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.6}
-\def\TPdate{26 janvier 2024}
+\def\TPversion{0.1.7}
+\def\TPdate{19 mars 2025}
\usepackage[most]{tcolorbox}
+\usepackage{minted2}
\tcbuselibrary{minted}
\NewTCBListing{PresentationCode}{ O{blue} m }{%
sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,%
@@ -105,7 +106,7 @@
\begin{tabular}{c}
\texttt{Cédric Pierquet}\\
{\ttfamily c pierquet -- at -- outlook . fr}\\
- \texttt{\url{https://github.com/cpierquet/Scrabble}}
+ \texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}}
\end{tabular}
\end{center}
@@ -119,7 +120,7 @@
\smallskip
-{$\blacktriangleright$~~Possibilité d'insérer un mot en mode \textit{en ligne}.}
+{$\blacktriangleright$~~Possibilité d'insérer un mot en mode \textit{en ligne}, en mode mélange ou non.}
\smallskip
@@ -338,6 +339,7 @@
\item \Cle{Langue} pour choisir la langue (pour les nombres de points) ; \hfill~défaut : \Cle{FR}
\item \Cle{Offset} pour spécifier un espacement horizontal entre les jetons ; \hfill~défaut : \Cle{0.1pt}
\item \Cle{Echelle} pour spécifier une échelle de base pour les textes ; \hfill~défaut : \Cle{0.6}
+ \item \Cle{Melange} (booléen) pour mélanger les lettres ; \hfill~défaut : \Cle{false}
\item \Cle{Score} qui est un booléen pour afficher le score de chaque jeton.\hfill~défaut : \Cle{true}
\end{itemize}
@@ -356,7 +358,7 @@
\end{PresentationCode}
\begin{PresentationCode}{}
-\scalebox{3}[3]{En ligne \MotScrabble[Langue=EN,Police=\ttfamily,Echelle=0.75]{PYTHAG*RE} pour voir !}
+\scalebox{3}[3]{En ligne \MotScrabble[Langue=EN,Police=\ttfamily,Echelle=0.75,Melange]{PYTHAG*RE} pour voir !}
\end{PresentationCode}
\begin{PresentationCode}{}
@@ -410,6 +412,8 @@
\part*{Historique}
+\verb|v0.1.7|~:~~~~Ajout d'une clé \textsf{[Melange]} pour la version en ligne.
+
\verb|v0.1.6|~:~~~~Correction d'un bug avec les jokers ; améliorations du plateau \textsf{<DE>}
\verb|v0.1.5|~:~~~~Ajout de lettres spéciales pour \textsf{<DE>} et \textsf{<ES>}
Modified: trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty 2025-03-20 19:59:41 UTC (rev 74712)
+++ trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty 2025-03-20 19:59:51 UTC (rev 74713)
@@ -1,10 +1,11 @@
% Author : C. Pierquet
-% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
% Copyright : Scrabble, TradeMark by Hasbro or Mattel
% Inspiration : Mark Wibrow in https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{Scrabble}[2024/01/26 0.1.6 Scrabble]
+\ProvidesPackage{Scrabble}[2025/03/19 0.1.7 Scrabble]
+% 0.1.7 Clé pour mélanger les mots en ligne
% 0.1.6 Correction d'un bug avec le jeton joker + améliorations dans la doc et dans la version [DE]
% 0.1.5 Ajout de lettres spéciales en Allemand et en Espagnol
% 0.1.4 Ajout d'un mode inline
@@ -16,10 +17,11 @@
%------Packages utiles
\RequirePackage{tikz}
\RequirePackage{pgf,pgffor}
-\RequirePackage{xstring}
-\RequirePackage{xparse}
-\RequirePackage{simplekv}
-\RequirePackage{listofitems}
+%\RequirePackage{xstring}
+%\RequirePackage{xparse}
+\RequirePackage{randintlist}
+%\RequirePackage{simplekv}
+%\RequirePackage{listofitems}
\RequirePackage{calc}
%librairies tikz
\usetikzlibrary{calc,shapes.geometric}
@@ -387,7 +389,8 @@
Langue=FR,%
Offset=0.1pt,%
Score=true,%
- Echelle=0.6
+ Echelle=0.6,%
+ Melange=false
}
\NewDocumentCommand\MotScrabble{ O{} m }{%
@@ -396,10 +399,24 @@
\settototalheight{\tmp at scrabword@total at height}{\hbox{ABCDEFGHIJKLMNOPQQRSTUVWXYZabcdefghijklmnopqqrstuvwxyz}}%
\settodepth{\tmp at scrabword@depth}{\hbox{q}}%
\StrLen{#2}[\lgmot]%
+ \ifboolKV[SCRABBLEWORDINLINEFR]{Melange}%
+ {%
+ \randintlist[min=1,max=\lgmot,nb=\lgmot]{\mylistmelangemot}%\mylistC
+ \def\tmpmotscrabble{}%
+ \foreach \i in {1,...,\lgmot}%
+ {%
+ \getitemfromrandintlist{\mylistmelangemot}{\i}[\myindice]%
+ \StrChar{#2}{\myindice}[\mytmpletter]%
+ \xdef\tmpmotscrabble{\tmpmotscrabble\mytmpletter}%
+ }%
+ }%
+ {%
+ \xdef\tmpmotscrabble{#2}%
+ }%
\raisebox{-\tmp at scrabword@depth+0.025\tmp at scrabword@total at height}{%
\foreach \l in {1,2,...,\lgmot}%
{%
- \StrChar{#2}{\l}[\ll]%
+ \StrChar{\tmpmotscrabble}{\l}[\ll]%
\IfStrEq{\ll}{*}%
{%
{\tikz \filldraw[\ScrWordInlColFond,rounded corners={0.15\tmp at scrabword@total at height}] (0,0) rectangle++ ({0.9\tmp at scrabword@total at height},{0.9\tmp at scrabword@total at height}) ;}%
@@ -516,7 +533,8 @@
Lang=EN,%
Offset=0.1pt,%
Score=true,%
- Scale=0.6
+ Scale=0.6,%
+ Shuffle=false
}
\NewDocumentCommand\ScrabbleWord{ O{} m }{%
@@ -525,10 +543,24 @@
\settototalheight{\tmp at scrabword@total at height}{\hbox{ABCDEFGHIJKLMNOPQQRSTUVWXYZabcdefghijklmnopqqrstuvwxyz}}%
\settodepth{\tmp at scrabword@depth}{\hbox{q}}%
\StrLen{#2}[\lgmot]%
+ \ifboolKV[SCRABBLEWORDINLINEEN]{Shuffle}%
+ {%
+ \randintlist[min=1,max=\lgmot,nb=\lgmot]{\mylistmelangemot}%\mylistC
+ \def\tmpmotscrabble{}%
+ \foreach \i in {1,...,\lgmot}%
+ {%
+ \getitemfromrandintlist{\mylistmelangemot}{\i}[\myindice]%
+ \StrChar{#2}{\myindice}[\mytmpletter]%
+ \xdef\tmpmotscrabble{\tmpmotscrabble\mytmpletter}%
+ }%
+ }%
+ {%
+ \xdef\tmpmotscrabble{#2}%
+ }%
\raisebox{-\tmp at scrabword@depth+0.025\tmp at scrabword@total at height}{%
\foreach \l in {1,2,...,\lgmot}%
{%
- \StrChar{#2}{\l}[\ll]%
+ \StrChar{\tmpmotscrabble}{\l}[\ll]%
\IfStrEq{\ll}{*}%
{%
{\tikz \filldraw[\ScrWordInlColFond,rounded corners={0.15\tmp at scrabword@total at height}] (0,0) rectangle++ ({0.9\tmp at scrabword@total at height},{0.9\tmp at scrabword@total at height}) ;}%
More information about the tex-live-commits
mailing list.