texlive[65474] Master: scrabble (6jan23)
commits+karl at tug.org
commits+karl at tug.org
Fri Jan 6 22:51:51 CET 2023
Revision: 65474
http://tug.org/svn/texlive?view=revision&revision=65474
Author: karl
Date: 2023-01-06 22:51:50 +0100 (Fri, 06 Jan 2023)
Log Message:
-----------
scrabble (6jan23)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-games.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/scrabble/
trunk/Master/texmf-dist/doc/latex/scrabble/README.md
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/
trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty
trunk/Master/tlpkg/tlpsrc/scrabble.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/scrabble/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scrabble/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/scrabble/README.md 2023-01-06 21:51:50 UTC (rev 65474)
@@ -0,0 +1,9 @@
+Scrabble is a package to work with the Scrabble Board Game, simple or with words.
+-------------------------------------------------------------------------------------
+Scrabble est un package pour représenter un plateau de Scrabble, avec mots éventuels.
+-------------------------------------------------------------------------------------
+Author : Cédric Pierquet
+email : cpierquet at outlook.fr
+Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+Inspiration : Mark Wibrow in https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders
+Scrabble is a Trademark from Hasbro and Mattel
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/scrabble/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.pdf 2023-01-06 00:49:18 UTC (rev 65473)
+++ trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.pdf 2023-01-06 21:51:50 UTC (rev 65474)
Property changes on: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex 2023-01-06 21:51:50 UTC (rev 65474)
@@ -0,0 +1,315 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass{article}
+\usepackage[english]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{Scrabble}
+\usepackage[upright]{fourier}
+\usepackage[scaled=0.875]{helvet}
+\renewcommand\ttdefault{lmtt}
+\usepackage[scaled=0.875]{cabin}
+\usepackage{amsmath,amssymb}
+\usepackage{fontawesome5}
+\usepackage{enumitem}
+\usepackage{tabularray}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [Scrabble]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+
+\usepackage{hvlogos}
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=1.5cm]{geometry}
+\setlength{\parindent}{0pt}
+\definecolor{LightGray}{gray}{0.9}
+
+\def\TPversion{0.1.1}
+\def\TPdate{06/01/2023}
+
+\usepackage[most]{tcolorbox}
+\tcbuselibrary{minted}
+\NewTCBListing{PresentationCode}{ O{blue} m }{%
+ sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,%
+ colback=#1!1!white,colframe=#1!75!black,colbacklower=white,%
+ attach boxed title to top right={yshift=-\tcboxedtitleheight},title=Code \LaTeX,%
+ boxed title style={%
+ colframe=#1!75!black,colback=#1!15!white,%
+ ,sharp corners=downhill,arc=12pt,%
+ },%
+ fonttitle=\color{#1!90!black}\itshape\ttfamily\footnotesize,%
+ listing engine=minted,minted style=colorful,
+ minted language=tex,minted options={tabsize=4,fontsize=\footnotesize,autogobble},
+ #2
+}
+
+\newcommand\Cle[1]{{\bfseries\sffamily\textlangle #1\textrangle}}
+
+\begin{document}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\vspace{2cm}
+
+\begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{Scrabble [en]}}\\
+ \\
+ {\LARGE A bord of Scrabble,} \\
+ \\
+ {\LARGE with words or not.} \\
+ \\
+ {Scrabble\texttrademark{}, from Hasbro\texttrademark{} and Mattel\texttrademark{}.}
+ \end{tabular}
+
+ \medskip
+
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{center}
+ \end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\vspace{0.5cm}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/Scrabble}}
+\end{tabular}
+\end{center}
+
+\vspace{0.5cm}
+
+{$\blacktriangleright$~~Some commands to display a Scrabble board, with or without words.}
+
+\smallskip
+
+{$\blacktriangleright$~~English, French, German or Spanish version for points and labels.}
+
+\smallskip
+
+{$\blacktriangleright$~~Idas from \url{https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders}}
+
+\vspace{0.5cm}
+
+\begin{center}
+ \ScrabbleBoard[Scale=0.5]
+ ~~~~
+ \begin{EnvScrabble}[Scale=0.5]
+ \ScrabblePutWord{T,I,K,Z}{1,13}
+ \ScrabblePutWord[V]{P,S,T,R,I,C,K,S}{1,15}
+ \ScrabblePutWord[V]{K,A,T,E,X}{3,13}
+ \ScrabblePutWord{C,L,E,V,E,R,E,F}{1,10}
+ \ScrabblePutWord[V]{M,E,T,A,P,O,S,T}{7,11}
+ \ScrabblePutWord{L,U,A,L,A,T,E,X}{5,8}
+ \ScrabblePutWord[V]{P,R,O,F,L,Y,*,E,E}{11,15}
+ \ScrabblePutWord{P,R,O,F,C,O,L,L,E,*,E}{1,1}
+ \ScrabblePutWord{S,Y,N,T,A,X,E}{7,5}
+ \ScrabblePutWord[V]{S,T,R,I,N,*}{10,6}
+ \end{EnvScrabble}
+\end{center}
+
+\vspace{0.5cm}
+
+\hfill{}\textit{Thanks to french members of group \faFacebook{} " Coin \LaTeX{} " for help an aideas !}
+
+\vfill
+
+\hrule
+
+\medskip
+
+\begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\sffamily}}
+{\huge \LaTeX} & & & & &\\
+& {\huge \pdfLaTeX} & & & & \\
+& & {\huge \LuaLaTeX} & & & \\
+& & & {\huge \TikZ} & & \\
+& & & & {\huge \TeXLive} & \\
+& & & & & {\huge \MiKTeX} \\
+\end{tblr}
+
+\medskip
+
+\hrule
+
+\medskip
+
+\newpage
+
+\part*{History}
+
+\verb|v0.1.1|~:~~~~Option \textsf{[fr]} pour french commands
+
+\verb|v0.1 |~:~~~~Initial version
+
+\part*{Introduction}
+
+\section{The Scrabble package}
+
+\subsection{Source}
+
+Some ideas are from \url{https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders}, with propostion from Mark Wibrow.
+
+\smallskip
+
+This package is \textit{build} within styles and ideas from Mark Wibrow.
+
+\subsection{Loading of the package, used packages}
+
+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 !
+
+\medskip
+
+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{xstring} ;
+ \item \texttt{xparse} ;
+ \item \texttt{simplekv}.
+\end{itemize}
+
+\subsection{The package itself}
+
+The idea is to, thanks to \TikZ, propose commands or environments to display a Scrabble\texttrademark{} board :
+
+\begin{itemize}
+ \item \textit{independant} ;
+ \item in an \textit{environement} with words.
+\end{itemize}
+
+\begin{PresentationCode}{listing only}
+%independant command for the empty board
+\ScrabbleBoard<language>[keys]
+
+%environmentt with word(s)
+\begin{EnvScrabble}<language>[keys]
+ \ScrabblePutWord[orientation]{l,e,t,t,e,r,s}{coordinates of the beginning cell}
+\end{EnvScrabble}
+\end{PresentationCode}
+
+\subsection{Languages}
+
+The \textsf{commands}, \textsf{environments} et \textsf{keys} are in english, but cells can be displayed in :
+
+\begin{itemize}
+ \item english ;
+ \item french ;
+ \item german ;
+ \item spanish.
+\end{itemize}
+
+\pagebreak
+
+\section{Commands, keys and options}
+
+\subsection{The board, standalone}
+
+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{GE} (german) et \Cle{SP} (spanish).\hfill~
+
+\smallskip
+
+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 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~defalut : \Cle{true}
+ \item the boolean \Cle{Help} pour print numbers to reperate th cells ;\hfill~default : \Cle{false}
+\end{itemize}
+
+\begin{PresentationCode}{}
+%board without cell's names
+\ScrabbleBoard[Labels=false,Scale=0.55]\\
+%board in spanisch
+\ScrabbleBoard<SP>[Scale=0.55,Cadre=false]
+\end{PresentationCode}
+
+\newpage
+
+\subsection{The board with words}
+
+Here we can use the \textsf{environement} with the specific \textsf{command} in order to print words on the board.
+
+\smallskip
+
+For the \textit{environment}, the options are the same as for the independant \textsf{command} !
+
+\smallskip
+
+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 list of the letters, separate by " \texttt{,} " ;
+ \item the last argument, \textit{mandatory}, between \texttt{\{...\}}, is the coordinates of the first cell for fisrt lettre (the cell (1;\,1) is south-west corner).
+\end{itemize}
+
+\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{*}.
+
+\begin{PresentationCode}{}
+\begin{EnvScrabble}[Scale=0.75,Labels=false,Help]
+ \ScrabblePutWord{T,I,K,Z}{1,13}
+ \ScrabblePutWord[V]{P,S,T,R,I,C,K,S}{1,15}
+ \ScrabblePutWord[V]{K,A,T,E,X}{3,13}
+ \ScrabblePutWord{C,L,E,V,E,R,E,F}{1,10}
+ \ScrabblePutWord[V]{M,E,T,A,P,O,S,T}{7,11}
+ \ScrabblePutWord{L,U,A,L,A,T,E,X}{5,8}
+ \ScrabblePutWord[V]{P,R,O,F,L,Y,*,E,E}{11,15}
+ \ScrabblePutWord{P,R,O,F,C,O,L,L,E,*,E}{1,1}
+ \ScrabblePutWord{S,Y,N,T,A,X,E}{7,5}
+ \ScrabblePutWord[V]{S,T,R,I,N,*}{10,6}
+\end{EnvScrabble}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+\begin{EnvScrabble}<EN>[Scale=0.55]
+ \ScrabblePutWord{T,I,K,Z}{1,13}
+ \ScrabblePutWord[V]{P,S,T,R,I,C,K,S}{1,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {English version} ;
+\end{EnvScrabble}~~~
+\begin{EnvScrabble}<FR>[Scale=0.55]
+ \ScrabblePutWord{T,I,K,Z}{1,13}
+ \ScrabblePutWord[V]{P,S,T,R,I,C,K,S}{1,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {French version} ;
+\end{EnvScrabble}\\
+\begin{EnvScrabble}<GE>[Scale=0.55]
+ \ScrabblePutWord{T,I,K,Z}{1,13}
+ \ScrabblePutWord[V]{P,S,T,R,I,C,K,S}{1,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {German version} ;
+\end{EnvScrabble}~~~
+\begin{EnvScrabble}<SP>[Scale=0.55]
+ \ScrabblePutWord{L,A,T,E,X}{1,14}
+ \ScrabblePutWord[V]{M,A,D,R,I,D}{2,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {Spanish vesion} ;
+\end{EnvScrabble}
+\end{PresentationCode}
+
+\end{document}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-en.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.pdf 2023-01-06 00:49:18 UTC (rev 65473)
+++ trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.pdf 2023-01-06 21:51:50 UTC (rev 65474)
Property changes on: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex 2023-01-06 21:51:50 UTC (rev 65474)
@@ -0,0 +1,315 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass{article}
+\usepackage[french]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage[fr]{Scrabble}
+\usepackage[upright]{fourier}
+\usepackage[scaled=0.875]{helvet}
+\renewcommand\ttdefault{lmtt}
+\usepackage[scaled=0.875]{cabin}
+\usepackage{amsmath,amssymb}
+\usepackage{fontawesome5}
+\usepackage{enumitem}
+\usepackage{tabularray}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [Scrabble]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+
+\usepackage{hvlogos}
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage[margin=1.5cm]{geometry}
+\setlength{\parindent}{0pt}
+\definecolor{LightGray}{gray}{0.9}
+
+\def\TPversion{0.1.1}
+\def\TPdate{6 Janvier 2023}
+
+\usepackage[most]{tcolorbox}
+\tcbuselibrary{minted}
+\NewTCBListing{PresentationCode}{ O{blue} m }{%
+ sharp corners=downhill,enhanced,arc=12pt,skin=bicolor,%
+ colback=#1!1!white,colframe=#1!75!black,colbacklower=white,%
+ attach boxed title to top right={yshift=-\tcboxedtitleheight},title=Code \LaTeX,%
+ boxed title style={%
+ colframe=#1!75!black,colback=#1!15!white,%
+ ,sharp corners=downhill,arc=12pt,%
+ },%
+ fonttitle=\color{#1!90!black}\itshape\ttfamily\footnotesize,%
+ listing engine=minted,minted style=colorful,
+ minted language=tex,minted options={tabsize=4,fontsize=\footnotesize,autogobble},
+ #2
+}
+
+\newcommand\Cle[1]{{\bfseries\sffamily\textlangle #1\textrangle}}
+
+\begin{document}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\vspace{2cm}
+
+\begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{Scrabble [fr]}}\\
+ \\
+ {\LARGE Un plateau de Scrabble,} \\
+ \\
+ {\LARGE avec mots ou non.} \\
+ \\
+ {Scrabble\texttrademark{} est une marque déposée de Hasbro\texttrademark{} et Mattel\texttrademark{}.}
+ \end{tabular}
+
+ \medskip
+
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{center}
+ \end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\vspace{0.5cm}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/Scrabble}}
+\end{tabular}
+\end{center}
+
+\vspace{0.5cm}
+
+{$\blacktriangleright$~~Quelques commandes pour afficher un plateau de Scrabble, avec ou sans mots.}
+
+\smallskip
+
+{$\blacktriangleright$~~Possibilité de mettre le plateau et les points pour les versions Française, Anglaise, Allemande et Espagnole.}
+
+\smallskip
+
+{$\blacktriangleright$~~Idée(s) venant de \url{https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders}}
+
+\vspace{0.5cm}
+
+\begin{center}
+ \PlateauScrabble[Echelle=0.5]
+ ~~~~
+ \begin{EnvScrabble}[Echelle=0.5]
+ \ScrabblePlaceMot{T,I,K,Z}{1,13}
+ \ScrabblePlaceMot[V]{P,S,T,R,I,C,K,S}{1,15}
+ \ScrabblePlaceMot[V]{K,A,T,E,X}{3,13}
+ \ScrabblePlaceMot{C,L,E,V,E,R,E,F}{1,10}
+ \ScrabblePlaceMot[V]{M,E,T,A,P,O,S,T}{7,11}
+ \ScrabblePlaceMot{L,U,A,L,A,T,E,X}{5,8}
+ \ScrabblePlaceMot[V]{P,R,O,F,L,Y,*,E,E}{11,15}
+ \ScrabblePlaceMot{P,R,O,F,C,O,L,L,E,*,E}{1,1}
+ \ScrabblePlaceMot{S,Y,N,T,A,X,E}{7,5}
+ \ScrabblePlaceMot[V]{S,T,R,I,N,*}{10,6}
+ \end{EnvScrabble}
+\end{center}
+
+\vspace{0.5cm}
+
+\hfill{}\textit{Merci aux membres du groupe \faFacebook{} du \og Coin \LaTeX{} \fg{} pour leur aide et leurs idées !}
+
+\vfill
+
+\hrule
+
+\medskip
+
+\begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\sffamily}}
+{\huge \LaTeX} & & & & &\\
+& {\huge \pdfLaTeX} & & & & \\
+& & {\huge \LuaLaTeX} & & & \\
+& & & {\huge \TikZ} & & \\
+& & & & {\huge \TeXLive} & \\
+& & & & & {\huge \MiKTeX} \\
+\end{tblr}
+
+\medskip
+
+\hrule
+
+\medskip
+
+\newpage
+
+\part*{Historique}
+
+\verb|v0.1.1|~:~~~~Option \textsf{[fr]} pour franciser les commandes
+
+\verb|v0.1 |~:~~~~Version initiale
+
+\part*{Introduction}
+
+\section{Le package Scrabble}
+
+\subsection{Source}
+
+Certaines idées viennent de \url{https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders}, avec une proposition de Mark Wibrow.
+
+\smallskip
+
+Le package a ensuite été \textit{construit} et \textit{modestement enrichi} autour de styles et méthodes proposées par Mark Wibrow.
+
+\subsection{Chargement du package, packages utilisés}
+
+Le package \textsf{Scrabble} se charge dans le préambule via la commande :
+
+\begin{PresentationCode}{listing only}
+\usepackage[fr]{Scrabble}
+\end{PresentationCode}
+
+Il est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}.
+
+\medskip
+
+Il charge les packages et librairies suivantes :
+
+\begin{itemize}
+ \item \texttt{tikz} avec les librairies \Cle{calc} et \Cle{shapes.geometric} ;
+ \item \texttt{pgf} et \texttt{pgffor} ;
+ \item \texttt{xstring} ;
+ \item \texttt{xparse} ;
+ \item \texttt{simplekv}.
+\end{itemize}
+
+\subsection{\og Philosophie \fg{} du package}
+
+L'idée est de proposer, grâce à des commandes en \TikZ, des commandes ou environnements pour présenter un plateau de Scrabble\texttrademark{} :
+
+\begin{itemize}
+ \item \textit{autonome} ;
+ \item dans un \textit{environnement} avec rajout éventuel de mots.
+\end{itemize}
+
+\begin{PresentationCode}{listing only}
+%commande autonome pour afficher le plateau (vide)
+\PlateauScrabble<langue>[clés]
+
+%environnement avec mot(s)
+\begin{EnvScrabble}<langue>[clés]
+ \ScrabblePlaceMot[orientation]{l,e,t,t,r,e,s,}{coordonnées de la case de départ}
+\end{EnvScrabble}
+\end{PresentationCode}
+
+\subsection{Langues}
+
+Les \textsf{commandes}, \textsf{environnements} et \textsf{clés} proposées le sont en version \textsf{française}, mais les cases et points peuvent être affichées en :
+
+\begin{itemize}
+ \item français ;
+ \item anglais ;
+ \item allemand ;
+ \item espagnol.
+\end{itemize}
+
+\pagebreak
+
+\section{Commandes, clés et options}
+
+\subsection{Le plateau seul}
+
+Le premier argument, \textit{optionnel}, entre \texttt{<...>} est la \Cle{langue} d'affichage peut-être choisie parmi :
+
+\hfill\Cle{FR} (français, par défaut), \Cle{EN} (anglais), \Cle{DE} (allemand) et \Cle{ES} (espagnol).\hfill~
+
+\smallskip
+
+Le second argument, \textit{optionnel}, entre \texttt{[...]} propose les \Cle{clés} :
+
+\begin{itemize}
+ \item \Cle{Echelle} pour spécifier l'échelle d'affichage (l'unité de base étant 1~cm) ; \hfill~défaut : \Cle{1}
+ \item le booléen \Cle{Cadre} pour afficher un cadre autour du plateau ; \hfill~défaut : \Cle{true}
+ \item le booléen \Cle{Labels} pour afficher le \textit{nom} des cases ;\hfill~défaut : \Cle{true}
+ \item le booléen \Cle{Aide} pour afficher une aide pour repérer les cases ;\hfill~défaut : \Cle{false}
+\end{itemize}
+
+\begin{PresentationCode}{}
+%plateau sans le nom des cases
+\PlateauScrabble[Labels=false,Echelle=0.55]\\
+%plateau en anglais
+\PlateauScrabble<EN>[Echelle=0.55,Cadre=false]
+\end{PresentationCode}
+
+\newpage
+
+\subsection{Le plateau avec des mots}
+
+Il s'agit dans ce cas d'utiliser l'\textsf{environnement} ainsi que la \textsf{commande} spécifique pour placer les mots.
+
+\smallskip
+
+En ce qui concerne les options de l'\textsf{environnement}, ce sont les mêmes que pour la \textsf{commande} autonome.
+
+\smallskip
+
+Pour le placement des mots :
+
+\begin{itemize}
+ \item le premier argument, \textit{optionnel}, entre \texttt{[...]} est l'orientation du mot, à choisir entre \Cle{H} (par défaut) et \Cle{V} (en fait toute autre lettre que \Cle{H} !) ;
+ \item le deuxième argument, \textit{mandataire}, entre \texttt{\{...\}}, est la liste des lettres à placer, séparées par des \og \texttt{,} \fg{} ;
+ \item le dernier argument, \textit{mandataire}, entre \texttt{\{...\}}, correspond aux coordonnées de la case sur laquelle sera placée le début du mot (la case (1;\,1) étant la case au bord Bas/Gauche).
+\end{itemize}
+
+\textbf{Remarque 1 :} la langue choisie permettra également d'avoir les jetons avec le \textit{bon} nombre de points !
+
+\smallskip
+
+\textbf{Remarque 2 :} le \textit{blanc} (ou \textit{joker}) est obtenu par la lettre \texttt{*}.
+
+\begin{PresentationCode}{}
+\begin{EnvScrabble}[Echelle=0.75,Labels=false,Aide]
+ \ScrabblePlaceMot{T,I,K,Z}{1,13}
+ \ScrabblePlaceMot[V]{P,S,T,R,I,C,K,S}{1,15}
+ \ScrabblePlaceMot[V]{K,A,T,E,X}{3,13}
+ \ScrabblePlaceMot{C,L,E,V,E,R,E,F}{1,10}
+ \ScrabblePlaceMot[V]{M,E,T,A,P,O,S,T}{7,11}
+ \ScrabblePlaceMot{L,U,A,L,A,T,E,X}{5,8}
+ \ScrabblePlaceMot[V]{P,R,O,F,L,Y,*,E,E}{11,15}
+ \ScrabblePlaceMot{P,R,O,F,C,O,L,L,E,*,E}{1,1}
+ \ScrabblePlaceMot{S,Y,N,T,A,X,E}{7,5}
+ \ScrabblePlaceMot[V]{S,T,R,I,N,*}{10,6}
+\end{EnvScrabble}
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
+\begin{EnvScrabble}<FR>[Echelle=0.55]
+ \ScrabblePlaceMot{T,I,K,Z}{1,13}
+ \ScrabblePlaceMot[V]{P,S,T,R,I,C,K,S}{1,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {Version française} ; %code rajouté
+\end{EnvScrabble}~~~
+\begin{EnvScrabble}<EN>[Echelle=0.55]
+ \ScrabblePlaceMot{T,I,K,Z}{1,13}
+ \ScrabblePlaceMot[V]{P,S,T,R,I,C,K,S}{1,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {Version anglaise} ; %code rajouté
+\end{EnvScrabble}\\
+\begin{EnvScrabble}<DE>[Echelle=0.55]
+ \ScrabblePlaceMot{T,I,K,Z}{1,13}
+ \ScrabblePlaceMot[V]{P,S,T,R,I,C,K,S}{1,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {Version allemande} ; %code rajouté
+\end{EnvScrabble}~~~
+\begin{EnvScrabble}<ES>[Echelle=0.55]
+ \ScrabblePlaceMot{L,A,T,E,X}{1,14}
+ \ScrabblePlaceMot[V]{M,A,D,R,I,D}{2,15}
+ \draw (7,15) node[font=\LARGE\sffamily] {Version espagnole} ; %code rajouté
+\end{EnvScrabble}
+\end{PresentationCode}
+
+\end{document}
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/scrabble/Scrabble-doc-fr.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty 2023-01-06 21:51:50 UTC (rev 65474)
@@ -0,0 +1,388 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% 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}[2023/01/06 v0.1.1 Scrabble]
+% 0.1.1 Option [fr] pour franciser les commandes
+% 0.1 Version initiale
+
+%------Option
+\newif\if at fr \@frfalse
+\DeclareOption{fr}{\@frtrue}
+\DeclareOption*{}%si option inconnue ;-)
+\ProcessOptions\relax
+
+%------Packages utiles
+\RequirePackage{tikz}
+\RequirePackage{pgf,pgffor}
+\RequirePackage{xstring}
+\RequirePackage{xparse}
+\RequirePackage{simplekv}
+%librairies tikz
+\usetikzlibrary{calc,shapes.geometric}
+
+\if at fr %les commandes francisées
+%score par lettre
+%idées de https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders
+\newcommand\lettrescorescrabble[2][FR]{%avec gestion du Joker par *
+ \IfStrEq{#2}{*}%
+ {}%
+ {%
+ \def\tmp{#2}%
+ \expandafter\count\expandafter0\expandafter`#2\relax\advance\count0 by-65\relax%
+ \IfStrEq{#1}{FR}%
+ {\ifcase\count0\relax1\or3\or3\or2\or1\or4\or2\or4\or1\or8\or10\or1\or1\or1\or1\or3\or8\or1\or1\or1\or1\or4\or10\or10\or10\or10\else\fi}{}%
+ \IfStrEq{#1}{EN}%
+ {\ifcase\count0\relax1\or3\or3\or2\or1\or4\or2\or4\or1\or8\or5\or1\or3\or1\or1\or3\or10\or1\or1\or1\or1\or4\or4\or8\or4\or10\else\fi}{}%
+ \IfStrEq{#1}{DE}%
+ {\ifcase\count0\relax1\or3\or4\or1\or1\or2\or2\or2\or2\or1\or6\or4\or2\or3\or2\or4\or10\or1\or1\or1\or1\or6\or3\or8\or10\or3\else\fi}{}%
+ \IfStrEq{#1}{ES}%
+ {\ifcase\count0\relax1\or3\or3\or2\or1\or4\or2\or4\or1\or8\or0\or1\or3\or1\or1\or3\or5\or1\or1\or1\or1\or4\or0\or8\or4\or10\else\fi}{}%
+ }%
+}
+
+%commandes localisées des cases
+\newcommand\SCRBMCT[1][FR]{%
+ \IfStrEq{#1}{FR}{MOT\\COMPTE\\TRIPLE}{}%
+ \IfStrEq{#1}{EN}{TRIPLE\\WORD\\SCORE}{}%
+ \IfStrEq{#1}{DE}{\scalebox{2}[2]{3W}}{}%
+ \IfStrEq{#1}{ES}{TRIPLE\\TANTO\\DE\\PALABRA}{}%
+}
+\newcommand\SCRBMCD[1][FR]{%
+ \IfStrEq{#1}{FR}{MOT\\COMPTE\\DOUBLE}{}%
+ \IfStrEq{#1}{EN}{DOUBLE\\WORD\\SCORE}{}%
+ \IfStrEq{#1}{DE}{\scalebox{2}[2]{2W}}{}%
+ \IfStrEq{#1}{ES}{DOBLE\\TANTO\\DE\\PALABRA}{}%
+}
+\newcommand\SCRBLCT[1][FR]{%
+ \IfStrEq{#1}{FR}{LETTRE\\COMPTE\\TRIPLE}{}%
+ \IfStrEq{#1}{EN}{TRIPLE\\LETTER\\SCORE}{}%
+ \IfStrEq{#1}{DE}{\scalebox{2}[2]{3B}}{}%
+ \IfStrEq{#1}{ES}{TRIPLE\\TANTO\\DE\\LETRA}{}%
+}
+\newcommand\SCRBLCD[1][FR]{%
+ \IfStrEq{#1}{FR}{LETTRE\\COMPTE\\DOUBLE}{}%
+ \IfStrEq{#1}{EN}{DOUBLE\\LETTER\\SCORE}{}%
+ \IfStrEq{#1}{DE}{\scalebox{2}[2]{2B}}{}%
+ \IfStrEq{#1}{ES}{DOBLE\\TANTO\\DE\\LETRA}{}%
+}
+
+%styles case + jetons
+%idées de https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders
+\tikzset{
+ scorelettre/.style={
+ font=\sffamily\bfseries\tiny,align=center,scale=0.95,draw=none,fill=none
+ },
+ pics/.cd,
+ pointes/.style args={#1#2#3}{
+ code={
+ \fill [#3,scale=0.5*0.9] (-1,1) {\foreach \i in {0,1,2,3}{%
+ [rotate=-\i*90] -- (-#1*#2,1) {\foreach \j in {1,...,#1} {-- ++(#2,#2) -- ++(#2,-#2)} -- (1,1)}}} -- cycle;
+ }
+ },
+ casecentrale/.style={
+ code={
+ \path pic {pointes={2}{0.15}{red!25}};
+ \node [star,fill,star point ratio=2.35] {};%
+ }
+ },
+ jeton/.style={
+ code={
+ \node[fill=yellow!40,minimum size=0.9 cm,rounded corners=\fpeval{\PLSCRBBLEechelle*0.15} cm,font=\Large\sffamily\bfseries] (JETON) {\IfStrEq{#1}{*}{}{#1}};%
+ \node[inner sep=2pt,font=\sffamily\scriptsize,anchor=south east] at (JETON.south east) { \lettrescorescrabble[\PLSCRBBLElangue]{#1} };%
+ }
+ },
+ placemotH/.style={
+ code={
+ \foreach \l [count=\x from 0] in {#1} {\path ({\x-1},-1) pic {jeton={\l}};}
+ }
+ },
+ placemotV/.style={
+ code={
+ \foreach \l [count=\y from 0] in {#1} {\path (-1,-{\y-1}) pic {jeton={\l}};}
+ }
+ },
+ motcomptetriple/.style={
+ code={
+ \path pic {pointes={3}{0.15}{red!75}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBMCT[\PLSCRBBLElangue] };}{}
+ }
+ },
+ motcomptedouble/.style={
+ code={
+ \path pic {pointes={2}{0.15}{red!25}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBMCD[\PLSCRBBLElangue] };}
+ {}%
+ }
+ },
+ lettrecomptetriple/.style={
+ code={
+ \path pic {pointes={3}{0.15}{blue!50!cyan!75}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBLCT[\PLSCRBBLElangue] };}{}
+ }
+ },
+ lettrecomptedouble/.style={
+ code={
+ \path pic {pointes={2}{0.15}{blue!50!cyan!50}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBLCD[\PLSCRBBLElangue] };}{}
+ }
+ }
+}
+
+%commande pour placer un mot
+\newcommand\ScrabblePlaceMot[3][H]{%
+ \IfStrEq{#1}{H}%
+ {\path (#3) pic {placemotH={#2}};}
+ {\path (#3) pic {placemotV={#2}};}
+}
+
+%clés
+\defKV[PLSCRABBLETIKZ]{%
+ Echelle=\xdef\PLSCRBBLEechelle{#1}
+}
+\setKVdefault[PLSCRABBLETIKZ]{%
+ Echelle=1,%
+ Cadre=true,%
+ Labels=true,%
+ Aide=false
+}
+
+%commandes génériques autonomes pour plateau
+\NewDocumentCommand\PlateauScrabble{ D<>{FR} O{} }{%1=lng,2=options
+ \xdef\PLSCRBBLElangue{#1}
+ \useKVdefault[PLSCRABBLETIKZ]
+ \setKV[PLSCRABBLETIKZ]{#2}
+ \begin{tikzpicture}[scale=\PLSCRBBLEechelle,every node/.style={scale=\PLSCRBBLEechelle}]
+ %plateau
+ \fill[gray!25] (-.5,-.5) rectangle ++(15,15);
+ \draw[white,line width=\fpeval{\PLSCRBBLEechelle*0.1} cm, shift={(-.5,-.5)}] grid (15,15);
+ \foreach \scrcase in{(\x,\y),(\y,14-\x),(14-\x,14-\y),(14-\y,\x)}{%
+ \foreach \x/\y in {0/0,7/0}{\path \scrcase pic {motcomptetriple};}
+ \foreach \x/\y in {1/1,2/2,3/3,4/4}{\path \scrcase pic {motcomptedouble};}
+ \foreach \x/\y in {1/5,5/1,5/5}{\path \scrcase pic {lettrecomptetriple};}
+ \foreach \x/\y in {3/0,0/3,2/6,6/2,6/6}{\path \scrcase pic {lettrecomptedouble};}
+ }
+ \path (7,7) pic {casecentrale};
+ \ifboolKV[PLSCRABBLETIKZ]{Cadre}{\draw[line width=\fpeval{\PLSCRBBLEechelle*0.075} cm] (-0.6,-0.6) rectangle (14.6,14.6) ;}{}
+ \end{tikzpicture}%
+}
+
+%environnement pour plateau, pour placer des mots
+\NewDocumentEnvironment{EnvScrabble}{ D<>{FR} O{} }%1=LANG,2=options
+{
+ \xdef\PLSCRBBLElangue{#1}
+ \useKVdefault[PLSCRABBLETIKZ]
+ \setKV[PLSCRABBLETIKZ]{#2}
+ \begin{tikzpicture}[scale=\PLSCRBBLEechelle,every node/.style={scale=\PLSCRBBLEechelle}]
+ %plateau
+ \fill[gray!25] (-.5,-.5) rectangle ++(15,15);
+ \draw[white,line width=\fpeval{\PLSCRBBLEechelle*0.1} cm, shift={(-.5,-.5)}] grid (15,15);
+ \foreach \scrcase in{(\x,\y),(\y,14-\x),(14-\x,14-\y),(14-\y,\x)}{%cases spéciales
+ \foreach \x/\y in {0/0,7/0} {\path \scrcase pic {motcomptetriple};}
+ \foreach \x/\y in {1/1,2/2,3/3,4/4} {\path \scrcase pic {motcomptedouble};}
+ \foreach \x/\y in {1/5,5/1,5/5} {\path \scrcase pic {lettrecomptetriple};}
+ \foreach \x/\y in {3/0,0/3,2/6,6/2,6/6} {\path \scrcase pic {lettrecomptedouble};}
+ }
+ \path (7,7) pic {casecentrale};
+ \ifboolKV[PLSCRABBLETIKZ]{Cadre}
+ {\draw[line width=\fpeval{\PLSCRBBLEechelle*0.075} cm] (-0.6,-0.6) rectangle (14.6,14.6) ;}%
+ {}
+ \ifboolKV[PLSCRABBLETIKZ]{Aide}
+ {%
+ \foreach \numberscr in {1,2,...,15}
+ {\draw[gray] ({\numberscr-1},-0.65) node[below,font=\sffamily] {\numberscr};\draw[gray] (-0.65,{\numberscr-1}) node[left,font=\sffamily] {\numberscr};}
+ }%
+ {}
+}
+{
+ \end{tikzpicture}%
+}
+\else %les commandes "anglaises"
+%score par lettre
+%idées de https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders
+\newcommand\lettrescorescrabble[2][EN]{%avec gestion du Joker par *
+ \IfStrEq{#2}{*}%
+ {}%
+ {%
+ \def\tmp{#2}%
+ \expandafter\count\expandafter0\expandafter`#2\relax\advance\count0 by-65\relax%
+ \IfStrEq{#1}{FR}%
+ {\ifcase\count0\relax1\or3\or3\or2\or1\or4\or2\or4\or1\or8\or10\or1\or1\or1\or1\or3\or8\or1\or1\or1\or1\or4\or10\or10\or10\or10\else\fi}{}%
+ \IfStrEq{#1}{EN}%
+ {\ifcase\count0\relax1\or3\or3\or2\or1\or4\or2\or4\or1\or8\or5\or1\or3\or1\or1\or3\or10\or1\or1\or1\or1\or4\or4\or8\or4\or10\else\fi}{}%
+ \IfStrEq{#1}{GE}%
+ {\ifcase\count0\relax1\or3\or4\or1\or1\or2\or2\or2\or2\or1\or6\or4\or2\or3\or2\or4\or10\or1\or1\or1\or1\or6\or3\or8\or10\or3\else\fi}{}%
+ \IfStrEq{#1}{SP}%
+ {\ifcase\count0\relax1\or3\or3\or2\or1\or4\or2\or4\or1\or8\or0\or1\or3\or1\or1\or3\or5\or1\or1\or1\or1\or4\or0\or8\or4\or10\else\fi}{}%
+ }%
+}
+
+%commandes localisées des cases
+\newcommand\SCRBMCT[1][EN]{%
+ \IfStrEq{#1}{FR}{MOT\\COMPTE\\TRIPLE}{}%
+ \IfStrEq{#1}{EN}{TRIPLE\\WORD\\SCORE}{}%
+ \IfStrEq{#1}{GE}{\scalebox{2}[2]{3W}}{}%
+ \IfStrEq{#1}{SP}{TRIPLE\\TANTO\\DE\\PALABRA}{}%
+}
+\newcommand\SCRBMCD[1][EN]{%
+ \IfStrEq{#1}{FR}{MOT\\COMPTE\\DOUBLE}{}%
+ \IfStrEq{#1}{EN}{DOUBLE\\WORD\\SCORE}{}%
+ \IfStrEq{#1}{GE}{\scalebox{2}[2]{2W}}{}%
+ \IfStrEq{#1}{SP}{DOBLE\\TANTO\\DE\\PALABRA}{}%
+}
+\newcommand\SCRBLCT[1][EN]{%
+ \IfStrEq{#1}{FR}{LETTRE\\COMPTE\\TRIPLE}{}%
+ \IfStrEq{#1}{EN}{TRIPLE\\LETTER\\SCORE}{}%
+ \IfStrEq{#1}{GE}{\scalebox{2}[2]{3B}}{}%
+ \IfStrEq{#1}{SP}{TRIPLE\\TANTO\\DE\\LETRA}{}%
+}
+\newcommand\SCRBLCD[1][EN]{%
+ \IfStrEq{#1}{FR}{LETTRE\\COMPTE\\DOUBLE}{}%
+ \IfStrEq{#1}{EN}{DOUBLE\\LETTER\\SCORE}{}%
+ \IfStrEq{#1}{GE}{\scalebox{2}[2]{2B}}{}%
+ \IfStrEq{#1}{SP}{DOBLE\\TANTO\\DE\\LETRA}{}%
+}
+
+%styles case + jetons
+%idées de https://tex.stackexchange.com/questions/194780/tikz-drawing-a-rectangle-with-spikes-on-borders
+\tikzset{
+ scorelettre/.style={
+ font=\sffamily\bfseries\tiny,align=center,scale=0.95,draw=none,fill=none
+ },
+ pics/.cd,
+ pointes/.style args={#1#2#3}{
+ code={
+ \fill [#3,scale=0.5*0.9] (-1,1) {\foreach \i in {0,1,2,3}{%
+ [rotate=-\i*90] -- (-#1*#2,1) {\foreach \j in {1,...,#1} {-- ++(#2,#2) -- ++(#2,-#2)} -- (1,1)}}} -- cycle;
+ }
+ },
+ casecentrale/.style={
+ code={
+ \path pic {pointes={2}{0.15}{red!25}};
+ \node [star,fill,star point ratio=2.35] {};%
+ }
+ },
+ jeton/.style={
+ code={
+ \node[fill=yellow!40,minimum size=0.9 cm,rounded corners=\fpeval{\PLSCRBBLEechelle*0.15} cm,font=\Large\sffamily\bfseries] (JETON) {\IfStrEq{#1}{*}{}{#1}};%
+ \node[inner sep=2pt,font=\sffamily\scriptsize,anchor=south east] at (JETON.south east) { \lettrescorescrabble[\PLSCRBBLElangue]{#1} };%
+ }
+ },
+ placemotH/.style={
+ code={
+ \foreach \l [count=\x from 0] in {#1} {\path ({\x-1},-1) pic {jeton={\l}};}
+ }
+ },
+ placemotV/.style={
+ code={
+ \foreach \l [count=\y from 0] in {#1} {\path (-1,-{\y-1}) pic {jeton={\l}};}
+ }
+ },
+ motcomptetriple/.style={
+ code={
+ \path pic {pointes={3}{0.15}{red!75}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBMCT[\PLSCRBBLElangue] };}{}
+ }
+ },
+ motcomptedouble/.style={
+ code={
+ \path pic {pointes={2}{0.15}{red!25}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBMCD[\PLSCRBBLElangue] };}
+ {}%
+ }
+ },
+ lettrecomptetriple/.style={
+ code={
+ \path pic {pointes={3}{0.15}{blue!50!cyan!75}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBLCT[\PLSCRBBLElangue] };}{}
+ }
+ },
+ lettrecomptedouble/.style={
+ code={
+ \path pic {pointes={2}{0.15}{blue!50!cyan!50}};%
+ \ifboolKV[PLSCRABBLETIKZ]{Labels}%
+ {\node [scorelettre] { \SCRBLCD[\PLSCRBBLElangue] };}{}
+ }
+ }
+}
+
+%commande pour placer un mot
+\newcommand\ScrabblePutWord[3][H]{%
+ \IfStrEq{#1}{H}%
+ {\path (#3) pic {placemotH={#2}};}
+ {\path (#3) pic {placemotV={#2}};}
+}
+
+%clés
+\defKV[PLSCRABBLETIKZ]{%
+ Scale=\xdef\PLSCRBBLEechelle{#1}
+}
+\setKVdefault[PLSCRABBLETIKZ]{%
+ Scale=1,%
+ Border=true,%
+ Labels=true,%
+ Help=false
+}
+
+%commandes génériques autonomes pour plateau
+\NewDocumentCommand\ScrabbleBoard{ D<>{EN} O{} }{%1=lng,2=options
+ \xdef\PLSCRBBLElangue{#1}
+ \useKVdefault[PLSCRABBLETIKZ]
+ \setKV[PLSCRABBLETIKZ]{#2}
+ \begin{tikzpicture}[scale=\PLSCRBBLEechelle,every node/.style={scale=\PLSCRBBLEechelle}]
+ %plateau
+ \fill[gray!25] (-.5,-.5) rectangle ++(15,15);
+ \draw[white,line width=\fpeval{\PLSCRBBLEechelle*0.1} cm, shift={(-.5,-.5)}] grid (15,15);
+ \foreach \scrcase in{(\x,\y),(\y,14-\x),(14-\x,14-\y),(14-\y,\x)}{%
+ \foreach \x/\y in {0/0,7/0}{\path \scrcase pic {motcomptetriple};}
+ \foreach \x/\y in {1/1,2/2,3/3,4/4}{\path \scrcase pic {motcomptedouble};}
+ \foreach \x/\y in {1/5,5/1,5/5}{\path \scrcase pic {lettrecomptetriple};}
+ \foreach \x/\y in {3/0,0/3,2/6,6/2,6/6}{\path \scrcase pic {lettrecomptedouble};}
+ }
+ \path (7,7) pic {casecentrale};
+ \ifboolKV[PLSCRABBLETIKZ]{Border}{\draw[line width=\fpeval{\PLSCRBBLEechelle*0.075} cm] (-0.6,-0.6) rectangle (14.6,14.6) ;}{}
+ \end{tikzpicture}%
+}
+
+%environnement pour plateau, pour placer des mots
+\NewDocumentEnvironment{EnvScrabble}{ D<>{EN} O{} }%1=LANG,2=options
+{
+ \xdef\PLSCRBBLElangue{#1}
+ \useKVdefault[PLSCRABBLETIKZ]
+ \setKV[PLSCRABBLETIKZ]{#2}
+ \begin{tikzpicture}[scale=\PLSCRBBLEechelle,every node/.style={scale=\PLSCRBBLEechelle}]
+ %plateau
+ \fill[gray!25] (-.5,-.5) rectangle ++(15,15);
+ \draw[white,line width=\fpeval{\PLSCRBBLEechelle*0.1} cm, shift={(-.5,-.5)}] grid (15,15);
+ \foreach \scrcase in{(\x,\y),(\y,14-\x),(14-\x,14-\y),(14-\y,\x)}{%cases spéciales
+ \foreach \x/\y in {0/0,7/0} {\path \scrcase pic {motcomptetriple};}
+ \foreach \x/\y in {1/1,2/2,3/3,4/4} {\path \scrcase pic {motcomptedouble};}
+ \foreach \x/\y in {1/5,5/1,5/5} {\path \scrcase pic {lettrecomptetriple};}
+ \foreach \x/\y in {3/0,0/3,2/6,6/2,6/6} {\path \scrcase pic {lettrecomptedouble};}
+ }
+ \path (7,7) pic {casecentrale};
+ \ifboolKV[PLSCRABBLETIKZ]{Border}
+ {\draw[line width=\fpeval{\PLSCRBBLEechelle*0.075} cm] (-0.6,-0.6) rectangle (14.6,14.6) ;}%
+ {}
+ \ifboolKV[PLSCRABBLETIKZ]{Help}
+ {%
+ \foreach \numberscr in {1,2,...,15}
+ {\draw[gray] ({\numberscr-1},-0.65) node[below,font=\sffamily] {\numberscr};\draw[gray] (-0.65,{\numberscr-1}) node[left,font=\sffamily] {\numberscr};}
+ }%
+ {}
+}
+{
+ \end{tikzpicture}%
+}
+\fi
+
+\endinput
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/tex/latex/scrabble/Scrabble.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2023-01-06 00:49:18 UTC (rev 65473)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2023-01-06 21:51:50 UTC (rev 65474)
@@ -718,7 +718,7 @@
schulmathematik sclang-prettifier
schule schulschriften schwalbe-chess
scikgtex sciposter scientific-thesis-cover scontents
- scrambledenvs scratch scratch3 scratchx screenplay screenplay-pkg
+ scrabble scrambledenvs scratch scratch3 scratchx screenplay screenplay-pkg
scripture scrjrnl scrlayer-fancyhdr scrlttr2copy scsnowman
sdaps sdrt sduthesis
se2thesis secdot secnum section sectionbox sectionbreak sectsty seealso
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2023-01-06 00:49:18 UTC (rev 65473)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2023-01-06 21:51:50 UTC (rev 65474)
@@ -1767,6 +1767,7 @@
'sanskrit' => '&POSTsanskrit',
'schule' => '&POSTschule',
'scontents' => '&POSTscontents',
+ 'scrabble' => '&POST_onelevel',
'shipunov' => '&POSTshipunov',
'simple-resume-cv' => '&POST_simple_rmFonts',
'simple-thesis-dissertation' => '&POST_simple_rmFonts',
Modified: trunk/Master/tlpkg/tlpsrc/collection-games.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-games.tlpsrc 2023-01-06 00:49:18 UTC (rev 65473)
+++ trunk/Master/tlpkg/tlpsrc/collection-games.tlpsrc 2023-01-06 21:51:50 UTC (rev 65474)
@@ -40,6 +40,7 @@
depend reverxii
depend rubik
depend schwalbe-chess
+depend scrabble
depend sgame
depend skak
depend skaknew
Added: trunk/Master/tlpkg/tlpsrc/scrabble.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list.