texlive[72786] Master/texmf-dist: chessboard (7nov24)
commits+karl at tug.org
commits+karl at tug.org
Thu Nov 7 21:25:01 CET 2024
Revision: 72786
https://tug.org/svn/texlive?view=revision&revision=72786
Author: karl
Date: 2024-11-07 21:25:01 +0100 (Thu, 07 Nov 2024)
Log Message:
-----------
chessboard (7nov24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/chessboard/README.md
trunk/Master/texmf-dist/doc/latex/chessboard/brett.jpg
trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.pdf
trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.pdf
trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex
trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf
trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx
trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty
trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-pgf.sty
trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-pgf.sty
trunk/Master/texmf-dist/tex/latex/chessboard/chessboard.sty
Modified: trunk/Master/texmf-dist/doc/latex/chessboard/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/README.md 2024-11-07 00:42:05 UTC (rev 72785)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/README.md 2024-11-07 20:25:01 UTC (rev 72786)
@@ -1,6 +1,6 @@
# chessboard --- A package to print chessboards
-Packageversion: 1.9 Ulrike Fischer 2019
-Packagedate: 2020-11-01
+Packageversion: 2.0 Ulrike Fischer 2020
+Packagedate: 2024-11-07
## LICENSE
LaTeX Project Public License
@@ -7,6 +7,8 @@
## CHANGES
+1.9: Corrected a bug. colorbackareas (and other area keys) didn't process
+ lists of areas correctly.
1.8: no longer uses \arabic to avoid problems with pages which redefine it.
Added source of documentation.
1.7: chessboard no longer loads amssymb (to avoid clashes)
Modified: trunk/Master/texmf-dist/doc/latex/chessboard/brett.jpg
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex 2024-11-07 00:42:05 UTC (rev 72785)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex 2024-11-07 20:25:01 UTC (rev 72786)
@@ -2,13 +2,13 @@
% -*- mode: TeX -*- -*- coding: UTF-8 -*-
\listfiles
\def\UFcurrentpackage{chessboard}
-\def\UFcurrentversion{1.9}
+\def\UFcurrentversion{2.0}
%$Date$$Version$
-\RequirePackage{l3pdf}
-\ExplSyntaxOn
-\pdf_uncompress:
-%\pdf_version_gset:n{2.0}
-\ExplSyntaxOff
+%\ExplSyntaxOn
+%\sys_ensure_backend:
+%\pdf_uncompress:
+%%\pdf_version_gset:n{2.0}
+%\ExplSyntaxOff
\RequirePackage{fix-cm}
@@ -125,6 +125,9 @@
the foreground picture.
\begin{description}
+\item[2024-11-07 (Version 2.0)] The background and foreground pictures are now
+ti\textit{k}z-pictures and no longer basic pgf-pictures. This allows to use all ti\textit{k}z-commands and so makes drawing and style definitions easier.
+
\item[2020-11-01 (Version 1.9)] Corrected a bug reported by
Phelype Oleinik. \texttt{colorbackareas} (and other area keys) didn't process lists of areas correctly.
@@ -172,7 +175,7 @@
\section{Introduction}
-\minisec{What is does} \DescribeMacro{\chessboard} This package
+\minisec{What it does} \DescribeMacro{\chessboard} This package
offers a command \cs{chessboard}\keyoarg{} to print boards of chess
positions and similar games. It is intended to replace the
\cs{showboard} command of \skaksty which has some deficiencies:
@@ -570,7 +573,7 @@
\minisec{1. The background layer}
-This is a pgf-picture that lies under the board. It can be used for
+This is a ti\textit{k}z-picture that lies under the board. It can be used for
background colors or fancy borders or other background decoration.
%Coloring or drawing something in this layers means adding a color
%command or pgf commands to the code of the picture. How to do this
@@ -584,12 +587,12 @@
\minisec{3. The mark layer}
-This layer is again a pgf picture now over the board. It can be used
+This layer is again a ti\textit{k}z-picture now over the board. It can be used
to draw crosses, arrows etc on the board.
The sections \ref{startmain} to \ref{stopmain} describe how to
manipulate the main layer. The section \ref{startpgf} describes
-how to handle the pgf pictures.
+how to handle the ti\textit{k}z-picture.
@@ -2035,12 +2038,6 @@
%\section{Coloring and emphasizing the board chars}
-{\bfseries You must load a color package like \packagename{xcolor} or
-\packagename{color} to be able to use colors!}\footnote{I must
-correct myself: the pgf-package will load \packagename{xcolor}, so
-you should load a color package only if you want to use it with other
-options.}
-
Coloring and decorating the board is a bit complicated as there is
so much that can get different colors and so much different
possibilities for marks, arrows, fancy borders and so on. So it can
@@ -2068,17 +2065,15 @@
highlighting commands. But I also tried to offer a possibility to use
the commands of \skaksty.
-The pgf-commands used by \pchessboard need only
-\packagename{pgfcore.sty} and \packagename{pgfbaseshapespackage.sty}
-from the \packagename{pgf}-bundle. If you need pgf-commands from
-other parts of the bundle, you will have to load the styles yourself.
+The package only loads the package \packagename{tikz}. If you want to use
+additional libraries you have to load them yourself.
\Describesetkey{pgf}{true|false}{}{true}
-Pgf-commands works fine with \LaTeX\ and pdf\LaTeX\ but in some case
+ti\textit{k}z-commands works fine with \LaTeX\ and pdf\LaTeX\ but in some case
(e.g.\ if you use \cs{chessboard} in an environment that calls the
environment \texttt{preview}) they can induce errors. So I added a
-key to disable all the pgf-commands. It is also useful to disable
+key to disable all the ti\textit{k}z-commands. It is also useful to disable
most of the highlighting.
@@ -2085,16 +2080,14 @@
-\subsection{The pgf-pictures}
+\subsection{The ti\textit{k}z-pictures}
The decorations in the two other layers (background layer and mark
-layer) use pgf-commands -- or to be more precise: the two other
-layers are pgf-pictures.
+layer) use pgf/ti\textit{k}z-commands -- or to be more precise: the two other
+layers are ti\textit{k}z-pictures.
-
-
-
-In the first version of \pchessboard the background picture wasn't
-used much. I had only implemented some code to color the fields. But
+In the first version of \pchessboard the pictures where pgf-pictures and not
+ti\textit{k}z-pictures. Also the background picture wasn't
+used much: I had only implemented some code to color the fields. But
then I got the request to add some more commands for fancy borders
which did mean that I had to transfer the code which draws borders in
the foreground picture to the background picture. And I got a request
@@ -2112,7 +2105,9 @@
is affected and put a bit more order in the keys. At the end quite a
lot of the code has been rearranged and changed.
+Finally a number of questions came up how to adapt the styles and I realized that restricting the picture to the basic layer pgf-commands makes it harder than necessary and that today the additional compilation time and memory use for full ti\textit{k}z support no long matters. So this was changed too.
+
\subsubsection{Naming of the pgf related keys}
There are more or less three set of keys
@@ -2343,24 +2338,13 @@
\DescribeMacro{\cbDefinePgfFieldStyle}
\DescribeMacro{\cbDefinePgfRegionStyle}
\DescribeMacro{\cbDefinePgfMoveStyle}
-With this commands you can define your own styles. The commands take
+With these commands you can define your own styles. The commands take
two argument: the first is the name of the style, the second should
-be the pgf-commands needed to draw.
+be the pgf-commands or ti\textit{k}z-commands needed to draw.
-In previous version of the package the commands were called.
-\cs{cbDefineMarkFieldStyle}%
-\index{cbDefineMarkF=\textbackslash cbDefineMarkFieldStyle (obsolete)|see{\textbackslash cbDefinePgfFieldStyle}},
-\cs{cbDefineMarkRegionStyle}%
-\index{cbDefineMarkR=\textbackslash cbDefineMarkRegionStyle (obsolete) |see{\textbackslash cbDefinePgfRegionStyle}}
-and \cs{cbDefineMarkMoveStyle}%
-\index{cbDefineMarkM=\textbackslash cbDefineMarkMoveStyle (obsolete) |see{\textbackslash cbDefinePgfMoveStyle}}.
-%
-I have changed the names to indicate that the commands will define
-the styles for the background picture too. The older commands still
-work but I suggest that you switch to the new names.
-
-The listing shows first an example for a field mark, then an example
+The next listing shows two style definition using basic pgf-commands.
+At first an example for a field mark, then an example
for a region where the second corner is accessed through the
\lstinline+#1+,
and at last the definition for the text mark -- here it is necessary
@@ -2397,6 +2381,21 @@
{\pgftext[#2]{\normalfont\board at pgf@curtext}}}%
\end{lstlisting}
+A definition could also use ti\textit{k}z-commands
+\begin{lstlisting}
+\cbDefinePgfMoveStyle{moveto}{\draw[->,#2](0,0)--(#1);}
+\end{lstlisting}
+and then be used like this
+
+\cbDefinePgfMoveStyle{moveto}{\draw[->,#2](0,0)--(#1);}
+\begin{LTXexample}
+\newchessgame
+\chessboard[
+ pgfstyle={[red, very thick,dashed]moveto},
+ markmove=e2-e4,
+ ]
+\end{LTXexample}
+
\subsubsection{Introduction to the predefined pgf styles}
%\subsubsection{Graphic properties}
Modified: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx 2024-11-07 00:42:05 UTC (rev 72785)
+++ trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx 2024-11-07 20:25:01 UTC (rev 72786)
@@ -1,6 +1,6 @@
%<*chessboard>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{chessboard}[2020/11/01 version v1.9 print chessboards]
+\ProvidesPackage{chessboard}[2024/11/07 version v2.0 print chessboards]
%1.4: Changed to restore style key
%1.5: corrected values for mover key (w/b instead of w/s)
@@ -1114,12 +1114,12 @@
%% the background picture
\ifUFCB at locset@pgf
\makebox[0pt]{%
- \begin{pgfpicture}%
+ \begin{tikzpicture}%
\board at pgf@background
\begin{pgfscope}%
\board at pgf@extrabackground
\end{pgfscope}%
- \end{pgfpicture}}%
+ \end{tikzpicture}}%
\fi
%% the board
\ifUFCB at locset@inverse
@@ -1176,12 +1176,12 @@
%%the markground picture
\ifUFCB at locset@pgf
\makebox[0pt]{%
- \begin{pgfpicture}%
+ \begin{tikzpicture}%
\board at pgf@markground
\begin{pgfscope}%
\csname board at pgf@extramarkground\endcsname
\end{pgfscope}%
- \end{pgfpicture}}%
+ \end{tikzpicture}}%
\fi % end pgf
\board at do@setpsnode
%%
@@ -1436,7 +1436,7 @@
%</chessboard>
%<*chessboard-pgf>
-\ProvidesFile{chessboard-pgf.sty}[2020/11/01 version v1.9 pgf code for chessboard.sty]
+\ProvidesFile{chessboard-pgf.sty}[2024/11/07 version v2.0 pgf code for chessboard.sty]
%%$Date: 2011/01/11 14:07:20 $$Version: 3d9f59c743f1 $
\newcommand\board at pgf@extrabackground{}%
@@ -1549,6 +1549,11 @@
\board at pgf@setanchors{mark}}%
%% getting angles/length of a point:
+%% the board len can be a decimal, so we need a better function than the primitive divide
+\ExplSyntaxOn
+\newcommand\board at divide@NN[2]{%
+ \dim_set:Nn#1 {#1*\dim_ratio:nn{1pt}{#2}}}%
+\ExplSyntaxOff
\newcommand\board at pgf@extractangle[2]{%#1 command, #2 pgfpoint
\pgfextracty{\len at board@tempy}{#2}%
@@ -1556,7 +1561,7 @@
\ifdim\len at board@tempx=0pt\relax
%\len at board@tempy= 1 or unchanged?
\else
- \divide \len at board@tempy by \strip at pt\len at board@tempx\relax
+ \board at divide@NN\len at board@tempy\len at board@tempx
\fi
\ifdim\len at board@tempx=0pt\relax
\ifdim\len at board@tempy=0pt\relax
@@ -2553,7 +2558,7 @@
%</chessboard-pgf>
%<*chessboard-keys-main>
-\ProvidesFile{chessboard-keys-main.sty}[2020/11/01 version v1.9 key definitions for chessboard.sty]
+\ProvidesFile{chessboard-keys-main.sty}[2024/11/07 version v2.0 key definitions for chessboard.sty]
%%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $
%%file=Linie=column=vertikal=al_f_abetisch= a-h
@@ -4078,7 +4083,7 @@
%</chessboard-keys-main>
%<*chessboard-keys-pgf>
-\ProvidesFile{chessboard-keys-pgf.sty}[2020/11/01 version v1.9 key definitions for chessboard.sty]
+\ProvidesFile{chessboard-keys-pgf.sty}[2024/11/07 version v2.0 key definitions for chessboard.sty]
%%$Date: 2011/03/17 13:42:38 $$Version: e7ec1b100ede $
%% new 1.5.: style keys for curvemove
Modified: trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty 2024-11-07 00:42:05 UTC (rev 72785)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty 2024-11-07 20:25:01 UTC (rev 72786)
@@ -16,7 +16,7 @@
%% License, or (at your option) any later version.
%%
%% For error reports see documentation.
-\ProvidesFile{chessboard-keys-main.sty}[2020/11/01 version v1.9 key definitions for chessboard.sty]
+\ProvidesFile{chessboard-keys-main.sty}[2024/11/07 version v2.0 key definitions for chessboard.sty]
%%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $
%%file=Linie=column=vertikal=al_f_abetisch= a-h
Modified: trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-pgf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-pgf.sty 2024-11-07 00:42:05 UTC (rev 72785)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-pgf.sty 2024-11-07 20:25:01 UTC (rev 72786)
@@ -16,7 +16,7 @@
%% License, or (at your option) any later version.
%%
%% For error reports see documentation.
-\ProvidesFile{chessboard-keys-pgf.sty}[2020/11/01 version v1.9 key definitions for chessboard.sty]
+\ProvidesFile{chessboard-keys-pgf.sty}[2024/11/07 version v2.0 key definitions for chessboard.sty]
%%$Date: 2011/03/17 13:42:38 $$Version: e7ec1b100ede $
%% new 1.5.: style keys for curvemove
Modified: trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-pgf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-pgf.sty 2024-11-07 00:42:05 UTC (rev 72785)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-pgf.sty 2024-11-07 20:25:01 UTC (rev 72786)
@@ -16,7 +16,7 @@
%% License, or (at your option) any later version.
%%
%% For error reports see documentation.
-\ProvidesFile{chessboard-pgf.sty}[2020/11/01 version v1.9 pgf code for chessboard.sty]
+\ProvidesFile{chessboard-pgf.sty}[2024/11/07 version v2.0 pgf code for chessboard.sty]
%%$Date: 2011/01/11 14:07:20 $$Version: 3d9f59c743f1 $
\newcommand\board at pgf@extrabackground{}%
@@ -129,6 +129,11 @@
\board at pgf@setanchors{mark}}%
%% getting angles/length of a point:
+%% the board len can be a decimal, so we need a better function than the primitive divide
+\ExplSyntaxOn
+\newcommand\board at divide@NN[2]{%
+ \dim_set:Nn#1 {#1*\dim_ratio:nn{1pt}{#2}}}%
+\ExplSyntaxOff
\newcommand\board at pgf@extractangle[2]{%#1 command, #2 pgfpoint
\pgfextracty{\len at board@tempy}{#2}%
@@ -136,7 +141,7 @@
\ifdim\len at board@tempx=0pt\relax
%\len at board@tempy= 1 or unchanged?
\else
- \divide \len at board@tempy by \strip at pt\len at board@tempx\relax
+ \board at divide@NN\len at board@tempy\len at board@tempx
\fi
\ifdim\len at board@tempx=0pt\relax
\ifdim\len at board@tempy=0pt\relax
Modified: trunk/Master/texmf-dist/tex/latex/chessboard/chessboard.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chessboard/chessboard.sty 2024-11-07 00:42:05 UTC (rev 72785)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard.sty 2024-11-07 20:25:01 UTC (rev 72786)
@@ -17,7 +17,7 @@
%%
%% For error reports see documentation.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{chessboard}[2020/11/01 version v1.9 print chessboards]
+\ProvidesPackage{chessboard}[2024/11/07 version v2.0 print chessboards]
\DeclareOption{skaknew}{}%
\ProcessOptions
@@ -1119,12 +1119,12 @@
%% the background picture
\ifUFCB at locset@pgf
\makebox[0pt]{%
- \begin{pgfpicture}%
+ \begin{tikzpicture}%
\board at pgf@background
\begin{pgfscope}%
\board at pgf@extrabackground
\end{pgfscope}%
- \end{pgfpicture}}%
+ \end{tikzpicture}}%
\fi
%% the board
\ifUFCB at locset@inverse
@@ -1181,12 +1181,12 @@
%%the markground picture
\ifUFCB at locset@pgf
\makebox[0pt]{%
- \begin{pgfpicture}%
+ \begin{tikzpicture}%
\board at pgf@markground
\begin{pgfscope}%
\csname board at pgf@extramarkground\endcsname
\end{pgfscope}%
- \end{pgfpicture}}%
+ \end{tikzpicture}}%
\fi % end pgf
\board at do@setpsnode
%%
More information about the tex-live-commits
mailing list.