texlive[51445] Master/texmf-dist: chessboard (24jun19)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 24 23:06:02 CEST 2019


Revision: 51445
          http://tug.org/svn/texlive?view=revision&revision=51445
Author:   karl
Date:     2019-06-24 23:06:01 +0200 (Mon, 24 Jun 2019)
Log Message:
-----------
chessboard (24jun19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/source/latex/chessboard/chessboard.ins
    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

Added 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-skakps.tex
    trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex
    trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf
    trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.tex
    trunk/Master/texmf-dist/doc/latex/chessboard/file.fen
    trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx
    trunk/Master/texmf-dist/tex/latex/chessboard/UF-chessboard-documentation.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/chessboard/README
    trunk/Master/texmf-dist/source/latex/chessboard/chessboard-src.dtx

Deleted: trunk/Master/texmf-dist/doc/latex/chessboard/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/README	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/README	2019-06-24 21:06:01 UTC (rev 51445)
@@ -1,66 +0,0 @@
-chessboard --- A package to print chessboards
-Version 1.7 Ulrike Fischer 2014
-
-CHANGES
-1.7: chessboard no longer loads amssymb (to avoid clashes)
-1.6: Corrected some bugs. Added textfont key for text style.
-1.5: Corrected some bugs.
-     Added key getpiecelists.
-     Adapted the package to xskak.
-1.4: changed the code so that it work with xkeyval 2.5
-1.3a: corrected a small bug
-1.3:A lot of the pgf-code have been rewritten and extended.
-
-ATTENTION
-Upgrading to this version
-can change the look of existing documents.
-
-Notably two things can give problems: Since version 1.3 the value of the
-padding key affects much more objects (marks) in the pgf
-pictures. So it could be necessary to reset the padding. And the
-applycolor has changed its behaviour. It will now also affect
-the foreground picture.
-
-
-CONTENTS AND INSTALLATION
-
-- Readme (this file)
-- chessboard-scr.dtx
-- chessboard.ins
-- chessboard.pdf
-- chessboard.sty
-- chessboard-keys-main.sty
-- chessboard-keys-pgf.sty
-- chessboard-pgf.sty
-
-Move the four .sty  in <texmf>/tex/latex/chessboard/. You can regenerate the .sty by runing
-TeX/LaTeX on chessboard.ins to unpack the dtx.
-
-The dtx-file doesn't contain any documentation.
-So running LaTeX on it makes no sense!
-
-Put chessboard.pdf in
- doc/latex/chessboard/
-
-DOCUMENTATION
-
-chessboard.pdf. There isn't a source for the documentation as it use some
-local fonts and styles.
-
-DESCRIPTION
-
-This package offers commands to print chessboards. It can print partial boards,
-hide pieces and fields, color the boards and put various marks on the board.
-It has a lot of options to place pieces on the board. Using exotic pieces e.g. for
-fairy chess is possible.
-It can be used together with the newest version (1.4) of the skak package
-which you can find at CTAN and together with xskak.
-
-
-REQUIREMENTS
-chessboard uses some primitives of e\TeX. It needs a recent version
-of chessfss and xkeyval. It also needs the packages xifthen, tikz, pgfcore and pgfbaseshapes (from the pgf bundle),
-and - if run with latex - pst-node (from pstricks).
-
-LICENSE
-This material is subject to the LaTeX Project Public License.

Added: trunk/Master/texmf-dist/doc/latex/chessboard/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/README.md	2019-06-24 21:06:01 UTC (rev 51445)
@@ -0,0 +1,60 @@
+# chessboard --- A package to print chessboards
+Packageversion: 1.8 Ulrike Fischer 2019
+Packagedate: 2019-06-23
+
+## LICENSE
+LaTeX Project Public License
+
+
+## CHANGES
+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)
+1.6: Corrected some bugs. Added textfont key for text style.
+1.5: Corrected some bugs.
+     Added key getpiecelists.
+     Adapted the package to xskak.
+1.4: changed the code so that it work with xkeyval 2.5
+1.3a: corrected a small bug
+1.3:A lot of the pgf-code have been rewritten and extended.
+
+
+## CONTENTS AND INSTALLATION
+
+- README.md (this file)
+- chessboard.dtx
+- chessboard.ins
+- chessboard.pdf
+
+The best is to install chessboard with the package manager of your texsystem.
+
+For manual installation compile the .ins file. This will create chessboard.sty, chessboard-keys-main.sty
+chessboard-keys-pgf.sty and chessboard-pgf.sty. 
+Move the four .sty  in <texmf>/tex/latex/chessboard/ and update the filename
+database. Put chessboard.pdf in  doc/latex/chessboard/
+
+
+The dtx-file doesn't contain any documentation.
+So running LaTeX on it makes no sense!
+
+
+## DOCUMENTATION
+
+chessboard.pdf. There isn't a source for the documentation as it use some
+local fonts and styles.
+
+## DESCRIPTION
+
+This package offers commands to print chessboards. It can print partial boards,
+hide pieces and fields, color the boards and put various marks on the board.
+It has a lot of options to place pieces on the board. Using exotic pieces e.g. for
+fairy chess is possible.
+It can be used together with the newest version (1.4) of the skak package
+which you can find at CTAN and together with xskak.
+
+
+## REQUIREMENTS
+chessboard uses some primitives of e\TeX. It needs a recent version
+of chessfss and xkeyval. It also needs the packages xifthen, tikz, pgfcore and pgfbaseshapes (from the pgf bundle),
+and - if run with latex - pst-node (from pstricks).
+


Property changes on: trunk/Master/texmf-dist/doc/latex/chessboard/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chessboard/brett.jpg
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/chessboard/brett.jpg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/brett.jpg	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/brett.jpg	2019-06-24 21:06:01 UTC (rev 51445)

Property changes on: trunk/Master/texmf-dist/doc/latex/chessboard/brett.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.pdf	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.pdf	2019-06-24 21:06:01 UTC (rev 51445)

Property changes on: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.tex	2019-06-24 21:06:01 UTC (rev 51445)
@@ -0,0 +1,19 @@
+% latex, dvips -E, epstopdf
+\documentclass[parskip]{scrartcl}
+\usepackage[T1]{fontenc}
+\usepackage[skaknew,ps]{skak}
+\usepackage[skaknew]{chessboard}
+
+\pagestyle{empty}
+\begin{document}
+\newgame
+\chessboard[psskak,psset,pgf=false,
+            inverse]
+\ifpdf\else
+\highlight[X]{c4}
+\highlight[o]{a8}
+\highlight[O]{g1}
+\printknightmove{g8}{f6}
+BM\pnode{A}\ncline{->}{A}{BM}
+\fi
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard-skakps.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex	2019-06-24 21:06:01 UTC (rev 51445)
@@ -0,0 +1,3735 @@
+% !Mode:: "TeX:DE:UTF-8:Main"
+% -*- mode: TeX -*- -*- coding: UTF-8 -*-
+\listfiles
+\def\UFcurrentpackage{chessboard}
+\def\UFcurrentversion{1.8}
+%$Date$$Version$
+
+
+\RequirePackage{fix-cm}
+
+\documentclass[pagesize,parskip=half-,fontsize=12pt]{scrartcl}
+\usepackage[utf8]{inputenc}
+
+%% chessboard specific commands
+\usepackage[LSB1,LSB2, LSB3,LSBC2,LSBC3,LSBC4,LSBC5, T1]{fontenc}
+%\usepackage[skak-parse]{xskak}
+\usepackage{xskak}
+\usepackage{pifont}
+\usepackage{eqparbox}
+
+\newcommand\Chess[1][1cm]{\boardfont\fontsize{#1}{#1}\setboardfontsize{#1}\selectfont}
+\newcommand\Plus{\raisebox{0.5ex}{\normalfont\fontsize{1.5ex}{1.5ex}\bfseries\,+\,}}
+\newcommand\Equal{\raisebox{0.5ex}{\normalfont\fontsize{1.5ex}{1.5ex}\bfseries\,=\,}}
+
+\makeatletter
+\newcommand\Describesetkey[4]{\par\index{#1}%
+ \colorbox{yellow!50}{\makebox[\dimexpr\textwidth-2\fboxsep\relax]{\ttfamily%
+  \eqparbox{setkey}{#1=\meta{#2}}\hfill
+  \eqparbox{setexample}{%
+     \ifthenelse{\equal{#3}{}}%
+     {#1}
+     {#1={#3}}}\hfill
+  \eqparbox{setdefault}{\hfill #4}}}\par\nobreak\@afterheading}
+
+
+\newcommand\Describefillkey[4][]{\par\index{#2}%
+\makebox[0pt][r]{\scriptsize #1\hspace{1em}}%
+ \colorbox{green!25}{\makebox[\dimexpr\textwidth-2\fboxsep\relax]{\ttfamily%
+    \eqparbox{fillkey}{#2=\meta{#3}}\hfill
+    \eqparbox{fillexample}{%
+     \ifthenelse{\equal{#4}{}}%
+     {#2}
+     {#2={#4}}}}}%
+    \par\nobreak\@afterheading}
+
+
+
+\makeatother
+
+%\usepackage{filecontents} only needed after change of docu.sty
+\usepackage{UF-documentation}
+
+%initialisation
+\setchessboard{smallboard, showmover=false}
+
+
+
+\begin{document}
+\newchessgame
+\title{\packagename{chessboard}: A package to print chessboards}
+\author{Ulrike Fischer}
+\maketitle
+
+\begin{center}
+\newchessgame
+\setchessboard{shortenend=5pt,color=red,margin=false}%
+\unitlength1pt
+\newcommand\currentboard[1][]{%
+ \begin{picture}(150,150)
+ \put(10,10){\chessboard[#1]}
+ \end{picture}}%
+\begin{animateinline}[autoplay,loop]{1}%
+\currentboard
+\newframe
+\hidemoves{1.e4}%
+\currentboard[pgfstyle=straightmove,markmove=e2-e4,
+              pgfstyle=border,markfields={e2,e4}]
+\newframe
+\hidemoves{1... e5}%
+\currentboard[pgfstyle=straightmove,markmove=e7-e5,
+              pgfstyle=border,markfields={e7,e5}]
+\newframe
+\hidemoves{2. Nf3}%
+\currentboard[pgfstyle=knightmove,markmove=g1-f3,
+              pgfstyle=border,markfields={g1,f3}]
+\newframe
+\hidemoves{2... Nc6}%
+\currentboard[pgfstyle=knightmove,markmove=b8-c6,
+             pgfstyle=border,markfields={b8,c6}]
+\newframe
+\hidemoves{3.Bb5}%
+\currentboard[pgfstyle=straightmove,markmove=f1-b5,
+              pgfstyle=border,markfields={f1,b5}]
+\newframe
+\hidemoves{3... a6}%
+\currentboard[pgfstyle=straightmove,markmove=a7-a6,
+              pgfstyle=border,markfields={a7,a6}]
+\end{animateinline}
+\end{center}
+
+
+
+\tableofcontents
+\section{Changes}
+\minisec{Attention!} From version 1.5 on the documentation uses the
+(new) package \packagename{xskak} instead of \packagename{skak}. The
+most notable difference is that in some examples \cs{newchessgame}
+instead of \cs{newgame} is used. But in most cases all examples
+should work with \packagename{skak} alone too. The package
+\packagename{xskak} adds quite a lot new keys to \cs{chessboard} to
+show arbitrary positions from previously parsed games. Read its
+documentation if you want to use them.
+
+
+In version 1.3 I made a lot of changes. I tried to preserve the
+behaviour of existing keys and commands. But is possible that older
+documents will look different when processed with this version.
+
+Notably two things can give problems: The value of the
+\key{padding} key now affects much more objects (marks) in the pgf
+pictures. So it could be necessary to reset the padding. And the
+\key{applycolor} has changed its behaviour. It will now also affect
+the foreground picture.
+
+\begin{description}
+\item[2019-06-23 (Version 1.8)] Uploaded the source of the documentation to ctan.
+  No longer use \cs{arabic} internally, to avoid problems with packages redefining the command. (Issue \#1).
+  
+\item[2011-03-17 (Version 1.7)] Changed definition of the triangle mover
+    style. It now uses \packagename{tikz} and no longer
+    \packagename{amssymb}. \packagename{chessboard} no longer loads
+    \packagename{amssymb} (it clashes with \packagename{xunicode}).
+
+\item[2011-03-13 (Version 1.7)] Corrected a bug with spacing when the
+    \packagename{amsart} is used.
+
+
+\item[2008-11-27 (Version 1.6)] Corrected a bug in \key{getpiecelists}
+(empty lists were undefined).
+
+
+\item[2007-12-11 (Version 1.5)] Added the key \key{getpiecelists} to
+retrieve the positions of pieces. Quite a lot new keys to show
+arbitrary positions from previously parsed games are added by the
+package \packagename{xskak}. Read its documentation if you want to
+use them.
+
+\item[2007-08-20 (Version 1.5)] Added curvemove-style to draw moves.
+Corrected some bugs. Changed a lot internally to adapt the package to
+\packagename{xskak.sty}.
+
+\item[2007-07-03 (Version 1.4)] Rewrote the code that process the
+keys saved globally (with \cs{chessboard}) and  in styles (with
+\cs{storechessboardstyle}) to go around a problem due to a change in
+\packagename{xkeyval 2.5}. Corrected some errors in the
+documentation.
+\item[2006-07-20 (Version 1.3)] Rearranged and rewrote the keys and commands for
+the pgf-pictures. Now all styles and marks can be used in both
+pictures. Added definitions for partial borders. Extended trim and
+clip commands. \packagename{xifthen} is now required.
+\item[2006-06-22] Added keys for fancy borders, added local commands for
+the boardarea and the printarea. Disabled the option skaknew as it
+not longer works in \chessfss.
+\end{description}
+
+
+
+
+\section{Introduction}
+\minisec{What is 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:
+\begin{itemize}
+\item To print a special position one always has to type the
+complete FEN.
+\item It frames all boards with a  rule of 1pt -- which is okay
+for a large board but doesn't look good on small boards.
+\item It's difficult (up to impossible) to color some squares.
+\item Even for simple markings like crosses or the mover \skaksty use
+postscript. That makes it difficult to use pdf\LaTeX.
+\item It's difficult to print partial boards.
+\item It's difficult (up to impossible) to print boards with exotic
+pieces e.g.\ fairy chess.
+\item It's impossible to print boards with unusual dimension or unusual labels used by other games e.g.\
+10\texttimes10 boards with numbers instead of characters.
+\item The labels at the bottom changes the baseline which makes it
+difficult to align boards.
+\item Some commands e.g., \cs{notationoff} of  \skaksty redefines \cs{skakboard}, so it
+is difficult to patch the command e.g.\ to get larger margins.
+\end{itemize}
+
+
+With \pchessboard you have now full control about size, content and
+look of the board. I have tried to make \cs{chessboard} as flexible
+as possible. So I added a lot of options to change values that
+control the size, layout and filling of the board. In most cases you
+can ignore them but being able to change them can come handy if you
+need something unusual.
+
+But I didn't tried to stretch flexibility too much. The main aim of
+the package is to print chessboards easily, so e.g.\ the inputs use
+the naming conventions of chess. That means that -- as the files are
+numbered alphabetically -- the width of the board is restricted to 26
+fields (27 with option \key{zero}). The board is build with
+alternating black and white fields, changing to e.g.\ three colors
+could be difficult. The pieces are named with simple ASCII-chars, so
+the number of different pieces is restricted. (It is perhaps possible
+to define piecenames consisting of two or more chars, and to use such
+names by putting braces around the chars e.g.,
+\verb+{KK}a3+.  A small test worked fine for me, but I wouldn't bet
+that it really works everywhere.)
+
+\minisec{What it doesn't} \Pchessboard doesn't offer commands to type
+captions or titles or a list of the chessboards. There are no options
+that control the placement of the board in the text flow, e.g. to
+center it or to let it float. This is a design decision.
+\cs{chessboard} prints only chessboards like \cs{includegraphics}
+inserts only graphics.
+
+
+
+\subsection{Bugs and errors}
+
+I'm quite sure that they are bugs and errors in the package. I did
+find some quite horrible while making the documentation and I'm sure
+I overlooked some. E.g.\ I have a lot of doubts if spaces and braces
+in keys saved in a style or with \cs{setchessboard} are handled
+correctly in every case.
+
+If you have questions ask them in the newsgroups
+\nolinkurl{comp.text.tex} or
+\nolinkurl{de.comp.text.tex}. I'm reading these groups regularly and
+I'm much better in answering there than in answering e-mails.
+
+
+If you find errors in this text  (this includes wrong english) or in
+the package, you can write me a bugreport at
+\nolinkurl{skak at nililand.de}. A bugreport should contain a complete \emph{minimal}
+example and the log-file of the pdf\LaTeX\ run (this is the engine
+that makes a pdf!).
+
+Before sending a bug record check the following things:
+
+
+\minisec{If you get mysterious error messages}
+\begin{itemize}
+\item  Check the commas in the \keylists.
+\end{itemize}
+
+\minisec{Missing or faulty pgf-decorations}
+\begin{itemize}
+\item Check if the borders or marks are hidden under other decorations or under board chars with solid fieldmasks.
+\item Check if trimming is responsible: try the key \verb+trim=false+.
+\item Check the state of the key \key{pgf}.
+\item Try another previewer, zoom in and out, print the document.
+\item Go through your log-file and search for chessboard warnings.
+\end{itemize}
+
+
+\subsection{Requirements}
+
+\Pchessboard uses some primitives of e\TeX. It needs a recent version
+of \chessfss (chess font selection), \packagename{xkeyval}
+(\textit{key=value}-syntax) and \packagename{xifthen}. It also needs
+the packages \packagename{pgfcore}, \packagename{pgfbaseshapes} (from
+pgf for the highlighting commands), \packagename{pst-node} (from
+pstricks).
+
+
+\subsection{Installation}
+Run \filetype{chessboard.ins} through \LaTeX\ and then put the four
+\filetype{.sty}-files somewhere where \LaTeX\ finds them.
+\path{<texmf>/tex/latex/chessboard/} is a good place. Update the
+filename database.
+
+\subsection{Robustness: using \texorpdfstring{\cs{chessboard}}{\textbackslash chessboard} in moving arguments}
+I have used \cs{chessboard} in tabulars and in moving arguments. It
+seems to work fine, so I would say the command is quite robust.
+
+Putting chessboards in the table of contents or the header will in
+most case not look very good, so it is sensible to avoid it with
+\lstinline+\section[short text]{\chessboard Title}+.
+But if you want to do some advices:
+\begin{itemize}
+\item
+Boards in the title and in the table of contents are built at different times during the run, when perhaps
+different options and different games are active, so they can look
+different if you are not careful.
+\item You can't put boards in the bookmarks of a pdf, use
+\verb+\texorpdfstring+ from \packagename{hyperref} to provide a
+replacement.
+\item Some pagestyles puts a command to uppercase around the header.
+This affects keys in the optional argument of \cs{chessboard} and
+will give error messages about undefined keys. Try to surround the
+\cs{chessboard} command with \cs{lowercase}\verb+{...}+.
+\end{itemize}
+
+
+
+\subsection{Setting the options}
+
+\Pchessboard use the keyval syntax \meta{key}\texttt{=}\meta{value}.
+
+It differs in some respects to other packages with keyval syntax:
+\mynobreakpar
+\begin{itemize}
+\item
+There are really \emph{very} much keys.
+\item
+Some keys don't set properties of a board (like a width) but
+\emph{do} things like drawing.
+\item
+The order of the keys can matter.
+\item
+Some effects are achieved by using two or more keys after one other.
+\end{itemize}
+
+There are keys that need a certain type of argument, e.g.\ a length
+or a list of fields.  There are boolean keys that accept only the
+values \texttt{=true} and \texttt{=false} where the value
+\texttt{=true} can always be omitted. And at last there are keys
+that works as \emph{commands}, you can use whatever argument you want
+or leave it blank. Don't confound this commands with boolean keys.
+E.g.\
+\texttt{clearboard}, \texttt{clearboard=hallo} and even
+\texttt{clearboard=false} will always clear the board.
+
+
+I'm struggling permanently with the naming of the keys. Giving them
+names that are not to long, but descriptive and a bit systematic
+isn't easy. Also it isn't easy to decide if a special effect should
+be achieve with one key (which gives a short input) or with a
+combination of keys (with is more flexible as it can be used to
+implement similar effects but gives longer input). While the package
+evolved I sometimes tumbled in problems and inconsistencies of the
+current naming scheme and had to reconsider my decisions and
+implemented better names or new key combinations. I didn't delete or
+disable older, now perhaps obsolate keys in any case, as I wanted to
+avoid that older documents breaks.  I also sometimes add a key that
+is simply a copy of an existing key only to get a more consistent
+naming. So ist quite possible that you can get the same result with
+different key combination. For a lot of things there isn't one
+correct way -- you can choose the one which suits you more.
+
+
+It's easy to make mistakes when using a lot of keys. So if you get
+mysterious errors check that you don't have forgot a comma between
+the keys, that you put braces around lists used as value, that you
+didn't use a backslash before a key, that you didn't used a list of
+fields when a list of pieces is requested.
+
+
+\DescribeMacro{\setchessboard} You can set an option either for one
+board by using the optional argument of \cs{chessboard} or by using
+\cs{setchessboard}\keymarg{} which sets the keys for all following
+boards in the same environment/group.
+
+\begin{LTXexample}
+Default setting in this Dokumentation:
+\setchessboard{
+      smallboard,
+      showmover=false}
+\newchessgame
+\chessboard
+\end{LTXexample}
+
+Even if they share the same name, keys used in the argument of
+\cs{chessboard} are implementated differently than the keys used in
+\cs{setchessboard}. They do different things: In the first case the
+key gets «executed» while in the second case the \keyvalue pair is
+only stored for later use. So it is quite possible that a key works
+with \cs{chessboard} but fails because of a bug when used in
+\cs{setchessboard} or vice-versa.
+
+
+Values set by keys in the argument of \cs{chessboard} will if
+appropriate overwrite the ones set by \cs{setchessboard}.
+
+The keys belong roughly to two classes: There are the keys that set
+one property of the board, e.g.\ the width of a rule or the size.
+Such keys always have a default and only the last value set is used,
+it overwrites all previous values. Internally I call such keys
+«set-keys». In the second class there are keys that can be used more
+than once, e.g.\ keys that add a piece or a mark or a color to the
+board. I call such keys «fill-keys».\footnote{I did realize only
+quite late that using keys not only to set some parameters but also
+for the real content is a bit unusual. It is a bit as if one would
+use keys for the items of a list or the lines of tabular or the code
+in a listing -- in most cases quite a bad idea. But at my opinion it
+works fine in this special case because a chessboard is a quite
+restricted room with only 64 fields.}
+
+
+The «set-keys» are always processed first. Inside the classes the
+keys are processed in general from «left to right», so later keys can
+overwrite values set by earlier keys. This is also true for values
+hidden in a \key{style}.
+
+
+
+
+
+
+For each «set-key» you will find in this documentation a box like
+this:
+
+\Describesetkey{zero}{true|false}{false, zero}{false}
+
+
+It shows on the left the general description of the possible values,
+in the middle one or more examples of correct input, and on the
+right the default value.
+
+For each «fill-key» you will find in this documentation a box like
+this:
+
+\Describefillkey{clearranks}{list of ranks}{8}
+
+It shows on the left the general description of the possible values
+and on the right one or more examples of correct input.
+
+
+
+\subsection{Saving optionlists}
+
+\Describefillkey{style}{name}{mystyle}
+
+\DescribeMacro{\storechessboardstyle} With the
+\cs{storechessboardstyle}\marg{name}\keymarg{} it is possible to
+store a list of \keyvalue-pairs in a «style» and to use this style
+instead of the keys themselves.
+
+\begin{LTXexample}
+\storechessboardstyle{10x10}{%
+ maxfield=j10,
+ clearboard,
+ startfen=b9,
+ restorefen=current,
+ labelleftwidth=1.5ex}
+
+\storechessboardstyle{red-yellow}{%
+ boardfontencoding=LSBC3,
+  whitepiececolor=red,
+  blackpiececolor=yellow,
+  setfontcolors}
+
+\setchessboard{style=red-yellow}
+\newchessgame
+\chessboard
+
+\chessboard[style=10x10]
+\end{LTXexample}
+
+\minisec{Attention} \cs{storechessboardstyle} and \cs{setchessboard}
+only store the \keyvalue pair, they don't expand anything and they
+don't do anything with them. So be careful when using commands that
+could be redefined later:
+
+\begin{LTXexample}
+\def\mylist{Ke1, qe2, kf3}
+\setchessboard{setpieces=\mylist}
+\def\mylist{Ke1, ra1, ke3}
+\chessboard
+\end{LTXexample}
+
+
+
+
+
+\subsection{Naming the board}
+
+In chess the rows of the board are called \emph{ranks} and are
+numbered from 1 to 8. The columns are called \emph{files} and are
+«numbered» from a to h.\footnote{%
+I have some difficulties to remember the english names, so I use the
+following mnemonics:
+\textbf{F}i\textbf{L}e = co\textbf{L}umn = \textbf{L}inie =
+al\textbf{F}abet,
+\textbf{R}ank = \textbf{R}ow = \textbf{R}eihe = numbe\textbf{R}ed}
+
+\Pchessboard use this naming conventions for all inputs:
+Every time \meta{field} is used in this documentation, you should
+give a char from a--z followed by a number.
+
+
+\subsection{Naming areas of the board}
+
+Rectangular areas are normally described by giving the coordinates
+of the left bottom corner and the right upper corner. But when using
+the Forsyth Edwards Notation (FEN) chessboards are filled starting
+from the left upper corner a8 and then going on to the right and
+down to the right bottom corner -- like the normal typesetting
+direction. So it is quite natural to use for FEN related areas this
+corners. As it would be awkward to have two different ways to
+describe areas, I decided to use the fen convention everywhere: Each
+area has a
+\emph{startfield}, the left upper corner, and a \emph{stopfield},
+the right bottom corner. If some area related keys  don't seem to
+work, check that you have used the correct corners!
+
+
+An area can also be given as two fields separated by an hyphen. When
+using this input you don't have to worry about the corners, the
+package will sort them:\\
+\meta{area}=\meta{a corner}-\meta{the opposite corner}.
+
+
+\DescribeMacro{\printarea} \DescribeMacro{\board} \cs{chessboard}
+sets at the start this two command to the current values of the
+printarea and the total board as given by the keys \key{zero},
+\key{maxfield} and \key{printarea}. You can use this commands in
+later keys.
+
+
+\subsection{FEN: Forsyth-Edwards Notation}\label{sec:FEN}
+
+FEN describes a chess position. It consist of 6 fields, separated by
+spaces. The first field represents the placement of the pieces on
+the board. The second field represents the active color.  A lower
+case «w» is used if White is to move; a lower case «b» is used if
+Black is the active player. The third field represents castling
+availability. The fourth field is the en passant target square. The
+fifth field is a nonnegative integer representing the halfmove
+clock. The sixth and last field is a positive integer that gives the
+fullmove number.
+
+In the first field the board contents are specified starting with
+the eighth rank and ending with the first rank («in typesetting
+direction» when the board has the standard orientation). For each
+rank, the squares are specified from file a to file h. White pieces
+are identified by uppercase piece letters («\texttt{PNBRQK}») and
+black pieces are identified by lowercase  piece letters
+(«\texttt{pnbrqk}»). Empty squares are represented by the digits one
+through eight; the digit used represents the count of contiguous
+empty squares along a rank. A solidus character «\texttt{/}» is used
+to separate data of adjacent ranks.
+
+\cs{chessboard} handles FEN-input but also only «FEN-like»-input. If
+given a complete FEN \cs{chessboard} will store all fields in
+commands and evaluate the first field to fill the board. But if they
+are less than six fields, \cs{chessboard} will not complain but
+simply fill up the missing fields with some default values.
+
+In the first field there don't need to be exact 8 pieces in each rank
+and exactly 8 rank descriptions. When there are more pieces than
+needed, \cs{chessboard} will ignore them. When there are less pieces
+than needed then \cs{chessboard} will leave the remaining fields in
+this rank untouched.
+
+
+The FEN can also be stored in a command. So all \cs{chessboard} will
+accept all the following inputs as \meta{FEN}:
+
+{\ttfamily
+ rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\\
+ rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR \\
+ 8qK\\
+ 10 w - - 0 10}\\
+ \verb+\myfen+
+
+\subsection{The main parts of the board}
+Each chessboard is build by printing three «layers» on top of each
+other:
+
+\minisec{1. The background layer}
+
+This is a pgf-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
+%will be described in the section about decorating the background.
+
+%\minisec{2. The (four) font layers}
+\minisec{2. The main board layer}
+This is the main part of the board. It lies above the background
+picture. It uses only «normal» \LaTeX\ objects like rules and chars.
+Labels, movers and figures are all build together in this layer.
+
+\minisec{3. The mark layer}
+
+This layer is again a pgf 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.
+
+
+
+
+
+
+\section{Setting the contents of the board}\label{startmain}
+
+\subsection{The maximum number of fields}
+\Describesetkey{maxfield}{field}{j10}{h8}%
+Chessboards have 8\texttimes8 fields. So this is the default. If you
+want another size you should declare a new right upper corner  with
+\key{maxfield=}\meta{Field} e.g., \key{maxfield=j10} for a 10\texttimes10 board.
+Don't use this key if you want only to print a partial board, there
+is another key to achieve this. Use it to change the maximum size
+of a board. All fields and areas you use in other arguments should lie inside this maximum size.
+
+\begin{LTXexample}
+\newchessgame
+\chessboard[tinyboard,
+            maxfield=f6]
+\end{LTXexample}
+
+
+\begin{LTXexample}
+\newchessgame
+\chessboard[tinyboard,
+            maxfield=j10,
+            labelleftwidth=2ex]
+\end{LTXexample}
+
+\Describesetkey{zero}{true|false}{false}{false}%
+I was told that some games numbers the fields starting with 0. So I
+added this option. When set to true the rank numbers start with 0 and
+a file named Z is added left to the file a.
+
+\begin{LTXexample}
+\newchessgame
+\chessboard[zero,
+            labelbottomformat=\arabic{filelabel},
+            addpieces={KZ0, QZ8}]
+\end{LTXexample}
+
+
+\subsection{Filling with \skaksty}
+When \skaksty is loaded and there is a running game, \cs{chessboard}
+will fill the board with the current position.
+
+\begin{LTXexample}
+\newchessgame
+\mainline{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6}
+\chessboard
+\end{LTXexample}
+
+\subsection{Clearing}
+\Describefillkey{clearboard}{arbitrary}{}
+\Describefillkey{cleararea}{area}{a1-c3}
+\Describefillkey{clearareas}{list of areas}{\{a1-c3,g7-h8\}}
+\Describefillkey{clearfile}{file}{g}
+\Describefillkey{clearfiles}{list of files}{\{g,h\}}
+\Describefillkey{clearrank}{rank}{5}
+\Describefillkey{clearranks}{list of ranks}{\{8,7\}}
+\Describefillkey{clearfield}{field}{c6}
+\Describefillkey{clearfields}{list of fields}{\{b5,c6\}}
+
+You can't prevent that \cs{chessboard}  fills up the board with the
+running game, so if you need an empty board, you should clear it --
+either with the keys mentioned here, or by using one of the  keys
+described later that clears the board before adding new pieces.
+
+\begin{LTXexample}
+\newchessgame
+\mainline{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6}
+\def\ranklist{7 ,6 }
+\def\cleararea{a1-b2}
+\chessboard[clearfiles=g,
+            clearranks=\ranklist,
+            cleararea=\cleararea,
+            clearfields={b5,c6}]
+\end{LTXexample}
+
+
+\subsection{Adding single pieces}
+
+\Describefillkey{setpieces}{List of piece positions}{\{Ke4, Qe1, kd6\}}%
+\Describefillkey{addpieces}{List of piece positions}{\{Ke4, Qe1, kd6\}}%
+
+The \key{setpieces} first clears the board and then set the pieces,
+the \key{addpieces} only set the new pieces but lets the existing
+pieces undisturbed.
+
+\begin{LTXexample}
+\newchessgame
+\mainline{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6}
+\def\piecelist{Ke1,Qd1 , Rg1}
+\chessboard[setpieces={ra1, rh8, ke8},
+            addpieces=\piecelist]
+\end{LTXexample}
+
+\Describefillkey{setwhite}{List of piece positions}{\{Ke4, Qe1, kd6\}}
+\Describefillkey{addwhite}{List of piece positions}{\{Ke4, Qe1, kd6\}}
+\Describefillkey{setblack}{List of piece positions}{\{Ke4, Qe1, kd6\}}
+\Describefillkey{addblack}{List of piece positions}{\{Ke4, Qe1, kd6\}}
+
+It is a bit cumbersome to have to be careful to use uppercase chars
+for the white and lowercase chars for the black piece. With the keys
+\key{setwhite}, \key{addwhite}, \key{setblack} and \key{addblack}
+you can add white and black pieces
+without caring about the cases. Like the keys for adding pieces, the
+keys starting with \key{set} first clears the board, so if you don't
+want to loose all the set pieces, you should use such a key only
+once.
+
+\begin{LTXexample}
+\def\whitepieces{kc3, nc2, pa2, Pd4}
+\chessboard[setwhite=\whitepieces,
+            addblack={Kc8,bh7, pa7}]
+\end{LTXexample}
+
+
+\subsection{Adding FEN-positions}
+
+
+\Describefillkey{setfen}{FEN}{\string\myfen, rnbqk/8/RNBQK}
+\Describefillkey{addfen}{FEN}{\string\myfen, rnbqk/8/RNBQK}
+
+With this keys you can add pieces to the board by given a FEN. The
+\key{setfen} will clear the board, \key{addfen} will left pieces
+outside the fields described by the FEN undisturbed.
+
+\begin{LTXexample}
+\newchessgame
+\def\myfen{KK//KK}
+\chessboard[addfen=\myfen]
+\end{LTXexample}
+
+\Describefillkey{startfen}{field}{b7}%
+
+As a default \cs{chessboard} fills the board with a FEN-position
+starting at the left upper corner. You can shift this start field
+with the key \key{startfen}.
+
+\begin{LTXexample}
+\newchessgame
+\def\myfen{KK//KK}
+\chessboard[startfen=c7, addfen=KK//KK,
+            startfen=f3, addfen=\myfen]
+\end{LTXexample}
+
+
+\Describefillkey{startfill}{field}{b7}
+\Describefillkey{stopfill}{field}{f2}
+\Describefillkey{fillarea}{area}{c2-d4}
+
+With this keys you can restrict the part of the board that is filled
+by a FEN. Only the pieces inside the fillarea are set.
+
+\begin{LTXexample}
+\newchessgame
+\def\myfen{kqrb///KQRB}
+\chessboard[setfen=\myfen, startfen=e4, fillarea=f2-g4, addfen=\myfen]
+\end{LTXexample}
+
+\subsection{Saving positions}
+\Skaksty has the command \cs{storegame}\marg{name} that stores the
+FEN of the current game in an internal command, and the command
+\cs{savegame}\marg{name} that stores the FEN in a file
+\marg{name}\filetype{.fen}
+
+\Pchessboard defines similar keys. The key \key{storefen}=\meta{name}
+stores the FEN in an internal command \emph{with the same name} as
+used by \cs{storegame}\marg{name}. That means that you can exchange
+the games stored by \skaksty and \pchessboard, but it also means that
+\pchessboard can \emph{overwrite} games stored with \skaksty. So be
+careful!
+
+\medskip
+\Describefillkey{storefen}{name}{game1}
+\Describefillkey{savefen}{name of file}{game}
+
+\key{storefen} saves the current position as FEN to a internal command.
+\key{savefen} saves the current position as FEN to a file.
+
+\medskip
+\Describefillkey{startstore}{field}{b7}
+\Describefillkey{stopstore}{field}{f2}
+\Describefillkey{storearea}{area}{c2-d4}
+
+With this keys you can restrict the area that is stored or saved. But
+attention: \skaksty absolutly doesn't like «illegal» FENs that
+doesn't describe a full 8\texttimes8 board.
+
+\medskip
+\Describefillkey{mover}{w|b}{w}
+\Describefillkey{castling}{castling possibilies}{Kq}
+\Describefillkey{enpassant}{field|-}{c4}
+\Describefillkey{halfmove}{number}{14}
+\Describefillkey{fullmove}{number}{20}
+
+With this keys you can set the rest of the FEN-fields. Apart from
+\key{mover} the values are only used if you save FENs. The values
+are also set, if you use in the argument of a
+\key{setfen} or \key{addfen} key complete FENs instead of only the position part.
+
+\subsection{Getting the positions of pieces}
+
+\Describefillkey{getpiecelists}{}{}
+
+New in version 1.5 there is a key, that retrieves the position of the
+pieces on the board. For each piece type there is a list called
+\cs{cblist}\meta{piece}.\index{cblists=\verb!*+\cblist+\meta{piece}}.
+The lists can be used everywhere where a list of fields is expected.
+E.g. it is possible to use the lists to highlight all pawns (see
+section \ref{sec:drawfields}).
+
+Unlike almost all other commands of \packagename{chessboard} this
+commands are saved globally. This makes it possible to use the lists
+after the board:
+
+\begin{LTXexample}
+ \newchessgame
+ \chessboard[getpiecelists]
+
+ White pieces: \king\cblistK, \queen\cblistQ,
+               \rook\cblistR, \bishop\cblistB,
+               \knight\cblistN, \pawn\cblistP.
+
+ Black pieces: \king\cblistk, \queen\cblistq,
+               \rook\cblistr, \bishop\cblistb,
+               \knight\cblistn, \pawn\cblistp.
+\end{LTXexample}
+
+
+\subsection{Using saved and stored games}
+
+When you are using \skaksty, you can use the saved games to set the
+start position of a game with the \skaksty-commands
+\cs{restoregame}\marg{name} (restores the game stored with
+\cs{storegame}) and \cs{loadgame}\marg{name} (loads the game saved
+with \cs{savegame}). This only works if you have saved the position
+of a normal 8\texttimes8-board!
+
+
+
+\medskip
+\Describefillkey{restorefen}{name}{game1}
+\Describefillkey{loadfen}{name}{game}
+
+You can also use the saved games to set positions on \cs{chessboard}.
+\key{restorefen} will use games saved with \cs{storegame} and
+\key{storefen}, \key{loadfen} will load games saved with
+\cs{savegame} and \key{savefen}.
+
+
+
+
+\begin{LTXexample}
+\newchessgame
+\def\gamename{rank7}
+\chessboard[storearea=a7-h7, storefen=\gamename,
+            startfen=a5, restorefen=rank7]
+\end{LTXexample}
+\begin{LTXexample}
+\mainline{1. e4 e5}
+\savegame{file} % to file.fen
+\mainline{2. Nf3 Nf6}
+\def\filename{file}
+\chessboard[loadfen=\filename]
+\end{LTXexample}
+
+\subsection{Restoring the running game}
+
+\cs{chessboard} saves the running game at the start under the name
+«current».
+
+\begin{LTXexample}
+\newchessgame
+\mainline{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6}
+
+\chessboard[maxfield=j10,
+            clearboard,
+            startfen=b9,
+            restorefen=current]
+\end{LTXexample}
+
+
+\subsection{Changing the input language}
+
+\Describefillkey{language}{name}{german}
+\DescribeMacro{\cbDefineLanguage}
+\DescribeMacro{\cbDefineTranslation} With this key you can change the
+language used for input of pieces. The key doesn't affect the input
+language of \skaksty. It also doesn't affect the language of saved
+and restored games. \cs{chessboard} will always switch to english in
+this cases! Up to now only german translations are built in (I don't
+know how chess pieces are called in other languages), but it isn't
+difficult to add other languages. The code for german should be quite
+selfexplanatory:
+
+\begin{lstlisting}
+\cbDefineLanguage{german}%
+\cbDefineTranslation{german}{K}{K}%
+\cbDefineTranslation{german}{Q}{D}%
+\cbDefineTranslation{german}{R}{T}%
+\cbDefineTranslation{german}{B}{L}%
+\cbDefineTranslation{german}{N}{S}%
+\cbDefineTranslation{german}{P}{B}%
+\cbDefineTranslation{german}{k}{k}%
+\cbDefineTranslation{german}{q}{d}%
+\cbDefineTranslation{german}{r}{t}%
+\cbDefineTranslation{german}{b}{l}%
+\cbDefineTranslation{german}{n}{s}%
+\cbDefineTranslation{german}{p}{b}%
+\end{lstlisting}
+
+You can mix the languages in the input (but I don't think you should
+do it, it can get quite confusing, it's better to stick to one
+language).
+
+\begin{LTXexample}
+\def\whitepieces{lc4, sg1}
+\chessboard[setpieces={qd8, ra8, bh8},
+            language=german,
+            addpieces={Da1, Th4},
+            addwhite=\whitepieces,
+            addblack={Bb7}]
+\end{LTXexample}
+
+\section{The look of the board}
+
+\subsection{Units for  lengths}
+
+For many of the following commands you will have to enter a length.
+This can be an absolute length like 1in, 2cm, 4pt. But often you will
+prefer a relative length. In most cases the font related length 1ex,
+1em and \cs{baselineskip} will be the same as a half of the square
+width, the width of the square and the total height of a
+square.\footnote{I learned on the hard way that you shouldn't rely
+that fonts sets em and ex correctly, e.g.\ the font
+\chessfontname{skak} doesn't do it and so the units default to zero
+which can be quite confusing. So I decided to set the fontdimen
+values explicitly.} The package uses internally the three lengths
+offered by \chessfss\ -- \cs{len at cfss@squarewidth},
+\cs{len at cfss@squaretotalheight} and \cs{len at cfss@squaredepth} --. In
+most cases they will only give inside \cs{chessboard} (locally) the
+correct sizes, but if you use the key \key{psset} they are set
+globally.
+
+
+\subsection{Some words about box sizes}
+
+In \TeX\ almost everything is either a box (a character box, a line
+box, a page box, a box with a tabular in it~\ldots) or a space. And
+larger objects are build by putting boxes and spaces in a surrounding
+box. In the real world a box has always to be larger as its content.
+In the virtual
+\TeX-world a lot of magic is possible: The content can be much larger
+than the surrounding box or even be partly or completely outside the
+surrounding box.
+
+
+\begin{LTXexample}
+x% shows the current line
+\fbox{% a box
+\raisebox{3ex}[0pt][0pt]{%
+    \makebox[0pt]{%
+    large content outside the box}}}%
+x% and here something after the fbox
+\end{LTXexample}
+
+So the outside size of a box can be quite different from the inside
+size. And the outside baseline of a box can be at quite different
+place as the inside baseline.
+
+In the concrete case of \cs{chessboard} the outside size of the board
+is determined through the size of the font, the fields shown and the
+margin. All other things like border, label, highlighting, mover will
+not affect this size. The baseline of a chess board is always at the
+bottom of the bottom rank. Margins, labels or borders or anything
+else will not change this. If you want to move the baseline you will
+have to use a \cs{raisebox}.
+
+
+\subsection{Margins}
+
+The «outside size» («the bounding box») of a chess board is the size
+of the printed fields plus a margin.
+
+\medskip
+\Describesetkey{marginleftwidth}{length}{1em}{1em}
+\Describesetkey{marginrightwidth}{length}{1em}{1em}\goodbreak
+\Describesetkey{margintopwidth}{length}{1em}{1em}\goodbreak
+\Describesetkey{marginbottomwidth}{length}{1em}{1em}\goodbreak
+\Describesetkey{hmarginwidth}{length}{1em}{1em}\goodbreak
+\Describesetkey{vmarginwidth}{length}{1em}{1em}\goodbreak
+\Describesetkey{marginwidth}{length}{1em}{1em}
+
+
+With this keys you can set and change the thickness of the margin. As
+you can see you can set each margin differently, but there are also
+keys to set more than one margin at one time.
+
+
+
+
+\medskip
+\Describesetkey{marginleft}{true|false}{}{true}
+\Describesetkey{marginright}{true|false}{false}{true}\goodbreak
+\Describesetkey{margintop}{true|false}{}{true}\goodbreak
+\Describesetkey{marginbottom}{true|false}{}{true}\goodbreak
+\Describesetkey{hmargin}{true|false}{}{true}\goodbreak
+\Describesetkey{vmargin}{true|false}{}{true}\goodbreak
+\Describesetkey{margin}{true|false}{}{true}
+
+You can disable the margin either by setting its width to 0pt or with
+this boolean keys.
+
+\goodbreak
+\begin{LTXexample}
+x\fbox{\chessboard[printarea=a1-a1,
+                   marginwidth=0pt]}
+
+x\fbox{\chessboard[printarea=a1-a1,
+                  marginwidth=0.5cm]}
+
+x\fbox{\chessboard[printarea=a1-a1,
+                  marginwidth=0.5cm,
+                  margin=false]}
+\end{LTXexample}
+
+\goodbreak
+\subsection{Borders}
+
+The borders are made with rules. You will perhaps notice that on
+screen the edges looks like as if they don't contact properly. This
+is a  problem of the rather bad resolution of a screen. When you zoom
+in you can see that the edges are fine. If this bothers you, you can
+try the fancy borders made with the pgf-commands decribed later. As
+they are made with one line, they seem to have better edges -- but
+you can't color them individually and it isn't yet possible to
+disable the borders of single sides.
+
+\Describesetkey{borderleftwidth}{length}{1em}{0.04em}
+\Describesetkey{borderrightwidth}{length}{1em}{0.04em}
+\Describesetkey{bordertopwidth}{length}{1em}{0.04em}
+\Describesetkey{borderbottomwidth}{length}{1em}{0.04em}
+\Describesetkey{hborderwidth}{length}{1em}{0.04em}
+\Describesetkey{vborderwidth}{length}{1em}{0.04em}
+\Describesetkey{borderwidth}{length}{1em}{0.04em}
+
+
+With this keys you can set and change the thickness of the border.
+The border doesn't change the bounding box of the board. If there
+isn't an adequate margin it will stick outside!
+
+\medskip
+\Describesetkey{borderleft}{true|false}{}{true}
+\Describesetkey{borderright}{true|false}{false}{true}
+\Describesetkey{bordertop}{true|false}{}{true}
+\Describesetkey{borderbottom}{true|false}{}{true}
+\Describesetkey{hborder}{true|false}{}{true}
+\Describesetkey{vborder}{true|false}{}{true}
+\Describesetkey{border}{true|false}{}{true}
+
+You can disable the border either by setting its width to 0pt or with
+this boolean keys.
+
+
+\medskip
+\Describesetkey{borderleftcolor}{color}{red}{black}
+\Describesetkey{borderrightcolor}{color}{red}{black}
+\Describesetkey{bordertopcolor}{color}{red}{black}
+\Describesetkey{borderbottomcolor}{color}{red}{black}
+\Describesetkey{hbordercolor}{color}{red}{black}
+\Describesetkey{vbordercolor}{color}{red}{black}
+\Describesetkey{bordercolor}{color}{red}{black}
+
+With this keys you can set and change the color of the border.
+
+{\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}
+
+\begin{LTXexample}
+\raggedright
+some text above the board\\
+the board will overwrite this!\\
+left%
+\def\borderwidth{12pt}
+\def\mycolor{red!50}
+\chessboard[tinyboard,
+            marginleftwidth=1em,
+            margintopwidth=0pt,
+            bordertopwidth=\borderwidth,
+            borderleftcolor=\mycolor,
+            bordertopcolor=yellow!25,
+            marginright=false]%
+right\\
+text below the board
+\end{LTXexample}
+
+
+\subsection{The size of the boardfont}
+
+\Describesetkey{boardfontsize}{length}{10pt}{20pt}
+\Describesetkey{fontsize}{length}{10pt}{20pt}
+\Describesetkey{tinyboard}{arbitrary}{}{}
+\Describesetkey{smallboard}{arbitrary}{}{}
+\Describesetkey{normalboard}{arbitrary}{}{default}
+\Describesetkey{largeboard}{arbitrary}{}{}
+
+With this keys you can change the size of the board font. The keys
+\key{tinyboard} etc.\ gives the same sizes as the similar commands
+\cs{tinyboard} of \skaksty, they also change the size of the font of
+the labels.
+
+You can also change the size of the board font with the commands
+described in the documentation of \chessfss. But you should be aware
+that the keys used in \cs{setchessboard} or \cs{chessboard} will
+always win over the commands from \chessfss.
+
+
+\subsection{Changing the boardfont}
+
+Instead of using the keys described below you can also change the
+board font with the commands described in the documentation of
+\chessfss. But you should be aware that the keys used in
+\cs{setchessboard} or \cs{chessboard} will always win over the
+commands from \chessfss.
+
+
+\Describesetkey{boardfontfamily}{family name}{maya}{skak/skaknew}
+
+With the above key you can change the board font by setting the
+family. This works quite similar as for text font where you can
+switch e.g. from times to helvetica by changing the font family. The
+font families
+\chessfontname{skak} and \chessfontname{skaknew} will work from the
+start. You must install other families before being able to use them!
+
+\begin{LTXexample}
+\chessboard[boardfontfamily=maya]
+\end{LTXexample}
+
+\goodbreak
+\Describesetkey{boardfontseries}{series name}{b}{}
+
+Setting the series  to bold (b) only works for a quite small set of
+fonts which have the chars in two weights. But to tell the truth: I
+don't find the result very satisfying.
+
+
+There are no keys to change the shape of the font as I really don't
+know what an italic (\cs{itshape}) or slanted board font should be.
+(And I never saw such a font).
+
+
+\begin{LTXexample}
+\newchessgame
+\chessboard[boardfontfamily=millennia,
+            tinyboard]
+\chessboard[boardfontfamily=millennia,
+            boardfontseries=b,
+            tinyboard]
+
+\end{LTXexample}
+
+
+
+\Describesetkey{boardfontencoding}{encoding}{LSB1}{LSB}
+
+
+With this key you can change the encoding of the board font. While in
+a normal document you probably seldom or never need to bother with
+encodings they are highly useful in connection chess board if you
+want to add colors to the chars on the board. When using other
+encodings that the standard LSB the chars on the board are composed
+with special chars that allows to color e.g. the lines of the black
+field differently to the figure on the field. I will come back to
+this when I describe how to color the chars.
+
+There are simple encodings called LSB, LSB1, LSB2 \ldots, which works
+with almost every font family. And there are special encodings LSBC1,
+LSBC2 \ldots, which works only with professional chess fonts with
+special chars. Happily the default board font, the  free font
+\chessfontname{skaknew}, is such a professional chess font.
+
+
+
+If you want to use one of the extended encodings LSB1, LSB2, etc and
+LSBC1, LSBC2 etc you must load the definition files e.g.\ with
+\lstinline+\usepackage[LSB1,T1]{fontenc}+. You find more
+informations in the documentation of \chessfss.
+
+
+
+
+\subsection{Coloring and emphasizing the board chars}
+\subsubsection{In short}
+
+\begin{itemize}
+
+\item Coloring the board or parts of the chars is a two step process:
+
+First you set the colors you want, then you apply them.
+
+\item
+Colors can be applied to the whole board (to set the default colors
+of the white and black pieces and fields). This done with the keys
+\key{setfontcolors} and \key{addfontcolors}.
+
+\item Colors can be applied to part of the board together with other commands like \cs{bfseries}
+ (e.g. to emphasize special fields or ranks)
+by first enabling color emphasing with the key \key{coloremph} and
+then by setting the area or field that should get the colors with
+e.g. the key \key{empharea}.
+
+
+\end{itemize}
+
+
+
+\subsubsection{Introduction: About composed chars and encodings}
+In simple chess fonts each field with and without a figure on it is
+\emph{one} char. You can color such a char but -- as in the case of normal chars -- only
+in one color:
+
+\textcolor{red}{\Large A \BlackKingOnBlack}
+
+This is certainly not very satisfying. You probably would like to be
+able to color the white figures diffently from the black ones, and
+the black fields in a third color.
+
+To be able to do this, one has to use more than one char to build a
+field and to print them on top of each other. Look e.g. at this
+example:
+
+ \colorbox{yellow}{\Chess
+ \makebox[0pt][l]{\color{blue}\BlackEmptySquare}%
+ \color{green}T%
+ \color{red}K}
+
+It is build by putting four different objects on top of each other:
+
+At start there is a standard yellow colorbox
+
+\colorbox{yellow}{\Chess\phantom{\BlackEmptySquare}}
+
+Above there is a black empty square colored in blue:
+
+{\Chess\color{blue}\BlackEmptySquare}
+
+Then comes a solid, filled and colored char with the same shape as
+the king:
+
+{\Chess\color{green}T}
+
+At last there is the char for the king:
+
+{\Chess\color{red}K}
+
+So
+
+{\Chess\colorbox{yellow}{\phantom{\BlackEmptySquare}}\Plus
+ {\color{blue}\BlackEmptySquare}\Plus
+ {\color{green}T\phantom{\BlackEmptySquare}}\Plus
+ {\color{red}K}\Equal
+ \colorbox{yellow}{%
+ \makebox[0pt][l]{\color{blue}\BlackEmptySquare}%
+ \color{green}T%
+ \color{red}K}}
+
+
+There are a lot of other possibilities to compose the board fields.
+Some more «poor man's» compositions that use only chars present in
+every chess font, other that need special masking chars which only
+special chess fonts provide.
+
+{\bfseries Each such construction is connected to a font encoding: By
+changing the encoding of the board font you change the rules that
+compose the board chars and so you change also the options to color
+the chars.}
+
+
+In \chessfss I have defined a bundle of such «construction rules»
+(=encodings) to use and color composed board chars. As it would be a
+strain if each of this construction rules would let to a different
+set of commands to color the chars I had to systemize the
+construction rules. For this I have divided the possible individual
+components of a composed chars in four logical layers and assign to
+each layer generic color commands that are used in the definition of
+the composed chars and can be used to color the components. The four
+layers are named fieldmask, field, piecemask and piece.
+
+As an example table~\ref{tab:encLSBC3} shows a tabular that
+demonstrates how the encoding LSBC3 is built. As you can see the
+chars are built by putting up three or four chars on top of each
+other. (The green and yellow colors are not the default settings!).
+The documentation of
+\chessfss shows the other encodings.
+%The colors have been set with the
+%\chessfss-command
+%\begin{lstlisting}
+%\setboardfontcolors{
+%               whitepiece=red!70,
+%               blackfield=green,
+%               whiteonwhitepiecemask=yellow}
+%\end{lstlisting}
+
+
+
+\begin{table}
+\setboardfontcolors{whitepiece=red!70,
+blackfield=green,whiteonwhitepiecemask=yellow}%
+
+\caption{The contruction rules of encoding LSBC3}\label{tab:encLSBC3}
+
+%\medskip
+\showchessboardencoding{LSBC3}
+
+
+\end{table}
+
+Table~\ref{tab:intcom} shows the internal commands used to color the
+different part of a composed char. You will probably never need them
+but they will give you an idea what can be colored (I hope that is
+clear that it makes only sense to change the colors of layers that
+are used in the actual encoding -- you can't color an solid fieldmask
+that isn't there).
+
+%\begin{minipage}[t]{\textwidth}
+\begin{table}
+\caption{The internal color commands}\label{tab:intcom}
+
+\begin{tabular}[t]{@{}lll}
+\itshape layer  & \itshape internal color commands & \itshape default definition\\\hline\\
+
+fieldmask       & \cs{cfss at whitefieldmaskcolor}   &\cs{color}\ttfamily\{white\}\\
+                & \cs{cfss at blackfieldmaskcolor}   &\cs{color}\ttfamily\{gray\}\\
+field           & \cs{cfss at whitefieldcolor}       &\ttfamily\{\}\\
+                & \cs{cfss at blackfieldcolor}       &\ttfamily\{\}\\
+piecemask       & \cs{cfss at whiteonwhitepiecemaskcolor}&\cs{color}\ttfamily\{white\}\\
+                & \cs{cfss at whiteonblackpiecemaskcolor}&\cs{color}\ttfamily\{white\}\\
+                & \cs{cfss at blackonwhitepiecemaskcolor}&\cs{color}\ttfamily\{white\}\\
+                & \cs{cfss at blackonblackpiecemaskcolor}&\cs{color}\ttfamily\{white\}\\
+piece           & \cs{cfss at whitepiececolor}       &\ttfamily\{\}\\
+                & \cs{cfss at blackpiececolor}       &\ttfamily\{\} \\
+\end{tabular}
+
+
+\end{table}
+%\end{minipage}
+
+
+I would like to draw your attention to two things:
+
+\begin{enumerate}
+\item The field-layers distinguish between black and white field
+while the piece layer distinguish between black and white pieces and
+the piecemask offers all possible combinations.
+
+\item
+The fieldmask and the piecemask are colored by default and so they
+will overwrite or block out external colors from \cs{colorbox} or
+\cs{textcolor} commands:
+
+\begin{LTXexample}
+%Uses commands from chessfss.sty
+\setboardfontencoding{LSBC3}%
+\setboardfontsize{2cm}
+
+\colorbox{yellow}{%
+ \textcolor{red}{\WhiteKingOnWhite}}
+%
+\setboardfontcolors{
+ whitefieldmask=yellow,
+ whiteonwhitepiecemask=red}
+\colorbox{yellow}{%
+ \textcolor{red}{\WhiteKingOnWhite}}
+\end{LTXexample}
+
+\end{enumerate}
+
+
+
+
+
+So coloring the board is not really difficult: one must only redefine
+the internal commands mentioned above to the wanted color. That's
+what the \cs{setboardfontcolors} command of \chessfss does and it
+will work fine with chessboard.
+
+Naturally I also wanted to add keys for \cs{chessboard} and
+\cs{setchessboard} to change the colors. This is a bit more
+complicated because I wanted not only to be able to change the colors
+of the whole board but also of single fields or areas. And I had also
+to add keys to change the color in the two pgf pictures. Finding
+names for all this keys and effects wasn't easy. And I hope that it
+isn't to confusing.
+
+\subsubsection{Setting the default colors of the board}
+
+\Describefillkey{clearfontcolors}{arbitrary}{}
+
+When you set with the following keys a color for one of the font
+layers, \cs{chessboard} adds simply the color definition to an
+internal command (the «font color stack»). When you use later a key
+to apply the colors to the board or an area this internal command is
+inserted at the start of the board or the fields of the area. The
+internal command can get quite long if you set a lot of colors. With
+the key \key{clearfontcolors} you can empty the internal command
+(this will not destroy the colors that you have already applied).
+
+
+
+
+\Describefillkey{whitefieldmaskcolor}{color}{red!50}
+\Describefillkey{blackfieldmaskcolor}{color}{red!50}
+\Describefillkey{fieldmaskcolor}{color}{red!50}\goodbreak
+
+\Describefillkey{whitefieldcolor}{color}{red!50}
+\Describefillkey{blackfieldcolor}{color}{red!50}
+\Describefillkey{fieldcolor}{color}{red!50}\goodbreak
+
+\Describefillkey{whiteonwhitepiecemaskcolor}{color}{red!50}\goodbreak
+\Describefillkey{whiteonblackpiecemaskcolor}{color}{red!50}
+\Describefillkey{blackonwhitepiecemaskcolor}{color}{red!50}
+\Describefillkey{blackonblackpiecemaskcolor}{color}{red!50}\goodbreak
+\Describefillkey{whitepiecemaskcolor}{color}{red!50}
+\Describefillkey{blackpiecemaskcolor}{color}{red!50}\goodbreak
+\Describefillkey{onwhitepiecemaskcolor}{color}{red!50}
+\Describefillkey{onblackpiecemaskcolor}{color}{red!50}
+\Describefillkey{piecemaskcolor}{color}{red!50}\goodbreak
+
+\Describefillkey{whitepiececolor}{color}{red!50}
+\Describefillkey{blackpiececolor}{color}{red!50}
+\Describefillkey{piececolor}{color}{red!50}
+
+
+With this keys you set the colors of the different parts of a
+composed char. The colors are saved to an internal stack. A key like
+\key{whitepiececolor} saves the color for one of the layer color
+commands. \key{piecemaskcolor} will set the color for all four
+piecemasks in one go.
+
+
+
+
+The keys \obsoletekey{colorwhite} and \obsoletekey{colorblack} of the
+previous version of this package are copies of the keys
+\key{whitepiececolor} and \key{blackpiececolor}.
+
+
+
+\subsubsection{Applying the colors to the whole board}
+
+\Describefillkey{setfontcolors}{arbitrary}{}
+\Describefillkey{addfontcolors}{arbitrary}{}
+
+This keys will put the «font color stack» in a command that is
+executed at the start of the board. So the colors will affect any
+fields that don't get individual colors with the command described in
+the next subsection.
+\key{setfontcolors} will replace any font colors that have been set
+before, \key{addfontcolors} will add the new colors to perhaps
+already existing ones.
+
+\begin{LTXexample}
+\def\mycolor{yellow!50}
+\setchessboard{
+ boardfontencoding=LSBC3,
+ piecemaskcolor=\mycolor,
+ setfontcolors}
+
+\chessboard[tinyboard]
+
+\def\mycolor{green}% will set the
+% piecemask to green:
+\chessboard[tinyboard,
+            whitepiececolor=red,
+            blackpiececolor=blue,
+            fieldcolor=white,
+            addfontcolors]
+\end{LTXexample}
+
+\subsubsection{Emphasising and coloring individual areas}
+
+
+\Describefillkey{emphstyle}{commands}{\cs{bfseries}}
+
+With this key you can set a command that should be applied to an
+area. The commands can be whatever you want, (it is a good idea not
+use something that takes up some space). In my opinion the only
+senseful commands are \cs{color} and -- for the few fonts that have a
+bold boardfont -- \cs{bfseries}. You can use the key e.g. for simple
+coloring.
+
+\begin{LTXexample}
+\newchessgame
+\def\empharea{ h8-f4 }
+\chessboard[emphstyle=\color{red},
+            empharea=\empharea]
+\end{LTXexample}
+
+You can't color with \key{emphstyle} the fieldmask and the piecemask
+of chars as they have a default color that takes precedence.
+
+\Describefillkey{coloremph}{true|false}{}
+With this key you enable or disable color emphasising. When set to
+true, font colors set earlier will be added to emphstyle and so used
+to color the area. The colors are added after the commands of the key
+\key{emphstyle} and so will eventually overwrite them.
+This allows more complicated coloring:
+
+\begin{LTXexample}
+\newchessgame
+\def\empharea{ h8-f1 }
+\chessboard[boardfontencoding=LSBC3,
+            whiteonwhitepiecemaskcolor=green,
+            whitepiececolor=red,
+            blackpiececolor=blue,
+            emphstyle=\color{yellow},
+            %doesn't affect the default white color
+            %of the piecemask
+            empharea=a1-c8,
+            coloremph,
+            empharea=\empharea]
+\end{LTXexample}
+
+
+
+
+
+\goodbreak
+
+\Describefillkey{coloremphstyle}{commands}{\cs{bfseries}}
+
+This key combines the keys \key{coloremph} and \key{emphstyle}.
+
+
+
+\goodbreak
+\Describefillkey{emphboard}{arbitrary}{}
+\Describefillkey{empharea}{area}{a1-c3}
+\Describefillkey{emphareas}{list of areas}{\{f6-h7,a1-c3\}}
+\Describefillkey{emphfile}{file}{a}
+\Describefillkey{emphfiles}{list of files}{\{g,h\}}
+\Describefillkey{emphrank}{rank}{5}
+\Describefillkey{emphranks}{list of ranks}{\{8,7\}}
+\Describefillkey{emphfield}{field}{a3}
+\Describefillkey{emphfields}{list of fields}{\{b5,c6\}}
+
+This keys apply the emphasize commands and eventually the colors to
+the area they define.
+
+\begin{LTXexample}
+\def\empharea{ h8-f4 }
+\chessboard[boardfontfamily=millennia,
+            coloremphstyle=\bfseries,
+            empharea=\empharea,
+            whitepiececolor=red,
+            emphrank=1,
+            whitepiececolor=blue,
+            emphareas={a2-a2, c1-e2},
+            coloremph=false,
+            emphfield=f2]
+\end{LTXexample}
+
+
+\begin{LTXexample}
+\chessboard[boardfontencoding=LSBC3,
+            coloremph,
+            emphfield={f1},
+            whitepiececolor=red,
+            emphranks={1},
+            whitepiececolor=blue,
+            emphfields=a2,
+            blackpiececolor=green,
+            empharea=a8-c7]
+\end{LTXexample}
+
+
+The key \obsoletekey{colorpieces} doesn't work anymore, it will issue
+only a warning. Use
+\key{emphfields} instead.
+
+
+\subsubsection{Transparency/opacity}
+
+Pgf has commands to set the opacity of a color. This works only for
+some drivers and output formats (e.g.\ with pdf\LaTeX), but it also
+works outside pgf pictures in running text. The main drawbacks are
+that the opacity settings gets lost at a pagebreak and that
+\TeX-groups and boxes are not respected, that means that you must
+reset the opacity explicitly. It is possible to add to boxes that use
+internally
+\cs{color at begingroup}/""\cs{color at endgroup}\footnote{Almost all
+\LaTeX-boxes but not e.g.\ \cs{mbox} and \cs{makebox} when used
+without optional argument.} some code that resets the opacity outside
+the box to 1. As \cs{chessboard} uses only such safe boxes it is
+possible to smuggle transparency in parts of the composed chars. But
+the whole is not very safe so use it at your own risk.
+
+\begin{LTXexample}
+\makebox[0pt][l]{\rule{12em}{10pt}}%
+\color{red}%
+\rule{1em}{14pt} ABC
+\pgfsetfillopacity{0.5}%
+\rule{1em}{14pt} ABC
+\pgfsetfillopacity{1}%
+\rule{1em}{14pt} ABC
+
+\makeatletter
+\let\color at endgroupORI\color at endgroup
+\def\color at endgroup
+ {\color at endgroupORI\pgfsetfillopacity{1}}
+
+\chessboard[boardfontencoding=LSBC4,
+    whitepiececolor=red,
+    blackpiececolor=blue,
+    setfontcolors]
+
+\def\cfss at whitepiececolor
+ {\pgfsetfillopacity{0.5}\color{red}}
+\def\cfss at blackpiececolor
+ {\pgfsetfillopacity{0.5}\color{blue}}
+
+\chessboard[boardfontencoding=LSBC4]
+
+\end{LTXexample}
+
+
+\subsection{Labels}
+
+In \chessfss I used the name sidefont for the label. I did it mostly
+because I didn't dare to use the command \cs{labelfont}, I was quite
+sure that somewhere in the packages for \LaTeX\ someone else had
+already used this name. When using keys name clash are not a problem
+as internally a unique prefix is used, so I decided to use names
+starting with «label» in this package.
+
+\medskip
+\Describesetkey{labelleft}{true|false}{}{true}
+\Describesetkey{labelright}{true|false}{false}{false}\goodbreak
+\Describesetkey{labeltop}{true|false}{}{false}\goodbreak
+\Describesetkey{labelbottom}{true|false}{}{true}\goodbreak
+\Describesetkey{hlabel}{true|false}{}{false}\goodbreak
+\Describesetkey{vlabel}{true|false}{}{false}\goodbreak
+\Describesetkey{label}{true|false}{}{false}
+
+You can disable the labels with this boolean keys.
+
+\Describesetkey{labelleftwidth}{length}{1em}{1ex}
+\Describesetkey{labelrightwidth}{length}{1em}{1ex}
+\Describesetkey{hlabelwidth}{length}{1em}{1ex}
+
+The labels on the left side are set raggedleft, the ones on the right
+side raggedright at the distance given by the keys.  This width don't
+change the size of the board! The top and bottom labels are centered.
+
+\begin{LTXexample}
+\def\mywidth{1em}
+left%
+\chessboard[maxfield=j10,
+            tinyboard,
+            printarea=d5-j10,
+            hmarginwidth=1em,
+            hlabelwidth=\mywidth,
+            hlabel,
+            vlabel=false]%
+right
+\end{LTXexample}
+
+\Describesetkey{labelleftlift}{length}{1em}{0.35em}
+\Describesetkey{labelrightlift}{length}{1em}{0.35em}
+\Describesetkey{hlabellift}{length}{1em}{0.35em}
+
+With this keys you can move up and down the left and right labels.
+
+
+
+
+\medskip
+\Describesetkey{labeltoplift}{length}{1em}{1.1\cs{baselineskip}}
+\Describesetkey{labelbottomlift}{length}{1em}{0.2\cs{baselineskip}}
+\Describesetkey{vlabellift}{length}{1em}{--}
+
+With this keys you can set the distance of the baselines of the top
+and bottom labels from the board sides. \cs{baselineskip}, ex and em
+refer in this keys \emph{not} to the size of the board, but to the
+size of the label font -- I thought this would be easier to handle.
+
+\medskip
+\Describesetkey{labelleftfont}{fontcommand}{\cs{itshape}}{\cs{sfdefault}}
+\Describesetkey{labelrightfont}{fontcommand}{\cs{itshape}}{\cs{sfdefault}}\goodbreak
+\Describesetkey{labeltopfont}{fontcommand}{\cs{itshape}}{\cs{sfdefault}}\goodbreak
+\Describesetkey{labelbottomfont}{fontcommand}{\cs{itshape}}{\cs{sfdefault}}\goodbreak
+\Describesetkey{hlabelfont}{fontcommand}{\cs{itshape}}{\cs{sfdefault}}\goodbreak
+\Describesetkey{vlabelfont}{fontcommand}{\cs{itshape}}{\cs{sfdefault}}\goodbreak
+\Describesetkey{labelfont}{fontcommand}{\cs{itshape}}{\cs{sfdefault}}
+
+With this keys you can set the font used by the labels. As a default
+(this is set in \chessfss) the sans serif font of the document is
+used. You can also use the \chessfss commands to change the font.
+
+
+\Describesetkey{labelfontsize}{length}{0.5em}{10pt}
+
+This key sets the font size of the label. The default value is set by
+the key \key{normalboard}.  There aren't keys to set the size of each
+label separatly. If you really need different sizes, use the key
+\key{hlabelfont} etc (and be careful when using font relative sizes).
+
+\begin{LTXexample}
+\setchessboard{labelfont=\bfseries}
+\setsidefontfamily{ptm} % from chessfss.sty
+\chessboard[labelfontsize=6pt]
+\end{LTXexample}
+
+
+\Describesetkey{labelleftformat}{commands}{}{\arabic{ranklabel}}
+\Describesetkey{labelrightformat}{commands}{}{\arabic{ranklabel}}\goodbreak
+\Describesetkey{labeltopformat}{commands}{}{\alph{filelabel}}\goodbreak
+\Describesetkey{labelbottomformat}{commands}{}{\alph{filelabel}}\goodbreak
+\Describesetkey{hlabelformat}{commands}{}{\arabic{ranklabel}}\goodbreak
+\Describesetkey{vlabelformat}{commands}{}{\alph{filelabel}}\goodbreak
+\Describesetkey{labelformat}{commands}{}{}
+
+With this keys you can control how the number of the files and ranks
+are printed. \texttt{ranklabel} and \texttt{filelabel} are counters
+that contain the current rank and file. You can use them freely (even
+change if you want).
+
+The commands can be a lot of things. You can e.g.\ use them to color
+the labels or to move the labels around. When you use commands with
+optional arguments you must put braces around the value of the key!
+
+\begin{LTXexample}
+\def\mylabelformat{%
+ {\makebox[0pt][r]{%
+   \ifthenelse{\isodd{\value{ranklabel}}}
+     {\color{red}\roman{ranklabel}}
+     {\color{green}\roman{ranklabel}}}}}
+
+\chessboard[hlabelformat=\mylabelformat,
+    vlabelformat=\arabic{filelabel}\hfill]
+\end{LTXexample}
+
+
+\subsection{The mover}
+The «mover» is a sign at the side of the board that indicates which
+player is to move. \cs{chessboard} gets this information either from
+the FEN (if it contains the information as is the case when the FEN
+comes from \skaksty), or through the following key:
+
+\Describefillkey{mover}{w|b}{b}
+
+You can use this key more than once, e.g.\ to control the mover
+field in the FEN that you save, the last value is used for the
+print.
+
+\medskip
+\Describesetkey{showmover}{true|false}{false}{true}
+
+This key switch the print of  the mover sign on and off.
+
+\begin{LTXexample}
+\chessboard[smallboard,showmover=true]
+\end{LTXexample}
+
+
+\Describesetkey{moversize}{length}{1ex}{1em}
+
+This key sets the fontsize of the mover. It only has an effect if
+the mover sign comes from a font -- and if the definition doesn't
+change the fontsize.
+
+The value is saved in an inner command with the name
+\cs{board at val@moversize}, you can use this command in your own mover
+definitions.
+
+\medskip
+\Describesetkey{moverlift}{length}{1ex}{0pt}
+\Describesetkey{movertoplift}{length}{1ex}{0pt}
+\Describesetkey{moverbottomlift}{length}{1ex}{0pt}
+
+With this keys you can move the mover vertically. Positive values
+will move the bottom mover up and the top mover down\footnote{This
+isn't perhaps the correct meaning of the word «lift» but I guessed
+that user expect the mover to move either both towards or apart.}.
+0pt will align the bottom mover along the baseline, and the top of
+the upper mover along the upper side of the board.
+
+
+\begin{LTXexample}[width=0.55\textwidth]
+\setchessboard{showmover}%
+\chessboard[tinyboard, setfen=k1K b]%
+\chessboard[tinyboard, setfen=k1K w]
+
+
+\chessboard[tinyboard, setfen=k1K b,
+            moverlift=-1ex]%
+\chessboard[tinyboard, setfen=k1K w,
+            moverlift=-1ex]
+\end{LTXexample}
+
+
+\Describesetkey{movershift}{length}{1ex}{1ex}
+\Describesetkey{movertopshift}{length}{1ex}{1ex}
+\Describesetkey{moverbottomshift}{length}{1ex}{1ex}
+
+With this keys you can shift the mover horizontaly. If you want to
+put it on the left side of the board, use a large negative value.
+
+\begin{LTXexample}[width=0.55\textwidth]
+\setchessboard{showmover}%
+\chessboard[setfen=k1K b,
+            movershift=-9em,
+            labelleft=false,
+            labelright]%
+\end{LTXexample}
+
+\Describesetkey{moverstyle}{typename}{squarearrow}{square}
+
+With this key you can change the mover type. Up to now four types
+are defined, but you can define your own one if you want.
+
+
+
+\begin{LTXexample}[width=0.55\textwidth]
+\setchessboard{showmover}%
+\chessboard[tinyboard, setfen=k1K b,
+            moverstyle=circle]%
+\chessboard[tinyboard, setfen=k1K w,
+            moverstyle=triangle]
+
+%This moverstyle needs pifont and graphics!
+\chessboard[tinyboard, setfen=k1K b,
+            moverstyle=squarearrow]%
+%This will give a warning and square is used:
+\chessboard[tinyboard, setfen=k1K w,
+            moverstyle=unknown]
+\end{LTXexample}
+
+
+\DescribeMacro{\cbDefineMoverStyle} With this command you can define
+your own moverstyle. \cs{cbDefineMoverStyle} takes six arguments (the
+first is optional). The first mandatory argument is the name of the
+style, the following arguments get the definitions for the mover for
+black and white for normal and inverse board.
+
+\cs{cbDefineMoverStyle}\oarg{commands}\marg{name of style}\marg{white
+top}\newline%
+\hspace*{4em}\marg{white bottom}\marg{black top}\marg{black bottom}.
+
+The listing shows the definition of the mover «squarearrow»:
+
+
+
+\begin{lstlisting}
+\cbDefineMoverStyle%
+ %#1: optional, can be used e.g. for checks
+ %#2=style name, #3=white top, #4=white bottom,
+ %#5=black top, #6=black bottom
+    [\@ifundefined{rotatebox}%
+      {\PackageError{chessboard}%
+        {You must load the package graphics or graphicx
+         if you want to use the mover style squarearrow}{}}%
+      {}%
+     \@ifundefined{ding}%
+      {\PackageError{chessboard}%
+        {You must load the package pifont
+         if you want to use the mover style squarearrow}{}}%
+      {}]
+    {squarearrow}% #2
+    {\rotatebox{-90}{$\square$\,\ding{222}}}%
+    {\rotatebox{90}{$\square$\,\ding{222}}}%
+    {\rotatebox{-90}{$\blacksquare$\,\ding{222}}}%
+    {\rotatebox{90}{$\blacksquare$\,\ding{222}}}%
+\end{lstlisting}
+
+
+
+
+\section{Controlling the printing}\label{stopmain}
+\subsection{Printing partial boards}
+\Describesetkey{print}{true|false}{false}{true}
+
+With this key you can disable the printing of the board. This is
+useful if you want to use \cs{chessboard} to save FEN.
+
+
+
+\begin{LTXexample}
+left\chessboard[print=false]right
+\end{LTXexample}
+
+
+\Describefillkey{startprint}{field}{b7}
+\Describefillkey{stopprint}{field}{f2}
+\Describefillkey{printarea}{area}{c2-d4}
+
+
+With this keys you can define the  area that gets printed.
+
+\begin{LTXexample}
+\newchessgame
+left\chessboard[printarea=a4-d8]right
+\end{LTXexample}
+
+
+\subsection{Rotating the board}
+\Describesetkey{inverse}{true|false}{false}{false}
+
+With this key you can print the black side at the bottom. It won't
+switch labels or margins etc.
+
+\begin{LTXexample}
+\newchessgame
+left\chessboard[inverse]right
+\end{LTXexample}
+
+
+\subsection{Hiding the content of the board}
+
+\subsubsection{Hiding the content of fields}
+
+\Describefillkey{hideboard}{arbitrary}{}
+\Describefillkey{hidearea}{area}{a1-c3}
+\Describefillkey{hideareas}{list of areas}{\{a1-c3,g7-h8\}}
+\Describefillkey{hidefile}{file}{g}
+\Describefillkey{hidefiles}{list of files}{\{g,h\}}\goodbreak
+\Describefillkey{hiderank}{rank}{5}
+\Describefillkey{hideranks}{list of ranks}{\{8,7\}}
+\Describefillkey{hidefield}{field}{c6}
+\Describefillkey{hidefields}{list of fields}{\{b5,c6\}}
+
+
+With this keys you can hide pieces on certain fields. The pieces are
+not deleted, e.g.\ when you save the position to FEN they will be
+there. But the content of hidden fields don't appear if you add
+pieces to this fields!
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\def\myfiles{a,b}
+\setchessboard{tinyboard}
+\chessboard[hidefiles=\myfiles,
+            addpieces=Ra2,
+            hidearea=d7-e8,
+            storefen=myfen]
+\chessboard[restorefen=myfen]
+\end{LTXexample}
+
+\subsubsection{Hiding piecetypes}
+
+\Describefillkey{hidepiece}{piece char}{q}
+\Describefillkey{hidepieces}{list of piece chars}{\{K, b\}}
+\Describefillkey{hidewhite}{arbitrary}{}
+\Describefillkey{hideblack}{arbitrary}{}
+\Describefillkey{hideall}{arbitrary}{}
+
+
+This keys doesn't hide the content of fields but piecestypes like
+the kings or the pawns. Here too: you can't add pieces if their type
+is hidden.
+
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\def\mypieces{R,Q}
+\setchessboard{tinyboard}
+\chessboard[hidepieces=\mypieces,
+            addpieces={Ra2, ra7},
+            hideblack,
+            storefen=myfen]%
+\chessboard[restorefen=myfen]
+\end{LTXexample}
+
+\subsubsection{Showing the content of fields}
+
+\Describefillkey{showboard}{arbitrary}{}
+\Describefillkey{showarea}{area}{a1-c3}\goodbreak
+\Describefillkey{showareas}{list of areas}{\{a1-c3,g7-h8\}}
+\Describefillkey{showfile}{file}{g}
+\Describefillkey{showfiles}{list of files}{\{g,h\}}\goodbreak
+\Describefillkey{showrank}{rank}{5}
+\Describefillkey{showranks}{list of ranks}{\{8,7\}}
+\Describefillkey{showfield}{field}{c6}
+\Describefillkey{showfields}{list of fields}{\{b5,c6\}}
+
+With this keys you can let reappear the content of hidden fields.
+
+\begin{LTXexample}
+\newchessgame
+\def\myfiles{a,b}
+\chessboard[hidefiles=\myfiles,
+            addpieces=Ra2,
+            showfiles=a,
+            showranks=2]
+\end{LTXexample}
+
+\subsubsection{Showing piecetypes}
+
+\Describefillkey{showpiece}{piece char}{q}
+\Describefillkey{showpieces}{list of piece chars}{\{K, b\}}
+\Describefillkey{showwhite}{arbitrary}{}
+\Describefillkey{showblack}{arbitrary}{}
+\Describefillkey{showall}{arbitrary}{}
+And this keys lets reappear hidden piecestypes.  Attention: hidden
+pieces on hidden fields reappear only if you use the key to show the
+field
+\emph{and} the key to show the piece!
+
+\begin{LTXexample}
+\newchessgame
+\def\myfiles{a,e}
+\chessboard[hidefiles=\myfiles,
+            hidepieces={K,R},
+            showfiles=a,
+            showranks=1,
+            showpieces=K]
+\end{LTXexample}
+
+
+Keys like \key{showonlypawns} or \key{showonlybut} could be easily
+added as they are simple combinations of the existing keys:
+
+\begin{LTXexample}
+\newchessgame
+\chessboard[hideall,
+            showpieces={P,p},
+            addpieces=pe5]
+\end{LTXexample}
+
+
+
+
+\section{«Decoration»: Colors, background, fancy borders, highlighting}\label{startpgf}
+
+
+%\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
+take some time to find out how to achieve a certain effect.
+
+Don't forget that not every effect is sensible or even works
+everywhere. Transparency/opacity e.g.\ don't work for every driver or
+output format or printer or previewer (the documentation of pgf says
+that it works for dvips only with new ghostscript versions). Some
+colors looks good on screen but bad if printed with a greyscale
+printer. Colors can change if you use another monitor. Some color
+combinations are a problem for color blinds.
+
+\Skaksty has some own highlighting commands. They use
+postscript/pstricks commands and they only work if you load
+\skaksty with the option \textsf{ps}. That means that you have to use the
+\filetype{.tex}$\rightarrow$\filetype{.dvi}$\rightarrow$\filetype{.ps}$\rightarrow$\filetype{.pdf}-way
+to process the document. If you want to use pdf\LaTeX\ directly you
+have to use a package like \packagename{pst-pdf} to first make pdf
+graphics from all boards and then include this graphics during the
+pdf\LaTeX-run. I find this quite cumbersome and sometimes it is even
+difficult to get it to work.
+
+So I decided to use \packagename{pgf} to implement my own
+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.
+
+\Describesetkey{pgf}{true|false}{}{true}
+
+Pgf-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
+most of the highlighting.
+
+
+
+
+
+\subsection{The  pgf-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.
+
+
+
+
+In the first version of \pchessboard 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
+for coloring fields in the foreground picture which did mean that I
+had to transfer the code from the background to the foreground.
+
+So I decided to rewrite and extend the codes so that each
+highlighting/drawing in the pgf-pictures can be done in either the
+background or the foreground or in both. I don't know if someone will
+ever have a need for a cross under the figures, but why shouldn't I
+offer some code to do it?
+
+I also tried to unify the keys that affect the pgf-pictures, to
+improve the possibilities for the user to  control which pgf-picture
+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.
+
+
+\subsubsection{Naming of the pgf related keys}
+
+There are more or less three set of keys
+
+\begin{itemize}
+\item Keys which affect only the foreground picture. The keys starts with or contains the
+string «\bfseries\ttfamily mark».
+\item  Keys which affect only the background picture. The keys starts with or contains the
+string «\bfseries\ttfamily back».
+
+\item
+Keys that saves or set properties that are used in both picture,
+e.g.\ to change the color or the linewidth. Such keys start or
+contain in most cases the string  «\bfseries\ttfamily pgf» (with some
+exceptions like the key for clipping and trimming). For a lot of such
+keys there exist a shorter (but less descriptive) name without the
+«\ttfamily pgf». In most cases there isn't a difference between the
+two.
+
+\end{itemize}
+%Using two pictures raises the question how properties that make sense
+%for both pictures should be implemented and how commands that should
+%affect only one picture should be distinguish from a similar command
+%that affect the other picture. E.g.\ there are  a lot of keys that
+%sets properties that are or can be of interest in both pictures like
+%setting the color or some variables like  linewidth or some padding.
+%I stood for the choice if I should define two keys e.g.
+%\key{colorback} and \key{colormark} or one key \key{color} that puts
+%the color in both pictures. The first alternative is longer and more
+%tiresome, the second can give confusing results if the user don't
+%realize that a key can also affect the other picture.
+%
+%I used both alternatives depending on which I thought more natural in
+%the special cases.
+
+
+
+
+\subsubsection{Executing the drawing commands}
+
+A chessboard consists of fields on which figures make moves and so
+the decoration of the board is field and move orientated.
+
+There are three different types of graphical object:
+\begin{itemize}
+\item You can draw something on  a set of
+single \emph{fields} e.g., put a cross on each of the fields or put a
+border around each field. To get these pictures on or under the field
+the inner commands first shift the origin to the middle of field and
+then inserts the code stored in the style definition in the
+foreground or background image.
+
+
+\item
+You can draw something on or around a \emph{region} -- a rectangle
+made of fields --, e.g.\ by putting a border around the center or a
+rank or the whole board. Here the inner commands shift the origin to
+the left upper corner of the region. The name of the other corner is
+available in the style definition through
+\lstinline+#1+.
+
+
+\item And you can mark a \emph{move}.
+The main difference between a move and a region is that the order of the «corners» given in the argument matters.
+For moves the origin is in the first corner (the from field).
+\end{itemize}
+
+The drawing is done by first setting with various key the style and
+the properties of the pgf object and then executed by telling
+\cs{chessboard} which fields, moves or regions should get the
+drawings.
+
+\subsubsection{Drawing on and under fields}\label{sec:drawfields}
+
+\Describefillkey{markboard}{arbitrary}{}
+\Describefillkey{markarea}{area}{a1-c3}
+\Describefillkey{markareas}{list of areas}{\{a1-c3,d5-e5\}}
+\Describefillkey{markfiles}{file}{g}
+\Describefillkey{markfiles}{list of files}{\{g,h\}}
+\Describefillkey{markrank}{rank}{7}
+\Describefillkey{markranks}{list of ranks}{\{8,7\}}
+\Describefillkey{markfield}{field}{c6}
+\Describefillkey{markfields}{list of fields}{\{b5,c6\}}
+\Describefillkey{backboard}{arbitrary}{}
+\Describefillkey{backarea}{area}{a1-c3}
+\Describefillkey{backareas}{list of areas}{\{a1-c3,d5-e5\}}
+\Describefillkey{backfiles}{file}{g}
+\Describefillkey{backfiles}{list of files}{\{g,h\}}
+\Describefillkey{backrank}{rank}{7}
+\Describefillkey{backranks}{list of ranks}{\{8,7\}}
+\Describefillkey{backfield}{field}{c6}
+\Describefillkey{backfields}{list of fields}{\{b5,c6\}}
+
+
+This keys executes the pgf-commands stored in the style command for
+each single field.
+
+In the following example you should look at the difference it makes
+if you put a cross or a border in the background or the foreground.
+
+\begin{LTXexample}
+\newchessgame
+\def\myarea{a1-b8}
+\chessboard[pgfstyle=cross,
+            color=blue,
+            markfile=h,
+            backarea=\myarea,
+            color=red,
+            padding=-0.2em,
+            pgfstyle=circle,
+            markfields=g1,backfields=g8,
+            linewidth=0.1em,
+            pgfstyle=border,
+            markranks=6, backrank=4]
+\end{LTXexample}
+
+The new key \key{getpiecelists} can be used to mark e.g. all pawns on
+a board:
+
+\begin{LTXexample}
+ \newchessgame
+ \mainline{1. e4 e6 2.d4 d5}
+
+ \chessboard[pgfstyle=cross,
+             color=blue,
+             getpiecelists,
+             markfields={\cblistP,\cblistp}]
+\end{LTXexample}
+
+
+
+\subsubsection{Drawing on regions}
+
+\Describefillkey{markregions}{list of regions}{\{a1-c3, b7-c6\}}
+\Describefillkey{markregion}{list of regions}{\{a1-c3, b7-c6\}}
+\Describefillkey{backregions}{list of regions}{\{a1-c3, b7-c6\}}
+\Describefillkey{backregion}{list of regions}{\{a1-c3, b7-c6\}}
+
+
+\begin{LTXexample}
+\newchessgame
+\def\pawnranks{a2-h2, h7-a7}
+\chessboard[inverse,
+            pgfstyle=border,
+            markregions=\pawnranks,
+            color=red, padding=0.3ex,
+            linewidth=0.1ex,
+            backregions={\board,d4-e5},
+            pgfstyle=text,
+            text=$\leftarrow$%
+                 \currentbk-\currentwq
+                 $\rightarrow$,
+            markregion=a3-h3,
+            pgfstyle={[rotate=45]text},
+            backregion=h8-a1]
+\end{LTXexample}
+
+
+\subsubsection{Drawing move related}
+
+\Describefillkey{markmoves}{list of moves}{\{a1-c3, b7-c6\}}
+\Describefillkey{markmove}{list of moves}{\{a1-c3, b7-c6\}}
+\Describefillkey{backmoves}{list of moves}{\{a1-c3, b7-c6\}}
+\Describefillkey{backmove}{list of moves}{\{a1-c3, b7-c6\}}
+
+
+\begin{LTXexample}
+\def\mymove{d1-d5}%
+\chessboard[pgfstyle=straightmove,
+            markmoves={a1-a3, c3-e5, g1-f3},
+            pgfstyle=knightmove,
+            backmoves={g8-f6, h1-f4},
+            arrow=to, linewidth=0.2em,
+            markmove= \mymove]
+\end{LTXexample}
+
+I'm not very good in designing beautiful curves and moves arrows. If
+someone could offer me better code I will be happy to implement it.
+
+
+
+
+
+
+
+\subsubsection{Choosing what is drawn: pgf styles}
+
+
+
+%\subsubsection{Mark styles}
+\Describefillkey{markstyle}{[options]style name}{cross}
+\Describefillkey{backstyle}{[options]style name}{cross}
+\Describefillkey{pgfstyle}{[options]style name}{[left]text}
+
+
+With this keys you set the style the drawing commands will use.
+\key{markstyle} sets only the style for the foreground (the «mark»
+picture). \key{backstyle} sets only the style for the background
+picture. \key{pgfstyle} sets the style for both pictures (\key{style}
+is not a shorter version of \key{pgfstyle}!).
+
+If the value starts with \verb+[+ the text until \verb+]+ is
+interpreted as an option of the style. It depends on the definition
+of the style if and how this option is used (until now the text
+style, the circle style and (since version 1.5) the curvemove style
+use such options). \textbf{Attention}: to prevent \cs{chessboard} to
+interpret the \verb+]+ as the end of its optional argument you must
+put braces around the whole value if you want to use options.
+
+Not every style is useful for everything, e.g.\ it doesn't make sense
+to put a border around a move. The following tabular shows the
+predefined styles and the types for which they work.
+
+\begin{tabular}{lccc}
+      & fields    & regions   & moves \\
+cross & \ding{52} &           &       \\
+circle& \ding{52}                      \\
+text  & \ding{52} & \ding{52}          \\
+border(s)& \ding{52} & \ding{52}       \\
+color &\ding{52} &\ding{52}\\
+straightmove &    &           & \ding{52}\\
+knightmove &      &           & \ding{52}\\
+curvemove &      &           & \ding{52}\\
+\end{tabular}
+
+
+
+\DescribeMacro{\cbDefinePgfFieldStyle}
+\DescribeMacro{\cbDefinePgfRegionStyle}
+\DescribeMacro{\cbDefinePgfMoveStyle}
+With this 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.
+
+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
+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
+to rotate the text if the key \key{inverse} is true and the
+definition shows how the optional argument of the \key{pgfstyle} key
+can be use with \verb+#2+:
+
+\begin{lstlisting}
+\cbDefinePgfFieldStyle{circle}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \setlength\len at board@tempx{%
+     \dimexpr 0.55em + \board at pgf@padding \relax}%
+    \pgfpathcircle{\pgfpointxy{0}{0}}{\len at board@tempx}%
+    \pgfusepath{stroke,#2}}%%
+
+\cbDefinePgfRegionStyle{border}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}
+    \pgfpathrectanglecorners%
+      {\pgfpointadd%
+       {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}
+       {\pgfpointxy{-0.5}{0.5}}}%
+      {\pgfpointadd%
+       {\pgfpointanchor{#1}{center}}
+       {\pgfpointadd%
+        {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}
+        {\pgfpointxy{0.5}{-0.5}}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{text}{%
+    \ifthenelse%
+     {\boolean{\XKV at UFCB@locset at inverse@value}}%
+     {\pgftext[rotate=180,#2]{\normalfont\board at pgf@curtext}}%
+     {\pgftext[#2]{\normalfont\board at pgf@curtext}}}%
+\end{lstlisting}
+
+\subsubsection{Introduction to the predefined pgf styles}
+
+%\subsubsection{Graphic properties}
+%
+%Some of the graphic properties can be changed with predefined keys:
+%You already know about the keys \key{color} and \key{opacity}.
+
+%\medskip
+%\Describefillkey{linewidth}{length}{1ex}
+%\Describefillkey{marklinewidth}{length}{1ex}
+%With this keys you can change an internal command that is used to set
+%the linewidth. The first will affect also the linewidth in the
+%background layer, will the second affect only the mark layer.
+
+\minisec{Borders}
+
+\index{border (style)}%
+\index{border (style)>leftborder}%
+\index{border (style)>rightborder}%
+\index{border (style)>topborder}%
+\index{border (style)>bottomborder}%
+\index{border (style)>lefttopborder}%
+\index{border (style)>lefttoprightborder}%
+\index{border (style)>toprightborder}%
+\index{border (style)>toprightbottomborder}%
+\index{border (style)>rightbottomborder}%
+\index{border (style)>rightbottomleftborder}%
+\index{border (style)>bottomleftborder}%
+\index{border (style)>bottomlefttopborder}%
+Borders can be put around fields and regions. There exist also
+partial borders for one, two or three margins of an area, this
+borders are drawn and named «clockwise». «left», «right», «top», and
+«bottom» refer to the position of the border if the white player is
+at the bottom. If you use the key
+\key{inverse} the positions of the lines don't change in relation to
+the players colors.
+
+\begin{LTXexample}
+\newchessgame
+\setchessboard{smallboard,
+            pgfstyle=rightbottomborder,
+            color=orange,
+            markrank=7,
+            pgfstyle=lefttoprightborder,
+            markregion=a1-b3,
+            shortenstart=-1ex,
+            padding=1ex,
+            linewidth=0.3em,
+            pgfstyle=leftborder,color=red,
+            markregion=\mycenter,
+            pgfstyle=topborder,color=blue,
+            markregion=\mycenter,
+            pgfstyle=rightborder,color=green,
+            markregion=\mycenter,
+            pgfstyle=bottomborder,color=yellow,
+            markregion=\mycenter}
+\def\mycenter{d4-e5}
+\chessboard\
+\chessboard[inverse]
+\end{LTXexample}
+
+\minisec{Circle}
+
+\index{circle (style)}%
+\index{circle (style)>fill (option)}%
+This style can only be used in connection with fields. The optional
+argument can be used to fill the circle (default is stroke).
+
+\begin{LTXexample}
+\newchessgame
+\def\mycenter{d4-e5}
+\chessboard[pgfstyle=circle,
+            color=red,
+            markrank=7,
+            linewidth=0.2em,
+            markrank=6,
+            pgfstyle={[fill]circle},
+            markarea=\mycenter,
+            padding=-0.8ex,color=blue,
+            backfile=b]
+\end{LTXexample}
+
+
+\minisec{Cross}
+
+\index{cross (style)}%
+This style can only be used in connection with fields.
+
+\begin{LTXexample}
+\newchessgame
+\def\mycenter{d4-e5}
+\chessboard[pgfstyle=cross,
+            color=red,
+            markrank=7,
+            linewidth=0.2em,
+            markrank=6,
+            shortenstart=0.5ex,
+            markarea=\mycenter,
+            shortenend=0.5ex,color=blue,
+            backfile=b]
+\end{LTXexample}
+
+\minisec{Text}
+
+\index{text (style)}%
+\index{text (style)>options}%
+Text can be used for fields and regions. It is the only style where
+it isn't enough to simply chose the style, you must also give a value
+to the text content with the key \key{text} (don't confuse the key
+«text» with the style «text»!).
+
+The option of the style is passed to the optional argument of the
+\cs{pgftext} command, so everything that is allowed there can be put
+in the option. In the definition of the text content you can use
+informations about the current field or the current region.
+\cs{currentbk}\index{currentbk=\textbackslash currentbk} e.g. gives
+the \textit{b}lack \textit{k}ing corner of the region (when you draw
+in a region) or the field name (when you draw in a field). The
+opposite corner ist
+\cs{currentwq}\index{currentwq=\textbackslash currentwq},%
+\index{currentbq=\textbackslash currentbq}
+\index{currentwk =\textbackslash currentwk}
+the
+\textit{w}hite \textit{q}ueen corner.
+
+As a default the text is centered on the middle of the field or the
+region. You can use the options to move it around, please look in the
+documentation of pgf to find out what is possible.
+
+\begin{LTXexample}
+\newchessgame
+\setchessboard{tinyboard,color=magenta,clearboard}
+\chessboard[
+  pgfstyle=
+      {[base,at={\pgfpoint{0pt}{-0.4ex}}]text},
+  text= \fontsize{1.2ex}{1.2ex}\bfseries
+        \sffamily\currentwq,
+  markboard]
+
+\chessboard[
+  inverse,
+  pgfstyle=
+     {[base,at={\pgfpoint{0pt}{-0.4ex}}]text},
+  text=\fontsize{1.2ex}{1.2ex}\bfseries
+       \sffamily\currentwq,
+  trimtocolor=black, markboard,
+  trimtocolor=white,color=green,
+  markboard]%
+
+\chessboard[pgfstyle={[rotate=90]text},
+            text=
+            \fontsize{1.2ex}{1.2ex}
+            \bfseries file from \currentwq\ to \currentbk,
+            markregions={a1-a8,b1-b8,c1-c8}]%%
+\end{LTXexample}
+
+\begin{LTXexample}
+\newchessgame
+\setchessboard{tinyboard,color=red}
+
+\chessboard[pgfstyle={[rotate=45]text},
+            text=
+            \fontsize{1.2ex}{1.2ex}
+            \bfseries this is the diagonal
+            \currentwq\ to \currentbk,
+            markregions=\board]
+
+\chessboard[inverse, pgfstyle={[rotate=45]text},
+            text=
+            \fontsize{1.2ex}{1.2ex}
+            \bfseries this is the diagonal
+            \currentwq\ to \currentbk,
+            markregions=\board]
+
+\end{LTXexample}
+
+
+\minisec{Color}
+
+\index{color (style)}%
+This style puts a colored square on or under the field or region. At
+the start it was meant to color the background of the fields (and so
+it was only defined for the background). If used for the foreground
+on should set an adequate opacity.
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\setchessboard{tinyboard,
+        color=orange!80}
+\chessboard[boardfontencoding=LSBC5,
+            pgfstyle=color,
+            trimtocolor=black,
+            backboard,
+            trimtocolor=white,
+            color=gray!50,
+            backboard]%
+\chessboard[pgfstyle=color,
+            padding=-0.2em,
+            opacity=0.5,
+            markfiles={a,b},
+            markregion={e1-h8}]%
+\end{LTXexample}
+
+
+\minisec{Moves}
+
+\index{straightmove (style)}%
+\index{curvemove (style)}%
+\index{knightmove (style)}%
+Three styles draw arrows for moves. Two are quite simple:
+\key{straightmove} which draws straight arrows,
+\key{knightmove} which make a curve suited for knight moves.
+
+
+
+
+
+\begin{LTXexample}
+\newchessgame
+\chessboard[pgfstyle=straightmove,
+            markmove=a1-a8,
+            arrow=to,linewidth=0.2ex,
+            color=red,
+            pgfstyle=knightmove,
+            markmoves={g1-f3, e1-h4},
+            shortenstart=-1ex,
+            markmoves=h1-g3]%
+\end{LTXexample}
+
+
+\paragraph*{curvemove} New in version 1.5 there is the more sophisticated
+\key{curvemove} which draws an arbitrary bezier curve between start
+and end field.
+
+\key{curvemove} accept an optional argument in  key val syntax. (If you use it,
+don't forget to put braces arround the value!).
+
+\index{curvemove (style)>x1 (key)}%
+\index{curvemove (style)>x2 (key)}%
+\index{curvemove (style)>y1 (key)}%
+\index{curvemove (style)>y2 (key)}%
+\index{curvemove (style)>clockwise (key)}%
+First, there are keys that lets you change the support points of the
+bezier curve. The curve use a local coordinate system: The x-axis
+goes along the line from the start point to the end point. The
+x-values set with the keys listed below are relative to the length of
+this arrow from start to end, while the y-values are absolute (unit
+it the width of a square). Positive y values give a curve going
+clockwise, negative y values give a curve going anticlockwise. With
+the
+\texttt{clockwise=false} you can change the sign of the y values.
+
+\begin{tabular}{>{\ttfamily}l>{~=~}l}
+x1 & \meta{number}\\
+x2 & \meta{number}\\
+y1 & \meta{number}\\
+y2 & \meta{number}\\
+clockwise & \meta{true|false}
+\end{tabular}
+
+Second, there are keys to change \emph{locally} (only for the curve)
+the look of the arrow. They work like the keys for \cs{chessboard}
+with the same name:
+\index{curvemove (style)>arrow (key)}%
+\index{curvemove (style)>pgfarrow (key)}%
+\key{arrow}, \key{pgfarrow},
+\index{curvemove (style)>linewidth (key)}%
+\index{curvemove (style)>pgflinewidth (key)}%
+\key{linewidth}, \key{pgflinewidth},
+\index{curvemove (style)>shortenstart (key)}%
+\index{curvemove (style)>pgfshortenstart (key)}%
+\key{shortenstart}, \key{pgfshortenstart},
+\index{curvemove (style)>shortenend (key)}%
+\index{curvemove (style)>pgfshortenend (key)}%
+\key{shortenend}, \key{pgfshortenend}.
+
+\index{curvemove (style)>style (key)}%
+At last there is a key \key{style} which you can use to reuse saved
+keyval-lists. Until now only style \texttt{knight} exists and there
+is no user command to define new ones. You want to use own keys, sent
+me either a feature request or do it by defining the low level
+command:
+
+\verb+\def\board at pgf@curvemovestyle at +\meta{name}\verb+{\setkeys[UFCB]{bez}{+\meta{keyval-list}\verb+}}+
+
+\begin{LTXexample}
+\newchessgame
+\def\mystyle{[clockwise=false,style=knight]curvemove}
+\chessboard[arrow=latex,
+           pgfstyle=straightmove,
+           shortenstart=0.1em,
+           color=blue,
+           linewidth=3pt,
+           markmoves={e1-e8},
+           pgfstyle={[linewidth=2pt,arrow=to,
+                      style=knight]curvemove},
+           markmove=b1-c3,
+           color=red,
+           pgfstyle=\mystyle,
+           markmoves={b1-c3,b1-a3},
+           pgfstyle=curvemove,
+           markmoves={e1-g1,h1-f1}]
+\end{LTXexample}
+\subsubsection{Setting graphic properties}
+
+As the previous examples showed  you can change quite a lot things of
+the pictures. Now here a complete description of the needed keys. The
+keys don't draw anything directly. They only put commands or
+definitions like
+\verb+\color{red}+, \verb+\pgfsetfillopacity{0.3}+ or
+\verb+\def\board at pgf@arrow{to}+ in the pgf-picture(s).
+
+
+
+
+\bigskip
+Let us now start with the keys which put a command in the pictures:
+
+
+\Describefillkey{color}{color}{red}
+\Describefillkey{pgfcolor}{color}{red}
+
+This keys stores a color command (\verb+\color{red}+) in the pgf
+picture(s).
+
+
+\medskip
+\Describefillkey{opacity}{number}{0.5}
+\Describefillkey{pgfopacity}{number}{0.5}
+\Describefillkey{fillopacity}{number}{0.5}
+\Describefillkey{pgffillopacity}{number}{0.5}
+\Describefillkey{strokeopacity}{number}{0.5}
+\Describefillkey{pgfstrokeopacity}{number}{0.5}
+
+
+This keys add \cs{pgfsetfillopacity}\marg{number} and/or
+\cs{pgfsetstrokeopacity}\marg{number} to the  pgf-picture(s). The
+number should be between zero and one.
+
+\begin{LTXexample}
+\chessboard[padding=-0.5ex,
+            color=red,fillopacity=0.5,
+            markstyle=circle,markfields=a1,
+            markstyle=color,markfields=b1,
+            fillopacity=1,
+            strokeopacity=0.5,
+            pgfstyle=circle,
+            markfields=d1,backfield=d8,
+            pgfstyle=color,
+            markfields=e1,backfield=c8]
+\end{LTXexample}
+
+
+\bigskip
+The following keys puts only a definition in the pgf-pictures. The
+values will only affect the styles that use the internal commands in
+their definitions.
+
+\medskip
+\Describefillkey{padding}{length}{0.1ex}
+\Describefillkey{pgfpadding}{length}{0.1ex}
+
+This keys save \verb+\def\board at pgf@padding+\marg{length} to the
+pgf-picture(s). The value can be used in various situations to change
+the offset of a line or a border of the area that is covered by a
+color.
+
+Used currently by the border styles, the styles that color fields in
+the background or the foreground to enlarge or reduce the covered
+area and the circle (the length is added to a start diameter).
+
+\begin{LTXexample}
+\chessboard[color=red,
+            markstyle=circle,markfields=a1,
+            markstyle=border,markfields=a3,
+            markstyle=color,markfields=a5,
+            padding=0.3ex,color=green,
+            markstyle=circle,markfields=c3,
+            markstyle=border,markfields=c5,
+            markstyle=color,markfields=e5,
+            padding=-0.3ex,color=blue,
+            markstyle=circle,markfields=g3,
+            markstyle=border,markfields=g5,
+            backstyle=color,backfields=g1]
+\end{LTXexample}
+
+\medskip
+\Describefillkey{arrow}{arrow type}{to}
+\Describefillkey{pgfarrow}{arrow type}{to}
+
+This keys save \verb+\def\board at pgf@arrow+\marg{arrow type} to the
+pgf-picture(s). Styles can use the command to set the arrow
+tips. Look at the documentation of pgf to learn about the existing
+arrow types (and how to define new ones).
+
+Default is \texttt{latex}. Used currently by the move styles.
+
+\begin{LTXexample}
+\chessboard[markstyle=straightmove,
+            markmove=a1-a3,
+            arrow=to,
+            markmove=b1-b3]
+\end{LTXexample}
+
+\Describefillkey{shortenstart}{length}{to}
+\Describefillkey{pgfshortenstart}{length}{to}
+\Describefillkey{shortenend}{length}{to}
+\Describefillkey{pgfshortenend}{length}{to}
+\Describefillkey{shorten}{length}{to}
+\Describefillkey{pgfshorten}{length}{to}
+
+This keys save the definitions
+\verb+\def\board at pgf@shortenstart+\marg{length} or\\
+\verb+\def\board at pgf@shortenend+\marg{length}  or both to the
+pgf-picture(s). The commands can  be used e.g. in a
+\cs{pgfsetshortenstart} command to shorten a line a the start or the
+end.
+
+As default the lengths are 0pt.  Used e.g.\ by the styles
+straightmove, knightmove, cross and the partial borders. The lengths
+are
+\emph{added} to some start values that I thought reasonable. If you
+use large length (over 1ex) this can change the meaning of move marks
+as the mark will start in another field!
+
+\begin{LTXexample}
+\chessboard[markstyle=straightmove,
+            markmove=a1-a3,
+            markstyle=cross,markfield=a5,
+            shortenend=1ex,color=red,
+            markstyle=straightmove,
+            markmove=b1-b3,
+            markstyle=cross,markfield=b5,
+            shorten=-0.5em,color=green,
+            pgfstyle=straightmove,
+            backmove=d1-d3,
+            backstyle=cross,backfield=d5]
+\end{LTXexample}
+
+\Describefillkey{linewidth}{length}{1ex}
+\Describefillkey{pgflinewidth}{length}{1ex}
+\Describefillkey[relict]{marklinewidth}{length}{1ex}
+\Describefillkey[relict]{backlinewidth}{length}{1ex}
+
+This keys save \verb+\def\board at pgf@linewidth+\marg{length} to the
+pgf-picture(s). The command can be used e.g. in \cs{pgfsetlinewidth}.
+The keys \key{marklinewidth} and \key{backlinewidth} are remains from
+an older version. There put the commands only in one picture, and
+they ignore the values of the \key{usepgf} keys.
+
+\begin{LTXexample}
+\chessboard[markstyle=straightmove,
+            markmove=a1-a3,
+            markstyle=cross,markfield=a5,
+            linewidth=1ex,color=red,
+            markstyle=straightmove,
+            markmove=b1-b3,
+            markstyle=cross,markfield=b5,
+            pgfstyle=border,backfield=d5]
+\end{LTXexample}
+
+%??????????????????????????????????
+%vachange an internal command that can be use to set the linewidth
+%e.g. of an arrow or a border. The first key affects both
+%pgf-pictures, the other only the mark or the background layer
+
+\Describefillkey{cornerarc}{length}{2pt}
+\Describefillkey{pgfcornerarc}{length}{2pt}
+\Describefillkey[relict]{backcornerarc}{length}{2pt}
+
+The first two keys save \verb+\def\board at pgf@corner+\marg{length} to
+the pgf-picture(s). The last  key will save the same definition only
+to the background picture and it will ignore the value of the
+\key{usebackpgf} and \key{usepgf} keys. \verb+\board at pgf@corner+ can
+be used e.g. in \cs{pgfsetcornersarced} to round the corners of a
+border. To get sharp corners use the value 0pt.
+
+The value is used currently only used in the border styles.
+
+\begin{LTXexample}
+\chessboard[linewidth=0.3ex,color=red,
+            padding=1ex,
+            pgfstyle=border,
+            backregion=\board,
+            cornerarc=1ex,
+            padding=1.5ex,
+            backregion=\board,
+            pgfstyle=bottomlefttopborder,
+            backregion=c3-f6]
+\end{LTXexample}
+
+
+\Describefillkey{addpgf}{(pgf)-commands}{\cs{pgfsetroundcap}}
+
+With this key you can add arbitrary (pgf)-commands to the pictures.
+Use it with care. When you use the key without an argument it will
+end a pgf scope\index{scope} and  so  reset colors and
+linewidth and some of the other values to their defaults.
+
+\begin{LTXexample}
+\chessboard[
+        showmover=false,
+        inverse,markstyle=leftborder,
+        color=red,linewidth=0.3em,
+        markregion=d3-d5,
+        color=blue,
+        addpgf=\pgfsetroundcap,
+        markregion=e3-e5,
+        addpgf,
+        markstyle=cross,
+        markfield=c4]
+\end{LTXexample}
+
+\Describefillkey{usepgf}{back|mark|all|both|none}{}
+
+With this key you can control in which picture the commands or
+definitions are saved when using the keys described above.
+
+The default is to save everything in both pictures. This means that
+is also adds some superfluous code to the other picture, but I don't
+think this is a problem. In most cases you won't need the key.
+
+
+
+\subsubsection{A special shortcut key for background border}
+
+
+\Describefillkey{pgfborder}{area}{c3-e4}
+
+With this key you can put a border around the area in the background
+picture. The key saves the current style, calls the \key{backstyle}
+and the \key{backregions} keys to draw the border and then restores
+the old style. If you don't give a value to the key, the border is
+around the printarea.
+
+\begin{LTXexample}
+\newchessgame
+\chessboard[%
+ showmover=false,
+ border=false,
+ linewidth=0.4pt,
+ padding=0.4pt,
+ pgfborder,
+ linewidth=1pt,
+ padding=2pt,
+ pgfborder]
+\end{LTXexample}
+
+
+\begin{LTXexample}
+\chessboard[
+ showmover=false,
+ border=false,
+ hlabelwidth=0.6em,
+ vlabellift=1.3em,
+ printarea=c3-f6,
+ pgfstyle=cross,
+ color=red,
+ linewidth=1ex,
+ padding=1ex,
+ pgfborder,
+ markfield=d4,
+ color=blue,
+ linewidth=0.5ex,
+ padding=2.5ex,
+ pgfborder,
+ padding=0ex,
+ color=green,
+ trim=false,%to show the next border
+ pgfborder=\board,
+ markfield=e5]
+\end{LTXexample}
+
+
+
+
+\subsubsection{Special shortcut keys for background color}
+
+
+
+\medskip
+\Describefillkey{colorbackboard}{arbitrary}{}
+\Describefillkey{colorbackarea}{area}{a1-c3}
+\Describefillkey{colorbackareas}{list of areas}{\{a1-c3, f1-f2\}}
+\Describefillkey{colorbackfile}{file}{h}
+\Describefillkey{colorbackfiles}{list of files}{\{g,h\}}
+\Describefillkey{colorbackrank}{rank}{5}
+\Describefillkey{colorbackranks}{list of ranks}{\{8,7\}}
+\Describefillkey{colorbackfield}{field}{g4}
+\Describefillkey{colorbackfields}{list of fields}{\{b5,c6\}}
+\Describefillkey{colorwhitebackfields}{list of fields}{\{b5,c6\}}
+\Describefillkey{colorblackbackfields}{list of fields}{\{b5,c6\}}
+
+
+This keys are shortcuts to color the background of the board. They
+save the current style, color the fields and then restore the style.
+
+
+\begin{LTXexample}
+\chessboard[
+ showmover=false,
+ border=false,
+ pgfstyle=cross,
+ color=red!50,
+ colorwhitebackfields,
+ markfield=d4,
+ color=blue!50,
+ colorblackbackfields,
+ markfield=e5,
+ color=green!50,
+ colorbackarea=d4-e5]
+\end{LTXexample}
+
+
+%\subsection{Marks and highlighting: Adding decoration to the foreground layer}
+
+%
+%
+%\subsection{Coloring the pieces}
+%
+%Coloring the fields isn't really satisfactory. It would be nicer if
+%one could color only the pieces. But as the background and the piece
+%is one char this isn't possible, one needs a font where for each
+%piece there a background mask.  One can fake such a font by either
+%using two chars for the fields with black background, or by not
+%using the chars with black background. I added three experimental
+%encodings to
+%\chessfss and some keys to use them. This isn't perfect but it's a
+%start until better fonts are available.
+%
+%To use the encodings you must load
+%\filetype{lsb1enc.def}, \filetype{lsb2enc.def} and
+%\filetype{lsb3enc.def} e.g.\ with
+%\lstinline+\usepackage[LSB1, LSB2, LSB3, T1]{fontenc}+.
+%
+%\Describesetkey{colorwhite}{color}{red}{--}
+%\Describesetkey{colorblack}{color}{green}{--}
+%
+%This keys colors all black and white pieces.
+%
+%\begin{LTXexample}
+%\chessboard[boardfontencoding=LSB1,
+%            emphstyle=\color{green},
+%            emphboard,
+%            colorwhite=red,
+%            colorblack=blue]
+%\end{LTXexample}
+%
+
+
+%\Describefillkey{piececolor}{color}{red}
+%\Describefillkey{colorpieces}{list of fields}{\{a1,c3\}}
+%With this keys you can color the pieces on some fields.
+%
+%\begin{LTXexample}
+%\def\fieldlist{a1,b1 , c1}%
+%\def\mycolor{blue}%
+%\chessboard[boardfontencoding=LSB1,
+%            emphstyle=\color{green},
+%            emphboard,
+%            piececolor=red,
+%            colorpieces={a8,b8},
+%            piececolor=\mycolor,
+%            colorpieces=\fieldlist]
+%\end{LTXexample}
+
+%\begin{LTXexample}
+% \chessboard[boardfontencoding=LSB1,
+%        colorwhite=red,
+%        colorblack=blue,
+%        addpieces={qd5,ke5,Qd4,Ke4}]
+%\end{LTXexample}
+
+%\subsection{The foreground picture: Marking}
+
+%The following highlighting commands all use one large pgf-picture
+%that is printed above the board. Putting marks on the boards means
+%inserting some pgf code in this picture. The units of the picture are
+%equal to the width and height of a square. For each field there exist
+%a node  with the same name as the field in the middle of field. With
+%the command
+%\lstinline+\pgftransformshift{\pgfpointanchor{+\meta{field}\lstinline+}{center}+
+%one can shift the origin to this field and start to draw.
+%
+
+
+
+%\subsubsection{Adding arbitrary pgf-code}
+
+
+
+
+\subsubsection{Clearing the pgf-pictures}
+
+
+
+
+Removing pgf decoration from the board is easy if you used the
+optional argument of \cs{chessboard}. But what should you do if you
+had added e.g.\ a mark with \cs{setchessboard} for the next four
+board and now want to get rid of it for the fifth? That isn't so easy
+as the code is burried quite deep in a large list.
+
+On the whole there are three possibilities:
+
+
+\begin{itemize}
+\item Use grouping to keep the marks local to some boards.
+
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\setchessboard{tinyboard}
+{\setchessboard{markstyle=cross,
+                markranks=4}
+\chessboard}%
+\chessboard
+\end{LTXexample}
+
+\item Store the keys in a style that you can redefine:
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\storechessboardstyle{mymarks}
+   {markstyle=cross,
+    markranks=4}
+
+\setchessboard{style=mymarks}
+\chessboard%
+\storechessboardstyle{mymarks}{}
+\chessboard
+\end{LTXexample}
+
+
+
+\item Use the following keys to clear the pgf pictures.
+
+\end{itemize}
+
+\Describefillkey{clearpgf}{arbitrary}{}
+\Describefillkey{clearbackpgf}{arbitrary}{}
+\Describefillkey{clearmarkpgf}{arbitrary}{}
+
+(I renamed the keys \key{clearforegroundpgf}%
+\index{clearforegroundpgf (obsolete)|see{clearmarkpgf}} and
+\key{clearbackgroundpgf},%
+\index{clearbackgroundpgf (obsolete)|see{clearbackpgf}} the older names will work too, but I
+suggest that you switch to the new ones.)
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\setchessboard{tinyboard,
+               color=blue,
+               opacity=0.6,
+               colorblackbackfields,
+               color=red,
+               markstyle=cross,
+               markfiles=h}
+\chessboard%
+\chessboard[clearmarkpgf]
+\chessboard[clearbackpgf]%
+\chessboard[clearpgf,
+            markstyle=circle,
+            markranks=4]
+\setchessboard{clearmarkpgf}%
+\chessboard
+\end{LTXexample}
+
+
+\subsubsection{Clipping the pgf pictures}
+
+
+\Describesetkey{clip}{\keylist}{}{false}
+\Describesetkey{markclip}{\keylists}{}{false}
+\Describesetkey{backclip}{\keylists}{}{false}
+
+\index{clip>true (subkey)}%
+\index{clip>false (subkey)}%
+\index{clip>left (subkey)}%
+\index{clip>right (subkey)}%
+\index{clip>top (subkey)}%
+\index{clip>bottom (subkey)}%
+With this keys you can add \emph{one} clipping path to each pgf
+pictures. The clipping paths are always around the print area.  The
+argument of the keys is key-value-list with the possible keys
+\key{true},
+\key{false} to enable or disable the clipping and the four keys
+\key{left}, \key{top}, \key{right} and \key{bottom} which take as
+value a length and are used to set the padding.
+
+As in other keys the value \texttt{true} can be omitted, but this
+also means that you have to use the value \texttt{false} explicitly
+if you only want to set some of the  padding values but not enable
+clipping.
+
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\setchessboard{
+   trim=false,printarea=b2-g7,
+   clip={left=0.5ex,top=0.5ex,
+         right=-0.5ex,bottom=-0.5ex,
+         false},
+   %
+   border=false,linewidth=0.3em,
+   pgfborder,
+   %
+   pgfstyle=color,
+   color=blue!50,
+   backrank=6,backfile=c,
+   color=red!50,
+   markrank=4,markfile=f,
+   %
+   pgfstyle=text,color=black,
+   text=a text in the foreground,
+   markfield=b4,
+   text=a text in the background,
+   backfield=f6}%
+
+\chessboard
+
+\chessboard[markclip]
+
+\chessboard[backclip]
+
+\chessboard[clip]
+\end{LTXexample}
+
+
+\subsubsection{Trimming}
+Clipping cuts simply through the pgf-pictures and throws everything
+away that is outside the printarea. This has the drawback that  in
+the picture there could be e.g. remains of a move arrow that started
+outside the shown board.
+
+Trimming is an attempt for a more intelligent approach: Objects like
+crosses, circles, text, borders and arrows are discarded completely
+if they lie partly or completely outside the defined scope of fields.
+
+\minisec{Trimming to a area}
+\Describefillkey{trimarea}{area|empty}{}
+
+This sets and activates an trimarea. If you omit a value printarea is
+used. If you don't give an area but use the keyword \verb+empty+
+everything following the key will be trimmed. If you want to disable
+trimming use \verb+trimarea=\board+ (or \verb+trim=false+). As a
+default the trimarea is set to  the print area (and so activated).
+
+The value of \key{trimarea} will affect all \emph{following} objects
+drawn with the
+\key{pgfstyle} and the related \key{mark\ldots} and
+\key{back\ldots} keys.
+
+Field related objects will be drawn if the field lies in the area.
+Region related objects will be drawn if the complete region lies in
+the area. Move related objects will be drawn if the complete move
+lies in the area.
+
+
+\begin{LTXexample}
+\newchessgame
+\setchessboard{pgfstyle=color,
+            color=blue!50,
+            backrank=6,
+            trimarea=\myarea,
+            backrank=5,
+            pgfstyle=border,
+            color=red,
+            markregion=d4-d5,
+            markregion=c3-d5,%will disappear
+            pgfstyle=knightmove,
+            color=yellow,
+            markmove=f6-e4,
+            markmove=f7-d5%will disappear
+            }
+\def\myarea{a1-h8}% nothing trimmed
+\chessboard
+
+\def\myarea{d4-f6}% some deco will disappear
+\chessboard
+\end{LTXexample}
+
+\begin{LTXexample}
+\newchessgame
+\setchessboard{pgfstyle=color,
+            color=blue!50,
+            backrank=6,
+            trimarea=\myarea,
+            backrank=5,
+            pgfstyle=border,
+            color=red,
+            markregion=d4-d5,
+            markregion=c3-d5,%will disappear
+            pgfstyle=knightmove,
+            color=yellow,
+            markmove=f6-e4,
+            markmove=f7-d5%will disappear
+            }
+\def\myarea{empty}
+\chessboard
+\end{LTXexample}
+As shown in the previous examples you can set a manual trimarea. But
+you should be aware that you can get unexpected results if this
+area is larger than the printarea:
+
+
+\begin{LTXexample}
+\chessboard[printarea=d4-e5,
+            trimarea=c4-g4,
+            pgfstyle=color,
+            trimtocolor=white,
+            color=red,
+            backboard]
+\end{LTXexample}
+
+\Describefillkey{captrimtoprint}{true|false}{true}
+
+With this key you can force the \emph{following} trimarea commands to
+respect the printarea.
+
+\begin{LTXexample}
+\chessboard[printarea=d4-e5,
+            trimarea=c3-f6,
+            captrimtoprint,
+            pgfstyle=cross,
+            color=red,
+            backboard,
+            trimarea=c3-f6,%now captrimtoprint
+                           %has an effect
+            pgfstyle=circle,
+            color=green,
+            backboard]
+\end{LTXexample}
+
+
+\Describefillkey{trim}{true|false}{true}
+
+This is a shorter version of \key{trimarea}. It can only be used to
+set the trimarea to printarea (true) or the complete board (false).
+
+%Until now I have only implement some code to draw colored squares in
+%the background. I don't know really what else could be useful. The
+%only idea that comes to my mind is some code to insert a real
+%background image, but it is difficult to decide how size and position
+%of such an image should be controlled.
+
+
+\begin{LTXexample}
+\newchessgame
+\mainline{1. e4 e5 2. Nf3 Nc6 3. Bb5 a6}
+\setchessboard{linewidth=0.1em,border=false,
+    label=false,showmover=false}
+\chessboard[printarea=a5-d8,
+   padding=0.25em,
+   trim=false,
+   shortenend=-1ex,
+   pgfstyle=rightborder,
+   markregion=d1-d8,
+   padding=-0.25em,
+   pgfstyle=topborder,
+   markrank=4,
+   marginrightwidth=0.5em,
+   marginbottomwidth=0.5em]%
+\chessboard[printarea=e5-h8,
+   marginleftwidth=0em,
+   marginbottomwidth=0.5em]\\%
+\chessboard[printarea=a1-d4,
+   margintopwidth=0em,
+   marginrightwidth=0.5em]%
+\chessboard[printarea=e1-h4,
+   margintopwidth=0em,
+   marginleftwidth=0em]%
+\end{LTXexample}
+
+
+\minisec{Trimming to the white or black fields}
+
+\Describefillkey{trimtocolor}{white|black|false}{}
+
+The key affects only the field related pgf-objects. Regions and moves
+will ignore it. The key \obsoletekey{applycolor} from previous
+versions has now a similar effect\footnote{I couldn't retain the older behaviour due to the changes
+made in the code.}. This means that the key has changed
+its behaviour: it will now affect also the foreground picture!
+
+\begin{LTXexample}
+\chessboard[printarea=c3-f6,
+            trim, %not really needed, default
+            pgfstyle=color,
+            trimtocolor=white,
+            color=red,
+            backboard,
+            trimarea=b2-g7,
+            trimtocolor=black,
+            color=gray!50,
+            backboard]
+\end{LTXexample}
+
+
+%\medskip
+%\Describefillkey{applycolor}{white|black|all|none}{white}
+% \Describefillkey{colorwhitefields}{arbitrary}{}
+%\Describefillkey{colorblackfields}{arbitrary}{}
+
+%With this key you can chose to color  only the black or the white
+%fields.
+%\begin{LTXexample}
+%\def\myareas{f6-f7, h7-h8}
+%\chessboard[inverse,
+%            printarea=b2-g7,
+%            opacity=0.5,
+%            color=green, padding=-0.2ex,
+%            colorbackareas=\myareas, %trimmed
+%            color=red,
+%            trim=false, %next fields not trimmed
+%            colorbackfields={a1,c3,d4,g8}]
+%\end{LTXexample}
+
+
+\begin{LTXexample}
+\chessboard[printarea=f3-c6,
+            padding=.3ex,
+            trimtocolor=white,
+            color=blue,
+            pgfstyle=cross,
+            backranks=5,
+            color=yellow,
+            trimtocolor=black,
+            trim=false,
+            backfiles={d,e}]
+\end{LTXexample}
+
+
+\begin{LTXexample}
+\chessboard[padding=.3ex,
+            printarea=f3-c6,
+            trimtocolor=white,
+            color=blue,
+            pgfstyle=text,
+            text=\tiny\bfseries white,
+            markboard,
+            color=yellow,
+            trimtocolor=black,
+            text=\tiny\bfseries black,
+            markboard]
+\end{LTXexample}
+
+
+\begin{LTXexample}
+\chessboard[inverse, printarea=a2-g7,
+            boardfontencoding=LSB2,
+            color=lightgray!50,
+            trimtocolor=white,
+            colorbackboard,
+            color=gray!60,
+            trimtocolor=black,
+            colorbackboard]
+\end{LTXexample}\label{stoppgf}
+
+
+
+\subsection{Using a graphic as background}
+
+It isn't really difficult to use a graphic as background of the
+board. You must use a boardfont encoding that hasn't fields and
+fieldmasks. And then you must use trial and error to find out which
+scalefactor and which viewport is fine. There is absolutly no way to
+do this automatically as the border of the board in the graphic is
+unknown. If you change the board size or the size of the left margin,
+you will have to adjust the values.
+
+
+\begin{LTXexample}[width=0.55\textwidth]
+\newchessgame
+\includegraphics
+ [scale=0.477,viewport=-20 17 -20 17]
+ {brett}%
+\chessboard[showmover=false,
+            border=false,
+            label=false,
+            boardfontencoding=LSBC5,
+            boardfontsize=20pt,
+            whitepiececolor=brown!70,
+            blackpiececolor=black,
+            setfontcolors]
+\end{LTXexample}
+
+\subsection{Using the commands of \skaksty}
+
+When used with the option \textsf{ps} \skaksty puts in the middle of
+the right bottom field (that is either h1 or a8) a postscript node
+with the name BM. The highlighting commands of \skaksty use this
+node.
+
+To be able to use the commands also with \cs{chessboard} you must
+load \skaksty with the option \textsf{ps}.
+
+As arguments in the commands of \skaksty you can only use the fields
+of a 8\texttimes8-board.
+
+\medskip
+\Describesetkey{psset}{true|false}{}{false}
+
+This key sets the  node BM at the place where \skaksty expect it,
+\emph{and it sets the psunits to the size of the board}. This can
+affect other pspictures as the changes are made after the board and
+so aren't local to the board (the commands of \skaksty must have a
+fighting chance to get the correct values).
+
+\medskip
+\Describesetkey{psskak}{true|false}{}{false}
+
+This key redefines some internal commands of \skaksty. I had to do it
+in order to get the highlighting commands to work. I don't think that
+it will destroy anything but didn't want to activate the changes
+unasked. The changes are also \emph{not} local to the board (but
+local to the group).
+
+\begin{LTXexample}[graphic={chessboard-skakps}]
+\documentclass[parskip]{scrartcl}
+\usepackage[T1]{fontenc}
+\usepackage[ps]{skak}
+\usepackage{chessboard}
+
+\pagestyle{empty}
+\begin{document}
+\newchessgame
+\chessboard[psskak,psset,pgf=false,
+            inverse]
+\ifpdf\else
+\highlight[X]{c4}
+\highlight[o]{a8}
+\highlight[O]{g1}
+\printknightmove{g8}{f6}
+BM\pnode{A}\ncline{->}{A}{BM}
+\fi
+\end{document}
+\end{LTXexample}
+
+
+
+
+
+\subsection{Intelligent highlighting}
+
+\cs{chessboard} doesn't know anything about chess rules. It can't do
+things like «show me the possible moves of the rock», «show me the
+allowed moves» or «highlight the last move». But as the examples show
+it accepts commands as arguments in the highlighting keys, so it can
+use the intelligence of external commands or applications. E.g.\
+highlighting of the last move would be easy if \skaksty would somehow
+save the last from-field and the last to-field -- something it
+doesn't do now.
+
+\section{Extending the game}
+\subsection{Adding new pieces}
+\DescribeMacro{\cbDefineNewPiece}
+With this command you can add new pieces that can be used on the
+board.
+
+\cs{cbDefineNewPiece}\oarg{game}\marg{color}\marg{char}\marg{on
+white}\marg{on black}
+
+The optional argument \meta{game} has not much use yet as there is
+only one sensible value \texttt{skak} which is the default anyway.
+So leave it out.
+
+\meta{color} should by either \texttt{white} or \texttt{black}, it
+will put the character in the list used by e.g.\ the key
+\key{hidewhite}.
+
+\meta{char} is the character used in FEN and the other input
+arguments. Use a uppercase char for white pieces and a lowercase
+char for the black pieces or the keys like \key{addwhite} won't work
+correctly.
+
+\meta{on white} and \meta{on black} should contain the commands
+needed to print the piece on white and black fields. The symbols
+should be scalable. So you should either use symbols from a font or
+use some resizing command from the graphicx package.
+
+\begingroup
+\begin{LTXexample}[width=0.25\textwidth]
+\makeatletter
+\cbDefineNewPiece{white}{C}
+  {\raisebox{\depth}{\cfss at whitepiececolor
+    $\heartsuit$}}
+  {\BlackEmptySquare%
+   \makebox[0pt][r]{\cfss at whitepiececolor
+    \raisebox{\depth}{%
+     \makebox[1em]{$\heartsuit$}}}}
+\cbDefineNewPiece{black}{c}
+  {\raisebox{\depth}{\cfss at blackpiececolor
+    $\clubsuit$}}
+  {\BlackEmptySquare%
+   \makebox[0pt][r]{\cfss at blackpiececolor
+    \raisebox{\depth}{%
+     \makebox[1em]{$\clubsuit$}}}}
+\makeatother
+\setchessboard{tinyboard,
+  addpieces={cd4,Ce5},addwhite={ca1,Cb1},
+  addblack={ca8,Cb8}}
+\chessboard[addpieces={cd4,Ce5, Ke4}]
+\chessboard[hidewhite]
+\chessboard[boardfontencoding=LSB3,
+  whitepiececolor=red,blackpiececolor=blue,
+  setfontcolors,color=lightgray,
+  trimtocolor=black, colorbackboard]
+\end{LTXexample}
+\endgroup
+
+%\subsection{Clipping and trimming the picture}
+
+
+
+\subsection{Using \texorpdfstring{\cs{chessboard}}{\textbackslash chessboard} for other games}
+
+I have tried to prepare \cs{chessboard} for other games. A lot of
+internal commands can be changed simply by changing the «name of the
+game». Up to now there isn't another game, so I don't know if this
+will really work.
+
+
+It should be easy to make boards for checkers if I find a font
+somewhere. Chinese chess is a bit more complicated as one would have
+to decide how to make the background lines. Go is more complicated
+as the pieces are sometimes numbered, I don't know yet if I could
+implement a good input handling -- but as there is a quite good
+package named igo I don't think I will really look into it.
+
+
+The main problem in any cases is the missing partner: \Pchessboard
+isn't «intelligent». As already mentioned above it doesn't know
+anything about the rules of chess. To be able to show «the running
+game» it needs a partner that does the calculation.
+
+
+
+\section{Compability with other packages}
+
+\subsection{\packagename{skak}}
+\Pchessboard works fine with \skaksty. You can use \cs{chessboard}
+everywhere instead of \cs{showboard} etc.
+
+\subsection{\packagename{texmate}}
+
+The new \packagename{texmate} version use \skaksty to follow the
+game. There is no problem to use \cs{chessboard} where the manual
+suggest \cs{showboard}.  \packagename{texmate} also defines its own
+diagram commands. They use internaly \cs{showboard}. I haven't made
+much tests until now, but it looks like after a simple
+\lstinline+\let\showboard\chessboard+ you can use \cs{chessboard}
+instead. The main problem is that you can't use the argument of
+\cs{chessboard}. You will have to set the board properties with
+\cs{setchessboard}.
+
+
+\subsection{\packagename{beamer}}
+
+I wouldn't have thought it, but I had no problem to use
+\cs{chessboard} with \packagename{beamer}.
+
+The following listing shows an example. If your pdf-reader can handle
+annotations you can see the result in the attached file:
+\attachfile{chessboard_and_beamer.pdf}
+
+\begin{lstlisting}
+\documentclass{beamer}
+\usepackage[T1]{fontenc}
+\usepackage{chessboard, skak}
+\begin{document}
+
+\begin{frame}
+\newchessgame
+\only<1->{\setchessboard{hideall,showmover=false}}
+\only<2->{\setchessboard{showpieces={p,P}}}
+\only<3->{\setchessboard{showpieces={K,k}}}
+\only<4->{\setchessboard{showpieces={Q,q}}}
+\only<5->{\setchessboard{showpieces={R,r}}}
+\only<6->{\setchessboard{showpieces={B,b}}}
+\only<7->{\setchessboard{showpieces={N,n}}}
+\chessboard
+\end{frame}
+
+\begin{frame}
+\newchessgame\setchessboard{markstyle=border,color=blue}
+\only<1>{\mainline{1.e4}}
+\only<1>{\setchessboard{markfields=e4}}
+\only<2>{\hidemoves{1.e4}\mainline{1... e5}}
+\only<2>{\setchessboard{markfields=e5}}
+\only<3>{\hidemoves{1.e4 e5}\mainline{2. Nf3}}
+\only<3>{\setchessboard{markfields=f3}}
+\only<4>{\hidemoves{1.e4 e5 2.Nf3}\mainline{2... Nc6}}
+\only<4>{\setchessboard{markfields=c6}}
+
+\chessboard
+\end{frame}
+\end{document}
+\end{lstlisting}
+
+\subsection{animate}
+
+It also possible to use animate to get «moving» boards (you need a
+recent pdf-viewer to see the effect). But it is quite tiresome to
+input all the moves. That's why I wrote the package
+\packagename{xskak}. It offers a possibility to store all positions
+of a game  with \skaksty and then to loop through them. For an
+example please read the documentation of \packagename{xskak}. Here an
+example of the more tiresome input:
+
+\begin{LTXexample}
+\newchessgame
+\unitlength1pt
+\newcommand\currentboard{%
+ \begin{picture}(150,150)
+ \put(10,10){\chessboard}
+ \end{picture}}
+\begin{animateinline}[autoplay,loop]{1}%
+\currentboard
+\newframe\hidemoves{1.e4}%
+\currentboard
+\newframe\hidemoves{1... e5}%
+\currentboard
+\newframe\hidemoves{2. Nf3}%
+\currentboard
+\newframe\hidemoves{2... Nc6}%
+\currentboard
+\newframe\hidemoves{3.Bb5}%
+\currentboard
+\newframe\hidemoves{3... a6}%
+\currentboard
+\end{animateinline}
+\end{LTXexample}
+
+
+\phantomsection
+\makeatletter\def\index at prologue{\section*{Index}\addcontentsline{toc}{section}{Index}}\makeatother
+\printindex
+\end{document}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf	2019-06-24 21:06:01 UTC (rev 51445)

Property changes on: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.tex	2019-06-24 21:06:01 UTC (rev 51445)
@@ -0,0 +1,31 @@
+\documentclass{beamer}
+\usepackage[T1]{fontenc}
+\usepackage[skaknew]{chessboard, skak}
+\begin{document}
+
+\begin{frame}
+\newgame
+\only<1->{\setchessboard{hideall,showmover=false}}
+\only<2->{\setchessboard{showpieces={p,P}}}
+\only<3->{\setchessboard{showpieces={K,k}}}
+\only<4->{\setchessboard{showpieces={Q,q}}}
+\only<5->{\setchessboard{showpieces={R,r}}}
+\only<6->{\setchessboard{showpieces={B,b}}}
+\only<7->{\setchessboard{showpieces={N,n}}}
+\chessboard
+\end{frame}
+
+\begin{frame}
+\newgame\setchessboard{markstyle=border,color=blue}
+\only<1>{\mainline{1.e4}}
+\only<1>{\setchessboard{markfields=e4}}
+\only<2>{\hidemoves{1.e4}\mainline{1... e5}}
+\only<2>{\setchessboard{markfields=e5}}
+\only<3>{\hidemoves{1.e4 e5}\mainline{2. Nf3}}
+\only<3>{\setchessboard{markfields=f3}}
+\only<4>{\hidemoves{1.e4 e5 2.Nf3}\mainline{2... Nc6}}
+\only<4>{\setchessboard{markfields=c6}}
+
+\chessboard
+\end{frame}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/chessboard/chessboard_and_beamer.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/chessboard/file.fen
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chessboard/file.fen	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/chessboard/file.fen	2019-06-24 21:06:01 UTC (rev 51445)
@@ -0,0 +1 @@
+rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBQKBNR w KQkq e6 0 2

Deleted: trunk/Master/texmf-dist/source/latex/chessboard/chessboard-src.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/chessboard/chessboard-src.dtx	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/source/latex/chessboard/chessboard-src.dtx	2019-06-24 21:06:01 UTC (rev 51445)
@@ -1,5128 +0,0 @@
-%<*chessboard>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{chessboard}[2014/05/01 version v1.7 print chessboards]
-%%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $
-
-%1.4: Changed to restore style key
-%1.5: corrected values for mover key (w/b instead of w/s)
-%1.6: corrected bug in \board at do@getpiecelists (def instead of xdef)
-% 14.3.2011: added \normallineskip=1pt\relax\normallineskiplimit=0pt\relax
-%            (default latex values).
-%            to avoid bad spacing in amsart.cls (see tex.stackexchange discussion)
-\DeclareOption{skaknew}{}%
-\ProcessOptions
-
-\ifx\eTeXversion\@undefined
-  \PackageError{chessboard}
-    {This package may only be run using an\MessageBreak
-     etex in extended mode}
-    {Perhaps you forgot the `*' when making the format with (e)initex.}
-\fi
-
-\ifnum\eTeXversion<2
-  \PackageError{chessboard}
-    {This package requires e-TeX V 2}
-    {You are probably using the obsolete e-TeX V 1.}
-\fi
-
-\RequirePackage{chessfss}[2006/03/31]
-
-
-\RequirePackage{xkeyval}%
-\RequirePackage{xifthen}%
-\RequirePackage{ifpdf}%
-\RequirePackage{tikz}%
-\usepgfmodule{shapes}
-\ifpdf\else
-\RequirePackage{pst-node}%
-\fi
-
-%%%%%%%
-%% naming conventions
-%%%%%%%
-%% internal commands start with board@
-%% counters starts with cnt at board
-%% length starts with len at board
-%% xkeyval commands gets the prefix UFCB (for chess key)
-%% and the families gloinit/locinit, gloset/locset or glofill/locfill
-%% ARGEND is used to end/delimiters inputs
-%%%%%%%%
-
-%%%%
-%% New lengths
-%%%
-
-\newlength\len at board@tempx
-\newlength\len at board@tempy
-
-\newcommand\board at do@getsquaresize[1]{%#1=game
- \cfss at getsquaresize{\csname board@#1 at refpiece\endcsname}}
-
-\newcommand\board at do@globalgetsquaresize[1]{%#1=game
- \cfss at globalgetsquaresize{\csname board@#1 at refpiece\endcsname}}
-
-%%  \settowidth{\global\len at cfss@squarewidth}{\csname board@#1 at refpiece\endcsname}%
-%%  \settodepth{\global\len at cfss@squaredepth}{\csname board@#1 at refpiece\endcsname}%
-%%  \settoheight{\global\len at cfss@squaretotalheight}{\raisebox{\depth}{\csname board@#1 at refpiece\endcsname}}}%
-%%
-
-%%%
-%% New counters
-%%%
-
-%% counters for interating throught files and ranks
-%% Temporary counters, never rely on a value when not set at the start of the loop/command!
-\newcounter{cnt at board@file}%
-\newcounter{cnt at board@rank}%
-\newcounter{cnt at board}%
-
-%% User counters for printing the file and rank numbers.
-\newcounter{filelabel}%
-\renewcommand\thefilelabel{\alph{filelabel}}%
-\newcounter{ranklabel}%
-\renewcommand\theranklabel{\arabic{ranklabel}}
-
-%%%%%
-%% various tools
-%%%%%
-
-%% New setkeys command for inner keys, stolen from xkeyval.tex
-
-\def\board at do@setsinglekeys{\XKV at testopta{\XKV at testoptc\board at XKVsetsinglekeys}}%
-\def\board at XKVsetsinglekeys[#1]#2{%
-  \XKV at checksanitizea{#2}\XKV at resb
-  \let\XKV at naa\@empty
-  \XKV at for@o\XKV at resb\XKV at tempa{%
-    \expandafter\XKV at g@tkeyname\XKV at tempa=\@nil\XKV at tempa
-    \XKV at addtolist@x\XKV at naa\XKV at tempa}%
-  \expandafter\XKV at s@tkeys\expandafter{\XKV at resb}{#1}}%
-
-
-\newcommand\board at do@setsavedkey[2]{%#1 = argument (so that it can be better expanded)
-                                    % #2=key
- \board at do@setsinglekeys*[UFCB]{locfill}{#2=#1}}%
-
-%%% local addto
-
-\newcommand{\board at do@l at addto@macro}[2]{%
-  \edef#1{\unexpanded\expandafter{#1#2}}}
-
-%%% alphabetic numbering with zero, adapted from latex.ltx
-
-\newcommand\zeroalph{}
-
-\def\zeroalph#1{\expandafter\@zeroalph\csname c@#1\endcsname}%
-
-\def\@zeroalph#1{%
-  \ifcase#1Z\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or
-   k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or
-    y\or z\else\@ctrerr\fi}%
-
-%% expanded @namedef
-\def\board at enamedef#1{\expandafter\edef\csname #1\endcsname}%
-
-%% new tests
-
-\newtest{\board at test@isonactivecolor}[2]{%filenr, ranknr b2={2}{2}
- \(\board at test@iswhitefield{#1}{#2}
- \AND
- \boolean{UFCB at locfill@useonwhite}\)
- \OR
- \(
- \(\NOT\board at test@iswhitefield{#1}{#2}\)
- \AND
- \boolean{UFCB at locfill@useonblack}\)}
-
-\newtest{\board at test@iswhitefield}[2]{%filenr, ranknr b2={2}{2}
- \isodd{\number\numexpr #1+#2\relax}}
-
-\newtest{\board at test@isfieldintrimarea}[2]{%%filenr, ranknr
- \NOT \(#1<\board at val@starttrimfilenum\) \AND
- \NOT  \(#1>\board at val@stoptrimfilenum\) \AND
- \NOT \(#2>\board at val@starttrimranknum\) \AND
- \NOT  \(#2<\board at val@stoptrimranknum\)}
-
-\newtest{\board at test@isareaintrimarea}[4]{%%startfilenr, ranknr
-                                          %%stopfilenr, ranknr
- \NOT \(#1<\board at val@starttrimfilenum\) \AND
- \NOT  \(#3>\board at val@stoptrimfilenum\) \AND
- \NOT \(#2>\board at val@starttrimranknum\) \AND
- \NOT  \(#4<\board at val@stoptrimranknum\)}
-
-%%%%%
-%% converting commands
-%%%%%
-
-%%% command to get a (input) char from a number
-\newcommand*\board at conv@numbertochar[1]{{\uccode`!=#1\relax\uppercase{\gdef\board at temp@char{!}}}}%
-
-%% converts a filechar to a number and stores the value in counter #2
-%% in simple case use  \number `#1
-\newcommand*\board at conv@filechartonumber[2]{%
-  \setcounter{#2}{\number`#1 }%
-    \ifthenelse
-     {\value{#2} = 90}%
-     % char =Z
-     {\addtocounter{#2}{-90}}%
-     {\ifthenelse
-       {\value{#2} >96 \AND \value{#2} <123}%
-       %char a-z
-       {\addtocounter{#2}{-96}}%
-         {\PackageError{chessboard}%
-           {Wrong field input}%
-           {chars for files should be Z (for zero) or between a-z}}}}%
-
-%% converts a char to the lower case (to set white and black pieces)
-\newcommand*\board at conv@chartolowerchar[1]{% #1 char
-  \setcounter{cnt at board}{\number`#1 }%
-    \ifthenelse
-     {\value{cnt at board} > 64 \AND \value{cnt at board} < 91}%
-     % char between A-Z
-     {\addtocounter{cnt at board}{+32}%
-      \board at conv@numbertochar{\the\c at cnt@board}}%
-     {\def\board at temp@char{#1}}}%
-
-%% converts a char to the upper case (to set white and black pieces)
-\newcommand*\board at conv@chartoupperchar[1]{% #1 char,
-  \setcounter{cnt at board}{\number`#1 }%
-    \ifthenelse
-     {\value{cnt at board} > 96 \AND \value{cnt at board} < 123}%
-     % char between a-z
-     {\addtocounter{cnt at board}{-32}%
-      \board at conv@numbertochar{\the\c at cnt@board}}%
-     {\def\board at temp@char{#1}}}%
-
-%%%%%
-%% splitting commands
-%%%%%
-
-%% split piece positions like Ka1, Qb3 or Rz20:
-%% use as \board at split@pieceposition Ka10ARGEND
-\def\board at split@pieceposition#1#2#3ARGEND{%
-  \edef\board at temp@curpiece{#1}%
-  \edef\board at temp@curfilechar{#2}%
-  \edef\board at temp@curranknum{\number#3}%
-  \board at conv@filechartonumber{#2}{cnt at board}%
-  \edef\board at temp@curfilenum{\the\value{cnt at board}}}%
-
-%% split fields like a1, b3 or z20:
-%% use as \board at split@field a1ARGEND
-\def\board at split@field#1#2ARGEND{%
-  \edef\board at temp@curfilechar{#1}%
-  \edef\board at temp@curranknum{\number#2}%
-  \board at conv@filechartonumber{#1}{cnt at board}%
-  \edef\board at temp@curfilenum{\the\value{cnt at board}}}%
-
-%% split area like a1-b3
-\def\board at split@area#1-#2ARGEND{%
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at temp@curstartfilenum\board at temp@curfilenum
-  \let\board at temp@curstartranknum\board at temp@curranknum
-  \let\board at temp@curstartfilechar\board at temp@curfilechar
-  \edef\board at temp@curstartfield{\board at temp@curstartfilechar\board at temp@curstartranknum}%
-  \expandafter\board at split@field#2ARGEND%
-  \let\board at temp@curstopfilenum\board at temp@curfilenum
-  \let\board at temp@curstopranknum\board at temp@curranknum%
-  \let\board at temp@curstopfilechar\board at temp@curfilechar
-  \edef\board at temp@curstopfield{\board at temp@curstopfilechar\board at temp@curstopranknum}%
-  }%
-
-%% split and sorts areas like a1-b3
-\def\board at split@areasort#1-#2ARGEND{%
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at temp@curstartfilenum\board at temp@curfilenum
-  \let\board at temp@curstartranknum\board at temp@curranknum
-  \let\board at temp@curstartfilechar\board at temp@curfilechar
-  \expandafter\board at split@field#2ARGEND%
-  \ifthenelse%
-   {\board at temp@curstartfilenum<\board at temp@curfilenum}%
-   {\let\board at temp@curstopfilenum\board at temp@curfilenum
-    \let\board at temp@curstopfilechar\board at temp@curfilechar}%
-   {\let\board at temp@curstopfilenum\board at temp@curstartfilenum
-    \let\board at temp@curstopfilechar\board at temp@curstartfilechar
-    \let\board at temp@curstartfilenum\board at temp@curfilenum
-    \let\board at temp@curstartfilechar\board at temp@curfilechar}%
-  \ifthenelse%
-   {\board at temp@curstartranknum>\board at temp@curranknum}%
-   {\let\board at temp@curstopranknum\board at temp@curranknum}%
-   {\let\board at temp@curstopranknum\board at temp@curstartranknum
-    \let\board at temp@curstartranknum\board at temp@curranknum}%
-  \edef\board at temp@curstartfield{\board at temp@curstartfilechar\board at temp@curstartranknum}%
-  \edef\board at temp@curstopfield{\board at temp@curstopfilechar\board at temp@curstopranknum}%
-  }%
-
-\newcommand\board at do@cliparea[1]{%
-    \expandafter\board at split@areasort#1ARGEND%
-    \ifthenelse%
-    {\board at temp@curstartfilenum<\board at val@startprintfilenum}%
-    {\let\board at temp@curstartfilechar\board at val@startprintfilechar%
-     \let\board at temp@curstartfilenum\board at val@startprintfilenum}%
-    {}%
-    \ifthenelse%
-    {\board at temp@curstartranknum>\board at val@startprintranknum}%
-    {\let\board at temp@curstartranknum\board at val@startprintranknum}%
-    {}%
-    \ifthenelse%
-    {\board at temp@curstopranknum<\board at val@stopprintranknum}%
-    {\let\board at temp@curstopranknum\board at val@stopprintranknum}%
-    {}%
-    \ifthenelse%
-    {\board at temp@curstopfilenum>\board at val@stopprintfilenum}%
-    {\let\board at temp@curstopfilechar\board at val@stopprintfilechar
-     \let\board at temp@curstopfilenum\board at val@stopprintfilenum}%
-    {}%
-    \ifthenelse{\board at temp@curstopfilenum<\board at temp@curstartfilenum}%
-    {\edef\board at temp@curcliparea{}}%
-    {\ifthenelse{\board at temp@curstartranknum<\board at temp@curstopranknum}%
-     {\edef\board at temp@curcliparea{}}%
-     {\edef\board at temp@curcliparea{%
-      \board at temp@curstartfilechar\board at temp@curstartranknum-%
-      \board at temp@curstopfilechar\board at temp@curstopranknum}}}}
-
-%%% Making lists
-
-\newcommand\board at do@getfieldcolorlists{%
-  \setcounter{cnt at board@file}{\board at val@startprintfilenum}%
-  \def\board at val@blackfieldlist{}%
-  \def\board at val@whitefieldlist{}%
-  \whiledo%
-   {\value{cnt at board@file}< \numexpr\board at val@stopprintfilenum+1\relax}%
-   {\setcounter{cnt at board@rank}{\board at val@stopprintranknum}%
-    \whiledo%
-     {\value{cnt at board@rank}<\numexpr\board at val@startprintranknum + 1\relax}%
-     {\setcounter{cnt at board}{\numexpr \the\c at cnt@board at file+\the\c at cnt@board at rank\relax}%
-      \ifthenelse%
-       {\isodd{\value{cnt at board}}}
-       {\ifthenelse%
-         {\equal{\board at val@whitefieldlist}{}}%
-         {\edef\board at val@whitefieldlist{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}}%
-         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
-          \expandafter\board at do@l at addto@macro\expandafter\board at val@whitefieldlist\expandafter{\expandafter,\board at temp@curfield}}}%
-       {\ifthenelse%
-         {\equal{\board at val@blackfieldlist}{}}%
-         {\edef\board at val@blackfieldlist{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}}%
-         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
-          \expandafter\board at do@l at addto@macro\expandafter\board at val@blackfieldlist\expandafter{\expandafter,\board at temp@curfield}}}%
-      \addtocounter{cnt at board@rank}{1}}%
-    \addtocounter{cnt at board@file}{1}}}%
-
-%% getting the list of fields where pieces resides
-%% added 2007-12-11, version 1.5.
-%% the piecelists are stored in cblist<english! char of piece>
-
-\newcommand\board at do@getpiecelists{%
- \setcounter{cnt at board@file}{\board at val@minfilenum}%
- \setcounter{cnt at board@rank}{\board at val@minranknum}%
- \edef\board at temp@curlist{%
- \csname board@\board at val@game @piececharlist\endcsname}%
- \@for\board at temp@piecechar:=\board at temp@curlist
-  \do {%
-   \expandafter\xdef\csname cblist\board at temp@piecechar\endcsname{}%
-   \expandafter\xdef\csname board at temp@\board at temp@piecechar @comma\endcsname{}}%
- \xdef\cblistempty{}%
- \def\board at temp@empty at comma{}%
- \whiledo
-  {\value{cnt at board@file}<\numexpr \board at val@maxfilenum+1\relax}%
-  {\whiledo
-   {\value{cnt at board@rank}<\numexpr \board at val@maxranknum+1\relax}%
-   {\edef\board at temp@piecechar{%
-     \csname
-       board at val@f\the\c at cnt@board at file r\the\c at cnt@board at rank @piecechar\endcsname}%
-   \edef\board at temp@curlist{%
-    \csname cblist\board at temp@piecechar\endcsname}%
-   \edef\board at temp@comma{%
-    \csname board at temp@\board at temp@piecechar @comma\endcsname}%
-   \expandafter\xdef\csname cblist\board at temp@piecechar \endcsname{%
-    \board at temp@curlist
-    \board at temp@comma
-    \alph{cnt at board@file}\the\c at cnt@board at rank}%
-   \expandafter\def
-     \csname board at temp@\board at temp@piecechar @comma\endcsname
-     {,}%
-   \stepcounter{cnt at board@rank}}%
-   \setcounter{cnt at board@rank}{\board at val@minranknum}%
-   \stepcounter{cnt at board@file}}}
-
-
-
-%%splitting an FEN in pieces,
-%%% use as \board at split@fen <arg>X X X X X X ARGEND
-%%% or as \board at split@fen <arg> X X X X X X ARGEND
-\def\board at split@fen#1 #2 #3 #4 #5 #6 #7ARGEND{%
-  \def\board at val@position{#1}%
-  \ifthenelse{\equal{#2}{X}}%
-   {}%
-   {\def\board at val@mover{#2}}%
-  \ifthenelse{\equal{#3}{X}}%
-   {}%
-   {\def\board at val@castling{#3}}%
-  \ifthenelse{\equal{#4}{X}}%
-   {}%
-   {\def\board at val@enpassant{#4}}%
-  \ifthenelse{\equal{#5}{X}}%
-   {}%
-   {\def\board at val@halfmove{#5}}%
-  \ifthenelse{\equal{#6}{X}}%
-   {}%
-   {\def\board at val@fullmove{#6}}%
-    }%
-
-\input{chessboard-keys-main.sty}%
-\input{chessboard-keys-pgf.sty}%
-\input{chessboard-pgf.sty}
-
-%%% command to store the piece for a field
-%%% the input char of the piece is translated to english first
-%%% the char is stored in the command
-%%% board at val@f<filenum>r<ranknum>@piecechar
-
-\newcommand\board at do@storepieceonfield[3]{%#1 piece #2file #3 rank
-  \ifcsname board at val@lang\board at val@curlang @#1\endcsname
-    \expandafter\edef\csname board at val@f#2r#3 at piecechar\endcsname{%
-      \csname board at val@lang\board at val@curlang @#1\endcsname}%
-  \else
-    \PackageError{chessboard}%
-      {Char #1 unknown in input language  \board at val@curlang!}%
-      {You either misspelled the char for the piece or forgot to define it for the current language}%
-  \fi}%
-
-%%% Command to get the piece of a field. Don't know if needed
-
-\newcommand\board at do@getpieceoffield[2]{%#1 file, #2 rank
-    \@nameuse{board at val@f#1r#2 at piecechar}}%
-
-%%% Commands to print (or not print) the piece of a field:
-
-%%% prints an empty field
-\newcommand\board at do@printfieldempty[2]{%fileNr, rankNr
-  \ifthenelse%
-     {\board at test@iswhitefield{#1}{#2}}%white field
-     {\@nameuse{board@\board at val@game @piece at empty@white}}%
-     {\@nameuse{board@\board at val@game @piece at empty@black}}}
-
-%%% the command to print the content of a single field
-\newcommand\board at do@printfieldcontent[2]{%% 1=fileNr 2=rankNr
-   \ifcsname board at val@f#1r#2 at piecechar\endcsname
-    \ifthenelse{\board at test@iswhitefield{#1}{#2}}%white field
-               {\@nameuse{board at the@piece@\@nameuse{board at val@f#1r#2 at piecechar}@white}}%
-               {\@nameuse{board at the@piece@\@nameuse{board at val@f#1r#2 at piecechar}@black}}%
-
-%%               {\@nameuse{board@\board at val@game @piece@\@nameuse{board at val@f#1r#2 at piecechar}@white}}%
-%%               {\@nameuse{board@\board at val@game @piece@\@nameuse{board at val@f#1r#2 at piecechar}@black}}%
-   \else
-    \board at do@printfieldempty{#1}{#2}%
-   \fi}%
-
-%%% the command to print a fieldbox
-\newcommand\board at do@printfieldbox[2]{% 1=fileNr 2=rank
-  \def\board at temp@curfilenum{#1}%
-  \def\board at temp@curranknum{#2}%
-  \raisebox{\len at cfss@squaredepth}[\len at cfss@squaretotalheight][0pt]{%
-    \makebox[\len at cfss@squarewidth][r]{%
-      %% can be used to color only the piece in fonts with masks
-      % deleted 01.06.2006
-      %\def\cfss at piececolor{\csname board at val@f#1r#2 at color\endcsname}%
-      %\csname board at val@f#1r#2 at color\endcsname
-      \csname board at val@f#1r#2 at emph\endcsname % eg. for color, bfseries
-       \makebox[\len at cfss@squarewidth]{%
-         \vphantom{\csname board@\board at val@game @refpiece\endcsname}%
-         \ifcsname board at the@f#1r#2\endcsname
-           \csname board at the@f#1r#2\endcsname
-         \else
-           \board at do@printfieldcontent{#1}{#2}%
-         \fi}}}}%
-
-%%% command to print a rank/row from firstfile to lastfile
-\newcommand\board at do@printrank[3]%#1 rank/rownumber #2 firstfile, #3 lastfile
- {\begingroup
-  \ifUFCB at locset@labelleft
-  \board at do@printlabelleftfield{#1}%
-  \fi
-  \ifthenelse{#2<#3}%
-   {\setcounter{cnt at board@file}{#2}%% #2<#3: 1->n/normal
-    \whiledo%
-     {\value{cnt at board@file}<#3
-      \OR
-      \value{cnt at board@file}=#3}%
-     {\board at do@printfieldbox{\number\value{cnt at board@file}}{#1}%
-      \stepcounter{cnt at board@file}}}%
-   {\setcounter{cnt at board@file}{#2}%% #2>#3 n->1/inverse
-    \whiledo%
-     {\value{cnt at board@file}>#3
-      \OR
-      \value{cnt at board@file}=#3}%
-     {\board at do@printfieldbox{\number\value{cnt at board@file}}{#1}%
-      \addtocounter{cnt at board@file}{-1}}}%
-    \ifUFCB at locset@labelright
-    \board at do@printlabelrightfield{#1}%
-    \fi
-    \endgroup}%
-
-%%% command to hide /show a fields content:
-
-\newcommand*\board at do@showfield[2]{%
-  \@namedef{board at the@f#1r#2}{\board at do@printfieldcontent{#1}{#2}}}
-
-\newcommand*\board at do@showarea[1]{%
- \expandafter\board at split@areasort#1ARGEND%
- %% initialisation
- \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
- \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
- %
- \whiledo
-  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
-  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
-   \whiledo
-    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\board at do@showfield{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
-     \addtocounter{cnt at board@file}{1}%
-     }%
-   \addtocounter{cnt at board@rank}{-1}}}%
-
-\newcommand*\board at do@hidefield[2]{%
-  \@namedef{board at the@f#1r#2}{%
-  \board at do@printfieldempty{#1}{#2}}}
-
-\newcommand*\board at do@hidearea[1]{%
- \expandafter\board at split@areasort#1ARGEND%
- %% initialisation
- \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
- \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
- %
- \whiledo
-  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
-  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
-   \whiledo
-    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\board at do@hidefield{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
-     \addtocounter{cnt at board@file}{1}%
-     }%
-   \addtocounter{cnt at board@rank}{-1}}}%
-
-%% Command to hide a piece type
-
-\newcommand*\board at do@hidetype[1]{% char or empty
-  \ifthenelse%
-   {\equal{#1}{empty}}%
-   {\def\board at temp@char{empty}}%
-   {\board at do@strip #1 ARGEND}%
-  \ifcsname board at val@lang\board at val@curlang @\board at temp@char\endcsname
-   \edef\board at temp@curpiece{%
-      \csname board at val@lang\board at val@curlang @\board at temp@char\endcsname}%
-  \else
-    \PackageError{chessboard}%
-      {Char #1 unknown in input language \board at val@curlang!}%
-      {You either misspelled the char for the piece or forgot to define it for the current language}%
-  \fi
-  \@namedef{board at the@piece@\board at temp@curpiece @white}{%
-   \@nameuse{board@\board at val@game @piece at empty@white}}%
-  \@namedef{board at the@piece@\board at temp@curpiece @black}{%
-   \@nameuse{board@\board at val@game @piece at empty@black}}}%
-
-\newcommand*\board at do@hidetypelist[1]{% charlist
- \@for\board at temp@char:=#1\do
- {\expandafter\board at do@hidetype\expandafter{\board at temp@char}}}
-
-%% Command to show a piece type
-
-\def\board at do@strip #1#2ARGEND{\def\board at temp@char{#1}}
-
-\newcommand*\board at do@showtype[1]{% char or empty
-  \ifthenelse%
-   {\equal{#1}{empty}}%
-   {\def\board at temp@char{empty}}%
-   {\board at do@strip #1 ARGEND}%
-  \ifcsname board at val@lang\board at val@curlang @\board at temp@char\endcsname
-   \edef\board at temp@curpiece{%
-      \csname board at val@lang\board at val@curlang @\board at temp@char\endcsname}%
-  \else
-    \PackageError{chessboard}%
-      {Char #1 unknown in input language  \board at val@curlang!}%
-      {You either misspelled the char for the piece or forgot to define it for the current language}%
-  \fi
-  \board at enamedef{board at the@piece@\board at temp@curpiece @white}{%
-   \noexpand\@nameuse{board@\noexpand\board at val@game @piece@\board at temp@curpiece @white}}%
-  \board at enamedef{board at the@piece@\board at temp@curpiece @black}{%
-   \noexpand\@nameuse{board@\noexpand\board at val@game @piece@\board at temp@curpiece @black}}}%
-
-\newcommand*\board at do@showtypelist[1]{% charlist
- \@for\board at temp@char:=#1\do
- {\expandafter\board at do@showtype\expandafter{\board at temp@char}}}
-
-%%% Clear area
-
-\newcommand\board at do@cleararea[1]{%
- \expandafter\board at split@areasort#1ARGEND%
- %% initialisation
- \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
- \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
- %
- \whiledo
-  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
-  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
-   \whiledo
-    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\board at do@storepieceonfield{empty}{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
-     \addtocounter{cnt at board@file}{1}}%
-   \addtocounter{cnt at board@rank}{-1}}}%
-
-%%%%%%
-%% Scanning a FEN (only the first part) to set the fields
-%%%%%%
-
-\def\@usenone at until@nil#1\@nil{}%
-
-\newcommand\board at scan@fen[1]{%
-  \setcounter{cnt at board@rank}{\board at val@startfenranknum}%
-  \setcounter{cnt at board@file}{\board at val@startfenfilenum}%
-  \expandafter\board at scan@fennext#1\relax\@nil}%
-
-\newcommand\board at scan@fennext[1]{%
-  \ifx#1\relax \expandafter\@usenone at until@nil \fi
-  \afterassignment\board at fork@feninput\count@ 0#1}%
-
-\newcommand\board at fork@feninput{%
-  \ifnum\count@=\z@
-    \expandafter\board at do@process at fenchar
-  \else
-    \expandafter\board at do@process at fennumber
-  \fi}%
-
-\newcommand\board at do@process at fennumber{%
-  \whiledo%
-   {\the\count@>0}%
-   {\ifthenelse%
-     {\(\value{cnt at board@file}>\board at val@startfillfilenum
-        \OR
-        \value{cnt at board@file}=\board at val@startfillfilenum\)
-      \AND
-      \(\value{cnt at board@file}<\board at val@stopfillfilenum
-        \OR
-        \value{cnt at board@file}=\board at val@stopfillfilenum\)
-      \AND
-      \(\value{cnt at board@rank}<\board at val@startfillranknum
-        \OR
-        \value{cnt at board@rank}=\board at val@startfillranknum\)
-      \AND
-      \(\value{cnt at board@rank}>\board at val@stopfillranknum
-        \OR
-        \value{cnt at board@rank}=\board at val@stopfillranknum\)}
-     {\board at do@storepieceonfield{empty}{\the\value{cnt at board@file}}{\the\value{cnt at board@rank}}}%
-     {}%
-    \addtocounter{cnt at board@file}{1}%
-    \advance\count at -1\relax}%
-  \board at scan@fennext}%
-
-\newcommand\board at do@process at fenchar[1]{%
-  \ifthenelse%
-   {\equal{#1}{/}}%
-   {\setcounter{cnt at board@file}{\board at val@startfenfilenum}% new row
-    \addtocounter{cnt at board@rank}{-1}}%
-   {\ifthenelse%
-     %{\value{cnt at board@file}>\board at val@stopfillfilenum}%
-     {\(\value{cnt at board@file}>\board at val@startfillfilenum
-        \OR
-        \value{cnt at board@file}=\board at val@startfillfilenum\)
-      \AND
-      \(\value{cnt at board@file}<\board at val@stopfillfilenum
-        \OR
-        \value{cnt at board@file}=\board at val@stopfillfilenum\)
-      \AND
-      \(\value{cnt at board@rank}<\board at val@startfillranknum
-        \OR
-        \value{cnt at board@rank}=\board at val@startfillranknum\)
-      \AND
-      \(\value{cnt at board@rank}>\board at val@stopfillranknum
-        \OR
-        \value{cnt at board@rank}=\board at val@stopfillranknum\)}
-    %
-     {\board at do@storepieceonfield{#1}{\the\value{cnt at board@file}}{\the\value{cnt at board@rank}}%
-      \addtocounter{cnt at board@file}{1}}%
-     {\addtocounter{cnt at board@file}{1}}%
-   }%
-  \board at scan@fennext}%
-
-%%% Command to add pieces
-
-\newcommand\board at do@addpieces[1]{% List
-  \@for\board at temp@curpiecepos:=#1\do
-    {\expandafter\board at split@pieceposition\board at temp@curpiecepos ARGEND%
-     \board at do@storepieceonfield{\board at temp@curpiece}{\board at temp@curfilenum}{\board at temp@curranknum}}}%
-
-\newcommand\board at do@addwhitepieces[1]{% List
-  \@for\board at temp@curpiecepos:=#1\do
-    {\expandafter\board at split@pieceposition\board at temp@curpiecepos ARGEND%
-     \expandafter\board at conv@chartoupperchar\board at temp@curpiece
-     \board at do@storepieceonfield{\board at temp@char}{\board at temp@curfilenum}{\board at temp@curranknum}}}%
-
-\newcommand\board at do@addblackpieces[1]{% List
-  \@for\board at temp@curpiecepos:=#1\do
-    {\expandafter\board at split@pieceposition\board at temp@curpiecepos ARGEND%
-     \expandafter\board at conv@chartolowerchar\board at temp@curpiece
-     \board at do@storepieceonfield{\board at temp@char}{\board at temp@curfilenum}{\board at temp@curranknum}}}%
-
-%%% Command  to save fen
-
-%%% goes through board and get the fen description of the position
-
-\newcommand*\board at do@getposition{%
-  \setcounter{cnt at board@rank}{\board at val@startstoreranknum}%
-  \board at do@getrankposition{\value{cnt at board@rank}}%
-  \edef\board at val@position{\board at temp@currankposition}%
-  \whiledo%
-   {\value{cnt at board@rank}>\numexpr \board at val@stopstoreranknum\relax}%
-   {\addtocounter{cnt at board@rank}{-1}%
-    \board at do@getrankposition{\value{cnt at board@rank}}%
-    \edef\board at val@position{\board at val@position/\board at temp@currankposition}}}%
-
-\newcommand*\board at do@getrankposition[1]{%
-  \setcounter{cnt at board@file}{\board at val@startstorefilenum}%
-  \setcounter{cnt at board}{0}%
-  \edef\board at temp@currankposition{}%
-  \whiledo%
-   {\value{cnt at board@file}<\numexpr \board at val@stopstorefilenum+1\relax}%
-   {\ifthenelse%
-     {\equal{\csname board at val@f\the\c at cnt@board at file r#1 at piecechar\endcsname}{empty}}%
-     {\stepcounter{cnt at board}}%
-     {\ifthenelse%
-       {\value{cnt at board}>0}%
-       {\edef\board at temp@currankposition{%
-          \board at temp@currankposition
-          \arabic{cnt at board}%
-          \csname board at val@f\the\c at cnt@board at file r\the\c at cnt@board at rank @piecechar\endcsname}%
-        \setcounter{cnt at board}{0}}%
-       {\edef\board at temp@currankposition{%
-          \board at temp@currankposition
-          \csname board at val@f\the\c at cnt@board at file r\the\c at cnt@board at rank @piecechar\endcsname}}}%
-    \addtocounter{cnt at board@file}{1}}%
-  \ifthenelse%
-   {\value{cnt at board}>0}%
-   {\edef\board at temp@currankposition{%
-      \board at temp@currankposition
-      \arabic{cnt at board}}}%
-   {}}%
-
-%% stores the fen in chessgame.<name> (as in skak.sty the \storegame command
-
-\newcommand*\board at do@storefen[1]{%
-  \def\board at temp@curfen{}%
-  \board at do@getposition
-  \edef\board at temp@curfen{\board at val@position\space
-                          \board at val@mover\space
-                          \board at val@castling\space
-                          \board at val@enpassant\space
-                          \board at val@halfmove\space
-                          \board at val@fullmove}%
-  \expandafter\xdef\csname chessgame.#1\endcsname{\board at temp@curfen}}%
-
-%% stores the fen in a file, as in skak.sty the \savegame command
-\newcommand*\board at do@savefen[1]{%
-  \def\board at temp@curfen{}%
-  \board at do@getposition
-  \edef\board at temp@curfen{\board at val@position\space
-                          \board at val@mover\space
-                          \board at val@castling\space
-                          \board at val@enpassant\space
-                          \board at val@halfmove\space
-                          \board at val@fullmove}%
-  \toks0=\expandafter{\board at temp@curfen}%
-  \immediate\openout0=#1.fen%
-  \immediate\write0{\the\toks0}%
-  \immediate\closeout0}%
-
-\newcommand*\board at do@loadfen[1]{%
-   \immediate\openin0=#1.fen\relax
-   \ifeof0
-   \PackageError{chessboard}{File #1.fen not found}{}%
-   \else
-   \immediate\read0 to \board at temp@curfen%
-   \fi
-   \immediate\closein0\relax}
-
-%%%%
-%% Decoration
-%%%%
-
-%%% the command to print the mover
-
-\newcommand\board at do@printtopmover{%
-  \raisebox%
-   {\dimexpr
-     \numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight
-     -\board at val@movertoplift
-     -\height
-   \relax}[0pt][0pt]%
-   {\makebox[0pt][l]{%
-     \hspace*{\board at val@movertopshift}%
-     \fontsize{\board at val@moversize}{\board at val@moversize}\selectfont
-     \ifthenelse%
-      {\equal{\board at val@mover}{w}}%
-      {\ifUFCB at locset@inverse
-       \board at val@moverwhitetop
-       \fi}%
-      {\ifUFCB at locset@inverse\else
-       \board at val@moverblacktop
-       \fi}}}}%
-
-\newcommand\board at do@printbottommover{%#1=color}
-  \raisebox%
-   {\board at val@moverbottomlift}[0pt][0pt]%
-   {\makebox[0pt][l]{%
-     \hspace*{\board at val@moverbottomshift}%
-     \fontsize{\board at val@moversize}{\board at val@moversize}\selectfont
-    \ifthenelse%
-     {\equal{\board at val@mover}{w}}%
-     {\ifUFCB at locset@inverse
-      \else
-       \board at val@moverwhitebottom
-      \fi}%
-     {\ifUFCB at locset@inverse
-       \board at val@moverblackbottom
-      \fi}}}}%
-
-\newcommand\cbDefineMoverStyle[6][]{%
- % #1 can be used for checks
- %#2name, #3=white top, #4=white bottom, #5=black top, #6=black bottom
-    \@namedef{board at val@moverstyle@#2}{%
-     #1\relax
-     \def\board at val@moverwhitetop{#3}%
-     \def\board at val@moverwhitebottom{#4}%
-     \def\board at val@moverblacktop{#5}%
-     \def\board at val@moverblackbottom{#6}}}%
-
-\cbDefineMoverStyle%
-    {circle}
-    {$\circ$}
-    {$\circ$}
-    {$\bullet$}
-    {$\bullet$}
-
-\cbDefineMoverStyle%
-    {square}
-    {\tikz \draw[color=black] (0,0) rectangle (0.65em,0.65em);}
-    {\tikz \draw[color=black] (0,0) rectangle (0.65em,0.65em);}
-    {\tikz \fill[color=black] (0,0) rectangle (0.65em,0.65em);}
-    {\tikz \fill[color=black] (0,0) rectangle (0.65em,0.65em);}
-
-\cbDefineMoverStyle%
- {triangle}
- {\tikz \draw[color=black] (0.6ex,0pt)--(0,1.25ex)--(1.2ex,1.25ex) --cycle;}
- {\tikz \draw[color=black] (0.6ex,1.25ex)--(0,0)--(1.2ex,0) --cycle;}
- {\tikz \fill[color=black] (0.6ex,0pt)--(0,1.25ex)--(1.2ex,1.25ex) --cycle;}
- {\tikz \fill[color=black] (0.6ex,1.25ex)--(0,0)--(1.2ex,0) --cycle;}
-
-
-\cbDefineMoverStyle%
- %#1: optional, can be used for checks
- %#2=style name, #3=white top, #4=white bottom, #5=black top, #6=black bottom
-    [\@ifundefined%
-      {rotatebox}%
-      {\PackageError{chessboard}%
-        {You must load the package graphics or graphicx
-         if you want to use the mover style squarearrow}{}}%
-      {}%
-     \@ifundefined%
-      {ding}%
-      {\PackageError{chessboard}%
-        {You must load the package pifont
-         if you want to use the mover style squarearrow}{}}%
-      {}]
-    {squarearrow}% #2
-    {\rotatebox{-90}{$\square$\,\ding{222}}}%
-    {\rotatebox{90}{$\square$\,\ding{222}}}%
-    {\rotatebox{-90}{$\blacksquare$\,\ding{222}}}%
-    {\rotatebox{90}{$\blacksquare$\,\ding{222}}}%
-
-%%% the command to print the labels text
-
-\newcommand\board at do@printlabelleftfield[1]{%rank
- \begingroup
-  \setcounter{ranklabel}{#1}%
-  \raisebox{\board at val@labelleftlift}[\len at cfss@squaretotalheight][0pt]{%
-    \makebox[0pt][r]{%
-     \makebox[\board at val@labelleftwidth][l]{%
-       \cfss at sidefont
-       \board at val@labelleftfont
-       \selectfont
-       \board at val@labelleftformat}}}%
- \endgroup}%
-
-\newcommand\board at do@printlabelrightfield[1]{%rank
- \begingroup
-  \setcounter{ranklabel}{#1}%
-  \raisebox{\board at val@labelrightlift}[\len at cfss@squaretotalheight][0pt]{%
-    \makebox[0pt][l]{%
-     \makebox[\board at val@labelrightwidth][r]{%
-      \cfss at sidefont
-      \board at val@labelrightfont
-      \selectfont
-      \board at val@labelrightformat}}}%
- \endgroup}%
-
-\newcommand\board at do@printlabelbottomfield{%
-  \raisebox{-\board at val@labelbottomlift}[0pt][0pt]{\makebox[\len at cfss@squarewidth][c]{\board at val@labelbottomformat}}}%
-
-\newcommand\board at do@printlabeltopfield{%
-  \raisebox{\dimexpr\len at cfss@squaretotalheight+\board at val@labeltoplift\relax}[0pt][0pt]%
-   {\makebox[\len at cfss@squarewidth][c]{\board at val@labeltopformat}}}%
-
-\newcommand\board at do@printlabelbottom[2]{%#1 firstfile, #2 lastfile
-  \begingroup
-  \cfss at sidefont
-  \board at val@labelbottomfont
-  \selectfont
-  \makebox[0pt][r]{%
-    \setcounter{cnt at board@file}{#1}%
-    \whiledo%
-      {\board at print@sign\value{cnt at board@file}<\board at print@sign#2
-       \OR
-       \value{cnt at board@file}=#2}%
-      {\setcounter{filelabel}{\value{cnt at board@file}}%
-       \board at do@printlabelbottomfield%
-       \addtocounter{cnt at board@file}{\board at print@sign1}}}%
-  \endgroup}%
-
-\newcommand\board at do@printlabeltop[2]{%#1 firstfile, #2 lastfile
-  \begingroup
-  \cfss at sidefont
-  \board at val@labeltopfont
-  \selectfont
-  \makebox[0pt][l]{%
-    \setcounter{cnt at board@file}{#1}%
-    \whiledo%
-     {\board at print@sign\value{cnt at board@file}<\board at print@sign#2
-      \OR
-      \value{cnt at board@file}=#2}%
-     {\setcounter{filelabel}{\value{cnt at board@file}}%
-      \board at do@printlabeltopfield%
-      \addtocounter{cnt at board@file}{\board at print@sign1}}}%
-  \endgroup}%
-
-%%%%%
-%% highlighting
-
-%%% emphasize piece
-
-\newcommand\board at do@store at pieceemph[2]{%#1filenum, #2ranknum
-  \@ifundefined{board at val@pieceemph}%
-    {\def\board at val@pieceemph{}}%
-    {}%
-  \toks@=\expandafter{\board at val@pieceemph}%
-  \ifUFCB at locfill@coloremph
-    \@temptokena=\expandafter{\board at val@fontcolorstack}%
-  \board at enamedef{%
-     board at val@f#1r#2 at emph}{%
-      \the\toks@\the\@temptokena}%
-  \else
-   \board at enamedef{%
-     board at val@f#1r#2 at emph}{%
-     \the\toks@}%
-   \fi}%
-
-\newcommand\board at do@empharea[1]{%
- \expandafter\board at split@areasort#1ARGEND%
- %% initialisation
- \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
- \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
- %
- \whiledo
-  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
-  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
-   \whiledo
-    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\board at do@store at pieceemph{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
-     \addtocounter{cnt at board@file}{1}}%
-   \addtocounter{cnt at board@rank}{-1}}}%
-
-%%% border of board
-
-\newcommand\board at print@border{%
-  \raisebox{0pt}[0pt][0pt]{%
-   \makebox[0pt][r]{%bottom
-    \board at val@borderbottomcolor
-    \rule[-\board at val@borderbottomwidth]%
-      {\dimexpr
-        \ifUFCB at locset@borderleft
-         \board at val@borderleftwidth +
-        \fi
-        \numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth
-        \ifUFCB at locset@borderright
-         +\board at val@borderrightwidth
-        \fi
-      \relax}%
-      {\ifUFCB at locset@borderbottom\board at val@borderbottomwidth\else0pt\fi}%
-    \ifUFCB at locset@borderright
-     \hspace*{-\board at val@borderrightwidth}%
-    \fi}%
-   \makebox[0pt][r]{%left
-    \board at val@borderleftcolor
-    \rule[\ifUFCB at locset@borderbottom-\board at val@borderbottomwidth\else0pt\fi]%
-      {\ifUFCB at locset@borderleft
-        \board at val@borderleftwidth
-       \else
-        0pt%
-       \fi}
-      {\dimexpr
-        \ifUFCB at locset@borderbottom\board at val@borderbottomwidth +\fi
-        \numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight
-        \ifUFCB at locset@bordertop
-         +\board at val@bordertopwidth
-        \fi
-       \relax}%
-     \hspace*{\numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth}%
-     }%
-     %%
-   \makebox[0pt][r]{%top
-    \board at val@bordertopcolor
-    \rule[\numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight]%
-      {\dimexpr
-        \ifUFCB at locset@borderleft
-         \board at val@borderleftwidth +
-        \fi
-        \numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth
-        \ifUFCB at locset@borderright
-         +\board at val@borderrightwidth
-        \fi
-      \relax}%
-      {\ifUFCB at locset@bordertop\board at val@bordertopwidth\else0pt\fi}%
-     \ifUFCB at locset@borderright
-      \hspace*{-\board at val@borderrightwidth}%
-     \fi}%
-     %%
-   \makebox[0pt][l]{%right
-     \board at val@borderrightcolor
-     \rule[\ifUFCB at locset@borderbottom-\board at val@borderbottomwidth\else0pt\fi]%
-      {\ifUFCB at locset@borderright
-        \board at val@borderrightwidth
-       \else
-        0pt%
-       \fi}%
-      {\dimexpr
-        \ifUFCB at locset@borderbottom\board at val@borderbottomwidth +\fi
-        \numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight
-        \ifUFCB at locset@bordertop
-         +\board at val@bordertopwidth
-        \fi
-       \relax}%
-     }}}
-
-\newcommand\board at do@setpsnode{%
-  \ifpdf\else
-   \ifUFCB at locset@psset
-    \ifUFCB at locset@inverse
-     \pnode(%
-      \dimexpr -1.5\len at cfss@squarewidth +
-       \board at val@startprintfilenum\len at cfss@squarewidth\relax,
-      \dimexpr
-       \board at val@startprintranknum\len at cfss@squaretotalheight
-        -7.5\len at cfss@squaretotalheight\relax){BM}
-    \else
-     \pnode(%
-      \dimexpr 7.5\len at cfss@squarewidth
-       -\board at val@stopprintfilenum\len at cfss@squarewidth\relax,
-      \dimexpr
-       -\board at val@stopprintranknum\len at cfss@squaretotalheight
-       +1.5\len at cfss@squaretotalheight\relax){BM}
-    \fi
-   \fi
-  \fi}
-
-%%%%%%%
-%% the main commands
-%%%%%%
-
-%%% The command that holds saved keys
-
-\def\board at val@savedkeylist{@null=@null}%
-
-\newcommand\storechessboardstyle[2]{%#1 name, #2 key-list
-    \@namedef{board at val@style#1keylist}{#2}}%
-
-\newcommand\setchessboard[1]{%changed 2007-07-03
-     \def\board at temp@keylist{}%
-     \setkeys[UFCB]{@start}{board at expand={#1}}%
-     \toks@=\expandafter{\board at temp@keylist}%
-     \edef\board at temp@command{%
-        \noexpand\setkeys*[UFCB]{gloinit}{\the\toks@}}%
-     \board at temp@command
-     \setrmkeys*[UFCB]{gloset}%
-     \setrmkeys[UFCB]{glofill}}%
-
-\newcommand\chessboard[1][]{%
- \begingroup
-  \normallineskip=1pt\relax\normallineskiplimit=0pt\relax%14.3.2011
-  \savekeys[UFCB]{locset}{\global{psset},\global{psskak},\global{inverse}}%
-%%% Initialisation
-%% combine the the global keys and the keys in argument
- \let\board at temp@keylist\board at val@savedkeylist
- \setkeys[UFCB]{@start}{board at expand={#1}}%
- \toks@=\expandafter{\board at temp@keylist}%
- \edef\board at temp@command{%
-  \noexpand\setkeys*[UFCB]{locinit}{\the\toks@}}%
- \board at temp@command
- %\show\XKV at rm
- \expandafter\board at do@showtypelist\expandafter{\csname board@\board at val@game @piececharlist\endcsname,empty}%
-%% fills the board with the current position
-%% getting the fen of the current position with the fencalculate command of the current game:
-  \csname board@\board at val@game @do at fencalculate\endcsname
-%% saving the current language
-  \let\board at val@savelang\board at val@curlang
-%% setting the fen of the current position and saving it
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   language=english,
-   setfen=\board at val@fencalculate,
-   storefen=current,
-   language=\board at val@savelang}%
-   %\show\XKV at rm  %test
-%% setting the set keys
-  \setrmkeys*[UFCB]{locset}%
-  \edef\printarea{%
-   \board at val@startprintfilechar\board at val@startprintranknum-%
-   \board at val@stopprintfilechar\board at val@stopprintranknum}%
-  \edef\board{%
-   \board at val@maxfilechar\board at val@maxranknum-%
-   \board at val@minfilechar\board at val@minranknum}%
-  \ifUFCB at locset@inverse
-   \gdef\board at print@sign{-}%
-  \else
-   \gdef\board at print@sign{}%
-  \fi
-%% to get the size of the fields
-  \ifUFCB at locset@psset
-   \expandafter\board at do@globalgetsquaresize\expandafter{\board at val@game}%
-  \else
-   \expandafter\board at do@getsquaresize\expandafter{\board at val@game}%
-  \fi
-%% switch to board font an set ex and em
-  \cfss at boardfont
-  \fontdimen5\font=0.5\len at cfss@squarewidth
-  \fontdimen6\font=\len at cfss@squarewidth
-%% initialisation of the pgf-pictures with the anchor and shifts
-  \board at pgf@init
-  \board at do@getfieldcolorlists
-%% setting the fill keys
-   % \show\XKV at rm %test
-  \setrmkeys[UFCB]{locfill}%
-%%% starting to print
-  \ifUFCB at locinit@print
-%% setting the default font colors
-  \board at val@boardfontcolors
-%% the left margin
-   \ifUFCB at locset@marginleft
-    \makebox[\board at val@marginleftwidth]{}%
-   \fi
-%% the background picture
-   \ifUFCB at locset@pgf
-    \makebox[0pt]{%
-     \begin{pgfpicture}%
-      \board at pgf@background
-      \begin{pgfscope}%
-       \board at pgf@extrabackground
-      \end{pgfscope}%
-     \end{pgfpicture}}%
-   \fi
-%% the board
-   \ifUFCB at locset@inverse
-    \setcounter{cnt at board@rank}{\board at val@stopprintranknum}% inv.
-    \parbox[b]{\numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth}%
-     {\parindent0pt\relax\baselineskip=\len at cfss@squaretotalheight\relax%
-      \nointerlineskip
-%% top margin
-      \ifUFCB at locset@margintop
-       \rule{0pt}{\dimexpr\len at cfss@squaretotalheight+\board at val@margintopwidth\relax}%
-      \fi
-      \ifUFCB at locset@labeltop
-       \board at do@printlabeltop{\board at val@stopprintfilenum}{\board at val@startprintfilenum}%
-      \fi
-%% the pieces and side labels
-      \whiledo
-       {\value{cnt at board@rank}<\numexpr\board at val@startprintranknum+1\relax}% inv
-       {\board at do@printrank%
-         {\number\value{cnt at board@rank}}%
-         {\board at val@stopprintfilenum}%
-         {\board at val@startprintfilenum}%
-        \hspace{0pt}%
-        \addtocounter{cnt at board@rank}{1}}%inv
-%% bottom label
-      \ifUFCB at locset@labelbottom
-       \board at do@printlabelbottom{\board at val@stopprintfilenum}{\board at val@startprintfilenum}%
-      \fi}% end parbox
-   \else %not inverse
-    \setcounter{cnt at board@rank}{\board at val@startprintranknum}%
-    \parbox[b]{\numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth}%
-     {\parindent0pt\relax\baselineskip=\len at cfss@squaretotalheight\relax%
-      \nointerlineskip
-%% top margin
-      \ifUFCB at locset@margintop
-       \rule{0pt}{\dimexpr\len at cfss@squaretotalheight+\board at val@margintopwidth\relax}%
-      \fi
-      \ifUFCB at locset@labeltop
-       \board at do@printlabeltop{\board at val@startprintfilenum}{\board at val@stopprintfilenum}%
-      \fi
-%% the pieces and side labels
-      \whiledo
-       {\value{cnt at board@rank}>\numexpr\board at val@stopprintranknum-1\relax}%
-       {\board at do@printrank%
-         {\number\value{cnt at board@rank}}%
-         {\board at val@startprintfilenum}%
-         {\board at val@stopprintfilenum}%
-        \hspace{0pt}%
-        \addtocounter{cnt at board@rank}{-1}}%
-%% bottom label
-      \ifUFCB at locset@labelbottom
-       \board at do@printlabelbottom{\board at val@startprintfilenum}{\board at val@stopprintfilenum}%
-      \fi}% end second parbox
-   \fi %end if inverse
-%%the markground picture
-   \ifUFCB at locset@pgf
-    \makebox[0pt]{%
-     \begin{pgfpicture}%
-      \board at pgf@markground
-      \begin{pgfscope}%
-       \csname board at pgf@extramarkground\endcsname
-      \end{pgfscope}%
-     \end{pgfpicture}}%
-   \fi % end pgf
-     \board at do@setpsnode
- %%
- % Border
- %%%
-   \board at print@border
- %% Mover
-   \ifUFCB at locset@showmover
-    \ifcsname board at val@moverstyle@\board at val@moverstyle\endcsname
-     \csname board at val@moverstyle@\board at val@moverstyle\endcsname
-    \else
-     \PackageWarning{chessboard}%
-      {Moverstyle '\board at val@moverstyle'  is not defined, I will use
-       type square instead}%
-     \board at val@moverstyle at square
-    \fi
-    \board at do@printbottommover%
-    \board at do@printtopmover
-   \fi
- %%
-   \ifUFCB at locset@marginbottom
-    \rule[-\board at val@marginbottomwidth]{0pt}{\board at val@marginbottomwidth}% bottom margin
-   \fi
-   \ifUFCB at locset@marginright
-    \makebox[\board at val@marginrightwidth]{}%right margin
-   \fi
-  \fi %end if print
- \endgroup%% Attention! Keys after the group must be global!
- \ifpdf
- \else
-  \ifthenelse%
-   {\boolean{\XKV at UFCB@locset at psset@value}}%
-   {\psset{xunit=\len at cfss@squarewidth,yunit=\len at cfss@squaretotalheight}}%
-   {}%
-  \ifthenelse%
-   {\boolean{\XKV at UFCB@locset at psskak@value}}%
-   {\let\set at special@psmarkers\board at skak@set at special@psmarkers%
-    \@ifundefined{theps at inverse}{}{%
-     \ifthenelse%
-      {\boolean{\XKV at UFCB@locset at inverse@value}}%
-      {\setcounter{ps at inverse}{180}}%
-      {\setcounter{ps at inverse}{0}}}}%
-   {}%
- \fi %end ifpdf
- }% end chessboard
-
-%%% Changing the  input language
-
-\newcommand\cbDefineLanguage[1]{%
-  \ifcsname board at val@lang#1\endcsname
-   \PackageWarning{chessboard}%
-     {Language #1 already defined}%
-  \else
-   \global\@namedef{board at val@lang#1}{}%
-   \global\@namedef{board at val@lang#1 at empty}{empty}%
-  \fi}%
-
-\newcommand\cbDefineTranslation[3]{%#1 language, #2 english, #3 translation
-    \global\@namedef{board at val@lang#1@#3}{#2}}%
-
-\cbDefineLanguage{german}%
-\cbDefineTranslation{german}{K}{K}%
-\cbDefineTranslation{german}{Q}{D}%
-\cbDefineTranslation{german}{R}{T}%
-\cbDefineTranslation{german}{B}{L}%
-\cbDefineTranslation{german}{N}{S}%
-\cbDefineTranslation{german}{P}{B}%
-\cbDefineTranslation{german}{k}{k}%
-\cbDefineTranslation{german}{q}{d}%
-\cbDefineTranslation{german}{r}{t}%
-\cbDefineTranslation{german}{b}{l}%
-\cbDefineTranslation{german}{n}{s}%
-\cbDefineTranslation{german}{p}{b}%
-
-\cbDefineLanguage{english}%
-\cbDefineTranslation{english}{K}{K}%
-\cbDefineTranslation{english}{Q}{Q}%
-\cbDefineTranslation{english}{R}{R}%
-\cbDefineTranslation{english}{B}{B}%
-\cbDefineTranslation{english}{N}{N}%
-\cbDefineTranslation{english}{P}{P}%
-\cbDefineTranslation{english}{k}{k}%
-\cbDefineTranslation{english}{q}{q}%
-\cbDefineTranslation{english}{r}{r}%
-\cbDefineTranslation{english}{b}{b}%
-\cbDefineTranslation{english}{n}{n}%
-\cbDefineTranslation{english}{p}{p}%
-
-%%% command to add pieces to the list
-
-\newcommand\board at add@chartocolorpiececharlist[3]{% #1 game, #2 color, #3 char
- \ifcsname board@#1@#2piececharlist\endcsname
-  \ifthenelse%
-   {\equal{\csname board@#1@#2piececharlist\endcsname}{}}
-   {\@namedef{board@#1@#2piececharlist}{#3}}
-   {\expandafter\g at addto@macro\csname board@#1@#2piececharlist\endcsname{,#3}}%
- \else
-   \@namedef{board@#1 at piececharlist}{#3}%
- \fi}%
-
-\newcommand\board at add@chartopiececharlist[2]{% #1 game, #2 char
- \ifcsname board@#1 at piececharlist\endcsname
-  \ifthenelse%
-   {\equal{\csname board@#1 at piececharlist\endcsname}{}}%
-   {\@namedef{board@#1 at piececharlist}{#2}}%
-   {\expandafter\g at addto@macro\csname board@#1 at piececharlist\endcsname{,#2}}%
- \else
-   \@namedef{board@#1 at piececharlist}{#2}%
- \fi}%
-
-%%% Adding new pieces
-\newcommand\cbDefineNewPiece[5][skak]{%#1=optional=game, #2=color, #3=char, #4=on white, #5=on black
- \ifcsname board@#1 at piece@#3 at white\endcsname
-  \PackageError{chessboard}{Piece #3 already defined!}{}%
- \else
-  \board at add@chartocolorpiececharlist{#1}{#2}{#3}%
-  \board at add@chartopiececharlist{#1}{#3}%
-  \expandafter\gdef\csname board@#1 at piece@#3 at white\endcsname{#4}%
-  \expandafter\gdef\csname board@#1 at piece@#3 at black\endcsname{#5}%
-  \cbDefineTranslation{english}{#3}{#3}%
- \fi}%
-
-%%% Adding new pieces
-\newcommand\cbReDefineNewPiece[5][skak]{%#1=optional=game, #2=color, #3=char, #4=on white, #5=on black
- \ifcsname board@#1 at piece@#3 at white\endcsname
- \else
-   \PackageWarning{chessboard}{Piece #3 not yet defined! I will define it now}{}%
- \fi
- \board at add@chartocolorpiececharlist{#1}{#2}{#3}%
- \board at add@chartopiececharlist{#1}{#3}%
- \expandafter\gdef\csname board@#1 at piece@#3 at white\endcsname{#4}%
- \expandafter\gdef\csname board@#1 at piece@#3 at black\endcsname{#5}%
- \cbDefineTranslation{english}{#3}{#3}}%
-
-%%% Initialization the piece commands.
-%% game: skak
-
-\newcommand\board at skak@piece at empty@white{\cfss at WhiteEmptySquare}%
-\newcommand\board at skak@piece at empty@black{\cfss at BlackEmptySquare}%
-\newcommand\board at skak@piece at K@white{\cfss at WhiteKingOnWhite}%
-\newcommand\board at skak@piece at K@black{\cfss at WhiteKingOnBlack}%
-\newcommand\board at skak@piece at k@white{\cfss at BlackKingOnWhite}%
-\newcommand\board at skak@piece at k@black{\cfss at BlackKingOnBlack}%
-\newcommand\board at skak@piece at Q@white{\cfss at WhiteQueenOnWhite}%
-\newcommand\board at skak@piece at Q@black{\cfss at WhiteQueenOnBlack}%
-\newcommand\board at skak@piece at q@white{\cfss at BlackQueenOnWhite}%
-\newcommand\board at skak@piece at q@black{\cfss at BlackQueenOnBlack}%
-\newcommand\board at skak@piece at R@white{\cfss at WhiteRookOnWhite}%
-\newcommand\board at skak@piece at R@black{\cfss at WhiteRookOnBlack}%
-\newcommand\board at skak@piece at r@white{\cfss at BlackRookOnWhite}%
-\newcommand\board at skak@piece at r@black{\cfss at BlackRookOnBlack}%
-\newcommand\board at skak@piece at B@white{\cfss at WhiteBishopOnWhite}%
-\newcommand\board at skak@piece at B@black{\cfss at WhiteBishopOnBlack}%
-\newcommand\board at skak@piece at b@white{\cfss at BlackBishopOnWhite}%
-\newcommand\board at skak@piece at b@black{\cfss at BlackBishopOnBlack}%
-\newcommand\board at skak@piece at N@white{\cfss at WhiteKnightOnWhite}%
-\newcommand\board at skak@piece at N@black{\cfss at WhiteKnightOnBlack}%
-\newcommand\board at skak@piece at n@white{\cfss at BlackKnightOnWhite}%
-\newcommand\board at skak@piece at n@black{\cfss at BlackKnightOnBlack}%
-\newcommand\board at skak@piece at P@white{\cfss at WhitePawnOnWhite}%
-\newcommand\board at skak@piece at P@black{\cfss at WhitePawnOnBlack}%
-\newcommand\board at skak@piece at p@white{\cfss at BlackPawnOnWhite}%
-\newcommand\board at skak@piece at p@black{\cfss at BlackPawnOnBlack}%
-
-\newcommand\board at skak@refpiece{%
- \begingroup
-  \fontsize{\cfss at boardfontsize}{\cfss at boardfontsize}%
-  \BlackEmptySquare
- \endgroup}%
-
-\newcommand\board at skak@piececharlist{K,Q,R,B,N,P,k,q,r,b,n,p}%
-\newcommand\board at skak@whitepiececharlist{K,Q,R,B,N,P}%
-\newcommand\board at skak@blackpiececharlist{k,q,r,b,n,p}%
-
-\AtBeginDocument{%
- \@ifpackageloaded{skak}%
-   {\def\board at skak@do at fencalculate{%
-     \Fen at calculate
-     \let\board at val@fencalculate\temp at board}%
-    \def\board at skak@set at special@psmarkers#1#2{%
-     \get at translation#1%
-     \setcounter{fileFrom}{\value{fileTo}}%
-     \setcounter{rankFrom}{\value{rankTo}}%
-     \get at translation#2%
-     \rput(BM){\pnode(-\arabic{fileFrom},\arabic{rankFrom}){From}}%
-     \rput(BM){\pnode(-\arabic{fileTo},\arabic{rankTo}){To}}}}%
-   {\def\board at skak@do at fencalculate{%
-     \def\board at val@fencalculate{8/8/8/8/8/8/8/8}}}}%
-
-%%% Initialization keys
-
-\setkeys*[UFCB]{gloinit}{print,
-                        game=skak,
-                        maxfield=h8,
-                        zero=false,
-                        moverdefault=W,
-                        castlingdefault=KQkq,
-                        enpassantdefault=-,
-                        halfmovedefault=0,
-                        fullmovedefault=1}%
-
-\setkeys*[UFCB]{gloset}{normalboard,
-                       inverse=false,
-                       startprint=\board at val@minfilechar\board at val@maxranknum,
-                       stopprint=\board at val@maxfilechar\board at val@minranknum,
-                       padding=0pt,
-                       psset=false,
-                       psskak=false,
-                       pgf,
-                       %labels
-                       labelleft,labelbottom,
-                       labelfont={}, %defaults from chessfss used
-                       hlabelformat=\arabic{ranklabel},
-                       vlabelformat=\alph{filelabel},
-                       hlabellift=0.35em,
-                       hlabelwidth=1ex,
-                       labelbottomlift=1.1\baselineskip,
-                       labeltoplift=0.2\baselineskip,
-                       %margin
-                       margin,
-                       marginwidth=1em,
-                       border,
-                       borderwidth=0.04em,
-                       bordercolor=black,
-                       %mover
-                       showmover,
-                       moversize=1em,%0.5\len at cfss@squaretotalheight,
-                       moverstyle=square,
-                       moverlift=0pt,
-                       movershift=1ex,
-                       }%
-
-\def\board at pgf@linewidth{0.1em}
-\def\board at pgf@arrow{latex}
-\def\board at pgf@colorbackpadding{0pt}
-\def\board at val@boardfontcolors{}
-\def\board at val@fontcolorstack{}
-\def\board at pgf@corner{0pt}
-\def\board at pgf@shortenstart{0pt}
-\def\board at pgf@shortenend{0pt}
-\def\board at pgf@padding{0pt}
-\setkeys[UFCB]{bez}{x1=1/3,x2=2/3,y1=1,y2=1,clockwise}
-\def\currentfontcolors{\board at val@fontcolorstack}
-\setkeys*[UFCB]{glofill}{language=english,trimtocolor=false,trimarea=\board,trim,usepgf=all,pgfstyle=none}%
-\board at do@setsinglekeys*[UFCB]{locfill}{language=english}%
-
-%</chessboard>
-%<*chessboard-pgf>
-\ProvidesFile{chessboard-pgf.sty}[2014/05/01 version v1.7 pgf code for chessboard.sty]
-%%$Date: 2011/01/11 14:07:20 $$Version: 3d9f59c743f1 $
-
-\newcommand\board at pgf@extrabackground{}%
-\newcommand\board at pgf@extramarkground{}%
-
-\newcommand\board at pgf@addbackground[1]{%#1 commands,
-   \expandafter\board at do@l at addto@macro\csname board at pgf@extrabackground\endcsname{#1}}%
-
-\newcommand\board at pgf@addmarkground[1]{%#1 commands
-   \expandafter\board at do@l at addto@macro\csname board at pgf@extramarkground\endcsname{#1}}%
-
-%% saving the markstyles with option
-
-\newcommand\board at do@savemarkstyle{%
-    \@ifnextchar[\board at do@savemarkstylewithopt\board at do@savemarkstylenoopt}%
-
-\def\board at do@savemarkstylewithopt[#1]#2ARGEND{%
-  \def\board at pgf@curstyleopt{#1}%
-  \def\board at pgf@curmarkstyle{#2}%added 2007.08.15
-  \board at pgf@addmarkground{%
-    \def\board at pgf@curmarkstyle{#2}%
-    \def\board at pgf@curstyleopt{#1}}}%
-
-\def\board at do@savemarkstylenoopt#1ARGEND{%
-  \def\board at pgf@curstyleopt{}%added 2007.08.15
-  \def\board at pgf@curmarkstyle{#1}%
-  \board at pgf@addmarkground{%
-   \def\board at pgf@curstyleopt{}%
-   \def\board at pgf@curmarkstyle{#1}}}%
-
-%% saving the backstyle with option
-\newcommand\board at do@savebackstyle{%
-    \@ifnextchar[\board at do@savebackstylewithopt\board at do@savebackstylenoopt}%
-
-\def\board at do@savebackstylewithopt[#1]#2ARGEND{%
-  \def\board at pgf@curstyleopt{#1}%
-  \board at pgf@addbackground{%
-    \def\board at pgf@curbackstyle{#2}%
-    \def\board at pgf@curstyleopt{#1}}}%
-
-\def\board at do@savebackstylenoopt#1ARGEND{%
-  \def\board at pgf@curbackstyle{#1}%
-  \board at pgf@addbackground{%
-   \def\board at pgf@curstyleopt{}%
-   \def\board at pgf@curbackstyle{#1}}}%
-
-%% init/start pgf commands
-
-\newcommand\board at pgf@clippath{}%
-
-\newcommand\board at pgf@setunits{%
-   \pgfsetxvec{\pgfpoint{\len at cfss@squarewidth}{0cm}}%
-   \pgfsetyvec{\pgfpoint{0cm}{\len at cfss@squaretotalheight}}%
-   \pgfpathrectangle{\pgfpointorigin}{\pgfpointorigin}%
-   \pgfusepath{use as bounding box}}%
-
-\newcommand\board at pgf@addnode[2]{%#1= node name =field name, #2=mark or back
- \expandafter\board at do@l at addto@macro\csname board at pgf@#2ground\endcsname{%
-   \pgfnode{coordinate}{center}{}{#1}{}{}%
-   \pgfusepath{fill}}}%
-
-\newcommand\board at pgf@gotonode[2]{% #1= node name =field name #2=mark or back
- \expandafter\board at do@l at addto@macro\csname board at pgf@#2ground\endcsname{%
-  \pgftransformshift{\pgfpointanchor{#1}{center}}}}%
-
-\newcommand\board at pgf@setanchors[1]{% #1= mark or back
- \setcounter{cnt at board@rank}{0}%
- \setcounter{cnt at board@file}{0}%
- \whiledo %nodes for files
-  {\value{cnt at board@file}<\numexpr\board at val@maxfilenum+1\relax}%
-  {\setcounter{cnt at board@rank}{0}%
-   \whiledo %nodes for on one field for each rank
-    {\value{cnt at board@rank}<\numexpr\board at val@maxranknum+1\relax}%
-    {\edef\board at temp{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
-     \expandafter\board at pgf@addnode\expandafter{\board at temp}{#1}%
-     \expandafter\board at do@l at addto@macro\csname board at pgf@#1ground\endcsname{%
-       \pgftransformshift{\pgfpointxy{0}{1}}}%
-     \addtocounter{cnt at board@rank}{1}}%
-   \edef\board at temp{\zeroalph{cnt at board@file}0}%
-   \expandafter\board at pgf@gotonode\expandafter{\board at temp}{#1}%
-   \addtocounter{cnt at board@file}{1}%
-  \expandafter\board at do@l at addto@macro\csname board at pgf@#1ground\endcsname{% one to the right
-    \pgftransformshift{\pgfpointxy{1}{0}}}}%
-  \expandafter\board at do@l at addto@macro\csname board at pgf@#1ground\endcsname{%
-    \csname board at pgf@#1clippath\endcsname}}%
-
-\newcommand\board at pgf@init{%
-  \def\board at pgf@background{%
-   \board at pgf@setunits
-   \ifUFCB at locset@inverse
-    \pgftransformshift{\pgfpointxy{\board at val@stopprintfilenum}{\board at val@startprintranknum}}%
-    \pgftransformshift{\pgfpointxy{0.5}{0.5}}%
-    \pgftransformrotate{180}%
-   \else
-    \pgftransformshift{\pgfpointxy{-\board at val@startprintfilenum}{-\board at val@stopprintranknum}}%
-    \pgftransformshift{\pgfpointxy{0.5}{0.5}}%
-   \fi}%
-   \board at pgf@setanchors{back}%
-  %
-  \def\board at pgf@markground{%
-   \board at pgf@setunits
-   \ifUFCB at locset@inverse
-    \pgftransformshift{\pgfpointxy{\board at val@startprintfilenum}{\board at val@startprintranknum}}%
-    \pgftransformshift{\pgfpointxy{-0.5}{0.5}}%
-    \pgftransformrotate{180}%
-   \else
-    \pgftransformshift{\pgfpointxy{-\board at val@stopprintfilenum}{-\board at val@stopprintranknum}}%
-    \pgftransformshift{\pgfpointxy{-0.5}{0.5}}%
-   \fi}%
-   \board at pgf@setanchors{mark}}%
-
-%% getting angles/length of a point:
-
-\newcommand\board at pgf@extractangle[2]{%#1 command, #2 pgfpoint
-   \pgfextracty{\len at board@tempy}{#2}%
-   \pgfextractx{\len at board@tempx}{#2}%
-  \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
-  \fi
-   \ifdim\len at board@tempx=0pt\relax
-     \ifdim\len at board@tempy=0pt\relax
-      \def#1{0}%
-     \else
-      \ifdim\len at board@tempy>0pt\relax
-       \def#1{90}%
-      \else
-       \def#1{-90}%
-      \fi
-     \fi
-   \fi
-   \ifdim\len at board@tempy=0pt\relax
-    \ifdim\len at board@tempx=0pt\relax
-      \def#1{0}%
-    \else
-      \ifdim\len at board@tempx>0pt\relax
-       \def#1{0}%
-      \else
-       \def#1{180}%
-      \fi
-    \fi
-   \fi
-   \ifdim\len at board@tempx>0pt\relax
-    \ifdim\len at board@tempy>0pt\relax
-     \pgfmathatan{\len at board@tempy}%
-     \edef#1{\pgfmathresult}%
-    \fi
-    \ifdim\len at board@tempy<0pt\relax
-     \pgfmathatan{\len at board@tempy}%
-     \edef#1{\pgfmathresult}%
-    \fi
-  \fi
-  \ifdim\len at board@tempx<0pt\relax
-    \ifdim\len at board@tempy>0pt\relax
-     \pgfmathatan{-\len at board@tempy}%
-     \pgfmathadd{-\pgfmathresult}{180}%
-     \edef#1{\pgfmathresult}%
-    \fi
-    \ifdim\len at board@tempy<0pt\relax
-     \pgfmathatan{\len at board@tempy}%
-     \pgfmathadd{\pgfmathresult}{180}%
-     \edef#1{\pgfmathresult}%
-    \fi
-  \fi
-   }
-
-
-\newcommand\board at pgf@extractlength[2]{%#1 length, #2 pgfpoint
-   \pgfextracty{\len at board@tempy}{#2}%
-   \pgfextractx{\len at board@tempx}{#2}%
-   \pgfmathveclen{\len at board@tempx}{\len at board@tempy}%
-   #1=\pgfmathresult pt\relax}
-
-
-%% Field decoration:
-%%  The command called by the markarea-key
-
-\newcommand*\board at pgf@add at fieldmarkstyletoarea[1]{% #1 =area
- \expandafter\board at split@areasort#1ARGEND%
- %% initialisation
- \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
- \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
- %
- \whiledo
-  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
-  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
-   \whiledo
-    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
-     \expandafter\board at pgf@addpgftofield\expandafter{\board at temp@curfield}{mark}%
-     \addtocounter{cnt at board@file}{1}}%
-   \addtocounter{cnt at board@rank}{-1}}}%
-
-%% The command called by the backarea-key
-
-\newcommand*\board at pgf@add at fieldbackstyletoarea[1]{% #1 =area
- \expandafter\board at split@areasort#1ARGEND%
- %% initialisation
- \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
- \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
- %
- \whiledo
-  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
-  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
-   \whiledo
-    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
-     \expandafter\board at pgf@addpgftofield\expandafter{\board at temp@curfield}{back}%
-     \addtocounter{cnt at board@file}{1}}%
-   \addtocounter{cnt at board@rank}{-1}}}%
-
-%% The command that puts the code in the picture.
-\newcommand\board at pgf@addpgftofield[2]{%  #1= node name =field name, #2=mark or back
- \expandafter\board at split@field #1ARGEND%
- \ifthenelse%
-  {\board at test@isfieldintrimarea{\board at temp@curfilenum}{\board at temp@curranknum}\AND
-   \board at test@isonactivecolor{\board at temp@curfilenum}{\board at temp@curranknum}}%
-  {\ifcsname board at pgf@fieldstyle\csname board at pgf@cur#2style\endcsname\endcsname
-    \csname board at pgf@add#2ground\endcsname{%
-    \def\currentarea{#1}%
-    \def\currentbq{#1}%
-    \def\currentbk{#1}%
-    \def\currentwq{#1}%
-    \def\currentwk{#1}%
-    \def\currentfrom{#1}%
-    \def\currentto{#1}%
-     \pgftransformshift{\pgfpointanchor{#1}{center}}%
-     \expandafter\let\expandafter\board at pgf@curpgfstyle
-       \csname board at pgf@fieldstyle\csname board at pgf@cur#2style\endcsname\endcsname
-     \edef\next{\noexpand\board at pgf@curpgfstyle
-          {#1}%
-          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
-     \next}%
-  \else
-   \PackageWarning{chessboard}%
-     {#2 style '\csname board at pgf@cur#2style\endcsname'  not defined for fields!
-      I will ignore the #2 commands}%
-  \fi}%
-  {}}%
-
-%% Region decoration
-
-
-\def\board at pgf@backclipleftpadding{0pt}
-\def\board at pgf@backcliptoppadding{0pt}
-\def\board at pgf@backcliprightpadding{0pt}
-\def\board at pgf@backclipbottompadding{0pt}
-\def\board at pgf@markclipleftpadding{0pt}
-\def\board at pgf@markcliptoppadding{0pt}
-\def\board at pgf@markcliprightpadding{0pt}
-\def\board at pgf@markclipbottompadding{0pt}
-\def\board at pgf@usebackclippath{discard}
-\def\board at pgf@usemarkclippath{discard}
-
-\def\board at pgf@markclippath{%
-   \pgfusepath{}%
-   \pgfpathrectanglecorners%
-    {\pgfpointadd%
-      {\pgfpointanchor{\board at val@stopprintfilechar\board at val@startprintranknum}{center}}%
-      {\pgfpointadd
-        {\pgfpointxy{0.5}{0.5}}%
-        {\pgfpoint{\board at pgf@markcliprightpadding}{\board at pgf@markcliptoppadding}}%
-      }}%
-    {\pgfpointadd%
-      {\pgfpointanchor{\board at val@startprintfilechar\board at val@stopprintranknum}{center}}%
-      {\pgfpointadd
-        {\pgfpointxy{-0.5}{-0.5}}
-        {\pgfpoint{-\board at pgf@markclipleftpadding}{-\board at pgf@markclipbottompadding}}%
-      }%
-    }%
-   \pgfusepath{\board at pgf@usemarkclippath}}
-
-\def\board at pgf@backclippath{%
-   \pgfusepath{}%
-   \pgfpathrectanglecorners%
-    {\pgfpointadd%
-      {\pgfpointanchor{\board at val@stopprintfilechar\board at val@startprintranknum}{center}}%
-      {\pgfpointadd
-        {\pgfpointxy{0.5}{0.5}}%
-        {\pgfpoint{\board at pgf@backcliprightpadding}{\board at pgf@backcliptoppadding}}%
-      }}%
-    {\pgfpointadd%
-      {\pgfpointanchor{\board at val@startprintfilechar\board at val@stopprintranknum}{center}}%
-      {\pgfpointadd
-        {\pgfpointxy{-0.5}{-0.5}}
-        {\pgfpoint{-\board at pgf@backclipleftpadding}{-\board at pgf@backclipbottompadding}}%
-      }%
-    }%
-   \pgfusepath{\board at pgf@usebackclippath}}
-
-%% the command called by the markregion key
-%% the command puts the code directly in the pgf as no loop needed
-
-\newcommand\board at pgf@add at regionmarkstyle[2]{% #1=startfield (e.g. a8), #2=stopfield (e.g.h1)
- \expandafter\board at split@areasort#1-#2ARGEND%
- \ifthenelse%
-  {\board at test@isareaintrimarea
-   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
-   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
-  {\ifcsname board at pgf@regionstyle\board at pgf@curmarkstyle\endcsname
-    \board at pgf@addmarkground{%
-    \def\currentarea{#1-#2}%
-    \expandafter\board at split@areasort#1-#2ARGEND%
-    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
-    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
-    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
-    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
-    \def\currentfrom{#1}%
-    \def\currentto{#2}%
-    \pgftransformshift{\pgfpointanchor{#1}{center}}%
-    \expandafter\let\expandafter\board at pgf@curpgfstyle
-       \csname board at pgf@regionstyle\csname board at pgf@curmarkstyle\endcsname\endcsname
-    \edef\next{\noexpand\board at pgf@curpgfstyle
-          {#2}%
-          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
-    \next
-    %\csname board at pgf@regionstyle\board at pgf@curmarkstyle\endcsname{#2}%
-    }%
-  \else
-   \PackageWarning{chessboard}%
-     {mark style '\board at pgf@curmarkstyle'  not defined for regions!
-      I will ignore the mark commands}%
-  \fi}{}}%
-
-%% the command called by the backregion key
-%% the command puts the code directly in the pgf as no loop needed
-
-\newcommand\board at pgf@add at regionbackstyle[2]{% #1=startfield (e.g. a8), #2=stopfield (e.g.h1)
- \expandafter\board at split@areasort#1-#2ARGEND%
- \ifthenelse%
-  {\board at test@isareaintrimarea
-   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
-   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
-  {\ifcsname board at pgf@regionstyle\board at pgf@curbackstyle\endcsname
-   \board at pgf@addbackground{%
-    \def\currentarea{#1-#2}%
-    \expandafter\board at split@areasort#1-#2ARGEND%
-    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
-    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
-    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
-    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
-    \def\currentfrom{#1}%
-    \def\currentto{#2}%
-    \pgftransformshift{\pgfpointanchor{#1}{center}}%
-    \expandafter\let\expandafter\board at pgf@curpgfstyle
-       \csname board at pgf@regionstyle\csname board at pgf@curbackstyle\endcsname\endcsname
-    \edef\next{\noexpand\board at pgf@curpgfstyle
-          {#2}%
-          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
-    \next}%
-  \else
-   \PackageWarning{chessboard}%
-     {back style '\board at pgf@curbackstyle'  not defined for regions!
-      I will ignore the back commands}%
-  \fi}{}}%
-
-%% Move decoration
-%% the command called by the markmove key
-%% the command put the code directly in the pgf as no loop needed
-
-\newcommand\board at pgf@add at movemarkstyle[2]{% #1=from field, #2=to field.
- \expandafter\board at split@areasort#1-#2ARGEND%
- \ifthenelse%
-  {\board at test@isareaintrimarea
-   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
-   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
-  {\ifcsname board at pgf@movestyle\board at pgf@curmarkstyle\endcsname
-   \board at pgf@addmarkground{%
-    \def\currentarea{#1-#2}%
-    \expandafter\board at split@areasort#1-#2ARGEND%
-    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
-    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
-    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
-    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
-    \def\currentfrom{#1}%
-    \def\currentto{#2}%
-    \pgftransformshift{\pgfpointanchor{#1}{center}}%
-    \expandafter\let\expandafter\board at pgf@curpgfstyle
-       \csname board at pgf@movestyle\csname board at pgf@curmarkstyle\endcsname\endcsname
-    \edef\next{\noexpand\board at pgf@curpgfstyle
-          {#2}%
-          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
-    \next
-    }%
-  \else
-   \PackageWarning{chessboard}%
-     {mark style '\board at pgf@curmarkstyle'  not defined for moves!
-      I will ignore the mark commands}%
-  \fi}{}}%
-
-%% the command called by the backmove key
-%% the command put the code directly in the pgf as no loop needed
-
-\newcommand\board at pgf@add at movebackstyle[2]{% #1=from field, #2=to field.
- \expandafter\board at split@areasort#1-#2ARGEND%
- \ifthenelse%
-  {\board at test@isareaintrimarea
-   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
-   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
-  {\ifcsname board at pgf@movestyle\board at pgf@curbackstyle\endcsname
-   \board at pgf@addbackground{%
-   \def\currentarea{#1-#2}%
-    \def\currentarea{#1-#2}%
-    \expandafter\board at split@areasort#1-#2ARGEND%
-    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
-    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
-    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
-    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
-    \def\currentfrom{#1}%
-    \def\currentto{#2}%
-    \pgftransformshift{\pgfpointanchor{#1}{center}}%
-    \expandafter\let\expandafter\board at pgf@curpgfstyle
-       \csname board at pgf@movestyle\csname board at pgf@curbackstyle\endcsname\endcsname
-    \edef\next{\noexpand\board at pgf@curpgfstyle
-          {#2}%
-          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
-    \next
-    }%
-  \else
-   \PackageWarning{chessboard}%
-     {back style '\board at pgf@curbackstyle'  not defined for moves!
-      I will ignore the back commands}%
-  \fi}{}}%
-
-%%% User command to define pgf styles
-\newcommand\cbDefinePgfFieldStyle[2]{%#1=name, #2=pgf-commands
-  \expandafter\def\csname board at pgf@fieldstyle#1\endcsname##1##2{% ##1=field
-    \begin{pgfscope}%                                            % ##2=options
-     #2
-    \end{pgfscope}}}%
-
-\newcommand\cbDefinePgfRegionStyle[2]{%#1=name, #2=pgf-commands
-  \expandafter\def\csname board at pgf@regionstyle#1\endcsname##1##2{% ##1=oposite corner
-    \begin{pgfscope}%                                             % ##2=options
-     #2
-    \end{pgfscope}}}%
-
-\newcommand\cbDefinePgfMoveStyle[2]{%#1=name, #2=pgf-commands
-  \expandafter\def\csname board at pgf@movestyle#1\endcsname##1##2{% ##1 =to corner
-    \begin{pgfscope}%                                           % ##2 = options
-     #2
-    \end{pgfscope}}}%
-
-\let\cbDefineMarkFieldStyle\cbDefinePgfFieldStyle
-\let\cbDefineMarkRegionStyle\cbDefinePgfRegionStyle
-\let\cbDefineMarkMoveStyle\cbDefinePgfMoveStyle
-
-%%% some predefined pgf styles
-
-%% style none,  don't know if useful
-
-\cbDefinePgfFieldStyle{none}{\pgfusepath{discard}}%
-\cbDefinePgfRegionStyle{none}{\pgfusepath{discard}}%
-\cbDefinePgfMoveStyle{none}{\pgfusepath{discard}}%
-
-%% moves
-\cbDefinePgfMoveStyle{straightmove}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \setlength\len at board@tempx{\dimexpr 0.1em + \board at pgf@shortenstart \relax}%
-    \pgfsetshortenstart{\len at board@tempx}%
-    \setlength\len at board@tempx{\board at pgf@shortenend}%
-    \pgfsetshortenend{\len at board@tempx}%
-    \pgfsetarrowsend{\board at pgf@arrow}%
-    \pgfsetroundcap
-    \pgfpathmoveto{\pgfpointorigin}%
-    \pgfpathlineto{\pgfpointanchor{#1}{center}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfMoveStyle{knightmove}{%
-   \pgfsetlinewidth{\board at pgf@linewidth}%
-   \pgfsetarrowsend{\board at pgf@arrow}%
-   \setlength\len at board@tempx{\dimexpr 0.3em + \board at pgf@shortenstart \relax}%
-   \pgfsetshortenstart{\len at board@tempx}%
-   \setlength\len at board@tempx{\board at pgf@shortenend}%
-   \pgfsetshortenend{\len at board@tempx}%
-   \pgfextractx{\len at board@tempx}{\pgfpointanchor{#1}{center}}%
-   \pgfextracty{\len at board@tempy}{\pgfpointanchor{#1}{center}}%
-   \pgfpathmoveto{\pgfpointorigin}%
-   \pgfpathcurveto%
-    {\pgfpoint{0pt}{0.8\len at board@tempy}}%
-    {\pgfpoint{0.2\len at board@tempx}{\len at board@tempy}}%
-    {\pgfpointanchor{#1}{center}}%
-   \pgfusepath{stroke}}%
-
-%new 1.5.
-\newcommand\board at pgf@curvemove[2][]{
- \setkeys[UFCB]{bez}{#1}%
- \pgfsetlinewidth{\board at pgf@linewidth}%
- \pgfsetarrowsend{\board at pgf@arrow}%
- \setlength\len at board@tempx{\dimexpr 0.3em + \board at pgf@shortenstart \relax}%
- \pgfsetshortenstart{\len at board@tempx}%
- \setlength\len at board@tempx{\board at pgf@shortenend}%
- \pgfsetshortenend{\len at board@tempx}%
- \board at pgf@extractangle{\board at temp@angle}{#2}%
- \board at pgf@extractlength{\len at board@tempy}{#2}%
- \pgftransformrotate{\board at temp@angle}%
- \pgfpathmoveto{\pgfpointorigin}%
- \pgfpathcurveto
-  {\pgfpointadd{\pgfpoint{\board at val@bezxi*\len at board@tempy}{0cm}}%
-               {\pgfpointxy{0}{\board at val@pgfsign*\board at val@bezyi}}}%
-  {\pgfpointadd{\pgfpoint{\board at val@bezxii*\len at board@tempy}{0cm}}%
-               {\pgfpointxy{0}{\board at val@pgfsign*\board at val@bezyii}}}%
-  {\pgfpoint{\len at board@tempy}{0cm}}%
- \pgfusepath{stroke}%
-}
-
-\cbDefinePgfMoveStyle{curvemove}{%
-    \board at pgf@curvemove[#2]{\pgfpointanchor{#1}{center}}}%
-
-\def\board at pgf@curvemovestyle at knight{\setkeys[UFCB]{bez}{x1=1/2,x2=2/3,y1=0.5,y2=0.5}}
-%% region
-
-\cbDefinePgfRegionStyle{text}{%
- \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
- \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
- \pgftransformshift
-  {\pgfpointintersectionoflines
-     {\pgfpointxy{-0.5}{0.5}}%
-     {\pgfpointadd
-      {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
-      {\pgfpointxy{0.5}{-0.5}}}%
-     {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{0pt}}%
-       {\pgfpointxy{0.5}{0.5}}}%
-     {\pgfpointadd
-       {\pgfpoint{0pt}{\len at board@tempy}}%
-       {\pgfpointxy{-0.5}{-0.5}}}}%
- \ifthenelse%
-  {\boolean{\XKV at UFCB@locset at inverse@value}}%
-  {\pgftext[rotate=180,#2]{\normalfont\board at pgf@curtext}}%
-  {\pgftext[#2]{\normalfont\board at pgf@curtext}}}%
-
-\cbDefinePgfRegionStyle{border}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfpathrectanglecorners%
-      {\pgfpointadd%
-       {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}%
-       {\pgfpointxy{-0.5}{0.5}}}%
-      {\pgfpointadd%
-       {\pgfpointanchor{#1}{center}}%
-       {\pgfpointadd%
-        {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}%
-        {\pgfpointxy{0.5}{-0.5}}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{color}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfpathrectanglecorners%
-      {\pgfpointadd%
-       {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}%
-       {\pgfpointxy{-0.5}{0.5}}}%
-      {\pgfpointadd%
-       {\pgfpointanchor{#1}{center}}%
-       {\pgfpointadd%
-        {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}%
-        {\pgfpointxy{0.5}{-0.5}}}}%
-    \pgfusepath{fill}}%
-
-\cbDefinePgfRegionStyle{leftborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{\len at board@tempy}}}%
-    \pgfpathlineto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{topborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-      \pgfpointadd{\pgfpointxy{0.5}{0.5}}{\pgfpoint{\len at board@tempx}{\board at pgf@padding}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{rightborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{0.5}}%
-       {\pgfpointadd
-         {\pgfpoint{\len at board@tempx}{0pt}}%
-         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
-      {\pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{bottomborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-      {\pgfpointanchor{#1}{center}}%
-      {\pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-      \pgfpointadd
-       {\pgfpointxy{-0.5}{-0.5}}%
-       {\pgfpointadd
-         {\pgfpoint{0pt}{\len at board@tempy}}%
-         {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-    %\pgfpathlineto{{-\board at pgf@padding}{\len at board@tempy}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{lefttopborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{\len at board@tempy}}}%
-    \pgfpathlineto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{lefttoprightborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{\len at board@tempy}}}%
-    \pgfpathlineto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{toprightborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-       \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{toprightbottomborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
-       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\len at board@tempy}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-       \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{rightbottomborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{0.5}}%
-       {\pgfpointadd
-         {\pgfpoint{\len at board@tempx}{0pt}}%
-         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-   \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
-       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\len at board@tempy}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{rightbottomleftborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{0.5}}%
-       {\pgfpointadd
-         {\pgfpoint{\len at board@tempx}{0pt}}%
-         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-   \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
-       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\len at board@tempy}}%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{0.5}}%
-      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{bottomleftborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-      {\pgfpointanchor{#1}{center}}%
-      {\pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\len at board@tempy}}%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{0.5}}%
-      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfRegionStyle{bottomlefttopborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
-    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-      {\pgfpointanchor{#1}{center}}%
-      {\pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\len at board@tempy}}%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{0.5}}%
-      {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}}%
-    \pgfusepath{stroke}}%
-
-%% Fields
-\cbDefinePgfFieldStyle{cross}{%
-    \pgfsetroundcap
-    \setlength\len at board@tempx{\dimexpr 0.1em + \board at pgf@shortenstart \relax}%
-    \pgfsetshortenstart{\len at board@tempx}%
-    \setlength\len at board@tempx{\dimexpr 0.1em + \board at pgf@shortenend \relax}%
-    \pgfsetshortenend{\len at board@tempx}%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfpathmoveto{\pgfpointxy{0.5}{0.5}}%
-    \pgfpathlineto{\pgfpointxy{-0.5}{-0.5}}%
-    \pgfusepath{stroke}%
-    \pgfpathmoveto{\pgfpointxy{-0.5}{0.5}}%
-    \pgfpathlineto{\pgfpointxy{0.5}{-0.5}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{circle}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \setlength\len at board@tempx{\dimexpr 0.55em + \board at pgf@padding \relax}%
-    \pgfpathcircle{\pgfpointxy{0}{0}}{\len at board@tempx}%
-    \pgfusepath{stroke,#2}}%
-
-\cbDefinePgfFieldStyle{text}{%
-    \ifthenelse%
-     {\boolean{\XKV at UFCB@locset at inverse@value}}%
-     {\pgftext[rotate=180,#2]{\normalfont\board at pgf@curtext}}%
-     {\pgftext[#2]{\normalfont\board at pgf@curtext}}}%
-
-\cbDefinePgfFieldStyle{border}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfpathrectanglecorners
-      {\pgfpointadd%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}%
-       {\pgfpointxy{-0.5}{-0.5}}}%
-      {\pgfpointadd%
-       {\pgfpoint{\board at pgf@padding}{\board at pgf@padding}}%
-       {\pgfpointxy{0.5}{0.5}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{color}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfpathrectanglecorners
-     {\pgfpointadd%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}%
-       {\pgfpointxy{-0.5}{-0.5}}}%
-      {\pgfpointadd%
-       {\pgfpoint{\board at pgf@padding}{\board at pgf@padding}}%
-       {\pgfpointxy{0.5}{0.5}}}%
-    \pgfusepath{fill}}%
-
-\cbDefinePgfFieldStyle{leftborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfpathlineto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{topborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-      \pgfpointadd{\pgfpointxy{0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{rightborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{0.5}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{bottomborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
-    \pgfpathlineto{%
-      \pgfpointadd
-       {\pgfpointxy{-0.5}{-0.5}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{lefttopborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfpathlineto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{lefttoprightborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfpathlineto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\board at pgf@padding}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpoint{\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{toprightborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-     \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\board at pgf@padding}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-       \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{toprightbottomborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{\board at pgf@padding}}%
-       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-       \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{rightbottomborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{0.5}}%
-       {\pgfpointadd
-         {\pgfpoint{0pt}{0pt}}%
-         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-   \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{rightbottomleftborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{0.5}}%
-       {\pgfpointadd
-         {\pgfpoint{0pt}{0pt}}%
-         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
-   \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{0.5}}%
-      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{bottomleftborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{0.5}}%
-      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
-    \pgfusepath{stroke}}%
-
-\cbDefinePgfFieldStyle{bottomlefttopborder}{%
-    \pgfsetlinewidth{\board at pgf@linewidth}%
-    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
-    \pgfsetshortenstart{\board at pgf@shortenstart}%
-    \pgfsetshortenend{\board at pgf@shortenend}%
-    \pgfpathmoveto{%
-     \pgfpointadd
-       {\pgfpointxy{0.5}{-0.5}}%
-       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{-0.5}}%
-      {\pgfpointadd
-       {\pgfpoint{0pt}{0pt}}%
-       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{-0.5}{0.5}}%
-      {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
-    \pgfpathlineto{%
-     \pgfpointadd
-      {\pgfpointxy{0.5}{0.5}}%
-      {\pgfpoint{0pt}{\board at pgf@padding}}}%
-    \pgfusepath{stroke}}%
-
-
-%</chessboard-pgf>
-%<*chessboard-keys-main>
-\ProvidesFile{chessboard-keys-main.sty}[2014/05/01 version v1.7 key definitions for chessboard.sty]
-%%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $
-
-%%file=Linie=column=vertikal=al_f_abetisch= a-h
-%%rank=Reihe=row=horizontal=numbe_r_=1-8
-
-%%%%%%%%%%%%%%%%%%%%%
-%%%% Keys
-%%%%%%%%%%%%%%%%%%%%%
-%%%%
-%%% Nullkey, does nothing
-%%%%
-\define at key[UFCB]{locinit}{@null}{}
-\define at key[UFCB]{locset}{@null}{}
-\define at key[UFCB]{locfill}{@null}{}
-\define at key[UFCB]{gloinit}{@null}{}
-\define at key[UFCB]{gloset}{@null}{}
-\define at key[UFCB]{glofill}{@null}{}
-%%%%
-
-%% internal Keys to expand styles, added in 1.4. to repair xkeyval problem
-
-\define at key[UFCB]{@start}{style}{%
-  \toks@=\expandafter\expandafter\expandafter{\csname board at val@style#1keylist\endcsname}%
-  \edef\@@next{\noexpand\board at do@l at addto@macro\noexpand\board at temp@keylist{,\the\toks@}}%
-  \@@next}
-
-\define at key[UFCB]{@start}{board at expand}{%
- \@for\board at temp@keypair:=#1\do
-  {\expandafter\XKV at g@tkeyname\board at temp@keypair=\@nil\board at temp@keyname
-   \edef\next{\noexpand\key at ifundefined[UFCB]{@start}{\board at temp@keyname}}%
-   \next{\expandafter\board at do@l at addto@macro\expandafter\board at temp@keylist\expandafter{\expandafter,\board at temp@keypair}}%
-        {\edef\@next{\noexpand\setkeys[UFCB]{@start}{\board at temp@keypair}}\@next}}}%
-
-
-%%%%%
-%%% Init keys
-%%%%
-
-%%%
-%% style, can contain any key, so should be processed at start (init).
-%%%
-
-\define at key[UFCB]{locinit}{style}{% D
-  \csname board at use@locstyle@#1\endcsname}
-
-\define at key[UFCB]{gloinit}{style}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,style=#1}}
-
-%%%
-%% defaults, should only be set globally (don't make sense elsewhere)
-%%%
-
-\define at choicekey*[UFCB]{gloinit}{moverdefault}[\board at val@mover]{w,b}{}
-\define at key[UFCB]{gloinit}{castlingdefault}{\def\board at val@castling{#1}}
-\define at key[UFCB]{gloinit}{enpassantdefault}{\def\board at val@enpassant{#1}}
-\define at key[UFCB]{gloinit}{halfmovedefault}{\def\board at val@halfmove{#1}}
-\define at key[UFCB]{gloinit}{fullmovedefault}{\def\board at val@fullmove{#1}}
-
-%%% Dimension of the board
-%%% the right-top corner. Used from clearboard and to set pieces with position
-
-\define at key[UFCB]{locinit}{maxfield}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \edef\board at val@maxfilechar{\board at temp@curfilechar}%
-  \edef\board at val@maxfilenum{\board at temp@curfilenum}%
-  \edef\board at val@maxranknum{\board at temp@curranknum}%
-  %% start rank numbers
-  \edef\board at val@startfenranknum{\board at temp@curranknum}%
-  \edef\board at val@startfillranknum{\board at temp@curranknum}%
-  \edef\board at val@startprintranknum{\board at temp@curranknum}%
-  \edef\board at val@startstoreranknum{\board at temp@curranknum}%
-  %% stop file numbers
-  \edef\board at val@stopfillfilenum{\board at temp@curfilenum}%
-  \edef\board at val@stopprintfilenum{\board at temp@curfilenum}%
-  \edef\board at val@stopstorefilenum{\board at temp@curfilenum}%
-  %% stop file chars
-  \edef\board at val@stopfillfilechar{\board at temp@curfilechar}%
-  \edef\board at val@stopprintfilechar{\board at temp@curfilechar}%
-  \edef\board at val@stopstorefilechar{\board at temp@curfilechar}%
-  }
-
-\define at key[UFCB]{gloinit}{maxfield}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,maxfield=#1}{}}
-
-%%% the left-bottom corner can be set to start with @0.
-%%% Used from clearboard and to set pieces with fen
-%%% boolean key, true is the default, that is zero is the same as zero=true
-
-\define at boolkey[UFCB]{locinit}{zero}[true]{% D
-  \ifUFCB at locinit@zero
-   \def\board at temp@char{Z}%
-   \def\board at temp@num{0}%
-  \else
-   \def\board at temp@char{a}%
-   \def\board at temp@num{1}%
-  \fi
-  \edef\board at val@minfilechar{\board at temp@char}%
-  \edef\board at val@minfilenum{\board at temp@num}%
-  \edef\board at val@minranknum{\board at temp@num}%
-  %% start file numbers
-  \edef\board at val@startfenfilenum{\board at temp@num}%
-  \edef\board at val@startfillfilenum{\board at temp@num}%
-  \edef\board at val@startprintfilenum{\board at temp@num}%
-  \edef\board at val@startstorefilenum{\board at temp@num}%
-  %% start file chars
-  \edef\board at val@startfenfilechar{\board at temp@char}%
-  \edef\board at val@startfillfilechar{\board at temp@char}%
-  \edef\board at val@startprintfilechar{\board at temp@char}%
-  \edef\board at val@startstorefilechar{\board at temp@char}%
-  %% stop rank numbers
-  \edef\board at val@stopfillranknum{\board at temp@num}%
-  \edef\board at val@stopprintranknum{\board at temp@num}%
-  \edef\board at val@stopstoreranknum{\board at temp@num}%
-  }
-
-\define at key[UFCB]{gloinit}{zero}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,zero=#1}{}}
-
-%%% disable the printing
-\define at boolkey[UFCB]{locinit}{print}[true]{} %D
-
-\define at boolkey[UFCB]{gloinit}{print}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,print=#1}{}}
-
-%%%%%%
-%% Set-keys
-%%%%%%
-%%% "print corner"
-
-\define at key[UFCB]{locset}{startprint}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@startprintfilechar\board at temp@curfilechar
-  \let\board at val@startprintfilenum\board at temp@curfilenum
-  \let\board at val@startprintranknum\board at temp@curranknum}
-
-\define at key[UFCB]{gloset}{startprint}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,startprint=#1}{}}
-
-\define at key[UFCB]{locset}{stopprint}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@stopprintfilechar\board at temp@curfilechar
-  \let\board at val@stopprintfilenum\board at temp@curfilenum%
-  \let\board at val@stopprintranknum\board at temp@curranknum}
-
-\define at key[UFCB]{gloset}{stopprint}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,stopprint=#1}{}}
-
-\define at key[UFCB]{locset}{printarea}{% a7-f1 % D
-  \expandafter\board at split@areasort#1ARGEND%
-  \board at do@setsinglekeys*[UFCB]{locset}{%
-    startprint=\board at temp@curstartfield, stopprint=\board at temp@curstopfield}}%
-
-\define at key[UFCB]{gloset}{printarea}{% a7-f1 % D
-  \board at do@l at addto@macro\board at val@savedkeylist{,printarea=#1}{}}%
-
-%%% print inverse
-
-\define at boolkey[UFCB]{locset}{inverse}[true]{} % D
-
-\define at boolkey[UFCB]{gloset}{inverse}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,inverse=#1}{}}
-
-%%%
-%% margin
-%%%
-
-\define at key[UFCB]{locset}{marginleftwidth}{% D
-  \def\board at val@marginleftwidth{#1}}
-
-\define at key[UFCB]{gloset}{marginleftwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,marginleftwidth=#1}{}}
-
-\define at key[UFCB]{locset}{marginrightwidth}{% D
-  \def\board at val@marginrightwidth{#1}}
-
-\define at key[UFCB]{gloset}{marginrightwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,marginrightwidth=#1}{}}
-
-\define at key[UFCB]{locset}{margintopwidth}{% D
-  \def\board at val@margintopwidth{#1}}
-
-\define at key[UFCB]{gloset}{margintopwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,margintopwidth=#1}{}}
-
-\define at key[UFCB]{locset}{marginbottomwidth}{% D
-  \def\board at val@marginbottomwidth{#1}}
-
-\define at key[UFCB]{gloset}{marginbottomwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,marginbottomwidth=#1}{}}
-
-\define at key[UFCB]{locset}{hmarginwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{marginleftwidth=#1, marginrightwidth=#1}}
-
-\define at key[UFCB]{gloset}{hmarginwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{marginleftwidth=#1, marginrightwidth=#1}}
-
-\define at key[UFCB]{locset}{vmarginwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{margintopwidth=#1, marginbottomwidth=#1}}
-
-\define at key[UFCB]{gloset}{vmarginwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{margintopwidth=#1, marginbottomwidth=#1}}
-
-\define at key[UFCB]{locset}{marginwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{%
-      marginleftwidth=#1, marginrightwidth=#1, margintopwidth=#1, marginbottomwidth=#1}}
-
-\define at key[UFCB]{gloset}{marginwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{%
-      marginleftwidth=#1, marginrightwidth=#1, margintopwidth=#1, marginbottomwidth=#1}}
-
-\define at boolkey[UFCB]{locset}{marginleft}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{marginleft}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,marginleft=#1}{}}
-
-\define at boolkey[UFCB]{locset}{marginright}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{marginright}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,marginright=#1}{}}
-
-\define at boolkey[UFCB]{locset}{margintop}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{margintop}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,margintop=#1}{}}
-
-\define at boolkey[UFCB]{locset}{marginbottom}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{marginbottom}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,marginbottom=#1}{}}
-
-\define at boolkey[UFCB]{locset}{hmargin}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{marginleft=#1, marginright=#1}}
-
-\define at boolkey[UFCB]{gloset}{hmargin}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{marginleft=#1, marginright=#1}}
-
-\define at boolkey[UFCB]{locset}{vmargin}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{margintop=#1, marginbottom=#1}}
-
-\define at boolkey[UFCB]{gloset}{vmargin}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{margintop=#1, marginbottom=#1}}
-
-\define at boolkey[UFCB]{locset}{margin}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{marginleft=#1, marginright=#1, margintop=#1, marginbottom=#1}}
-
-\define at boolkey[UFCB]{gloset}{margin}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{marginleft=#1, marginright=#1, margintop=#1, marginbottom=#1}}
-
-%% border
-
-\define at boolkey[UFCB]{locset}{borderleft}[true]{} % D
-
-\define at boolkey[UFCB]{gloset}{borderleft}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderleft=#1}{}}
-
-\define at boolkey[UFCB]{locset}{borderright}[true]{} % D
-
-\define at boolkey[UFCB]{gloset}{borderright}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderright=#1}{}}
-
-\define at boolkey[UFCB]{locset}{bordertop}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{bordertop}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,bordertop=#1}{}}
-
-\define at boolkey[UFCB]{locset}{borderbottom}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{borderbottom}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderbottom=#1}{}}
-
-\define at boolkey[UFCB]{locset}{hborder}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{borderleft=#1, borderright=#1}}
-
-\define at boolkey[UFCB]{gloset}{hborder}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{borderleft=#1, borderright=#1}}
-
-\define at boolkey[UFCB]{locset}{vborder}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{bordertop=#1, borderbottom=#1}}
-
-\define at boolkey[UFCB]{gloset}{vborder}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{bordertop=#1, borderbottom=#1}}
-
-\define at boolkey[UFCB]{locset}{border}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{borderleft=#1, borderright=#1, bordertop=#1, borderbottom=#1}}
-
-\define at boolkey[UFCB]{gloset}{border}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{borderleft=#1, borderright=#1, bordertop=#1, borderbottom=#1}}
-
-\define at key[UFCB]{locset}{borderleftwidth}{% D
-  \def\board at val@borderleftwidth{#1}}
-
-\define at key[UFCB]{gloset}{borderleftwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderleftwidth=#1}{}}
-
-\define at key[UFCB]{locset}{borderrightwidth}{% D
-  \def\board at val@borderrightwidth{#1}}
-
-\define at key[UFCB]{gloset}{borderrightwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderrightwidth=#1}{}}
-
-\define at key[UFCB]{locset}{bordertopwidth}{% D
-  \def\board at val@bordertopwidth{#1}}
-
-\define at key[UFCB]{gloset}{bordertopwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,bordertopwidth=#1}{}}
-
-\define at key[UFCB]{locset}{borderbottomwidth}{% D
-  \def\board at val@borderbottomwidth{#1}}
-
-\define at key[UFCB]{gloset}{borderbottomwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderbottomwidth=#1}{}}
-
-\define at key[UFCB]{locset}{hborderwidth}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{borderleftwidth=#1, borderrightwidth=#1}}
-
-\define at key[UFCB]{gloset}{hborderwidth}{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{borderleftwidth=#1, borderrightwidth=#1}}
-
-\define at key[UFCB]{locset}{vborderwidth}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{bordertopwidth=#1, borderbottomwidth=#1}}
-
-\define at key[UFCB]{gloset}{vborderwidth}{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{bordertopwidth=#1, borderbottomwidth=#1}}
-
-\define at key[UFCB]{locset}{borderwidth}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{%
-   borderleftwidth=#1, borderrightwidth=#1, bordertopwidth=#1, borderbottomwidth=#1}}
-
-\define at key[UFCB]{gloset}{borderwidth}{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{%
-   borderleftwidth=#1, borderrightwidth=#1, bordertopwidth=#1, borderbottomwidth=#1}}
-
-%%% border color
-
-\define at key[UFCB]{locset}{borderleftcolor}{% D
-  \def\board at val@borderleftcolor{\color{#1}}}
-
-\define at key[UFCB]{gloset}{borderleftcolor}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderleftcolor=#1}{}}
-
-\define at key[UFCB]{locset}{borderrightcolor}{% D
-  \def\board at val@borderrightcolor{\color{#1}}}
-
-\define at key[UFCB]{gloset}{borderrightcolor}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderrightcolor=#1}{}}
-
-\define at key[UFCB]{locset}{bordertopcolor}{% D
-  \def\board at val@bordertopcolor{\color{#1}}}
-
-\define at key[UFCB]{gloset}{bordertopcolor}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,bordertopcolor=#1}{}}
-
-\define at key[UFCB]{locset}{borderbottomcolor}{% D
-  \def\board at val@borderbottomcolor{\color{#1}}}
-
-\define at key[UFCB]{gloset}{borderbottomcolor}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,borderbottomcolor=#1}{}}
-
-\define at key[UFCB]{locset}{hbordercolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{borderleftcolor=#1, borderrightcolor=#1}}
-
-\define at key[UFCB]{gloset}{hbordercolor}{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{borderleftcolor=#1, borderrightcolor=#1}}
-
-\define at key[UFCB]{locset}{vbordercolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{bordertopcolor=#1, borderbottomcolor=#1}}
-
-\define at key[UFCB]{gloset}{vbordercolor}{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{bordertopcolor=#1, borderbottomcolor=#1}}
-
-\define at key[UFCB]{locset}{bordercolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{%
-    borderleftcolor=#1, borderrightcolor=#1, bordertopcolor=#1, borderbottomcolor=#1}}
-
-\define at key[UFCB]{gloset}{bordercolor}{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{%
-    borderleftcolor=#1, borderrightcolor=#1, bordertopcolor=#1, borderbottomcolor=#1}}
-
-%%%%
-%% font
-%%%
-
-\define at key[UFCB]{locset}{boardfontsize}{% D
-  \setboardfontsize{#1}}
-
-\define at key[UFCB]{gloset}{boardfontsize}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontsize=#1}{}}
-
-\define at key[UFCB]{locset}{boardfontfamily}{% D
-  \setboardfontfamily{#1}}
-
-\define at key[UFCB]{gloset}{boardfontfamily}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontfamily=#1}{}}
-
-\define at key[UFCB]{locset}{boardfontseries}{% D
-  \setboardfontseries{#1}}
-
-\define at key[UFCB]{gloset}{boardfontseries}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontseries=#1}{}}
-
-%% shorter name:
-
-\define at key[UFCB]{locset}{fontsize}{%
- \board at do@setsinglekeys*[UFCB]{locset}{boardfontsize=#1}}
-
-\define at key[UFCB]{gloset}{fontsize}{%
- \board at do@setsinglekeys*[UFCB]{gloset}{boardfontsize=#1}}
-
-\define at key[UFCB]{locset}{fontfamily}{%
- \board at do@setsinglekeys*[UFCB]{locset}{boardfontfamily=#1}}
-
-\define at key[UFCB]{gloset}{fontfamily}{%
- \board at do@setsinglekeys*[UFCB]{locset}{boardfontfamily=#1}}
-
-%%% only for the sake of completeness. Better don't mention it.
-\define at key[UFCB]{locset}{boardfontencoding}{% D
-  \def\cfss at boardfontencoding{#1}}
-
-\define at key[UFCB]{gloset}{boardfontencoding}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontencoding=#1}{}}
-
-%%% mover
-
-\define at boolkey[UFCB]{locset}{showmover}[true]{} % D
-
-\define at boolkey[UFCB]{gloset}{showmover}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,showmover=#1}{}}
-
-\define at key[UFCB]{locset}{moversize}{% D
-  \def\board at val@moversize{#1}}
-
-\define at key[UFCB]{gloset}{moversize}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,moversize=#1}{}}
-
-\define at key[UFCB]{locset}{moverstyle}{% D
-  \def\board at val@moverstyle{#1}}
-
-\define at key[UFCB]{gloset}{moverstyle}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,moverstyle=#1}{}}
-
-\define at key[UFCB]{locset}{moverbottomlift}{% D
-  \def\board at val@moverbottomlift{#1}}
-
-\define at key[UFCB]{gloset}{moverbottomlift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,moverbottomlift=#1}{}}
-
-\define at key[UFCB]{locset}{movertoplift}{% D
-  \def\board at val@movertoplift{#1}}
-
-\define at key[UFCB]{gloset}{movertoplift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,movertoplift=#1}{}}
-
-\define at key[UFCB]{locset}{moverlift}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{moverbottomlift=#1,movertoplift=#1}}
-
-\define at key[UFCB]{gloset}{moverlift}{% D
-   \board at do@setsinglekeys*[UFCB]{gloset}{moverbottomlift=#1,movertoplift=#1}}
-
-\define at key[UFCB]{locset}{moverbottomshift}{% D
-  \def\board at val@moverbottomshift{#1}}
-
-\define at key[UFCB]{gloset}{moverbottomshift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,moverbottomshift=#1}{}}
-
-\define at key[UFCB]{locset}{movertopshift}{% D
-  \def\board at val@movertopshift{#1}}
-
-\define at key[UFCB]{gloset}{movertopshift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,movertopshift=#1}{}}
-
-\define at key[UFCB]{locset}{movershift}{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{moverbottomshift=#1, movertopshift=#1}}
-
-\define at key[UFCB]{gloset}{movershift}{% D
- \board at do@setsinglekeys*[UFCB]{gloset}{moverbottomshift=#1, movertopshift=#1}}
-
-%%% labels
-
-\define at boolkey[UFCB]{locset}{labelleft}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{labelleft}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelleft=#1}{}}
-
-\define at boolkey[UFCB]{locset}{labelright}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{labelright}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelright=#1}{}}
-
-\define at boolkey[UFCB]{locset}{labeltop}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{labeltop}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labeltop=#1}{}}
-
-\define at boolkey[UFCB]{locset}{labelbottom}[true]{} %D
-
-\define at boolkey[UFCB]{gloset}{labelbottom}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottom=#1}{}}
-
-\define at boolkey[UFCB]{locset}{hlabel}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{labelleft=#1, labelright=#1}}
-
-\define at boolkey[UFCB]{gloset}{hlabel}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{labelleft=#1, labelright=#1}}
-
-\define at boolkey[UFCB]{locset}{vlabel}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{labeltop=#1, labelbottom=#1}}
-
-\define at boolkey[UFCB]{gloset}{vlabel}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{labeltop=#1, labelbottom=#1}}
-
-\define at boolkey[UFCB]{locset}{label}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{%
-    labelleft=#1, labelright=#1, labeltop=#1, labelbottom=#1}}
-
-\define at boolkey[UFCB]{gloset}{label}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{%
-    labelleft=#1, labelright=#1, labeltop=#1, labelbottom=#1}}
-
-%% width
-\define at key[UFCB]{locset}{labelleftwidth}{% D
-  \def\board at val@labelleftwidth{#1}}
-
-\define at key[UFCB]{gloset}{labelleftwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftwidth=#1}{}}
-
-\define at key[UFCB]{locset}{labelrightwidth}{% D
-  \def\board at val@labelrightwidth{#1}}
-
-\define at key[UFCB]{gloset}{labelrightwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightwidth=#1}{}}
-
-\define at key[UFCB]{locset}{labelbottomwidth}{% D
-  \def\board at val@labelbottomwidth{#1}}
-
-\define at key[UFCB]{gloset}{labelbottomwidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomwidth=#1}{}}
-
-\define at key[UFCB]{locset}{hlabelwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{labelleftwidth=#1, labelrightwidth=#1}}
-
-\define at key[UFCB]{gloset}{hlabelwidth}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftwidth=#1, labelrightwidth=#1}}
-
-%% lift
-\define at key[UFCB]{locset}{labelleftlift}{% D
-  \def\board at val@labelleftlift{#1}}
-
-\define at key[UFCB]{gloset}{labelleftlift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftlift=#1}{}}
-
-\define at key[UFCB]{locset}{labelrightlift}{% D
-  \def\board at val@labelrightlift{#1}}
-
-\define at key[UFCB]{gloset}{labelrightlift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightlift=#1}{}}
-
-\define at key[UFCB]{locset}{labeltoplift}{% D
-  \def\board at val@labeltoplift{#1}}
-
-\define at key[UFCB]{gloset}{labeltoplift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labeltoplift=#1}{}}
-
-\define at key[UFCB]{locset}{labelbottomlift}{% D
-  \def\board at val@labelbottomlift{#1}}
-
-\define at key[UFCB]{gloset}{labelbottomlift}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomlift=#1}{}}
-
-\define at key[UFCB]{locset}{hlabellift}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{labelleftlift=#1, labelrightlift=#1}}
-
-\define at key[UFCB]{gloset}{hlabellift}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftlift=#1, labelrightlift=#1}}
-
-\define at key[UFCB]{locset}{vlabellift}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{labeltoplift=#1, labelbottomlift=#1}}
-
-\define at key[UFCB]{gloset}{vlabellift}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labeltoplift=#1, labelbottomlift=#1}}
-
-%% font
-
-\define at key[UFCB]{locset}{labelleftfont}{% D
-  \def\board at val@labelleftfont{#1}}
-
-\define at key[UFCB]{gloset}{labelleftfont}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftfont=#1}{}}
-
-\define at key[UFCB]{locset}{labelrightfont}{% D
-  \def\board at val@labelrightfont{#1}}
-
-\define at key[UFCB]{gloset}{labelrightfont}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightfont=#1}{}}
-
-\define at key[UFCB]{locset}{labeltopfont}{% D
-  \def\board at val@labeltopfont{#1}}
-
-\define at key[UFCB]{gloset}{labeltopfont}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labeltopfont=#1}{}}
-
-\define at key[UFCB]{locset}{labelbottomfont}{% D
-  \def\board at val@labelbottomfont{#1}}
-
-\define at key[UFCB]{gloset}{labelbottomfont}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomfont=#1}{}}
-
-\define at key[UFCB]{locset}{hlabelfont}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{labelleftfont=#1, labelrightfont=#1}}
-
-\define at key[UFCB]{gloset}{hlabelfont}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftfont=#1, labelrightfont=#1}}%
-
-\define at key[UFCB]{locset}{vlabelfont}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{labeltopfont=#1, labelbottomfont=#1}}%
-
-\define at key[UFCB]{gloset}{vlabelfont}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labeltopfont=#1, labelbottomfont=#1}}%
-
-\define at key[UFCB]{locset}{labelfont}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{%
-      labelleftfont=#1, labelrightfont=#1, labeltopfont=#1, labelbottomfont=#1}}%
-
-\define at key[UFCB]{gloset}{labelfont}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftfont=#1, labelrightfont=#1, labeltopfont=#1, labelbottomfont=#1}}%
-
-%%fontsize
-
-\define at key[UFCB]{locset}{labelfontsize}{% D
-  \def\cfss at sidefontsize{#1}}%
-
-\define at key[UFCB]{gloset}{labelfontsize}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelfontsize=#1}{}}%
-
-%% formatting
-
-\define at key[UFCB]{locset}{labelleftformat}{% D
-  \def\board at val@labelleftformat{#1}}%
-
-\define at key[UFCB]{gloset}{labelleftformat}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftformat={#1}}{}}%
-
-\define at key[UFCB]{locset}{labelrightformat}{% D
-  \def\board at val@labelrightformat{#1}}%
-
-\define at key[UFCB]{gloset}{labelrightformat}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightformat={#1}}{}}%
-
-\define at key[UFCB]{locset}{labeltopformat}{% D
-  \def\board at val@labeltopformat{#1}}%
-
-\define at key[UFCB]{gloset}{labeltopformat}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labeltopformat={#1}}{}}%
-
-\define at key[UFCB]{locset}{labelbottomformat}{% D
-  \def\board at val@labelbottomformat{#1}}%
-
-\define at key[UFCB]{gloset}{labelbottomformat}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomformat={#1}}{}}%
-
-\define at key[UFCB]{locset}{hlabelformat}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{labelleftformat=#1, labelrightformat=#1}}%
-
-\define at key[UFCB]{gloset}{hlabelformat}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftformat={#1}, labelrightformat={#1}}}%
-
-\define at key[UFCB]{locset}{vlabelformat}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{labeltopformat=#1, labelbottomformat=#1}}%
-
-\define at key[UFCB]{gloset}{vlabelformat}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{labeltopformat={#1}, labelbottomformat={#1}}}%
-
-\define at key[UFCB]{locset}{labelformat}{% D
-    \board at do@setsinglekeys*[UFCB]{locset}{%
-     labelleftformat=#1, labelrightformat=#1, labeltopformat=#1, labelbottomformat=#1}}%
-
-\define at key[UFCB]{gloset}{labelformat}{% D
-    \board at do@setsinglekeys*[UFCB]{gloset}{%
-     labelleftformat={#1}, labelrightformat={#1}, labeltopformat={#1}, labelbottomformat={#1}}}%
-
-%%%
-%% Board sizes
-%%%
-
-\define at key[UFCB]{locset}{tinyboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=10pt, labelfontsize=6pt}}%
-
-\define at key[UFCB]{gloset}{tinyboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=10pt, labelfontsize=6pt}}%
-
-\define at key[UFCB]{locset}{smallboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=15pt, labelfontsize=8pt}}%
-
-\define at key[UFCB]{gloset}{smallboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=15pt, labelfontsize=8pt}}%
-
-\define at key[UFCB]{locset}{normalboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=20pt, labelfontsize=10pt}}%
-
-\define at key[UFCB]{gloset}{normalboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=20pt, labelfontsize=10pt}}%
-
-\define at key[UFCB]{locset}{largeboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=30pt, labelfontsize=12pt}}%
-
-\define at key[UFCB]{gloset}{largeboard}[true]{% D
-  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=30pt, labelfontsize=12pt}}%
-
-%%% coloring the font layer
-\define at key[UFCB]{locfill}{clearfontcolors}[true]{% D
-  \def\board at val@fontcolorstack{}}
-
-\define at key[UFCB]{glofill}{clearfontcolors}[true]{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,clearfontcolors=#1}{}}%
-
-\define at key[UFCB]{locfill}{whitefieldmaskcolor}{% D
- \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at whitefieldmaskcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{whitefieldmaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,whitefieldmaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{blackfieldmaskcolor}{% D
-  \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at blackfieldmaskcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{blackfieldmaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,blackfieldmaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{fieldmaskcolor}{% D
- \board at do@setsinglekeys*[UFCB]{locfill}{%
-  whitefieldmaskcolor=#1,
-  blackfieldmaskcolor=#1}}
-
-\define at key[UFCB]{glofill}{fieldmaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,fieldmaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{whitefieldcolor}{% D
-  \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at whitefieldcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{whitefieldcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,whitefieldcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{blackfieldcolor}{% D
-  \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at blackfieldcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{blackfieldcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,blackfieldcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{fieldcolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   whitefieldcolor=#1,
-   blackfieldcolor=#1}}
-
-\define at key[UFCB]{glofill}{fieldcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,fieldcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{whiteonwhitepiecemaskcolor}{% D
-  \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at whiteonwhitepiecemaskcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{whiteonwhitepiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,whiteonwhitepiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{whiteonblackpiecemaskcolor}{% D
-  \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at whiteonblackpiecemaskcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{whiteonblackpiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,whiteonblackpiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{blackonwhitepiecemaskcolor}{% D
-  \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at blackonwhitepiecemaskcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{blackonwhitepiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,blackonwhitepiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{blackonblackpiecemaskcolor}{% D
-  \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at blackonblackpiecemaskcolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{blackonblackpiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,blackonblackpiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{whitepiecemaskcolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   whiteonwhitepiecemaskcolor=#1,
-   whiteonblackpiecemaskcolor=#1}}
-
-\define at key[UFCB]{glofill}{whitepiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,whitepiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{blackpiecemaskcolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   blackonwhitepiecemaskcolor=#1,
-   blackonblackpiecemaskcolor=#1}}
-
-\define at key[UFCB]{glofill}{blackpiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,blackpiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{onwhitepiecemaskcolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   whiteonwhitepiecemaskcolor=#1,
-   blackonwhitepiecemaskcolor=#1}}
-
-\define at key[UFCB]{glofill}{onwhitepiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,onwhitepiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{onblackpiecemaskcolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   whiteonblackpiecemaskcolor=#1,
-   blackonblackpiecemaskcolor=#1}}
-
-\define at key[UFCB]{glofill}{onblackpiecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,onblackpiecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{piecemaskcolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   whiteonwhitepiecemaskcolor=#1,
-   whiteonblackpiecemaskcolor=#1,
-   blackonwhitepiecemaskcolor=#1,
-   blackonblackpiecemaskcolor=#1}}
-
-\define at key[UFCB]{glofill}{piecemaskcolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,piecemaskcolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{whitepiececolor}{% D
- \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at whitepiececolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{whitepiececolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,whitepiececolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{blackpiececolor}{% D
- \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at blackpiececolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{blackpiececolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,blackpiececolor=#1}{}}%
-
-\define at key[UFCB]{locfill}{piececolor}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-   whitepiececolor=#1,
-   blackpiececolor=#1}}
-
-\define at key[UFCB]{glofill}{piececolor}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,piececolor=#1}{}}%
-
-%% Obsolete + changed, use whitepiececolor
-\define at key[UFCB]{locfill}{colorwhite}{% D
- \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at whitepiececolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{colorwhite}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,colorwhite=#1}{}}%
-
-\define at key[UFCB]{locfill}{colorblack}{% D
- \board at do@l at addto@macro\board at val@fontcolorstack
-  {\def\cfss at blackpiececolor{\color{#1}}}}
-
-\define at key[UFCB]{glofill}{colorblack}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,colorblack=#1}{}}%
-
-%% end obsolete
-
-%% setting board colors
-\define at key[UFCB]{locfill}{setfontcolors}[true]{% D
- \let\board at val@boardfontcolors\board at val@fontcolorstack}
-
-\define at key[UFCB]{glofill}{setfontcolors}[true]{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,setfontcolors=#1}{}}%
-
-\define at key[UFCB]{locfill}{addfontcolors}[true]{% D
-  \toks@=\expandafter{\board at val@fontcolorstack}%
-  \edef\@@next{\noexpand\board at do@l at addto@macro\noexpand\board at val@boardfontcolors{\the\toks@}}%
-  \@@next}
-
-\define at key[UFCB]{glofill}{setfontcolors}[true]{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,setfontcolors=#1}{}}%
-
-%% color in areas.
-
-
-%%% enable postscript units and node
-\define at boolkey[UFCB]{locset}{psset}[true]{}% D
-
-\define at boolkey[UFCB]{gloset}{psset}[true]{% D
-   \board at do@l at addto@macro\board at val@savedkeylist{,psset=#1}{}}%
-
-%%% redefines some skak commands/skak counters
-\define at boolkey[UFCB]{locset}{psskak}[true]{}% D
-
-\define at boolkey[UFCB]{gloset}{psskak}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,psskak=#1}{}}%
-
-%%%%%%
-%% "fill"-Keys that can be used more than once
-%%%%%%
-
-%%%%
-%% language
-%%%%
-
-\define at key[UFCB]{locfill}{language}{% D
-    \edef\board at val@curlang{#1}}%
-
-\define at key[UFCB]{glofill}{language}{% D
- \board at do@l at addto@macro\board at val@savedkeylist{,language=#1}}%
-
-%%%%
-%% clearing
-%%%%
-
-\define at key[UFCB]{locfill}{cleararea}{% D
- \edef\board at temp@list{#1}%
- \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at do@cleararea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{cleararea}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,cleararea=#1}}%
-
-\define at key[UFCB]{locfill}{clearareas}{% D
-  \edef\board at temp@list{#1}%
- \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at do@cleararea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{clearareas}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearareas=#1}}%
-
-\define at key[UFCB]{locfill}{clearboard}[true]{%D
-   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
-   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
-   \board at do@setsinglekeys*[UFCB]{locfill}{cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{clearboard}[true]{%D
-   \board at do@l at addto@macro\board at val@savedkeylist{,clearboard=#1}}%
-
-\define at key[UFCB]{locfill}{clearrank}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{clearrank}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearrank={#1}}}%
-
-\define at key[UFCB]{locfill}{clearranks}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{clearranks}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearranks={#1}}}%
-
-\define at key[UFCB]{locfill}{clearfile}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{clearfile}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearfile={#1}}}%
-
-\define at key[UFCB]{locfill}{clearfiles}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{clearfiles}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearfiles={#1}}}%
-
-\define at key[UFCB]{locfill}{clearfield}{% #1=list of fields %D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{cleararea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{clearfield}{% %D
-    \board at do@l at addto@macro\board at val@savedkeylist{,clearfield={#1}}}%
-
-\define at key[UFCB]{locfill}{clearfields}{% #1=list of fields %D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{cleararea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{clearfields}{% %D
-    \board at do@l at addto@macro\board at val@savedkeylist{,clearfields={#1}}}%
-
-%%%%
-%% hiding
-%%%%
-
-\define at key[UFCB]{locfill}{hidearea}{% D
-  \board at do@hidearea{#1}}%
-
-\define at key[UFCB]{glofill}{hidearea}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidearea=#1}}%
-
-\define at key[UFCB]{locfill}{hideareas}{% D
-  \edef\board at temp@list{#1}%
- \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at do@hidearea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{hideareas}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hideareas=#1}}%
-
-\define at key[UFCB]{locfill}{hideboard}[true]{% D
-   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
-   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
-   \board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{hideboard}[true]{% D
-   \board at do@l at addto@macro\board at val@savedkeylist{,hideboard=#1}}%
-
-\define at key[UFCB]{locfill}{hiderank}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{hiderank}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hiderank={#1}}}%
-
-\define at key[UFCB]{locfill}{hideranks}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{hideranks}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hideranks={#1}}}%
-
-\define at key[UFCB]{locfill}{hidefile}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{hidefile}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidefile={#1}}}%
-
-\define at key[UFCB]{locfill}{hidefiles}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{hidefiles}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidefiles={#1}}}%
-
-\define at key[UFCB]{locfill}{hidefields}{% D #1=list of fields
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{hidefields}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidefields={#1}}}%
-
-\define at key[UFCB]{locfill}{hidefield}{% D #1=list of fields
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{hidefield}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidefield={#1}}}%
-
-\define at key[UFCB]{locfill}{hidepiece}{% D list of chars
-  \board at do@hidetypelist{#1}}%
-
-\define at key[UFCB]{glofill}{hidepiece}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidepiece={#1}}}%
-
-\define at key[UFCB]{locfill}{hidepieces}{% D list of chars
-  \board at do@hidetypelist{#1}}%
-
-\define at key[UFCB]{glofill}{hidepieces}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidepieces={#1}}}%
-
-\define at key[UFCB]{locfill}{hidewhite}[true]{% D
-   \edef\board at temp@list{%
-    \csname board@\board at val@game @whitepiececharlist\endcsname}%
-    \board at do@hidetypelist{\board at temp@list}}%
-
-\define at key[UFCB]{glofill}{hidewhite}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hidewhite=#1}}%
-
-\define at key[UFCB]{locfill}{hideblack}[true]{% D
-   \edef\board at temp@list{%
-    \csname board@\board at val@game @blackpiececharlist\endcsname}%
-    \board at do@hidetypelist{\board at temp@list}}%
-
-\define at key[UFCB]{glofill}{hideblack}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hideblack=#1}}%
-
-\define at key[UFCB]{locfill}{hideall}[true]{% D
-  \edef\board at temp@list{%
-   \csname board@\board at val@game @piececharlist\endcsname}%
-   \board at do@hidetypelist{\board at temp@list}}%
-
-\define at key[UFCB]{glofill}{hideall}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,hideall=#1}}%
-
-%%%%
-%% show
-%%%%
-
-\define at key[UFCB]{locfill}{showarea}{%
-  \board at do@showarea{#1}}%
-
-\define at key[UFCB]{glofill}{showarea}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showarea=#1}}%
-
-\define at key[UFCB]{locfill}{showareas}{% D
-  \edef\board at temp@list{#1}%
- \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at do@showarea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{showareas}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,showareas=#1}}%
-
-\define at key[UFCB]{locfill}{showboard}[true]{%
-  \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
-  \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
-  \board at do@setsinglekeys*[UFCB]{locfill}{showarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{showboard}[true]{%
-   \board at do@l at addto@macro\board at val@savedkeylist{,showboard=#1}}%
-
-\define at key[UFCB]{locfill}{showrank}{%
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{showrank}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showrank={#1}}}%
-
-\define at key[UFCB]{locfill}{showranks}{%
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{showranks}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showranks={#1}}}%
-
-\define at key[UFCB]{locfill}{showfile}{%
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{showfile}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showfile={#1}}}%
-
-\define at key[UFCB]{locfill}{showfiles}{%
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{showfiles}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showfiles={#1}}}%
-
-\define at key[UFCB]{locfill}{showfield}{% #1=list of fields
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{showfield}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showfield={#1}}}%
-
-\define at key[UFCB]{locfill}{showfields}{% #1=list of fields
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{showfields}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showfields={#1}}}%
-
-\define at key[UFCB]{locfill}{showpiece}{% list of chars
-  \board at do@showtypelist{#1}}%
-
-\define at key[UFCB]{glofill}{showpiece}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showpieces={#1}}}%
-
-\define at key[UFCB]{locfill}{showpieces}{% list of chars
-  \board at do@showtypelist{#1}}%
-
-\define at key[UFCB]{glofill}{showpieces}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,showpieces={#1}}}%
-
-%%%%
-%% fen
-%%%%
-%%% fen "corners
-
-\define at key[UFCB]{locfill}{startfen}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@startfenfilechar\board at temp@curfilechar
-  \let\board at val@startfenfilenum\board at temp@curfilenum
-  \let\board at val@startfenranknum\board at temp@curranknum}%
-
-\define at key[UFCB]{glofill}{startfen}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,startfen=#1}}%
-
-\define at key[UFCB]{locfill}{startfill}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@startfillfilechar\board at temp@curfilechar
-  \let\board at val@startfillfilenum\board at temp@curfilenum
-  \let\board at val@startfillranknum\board at temp@curranknum}%
-
-\define at key[UFCB]{glofill}{startfill}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,startfill=#1}}%
-
-\define at key[UFCB]{locfill}{stopfill}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@stopfillfilechar\board at temp@curfilechar
-  \let\board at val@stopfillfilenum\board at temp@curfilenum
-  \let\board at val@stopfillranknum\board at temp@curranknum}%
-
-\define at key[UFCB]{glofill}{stopfill}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,startfill=#1}}%
-
-\define at key[UFCB]{locfill}{fillarea}{% a7-f1 %D
-    \expandafter\board at split@areasort#1ARGEND%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      startfill=\board at temp@curstartfield, stopfill=\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{fillarea}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,fillarea=#1}}%
-
-%%%
-%% setting pieces with fen
-%%%
-
-\define at key[UFCB]{locfill}{@fen}{%
-   \board at split@fen#1 X X X X X X XARGEND%
-   \board at scan@fen{\board at val@position}}%
-
-\def\board at setfenkey#1|{\board at do@setsinglekeys*[UFCB]{locfill}{@fen=#1}}%
-
-%%change 1.5
-\define at key[UFCB]{locfill}{setfen}{% D
-    \board at do@setsinglekeys*[UFCB]{locfill}{clearboard}%
-    \edef\board at temp@fen{#1}%
-    \expandafter\board at setfenkey\board at temp@fen|}%
-
-\define at key[UFCB]{glofill}{setfen}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,setfen=#1}}%
-
-\define at key[UFCB]{locfill}{addfen}{% D
-    \expandafter\board at setfenkey#1|}%
-
-\define at key[UFCB]{glofill}{addfen}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,addfen=#1}}%
-
-%%% other name for usefen
-\define at key[UFCB]{locfill}{restorefen}{% D
-   \edef\board at temp@curfen{\csname chessgame.#1\endcsname}%
-   \board at do@setsinglekeys*[UFCB]{locfill}{language=english, addfen=\board at temp@curfen, language=\board at val@savelang}}%
-
-\define at key[UFCB]{glofill}{restorefen}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,restorefen=#1}}%cor 1.5.
-
-\define at key[UFCB]{locfill}{loadfen}{% D
-   \board at do@loadfen{#1}%
-   \board at do@setsinglekeys*[UFCB]{locfill}{language=english, addfen=\board at temp@curfen, language=\board at val@savelang}}%
-
-\define at key[UFCB]{glofill}{loadfen}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,loadfen=#1}}%
-
-%%%%
-%% rest of fen
-%%%%
-
-\define at key[UFCB]{locfill}{mover}{\def\board at val@mover{#1}} %D %changed 02.08.2007 to allow commands as input
-\define at key[UFCB]{locfill}{castling}{\def\board at val@castling{#1}} %D
-\define at key[UFCB]{locfill}{enpassant}{\def\board at val@enpassant{#1}} %D
-\define at key[UFCB]{locfill}{halfmove}{\def\board at val@halfmove{#1}}  %D
-\define at key[UFCB]{locfill}{fullmove}{\def\board at val@fullmove{#1}} %D
-
-\define at key[UFCB]{glofill}{mover}{\board at do@l at addto@macro\board at val@savedkeylist{,mover=#1}} %D
-\define at key[UFCB]{glofill}{castling}{\board at do@l at addto@macro\board at val@savedkeylist{,castling=#1}} %D
-\define at key[UFCB]{glofill}{enpassant}{\board at do@l at addto@macro\board at val@savedkeylist{,enpassant=#1}} %D
-\define at key[UFCB]{glofill}{halfmove}{\board at do@l at addto@macro\board at val@savedkeylist{,halfmove=#1}} %D
-\define at key[UFCB]{glofill}{fullmove}{\board at do@l at addto@macro\board at val@savedkeylist{,fullmove=#1}} %D
-
-%%% saving fen
-
-\define at key[UFCB]{locfill}{storefen}{% D
-  \board at do@storefen{#1}}% D
-
-\define at key[UFCB]{glofill}{storefen}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,storefen=#1}}%
-
-\define at key[UFCB]{locfill}{savefen}{\board at do@savefen{#1}} %D
-
-\define at key[UFCB]{glofill}{savefen}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,savefen=#1}}%
-
-\define at key[UFCB]{locfill}{startstore}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@startstorefilechar\board at temp@curfilechar
-  \let\board at val@startstorefilenum\board at temp@curfilenum
-  \let\board at val@startstoreranknum\board at temp@curranknum%
-  }%
-
-\define at key[UFCB]{glofill}{startstore}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,startstore=#1}}%
-
-\define at key[UFCB]{locfill}{stopstore}{% D
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@stopstorefilechar\board at temp@curfilechar
-  \let\board at val@stopstorefilenum\board at temp@curfilenum
-  \let\board at val@stopstoreranknum\board at temp@curranknum}%
-
-\define at key[UFCB]{glofill}{stopstore}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,stopstore=#1}}%
-
-\define at key[UFCB]{locfill}{storearea}{% a7-f1 %D
-  \expandafter\board at split@areasort#1ARGEND%
-  \board at do@setsinglekeys*[UFCB]{locfill}{%
-    startstore=\board at temp@curstartfield, stopstore=\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{storearea}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,storearea=#1}}%
-
-%%%%%%
-%%% Adding pieces
-%%%%%%
-
-\define at key[UFCB]{locfill}{setpieces}{% D
-    \board at do@setsinglekeys*[UFCB]{locfill}{clearboard=true}%
-    \board at do@addpieces{#1}}%
-
-\define at key[UFCB]{glofill}{setpieces}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,setpieces={#1}}}%
-
-\define at key[UFCB]{locfill}{addpieces}{% D
-    \board at do@addpieces{#1}}%
-
-\define at key[UFCB]{glofill}{addpieces}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,addpieces={{#1}}}}%
-
-\define at key[UFCB]{locfill}{setwhite}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{clearboard=true}%
-  \board at do@addwhitepieces{#1}}%
-
-\define at key[UFCB]{glofill}{setwhite}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,setwhite={#1}}}%
-
-\define at key[UFCB]{locfill}{addwhite}{% D
-     \board at do@addwhitepieces{#1}}%
-
-\define at key[UFCB]{glofill}{addwhite}{% D
-     \board at do@l at addto@macro\board at val@savedkeylist{,addwhite={#1}}}%
-
-\define at key[UFCB]{locfill}{setblack}{% D
-     \board at do@setsinglekeys*[UFCB]{locfill}{clearboard=true}%
-     \board at do@addblackpieces{#1}}%
-
-\define at key[UFCB]{glofill}{setblack}{% D
-     \board at do@l at addto@macro\board at val@savedkeylist{,setblack={#1}}}%
-
-\define at key[UFCB]{locfill}{addblack}{% D
-     \board at do@addblackpieces{#1}}%
-
-\define at key[UFCB]{glofill}{addblack}{% D
-     \board at do@l at addto@macro\board at val@savedkeylist{,addblack={#1}}}%
-
-%% getting field lists for piece types
-\define at key[UFCB]{locfill}{getpiecelists}[true]{% D
-  \board at do@getpiecelists}
-
-\define at key[UFCB]{glofill}{getpiecelists}[true]{% D
-     \board at do@l at addto@macro\board at val@savedkeylist{,getpiecelists={#1}}}%
-
-
-%%\define at key[UFCB]{main}{fontsize}{\setboardfontsize{#1}}%
-
-%% "emphazing"
-
-\define at boolkey[UFCB]{locfill}{coloremph}[true]{}
-
-\define at boolkey[UFCB]{glofill}{coloremph}[true]{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,coloremph={#1}}}%
-
-\define at key[UFCB]{locfill}{emphstyle}{% D
- \def\board at val@pieceemph{#1}}%
-
-\define at key[UFCB]{glofill}{emphstyle}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,emphstyle={#1}}}%
-
-\define at key[UFCB]{locfill}{coloremphstyle}[\relax]{% D
- \board at do@setsinglekeys*[UFCB]{locfill}{coloremph}%
- \def\board at val@pieceemph{#1}}%
-
-\define at key[UFCB]{glofill}{coloremphstyle}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,coloremphstyle={#1}}}%
-
-\define at key[UFCB]{locfill}{empharea}{% D
-  \board at do@empharea{#1}}%
-
-\define at key[UFCB]{glofill}{empharea}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,empharea=#1}}%
-
-\define at key[UFCB]{locfill}{emphareas}{% D
- \XKV at sp@deflist\board at templist{#1}%
- \edef\board at templist{\board at templist}%
- \@for\board at temp@curarea:=\board at templist\do
-  {\ifx\board at temp@curarea\@empty\else
-   \board at do@empharea{\board at temp@curarea}%
-   \fi}}%
-
-\define at key[UFCB]{glofill}{emphareas}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,emphareas={#1}}}%
-
-\define at key[UFCB]{locfill}{emphboard}[true]{%D
-   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
-   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
-   \board at do@setsinglekeys*[UFCB]{locfill}{empharea=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{emphboard}[true]{%D
-   \board at do@l at addto@macro\board at val@savedkeylist{,emphboard=#1}}%
-
-\define at key[UFCB]{locfill}{emphranks}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      empharea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{emphranks}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,emphranks={#1}}}%
-
-\define at key[UFCB]{locfill}{emphrank}{% D
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      emphranks=#1}}%
-
-\define at key[UFCB]{glofill}{emphrank}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,emphrank={#1}}}%
-
-\define at key[UFCB]{locfill}{emphfiles}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      empharea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{emphfiles}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,emphfiles={#1}}}%
-
-\define at key[UFCB]{locfill}{emphfile}{% D
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      emphfiles=#1}}%
-
-\define at key[UFCB]{glofill}{emphfile}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,emphfile=#1}}%
-
-\define at key[UFCB]{locfill}{emphfields}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-   {\expandafter\board at split@field\board at temp@curfield ARGEND%
-    \board at do@store at pieceemph{\board at temp@curfilenum}{\board at temp@curranknum}}}%
-
-\define at key[UFCB]{glofill}{emphfields}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,emphpieces={#1}}}%
-
-\define at key[UFCB]{locfill}{emphfield}{% D
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      emphfields=#1}}%
-
-\define at key[UFCB]{glofill}{emphfield}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,emphfield=#1}}%
-
-\define at key[UFCB]{locfill}{colorpieces}{% D
-  \PackageWarning{chessboard}{The key colorpieces doesn't work anymore. \MessageBreak
-  Use the emph-keys instead.}}%
-\define at key[UFCB]{glofill}{colorpieces}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorpieces={#1}}}%
-
-%%%%%%%%%%%%%%%
-%% setting the game
-%%%%%%%%%%%%%%%
-
-\define at key[UFCB]{locinit}{game}{%
-    \def\board at val@game{#1}}%
-
-\define at key[UFCB]{gloinit}{game}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,game=#1}{}}%
-
-
-%</chessboard-keys-main>
-%<*chessboard-keys-pgf>
-\ProvidesFile{chessboard-keys-pgf.sty}[2014/05/01 version v1.7 key definitions for chessboard.sty]
-%%$Date: 2011/03/17 13:42:38 $$Version: e7ec1b100ede $
-
-%% new 1.5.: style keys for curvemove
-\define at key[UFCB]{bez}{x1}{\def\board at val@bezxi{#1}}
-\define at key[UFCB]{bez}{x2}{\def\board at val@bezxii{#1}}
-\define at key[UFCB]{bez}{y1}{\def\board at val@bezyi{#1}}
-\define at key[UFCB]{bez}{y2}{\def\board at val@bezyii{#1}}
-\define at key[UFCB]{bez}{linewidth}{\def\board at pgf@linewidth{#1}}
-\define at key[UFCB]{bez}{pgflinewidth}{\def\board at pgf@linewidth{#1}}
-\define at key[UFCB]{bez}{pgfshortenstart}{\def\board at pgf@shortenstart{#1}}
-\define at key[UFCB]{bez}{shortenstart}{\def\board at pgf@shortenstart{#1}}
-\define at key[UFCB]{bez}{pgfshortenend}{\def\board at pgf@shortenend{#1}}
-\define at key[UFCB]{bez}{shortenend}{\def\board at pgf@shortenend{#1}}
-\define at key[UFCB]{bez}{pgfarrow}{\def\board at pgf@arrow{#1}}
-\define at key[UFCB]{bez}{arrow}{\def\board at pgf@arrow{#1}}
-
-\define at boolkey[UFCB]{bez}{clockwise}[true]{%
-  \ifUFCB at bez@clockwise
-   \def\board at val@pgfsign{1}
-  \else
-   \def\board at val@pgfsign{-1}%
-  \fi}%
-\define at key[UFCB]{bez}{style}{%
- \ifcsname board at pgf@curvemovestyle@#1\endcsname
-  \csname board at pgf@curvemovestyle@#1\endcsname
- \else\PackageError{chessboard}{Style #1 not defined for curvemove}{}%
- \fi}
-
-%% disable pgf-picture completely
-
-\define at boolkey[UFCB]{locset}{pgf}[true]{}% D
-
-\define at boolkey[UFCB]{gloset}{pgf}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgf=#1}{}}%
-
-%% clears the user "extra" pictures
-
-\define at key[UFCB]{locfill}{clearbackpgf}[true]{%
-  \let\board at pgf@extrabackground\@empty
-  }%
-
-\define at key[UFCB]{glofill}{clearbackpgf}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearbackpgf=#1}}%
-
-\define at key[UFCB]{locfill}{clearmarkpgf}[true]{%
- \let\board at pgf@extramarkground\@empty
-  }%
-
-\define at key[UFCB]{glofill}{clearmarkpgf}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearmarkpgf=#1}}%
-
-\define at choicekey[UFCB]{locfill}{clearpgf}[\@tempval\@tempnr]{back,mark,all,both,none}[all]{% D
- \ifcase\@tempnr\relax
-  \board at do@setsinglekeys*[UFCB]{locfill}{clearbackpgf}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{clearmarkpgf}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{clearbackpgf,clearmarkpgf}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{clearbackpgf,clearmarkpgf}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{}%
- \fi}
-
-\define at key[UFCB]{glofill}{clearpgf}[all]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearpgf=#1}}%
-
-%% obsolete
-
-\define at key[UFCB]{locfill}{clearbackgroundpgf}[true]{%
-  \let\board at pgf@extrabackground\@empty}%
-
-\define at key[UFCB]{glofill}{clearbackgroundpgf}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearbackgroundpgf=#1}}%
-
-\define at key[UFCB]{locfill}{clearforegroundpgf}[true]{%
-  \let\board at pgf@extramarkground\@empty}%
-
-\define at key[UFCB]{glofill}{clearforegroundpgf}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,clearforegroundpgf=#1}}%
-
-%% to chose the affected picture
-
-\define at boolkey[UFCB]{locfill}{usemarkpgf}[true]{}
-
-\define at boolkey[UFCB]{glofill}{usemarkpgf}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,usemarkpgf=#1}}%
-
-\define at boolkey[UFCB]{locfill}{usebackpgf}[true]{}%
-
-\define at boolkey[UFCB]{glofill}{usebackpgf}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,usebackpgf=#1}}%
-
-\define at choicekey[UFCB]{locfill}{usepgf}[\@tempval\@tempnr]{back,mark,all,both,none}{%
- \def\board at pgf@curusepgf{#1}%
- \ifcase\@tempnr\relax
-  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=true,usemarkpgf=false}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{usemarkpgf=true,usebackpgf=false}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=true,usemarkpgf=true}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=true,usemarkpgf=true}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=false,usemarkpgf=false}%
- \fi}%
-
-\define at key[UFCB]{glofill}{usepgf}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,usepgf=#1}}%
-
-
-\define at boolkey[UFCB]{locfill}{useonblack}[true]{%
- \ifUFCB at locfill@useonblack
-   \board at pgf@addmarkground{\UFCB at locfill@useonblacktrue}%
-  \else
-   \board at pgf@addmarkground{\UFCB at locfill@useonblackfalse}%
-  \fi
- \ifUFCB at locfill@useonblack
-   \board at pgf@addbackground{\UFCB at locfill@useonblacktrue}%
-  \else
-   \board at pgf@addbackground{\UFCB at locfill@useonblackfalse}%
-  \fi}%
-
-\define at boolkey[UFCB]{glofill}{useonblack}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,useonblack=#1}}%
-
-\define at boolkey[UFCB]{locfill}{useonwhite}[true]{%
-  \ifUFCB at locfill@useonwhite
-   \board at pgf@addmarkground{\UFCB at locfill@useonwhitetrue}%
-  \else
-   \board at pgf@addmarkground{\UFCB at locfill@useonwhitefalse}%
-  \fi
-  \ifUFCB at locfill@useonwhite
-   \board at pgf@addbackground{\UFCB at locfill@useonwhitetrue}%
-  \else
-   \board at pgf@addbackground{\UFCB at locfill@useonwhitefalse}%
-  \fi}%
-
-\define at boolkey[UFCB]{glofill}{useonwhite}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,useonwhite=#1}}%
-
-
-\define at choicekey[UFCB]{locfill}{trimtocolor}[\@tempval\@tempnr]{white,black,false}{% D
- \def\board at pgf@curtrimtocolor{#1}%
- \ifcase\@tempnr\relax
-  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=true,useonblack=false}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=false,useonblack=true}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=true,useonblack=true}%
- \fi}%
-
-\define at key[UFCB]{glofill}{trimtocolor}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,trimtocolor=#1}}%
-
-\define at key[UFCB]{locfill}{trimtowhite}[true]{%
-  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=true,useonblack=false}}%
-
-\define at key[UFCB]{glofill}{trimtowhite}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,trimtowhite=#1}}%
-
-\define at key[UFCB]{locfill}{trimtoblack}[true]{%
-  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=false,useonblack=true}}%
-
-\define at key[UFCB]{glofill}{trimtoblack}[true]{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,trimtoblack=#1}}%
-
-\define at key[UFCB]{locfill}{starttrim}{%
-  \expandafter\board at split@field #1ARGEND%
-  \let\board at val@starttrimfilechar\board at temp@curfilechar
-  \let\board at val@starttrimfilenum\board at temp@curfilenum
-  \let\board at val@starttrimranknum\board at temp@curranknum}%
-
-\define at key[UFCB]{glofill}{starttrim}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,starttrim=#1}}%
-
-\define at key[UFCB]{locfill}{stoptrim}{%
-  \expandafter\board at split@field#1ARGEND%
-  \let\board at val@stoptrimfilechar\board at temp@curfilechar
-  \let\board at val@stoptrimfilenum\board at temp@curfilenum
-  \let\board at val@stoptrimranknum\board at temp@curranknum}%}%
-
-\define at key[UFCB]{glofill}{stoptrim}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,starttrim=#1}}%
-
-\define at key[UFCB]{locfill}{trimarea}[\printarea]{% a7-f1 %
- \ifthenelse{\equal{#1}{empty}}%
-  {\def\board at val@starttrimfilenum{-1}%
-   \def\board at val@starttrimranknum{-1}%
-   \def\board at val@stoptrimfilenum{-1}%
-   \def\board at val@stoptrimrankenum{-1}}%
-  {\expandafter\board at split@areasort#1ARGEND%
-   \let\board at val@starttrimfilechar\board at temp@curstartfilechar
-   \let\board at val@starttrimfilenum\board at temp@curstartfilenum
-   \let\board at val@starttrimranknum\board at temp@curstartranknum
-   \let\board at val@stoptrimfilechar\board at temp@curstopfilechar
-   \let\board at val@stoptrimfilenum\board at temp@curstopfilenum
-   \let\board at val@stoptrimranknum\board at temp@curstopranknum}%
-  \ifUFCB at locfill@captrimtoprint
-   \ifnum\board at val@starttrimfilenum<\board at val@startprintfilenum
-    \let\board at val@starttrimfilenum\board at val@startprintfilenum
-   \fi
-   \ifnum\board at val@stoptrimfilenum>\board at val@stopprintfilenum
-    \let\board at val@stoptrimfilenum\board at val@stopprintfilenum
-   \fi
-   \ifnum\board at val@starttrimranknum>\board at val@startprintranknum
-    \let\board at val@starttrimranknum\board at val@startprintranknum
-   \fi
-   \ifnum\board at val@stoptrimranknum<\board at val@stopprintranknum
-    \let\board at val@stoptrimranknum\board at val@stopprintranknum
-   \fi
-   \ifthenelse
-    {\(\board at val@starttrimfilenum>\board at val@stoptrimfilenum\)
-     \OR
-     \(\board at val@starttrimranknum<\board at val@stoptrimranknum\)}%
-    {\def\board at val@starttrimfilenum{-1}%
-     \def\board at val@starttrimranknum{-1}%
-     \def\board at val@stoptrimfilenum{-1}%
-     \def\board at val@stoptrimrankenum{-1}}%
-    {}%
-  \fi}%
-
-\define at key[UFCB]{glofill}{trimarea}{%
-    \board at do@l at addto@macro\board at val@savedkeylist{,trimarea=#1}}%
-
-\define at boolkey[UFCB]{locfill}{captrimtoprint}[true]{}%
-
-\define at boolkey[UFCB]{glofill}{captrimtoprint}[true]{%
-    \board at do@l at addto@macro\board at val@savedkeylist{,captrimtoprint=#1}}%
-
-\define at boolkey[UFCB]{locfill}{trim}[true]{%
- \ifUFCB at locfill@trim
-  \board at do@setsinglekeys*[UFCB]{locfill}{trimarea=\printarea}%
- \else
-  \board at do@setsinglekeys*[UFCB]{locfill}{trimarea=\board}%
-  \fi}%
-
-\define at key[UFCB]{glofill}{trim}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,trim=#1}}%
-
-%% clipping
-
-%% clipping the pictures along a path
-\define at key[UFCB]{locset}{clip}[true]{% D
- \board at do@setsinglekeys*[UFCB]{intclip}{true,#1}}%
-
-\define at key[UFCB]{gloset}{clip}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,clip={#1}}{}}%
-
-\define at key[UFCB]{locset}{pgfclip}[true]{% D
- \board at do@setsinglekeys*[UFCB]{intclip}{true,#1}}%
-
-\define at key[UFCB]{gloset}{pgfclip}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfclip={#1}}{}}%
-
-\define at key[UFCB]{locset}{markclip}[true]{% D
- \board at do@setsinglekeys*[UFCB]{intmarkclip}{true,#1}}%
-
-\define at key[UFCB]{gloset}{markclip}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markclip={#1}}{}}%
-
-\define at key[UFCB]{locset}{backclip}[true]{% D
- \board at do@setsinglekeys*[UFCB]{intbackclip}{true,#1}}%
-
-\define at key[UFCB]{gloset}{backclip}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backclip={#1}}{}}%
-
-\define at key[UFCB]{intclip}{true}[true]{%
- \def\board at pgf@usemarkclippath{clip}%
- \def\board at pgf@usebackclippath{clip}}
-
-\define at key[UFCB]{intclip}{false}[true]{%
- \def\board at pgf@usemarkclippath{discard}%
- \def\board at pgf@usebackclippath{discard}}
-
-\define at key[UFCB]{intmarkclip}{true}[true]{%
- \def\board at pgf@usemarkclippath{clip}}
-
-\define at key[UFCB]{intmarkclip}{false}[true]{%
- \def\board at pgf@usemarkclippath{discard}}
-
-\define at key[UFCB]{intbackclip}{true}[true]{%
- \def\board at pgf@usebackclippath{clip}}
-
-\define at key[UFCB]{intbackclip}{false}[true]{%
- \def\board at pgf@usebackclippath{discard}}
-
-\define at key[UFCB]{intclip}{left}[0pt]{%
- \def\board at pgf@markclipleftpadding{#1}%
- \def\board at pgf@backclipleftpadding{#1}}
-
-\define at key[UFCB]{intclip}{top}[0pt]{%
- \def\board at pgf@markcliptoppadding{#1}%
- \def\board at pgf@backcliptoppadding{#1}}
-
-\define at key[UFCB]{intclip}{right}[0pt]{%
- \def\board at pgf@markcliprightpadding{#1}%
- \def\board at pgf@backcliprightpadding{#1}}
-
-\define at key[UFCB]{intclip}{bottom}[0pt]{%
- \def\board at pgf@markclipbottompadding{#1}%
- \def\board at pgf@backclipbottompadding{#1}}
-
-\define at key[UFCB]{intmarkclip}{left}[0pt]{%
- \def\board at pgf@markclipleftpadding{#1}}
-
-\define at key[UFCB]{intmarkclip}{top}[0pt]{%
- \def\board at pgf@markcliptoppadding{#1}}
-
-\define at key[UFCB]{intmarkclip}{right}[0pt]{%
- \def\board at pgf@markcliprightpadding{#1}}
-
-\define at key[UFCB]{intmarkclip}{bottom}[0pt]{%
- \def\board at pgf@markclipbottompadding{#1}}
-
-\define at key[UFCB]{intbackclip}{left}[0pt]{%
- \def\board at pgf@backclipleftpadding{#1}}
-
-\define at key[UFCB]{intbackclip}{top}[0pt]{%
- \def\board at pgf@backcliptoppadding{#1}}
-
-\define at key[UFCB]{intbackclip}{right}[0pt]{%
- \def\board at pgf@backcliprightpadding{#1}}
-
-\define at key[UFCB]{intbackclip}{bottom}[0pt]{%
- \def\board at pgf@backclipbottompadding{#1}}
-
-%% pgf properties
-
-\define at key[UFCB]{locfill}{color}{% D
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\color{#1}}%
- \fi
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\color{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{color}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,color=#1}}%
-
-\define at key[UFCB]{locfill}{pgfcolor}{% D
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\color{#1}}%
- \fi
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\color{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfcolor}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfcolor=#1}}%
-
-%% padding for colorfields and other means
-\define at key[UFCB]{locfill}{padding}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@padding{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf %
-  \board at pgf@addbackground{\def\board at pgf@padding{#1}}%
-  \board at pgf@addbackground{\def\board at pgf@colorbackpadding{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{padding}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,padding=#1}}%
-
-\define at key[UFCB]{locfill}{pgfpadding}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@padding{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf %
-  \board at pgf@addbackground{\def\board at pgf@padding{#1}}%
-  \board at pgf@addbackground{\def\board at pgf@colorbackpadding{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfpadding}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfpadding=#1}}%
-
-\define at key[UFCB]{locfill}{opacity}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground%
-    {\pgfsetfillopacity{#1}%
-     \pgfsetstrokeopacity{#1}}%%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground%
-    {\pgfsetfillopacity{#1}%
-     \pgfsetstrokeopacity{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{opacity}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,opacity=#1}}%
-
-\define at key[UFCB]{locfill}{pgfopacity}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground%
-    {\pgfsetfillopacity{#1}%
-     \pgfsetstrokeopacity{#1}}%%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground%
-    {\pgfsetfillopacity{#1}%
-     \pgfsetstrokeopacity{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfopacity}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfopacity=#1}}%
-
-\define at key[UFCB]{locfill}{fillopacity}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground%
-    {\pgfsetfillopacity{#1}}%%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground%
-    {\pgfsetfillopacity{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{fillopacity}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,opacity=#1}}%
-
-\define at key[UFCB]{locfill}{pgffillopacity}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground%
-    {\pgfsetfillopacity{#1}}%%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground%
-    {\pgfsetfillopacity{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgffillopacity}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgffillopacity=#1}}%
-
-\define at key[UFCB]{locfill}{strokeopacity}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground%
-    {\pgfsetstrokeopacity{#1}}%
- \fi%%
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground%
-    {\pgfsetstrokeopacity{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{strokeopacity}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,opacity=#1}}%
-
-\define at key[UFCB]{locfill}{pgfstrokeopacity}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground%
-    {\pgfsetstrokeopacity{#1}}%%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground%
-    {\pgfsetstrokeopacity{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfstrokeopacity}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfstrokeopacity=#1}}%
-
-\define at key[UFCB]{locfill}{linewidth}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@linewidth{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@linewidth{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{linewidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,linewidth=#1}}%
-
-\define at key[UFCB]{locfill}{pgflinewidth}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@linewidth{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@linewidth{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgflinewidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgflinewidth=#1}}%
-
-\define at key[UFCB]{locfill}{backlinewidth}{% D
-  \board at pgf@addbackground{\def\board at pgf@linewidth{#1}}}%
-
-\define at key[UFCB]{glofill}{backlinewidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,linewidth=#1}}%
-
-\define at key[UFCB]{locfill}{marklinewidth}{% D
-  \board at pgf@addmarkground{\def\board at pgf@linewidth{#1}}}%
-
-\define at key[UFCB]{glofill}{marklinewidth}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,linewidth=#1}}%
-
-\define at key[UFCB]{locfill}{backcornerarc}{% D
-  \board at pgf@addbackground{\def\board at pgf@corner{#1}}}%
-
-\define at key[UFCB]{glofill}{backcornerarc}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backcornerarc=#1}}%
-
-\define at key[UFCB]{locfill}{cornerarc}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@corner{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@corner{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{cornerarc}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,cornerarc=#1}}%
-
-\define at key[UFCB]{locfill}{pgfcornerarc}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@corner{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@corner{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfcornerarc}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfcornerarc=#1}}%
-
-\define at key[UFCB]{locfill}{arrow}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@arrow{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@arrow{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{arrow}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,arrow=#1}}%
-
-\define at key[UFCB]{locfill}{pgfarrow}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@arrow{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@arrow{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfarrow}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfarrow=#1}}%
-
-\define at key[UFCB]{locfill}{shortenstart}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@shortenstart{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@shortenstart{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{shortenstart}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,shortenstart=#1}}%
-
-\define at key[UFCB]{locfill}{pgfshortenstart}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@shortenstart{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@shortenstart{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfshortenstart}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfshortenstart=#1}}%
-
-\define at key[UFCB]{locfill}{shortenend}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@shortenend{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@shortenend{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{shortenend}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,shortenend=#1}}%
-
-\define at key[UFCB]{locfill}{pgfshortenend}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@shortenend{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@shortenend{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgfshortenend}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfshortenend=#1}}%
-
-\define at key[UFCB]{locfill}{shorten}{% D
- \board at do@setsinglekeys*[UFCB]{locfill}{shortenend=#1,shortenstart=#1}}%
-
-\define at key[UFCB]{glofill}{shorten}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,shorten=#1}}%
-
-\define at key[UFCB]{locfill}{pgfshorten}{% D
- \board at do@setsinglekeys*[UFCB]{locfill}{pgfshortenend=#1,pgfshortenstart=#1}}%
-
-\define at key[UFCB]{glofill}{pgfshorten}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfshorten=#1}}%
-
-\define at key[UFCB]{locfill}{text}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@curtext{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@curtext{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{text}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,text={#1}}}%
-
-\define at key[UFCB]{locfill}{pgftext}{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{\def\board at pgf@curtext{#1}}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{\def\board at pgf@curtext{#1}}%
- \fi}%
-
-\define at key[UFCB]{glofill}{pgftext}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgftext={#1}}}%
-
-\define at key[UFCB]{locfill}{addpgf}[\end{pgfscope}\begin{pgfscope}]{% D
- \ifUFCB at locfill@usemarkpgf
-  \board at pgf@addmarkground{#1}%
- \fi
- \ifUFCB at locfill@usebackpgf
-  \board at pgf@addbackground{#1}%
- \fi}%
-
-\define at key[UFCB]{glofill}{addpgf}[\end{pgfscope}\begin{pgfscope}]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,addpgf={#1}}}%
-
-\define at key[UFCB]{locfill}{markstyle}{% D
-  \board at do@savemarkstyle#1ARGEND}%
-
-\define at key[UFCB]{glofill}{markstyle}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markstyle=#1}}%
-
-\define at key[UFCB]{locfill}{backstyle}{% D
-  \board at do@savebackstyle#1ARGEND}%
-
-\define at key[UFCB]{glofill}{backstyle}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backstyle=#1}}%
-
-\define at key[UFCB]{locfill}{pgfstyle}{% D
-  \expandafter\board at do@savemarkstyle#1ARGEND% change 15.08.2007
-  \expandafter\board at do@savebackstyle#1ARGEND}% changed 15.08.2007
-
-
-
-\define at key[UFCB]{glofill}{pgfstyle}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,pgfstyle=#1}}%
-
-%%% fields marks
-
-\define at key[UFCB]{locfill}{markarea}{% D
-  \edef\board at temp@list{#1}%
-   \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at pgf@add at fieldmarkstyletoarea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{markarea}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markarea=#1}}%
-
-\define at key[UFCB]{locfill}{backarea}{% D
- \edef\board at temp@list{#1}%
- \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at pgf@add at fieldbackstyletoarea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{backarea}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,backarea={#1}}}%
-
-\define at key[UFCB]{locfill}{markareas}{% D
- \edef\board at temp@list{#1}%
- \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at pgf@add at fieldmarkstyletoarea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{markareas}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markareas={#1}}}%
-
-\define at key[UFCB]{locfill}{backareas}{% D
- \edef\board at temp@list{#1}%
- \@for\board at temp@curarea:=\board at temp@list\do
-  {\board at pgf@add at fieldbackstyletoarea{\board at temp@curarea}}}%
-
-\define at key[UFCB]{glofill}{backareas}{%
-  \board at do@l at addto@macro\board at val@savedkeylist{,backareas={#1}}}%
-
-\define at key[UFCB]{locfill}{markfield}{% #1=list of fields D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{markarea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{markfield}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markfield={#1}}}%
-
-\define at key[UFCB]{locfill}{backfield}{% #1=list of fields D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{backarea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{backfield}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backfield={#1}}}%
-
-\define at key[UFCB]{locfill}{markfields}{% #1=list of fields D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{markarea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{markfields}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markfields={#1}}}%
-
-\define at key[UFCB]{locfill}{backfields}{% #1=list of fields D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{backarea=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{backfields}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backfields={#1}}}%
-
-\define at key[UFCB]{locfill}{markboard}[true]{% D
-  \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
-  \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
-  \board at do@setsinglekeys*[UFCB]{locfill}{markarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{markboard}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markboard=#1}}%
-
-\define at key[UFCB]{locfill}{backboard}[true]{% D
-  \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
-  \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
-  \board at do@setsinglekeys*[UFCB]{locfill}{backarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{backboard}[true]{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backboard=#1}}%
-
-\define at key[UFCB]{locfill}{markrank}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{markrank}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markrank={#1}}}%
-
-\define at key[UFCB]{locfill}{backrank}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{backrank}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backrank={#1}}}%
-
-\define at key[UFCB]{locfill}{markranks}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{markranks}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markranks={#1}}}%
-
-\define at key[UFCB]{locfill}{backranks}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{backranks}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backranks={#1}}}%
-
-\define at key[UFCB]{locfill}{markfile}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{markfile}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markfile={#1}}}%
-
-\define at key[UFCB]{locfill}{backfile}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{backfile}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backfile={#1}}}%
-
-\define at key[UFCB]{locfill}{markfiles}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{markfiles}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,markfiles={#1}}}%
-
-\define at key[UFCB]{locfill}{backfiles}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{backfiles}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,backfiles={#1}}}%
-
-%%% region marks
-
-\define at key[UFCB]{locfill}{markregion}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at regionmarkstyle\board at temp%{a}{b}%
-     }}%
-
-\define at key[UFCB]{glofill}{markregion}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,markregion={#1}}}%
-
-\define at key[UFCB]{locfill}{backregion}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at regionbackstyle\board at temp%{a}{b}%
-     }}%
-
-\define at key[UFCB]{glofill}{backregion}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,backregion={#1}}}%
-
-\define at key[UFCB]{locfill}{markregions}{% D
-   \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at regionmarkstyle\board at temp%{a}{b}%
-     }}%
-
-\define at key[UFCB]{glofill}{markregions}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,markregions={#1}}}%
-
-\define at key[UFCB]{locfill}{backregions}{% D
-    \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at regionbackstyle\board at temp%{a}{b}%
-     }}%
-
-\define at key[UFCB]{glofill}{backregions}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,backregions={#1}}}%
-
-%%% move marks
-
-\define at key[UFCB]{locfill}{markmove}{% D
-    \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@area\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at movemarkstyle\board at temp}}%
-
-\define at key[UFCB]{glofill}{markmove}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,markmove={#1}}}%
-
-\define at key[UFCB]{locfill}{backmove}{% D
-   \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@area\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at movebackstyle\board at temp}}%
-
-\define at key[UFCB]{glofill}{backmove}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,backmove={#1}}}%
-
-\define at key[UFCB]{locfill}{markmoves}{% D
-    \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@area\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at movemarkstyle\board at temp}}%
-
-\define at key[UFCB]{glofill}{markmoves}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,markmoves={#1}}}%
-
-\define at key[UFCB]{locfill}{backmoves}{% D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curarea:=\board at temp@list\do
-    {\expandafter\board at split@area\board at temp@curarea ARGEND%
-     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
-     \expandafter\board at pgf@add at movebackstyle\board at temp}}%
-
-\define at key[UFCB]{glofill}{backmoves}{% D
-    \board at do@l at addto@macro\board at val@savedkeylist{,backmoves={#1}}}%
-
-%% obsolete keys, shortcuts
-
-%% obsolete key,
-\define at choicekey[UFCB]{locfill}{applycolor}[\@tempval\@tempnr]{all,none,white,black}{% D
- \ifcase\@tempnr\relax
-  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=false}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=false,useonblack=false}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=white}%
- \or
-  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=black}%
- \fi}%
-
-\define at key[UFCB]{glofill}{applycolor}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,applycolor=#1}}%
-
-\define at key[UFCB]{locfill}{colorbackarea}{% D
-  \board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=#1}}%
-
-\define at key[UFCB]{glofill}{colorbackarea}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackarea=#1}}%
-
-\define at key[UFCB]{locfill}{colorbackareas}{% D
- \let\board at pgf@savebackstyle\board at pgf@curbackstyle
- \board at do@setsinglekeys*[UFCB]{locfill}{backstyle=color,backareas=#1,backstyle=\board at pgf@savebackstyle}}%
-
-\define at key[UFCB]{glofill}{colorbackareas}{% D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackareas={#1}}}%
-
-\define at key[UFCB]{locfill}{colorbackboard}[true]{%D
-   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
-   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
-   \board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{colorbackboard}[true]{%D
-   \board at do@l at addto@macro\board at val@savedkeylist{,colorbackboard=#1}}%
-
-\define at key[UFCB]{locfill}{colorboard}[true]{%D
-   \edef\board at temp@curstartfield{\board at val@startprintfilechar\board at val@startprintranknum}%
-   \edef\board at temp@curstopfield{\board at val@stopprintfilechar\board at val@stopprintranknum}%
-   \board at do@setsinglekeys*[UFCB]{locfill}{colorbackarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
-
-\define at key[UFCB]{glofill}{colorboard}[true]{%D
-   \board at do@l at addto@macro\board at val@savedkeylist{,colorboard=#1}}%
-
-\define at key[UFCB]{locfill}{colorbackranks}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@currank:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
-    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      colorbackareas=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{colorbackranks}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackranks={#1}}}%
-
-\define at key[UFCB]{locfill}{colorbackrank}{% D
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      colorbackranks=#1}}%
-
-\define at key[UFCB]{glofill}{colorbackrank}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackrank={#1}}}%
-
-\define at key[UFCB]{locfill}{colorbackfiles}{%D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfile:=\board at temp@list\do
-   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
-    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      colorbackareas=\board at temp@curstartfield-\board at temp@curstopfield}}}%
-
-\define at key[UFCB]{glofill}{colorbackfiles}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfiles={#1}}}%
-
-\define at key[UFCB]{locfill}{colorbackfile}{% D
-    \board at do@setsinglekeys*[UFCB]{locfill}{%
-      colorbackfiles=#1}}%
-
-\define at key[UFCB]{glofill}{colorbackfile}{%D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfile={#1}}}%
-
-\define at key[UFCB]{locfill}{colorbackfields}{% #1=list of fields %D
-  \edef\board at temp@list{#1}%
-  \@for\board at temp@curfield:=\board at temp@list\do
-    {\board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=\board at temp@curfield-\board at temp@curfield}}}%
-
-\define at key[UFCB]{glofill}{colorbackfields}{% %D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfields={#1}}}%
-
-\define at key[UFCB]{locfill}{colorbackfield}{% %D
-  \board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=#1-#1}}%
-
-\define at key[UFCB]{glofill}{colorbackfield}{% %D
-  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfield=#1}}%
-
-\define at key[UFCB]{locfill}{colorwhitebackfields}[true]{%
- \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
- \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=white, colorbackboard}%
- \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
-
-\define at key[UFCB]{glofill}{colorwhitebackfields}[true]{% %D
-    \board at do@l at addto@macro\board at val@savedkeylist{,colorwhitefields=#1}}%
-
-\define at key[UFCB]{locfill}{colorblackbackfields}[true]{%
-  \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
-  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=black, colorbackboard}%
-  \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
-
-\define at key[UFCB]{glofill}{colorblackbackfields}[true]{% %D
-    \board at do@l at addto@macro\board at val@savedkeylist{,colorblackfields=#1}}%
-
-%%obsolete
-\define at key[UFCB]{locfill}{colorblackfields}[true]{%
-  \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
-  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=black, colorbackboard}%
-  \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
-
-\define at key[UFCB]{glofill}{colorblackfields}[true]{% %D
-    \board at do@l at addto@macro\board at val@savedkeylist{,colorblackfields=#1}}%
-
-%% obsolete
-\define at key[UFCB]{locfill}{colorwhitefields}[true]{%
- \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
- \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=white, colorbackboard}%
- \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
-
-\define at key[UFCB]{glofill}{colorwhitefields}[true]{% %D
-    \board at do@l at addto@macro\board at val@savedkeylist{,colorwhitefields=#1}}%
-
-%% to add background border
-
-\define at key[UFCB]{locfill}{pgfborder}[\printarea]{%
- \edef\board at pgf@savebackstyle{\board at pgf@curbackstyle}%
- \board at do@setsinglekeys*[UFCB]{locfill}{%
-   backstyle=border,backregions=#1}%
-  \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savebackstyle}{backstyle}}%
-
-\define at key[UFCB]{glofill}{pgfborder}[\printarea]{% %D
-    \board at do@l at addto@macro\board at val@savedkeylist{,pgfborder=#1}}%
-
-
-%</chessboard-keys-pgf>

Added: trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx	2019-06-24 21:06:01 UTC (rev 51445)
@@ -0,0 +1,5134 @@
+%<*chessboard>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{chessboard}[2019/06/23 version v1.8 print chessboards]
+%%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $
+
+%1.4: Changed to restore style key
+%1.5: corrected values for mover key (w/b instead of w/s)
+%1.6: corrected bug in \board at do@getpiecelists (def instead of xdef)
+% 14.3.2011: added \normallineskip=1pt\relax\normallineskiplimit=0pt\relax
+%            (default latex values).
+%            to avoid bad spacing in amsart.cls (see tex.stackexchange discussion)
+\DeclareOption{skaknew}{}%
+\ProcessOptions
+
+\ifx\eTeXversion\@undefined
+  \PackageError{chessboard}
+    {This package may only be run using an\MessageBreak
+     etex in extended mode}
+    {Perhaps you forgot the `*' when making the format with (e)initex.}
+\fi
+
+\ifnum\eTeXversion<2
+  \PackageError{chessboard}
+    {This package requires e-TeX V 2}
+    {You are probably using the obsolete e-TeX V 1.}
+\fi
+
+\RequirePackage{chessfss}[2006/03/31]
+
+
+\RequirePackage{xkeyval}%
+\RequirePackage{xifthen}%
+\RequirePackage{ifpdf}%
+\RequirePackage{tikz}%
+\usepgfmodule{shapes}
+\ifpdf\else
+\RequirePackage{pst-node}%
+\fi
+\RequirePackage{etoolbox}
+%%%%%%%
+%% naming conventions
+%%%%%%%
+%% internal commands start with board@
+%% counters starts with cnt at board
+%% length starts with len at board
+%% xkeyval commands gets the prefix UFCB (for chess key)
+%% and the families gloinit/locinit, gloset/locset or glofill/locfill
+%% ARGEND is used to end/delimiters inputs
+%%%%%%%%
+
+%%%%
+%% New lengths
+%%%
+
+\newlength\len at board@tempx
+\newlength\len at board@tempy
+
+\newcommand\board at do@getsquaresize[1]{%#1=game
+ \cfss at getsquaresize{\csname board@#1 at refpiece\endcsname}}
+
+\newcommand\board at do@globalgetsquaresize[1]{%#1=game
+ \cfss at globalgetsquaresize{\csname board@#1 at refpiece\endcsname}}
+
+%%  \settowidth{\global\len at cfss@squarewidth}{\csname board@#1 at refpiece\endcsname}%
+%%  \settodepth{\global\len at cfss@squaredepth}{\csname board@#1 at refpiece\endcsname}%
+%%  \settoheight{\global\len at cfss@squaretotalheight}{\raisebox{\depth}{\csname board@#1 at refpiece\endcsname}}}%
+%%
+
+%%%
+%% New counters
+%%%
+
+%% counters for interating throught files and ranks
+%% Temporary counters, never rely on a value when not set at the start of the loop/command!
+\newcounter{cnt at board@file}%
+\newcounter{cnt at board@rank}%
+\newcounter{cnt at board}%
+
+%% User counters for printing the file and rank numbers.
+\newcounter{filelabel}%
+\renewcommand\thefilelabel{\alph{filelabel}}%
+\newcounter{ranklabel}%
+\renewcommand\theranklabel{\arabic{ranklabel}}
+
+%%%%%
+%% various tools
+%%%%%
+
+%% New setkeys command for inner keys, stolen from xkeyval.tex
+
+\def\board at do@setsinglekeys{\XKV at testopta{\XKV at testoptc\board at XKVsetsinglekeys}}%
+\def\board at XKVsetsinglekeys[#1]#2{%
+  \XKV at checksanitizea{#2}\XKV at resb
+  \let\XKV at naa\@empty
+  \XKV at for@o\XKV at resb\XKV at tempa{%
+    \expandafter\XKV at g@tkeyname\XKV at tempa=\@nil\XKV at tempa
+    \XKV at addtolist@x\XKV at naa\XKV at tempa}%
+  \expandafter\XKV at s@tkeys\expandafter{\XKV at resb}{#1}}%
+
+
+\newcommand\board at do@setsavedkey[2]{%#1 = argument (so that it can be better expanded)
+                                    % #2=key
+ \board at do@setsinglekeys*[UFCB]{locfill}{#2=#1}}%
+
+%%% local addto
+
+\newcommand{\board at do@l at addto@macro}[2]{%
+  \edef#1{\unexpanded\expandafter{#1#2}}}
+
+%%% alphabetic numbering with zero, adapted from latex.ltx
+
+\newcommand\zeroalph{}
+
+\def\zeroalph#1{\expandafter\@zeroalph\csname c@#1\endcsname}%
+
+\def\@zeroalph#1{%
+  \ifcase#1Z\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or
+   k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or
+    y\or z\else\@ctrerr\fi}%
+
+%% expanded @namedef
+\def\board at enamedef#1{\expandafter\edef\csname #1\endcsname}%
+
+%% new tests
+
+\newtest{\board at test@isonactivecolor}[2]{%filenr, ranknr b2={2}{2}
+ \(\board at test@iswhitefield{#1}{#2}
+ \AND
+ \boolean{UFCB at locfill@useonwhite}\)
+ \OR
+ \(
+ \(\NOT\board at test@iswhitefield{#1}{#2}\)
+ \AND
+ \boolean{UFCB at locfill@useonblack}\)}
+
+\newtest{\board at test@iswhitefield}[2]{%filenr, ranknr b2={2}{2}
+ \isodd{\number\numexpr #1+#2\relax}}
+
+\newtest{\board at test@isfieldintrimarea}[2]{%%filenr, ranknr
+ \NOT \(#1<\board at val@starttrimfilenum\) \AND
+ \NOT  \(#1>\board at val@stoptrimfilenum\) \AND
+ \NOT \(#2>\board at val@starttrimranknum\) \AND
+ \NOT  \(#2<\board at val@stoptrimranknum\)}
+
+\newtest{\board at test@isareaintrimarea}[4]{%%startfilenr, ranknr
+                                          %%stopfilenr, ranknr
+ \NOT \(#1<\board at val@starttrimfilenum\) \AND
+ \NOT  \(#3>\board at val@stoptrimfilenum\) \AND
+ \NOT \(#2>\board at val@starttrimranknum\) \AND
+ \NOT  \(#4<\board at val@stoptrimranknum\)}
+
+%%%%%
+%% converting commands
+%%%%%
+
+%%% command to get a (input) char from a number
+\newcommand*\board at conv@numbertochar[1]{{\uccode`!=#1\relax\uppercase{\gdef\board at temp@char{!}}}}%
+
+%% converts a filechar to a number and stores the value in counter #2
+%% in simple case use  \number `#1
+\newcommand*\board at conv@filechartonumber[2]{%
+  \setcounter{#2}{\number`#1 }%
+    \ifthenelse
+     {\value{#2} = 90}%
+     % char =Z
+     {\addtocounter{#2}{-90}}%
+     {\ifthenelse
+       {\value{#2} >96 \AND \value{#2} <123}%
+       %char a-z
+       {\addtocounter{#2}{-96}}%
+         {\PackageError{chessboard}%
+           {Wrong field input}%
+           {chars for files should be Z (for zero) or between a-z}}}}%
+
+%% converts a char to the lower case (to set white and black pieces)
+\newcommand*\board at conv@chartolowerchar[1]{% #1 char
+  \setcounter{cnt at board}{\number`#1 }%
+    \ifthenelse
+     {\value{cnt at board} > 64 \AND \value{cnt at board} < 91}%
+     % char between A-Z
+     {\addtocounter{cnt at board}{+32}%
+      \board at conv@numbertochar{\the\c at cnt@board}}%
+     {\def\board at temp@char{#1}}}%
+
+%% converts a char to the upper case (to set white and black pieces)
+\newcommand*\board at conv@chartoupperchar[1]{% #1 char,
+  \setcounter{cnt at board}{\number`#1 }%
+    \ifthenelse
+     {\value{cnt at board} > 96 \AND \value{cnt at board} < 123}%
+     % char between a-z
+     {\addtocounter{cnt at board}{-32}%
+      \board at conv@numbertochar{\the\c at cnt@board}}%
+     {\def\board at temp@char{#1}}}%
+
+%%%%%
+%% splitting commands
+%%%%%
+
+%% split piece positions like Ka1, Qb3 or Rz20:
+%% use as \board at split@pieceposition Ka10ARGEND
+\def\board at split@pieceposition#1#2#3ARGEND{%
+  \edef\board at temp@curpiece{#1}%
+  \edef\board at temp@curfilechar{#2}%
+  \edef\board at temp@curranknum{\number#3}%
+  \board at conv@filechartonumber{#2}{cnt at board}%
+  \edef\board at temp@curfilenum{\the\value{cnt at board}}}%
+
+%% split fields like a1, b3 or z20:
+%% use as \board at split@field a1ARGEND
+\def\board at split@field#1#2ARGEND{%
+  \edef\board at temp@curfilechar{#1}%
+  \edef\board at temp@curranknum{\number#2}%
+  \board at conv@filechartonumber{#1}{cnt at board}%
+  \edef\board at temp@curfilenum{\the\value{cnt at board}}}%
+
+%% split area like a1-b3
+\def\board at split@area#1-#2ARGEND{%
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at temp@curstartfilenum\board at temp@curfilenum
+  \let\board at temp@curstartranknum\board at temp@curranknum
+  \let\board at temp@curstartfilechar\board at temp@curfilechar
+  \edef\board at temp@curstartfield{\board at temp@curstartfilechar\board at temp@curstartranknum}%
+  \expandafter\board at split@field#2ARGEND%
+  \let\board at temp@curstopfilenum\board at temp@curfilenum
+  \let\board at temp@curstopranknum\board at temp@curranknum%
+  \let\board at temp@curstopfilechar\board at temp@curfilechar
+  \edef\board at temp@curstopfield{\board at temp@curstopfilechar\board at temp@curstopranknum}%
+  }%
+
+%% split and sorts areas like a1-b3
+\def\board at split@areasort#1-#2ARGEND{%
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at temp@curstartfilenum\board at temp@curfilenum
+  \let\board at temp@curstartranknum\board at temp@curranknum
+  \let\board at temp@curstartfilechar\board at temp@curfilechar
+  \expandafter\board at split@field#2ARGEND%
+  \ifthenelse%
+   {\board at temp@curstartfilenum<\board at temp@curfilenum}%
+   {\let\board at temp@curstopfilenum\board at temp@curfilenum
+    \let\board at temp@curstopfilechar\board at temp@curfilechar}%
+   {\let\board at temp@curstopfilenum\board at temp@curstartfilenum
+    \let\board at temp@curstopfilechar\board at temp@curstartfilechar
+    \let\board at temp@curstartfilenum\board at temp@curfilenum
+    \let\board at temp@curstartfilechar\board at temp@curfilechar}%
+  \ifthenelse%
+   {\board at temp@curstartranknum>\board at temp@curranknum}%
+   {\let\board at temp@curstopranknum\board at temp@curranknum}%
+   {\let\board at temp@curstopranknum\board at temp@curstartranknum
+    \let\board at temp@curstartranknum\board at temp@curranknum}%
+  \edef\board at temp@curstartfield{\board at temp@curstartfilechar\board at temp@curstartranknum}%
+  \edef\board at temp@curstopfield{\board at temp@curstopfilechar\board at temp@curstopranknum}%
+  }%
+
+\newcommand\board at do@cliparea[1]{%
+    \expandafter\board at split@areasort#1ARGEND%
+    \ifthenelse%
+    {\board at temp@curstartfilenum<\board at val@startprintfilenum}%
+    {\let\board at temp@curstartfilechar\board at val@startprintfilechar%
+     \let\board at temp@curstartfilenum\board at val@startprintfilenum}%
+    {}%
+    \ifthenelse%
+    {\board at temp@curstartranknum>\board at val@startprintranknum}%
+    {\let\board at temp@curstartranknum\board at val@startprintranknum}%
+    {}%
+    \ifthenelse%
+    {\board at temp@curstopranknum<\board at val@stopprintranknum}%
+    {\let\board at temp@curstopranknum\board at val@stopprintranknum}%
+    {}%
+    \ifthenelse%
+    {\board at temp@curstopfilenum>\board at val@stopprintfilenum}%
+    {\let\board at temp@curstopfilechar\board at val@stopprintfilechar
+     \let\board at temp@curstopfilenum\board at val@stopprintfilenum}%
+    {}%
+    \ifthenelse{\board at temp@curstopfilenum<\board at temp@curstartfilenum}%
+    {\edef\board at temp@curcliparea{}}%
+    {\ifthenelse{\board at temp@curstartranknum<\board at temp@curstopranknum}%
+     {\edef\board at temp@curcliparea{}}%
+     {\edef\board at temp@curcliparea{%
+      \board at temp@curstartfilechar\board at temp@curstartranknum-%
+      \board at temp@curstopfilechar\board at temp@curstopranknum}}}}
+
+%%% Making lists
+
+\newcommand\board at do@getfieldcolorlists{%
+  \setcounter{cnt at board@file}{\board at val@startprintfilenum}%
+  \def\board at val@blackfieldlist{}%
+  \def\board at val@whitefieldlist{}%
+  \whiledo%
+   {\value{cnt at board@file}< \numexpr\board at val@stopprintfilenum+1\relax}%
+   {\setcounter{cnt at board@rank}{\board at val@stopprintranknum}%
+    \whiledo%
+     {\value{cnt at board@rank}<\numexpr\board at val@startprintranknum + 1\relax}%
+     {\setcounter{cnt at board}{\numexpr \the\c at cnt@board at file+\the\c at cnt@board at rank\relax}%
+      \ifthenelse%
+       {\isodd{\value{cnt at board}}}
+       {\ifthenelse%
+         {\equal{\board at val@whitefieldlist}{}}%
+         {\edef\board at val@whitefieldlist{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}}%
+         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
+          \expandafter\board at do@l at addto@macro\expandafter\board at val@whitefieldlist\expandafter{\expandafter,\board at temp@curfield}}}%
+       {\ifthenelse%
+         {\equal{\board at val@blackfieldlist}{}}%
+         {\edef\board at val@blackfieldlist{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}}%
+         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
+          \expandafter\board at do@l at addto@macro\expandafter\board at val@blackfieldlist\expandafter{\expandafter,\board at temp@curfield}}}%
+      \addtocounter{cnt at board@rank}{1}}%
+    \addtocounter{cnt at board@file}{1}}}%
+
+%% getting the list of fields where pieces resides
+%% added 2007-12-11, version 1.5.
+%% the piecelists are stored in cblist<english! char of piece>
+
+\newcommand\board at do@getpiecelists{%
+ \setcounter{cnt at board@file}{\board at val@minfilenum}%
+ \setcounter{cnt at board@rank}{\board at val@minranknum}%
+ \edef\board at temp@curlist{%
+ \csname board@\board at val@game @piececharlist\endcsname}%
+ \@for\board at temp@piecechar:=\board at temp@curlist
+  \do {%
+   \expandafter\xdef\csname cblist\board at temp@piecechar\endcsname{}%
+   \expandafter\xdef\csname board at temp@\board at temp@piecechar @comma\endcsname{}}%
+ \xdef\cblistempty{}%
+ \def\board at temp@empty at comma{}%
+ \whiledo
+  {\value{cnt at board@file}<\numexpr \board at val@maxfilenum+1\relax}%
+  {\whiledo
+   {\value{cnt at board@rank}<\numexpr \board at val@maxranknum+1\relax}%
+   {\edef\board at temp@piecechar{%
+     \csname
+       board at val@f\the\c at cnt@board at file r\the\c at cnt@board at rank @piecechar\endcsname}%
+   \edef\board at temp@curlist{%
+    \csname cblist\board at temp@piecechar\endcsname}%
+   \edef\board at temp@comma{%
+    \csname board at temp@\board at temp@piecechar @comma\endcsname}%
+   \expandafter\xdef\csname cblist\board at temp@piecechar \endcsname{%
+    \board at temp@curlist
+    \board at temp@comma
+    \alph{cnt at board@file}\the\c at cnt@board at rank}%
+   \expandafter\def
+     \csname board at temp@\board at temp@piecechar @comma\endcsname
+     {,}%
+   \stepcounter{cnt at board@rank}}%
+   \setcounter{cnt at board@rank}{\board at val@minranknum}%
+   \stepcounter{cnt at board@file}}}
+
+
+
+%%splitting an FEN in pieces,
+%%% use as \board at split@fen <arg>X X X X X X ARGEND
+%%% or as \board at split@fen <arg> X X X X X X ARGEND
+\def\board at split@fen#1 #2 #3 #4 #5 #6 #7ARGEND{%
+  \def\board at val@position{#1}%
+  \ifthenelse{\equal{#2}{X}}%
+   {}%
+   {\def\board at val@mover{#2}}%
+  \ifthenelse{\equal{#3}{X}}%
+   {}%
+   {\def\board at val@castling{#3}}%
+  \ifthenelse{\equal{#4}{X}}%
+   {}%
+   {\def\board at val@enpassant{#4}}%
+  \ifthenelse{\equal{#5}{X}}%
+   {}%
+   {\def\board at val@halfmove{#5}}%
+  \ifthenelse{\equal{#6}{X}}%
+   {}%
+   {\def\board at val@fullmove{#6}}%
+    }%
+
+\input{chessboard-keys-main.sty}%
+\input{chessboard-keys-pgf.sty}%
+\input{chessboard-pgf.sty}
+
+%%% command to store the piece for a field
+%%% the input char of the piece is translated to english first
+%%% the char is stored in the command
+%%% board at val@f<filenum>r<ranknum>@piecechar
+
+\newcommand\board at do@storepieceonfield[3]{%#1 piece #2file #3 rank
+  \ifcsname board at val@lang\board at val@curlang @#1\endcsname
+    \expandafter\edef\csname board at val@f#2r#3 at piecechar\endcsname{%
+      \csname board at val@lang\board at val@curlang @#1\endcsname}%
+  \else
+    \PackageError{chessboard}%
+      {Char #1 unknown in input language  \board at val@curlang!}%
+      {You either misspelled the char for the piece or forgot to define it for the current language}%
+  \fi}%
+
+%%% Command to get the piece of a field. Don't know if needed
+
+\newcommand\board at do@getpieceoffield[2]{%#1 file, #2 rank
+    \@nameuse{board at val@f#1r#2 at piecechar}}%
+
+%%% Commands to print (or not print) the piece of a field:
+
+%%% prints an empty field
+\newcommand\board at do@printfieldempty[2]{%fileNr, rankNr
+  \ifthenelse%
+     {\board at test@iswhitefield{#1}{#2}}%white field
+     {\@nameuse{board@\board at val@game @piece at empty@white}}%
+     {\@nameuse{board@\board at val@game @piece at empty@black}}}
+
+%%% the command to print the content of a single field
+\newcommand\board at do@printfieldcontent[2]{%% 1=fileNr 2=rankNr
+   \ifcsname board at val@f#1r#2 at piecechar\endcsname
+    \ifthenelse{\board at test@iswhitefield{#1}{#2}}%white field
+               {\@nameuse{board at the@piece@\@nameuse{board at val@f#1r#2 at piecechar}@white}}%
+               {\@nameuse{board at the@piece@\@nameuse{board at val@f#1r#2 at piecechar}@black}}%
+
+%%               {\@nameuse{board@\board at val@game @piece@\@nameuse{board at val@f#1r#2 at piecechar}@white}}%
+%%               {\@nameuse{board@\board at val@game @piece@\@nameuse{board at val@f#1r#2 at piecechar}@black}}%
+   \else
+    \board at do@printfieldempty{#1}{#2}%
+   \fi}%
+
+%%% the command to print a fieldbox
+\newcommand\board at do@printfieldbox[2]{% 1=fileNr 2=rank
+  \def\board at temp@curfilenum{#1}%
+  \def\board at temp@curranknum{#2}%
+  \raisebox{\len at cfss@squaredepth}[\len at cfss@squaretotalheight][0pt]{%
+    \makebox[\len at cfss@squarewidth][r]{%
+      %% can be used to color only the piece in fonts with masks
+      % deleted 01.06.2006
+      %\def\cfss at piececolor{\csname board at val@f#1r#2 at color\endcsname}%
+      %\csname board at val@f#1r#2 at color\endcsname
+      \csname board at val@f#1r#2 at emph\endcsname % eg. for color, bfseries
+       \makebox[\len at cfss@squarewidth]{%
+         \vphantom{\csname board@\board at val@game @refpiece\endcsname}%
+         \ifcsname board at the@f#1r#2\endcsname
+           \csname board at the@f#1r#2\endcsname
+         \else
+           \board at do@printfieldcontent{#1}{#2}%
+         \fi}}}}%
+
+%%% command to print a rank/row from firstfile to lastfile
+\newcommand\board at do@printrank[3]%#1 rank/rownumber #2 firstfile, #3 lastfile
+ {\begingroup
+  \ifUFCB at locset@labelleft
+  \board at do@printlabelleftfield{#1}%
+  \fi
+  \ifthenelse{#2<#3}%
+   {\setcounter{cnt at board@file}{#2}%% #2<#3: 1->n/normal
+    \whiledo%
+     {\value{cnt at board@file}<#3
+      \OR
+      \value{cnt at board@file}=#3}%
+     {\board at do@printfieldbox{\number\value{cnt at board@file}}{#1}%
+      \stepcounter{cnt at board@file}}}%
+   {\setcounter{cnt at board@file}{#2}%% #2>#3 n->1/inverse
+    \whiledo%
+     {\value{cnt at board@file}>#3
+      \OR
+      \value{cnt at board@file}=#3}%
+     {\board at do@printfieldbox{\number\value{cnt at board@file}}{#1}%
+      \addtocounter{cnt at board@file}{-1}}}%
+    \ifUFCB at locset@labelright
+    \board at do@printlabelrightfield{#1}%
+    \fi
+    \endgroup}%
+
+%%% command to hide /show a fields content:
+
+\newcommand*\board at do@showfield[2]{%
+  \@namedef{board at the@f#1r#2}{\board at do@printfieldcontent{#1}{#2}}}
+
+\newcommand*\board at do@showarea[1]{%
+ \expandafter\board at split@areasort#1ARGEND%
+ %% initialisation
+ \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+ \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
+ %
+ \whiledo
+  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
+  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+   \whiledo
+    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
+    {\board at do@showfield{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
+     \addtocounter{cnt at board@file}{1}%
+     }%
+   \addtocounter{cnt at board@rank}{-1}}}%
+
+\newcommand*\board at do@hidefield[2]{%
+  \@namedef{board at the@f#1r#2}{%
+  \board at do@printfieldempty{#1}{#2}}}
+
+\newcommand*\board at do@hidearea[1]{%
+ \expandafter\board at split@areasort#1ARGEND%
+ %% initialisation
+ \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+ \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
+ %
+ \whiledo
+  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
+  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+   \whiledo
+    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
+    {\board at do@hidefield{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
+     \addtocounter{cnt at board@file}{1}%
+     }%
+   \addtocounter{cnt at board@rank}{-1}}}%
+
+%% Command to hide a piece type
+
+\newcommand*\board at do@hidetype[1]{% char or empty
+  \ifthenelse%
+   {\equal{#1}{empty}}%
+   {\def\board at temp@char{empty}}%
+   {\board at do@strip #1 ARGEND}%
+  \ifcsname board at val@lang\board at val@curlang @\board at temp@char\endcsname
+   \edef\board at temp@curpiece{%
+      \csname board at val@lang\board at val@curlang @\board at temp@char\endcsname}%
+  \else
+    \PackageError{chessboard}%
+      {Char #1 unknown in input language \board at val@curlang!}%
+      {You either misspelled the char for the piece or forgot to define it for the current language}%
+  \fi
+  \@namedef{board at the@piece@\board at temp@curpiece @white}{%
+   \@nameuse{board@\board at val@game @piece at empty@white}}%
+  \@namedef{board at the@piece@\board at temp@curpiece @black}{%
+   \@nameuse{board@\board at val@game @piece at empty@black}}}%
+
+\newcommand*\board at do@hidetypelist[1]{% charlist
+ \@for\board at temp@char:=#1\do
+ {\expandafter\board at do@hidetype\expandafter{\board at temp@char}}}
+
+%% Command to show a piece type
+
+\def\board at do@strip #1#2ARGEND{\def\board at temp@char{#1}}
+
+\newcommand*\board at do@showtype[1]{% char or empty
+  \ifthenelse%
+   {\equal{#1}{empty}}%
+   {\def\board at temp@char{empty}}%
+   {\board at do@strip #1 ARGEND}%
+  \ifcsname board at val@lang\board at val@curlang @\board at temp@char\endcsname
+   \edef\board at temp@curpiece{%
+      \csname board at val@lang\board at val@curlang @\board at temp@char\endcsname}%
+  \else
+    \PackageError{chessboard}%
+      {Char #1 unknown in input language  \board at val@curlang!}%
+      {You either misspelled the char for the piece or forgot to define it for the current language}%
+  \fi
+  \board at enamedef{board at the@piece@\board at temp@curpiece @white}{%
+   \noexpand\@nameuse{board@\noexpand\board at val@game @piece@\board at temp@curpiece @white}}%
+  \board at enamedef{board at the@piece@\board at temp@curpiece @black}{%
+   \noexpand\@nameuse{board@\noexpand\board at val@game @piece@\board at temp@curpiece @black}}}%
+
+\newcommand*\board at do@showtypelist[1]{% charlist
+ \@for\board at temp@char:=#1\do
+ {\expandafter\board at do@showtype\expandafter{\board at temp@char}}}
+
+%%% Clear area
+
+\newcommand\board at do@cleararea[1]{%
+ \expandafter\board at split@areasort#1ARGEND%
+ %% initialisation
+ \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+ \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
+ %
+ \whiledo
+  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
+  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+   \whiledo
+    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
+    {\board at do@storepieceonfield{empty}{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
+     \addtocounter{cnt at board@file}{1}}%
+   \addtocounter{cnt at board@rank}{-1}}}%
+
+%%%%%%
+%% Scanning a FEN (only the first part) to set the fields
+%%%%%%
+
+\def\@usenone at until@nil#1\@nil{}%
+
+\newcommand\board at scan@fen[1]{%
+  \setcounter{cnt at board@rank}{\board at val@startfenranknum}%
+  \setcounter{cnt at board@file}{\board at val@startfenfilenum}%
+  \expandafter\board at scan@fennext#1\relax\@nil}%
+
+\newcommand\board at scan@fennext[1]{%
+  \ifx#1\relax \expandafter\@usenone at until@nil \fi
+  \afterassignment\board at fork@feninput\count@ 0#1}%
+
+\newcommand\board at fork@feninput{%
+  \ifnum\count@=\z@
+    \expandafter\board at do@process at fenchar
+  \else
+    \expandafter\board at do@process at fennumber
+  \fi}%
+
+\newcommand\board at do@process at fennumber{%
+  \whiledo%
+   {\the\count@>0}%
+   {\ifthenelse%
+     {\(\value{cnt at board@file}>\board at val@startfillfilenum
+        \OR
+        \value{cnt at board@file}=\board at val@startfillfilenum\)
+      \AND
+      \(\value{cnt at board@file}<\board at val@stopfillfilenum
+        \OR
+        \value{cnt at board@file}=\board at val@stopfillfilenum\)
+      \AND
+      \(\value{cnt at board@rank}<\board at val@startfillranknum
+        \OR
+        \value{cnt at board@rank}=\board at val@startfillranknum\)
+      \AND
+      \(\value{cnt at board@rank}>\board at val@stopfillranknum
+        \OR
+        \value{cnt at board@rank}=\board at val@stopfillranknum\)}
+     {\board at do@storepieceonfield{empty}{\the\value{cnt at board@file}}{\the\value{cnt at board@rank}}}%
+     {}%
+    \addtocounter{cnt at board@file}{1}%
+    \advance\count at -1\relax}%
+  \board at scan@fennext}%
+
+\newcommand\board at do@process at fenchar[1]{%
+  \ifthenelse%
+   {\equal{#1}{/}}%
+   {\setcounter{cnt at board@file}{\board at val@startfenfilenum}% new row
+    \addtocounter{cnt at board@rank}{-1}}%
+   {\ifthenelse%
+     %{\value{cnt at board@file}>\board at val@stopfillfilenum}%
+     {\(\value{cnt at board@file}>\board at val@startfillfilenum
+        \OR
+        \value{cnt at board@file}=\board at val@startfillfilenum\)
+      \AND
+      \(\value{cnt at board@file}<\board at val@stopfillfilenum
+        \OR
+        \value{cnt at board@file}=\board at val@stopfillfilenum\)
+      \AND
+      \(\value{cnt at board@rank}<\board at val@startfillranknum
+        \OR
+        \value{cnt at board@rank}=\board at val@startfillranknum\)
+      \AND
+      \(\value{cnt at board@rank}>\board at val@stopfillranknum
+        \OR
+        \value{cnt at board@rank}=\board at val@stopfillranknum\)}
+    %
+     {\board at do@storepieceonfield{#1}{\the\value{cnt at board@file}}{\the\value{cnt at board@rank}}%
+      \addtocounter{cnt at board@file}{1}}%
+     {\addtocounter{cnt at board@file}{1}}%
+   }%
+  \board at scan@fennext}%
+
+%%% Command to add pieces
+
+\newcommand\board at do@addpieces[1]{% List
+  \@for\board at temp@curpiecepos:=#1\do
+    {\expandafter\board at split@pieceposition\board at temp@curpiecepos ARGEND%
+     \board at do@storepieceonfield{\board at temp@curpiece}{\board at temp@curfilenum}{\board at temp@curranknum}}}%
+
+\newcommand\board at do@addwhitepieces[1]{% List
+  \@for\board at temp@curpiecepos:=#1\do
+    {\expandafter\board at split@pieceposition\board at temp@curpiecepos ARGEND%
+     \expandafter\board at conv@chartoupperchar\board at temp@curpiece
+     \board at do@storepieceonfield{\board at temp@char}{\board at temp@curfilenum}{\board at temp@curranknum}}}%
+
+\newcommand\board at do@addblackpieces[1]{% List
+  \@for\board at temp@curpiecepos:=#1\do
+    {\expandafter\board at split@pieceposition\board at temp@curpiecepos ARGEND%
+     \expandafter\board at conv@chartolowerchar\board at temp@curpiece
+     \board at do@storepieceonfield{\board at temp@char}{\board at temp@curfilenum}{\board at temp@curranknum}}}%
+
+%%% Command  to save fen
+
+%%% goes through board and get the fen description of the position
+
+\newcommand*\board at do@getposition{%
+  \setcounter{cnt at board@rank}{\board at val@startstoreranknum}%
+  \board at do@getrankposition{\value{cnt at board@rank}}%
+  \edef\board at val@position{\board at temp@currankposition}%
+  \whiledo%
+   {\value{cnt at board@rank}>\numexpr \board at val@stopstoreranknum\relax}%
+   {\addtocounter{cnt at board@rank}{-1}%
+    \board at do@getrankposition{\value{cnt at board@rank}}%
+    \edef\board at val@position{\board at val@position/\board at temp@currankposition}}}%
+
+\newcommand*\board at do@getrankposition[1]{%
+  \setcounter{cnt at board@file}{\board at val@startstorefilenum}%
+  \setcounter{cnt at board}{0}%
+  \edef\board at temp@currankposition{}%
+  \whiledo%
+   {\value{cnt at board@file}<\numexpr \board at val@stopstorefilenum+1\relax}%
+   {\ifthenelse%
+     {\equal{\csname board at val@f\the\c at cnt@board at file r#1 at piecechar\endcsname}{empty}}%
+     {\stepcounter{cnt at board}}%
+     {\ifthenelse%
+       {\value{cnt at board}>0}%
+       {\edef\board at temp@currankposition{%
+          \board at temp@currankposition
+          \number\value{cnt at board}%
+          \csname board at val@f\the\c at cnt@board at file r\the\c at cnt@board at rank @piecechar\endcsname}%
+        \setcounter{cnt at board}{0}}%
+       {\edef\board at temp@currankposition{%
+          \board at temp@currankposition
+          \csname board at val@f\the\c at cnt@board at file r\the\c at cnt@board at rank @piecechar\endcsname}}}%
+    \addtocounter{cnt at board@file}{1}}%
+  \ifthenelse%
+   {\value{cnt at board}>0}%
+   {\edef\board at temp@currankposition{%
+      \board at temp@currankposition
+      \number\value{cnt at board}}}%
+   {}}%
+
+%% stores the fen in chessgame.<name> (as in skak.sty the \storegame command
+
+\newcommand*\board at do@storefen[1]{%
+  \def\board at temp@curfen{}%
+  \board at do@getposition
+  \edef\board at temp@curfen{\board at val@position\space
+                          \board at val@mover\space
+                          \board at val@castling\space
+                          \board at val@enpassant\space
+                          \board at val@halfmove\space
+                          \board at val@fullmove}%
+  \expandafter\xdef\csname chessgame.#1\endcsname{\board at temp@curfen}}%
+
+%% stores the fen in a file, as in skak.sty the \savegame command
+\newcommand*\board at do@savefen[1]{%
+  \def\board at temp@curfen{}%
+  \board at do@getposition
+  \edef\board at temp@curfen{\board at val@position\space
+                          \board at val@mover\space
+                          \board at val@castling\space
+                          \board at val@enpassant\space
+                          \board at val@halfmove\space
+                          \board at val@fullmove}%
+  \toks0=\expandafter{\board at temp@curfen}%
+  \immediate\openout0=#1.fen%
+  \immediate\write0{\the\toks0}%
+  \immediate\closeout0}%
+
+\newcommand*\board at do@loadfen[1]{%
+   \immediate\openin0=#1.fen\relax
+   \ifeof0
+   \PackageError{chessboard}{File #1.fen not found}{}%
+   \else
+   \immediate\read0 to \board at temp@curfen%
+   \fi
+   \immediate\closein0\relax}
+
+%%%%
+%% Decoration
+%%%%
+
+%%% the command to print the mover
+
+\newcommand\board at do@printtopmover{%
+  \raisebox%
+   {\dimexpr
+     \numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight
+     -\board at val@movertoplift
+     -\height
+   \relax}[0pt][0pt]%
+   {\makebox[0pt][l]{%
+     \hspace*{\board at val@movertopshift}%
+     \fontsize{\board at val@moversize}{\board at val@moversize}\selectfont
+     \ifthenelse%
+      {\equal{\board at val@mover}{w}}%
+      {\ifUFCB at locset@inverse
+       \board at val@moverwhitetop
+       \fi}%
+      {\ifUFCB at locset@inverse\else
+       \board at val@moverblacktop
+       \fi}}}}%
+
+\newcommand\board at do@printbottommover{%#1=color}
+  \raisebox%
+   {\board at val@moverbottomlift}[0pt][0pt]%
+   {\makebox[0pt][l]{%
+     \hspace*{\board at val@moverbottomshift}%
+     \fontsize{\board at val@moversize}{\board at val@moversize}\selectfont
+    \ifthenelse%
+     {\equal{\board at val@mover}{w}}%
+     {\ifUFCB at locset@inverse
+      \else
+       \board at val@moverwhitebottom
+      \fi}%
+     {\ifUFCB at locset@inverse
+       \board at val@moverblackbottom
+      \fi}}}}%
+
+\newcommand\cbDefineMoverStyle[6][]{%
+ % #1 can be used for checks
+ %#2name, #3=white top, #4=white bottom, #5=black top, #6=black bottom
+    \@namedef{board at val@moverstyle@#2}{%
+     #1\relax
+     \def\board at val@moverwhitetop{#3}%
+     \def\board at val@moverwhitebottom{#4}%
+     \def\board at val@moverblacktop{#5}%
+     \def\board at val@moverblackbottom{#6}}}%
+
+\cbDefineMoverStyle%
+    {circle}
+    {$\circ$}
+    {$\circ$}
+    {$\bullet$}
+    {$\bullet$}
+
+\cbDefineMoverStyle%
+    {square}
+    {\tikz \draw[color=black] (0,0) rectangle (0.65em,0.65em);}
+    {\tikz \draw[color=black] (0,0) rectangle (0.65em,0.65em);}
+    {\tikz \fill[color=black] (0,0) rectangle (0.65em,0.65em);}
+    {\tikz \fill[color=black] (0,0) rectangle (0.65em,0.65em);}
+
+\cbDefineMoverStyle%
+ {triangle}
+ {\tikz \draw[color=black] (0.6ex,0pt)--(0,1.25ex)--(1.2ex,1.25ex) --cycle;}
+ {\tikz \draw[color=black] (0.6ex,1.25ex)--(0,0)--(1.2ex,0) --cycle;}
+ {\tikz \fill[color=black] (0.6ex,0pt)--(0,1.25ex)--(1.2ex,1.25ex) --cycle;}
+ {\tikz \fill[color=black] (0.6ex,1.25ex)--(0,0)--(1.2ex,0) --cycle;}
+
+
+\cbDefineMoverStyle%
+ %#1: optional, can be used for checks
+ %#2=style name, #3=white top, #4=white bottom, #5=black top, #6=black bottom
+    [\@ifundefined%
+      {rotatebox}%
+      {\PackageError{chessboard}%
+        {You must load the package graphics or graphicx
+         if you want to use the mover style squarearrow}{}}%
+      {}%
+     \@ifundefined%
+      {ding}%
+      {\PackageError{chessboard}%
+        {You must load the package pifont
+         if you want to use the mover style squarearrow}{}}%
+      {}]
+    {squarearrow}% #2
+    {\rotatebox{-90}{$\square$\,\ding{222}}}%
+    {\rotatebox{90}{$\square$\,\ding{222}}}%
+    {\rotatebox{-90}{$\blacksquare$\,\ding{222}}}%
+    {\rotatebox{90}{$\blacksquare$\,\ding{222}}}%
+
+%%% the command to print the labels text
+
+\newcommand\board at do@printlabelleftfield[1]{%rank
+ \begingroup
+  \setcounter{ranklabel}{#1}%
+  \raisebox{\board at val@labelleftlift}[\len at cfss@squaretotalheight][0pt]{%
+    \makebox[0pt][r]{%
+     \makebox[\board at val@labelleftwidth][l]{%
+       \cfss at sidefont
+       \board at val@labelleftfont
+       \selectfont
+       \board at val@labelleftformat}}}%
+ \endgroup}%
+
+\newcommand\board at do@printlabelrightfield[1]{%rank
+ \begingroup
+  \setcounter{ranklabel}{#1}%
+  \raisebox{\board at val@labelrightlift}[\len at cfss@squaretotalheight][0pt]{%
+    \makebox[0pt][l]{%
+     \makebox[\board at val@labelrightwidth][r]{%
+      \cfss at sidefont
+      \board at val@labelrightfont
+      \selectfont
+      \board at val@labelrightformat}}}%
+ \endgroup}%
+
+\newcommand\board at do@printlabelbottomfield{%
+  \raisebox{-\board at val@labelbottomlift}[0pt][0pt]{\makebox[\len at cfss@squarewidth][c]{\board at val@labelbottomformat}}}%
+
+\newcommand\board at do@printlabeltopfield{%
+  \raisebox{\dimexpr\len at cfss@squaretotalheight+\board at val@labeltoplift\relax}[0pt][0pt]%
+   {\makebox[\len at cfss@squarewidth][c]{\board at val@labeltopformat}}}%
+
+\newcommand\board at do@printlabelbottom[2]{%#1 firstfile, #2 lastfile
+  \begingroup
+  \cfss at sidefont
+  \board at val@labelbottomfont
+  \selectfont
+  \makebox[0pt][r]{%
+    \setcounter{cnt at board@file}{#1}%
+    \whiledo%
+      {\board at print@sign\value{cnt at board@file}<\board at print@sign#2
+       \OR
+       \value{cnt at board@file}=#2}%
+      {\setcounter{filelabel}{\value{cnt at board@file}}%
+       \board at do@printlabelbottomfield%
+       \addtocounter{cnt at board@file}{\board at print@sign1}}}%
+  \endgroup}%
+
+\newcommand\board at do@printlabeltop[2]{%#1 firstfile, #2 lastfile
+  \begingroup
+  \cfss at sidefont
+  \board at val@labeltopfont
+  \selectfont
+  \makebox[0pt][l]{%
+    \setcounter{cnt at board@file}{#1}%
+    \whiledo%
+     {\board at print@sign\value{cnt at board@file}<\board at print@sign#2
+      \OR
+      \value{cnt at board@file}=#2}%
+     {\setcounter{filelabel}{\value{cnt at board@file}}%
+      \board at do@printlabeltopfield%
+      \addtocounter{cnt at board@file}{\board at print@sign1}}}%
+  \endgroup}%
+
+%%%%%
+%% highlighting
+
+%%% emphasize piece
+
+\newcommand\board at do@store at pieceemph[2]{%#1filenum, #2ranknum
+  \@ifundefined{board at val@pieceemph}%
+    {\def\board at val@pieceemph{}}%
+    {}%
+  \toks@=\expandafter{\board at val@pieceemph}%
+  \ifUFCB at locfill@coloremph
+    \@temptokena=\expandafter{\board at val@fontcolorstack}%
+  \board at enamedef{%
+     board at val@f#1r#2 at emph}{%
+      \the\toks@\the\@temptokena}%
+  \else
+   \board at enamedef{%
+     board at val@f#1r#2 at emph}{%
+     \the\toks@}%
+   \fi}%
+
+\newcommand\board at do@empharea[1]{%
+ \expandafter\board at split@areasort#1ARGEND%
+ %% initialisation
+ \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+ \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
+ %
+ \whiledo
+  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
+  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+   \whiledo
+    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
+    {\board at do@store at pieceemph{\number\value{cnt at board@file}}{\number\value{cnt at board@rank}}%
+     \addtocounter{cnt at board@file}{1}}%
+   \addtocounter{cnt at board@rank}{-1}}}%
+
+%%% border of board
+
+\newcommand\board at print@border{%
+  \raisebox{0pt}[0pt][0pt]{%
+   \makebox[0pt][r]{%bottom
+    \board at val@borderbottomcolor
+    \rule[-\board at val@borderbottomwidth]%
+      {\dimexpr
+        \ifUFCB at locset@borderleft
+         \board at val@borderleftwidth +
+        \fi
+        \numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth
+        \ifUFCB at locset@borderright
+         +\board at val@borderrightwidth
+        \fi
+      \relax}%
+      {\ifUFCB at locset@borderbottom\board at val@borderbottomwidth\else0pt\fi}%
+    \ifUFCB at locset@borderright
+     \hspace*{-\board at val@borderrightwidth}%
+    \fi}%
+   \makebox[0pt][r]{%left
+    \board at val@borderleftcolor
+    \rule[\ifUFCB at locset@borderbottom-\board at val@borderbottomwidth\else0pt\fi]%
+      {\ifUFCB at locset@borderleft
+        \board at val@borderleftwidth
+       \else
+        0pt%
+       \fi}
+      {\dimexpr
+        \ifUFCB at locset@borderbottom\board at val@borderbottomwidth +\fi
+        \numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight
+        \ifUFCB at locset@bordertop
+         +\board at val@bordertopwidth
+        \fi
+       \relax}%
+     \hspace*{\numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth}%
+     }%
+     %%
+   \makebox[0pt][r]{%top
+    \board at val@bordertopcolor
+    \rule[\numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight]%
+      {\dimexpr
+        \ifUFCB at locset@borderleft
+         \board at val@borderleftwidth +
+        \fi
+        \numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth
+        \ifUFCB at locset@borderright
+         +\board at val@borderrightwidth
+        \fi
+      \relax}%
+      {\ifUFCB at locset@bordertop\board at val@bordertopwidth\else0pt\fi}%
+     \ifUFCB at locset@borderright
+      \hspace*{-\board at val@borderrightwidth}%
+     \fi}%
+     %%
+   \makebox[0pt][l]{%right
+     \board at val@borderrightcolor
+     \rule[\ifUFCB at locset@borderbottom-\board at val@borderbottomwidth\else0pt\fi]%
+      {\ifUFCB at locset@borderright
+        \board at val@borderrightwidth
+       \else
+        0pt%
+       \fi}%
+      {\dimexpr
+        \ifUFCB at locset@borderbottom\board at val@borderbottomwidth +\fi
+        \numexpr\board at val@startprintranknum-\board at val@stopprintranknum+1\relax\len at cfss@squaretotalheight
+        \ifUFCB at locset@bordertop
+         +\board at val@bordertopwidth
+        \fi
+       \relax}%
+     }}}
+
+\newcommand\board at do@setpsnode{%
+  \ifpdf\else
+   \ifUFCB at locset@psset
+    \ifUFCB at locset@inverse
+     \pnode(%
+      \dimexpr -1.5\len at cfss@squarewidth +
+       \board at val@startprintfilenum\len at cfss@squarewidth\relax,
+      \dimexpr
+       \board at val@startprintranknum\len at cfss@squaretotalheight
+        -7.5\len at cfss@squaretotalheight\relax){BM}
+    \else
+     \pnode(%
+      \dimexpr 7.5\len at cfss@squarewidth
+       -\board at val@stopprintfilenum\len at cfss@squarewidth\relax,
+      \dimexpr
+       -\board at val@stopprintranknum\len at cfss@squaretotalheight
+       +1.5\len at cfss@squaretotalheight\relax){BM}
+    \fi
+   \fi
+  \fi}
+
+%%%%%%%
+%% the main commands
+%%%%%%
+
+%%% The command that holds saved keys
+
+\def\board at val@savedkeylist{@null=@null}%
+
+\newcommand\storechessboardstyle[2]{%#1 name, #2 key-list
+    \@namedef{board at val@style#1keylist}{#2}}%
+
+\newcommand\setchessboard[1]{%changed 2007-07-03
+     \def\board at temp@keylist{}%
+     \setkeys[UFCB]{@start}{board at expand={#1}}%
+     \toks@=\expandafter{\board at temp@keylist}%
+     \edef\board at temp@command{%
+        \noexpand\setkeys*[UFCB]{gloinit}{\the\toks@}}%
+     \board at temp@command
+     \setrmkeys*[UFCB]{gloset}%
+     \setrmkeys[UFCB]{glofill}}%
+
+\newcommand\chessboard[1][]{%
+ \begingroup
+  \normallineskip=1pt\relax\normallineskiplimit=0pt\relax%14.3.2011
+  \savekeys[UFCB]{locset}{\global{psset},\global{psskak},\global{inverse}}%
+%%% Initialisation
+%% combine the the global keys and the keys in argument
+ \let\board at temp@keylist\board at val@savedkeylist
+ \setkeys[UFCB]{@start}{board at expand={#1}}%
+ \toks@=\expandafter{\board at temp@keylist}%
+ \edef\board at temp@command{%
+  \noexpand\setkeys*[UFCB]{locinit}{\the\toks@}}%
+ \board at temp@command
+ %\show\XKV at rm
+ \expandafter\board at do@showtypelist\expandafter{\csname board@\board at val@game @piececharlist\endcsname,empty}%
+%% fills the board with the current position
+%% getting the fen of the current position with the fencalculate command of the current game:
+  \csname board@\board at val@game @do at fencalculate\endcsname
+%% saving the current language
+  \let\board at val@savelang\board at val@curlang
+%% setting the fen of the current position and saving it
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   language=english,
+   setfen=\board at val@fencalculate,
+   storefen=current,
+   language=\board at val@savelang}%
+   %\show\XKV at rm  %test
+%% setting the set keys
+  \setrmkeys*[UFCB]{locset}%
+  \edef\printarea{%
+   \board at val@startprintfilechar\board at val@startprintranknum-%
+   \board at val@stopprintfilechar\board at val@stopprintranknum}%
+  \edef\board{%
+   \board at val@maxfilechar\board at val@maxranknum-%
+   \board at val@minfilechar\board at val@minranknum}%
+  \ifUFCB at locset@inverse
+   \gdef\board at print@sign{-}%
+  \else
+   \gdef\board at print@sign{}%
+  \fi
+%% to get the size of the fields
+  \ifUFCB at locset@psset
+   \expandafter\board at do@globalgetsquaresize\expandafter{\board at val@game}%
+  \else
+   \expandafter\board at do@getsquaresize\expandafter{\board at val@game}%
+  \fi
+%% switch to board font an set ex and em
+  \cfss at boardfont
+  \fontdimen5\font=0.5\len at cfss@squarewidth
+  \fontdimen6\font=\len at cfss@squarewidth
+%% initialisation of the pgf-pictures with the anchor and shifts
+  \board at pgf@init
+  \board at do@getfieldcolorlists
+%% setting the fill keys
+   % \show\XKV at rm %test
+  \setrmkeys[UFCB]{locfill}%
+%%% starting to print
+  \ifUFCB at locinit@print
+%% setting the default font colors
+  \board at val@boardfontcolors
+%% the left margin
+   \ifUFCB at locset@marginleft
+    \makebox[\board at val@marginleftwidth]{}%
+   \fi
+%% the background picture
+   \ifUFCB at locset@pgf
+    \makebox[0pt]{%
+     \begin{pgfpicture}%
+      \board at pgf@background
+      \begin{pgfscope}%
+       \board at pgf@extrabackground
+      \end{pgfscope}%
+     \end{pgfpicture}}%
+   \fi
+%% the board
+   \ifUFCB at locset@inverse
+    \setcounter{cnt at board@rank}{\board at val@stopprintranknum}% inv.
+    \parbox[b]{\numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth}%
+     {\parindent0pt\relax\baselineskip=\len at cfss@squaretotalheight\relax%
+      \nointerlineskip
+%% top margin
+      \ifUFCB at locset@margintop
+       \rule{0pt}{\dimexpr\len at cfss@squaretotalheight+\board at val@margintopwidth\relax}%
+      \fi
+      \ifUFCB at locset@labeltop
+       \board at do@printlabeltop{\board at val@stopprintfilenum}{\board at val@startprintfilenum}%
+      \fi
+%% the pieces and side labels
+      \whiledo
+       {\value{cnt at board@rank}<\numexpr\board at val@startprintranknum+1\relax}% inv
+       {\board at do@printrank%
+         {\number\value{cnt at board@rank}}%
+         {\board at val@stopprintfilenum}%
+         {\board at val@startprintfilenum}%
+        \hspace{0pt}%
+        \addtocounter{cnt at board@rank}{1}}%inv
+%% bottom label
+      \ifUFCB at locset@labelbottom
+       \board at do@printlabelbottom{\board at val@stopprintfilenum}{\board at val@startprintfilenum}%
+      \fi}% end parbox
+   \else %not inverse
+    \setcounter{cnt at board@rank}{\board at val@startprintranknum}%
+    \parbox[b]{\numexpr\board at val@stopprintfilenum-\board at val@startprintfilenum+1\relax\len at cfss@squarewidth}%
+     {\parindent0pt\relax\baselineskip=\len at cfss@squaretotalheight\relax%
+      \nointerlineskip
+%% top margin
+      \ifUFCB at locset@margintop
+       \rule{0pt}{\dimexpr\len at cfss@squaretotalheight+\board at val@margintopwidth\relax}%
+      \fi
+      \ifUFCB at locset@labeltop
+       \board at do@printlabeltop{\board at val@startprintfilenum}{\board at val@stopprintfilenum}%
+      \fi
+%% the pieces and side labels
+      \whiledo
+       {\value{cnt at board@rank}>\numexpr\board at val@stopprintranknum-1\relax}%
+       {\board at do@printrank%
+         {\number\value{cnt at board@rank}}%
+         {\board at val@startprintfilenum}%
+         {\board at val@stopprintfilenum}%
+        \hspace{0pt}%
+        \addtocounter{cnt at board@rank}{-1}}%
+%% bottom label
+      \ifUFCB at locset@labelbottom
+       \board at do@printlabelbottom{\board at val@startprintfilenum}{\board at val@stopprintfilenum}%
+      \fi}% end second parbox
+   \fi %end if inverse
+%%the markground picture
+   \ifUFCB at locset@pgf
+    \makebox[0pt]{%
+     \begin{pgfpicture}%
+      \board at pgf@markground
+      \begin{pgfscope}%
+       \csname board at pgf@extramarkground\endcsname
+      \end{pgfscope}%
+     \end{pgfpicture}}%
+   \fi % end pgf
+     \board at do@setpsnode
+ %%
+ % Border
+ %%%
+   \board at print@border
+ %% Mover
+   \ifUFCB at locset@showmover
+    \ifcsname board at val@moverstyle@\board at val@moverstyle\endcsname
+     \csname board at val@moverstyle@\board at val@moverstyle\endcsname
+    \else
+     \PackageWarning{chessboard}%
+      {Moverstyle '\board at val@moverstyle'  is not defined, I will use
+       type square instead}%
+     \board at val@moverstyle at square
+    \fi
+    \board at do@printbottommover%
+    \board at do@printtopmover
+   \fi
+ %%
+   \ifUFCB at locset@marginbottom
+    \rule[-\board at val@marginbottomwidth]{0pt}{\board at val@marginbottomwidth}% bottom margin
+   \fi
+   \ifUFCB at locset@marginright
+    \makebox[\board at val@marginrightwidth]{}%right margin
+   \fi
+  \fi %end if print
+ \endgroup%% Attention! Keys after the group must be global!
+ \ifpdf
+ \else
+  \ifthenelse%
+   {\boolean{\XKV at UFCB@locset at psset@value}}%
+   {\psset{xunit=\len at cfss@squarewidth,yunit=\len at cfss@squaretotalheight}}%
+   {}%
+  \ifthenelse%
+   {\boolean{\XKV at UFCB@locset at psskak@value}}%
+   {\let\set at special@psmarkers\board at skak@set at special@psmarkers%
+    \@ifundefined{theps at inverse}{}{%
+     \ifthenelse%
+      {\boolean{\XKV at UFCB@locset at inverse@value}}%
+      {\setcounter{ps at inverse}{180}}%
+      {\setcounter{ps at inverse}{0}}}}%
+   {}%
+ \fi %end ifpdf
+ }% end chessboard
+
+%%% Changing the  input language
+
+\newcommand\cbDefineLanguage[1]{%
+  \ifcsname board at val@lang#1\endcsname
+   \PackageWarning{chessboard}%
+     {Language #1 already defined}%
+  \else
+   \global\@namedef{board at val@lang#1}{}%
+   \global\@namedef{board at val@lang#1 at empty}{empty}%
+  \fi}%
+
+\newcommand\cbDefineTranslation[3]{%#1 language, #2 english, #3 translation
+    \global\@namedef{board at val@lang#1@#3}{#2}}%
+
+\cbDefineLanguage{german}%
+\cbDefineTranslation{german}{K}{K}%
+\cbDefineTranslation{german}{Q}{D}%
+\cbDefineTranslation{german}{R}{T}%
+\cbDefineTranslation{german}{B}{L}%
+\cbDefineTranslation{german}{N}{S}%
+\cbDefineTranslation{german}{P}{B}%
+\cbDefineTranslation{german}{k}{k}%
+\cbDefineTranslation{german}{q}{d}%
+\cbDefineTranslation{german}{r}{t}%
+\cbDefineTranslation{german}{b}{l}%
+\cbDefineTranslation{german}{n}{s}%
+\cbDefineTranslation{german}{p}{b}%
+
+\cbDefineLanguage{english}%
+\cbDefineTranslation{english}{K}{K}%
+\cbDefineTranslation{english}{Q}{Q}%
+\cbDefineTranslation{english}{R}{R}%
+\cbDefineTranslation{english}{B}{B}%
+\cbDefineTranslation{english}{N}{N}%
+\cbDefineTranslation{english}{P}{P}%
+\cbDefineTranslation{english}{k}{k}%
+\cbDefineTranslation{english}{q}{q}%
+\cbDefineTranslation{english}{r}{r}%
+\cbDefineTranslation{english}{b}{b}%
+\cbDefineTranslation{english}{n}{n}%
+\cbDefineTranslation{english}{p}{p}%
+
+%%% command to add pieces to the list
+
+\newcommand\board at add@chartocolorpiececharlist[3]{% #1 game, #2 color, #3 char
+ \ifcsname board@#1@#2piececharlist\endcsname
+  \ifthenelse%
+   {\equal{\csname board@#1@#2piececharlist\endcsname}{}}
+   {\@namedef{board@#1@#2piececharlist}{#3}}
+   {\expandafter\g at addto@macro\csname board@#1@#2piececharlist\endcsname{,#3}}%
+ \else
+   \@namedef{board@#1 at piececharlist}{#3}%
+ \fi}%
+
+\newcommand\board at add@chartopiececharlist[2]{% #1 game, #2 char
+ \ifcsname board@#1 at piececharlist\endcsname
+  \ifthenelse%
+   {\equal{\csname board@#1 at piececharlist\endcsname}{}}%
+   {\@namedef{board@#1 at piececharlist}{#2}}%
+   {\expandafter\g at addto@macro\csname board@#1 at piececharlist\endcsname{,#2}}%
+ \else
+   \@namedef{board@#1 at piececharlist}{#2}%
+ \fi}%
+
+%%% Adding new pieces
+\newcommand\cbDefineNewPiece[5][skak]{%#1=optional=game, #2=color, #3=char, #4=on white, #5=on black
+ \ifcsname board@#1 at piece@#3 at white\endcsname
+  \PackageError{chessboard}{Piece #3 already defined!}{}%
+ \else
+  \board at add@chartocolorpiececharlist{#1}{#2}{#3}%
+  \board at add@chartopiececharlist{#1}{#3}%
+  \expandafter\gdef\csname board@#1 at piece@#3 at white\endcsname{#4}%
+  \expandafter\gdef\csname board@#1 at piece@#3 at black\endcsname{#5}%
+  \cbDefineTranslation{english}{#3}{#3}%
+ \fi}%
+
+%%% Adding new pieces
+\newcommand\cbReDefineNewPiece[5][skak]{%#1=optional=game, #2=color, #3=char, #4=on white, #5=on black
+ \ifcsname board@#1 at piece@#3 at white\endcsname
+ \else
+   \PackageWarning{chessboard}{Piece #3 not yet defined! I will define it now}{}%
+ \fi
+ \board at add@chartocolorpiececharlist{#1}{#2}{#3}%
+ \board at add@chartopiececharlist{#1}{#3}%
+ \expandafter\gdef\csname board@#1 at piece@#3 at white\endcsname{#4}%
+ \expandafter\gdef\csname board@#1 at piece@#3 at black\endcsname{#5}%
+ \cbDefineTranslation{english}{#3}{#3}}%
+
+%%% Initialization the piece commands.
+%% game: skak
+
+\newcommand\board at skak@piece at empty@white{\cfss at WhiteEmptySquare}%
+\newcommand\board at skak@piece at empty@black{\cfss at BlackEmptySquare}%
+\newcommand\board at skak@piece at K@white{\cfss at WhiteKingOnWhite}%
+\newcommand\board at skak@piece at K@black{\cfss at WhiteKingOnBlack}%
+\newcommand\board at skak@piece at k@white{\cfss at BlackKingOnWhite}%
+\newcommand\board at skak@piece at k@black{\cfss at BlackKingOnBlack}%
+\newcommand\board at skak@piece at Q@white{\cfss at WhiteQueenOnWhite}%
+\newcommand\board at skak@piece at Q@black{\cfss at WhiteQueenOnBlack}%
+\newcommand\board at skak@piece at q@white{\cfss at BlackQueenOnWhite}%
+\newcommand\board at skak@piece at q@black{\cfss at BlackQueenOnBlack}%
+\newcommand\board at skak@piece at R@white{\cfss at WhiteRookOnWhite}%
+\newcommand\board at skak@piece at R@black{\cfss at WhiteRookOnBlack}%
+\newcommand\board at skak@piece at r@white{\cfss at BlackRookOnWhite}%
+\newcommand\board at skak@piece at r@black{\cfss at BlackRookOnBlack}%
+\newcommand\board at skak@piece at B@white{\cfss at WhiteBishopOnWhite}%
+\newcommand\board at skak@piece at B@black{\cfss at WhiteBishopOnBlack}%
+\newcommand\board at skak@piece at b@white{\cfss at BlackBishopOnWhite}%
+\newcommand\board at skak@piece at b@black{\cfss at BlackBishopOnBlack}%
+\newcommand\board at skak@piece at N@white{\cfss at WhiteKnightOnWhite}%
+\newcommand\board at skak@piece at N@black{\cfss at WhiteKnightOnBlack}%
+\newcommand\board at skak@piece at n@white{\cfss at BlackKnightOnWhite}%
+\newcommand\board at skak@piece at n@black{\cfss at BlackKnightOnBlack}%
+\newcommand\board at skak@piece at P@white{\cfss at WhitePawnOnWhite}%
+\newcommand\board at skak@piece at P@black{\cfss at WhitePawnOnBlack}%
+\newcommand\board at skak@piece at p@white{\cfss at BlackPawnOnWhite}%
+\newcommand\board at skak@piece at p@black{\cfss at BlackPawnOnBlack}%
+
+\newcommand\board at skak@refpiece{%
+ \begingroup
+  \fontsize{\cfss at boardfontsize}{\cfss at boardfontsize}%
+  \BlackEmptySquare
+ \endgroup}%
+
+\newcommand\board at skak@piececharlist{K,Q,R,B,N,P,k,q,r,b,n,p}%
+\newcommand\board at skak@whitepiececharlist{K,Q,R,B,N,P}%
+\newcommand\board at skak@blackpiececharlist{k,q,r,b,n,p}%
+\AtBeginDocument{%
+ \@ifpackageloaded{skak}%
+   {%patch skak, see issue #1
+    \patchcmd\Fen at handleA{\arabic}{\number\value}{}{}%
+    \patchcmd\Fen at handleA{\arabic}{\number\value}{}{}%
+    \patchcmd\Fen at handleA{\thehelpgobble}{\c at helpgobble}{}{}%
+    \patchcmd\Fen at handleA{\thehelpgobble}{\c at helpgobble}{}{}%
+    \patchcmd\Fen at calculate{\arabic}{\number\value}{}{}%
+    \patchcmd\Fen at calculate{\arabic}{\number\value}{}{}%
+    \def\board at skak@do at fencalculate{%
+     \Fen at calculate
+     \let\board at val@fencalculate\temp at board}%
+    \def\board at skak@set at special@psmarkers#1#2{%
+     \get at translation#1%
+     \setcounter{fileFrom}{\value{fileTo}}%
+     \setcounter{rankFrom}{\value{rankTo}}%
+     \get at translation#2%
+     \rput(BM){\pnode(-\number\value{fileFrom},\number\value{rankFrom}){From}}%
+     \rput(BM){\pnode(-\number\value{fileTo},\number\value{rankTo}){To}}}}%
+   {\def\board at skak@do at fencalculate{%
+     \def\board at val@fencalculate{8/8/8/8/8/8/8/8}}}}%
+
+%%% Initialization keys
+
+\setkeys*[UFCB]{gloinit}{print,
+                        game=skak,
+                        maxfield=h8,
+                        zero=false,
+                        moverdefault=W,
+                        castlingdefault=KQkq,
+                        enpassantdefault=-,
+                        halfmovedefault=0,
+                        fullmovedefault=1}%
+
+\setkeys*[UFCB]{gloset}{normalboard,
+                       inverse=false,
+                       startprint=\board at val@minfilechar\board at val@maxranknum,
+                       stopprint=\board at val@maxfilechar\board at val@minranknum,
+                       padding=0pt,
+                       psset=false,
+                       psskak=false,
+                       pgf,
+                       %labels
+                       labelleft,labelbottom,
+                       labelfont={}, %defaults from chessfss used
+                       hlabelformat=\arabic{ranklabel},
+                       vlabelformat=\alph{filelabel},
+                       hlabellift=0.35em,
+                       hlabelwidth=1ex,
+                       labelbottomlift=1.1\baselineskip,
+                       labeltoplift=0.2\baselineskip,
+                       %margin
+                       margin,
+                       marginwidth=1em,
+                       border,
+                       borderwidth=0.04em,
+                       bordercolor=black,
+                       %mover
+                       showmover,
+                       moversize=1em,%0.5\len at cfss@squaretotalheight,
+                       moverstyle=square,
+                       moverlift=0pt,
+                       movershift=1ex,
+                       }%
+
+\def\board at pgf@linewidth{0.1em}
+\def\board at pgf@arrow{latex}
+\def\board at pgf@colorbackpadding{0pt}
+\def\board at val@boardfontcolors{}
+\def\board at val@fontcolorstack{}
+\def\board at pgf@corner{0pt}
+\def\board at pgf@shortenstart{0pt}
+\def\board at pgf@shortenend{0pt}
+\def\board at pgf@padding{0pt}
+\setkeys[UFCB]{bez}{x1=1/3,x2=2/3,y1=1,y2=1,clockwise}
+\def\currentfontcolors{\board at val@fontcolorstack}
+\setkeys*[UFCB]{glofill}{language=english,trimtocolor=false,trimarea=\board,trim,usepgf=all,pgfstyle=none}%
+\board at do@setsinglekeys*[UFCB]{locfill}{language=english}%
+
+%</chessboard>
+%<*chessboard-pgf>
+\ProvidesFile{chessboard-pgf.sty}[2019/06/23 version v1.8 pgf code for chessboard.sty]
+%%$Date: 2011/01/11 14:07:20 $$Version: 3d9f59c743f1 $
+
+\newcommand\board at pgf@extrabackground{}%
+\newcommand\board at pgf@extramarkground{}%
+
+\newcommand\board at pgf@addbackground[1]{%#1 commands,
+   \expandafter\board at do@l at addto@macro\csname board at pgf@extrabackground\endcsname{#1}}%
+
+\newcommand\board at pgf@addmarkground[1]{%#1 commands
+   \expandafter\board at do@l at addto@macro\csname board at pgf@extramarkground\endcsname{#1}}%
+
+%% saving the markstyles with option
+
+\newcommand\board at do@savemarkstyle{%
+    \@ifnextchar[\board at do@savemarkstylewithopt\board at do@savemarkstylenoopt}%
+
+\def\board at do@savemarkstylewithopt[#1]#2ARGEND{%
+  \def\board at pgf@curstyleopt{#1}%
+  \def\board at pgf@curmarkstyle{#2}%added 2007.08.15
+  \board at pgf@addmarkground{%
+    \def\board at pgf@curmarkstyle{#2}%
+    \def\board at pgf@curstyleopt{#1}}}%
+
+\def\board at do@savemarkstylenoopt#1ARGEND{%
+  \def\board at pgf@curstyleopt{}%added 2007.08.15
+  \def\board at pgf@curmarkstyle{#1}%
+  \board at pgf@addmarkground{%
+   \def\board at pgf@curstyleopt{}%
+   \def\board at pgf@curmarkstyle{#1}}}%
+
+%% saving the backstyle with option
+\newcommand\board at do@savebackstyle{%
+    \@ifnextchar[\board at do@savebackstylewithopt\board at do@savebackstylenoopt}%
+
+\def\board at do@savebackstylewithopt[#1]#2ARGEND{%
+  \def\board at pgf@curstyleopt{#1}%
+  \board at pgf@addbackground{%
+    \def\board at pgf@curbackstyle{#2}%
+    \def\board at pgf@curstyleopt{#1}}}%
+
+\def\board at do@savebackstylenoopt#1ARGEND{%
+  \def\board at pgf@curbackstyle{#1}%
+  \board at pgf@addbackground{%
+   \def\board at pgf@curstyleopt{}%
+   \def\board at pgf@curbackstyle{#1}}}%
+
+%% init/start pgf commands
+
+\newcommand\board at pgf@clippath{}%
+
+\newcommand\board at pgf@setunits{%
+   \pgfsetxvec{\pgfpoint{\len at cfss@squarewidth}{0cm}}%
+   \pgfsetyvec{\pgfpoint{0cm}{\len at cfss@squaretotalheight}}%
+   \pgfpathrectangle{\pgfpointorigin}{\pgfpointorigin}%
+   \pgfusepath{use as bounding box}}%
+
+\newcommand\board at pgf@addnode[2]{%#1= node name =field name, #2=mark or back
+ \expandafter\board at do@l at addto@macro\csname board at pgf@#2ground\endcsname{%
+   \pgfnode{coordinate}{center}{}{#1}{}{}%
+   \pgfusepath{fill}}}%
+
+\newcommand\board at pgf@gotonode[2]{% #1= node name =field name #2=mark or back
+ \expandafter\board at do@l at addto@macro\csname board at pgf@#2ground\endcsname{%
+  \pgftransformshift{\pgfpointanchor{#1}{center}}}}%
+
+\newcommand\board at pgf@setanchors[1]{% #1= mark or back
+ \setcounter{cnt at board@rank}{0}%
+ \setcounter{cnt at board@file}{0}%
+ \whiledo %nodes for files
+  {\value{cnt at board@file}<\numexpr\board at val@maxfilenum+1\relax}%
+  {\setcounter{cnt at board@rank}{0}%
+   \whiledo %nodes for on one field for each rank
+    {\value{cnt at board@rank}<\numexpr\board at val@maxranknum+1\relax}%
+    {\edef\board at temp{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
+     \expandafter\board at pgf@addnode\expandafter{\board at temp}{#1}%
+     \expandafter\board at do@l at addto@macro\csname board at pgf@#1ground\endcsname{%
+       \pgftransformshift{\pgfpointxy{0}{1}}}%
+     \addtocounter{cnt at board@rank}{1}}%
+   \edef\board at temp{\zeroalph{cnt at board@file}0}%
+   \expandafter\board at pgf@gotonode\expandafter{\board at temp}{#1}%
+   \addtocounter{cnt at board@file}{1}%
+  \expandafter\board at do@l at addto@macro\csname board at pgf@#1ground\endcsname{% one to the right
+    \pgftransformshift{\pgfpointxy{1}{0}}}}%
+  \expandafter\board at do@l at addto@macro\csname board at pgf@#1ground\endcsname{%
+    \csname board at pgf@#1clippath\endcsname}}%
+
+\newcommand\board at pgf@init{%
+  \def\board at pgf@background{%
+   \board at pgf@setunits
+   \ifUFCB at locset@inverse
+    \pgftransformshift{\pgfpointxy{\board at val@stopprintfilenum}{\board at val@startprintranknum}}%
+    \pgftransformshift{\pgfpointxy{0.5}{0.5}}%
+    \pgftransformrotate{180}%
+   \else
+    \pgftransformshift{\pgfpointxy{-\board at val@startprintfilenum}{-\board at val@stopprintranknum}}%
+    \pgftransformshift{\pgfpointxy{0.5}{0.5}}%
+   \fi}%
+   \board at pgf@setanchors{back}%
+  %
+  \def\board at pgf@markground{%
+   \board at pgf@setunits
+   \ifUFCB at locset@inverse
+    \pgftransformshift{\pgfpointxy{\board at val@startprintfilenum}{\board at val@startprintranknum}}%
+    \pgftransformshift{\pgfpointxy{-0.5}{0.5}}%
+    \pgftransformrotate{180}%
+   \else
+    \pgftransformshift{\pgfpointxy{-\board at val@stopprintfilenum}{-\board at val@stopprintranknum}}%
+    \pgftransformshift{\pgfpointxy{-0.5}{0.5}}%
+   \fi}%
+   \board at pgf@setanchors{mark}}%
+
+%% getting angles/length of a point:
+
+\newcommand\board at pgf@extractangle[2]{%#1 command, #2 pgfpoint
+   \pgfextracty{\len at board@tempy}{#2}%
+   \pgfextractx{\len at board@tempx}{#2}%
+  \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
+  \fi
+   \ifdim\len at board@tempx=0pt\relax
+     \ifdim\len at board@tempy=0pt\relax
+      \def#1{0}%
+     \else
+      \ifdim\len at board@tempy>0pt\relax
+       \def#1{90}%
+      \else
+       \def#1{-90}%
+      \fi
+     \fi
+   \fi
+   \ifdim\len at board@tempy=0pt\relax
+    \ifdim\len at board@tempx=0pt\relax
+      \def#1{0}%
+    \else
+      \ifdim\len at board@tempx>0pt\relax
+       \def#1{0}%
+      \else
+       \def#1{180}%
+      \fi
+    \fi
+   \fi
+   \ifdim\len at board@tempx>0pt\relax
+    \ifdim\len at board@tempy>0pt\relax
+     \pgfmathatan{\len at board@tempy}%
+     \edef#1{\pgfmathresult}%
+    \fi
+    \ifdim\len at board@tempy<0pt\relax
+     \pgfmathatan{\len at board@tempy}%
+     \edef#1{\pgfmathresult}%
+    \fi
+  \fi
+  \ifdim\len at board@tempx<0pt\relax
+    \ifdim\len at board@tempy>0pt\relax
+     \pgfmathatan{-\len at board@tempy}%
+     \pgfmathadd{-\pgfmathresult}{180}%
+     \edef#1{\pgfmathresult}%
+    \fi
+    \ifdim\len at board@tempy<0pt\relax
+     \pgfmathatan{\len at board@tempy}%
+     \pgfmathadd{\pgfmathresult}{180}%
+     \edef#1{\pgfmathresult}%
+    \fi
+  \fi
+   }
+
+
+\newcommand\board at pgf@extractlength[2]{%#1 length, #2 pgfpoint
+   \pgfextracty{\len at board@tempy}{#2}%
+   \pgfextractx{\len at board@tempx}{#2}%
+   \pgfmathveclen{\len at board@tempx}{\len at board@tempy}%
+   #1=\pgfmathresult pt\relax}
+
+
+%% Field decoration:
+%%  The command called by the markarea-key
+
+\newcommand*\board at pgf@add at fieldmarkstyletoarea[1]{% #1 =area
+ \expandafter\board at split@areasort#1ARGEND%
+ %% initialisation
+ \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+ \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
+ %
+ \whiledo
+  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
+  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+   \whiledo
+    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
+    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
+     \expandafter\board at pgf@addpgftofield\expandafter{\board at temp@curfield}{mark}%
+     \addtocounter{cnt at board@file}{1}}%
+   \addtocounter{cnt at board@rank}{-1}}}%
+
+%% The command called by the backarea-key
+
+\newcommand*\board at pgf@add at fieldbackstyletoarea[1]{% #1 =area
+ \expandafter\board at split@areasort#1ARGEND%
+ %% initialisation
+ \setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+ \setcounter{cnt at board@rank}{\board at temp@curstartranknum}%
+ %
+ \whiledo
+  {\value{cnt at board@rank}>\numexpr \board at temp@curstopranknum-1\relax}%
+  {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
+   \whiledo
+    {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
+    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
+     \expandafter\board at pgf@addpgftofield\expandafter{\board at temp@curfield}{back}%
+     \addtocounter{cnt at board@file}{1}}%
+   \addtocounter{cnt at board@rank}{-1}}}%
+
+%% The command that puts the code in the picture.
+\newcommand\board at pgf@addpgftofield[2]{%  #1= node name =field name, #2=mark or back
+ \expandafter\board at split@field #1ARGEND%
+ \ifthenelse%
+  {\board at test@isfieldintrimarea{\board at temp@curfilenum}{\board at temp@curranknum}\AND
+   \board at test@isonactivecolor{\board at temp@curfilenum}{\board at temp@curranknum}}%
+  {\ifcsname board at pgf@fieldstyle\csname board at pgf@cur#2style\endcsname\endcsname
+    \csname board at pgf@add#2ground\endcsname{%
+    \def\currentarea{#1}%
+    \def\currentbq{#1}%
+    \def\currentbk{#1}%
+    \def\currentwq{#1}%
+    \def\currentwk{#1}%
+    \def\currentfrom{#1}%
+    \def\currentto{#1}%
+     \pgftransformshift{\pgfpointanchor{#1}{center}}%
+     \expandafter\let\expandafter\board at pgf@curpgfstyle
+       \csname board at pgf@fieldstyle\csname board at pgf@cur#2style\endcsname\endcsname
+     \edef\next{\noexpand\board at pgf@curpgfstyle
+          {#1}%
+          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
+     \next}%
+  \else
+   \PackageWarning{chessboard}%
+     {#2 style '\csname board at pgf@cur#2style\endcsname'  not defined for fields!
+      I will ignore the #2 commands}%
+  \fi}%
+  {}}%
+
+%% Region decoration
+
+
+\def\board at pgf@backclipleftpadding{0pt}
+\def\board at pgf@backcliptoppadding{0pt}
+\def\board at pgf@backcliprightpadding{0pt}
+\def\board at pgf@backclipbottompadding{0pt}
+\def\board at pgf@markclipleftpadding{0pt}
+\def\board at pgf@markcliptoppadding{0pt}
+\def\board at pgf@markcliprightpadding{0pt}
+\def\board at pgf@markclipbottompadding{0pt}
+\def\board at pgf@usebackclippath{discard}
+\def\board at pgf@usemarkclippath{discard}
+
+\def\board at pgf@markclippath{%
+   \pgfusepath{}%
+   \pgfpathrectanglecorners%
+    {\pgfpointadd%
+      {\pgfpointanchor{\board at val@stopprintfilechar\board at val@startprintranknum}{center}}%
+      {\pgfpointadd
+        {\pgfpointxy{0.5}{0.5}}%
+        {\pgfpoint{\board at pgf@markcliprightpadding}{\board at pgf@markcliptoppadding}}%
+      }}%
+    {\pgfpointadd%
+      {\pgfpointanchor{\board at val@startprintfilechar\board at val@stopprintranknum}{center}}%
+      {\pgfpointadd
+        {\pgfpointxy{-0.5}{-0.5}}
+        {\pgfpoint{-\board at pgf@markclipleftpadding}{-\board at pgf@markclipbottompadding}}%
+      }%
+    }%
+   \pgfusepath{\board at pgf@usemarkclippath}}
+
+\def\board at pgf@backclippath{%
+   \pgfusepath{}%
+   \pgfpathrectanglecorners%
+    {\pgfpointadd%
+      {\pgfpointanchor{\board at val@stopprintfilechar\board at val@startprintranknum}{center}}%
+      {\pgfpointadd
+        {\pgfpointxy{0.5}{0.5}}%
+        {\pgfpoint{\board at pgf@backcliprightpadding}{\board at pgf@backcliptoppadding}}%
+      }}%
+    {\pgfpointadd%
+      {\pgfpointanchor{\board at val@startprintfilechar\board at val@stopprintranknum}{center}}%
+      {\pgfpointadd
+        {\pgfpointxy{-0.5}{-0.5}}
+        {\pgfpoint{-\board at pgf@backclipleftpadding}{-\board at pgf@backclipbottompadding}}%
+      }%
+    }%
+   \pgfusepath{\board at pgf@usebackclippath}}
+
+%% the command called by the markregion key
+%% the command puts the code directly in the pgf as no loop needed
+
+\newcommand\board at pgf@add at regionmarkstyle[2]{% #1=startfield (e.g. a8), #2=stopfield (e.g.h1)
+ \expandafter\board at split@areasort#1-#2ARGEND%
+ \ifthenelse%
+  {\board at test@isareaintrimarea
+   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
+   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
+  {\ifcsname board at pgf@regionstyle\board at pgf@curmarkstyle\endcsname
+    \board at pgf@addmarkground{%
+    \def\currentarea{#1-#2}%
+    \expandafter\board at split@areasort#1-#2ARGEND%
+    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
+    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
+    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
+    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
+    \def\currentfrom{#1}%
+    \def\currentto{#2}%
+    \pgftransformshift{\pgfpointanchor{#1}{center}}%
+    \expandafter\let\expandafter\board at pgf@curpgfstyle
+       \csname board at pgf@regionstyle\csname board at pgf@curmarkstyle\endcsname\endcsname
+    \edef\next{\noexpand\board at pgf@curpgfstyle
+          {#2}%
+          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
+    \next
+    %\csname board at pgf@regionstyle\board at pgf@curmarkstyle\endcsname{#2}%
+    }%
+  \else
+   \PackageWarning{chessboard}%
+     {mark style '\board at pgf@curmarkstyle'  not defined for regions!
+      I will ignore the mark commands}%
+  \fi}{}}%
+
+%% the command called by the backregion key
+%% the command puts the code directly in the pgf as no loop needed
+
+\newcommand\board at pgf@add at regionbackstyle[2]{% #1=startfield (e.g. a8), #2=stopfield (e.g.h1)
+ \expandafter\board at split@areasort#1-#2ARGEND%
+ \ifthenelse%
+  {\board at test@isareaintrimarea
+   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
+   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
+  {\ifcsname board at pgf@regionstyle\board at pgf@curbackstyle\endcsname
+   \board at pgf@addbackground{%
+    \def\currentarea{#1-#2}%
+    \expandafter\board at split@areasort#1-#2ARGEND%
+    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
+    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
+    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
+    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
+    \def\currentfrom{#1}%
+    \def\currentto{#2}%
+    \pgftransformshift{\pgfpointanchor{#1}{center}}%
+    \expandafter\let\expandafter\board at pgf@curpgfstyle
+       \csname board at pgf@regionstyle\csname board at pgf@curbackstyle\endcsname\endcsname
+    \edef\next{\noexpand\board at pgf@curpgfstyle
+          {#2}%
+          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
+    \next}%
+  \else
+   \PackageWarning{chessboard}%
+     {back style '\board at pgf@curbackstyle'  not defined for regions!
+      I will ignore the back commands}%
+  \fi}{}}%
+
+%% Move decoration
+%% the command called by the markmove key
+%% the command put the code directly in the pgf as no loop needed
+
+\newcommand\board at pgf@add at movemarkstyle[2]{% #1=from field, #2=to field.
+ \expandafter\board at split@areasort#1-#2ARGEND%
+ \ifthenelse%
+  {\board at test@isareaintrimarea
+   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
+   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
+  {\ifcsname board at pgf@movestyle\board at pgf@curmarkstyle\endcsname
+   \board at pgf@addmarkground{%
+    \def\currentarea{#1-#2}%
+    \expandafter\board at split@areasort#1-#2ARGEND%
+    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
+    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
+    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
+    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
+    \def\currentfrom{#1}%
+    \def\currentto{#2}%
+    \pgftransformshift{\pgfpointanchor{#1}{center}}%
+    \expandafter\let\expandafter\board at pgf@curpgfstyle
+       \csname board at pgf@movestyle\csname board at pgf@curmarkstyle\endcsname\endcsname
+    \edef\next{\noexpand\board at pgf@curpgfstyle
+          {#2}%
+          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
+    \next
+    }%
+  \else
+   \PackageWarning{chessboard}%
+     {mark style '\board at pgf@curmarkstyle'  not defined for moves!
+      I will ignore the mark commands}%
+  \fi}{}}%
+
+%% the command called by the backmove key
+%% the command put the code directly in the pgf as no loop needed
+
+\newcommand\board at pgf@add at movebackstyle[2]{% #1=from field, #2=to field.
+ \expandafter\board at split@areasort#1-#2ARGEND%
+ \ifthenelse%
+  {\board at test@isareaintrimarea
+   {\board at temp@curstartfilenum}{\board at temp@curstartranknum}%
+   {\board at temp@curstopfilenum}{\board at temp@curstopranknum}}%
+  {\ifcsname board at pgf@movestyle\board at pgf@curbackstyle\endcsname
+   \board at pgf@addbackground{%
+   \def\currentarea{#1-#2}%
+    \def\currentarea{#1-#2}%
+    \expandafter\board at split@areasort#1-#2ARGEND%
+    \edef\currentbq{\board at temp@curstartfilechar\board at temp@curstartranknum}%
+    \edef\currentbk{\board at temp@curstopfilechar\board at temp@curstartranknum}%
+    \edef\currentwq{\board at temp@curstartfilechar\board at temp@curstopranknum}%
+    \edef\currentwk{\board at temp@curstopfilechar\board at temp@curstopranknum}%
+    \def\currentfrom{#1}%
+    \def\currentto{#2}%
+    \pgftransformshift{\pgfpointanchor{#1}{center}}%
+    \expandafter\let\expandafter\board at pgf@curpgfstyle
+       \csname board at pgf@movestyle\csname board at pgf@curbackstyle\endcsname\endcsname
+    \edef\next{\noexpand\board at pgf@curpgfstyle
+          {#2}%
+          {\unexpanded\expandafter{\board at pgf@curstyleopt}}}%
+    \next
+    }%
+  \else
+   \PackageWarning{chessboard}%
+     {back style '\board at pgf@curbackstyle'  not defined for moves!
+      I will ignore the back commands}%
+  \fi}{}}%
+
+%%% User command to define pgf styles
+\newcommand\cbDefinePgfFieldStyle[2]{%#1=name, #2=pgf-commands
+  \expandafter\def\csname board at pgf@fieldstyle#1\endcsname##1##2{% ##1=field
+    \begin{pgfscope}%                                            % ##2=options
+     #2
+    \end{pgfscope}}}%
+
+\newcommand\cbDefinePgfRegionStyle[2]{%#1=name, #2=pgf-commands
+  \expandafter\def\csname board at pgf@regionstyle#1\endcsname##1##2{% ##1=oposite corner
+    \begin{pgfscope}%                                             % ##2=options
+     #2
+    \end{pgfscope}}}%
+
+\newcommand\cbDefinePgfMoveStyle[2]{%#1=name, #2=pgf-commands
+  \expandafter\def\csname board at pgf@movestyle#1\endcsname##1##2{% ##1 =to corner
+    \begin{pgfscope}%                                           % ##2 = options
+     #2
+    \end{pgfscope}}}%
+
+\let\cbDefineMarkFieldStyle\cbDefinePgfFieldStyle
+\let\cbDefineMarkRegionStyle\cbDefinePgfRegionStyle
+\let\cbDefineMarkMoveStyle\cbDefinePgfMoveStyle
+
+%%% some predefined pgf styles
+
+%% style none,  don't know if useful
+
+\cbDefinePgfFieldStyle{none}{\pgfusepath{discard}}%
+\cbDefinePgfRegionStyle{none}{\pgfusepath{discard}}%
+\cbDefinePgfMoveStyle{none}{\pgfusepath{discard}}%
+
+%% moves
+\cbDefinePgfMoveStyle{straightmove}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \setlength\len at board@tempx{\dimexpr 0.1em + \board at pgf@shortenstart \relax}%
+    \pgfsetshortenstart{\len at board@tempx}%
+    \setlength\len at board@tempx{\board at pgf@shortenend}%
+    \pgfsetshortenend{\len at board@tempx}%
+    \pgfsetarrowsend{\board at pgf@arrow}%
+    \pgfsetroundcap
+    \pgfpathmoveto{\pgfpointorigin}%
+    \pgfpathlineto{\pgfpointanchor{#1}{center}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfMoveStyle{knightmove}{%
+   \pgfsetlinewidth{\board at pgf@linewidth}%
+   \pgfsetarrowsend{\board at pgf@arrow}%
+   \setlength\len at board@tempx{\dimexpr 0.3em + \board at pgf@shortenstart \relax}%
+   \pgfsetshortenstart{\len at board@tempx}%
+   \setlength\len at board@tempx{\board at pgf@shortenend}%
+   \pgfsetshortenend{\len at board@tempx}%
+   \pgfextractx{\len at board@tempx}{\pgfpointanchor{#1}{center}}%
+   \pgfextracty{\len at board@tempy}{\pgfpointanchor{#1}{center}}%
+   \pgfpathmoveto{\pgfpointorigin}%
+   \pgfpathcurveto%
+    {\pgfpoint{0pt}{0.8\len at board@tempy}}%
+    {\pgfpoint{0.2\len at board@tempx}{\len at board@tempy}}%
+    {\pgfpointanchor{#1}{center}}%
+   \pgfusepath{stroke}}%
+
+%new 1.5.
+\newcommand\board at pgf@curvemove[2][]{
+ \setkeys[UFCB]{bez}{#1}%
+ \pgfsetlinewidth{\board at pgf@linewidth}%
+ \pgfsetarrowsend{\board at pgf@arrow}%
+ \setlength\len at board@tempx{\dimexpr 0.3em + \board at pgf@shortenstart \relax}%
+ \pgfsetshortenstart{\len at board@tempx}%
+ \setlength\len at board@tempx{\board at pgf@shortenend}%
+ \pgfsetshortenend{\len at board@tempx}%
+ \board at pgf@extractangle{\board at temp@angle}{#2}%
+ \board at pgf@extractlength{\len at board@tempy}{#2}%
+ \pgftransformrotate{\board at temp@angle}%
+ \pgfpathmoveto{\pgfpointorigin}%
+ \pgfpathcurveto
+  {\pgfpointadd{\pgfpoint{\board at val@bezxi*\len at board@tempy}{0cm}}%
+               {\pgfpointxy{0}{\board at val@pgfsign*\board at val@bezyi}}}%
+  {\pgfpointadd{\pgfpoint{\board at val@bezxii*\len at board@tempy}{0cm}}%
+               {\pgfpointxy{0}{\board at val@pgfsign*\board at val@bezyii}}}%
+  {\pgfpoint{\len at board@tempy}{0cm}}%
+ \pgfusepath{stroke}%
+}
+
+\cbDefinePgfMoveStyle{curvemove}{%
+    \board at pgf@curvemove[#2]{\pgfpointanchor{#1}{center}}}%
+
+\def\board at pgf@curvemovestyle at knight{\setkeys[UFCB]{bez}{x1=1/2,x2=2/3,y1=0.5,y2=0.5}}
+%% region
+
+\cbDefinePgfRegionStyle{text}{%
+ \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+ \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+ \pgftransformshift
+  {\pgfpointintersectionoflines
+     {\pgfpointxy{-0.5}{0.5}}%
+     {\pgfpointadd
+      {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
+      {\pgfpointxy{0.5}{-0.5}}}%
+     {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{0pt}}%
+       {\pgfpointxy{0.5}{0.5}}}%
+     {\pgfpointadd
+       {\pgfpoint{0pt}{\len at board@tempy}}%
+       {\pgfpointxy{-0.5}{-0.5}}}}%
+ \ifthenelse%
+  {\boolean{\XKV at UFCB@locset at inverse@value}}%
+  {\pgftext[rotate=180,#2]{\normalfont\board at pgf@curtext}}%
+  {\pgftext[#2]{\normalfont\board at pgf@curtext}}}%
+
+\cbDefinePgfRegionStyle{border}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfpathrectanglecorners%
+      {\pgfpointadd%
+       {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}%
+       {\pgfpointxy{-0.5}{0.5}}}%
+      {\pgfpointadd%
+       {\pgfpointanchor{#1}{center}}%
+       {\pgfpointadd%
+        {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}%
+        {\pgfpointxy{0.5}{-0.5}}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{color}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfpathrectanglecorners%
+      {\pgfpointadd%
+       {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}%
+       {\pgfpointxy{-0.5}{0.5}}}%
+      {\pgfpointadd%
+       {\pgfpointanchor{#1}{center}}%
+       {\pgfpointadd%
+        {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}%
+        {\pgfpointxy{0.5}{-0.5}}}}%
+    \pgfusepath{fill}}%
+
+\cbDefinePgfRegionStyle{leftborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{\len at board@tempy}}}%
+    \pgfpathlineto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{topborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+      \pgfpointadd{\pgfpointxy{0.5}{0.5}}{\pgfpoint{\len at board@tempx}{\board at pgf@padding}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{rightborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{0.5}}%
+       {\pgfpointadd
+         {\pgfpoint{\len at board@tempx}{0pt}}%
+         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
+      {\pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{bottomborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+      {\pgfpointanchor{#1}{center}}%
+      {\pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+      \pgfpointadd
+       {\pgfpointxy{-0.5}{-0.5}}%
+       {\pgfpointadd
+         {\pgfpoint{0pt}{\len at board@tempy}}%
+         {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+    %\pgfpathlineto{{-\board at pgf@padding}{\len at board@tempy}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{lefttopborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{\len at board@tempy}}}%
+    \pgfpathlineto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{lefttoprightborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{\len at board@tempy}}}%
+    \pgfpathlineto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{toprightborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+       \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{toprightbottomborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
+       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\len at board@tempy}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+       \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{rightbottomborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{0.5}}%
+       {\pgfpointadd
+         {\pgfpoint{\len at board@tempx}{0pt}}%
+         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+   \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
+       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\len at board@tempy}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{rightbottomleftborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{0.5}}%
+       {\pgfpointadd
+         {\pgfpoint{\len at board@tempx}{0pt}}%
+         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+   \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{\len at board@tempx}{\len at board@tempy}}%
+       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\len at board@tempy}}%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{0.5}}%
+      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{bottomleftborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+      {\pgfpointanchor{#1}{center}}%
+      {\pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\len at board@tempy}}%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{0.5}}%
+      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfRegionStyle{bottomlefttopborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfextractx{\len at board@tempx}{{\pgfpointanchor{#1}{center}}}%
+    \pgfextracty{\len at board@tempy}{{\pgfpointanchor{#1}{center}}}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+      {\pgfpointanchor{#1}{center}}%
+      {\pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\len at board@tempy}}%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{0.5}}%
+      {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpoint{\len at board@tempx}{\board at pgf@padding}}}%
+    \pgfusepath{stroke}}%
+
+%% Fields
+\cbDefinePgfFieldStyle{cross}{%
+    \pgfsetroundcap
+    \setlength\len at board@tempx{\dimexpr 0.1em + \board at pgf@shortenstart \relax}%
+    \pgfsetshortenstart{\len at board@tempx}%
+    \setlength\len at board@tempx{\dimexpr 0.1em + \board at pgf@shortenend \relax}%
+    \pgfsetshortenend{\len at board@tempx}%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfpathmoveto{\pgfpointxy{0.5}{0.5}}%
+    \pgfpathlineto{\pgfpointxy{-0.5}{-0.5}}%
+    \pgfusepath{stroke}%
+    \pgfpathmoveto{\pgfpointxy{-0.5}{0.5}}%
+    \pgfpathlineto{\pgfpointxy{0.5}{-0.5}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{circle}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \setlength\len at board@tempx{\dimexpr 0.55em + \board at pgf@padding \relax}%
+    \pgfpathcircle{\pgfpointxy{0}{0}}{\len at board@tempx}%
+    \pgfusepath{stroke,#2}}%
+
+\cbDefinePgfFieldStyle{text}{%
+    \ifthenelse%
+     {\boolean{\XKV at UFCB@locset at inverse@value}}%
+     {\pgftext[rotate=180,#2]{\normalfont\board at pgf@curtext}}%
+     {\pgftext[#2]{\normalfont\board at pgf@curtext}}}%
+
+\cbDefinePgfFieldStyle{border}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfpathrectanglecorners
+      {\pgfpointadd%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}%
+       {\pgfpointxy{-0.5}{-0.5}}}%
+      {\pgfpointadd%
+       {\pgfpoint{\board at pgf@padding}{\board at pgf@padding}}%
+       {\pgfpointxy{0.5}{0.5}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{color}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfpathrectanglecorners
+     {\pgfpointadd%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}%
+       {\pgfpointxy{-0.5}{-0.5}}}%
+      {\pgfpointadd%
+       {\pgfpoint{\board at pgf@padding}{\board at pgf@padding}}%
+       {\pgfpointxy{0.5}{0.5}}}%
+    \pgfusepath{fill}}%
+
+\cbDefinePgfFieldStyle{leftborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfpathlineto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{topborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+      \pgfpointadd{\pgfpointxy{0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{rightborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{0.5}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{bottomborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
+    \pgfpathlineto{%
+      \pgfpointadd
+       {\pgfpointxy{-0.5}{-0.5}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{lefttopborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfpathlineto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{lefttoprightborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{-0.5}}{\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfpathlineto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\board at pgf@padding}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpoint{\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{toprightborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+     \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\board at pgf@padding}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+       \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{toprightbottomborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd{\pgfpointxy{-0.5}{0.5}}{\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{\board at pgf@padding}}%
+       {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+       \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{rightbottomborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{0.5}}%
+       {\pgfpointadd
+         {\pgfpoint{0pt}{0pt}}%
+         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+   \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{rightbottomleftborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{0.5}}%
+       {\pgfpointadd
+         {\pgfpoint{0pt}{0pt}}%
+         {\pgfpoint{\board at pgf@padding}{0pt}}}}%
+   \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{0.5}}%
+      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{bottomleftborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{0.5}}%
+      {\pgfpoint{-\board at pgf@padding}{0pt}}}%
+    \pgfusepath{stroke}}%
+
+\cbDefinePgfFieldStyle{bottomlefttopborder}{%
+    \pgfsetlinewidth{\board at pgf@linewidth}%
+    \pgfsetcornersarced{\pgfpoint{\board at pgf@corner}{\board at pgf@corner}}%
+    \pgfsetshortenstart{\board at pgf@shortenstart}%
+    \pgfsetshortenend{\board at pgf@shortenend}%
+    \pgfpathmoveto{%
+     \pgfpointadd
+       {\pgfpointxy{0.5}{-0.5}}%
+       {\pgfpoint{0pt}{-\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{-0.5}}%
+      {\pgfpointadd
+       {\pgfpoint{0pt}{0pt}}%
+       {\pgfpoint{-\board at pgf@padding}{-\board at pgf@padding}}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{-0.5}{0.5}}%
+      {\pgfpoint{-\board at pgf@padding}{\board at pgf@padding}}}%
+    \pgfpathlineto{%
+     \pgfpointadd
+      {\pgfpointxy{0.5}{0.5}}%
+      {\pgfpoint{0pt}{\board at pgf@padding}}}%
+    \pgfusepath{stroke}}%
+
+
+%</chessboard-pgf>
+%<*chessboard-keys-main>
+\ProvidesFile{chessboard-keys-main.sty}[2019/06/23 version v1.8 key definitions for chessboard.sty]
+%%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $
+
+%%file=Linie=column=vertikal=al_f_abetisch= a-h
+%%rank=Reihe=row=horizontal=numbe_r_=1-8
+
+%%%%%%%%%%%%%%%%%%%%%
+%%%% Keys
+%%%%%%%%%%%%%%%%%%%%%
+%%%%
+%%% Nullkey, does nothing
+%%%%
+\define at key[UFCB]{locinit}{@null}{}
+\define at key[UFCB]{locset}{@null}{}
+\define at key[UFCB]{locfill}{@null}{}
+\define at key[UFCB]{gloinit}{@null}{}
+\define at key[UFCB]{gloset}{@null}{}
+\define at key[UFCB]{glofill}{@null}{}
+%%%%
+
+%% internal Keys to expand styles, added in 1.4. to repair xkeyval problem
+
+\define at key[UFCB]{@start}{style}{%
+  \toks@=\expandafter\expandafter\expandafter{\csname board at val@style#1keylist\endcsname}%
+  \edef\@@next{\noexpand\board at do@l at addto@macro\noexpand\board at temp@keylist{,\the\toks@}}%
+  \@@next}
+
+\define at key[UFCB]{@start}{board at expand}{%
+ \@for\board at temp@keypair:=#1\do
+  {\expandafter\XKV at g@tkeyname\board at temp@keypair=\@nil\board at temp@keyname
+   \edef\next{\noexpand\key at ifundefined[UFCB]{@start}{\board at temp@keyname}}%
+   \next{\expandafter\board at do@l at addto@macro\expandafter\board at temp@keylist\expandafter{\expandafter,\board at temp@keypair}}%
+        {\edef\@next{\noexpand\setkeys[UFCB]{@start}{\board at temp@keypair}}\@next}}}%
+
+
+%%%%%
+%%% Init keys
+%%%%
+
+%%%
+%% style, can contain any key, so should be processed at start (init).
+%%%
+
+\define at key[UFCB]{locinit}{style}{% D
+  \csname board at use@locstyle@#1\endcsname}
+
+\define at key[UFCB]{gloinit}{style}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,style=#1}}
+
+%%%
+%% defaults, should only be set globally (don't make sense elsewhere)
+%%%
+
+\define at choicekey*[UFCB]{gloinit}{moverdefault}[\board at val@mover]{w,b}{}
+\define at key[UFCB]{gloinit}{castlingdefault}{\def\board at val@castling{#1}}
+\define at key[UFCB]{gloinit}{enpassantdefault}{\def\board at val@enpassant{#1}}
+\define at key[UFCB]{gloinit}{halfmovedefault}{\def\board at val@halfmove{#1}}
+\define at key[UFCB]{gloinit}{fullmovedefault}{\def\board at val@fullmove{#1}}
+
+%%% Dimension of the board
+%%% the right-top corner. Used from clearboard and to set pieces with position
+
+\define at key[UFCB]{locinit}{maxfield}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \edef\board at val@maxfilechar{\board at temp@curfilechar}%
+  \edef\board at val@maxfilenum{\board at temp@curfilenum}%
+  \edef\board at val@maxranknum{\board at temp@curranknum}%
+  %% start rank numbers
+  \edef\board at val@startfenranknum{\board at temp@curranknum}%
+  \edef\board at val@startfillranknum{\board at temp@curranknum}%
+  \edef\board at val@startprintranknum{\board at temp@curranknum}%
+  \edef\board at val@startstoreranknum{\board at temp@curranknum}%
+  %% stop file numbers
+  \edef\board at val@stopfillfilenum{\board at temp@curfilenum}%
+  \edef\board at val@stopprintfilenum{\board at temp@curfilenum}%
+  \edef\board at val@stopstorefilenum{\board at temp@curfilenum}%
+  %% stop file chars
+  \edef\board at val@stopfillfilechar{\board at temp@curfilechar}%
+  \edef\board at val@stopprintfilechar{\board at temp@curfilechar}%
+  \edef\board at val@stopstorefilechar{\board at temp@curfilechar}%
+  }
+
+\define at key[UFCB]{gloinit}{maxfield}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,maxfield=#1}{}}
+
+%%% the left-bottom corner can be set to start with @0.
+%%% Used from clearboard and to set pieces with fen
+%%% boolean key, true is the default, that is zero is the same as zero=true
+
+\define at boolkey[UFCB]{locinit}{zero}[true]{% D
+  \ifUFCB at locinit@zero
+   \def\board at temp@char{Z}%
+   \def\board at temp@num{0}%
+  \else
+   \def\board at temp@char{a}%
+   \def\board at temp@num{1}%
+  \fi
+  \edef\board at val@minfilechar{\board at temp@char}%
+  \edef\board at val@minfilenum{\board at temp@num}%
+  \edef\board at val@minranknum{\board at temp@num}%
+  %% start file numbers
+  \edef\board at val@startfenfilenum{\board at temp@num}%
+  \edef\board at val@startfillfilenum{\board at temp@num}%
+  \edef\board at val@startprintfilenum{\board at temp@num}%
+  \edef\board at val@startstorefilenum{\board at temp@num}%
+  %% start file chars
+  \edef\board at val@startfenfilechar{\board at temp@char}%
+  \edef\board at val@startfillfilechar{\board at temp@char}%
+  \edef\board at val@startprintfilechar{\board at temp@char}%
+  \edef\board at val@startstorefilechar{\board at temp@char}%
+  %% stop rank numbers
+  \edef\board at val@stopfillranknum{\board at temp@num}%
+  \edef\board at val@stopprintranknum{\board at temp@num}%
+  \edef\board at val@stopstoreranknum{\board at temp@num}%
+  }
+
+\define at key[UFCB]{gloinit}{zero}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,zero=#1}{}}
+
+%%% disable the printing
+\define at boolkey[UFCB]{locinit}{print}[true]{} %D
+
+\define at boolkey[UFCB]{gloinit}{print}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,print=#1}{}}
+
+%%%%%%
+%% Set-keys
+%%%%%%
+%%% "print corner"
+
+\define at key[UFCB]{locset}{startprint}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@startprintfilechar\board at temp@curfilechar
+  \let\board at val@startprintfilenum\board at temp@curfilenum
+  \let\board at val@startprintranknum\board at temp@curranknum}
+
+\define at key[UFCB]{gloset}{startprint}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,startprint=#1}{}}
+
+\define at key[UFCB]{locset}{stopprint}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@stopprintfilechar\board at temp@curfilechar
+  \let\board at val@stopprintfilenum\board at temp@curfilenum%
+  \let\board at val@stopprintranknum\board at temp@curranknum}
+
+\define at key[UFCB]{gloset}{stopprint}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,stopprint=#1}{}}
+
+\define at key[UFCB]{locset}{printarea}{% a7-f1 % D
+  \expandafter\board at split@areasort#1ARGEND%
+  \board at do@setsinglekeys*[UFCB]{locset}{%
+    startprint=\board at temp@curstartfield, stopprint=\board at temp@curstopfield}}%
+
+\define at key[UFCB]{gloset}{printarea}{% a7-f1 % D
+  \board at do@l at addto@macro\board at val@savedkeylist{,printarea=#1}{}}%
+
+%%% print inverse
+
+\define at boolkey[UFCB]{locset}{inverse}[true]{} % D
+
+\define at boolkey[UFCB]{gloset}{inverse}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,inverse=#1}{}}
+
+%%%
+%% margin
+%%%
+
+\define at key[UFCB]{locset}{marginleftwidth}{% D
+  \def\board at val@marginleftwidth{#1}}
+
+\define at key[UFCB]{gloset}{marginleftwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,marginleftwidth=#1}{}}
+
+\define at key[UFCB]{locset}{marginrightwidth}{% D
+  \def\board at val@marginrightwidth{#1}}
+
+\define at key[UFCB]{gloset}{marginrightwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,marginrightwidth=#1}{}}
+
+\define at key[UFCB]{locset}{margintopwidth}{% D
+  \def\board at val@margintopwidth{#1}}
+
+\define at key[UFCB]{gloset}{margintopwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,margintopwidth=#1}{}}
+
+\define at key[UFCB]{locset}{marginbottomwidth}{% D
+  \def\board at val@marginbottomwidth{#1}}
+
+\define at key[UFCB]{gloset}{marginbottomwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,marginbottomwidth=#1}{}}
+
+\define at key[UFCB]{locset}{hmarginwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{marginleftwidth=#1, marginrightwidth=#1}}
+
+\define at key[UFCB]{gloset}{hmarginwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{marginleftwidth=#1, marginrightwidth=#1}}
+
+\define at key[UFCB]{locset}{vmarginwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{margintopwidth=#1, marginbottomwidth=#1}}
+
+\define at key[UFCB]{gloset}{vmarginwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{margintopwidth=#1, marginbottomwidth=#1}}
+
+\define at key[UFCB]{locset}{marginwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{%
+      marginleftwidth=#1, marginrightwidth=#1, margintopwidth=#1, marginbottomwidth=#1}}
+
+\define at key[UFCB]{gloset}{marginwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{%
+      marginleftwidth=#1, marginrightwidth=#1, margintopwidth=#1, marginbottomwidth=#1}}
+
+\define at boolkey[UFCB]{locset}{marginleft}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{marginleft}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,marginleft=#1}{}}
+
+\define at boolkey[UFCB]{locset}{marginright}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{marginright}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,marginright=#1}{}}
+
+\define at boolkey[UFCB]{locset}{margintop}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{margintop}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,margintop=#1}{}}
+
+\define at boolkey[UFCB]{locset}{marginbottom}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{marginbottom}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,marginbottom=#1}{}}
+
+\define at boolkey[UFCB]{locset}{hmargin}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{marginleft=#1, marginright=#1}}
+
+\define at boolkey[UFCB]{gloset}{hmargin}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{marginleft=#1, marginright=#1}}
+
+\define at boolkey[UFCB]{locset}{vmargin}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{margintop=#1, marginbottom=#1}}
+
+\define at boolkey[UFCB]{gloset}{vmargin}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{margintop=#1, marginbottom=#1}}
+
+\define at boolkey[UFCB]{locset}{margin}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{marginleft=#1, marginright=#1, margintop=#1, marginbottom=#1}}
+
+\define at boolkey[UFCB]{gloset}{margin}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{marginleft=#1, marginright=#1, margintop=#1, marginbottom=#1}}
+
+%% border
+
+\define at boolkey[UFCB]{locset}{borderleft}[true]{} % D
+
+\define at boolkey[UFCB]{gloset}{borderleft}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderleft=#1}{}}
+
+\define at boolkey[UFCB]{locset}{borderright}[true]{} % D
+
+\define at boolkey[UFCB]{gloset}{borderright}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderright=#1}{}}
+
+\define at boolkey[UFCB]{locset}{bordertop}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{bordertop}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,bordertop=#1}{}}
+
+\define at boolkey[UFCB]{locset}{borderbottom}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{borderbottom}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderbottom=#1}{}}
+
+\define at boolkey[UFCB]{locset}{hborder}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{borderleft=#1, borderright=#1}}
+
+\define at boolkey[UFCB]{gloset}{hborder}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{borderleft=#1, borderright=#1}}
+
+\define at boolkey[UFCB]{locset}{vborder}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{bordertop=#1, borderbottom=#1}}
+
+\define at boolkey[UFCB]{gloset}{vborder}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{bordertop=#1, borderbottom=#1}}
+
+\define at boolkey[UFCB]{locset}{border}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{borderleft=#1, borderright=#1, bordertop=#1, borderbottom=#1}}
+
+\define at boolkey[UFCB]{gloset}{border}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{borderleft=#1, borderright=#1, bordertop=#1, borderbottom=#1}}
+
+\define at key[UFCB]{locset}{borderleftwidth}{% D
+  \def\board at val@borderleftwidth{#1}}
+
+\define at key[UFCB]{gloset}{borderleftwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderleftwidth=#1}{}}
+
+\define at key[UFCB]{locset}{borderrightwidth}{% D
+  \def\board at val@borderrightwidth{#1}}
+
+\define at key[UFCB]{gloset}{borderrightwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderrightwidth=#1}{}}
+
+\define at key[UFCB]{locset}{bordertopwidth}{% D
+  \def\board at val@bordertopwidth{#1}}
+
+\define at key[UFCB]{gloset}{bordertopwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,bordertopwidth=#1}{}}
+
+\define at key[UFCB]{locset}{borderbottomwidth}{% D
+  \def\board at val@borderbottomwidth{#1}}
+
+\define at key[UFCB]{gloset}{borderbottomwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderbottomwidth=#1}{}}
+
+\define at key[UFCB]{locset}{hborderwidth}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{borderleftwidth=#1, borderrightwidth=#1}}
+
+\define at key[UFCB]{gloset}{hborderwidth}{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{borderleftwidth=#1, borderrightwidth=#1}}
+
+\define at key[UFCB]{locset}{vborderwidth}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{bordertopwidth=#1, borderbottomwidth=#1}}
+
+\define at key[UFCB]{gloset}{vborderwidth}{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{bordertopwidth=#1, borderbottomwidth=#1}}
+
+\define at key[UFCB]{locset}{borderwidth}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{%
+   borderleftwidth=#1, borderrightwidth=#1, bordertopwidth=#1, borderbottomwidth=#1}}
+
+\define at key[UFCB]{gloset}{borderwidth}{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{%
+   borderleftwidth=#1, borderrightwidth=#1, bordertopwidth=#1, borderbottomwidth=#1}}
+
+%%% border color
+
+\define at key[UFCB]{locset}{borderleftcolor}{% D
+  \def\board at val@borderleftcolor{\color{#1}}}
+
+\define at key[UFCB]{gloset}{borderleftcolor}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderleftcolor=#1}{}}
+
+\define at key[UFCB]{locset}{borderrightcolor}{% D
+  \def\board at val@borderrightcolor{\color{#1}}}
+
+\define at key[UFCB]{gloset}{borderrightcolor}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderrightcolor=#1}{}}
+
+\define at key[UFCB]{locset}{bordertopcolor}{% D
+  \def\board at val@bordertopcolor{\color{#1}}}
+
+\define at key[UFCB]{gloset}{bordertopcolor}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,bordertopcolor=#1}{}}
+
+\define at key[UFCB]{locset}{borderbottomcolor}{% D
+  \def\board at val@borderbottomcolor{\color{#1}}}
+
+\define at key[UFCB]{gloset}{borderbottomcolor}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,borderbottomcolor=#1}{}}
+
+\define at key[UFCB]{locset}{hbordercolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{borderleftcolor=#1, borderrightcolor=#1}}
+
+\define at key[UFCB]{gloset}{hbordercolor}{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{borderleftcolor=#1, borderrightcolor=#1}}
+
+\define at key[UFCB]{locset}{vbordercolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{bordertopcolor=#1, borderbottomcolor=#1}}
+
+\define at key[UFCB]{gloset}{vbordercolor}{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{bordertopcolor=#1, borderbottomcolor=#1}}
+
+\define at key[UFCB]{locset}{bordercolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{%
+    borderleftcolor=#1, borderrightcolor=#1, bordertopcolor=#1, borderbottomcolor=#1}}
+
+\define at key[UFCB]{gloset}{bordercolor}{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{%
+    borderleftcolor=#1, borderrightcolor=#1, bordertopcolor=#1, borderbottomcolor=#1}}
+
+%%%%
+%% font
+%%%
+
+\define at key[UFCB]{locset}{boardfontsize}{% D
+  \setboardfontsize{#1}}
+
+\define at key[UFCB]{gloset}{boardfontsize}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontsize=#1}{}}
+
+\define at key[UFCB]{locset}{boardfontfamily}{% D
+  \setboardfontfamily{#1}}
+
+\define at key[UFCB]{gloset}{boardfontfamily}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontfamily=#1}{}}
+
+\define at key[UFCB]{locset}{boardfontseries}{% D
+  \setboardfontseries{#1}}
+
+\define at key[UFCB]{gloset}{boardfontseries}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontseries=#1}{}}
+
+%% shorter name:
+
+\define at key[UFCB]{locset}{fontsize}{%
+ \board at do@setsinglekeys*[UFCB]{locset}{boardfontsize=#1}}
+
+\define at key[UFCB]{gloset}{fontsize}{%
+ \board at do@setsinglekeys*[UFCB]{gloset}{boardfontsize=#1}}
+
+\define at key[UFCB]{locset}{fontfamily}{%
+ \board at do@setsinglekeys*[UFCB]{locset}{boardfontfamily=#1}}
+
+\define at key[UFCB]{gloset}{fontfamily}{%
+ \board at do@setsinglekeys*[UFCB]{locset}{boardfontfamily=#1}}
+
+%%% only for the sake of completeness. Better don't mention it.
+\define at key[UFCB]{locset}{boardfontencoding}{% D
+  \def\cfss at boardfontencoding{#1}}
+
+\define at key[UFCB]{gloset}{boardfontencoding}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,boardfontencoding=#1}{}}
+
+%%% mover
+
+\define at boolkey[UFCB]{locset}{showmover}[true]{} % D
+
+\define at boolkey[UFCB]{gloset}{showmover}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,showmover=#1}{}}
+
+\define at key[UFCB]{locset}{moversize}{% D
+  \def\board at val@moversize{#1}}
+
+\define at key[UFCB]{gloset}{moversize}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,moversize=#1}{}}
+
+\define at key[UFCB]{locset}{moverstyle}{% D
+  \def\board at val@moverstyle{#1}}
+
+\define at key[UFCB]{gloset}{moverstyle}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,moverstyle=#1}{}}
+
+\define at key[UFCB]{locset}{moverbottomlift}{% D
+  \def\board at val@moverbottomlift{#1}}
+
+\define at key[UFCB]{gloset}{moverbottomlift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,moverbottomlift=#1}{}}
+
+\define at key[UFCB]{locset}{movertoplift}{% D
+  \def\board at val@movertoplift{#1}}
+
+\define at key[UFCB]{gloset}{movertoplift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,movertoplift=#1}{}}
+
+\define at key[UFCB]{locset}{moverlift}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{moverbottomlift=#1,movertoplift=#1}}
+
+\define at key[UFCB]{gloset}{moverlift}{% D
+   \board at do@setsinglekeys*[UFCB]{gloset}{moverbottomlift=#1,movertoplift=#1}}
+
+\define at key[UFCB]{locset}{moverbottomshift}{% D
+  \def\board at val@moverbottomshift{#1}}
+
+\define at key[UFCB]{gloset}{moverbottomshift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,moverbottomshift=#1}{}}
+
+\define at key[UFCB]{locset}{movertopshift}{% D
+  \def\board at val@movertopshift{#1}}
+
+\define at key[UFCB]{gloset}{movertopshift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,movertopshift=#1}{}}
+
+\define at key[UFCB]{locset}{movershift}{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{moverbottomshift=#1, movertopshift=#1}}
+
+\define at key[UFCB]{gloset}{movershift}{% D
+ \board at do@setsinglekeys*[UFCB]{gloset}{moverbottomshift=#1, movertopshift=#1}}
+
+%%% labels
+
+\define at boolkey[UFCB]{locset}{labelleft}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{labelleft}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelleft=#1}{}}
+
+\define at boolkey[UFCB]{locset}{labelright}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{labelright}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelright=#1}{}}
+
+\define at boolkey[UFCB]{locset}{labeltop}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{labeltop}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labeltop=#1}{}}
+
+\define at boolkey[UFCB]{locset}{labelbottom}[true]{} %D
+
+\define at boolkey[UFCB]{gloset}{labelbottom}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottom=#1}{}}
+
+\define at boolkey[UFCB]{locset}{hlabel}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{labelleft=#1, labelright=#1}}
+
+\define at boolkey[UFCB]{gloset}{hlabel}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{labelleft=#1, labelright=#1}}
+
+\define at boolkey[UFCB]{locset}{vlabel}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{labeltop=#1, labelbottom=#1}}
+
+\define at boolkey[UFCB]{gloset}{vlabel}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{labeltop=#1, labelbottom=#1}}
+
+\define at boolkey[UFCB]{locset}{label}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{%
+    labelleft=#1, labelright=#1, labeltop=#1, labelbottom=#1}}
+
+\define at boolkey[UFCB]{gloset}{label}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{%
+    labelleft=#1, labelright=#1, labeltop=#1, labelbottom=#1}}
+
+%% width
+\define at key[UFCB]{locset}{labelleftwidth}{% D
+  \def\board at val@labelleftwidth{#1}}
+
+\define at key[UFCB]{gloset}{labelleftwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftwidth=#1}{}}
+
+\define at key[UFCB]{locset}{labelrightwidth}{% D
+  \def\board at val@labelrightwidth{#1}}
+
+\define at key[UFCB]{gloset}{labelrightwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightwidth=#1}{}}
+
+\define at key[UFCB]{locset}{labelbottomwidth}{% D
+  \def\board at val@labelbottomwidth{#1}}
+
+\define at key[UFCB]{gloset}{labelbottomwidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomwidth=#1}{}}
+
+\define at key[UFCB]{locset}{hlabelwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{labelleftwidth=#1, labelrightwidth=#1}}
+
+\define at key[UFCB]{gloset}{hlabelwidth}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftwidth=#1, labelrightwidth=#1}}
+
+%% lift
+\define at key[UFCB]{locset}{labelleftlift}{% D
+  \def\board at val@labelleftlift{#1}}
+
+\define at key[UFCB]{gloset}{labelleftlift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftlift=#1}{}}
+
+\define at key[UFCB]{locset}{labelrightlift}{% D
+  \def\board at val@labelrightlift{#1}}
+
+\define at key[UFCB]{gloset}{labelrightlift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightlift=#1}{}}
+
+\define at key[UFCB]{locset}{labeltoplift}{% D
+  \def\board at val@labeltoplift{#1}}
+
+\define at key[UFCB]{gloset}{labeltoplift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labeltoplift=#1}{}}
+
+\define at key[UFCB]{locset}{labelbottomlift}{% D
+  \def\board at val@labelbottomlift{#1}}
+
+\define at key[UFCB]{gloset}{labelbottomlift}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomlift=#1}{}}
+
+\define at key[UFCB]{locset}{hlabellift}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{labelleftlift=#1, labelrightlift=#1}}
+
+\define at key[UFCB]{gloset}{hlabellift}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftlift=#1, labelrightlift=#1}}
+
+\define at key[UFCB]{locset}{vlabellift}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{labeltoplift=#1, labelbottomlift=#1}}
+
+\define at key[UFCB]{gloset}{vlabellift}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labeltoplift=#1, labelbottomlift=#1}}
+
+%% font
+
+\define at key[UFCB]{locset}{labelleftfont}{% D
+  \def\board at val@labelleftfont{#1}}
+
+\define at key[UFCB]{gloset}{labelleftfont}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftfont=#1}{}}
+
+\define at key[UFCB]{locset}{labelrightfont}{% D
+  \def\board at val@labelrightfont{#1}}
+
+\define at key[UFCB]{gloset}{labelrightfont}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightfont=#1}{}}
+
+\define at key[UFCB]{locset}{labeltopfont}{% D
+  \def\board at val@labeltopfont{#1}}
+
+\define at key[UFCB]{gloset}{labeltopfont}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labeltopfont=#1}{}}
+
+\define at key[UFCB]{locset}{labelbottomfont}{% D
+  \def\board at val@labelbottomfont{#1}}
+
+\define at key[UFCB]{gloset}{labelbottomfont}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomfont=#1}{}}
+
+\define at key[UFCB]{locset}{hlabelfont}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{labelleftfont=#1, labelrightfont=#1}}
+
+\define at key[UFCB]{gloset}{hlabelfont}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftfont=#1, labelrightfont=#1}}%
+
+\define at key[UFCB]{locset}{vlabelfont}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{labeltopfont=#1, labelbottomfont=#1}}%
+
+\define at key[UFCB]{gloset}{vlabelfont}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labeltopfont=#1, labelbottomfont=#1}}%
+
+\define at key[UFCB]{locset}{labelfont}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{%
+      labelleftfont=#1, labelrightfont=#1, labeltopfont=#1, labelbottomfont=#1}}%
+
+\define at key[UFCB]{gloset}{labelfont}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftfont=#1, labelrightfont=#1, labeltopfont=#1, labelbottomfont=#1}}%
+
+%%fontsize
+
+\define at key[UFCB]{locset}{labelfontsize}{% D
+  \def\cfss at sidefontsize{#1}}%
+
+\define at key[UFCB]{gloset}{labelfontsize}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelfontsize=#1}{}}%
+
+%% formatting
+
+\define at key[UFCB]{locset}{labelleftformat}{% D
+  \def\board at val@labelleftformat{#1}}%
+
+\define at key[UFCB]{gloset}{labelleftformat}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelleftformat={#1}}{}}%
+
+\define at key[UFCB]{locset}{labelrightformat}{% D
+  \def\board at val@labelrightformat{#1}}%
+
+\define at key[UFCB]{gloset}{labelrightformat}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelrightformat={#1}}{}}%
+
+\define at key[UFCB]{locset}{labeltopformat}{% D
+  \def\board at val@labeltopformat{#1}}%
+
+\define at key[UFCB]{gloset}{labeltopformat}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labeltopformat={#1}}{}}%
+
+\define at key[UFCB]{locset}{labelbottomformat}{% D
+  \def\board at val@labelbottomformat{#1}}%
+
+\define at key[UFCB]{gloset}{labelbottomformat}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,labelbottomformat={#1}}{}}%
+
+\define at key[UFCB]{locset}{hlabelformat}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{labelleftformat=#1, labelrightformat=#1}}%
+
+\define at key[UFCB]{gloset}{hlabelformat}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labelleftformat={#1}, labelrightformat={#1}}}%
+
+\define at key[UFCB]{locset}{vlabelformat}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{labeltopformat=#1, labelbottomformat=#1}}%
+
+\define at key[UFCB]{gloset}{vlabelformat}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{labeltopformat={#1}, labelbottomformat={#1}}}%
+
+\define at key[UFCB]{locset}{labelformat}{% D
+    \board at do@setsinglekeys*[UFCB]{locset}{%
+     labelleftformat=#1, labelrightformat=#1, labeltopformat=#1, labelbottomformat=#1}}%
+
+\define at key[UFCB]{gloset}{labelformat}{% D
+    \board at do@setsinglekeys*[UFCB]{gloset}{%
+     labelleftformat={#1}, labelrightformat={#1}, labeltopformat={#1}, labelbottomformat={#1}}}%
+
+%%%
+%% Board sizes
+%%%
+
+\define at key[UFCB]{locset}{tinyboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=10pt, labelfontsize=6pt}}%
+
+\define at key[UFCB]{gloset}{tinyboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=10pt, labelfontsize=6pt}}%
+
+\define at key[UFCB]{locset}{smallboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=15pt, labelfontsize=8pt}}%
+
+\define at key[UFCB]{gloset}{smallboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=15pt, labelfontsize=8pt}}%
+
+\define at key[UFCB]{locset}{normalboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=20pt, labelfontsize=10pt}}%
+
+\define at key[UFCB]{gloset}{normalboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=20pt, labelfontsize=10pt}}%
+
+\define at key[UFCB]{locset}{largeboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{locset}{fontsize=30pt, labelfontsize=12pt}}%
+
+\define at key[UFCB]{gloset}{largeboard}[true]{% D
+  \board at do@setsinglekeys*[UFCB]{gloset}{fontsize=30pt, labelfontsize=12pt}}%
+
+%%% coloring the font layer
+\define at key[UFCB]{locfill}{clearfontcolors}[true]{% D
+  \def\board at val@fontcolorstack{}}
+
+\define at key[UFCB]{glofill}{clearfontcolors}[true]{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,clearfontcolors=#1}{}}%
+
+\define at key[UFCB]{locfill}{whitefieldmaskcolor}{% D
+ \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at whitefieldmaskcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{whitefieldmaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,whitefieldmaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{blackfieldmaskcolor}{% D
+  \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at blackfieldmaskcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{blackfieldmaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,blackfieldmaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{fieldmaskcolor}{% D
+ \board at do@setsinglekeys*[UFCB]{locfill}{%
+  whitefieldmaskcolor=#1,
+  blackfieldmaskcolor=#1}}
+
+\define at key[UFCB]{glofill}{fieldmaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,fieldmaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{whitefieldcolor}{% D
+  \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at whitefieldcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{whitefieldcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,whitefieldcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{blackfieldcolor}{% D
+  \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at blackfieldcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{blackfieldcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,blackfieldcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{fieldcolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   whitefieldcolor=#1,
+   blackfieldcolor=#1}}
+
+\define at key[UFCB]{glofill}{fieldcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,fieldcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{whiteonwhitepiecemaskcolor}{% D
+  \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at whiteonwhitepiecemaskcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{whiteonwhitepiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,whiteonwhitepiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{whiteonblackpiecemaskcolor}{% D
+  \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at whiteonblackpiecemaskcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{whiteonblackpiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,whiteonblackpiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{blackonwhitepiecemaskcolor}{% D
+  \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at blackonwhitepiecemaskcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{blackonwhitepiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,blackonwhitepiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{blackonblackpiecemaskcolor}{% D
+  \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at blackonblackpiecemaskcolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{blackonblackpiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,blackonblackpiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{whitepiecemaskcolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   whiteonwhitepiecemaskcolor=#1,
+   whiteonblackpiecemaskcolor=#1}}
+
+\define at key[UFCB]{glofill}{whitepiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,whitepiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{blackpiecemaskcolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   blackonwhitepiecemaskcolor=#1,
+   blackonblackpiecemaskcolor=#1}}
+
+\define at key[UFCB]{glofill}{blackpiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,blackpiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{onwhitepiecemaskcolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   whiteonwhitepiecemaskcolor=#1,
+   blackonwhitepiecemaskcolor=#1}}
+
+\define at key[UFCB]{glofill}{onwhitepiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,onwhitepiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{onblackpiecemaskcolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   whiteonblackpiecemaskcolor=#1,
+   blackonblackpiecemaskcolor=#1}}
+
+\define at key[UFCB]{glofill}{onblackpiecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,onblackpiecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{piecemaskcolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   whiteonwhitepiecemaskcolor=#1,
+   whiteonblackpiecemaskcolor=#1,
+   blackonwhitepiecemaskcolor=#1,
+   blackonblackpiecemaskcolor=#1}}
+
+\define at key[UFCB]{glofill}{piecemaskcolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,piecemaskcolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{whitepiececolor}{% D
+ \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at whitepiececolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{whitepiececolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,whitepiececolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{blackpiececolor}{% D
+ \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at blackpiececolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{blackpiececolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,blackpiececolor=#1}{}}%
+
+\define at key[UFCB]{locfill}{piececolor}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+   whitepiececolor=#1,
+   blackpiececolor=#1}}
+
+\define at key[UFCB]{glofill}{piececolor}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,piececolor=#1}{}}%
+
+%% Obsolete + changed, use whitepiececolor
+\define at key[UFCB]{locfill}{colorwhite}{% D
+ \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at whitepiececolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{colorwhite}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,colorwhite=#1}{}}%
+
+\define at key[UFCB]{locfill}{colorblack}{% D
+ \board at do@l at addto@macro\board at val@fontcolorstack
+  {\def\cfss at blackpiececolor{\color{#1}}}}
+
+\define at key[UFCB]{glofill}{colorblack}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,colorblack=#1}{}}%
+
+%% end obsolete
+
+%% setting board colors
+\define at key[UFCB]{locfill}{setfontcolors}[true]{% D
+ \let\board at val@boardfontcolors\board at val@fontcolorstack}
+
+\define at key[UFCB]{glofill}{setfontcolors}[true]{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,setfontcolors=#1}{}}%
+
+\define at key[UFCB]{locfill}{addfontcolors}[true]{% D
+  \toks@=\expandafter{\board at val@fontcolorstack}%
+  \edef\@@next{\noexpand\board at do@l at addto@macro\noexpand\board at val@boardfontcolors{\the\toks@}}%
+  \@@next}
+
+\define at key[UFCB]{glofill}{setfontcolors}[true]{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,setfontcolors=#1}{}}%
+
+%% color in areas.
+
+
+%%% enable postscript units and node
+\define at boolkey[UFCB]{locset}{psset}[true]{}% D
+
+\define at boolkey[UFCB]{gloset}{psset}[true]{% D
+   \board at do@l at addto@macro\board at val@savedkeylist{,psset=#1}{}}%
+
+%%% redefines some skak commands/skak counters
+\define at boolkey[UFCB]{locset}{psskak}[true]{}% D
+
+\define at boolkey[UFCB]{gloset}{psskak}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,psskak=#1}{}}%
+
+%%%%%%
+%% "fill"-Keys that can be used more than once
+%%%%%%
+
+%%%%
+%% language
+%%%%
+
+\define at key[UFCB]{locfill}{language}{% D
+    \edef\board at val@curlang{#1}}%
+
+\define at key[UFCB]{glofill}{language}{% D
+ \board at do@l at addto@macro\board at val@savedkeylist{,language=#1}}%
+
+%%%%
+%% clearing
+%%%%
+
+\define at key[UFCB]{locfill}{cleararea}{% D
+ \edef\board at temp@list{#1}%
+ \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at do@cleararea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{cleararea}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,cleararea=#1}}%
+
+\define at key[UFCB]{locfill}{clearareas}{% D
+  \edef\board at temp@list{#1}%
+ \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at do@cleararea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{clearareas}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearareas=#1}}%
+
+\define at key[UFCB]{locfill}{clearboard}[true]{%D
+   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
+   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
+   \board at do@setsinglekeys*[UFCB]{locfill}{cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{clearboard}[true]{%D
+   \board at do@l at addto@macro\board at val@savedkeylist{,clearboard=#1}}%
+
+\define at key[UFCB]{locfill}{clearrank}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{clearrank}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearrank={#1}}}%
+
+\define at key[UFCB]{locfill}{clearranks}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{clearranks}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearranks={#1}}}%
+
+\define at key[UFCB]{locfill}{clearfile}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{clearfile}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearfile={#1}}}%
+
+\define at key[UFCB]{locfill}{clearfiles}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      cleararea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{clearfiles}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearfiles={#1}}}%
+
+\define at key[UFCB]{locfill}{clearfield}{% #1=list of fields %D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{cleararea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{clearfield}{% %D
+    \board at do@l at addto@macro\board at val@savedkeylist{,clearfield={#1}}}%
+
+\define at key[UFCB]{locfill}{clearfields}{% #1=list of fields %D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{cleararea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{clearfields}{% %D
+    \board at do@l at addto@macro\board at val@savedkeylist{,clearfields={#1}}}%
+
+%%%%
+%% hiding
+%%%%
+
+\define at key[UFCB]{locfill}{hidearea}{% D
+  \board at do@hidearea{#1}}%
+
+\define at key[UFCB]{glofill}{hidearea}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidearea=#1}}%
+
+\define at key[UFCB]{locfill}{hideareas}{% D
+  \edef\board at temp@list{#1}%
+ \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at do@hidearea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{hideareas}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hideareas=#1}}%
+
+\define at key[UFCB]{locfill}{hideboard}[true]{% D
+   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
+   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
+   \board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{hideboard}[true]{% D
+   \board at do@l at addto@macro\board at val@savedkeylist{,hideboard=#1}}%
+
+\define at key[UFCB]{locfill}{hiderank}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{hiderank}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hiderank={#1}}}%
+
+\define at key[UFCB]{locfill}{hideranks}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{hideranks}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hideranks={#1}}}%
+
+\define at key[UFCB]{locfill}{hidefile}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{hidefile}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidefile={#1}}}%
+
+\define at key[UFCB]{locfill}{hidefiles}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     hidearea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{hidefiles}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidefiles={#1}}}%
+
+\define at key[UFCB]{locfill}{hidefields}{% D #1=list of fields
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{hidefields}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidefields={#1}}}%
+
+\define at key[UFCB]{locfill}{hidefield}{% D #1=list of fields
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{hidefield}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidefield={#1}}}%
+
+\define at key[UFCB]{locfill}{hidepiece}{% D list of chars
+  \board at do@hidetypelist{#1}}%
+
+\define at key[UFCB]{glofill}{hidepiece}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidepiece={#1}}}%
+
+\define at key[UFCB]{locfill}{hidepieces}{% D list of chars
+  \board at do@hidetypelist{#1}}%
+
+\define at key[UFCB]{glofill}{hidepieces}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidepieces={#1}}}%
+
+\define at key[UFCB]{locfill}{hidewhite}[true]{% D
+   \edef\board at temp@list{%
+    \csname board@\board at val@game @whitepiececharlist\endcsname}%
+    \board at do@hidetypelist{\board at temp@list}}%
+
+\define at key[UFCB]{glofill}{hidewhite}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hidewhite=#1}}%
+
+\define at key[UFCB]{locfill}{hideblack}[true]{% D
+   \edef\board at temp@list{%
+    \csname board@\board at val@game @blackpiececharlist\endcsname}%
+    \board at do@hidetypelist{\board at temp@list}}%
+
+\define at key[UFCB]{glofill}{hideblack}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hideblack=#1}}%
+
+\define at key[UFCB]{locfill}{hideall}[true]{% D
+  \edef\board at temp@list{%
+   \csname board@\board at val@game @piececharlist\endcsname}%
+   \board at do@hidetypelist{\board at temp@list}}%
+
+\define at key[UFCB]{glofill}{hideall}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,hideall=#1}}%
+
+%%%%
+%% show
+%%%%
+
+\define at key[UFCB]{locfill}{showarea}{%
+  \board at do@showarea{#1}}%
+
+\define at key[UFCB]{glofill}{showarea}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showarea=#1}}%
+
+\define at key[UFCB]{locfill}{showareas}{% D
+  \edef\board at temp@list{#1}%
+ \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at do@showarea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{showareas}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,showareas=#1}}%
+
+\define at key[UFCB]{locfill}{showboard}[true]{%
+  \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
+  \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
+  \board at do@setsinglekeys*[UFCB]{locfill}{showarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{showboard}[true]{%
+   \board at do@l at addto@macro\board at val@savedkeylist{,showboard=#1}}%
+
+\define at key[UFCB]{locfill}{showrank}{%
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{showrank}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showrank={#1}}}%
+
+\define at key[UFCB]{locfill}{showranks}{%
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{showranks}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showranks={#1}}}%
+
+\define at key[UFCB]{locfill}{showfile}{%
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{showfile}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showfile={#1}}}%
+
+\define at key[UFCB]{locfill}{showfiles}{%
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     showarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{showfiles}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showfiles={#1}}}%
+
+\define at key[UFCB]{locfill}{showfield}{% #1=list of fields
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{showfield}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showfield={#1}}}%
+
+\define at key[UFCB]{locfill}{showfields}{% #1=list of fields
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{hidearea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{showfields}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showfields={#1}}}%
+
+\define at key[UFCB]{locfill}{showpiece}{% list of chars
+  \board at do@showtypelist{#1}}%
+
+\define at key[UFCB]{glofill}{showpiece}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showpieces={#1}}}%
+
+\define at key[UFCB]{locfill}{showpieces}{% list of chars
+  \board at do@showtypelist{#1}}%
+
+\define at key[UFCB]{glofill}{showpieces}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,showpieces={#1}}}%
+
+%%%%
+%% fen
+%%%%
+%%% fen "corners
+
+\define at key[UFCB]{locfill}{startfen}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@startfenfilechar\board at temp@curfilechar
+  \let\board at val@startfenfilenum\board at temp@curfilenum
+  \let\board at val@startfenranknum\board at temp@curranknum}%
+
+\define at key[UFCB]{glofill}{startfen}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,startfen=#1}}%
+
+\define at key[UFCB]{locfill}{startfill}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@startfillfilechar\board at temp@curfilechar
+  \let\board at val@startfillfilenum\board at temp@curfilenum
+  \let\board at val@startfillranknum\board at temp@curranknum}%
+
+\define at key[UFCB]{glofill}{startfill}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,startfill=#1}}%
+
+\define at key[UFCB]{locfill}{stopfill}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@stopfillfilechar\board at temp@curfilechar
+  \let\board at val@stopfillfilenum\board at temp@curfilenum
+  \let\board at val@stopfillranknum\board at temp@curranknum}%
+
+\define at key[UFCB]{glofill}{stopfill}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,startfill=#1}}%
+
+\define at key[UFCB]{locfill}{fillarea}{% a7-f1 %D
+    \expandafter\board at split@areasort#1ARGEND%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      startfill=\board at temp@curstartfield, stopfill=\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{fillarea}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,fillarea=#1}}%
+
+%%%
+%% setting pieces with fen
+%%%
+
+\define at key[UFCB]{locfill}{@fen}{%
+   \board at split@fen#1 X X X X X X XARGEND%
+   \board at scan@fen{\board at val@position}}%
+
+\def\board at setfenkey#1|{\board at do@setsinglekeys*[UFCB]{locfill}{@fen=#1}}%
+
+%%change 1.5
+\define at key[UFCB]{locfill}{setfen}{% D
+    \board at do@setsinglekeys*[UFCB]{locfill}{clearboard}%
+    \edef\board at temp@fen{#1}%
+    \expandafter\board at setfenkey\board at temp@fen|}%
+
+\define at key[UFCB]{glofill}{setfen}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,setfen=#1}}%
+
+\define at key[UFCB]{locfill}{addfen}{% D
+    \expandafter\board at setfenkey#1|}%
+
+\define at key[UFCB]{glofill}{addfen}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,addfen=#1}}%
+
+%%% other name for usefen
+\define at key[UFCB]{locfill}{restorefen}{% D
+   \edef\board at temp@curfen{\csname chessgame.#1\endcsname}%
+   \board at do@setsinglekeys*[UFCB]{locfill}{language=english, addfen=\board at temp@curfen, language=\board at val@savelang}}%
+
+\define at key[UFCB]{glofill}{restorefen}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,restorefen=#1}}%cor 1.5.
+
+\define at key[UFCB]{locfill}{loadfen}{% D
+   \board at do@loadfen{#1}%
+   \board at do@setsinglekeys*[UFCB]{locfill}{language=english, addfen=\board at temp@curfen, language=\board at val@savelang}}%
+
+\define at key[UFCB]{glofill}{loadfen}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,loadfen=#1}}%
+
+%%%%
+%% rest of fen
+%%%%
+
+\define at key[UFCB]{locfill}{mover}{\def\board at val@mover{#1}} %D %changed 02.08.2007 to allow commands as input
+\define at key[UFCB]{locfill}{castling}{\def\board at val@castling{#1}} %D
+\define at key[UFCB]{locfill}{enpassant}{\def\board at val@enpassant{#1}} %D
+\define at key[UFCB]{locfill}{halfmove}{\def\board at val@halfmove{#1}}  %D
+\define at key[UFCB]{locfill}{fullmove}{\def\board at val@fullmove{#1}} %D
+
+\define at key[UFCB]{glofill}{mover}{\board at do@l at addto@macro\board at val@savedkeylist{,mover=#1}} %D
+\define at key[UFCB]{glofill}{castling}{\board at do@l at addto@macro\board at val@savedkeylist{,castling=#1}} %D
+\define at key[UFCB]{glofill}{enpassant}{\board at do@l at addto@macro\board at val@savedkeylist{,enpassant=#1}} %D
+\define at key[UFCB]{glofill}{halfmove}{\board at do@l at addto@macro\board at val@savedkeylist{,halfmove=#1}} %D
+\define at key[UFCB]{glofill}{fullmove}{\board at do@l at addto@macro\board at val@savedkeylist{,fullmove=#1}} %D
+
+%%% saving fen
+
+\define at key[UFCB]{locfill}{storefen}{% D
+  \board at do@storefen{#1}}% D
+
+\define at key[UFCB]{glofill}{storefen}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,storefen=#1}}%
+
+\define at key[UFCB]{locfill}{savefen}{\board at do@savefen{#1}} %D
+
+\define at key[UFCB]{glofill}{savefen}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,savefen=#1}}%
+
+\define at key[UFCB]{locfill}{startstore}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@startstorefilechar\board at temp@curfilechar
+  \let\board at val@startstorefilenum\board at temp@curfilenum
+  \let\board at val@startstoreranknum\board at temp@curranknum%
+  }%
+
+\define at key[UFCB]{glofill}{startstore}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,startstore=#1}}%
+
+\define at key[UFCB]{locfill}{stopstore}{% D
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@stopstorefilechar\board at temp@curfilechar
+  \let\board at val@stopstorefilenum\board at temp@curfilenum
+  \let\board at val@stopstoreranknum\board at temp@curranknum}%
+
+\define at key[UFCB]{glofill}{stopstore}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,stopstore=#1}}%
+
+\define at key[UFCB]{locfill}{storearea}{% a7-f1 %D
+  \expandafter\board at split@areasort#1ARGEND%
+  \board at do@setsinglekeys*[UFCB]{locfill}{%
+    startstore=\board at temp@curstartfield, stopstore=\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{storearea}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,storearea=#1}}%
+
+%%%%%%
+%%% Adding pieces
+%%%%%%
+
+\define at key[UFCB]{locfill}{setpieces}{% D
+    \board at do@setsinglekeys*[UFCB]{locfill}{clearboard=true}%
+    \board at do@addpieces{#1}}%
+
+\define at key[UFCB]{glofill}{setpieces}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,setpieces={#1}}}%
+
+\define at key[UFCB]{locfill}{addpieces}{% D
+    \board at do@addpieces{#1}}%
+
+\define at key[UFCB]{glofill}{addpieces}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,addpieces={{#1}}}}%
+
+\define at key[UFCB]{locfill}{setwhite}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{clearboard=true}%
+  \board at do@addwhitepieces{#1}}%
+
+\define at key[UFCB]{glofill}{setwhite}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,setwhite={#1}}}%
+
+\define at key[UFCB]{locfill}{addwhite}{% D
+     \board at do@addwhitepieces{#1}}%
+
+\define at key[UFCB]{glofill}{addwhite}{% D
+     \board at do@l at addto@macro\board at val@savedkeylist{,addwhite={#1}}}%
+
+\define at key[UFCB]{locfill}{setblack}{% D
+     \board at do@setsinglekeys*[UFCB]{locfill}{clearboard=true}%
+     \board at do@addblackpieces{#1}}%
+
+\define at key[UFCB]{glofill}{setblack}{% D
+     \board at do@l at addto@macro\board at val@savedkeylist{,setblack={#1}}}%
+
+\define at key[UFCB]{locfill}{addblack}{% D
+     \board at do@addblackpieces{#1}}%
+
+\define at key[UFCB]{glofill}{addblack}{% D
+     \board at do@l at addto@macro\board at val@savedkeylist{,addblack={#1}}}%
+
+%% getting field lists for piece types
+\define at key[UFCB]{locfill}{getpiecelists}[true]{% D
+  \board at do@getpiecelists}
+
+\define at key[UFCB]{glofill}{getpiecelists}[true]{% D
+     \board at do@l at addto@macro\board at val@savedkeylist{,getpiecelists={#1}}}%
+
+
+%%\define at key[UFCB]{main}{fontsize}{\setboardfontsize{#1}}%
+
+%% "emphazing"
+
+\define at boolkey[UFCB]{locfill}{coloremph}[true]{}
+
+\define at boolkey[UFCB]{glofill}{coloremph}[true]{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,coloremph={#1}}}%
+
+\define at key[UFCB]{locfill}{emphstyle}{% D
+ \def\board at val@pieceemph{#1}}%
+
+\define at key[UFCB]{glofill}{emphstyle}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,emphstyle={#1}}}%
+
+\define at key[UFCB]{locfill}{coloremphstyle}[\relax]{% D
+ \board at do@setsinglekeys*[UFCB]{locfill}{coloremph}%
+ \def\board at val@pieceemph{#1}}%
+
+\define at key[UFCB]{glofill}{coloremphstyle}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,coloremphstyle={#1}}}%
+
+\define at key[UFCB]{locfill}{empharea}{% D
+  \board at do@empharea{#1}}%
+
+\define at key[UFCB]{glofill}{empharea}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,empharea=#1}}%
+
+\define at key[UFCB]{locfill}{emphareas}{% D
+ \XKV at sp@deflist\board at templist{#1}%
+ \edef\board at templist{\board at templist}%
+ \@for\board at temp@curarea:=\board at templist\do
+  {\ifx\board at temp@curarea\@empty\else
+   \board at do@empharea{\board at temp@curarea}%
+   \fi}}%
+
+\define at key[UFCB]{glofill}{emphareas}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,emphareas={#1}}}%
+
+\define at key[UFCB]{locfill}{emphboard}[true]{%D
+   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
+   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
+   \board at do@setsinglekeys*[UFCB]{locfill}{empharea=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{emphboard}[true]{%D
+   \board at do@l at addto@macro\board at val@savedkeylist{,emphboard=#1}}%
+
+\define at key[UFCB]{locfill}{emphranks}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      empharea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{emphranks}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,emphranks={#1}}}%
+
+\define at key[UFCB]{locfill}{emphrank}{% D
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      emphranks=#1}}%
+
+\define at key[UFCB]{glofill}{emphrank}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,emphrank={#1}}}%
+
+\define at key[UFCB]{locfill}{emphfiles}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      empharea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{emphfiles}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,emphfiles={#1}}}%
+
+\define at key[UFCB]{locfill}{emphfile}{% D
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      emphfiles=#1}}%
+
+\define at key[UFCB]{glofill}{emphfile}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,emphfile=#1}}%
+
+\define at key[UFCB]{locfill}{emphfields}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+   {\expandafter\board at split@field\board at temp@curfield ARGEND%
+    \board at do@store at pieceemph{\board at temp@curfilenum}{\board at temp@curranknum}}}%
+
+\define at key[UFCB]{glofill}{emphfields}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,emphpieces={#1}}}%
+
+\define at key[UFCB]{locfill}{emphfield}{% D
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      emphfields=#1}}%
+
+\define at key[UFCB]{glofill}{emphfield}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,emphfield=#1}}%
+
+\define at key[UFCB]{locfill}{colorpieces}{% D
+  \PackageWarning{chessboard}{The key colorpieces doesn't work anymore. \MessageBreak
+  Use the emph-keys instead.}}%
+\define at key[UFCB]{glofill}{colorpieces}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorpieces={#1}}}%
+
+%%%%%%%%%%%%%%%
+%% setting the game
+%%%%%%%%%%%%%%%
+
+\define at key[UFCB]{locinit}{game}{%
+    \def\board at val@game{#1}}%
+
+\define at key[UFCB]{gloinit}{game}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,game=#1}{}}%
+
+
+%</chessboard-keys-main>
+%<*chessboard-keys-pgf>
+\ProvidesFile{chessboard-keys-pgf.sty}[2019/06/23 version v1.8 key definitions for chessboard.sty]
+%%$Date: 2011/03/17 13:42:38 $$Version: e7ec1b100ede $
+
+%% new 1.5.: style keys for curvemove
+\define at key[UFCB]{bez}{x1}{\def\board at val@bezxi{#1}}
+\define at key[UFCB]{bez}{x2}{\def\board at val@bezxii{#1}}
+\define at key[UFCB]{bez}{y1}{\def\board at val@bezyi{#1}}
+\define at key[UFCB]{bez}{y2}{\def\board at val@bezyii{#1}}
+\define at key[UFCB]{bez}{linewidth}{\def\board at pgf@linewidth{#1}}
+\define at key[UFCB]{bez}{pgflinewidth}{\def\board at pgf@linewidth{#1}}
+\define at key[UFCB]{bez}{pgfshortenstart}{\def\board at pgf@shortenstart{#1}}
+\define at key[UFCB]{bez}{shortenstart}{\def\board at pgf@shortenstart{#1}}
+\define at key[UFCB]{bez}{pgfshortenend}{\def\board at pgf@shortenend{#1}}
+\define at key[UFCB]{bez}{shortenend}{\def\board at pgf@shortenend{#1}}
+\define at key[UFCB]{bez}{pgfarrow}{\def\board at pgf@arrow{#1}}
+\define at key[UFCB]{bez}{arrow}{\def\board at pgf@arrow{#1}}
+
+\define at boolkey[UFCB]{bez}{clockwise}[true]{%
+  \ifUFCB at bez@clockwise
+   \def\board at val@pgfsign{1}
+  \else
+   \def\board at val@pgfsign{-1}%
+  \fi}%
+\define at key[UFCB]{bez}{style}{%
+ \ifcsname board at pgf@curvemovestyle@#1\endcsname
+  \csname board at pgf@curvemovestyle@#1\endcsname
+ \else\PackageError{chessboard}{Style #1 not defined for curvemove}{}%
+ \fi}
+
+%% disable pgf-picture completely
+
+\define at boolkey[UFCB]{locset}{pgf}[true]{}% D
+
+\define at boolkey[UFCB]{gloset}{pgf}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgf=#1}{}}%
+
+%% clears the user "extra" pictures
+
+\define at key[UFCB]{locfill}{clearbackpgf}[true]{%
+  \let\board at pgf@extrabackground\@empty
+  }%
+
+\define at key[UFCB]{glofill}{clearbackpgf}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearbackpgf=#1}}%
+
+\define at key[UFCB]{locfill}{clearmarkpgf}[true]{%
+ \let\board at pgf@extramarkground\@empty
+  }%
+
+\define at key[UFCB]{glofill}{clearmarkpgf}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearmarkpgf=#1}}%
+
+\define at choicekey[UFCB]{locfill}{clearpgf}[\@tempval\@tempnr]{back,mark,all,both,none}[all]{% D
+ \ifcase\@tempnr\relax
+  \board at do@setsinglekeys*[UFCB]{locfill}{clearbackpgf}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{clearmarkpgf}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{clearbackpgf,clearmarkpgf}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{clearbackpgf,clearmarkpgf}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{}%
+ \fi}
+
+\define at key[UFCB]{glofill}{clearpgf}[all]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearpgf=#1}}%
+
+%% obsolete
+
+\define at key[UFCB]{locfill}{clearbackgroundpgf}[true]{%
+  \let\board at pgf@extrabackground\@empty}%
+
+\define at key[UFCB]{glofill}{clearbackgroundpgf}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearbackgroundpgf=#1}}%
+
+\define at key[UFCB]{locfill}{clearforegroundpgf}[true]{%
+  \let\board at pgf@extramarkground\@empty}%
+
+\define at key[UFCB]{glofill}{clearforegroundpgf}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,clearforegroundpgf=#1}}%
+
+%% to chose the affected picture
+
+\define at boolkey[UFCB]{locfill}{usemarkpgf}[true]{}
+
+\define at boolkey[UFCB]{glofill}{usemarkpgf}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,usemarkpgf=#1}}%
+
+\define at boolkey[UFCB]{locfill}{usebackpgf}[true]{}%
+
+\define at boolkey[UFCB]{glofill}{usebackpgf}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,usebackpgf=#1}}%
+
+\define at choicekey[UFCB]{locfill}{usepgf}[\@tempval\@tempnr]{back,mark,all,both,none}{%
+ \def\board at pgf@curusepgf{#1}%
+ \ifcase\@tempnr\relax
+  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=true,usemarkpgf=false}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{usemarkpgf=true,usebackpgf=false}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=true,usemarkpgf=true}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=true,usemarkpgf=true}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{usebackpgf=false,usemarkpgf=false}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{usepgf}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,usepgf=#1}}%
+
+
+\define at boolkey[UFCB]{locfill}{useonblack}[true]{%
+ \ifUFCB at locfill@useonblack
+   \board at pgf@addmarkground{\UFCB at locfill@useonblacktrue}%
+  \else
+   \board at pgf@addmarkground{\UFCB at locfill@useonblackfalse}%
+  \fi
+ \ifUFCB at locfill@useonblack
+   \board at pgf@addbackground{\UFCB at locfill@useonblacktrue}%
+  \else
+   \board at pgf@addbackground{\UFCB at locfill@useonblackfalse}%
+  \fi}%
+
+\define at boolkey[UFCB]{glofill}{useonblack}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,useonblack=#1}}%
+
+\define at boolkey[UFCB]{locfill}{useonwhite}[true]{%
+  \ifUFCB at locfill@useonwhite
+   \board at pgf@addmarkground{\UFCB at locfill@useonwhitetrue}%
+  \else
+   \board at pgf@addmarkground{\UFCB at locfill@useonwhitefalse}%
+  \fi
+  \ifUFCB at locfill@useonwhite
+   \board at pgf@addbackground{\UFCB at locfill@useonwhitetrue}%
+  \else
+   \board at pgf@addbackground{\UFCB at locfill@useonwhitefalse}%
+  \fi}%
+
+\define at boolkey[UFCB]{glofill}{useonwhite}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,useonwhite=#1}}%
+
+
+\define at choicekey[UFCB]{locfill}{trimtocolor}[\@tempval\@tempnr]{white,black,false}{% D
+ \def\board at pgf@curtrimtocolor{#1}%
+ \ifcase\@tempnr\relax
+  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=true,useonblack=false}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=false,useonblack=true}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=true,useonblack=true}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{trimtocolor}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,trimtocolor=#1}}%
+
+\define at key[UFCB]{locfill}{trimtowhite}[true]{%
+  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=true,useonblack=false}}%
+
+\define at key[UFCB]{glofill}{trimtowhite}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,trimtowhite=#1}}%
+
+\define at key[UFCB]{locfill}{trimtoblack}[true]{%
+  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=false,useonblack=true}}%
+
+\define at key[UFCB]{glofill}{trimtoblack}[true]{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,trimtoblack=#1}}%
+
+\define at key[UFCB]{locfill}{starttrim}{%
+  \expandafter\board at split@field #1ARGEND%
+  \let\board at val@starttrimfilechar\board at temp@curfilechar
+  \let\board at val@starttrimfilenum\board at temp@curfilenum
+  \let\board at val@starttrimranknum\board at temp@curranknum}%
+
+\define at key[UFCB]{glofill}{starttrim}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,starttrim=#1}}%
+
+\define at key[UFCB]{locfill}{stoptrim}{%
+  \expandafter\board at split@field#1ARGEND%
+  \let\board at val@stoptrimfilechar\board at temp@curfilechar
+  \let\board at val@stoptrimfilenum\board at temp@curfilenum
+  \let\board at val@stoptrimranknum\board at temp@curranknum}%}%
+
+\define at key[UFCB]{glofill}{stoptrim}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,starttrim=#1}}%
+
+\define at key[UFCB]{locfill}{trimarea}[\printarea]{% a7-f1 %
+ \ifthenelse{\equal{#1}{empty}}%
+  {\def\board at val@starttrimfilenum{-1}%
+   \def\board at val@starttrimranknum{-1}%
+   \def\board at val@stoptrimfilenum{-1}%
+   \def\board at val@stoptrimrankenum{-1}}%
+  {\expandafter\board at split@areasort#1ARGEND%
+   \let\board at val@starttrimfilechar\board at temp@curstartfilechar
+   \let\board at val@starttrimfilenum\board at temp@curstartfilenum
+   \let\board at val@starttrimranknum\board at temp@curstartranknum
+   \let\board at val@stoptrimfilechar\board at temp@curstopfilechar
+   \let\board at val@stoptrimfilenum\board at temp@curstopfilenum
+   \let\board at val@stoptrimranknum\board at temp@curstopranknum}%
+  \ifUFCB at locfill@captrimtoprint
+   \ifnum\board at val@starttrimfilenum<\board at val@startprintfilenum
+    \let\board at val@starttrimfilenum\board at val@startprintfilenum
+   \fi
+   \ifnum\board at val@stoptrimfilenum>\board at val@stopprintfilenum
+    \let\board at val@stoptrimfilenum\board at val@stopprintfilenum
+   \fi
+   \ifnum\board at val@starttrimranknum>\board at val@startprintranknum
+    \let\board at val@starttrimranknum\board at val@startprintranknum
+   \fi
+   \ifnum\board at val@stoptrimranknum<\board at val@stopprintranknum
+    \let\board at val@stoptrimranknum\board at val@stopprintranknum
+   \fi
+   \ifthenelse
+    {\(\board at val@starttrimfilenum>\board at val@stoptrimfilenum\)
+     \OR
+     \(\board at val@starttrimranknum<\board at val@stoptrimranknum\)}%
+    {\def\board at val@starttrimfilenum{-1}%
+     \def\board at val@starttrimranknum{-1}%
+     \def\board at val@stoptrimfilenum{-1}%
+     \def\board at val@stoptrimrankenum{-1}}%
+    {}%
+  \fi}%
+
+\define at key[UFCB]{glofill}{trimarea}{%
+    \board at do@l at addto@macro\board at val@savedkeylist{,trimarea=#1}}%
+
+\define at boolkey[UFCB]{locfill}{captrimtoprint}[true]{}%
+
+\define at boolkey[UFCB]{glofill}{captrimtoprint}[true]{%
+    \board at do@l at addto@macro\board at val@savedkeylist{,captrimtoprint=#1}}%
+
+\define at boolkey[UFCB]{locfill}{trim}[true]{%
+ \ifUFCB at locfill@trim
+  \board at do@setsinglekeys*[UFCB]{locfill}{trimarea=\printarea}%
+ \else
+  \board at do@setsinglekeys*[UFCB]{locfill}{trimarea=\board}%
+  \fi}%
+
+\define at key[UFCB]{glofill}{trim}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,trim=#1}}%
+
+%% clipping
+
+%% clipping the pictures along a path
+\define at key[UFCB]{locset}{clip}[true]{% D
+ \board at do@setsinglekeys*[UFCB]{intclip}{true,#1}}%
+
+\define at key[UFCB]{gloset}{clip}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,clip={#1}}{}}%
+
+\define at key[UFCB]{locset}{pgfclip}[true]{% D
+ \board at do@setsinglekeys*[UFCB]{intclip}{true,#1}}%
+
+\define at key[UFCB]{gloset}{pgfclip}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfclip={#1}}{}}%
+
+\define at key[UFCB]{locset}{markclip}[true]{% D
+ \board at do@setsinglekeys*[UFCB]{intmarkclip}{true,#1}}%
+
+\define at key[UFCB]{gloset}{markclip}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markclip={#1}}{}}%
+
+\define at key[UFCB]{locset}{backclip}[true]{% D
+ \board at do@setsinglekeys*[UFCB]{intbackclip}{true,#1}}%
+
+\define at key[UFCB]{gloset}{backclip}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backclip={#1}}{}}%
+
+\define at key[UFCB]{intclip}{true}[true]{%
+ \def\board at pgf@usemarkclippath{clip}%
+ \def\board at pgf@usebackclippath{clip}}
+
+\define at key[UFCB]{intclip}{false}[true]{%
+ \def\board at pgf@usemarkclippath{discard}%
+ \def\board at pgf@usebackclippath{discard}}
+
+\define at key[UFCB]{intmarkclip}{true}[true]{%
+ \def\board at pgf@usemarkclippath{clip}}
+
+\define at key[UFCB]{intmarkclip}{false}[true]{%
+ \def\board at pgf@usemarkclippath{discard}}
+
+\define at key[UFCB]{intbackclip}{true}[true]{%
+ \def\board at pgf@usebackclippath{clip}}
+
+\define at key[UFCB]{intbackclip}{false}[true]{%
+ \def\board at pgf@usebackclippath{discard}}
+
+\define at key[UFCB]{intclip}{left}[0pt]{%
+ \def\board at pgf@markclipleftpadding{#1}%
+ \def\board at pgf@backclipleftpadding{#1}}
+
+\define at key[UFCB]{intclip}{top}[0pt]{%
+ \def\board at pgf@markcliptoppadding{#1}%
+ \def\board at pgf@backcliptoppadding{#1}}
+
+\define at key[UFCB]{intclip}{right}[0pt]{%
+ \def\board at pgf@markcliprightpadding{#1}%
+ \def\board at pgf@backcliprightpadding{#1}}
+
+\define at key[UFCB]{intclip}{bottom}[0pt]{%
+ \def\board at pgf@markclipbottompadding{#1}%
+ \def\board at pgf@backclipbottompadding{#1}}
+
+\define at key[UFCB]{intmarkclip}{left}[0pt]{%
+ \def\board at pgf@markclipleftpadding{#1}}
+
+\define at key[UFCB]{intmarkclip}{top}[0pt]{%
+ \def\board at pgf@markcliptoppadding{#1}}
+
+\define at key[UFCB]{intmarkclip}{right}[0pt]{%
+ \def\board at pgf@markcliprightpadding{#1}}
+
+\define at key[UFCB]{intmarkclip}{bottom}[0pt]{%
+ \def\board at pgf@markclipbottompadding{#1}}
+
+\define at key[UFCB]{intbackclip}{left}[0pt]{%
+ \def\board at pgf@backclipleftpadding{#1}}
+
+\define at key[UFCB]{intbackclip}{top}[0pt]{%
+ \def\board at pgf@backcliptoppadding{#1}}
+
+\define at key[UFCB]{intbackclip}{right}[0pt]{%
+ \def\board at pgf@backcliprightpadding{#1}}
+
+\define at key[UFCB]{intbackclip}{bottom}[0pt]{%
+ \def\board at pgf@backclipbottompadding{#1}}
+
+%% pgf properties
+
+\define at key[UFCB]{locfill}{color}{% D
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\color{#1}}%
+ \fi
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\color{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{color}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,color=#1}}%
+
+\define at key[UFCB]{locfill}{pgfcolor}{% D
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\color{#1}}%
+ \fi
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\color{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfcolor}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfcolor=#1}}%
+
+%% padding for colorfields and other means
+\define at key[UFCB]{locfill}{padding}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@padding{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf %
+  \board at pgf@addbackground{\def\board at pgf@padding{#1}}%
+  \board at pgf@addbackground{\def\board at pgf@colorbackpadding{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{padding}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,padding=#1}}%
+
+\define at key[UFCB]{locfill}{pgfpadding}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@padding{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf %
+  \board at pgf@addbackground{\def\board at pgf@padding{#1}}%
+  \board at pgf@addbackground{\def\board at pgf@colorbackpadding{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfpadding}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfpadding=#1}}%
+
+\define at key[UFCB]{locfill}{opacity}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground%
+    {\pgfsetfillopacity{#1}%
+     \pgfsetstrokeopacity{#1}}%%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground%
+    {\pgfsetfillopacity{#1}%
+     \pgfsetstrokeopacity{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{opacity}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,opacity=#1}}%
+
+\define at key[UFCB]{locfill}{pgfopacity}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground%
+    {\pgfsetfillopacity{#1}%
+     \pgfsetstrokeopacity{#1}}%%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground%
+    {\pgfsetfillopacity{#1}%
+     \pgfsetstrokeopacity{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfopacity}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfopacity=#1}}%
+
+\define at key[UFCB]{locfill}{fillopacity}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground%
+    {\pgfsetfillopacity{#1}}%%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground%
+    {\pgfsetfillopacity{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{fillopacity}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,opacity=#1}}%
+
+\define at key[UFCB]{locfill}{pgffillopacity}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground%
+    {\pgfsetfillopacity{#1}}%%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground%
+    {\pgfsetfillopacity{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgffillopacity}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgffillopacity=#1}}%
+
+\define at key[UFCB]{locfill}{strokeopacity}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground%
+    {\pgfsetstrokeopacity{#1}}%
+ \fi%%
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground%
+    {\pgfsetstrokeopacity{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{strokeopacity}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,opacity=#1}}%
+
+\define at key[UFCB]{locfill}{pgfstrokeopacity}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground%
+    {\pgfsetstrokeopacity{#1}}%%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground%
+    {\pgfsetstrokeopacity{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfstrokeopacity}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfstrokeopacity=#1}}%
+
+\define at key[UFCB]{locfill}{linewidth}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@linewidth{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@linewidth{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{linewidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,linewidth=#1}}%
+
+\define at key[UFCB]{locfill}{pgflinewidth}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@linewidth{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@linewidth{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgflinewidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgflinewidth=#1}}%
+
+\define at key[UFCB]{locfill}{backlinewidth}{% D
+  \board at pgf@addbackground{\def\board at pgf@linewidth{#1}}}%
+
+\define at key[UFCB]{glofill}{backlinewidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,linewidth=#1}}%
+
+\define at key[UFCB]{locfill}{marklinewidth}{% D
+  \board at pgf@addmarkground{\def\board at pgf@linewidth{#1}}}%
+
+\define at key[UFCB]{glofill}{marklinewidth}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,linewidth=#1}}%
+
+\define at key[UFCB]{locfill}{backcornerarc}{% D
+  \board at pgf@addbackground{\def\board at pgf@corner{#1}}}%
+
+\define at key[UFCB]{glofill}{backcornerarc}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backcornerarc=#1}}%
+
+\define at key[UFCB]{locfill}{cornerarc}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@corner{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@corner{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{cornerarc}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,cornerarc=#1}}%
+
+\define at key[UFCB]{locfill}{pgfcornerarc}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@corner{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@corner{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfcornerarc}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfcornerarc=#1}}%
+
+\define at key[UFCB]{locfill}{arrow}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@arrow{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@arrow{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{arrow}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,arrow=#1}}%
+
+\define at key[UFCB]{locfill}{pgfarrow}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@arrow{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@arrow{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfarrow}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfarrow=#1}}%
+
+\define at key[UFCB]{locfill}{shortenstart}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@shortenstart{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@shortenstart{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{shortenstart}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,shortenstart=#1}}%
+
+\define at key[UFCB]{locfill}{pgfshortenstart}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@shortenstart{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@shortenstart{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfshortenstart}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfshortenstart=#1}}%
+
+\define at key[UFCB]{locfill}{shortenend}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@shortenend{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@shortenend{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{shortenend}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,shortenend=#1}}%
+
+\define at key[UFCB]{locfill}{pgfshortenend}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@shortenend{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@shortenend{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgfshortenend}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfshortenend=#1}}%
+
+\define at key[UFCB]{locfill}{shorten}{% D
+ \board at do@setsinglekeys*[UFCB]{locfill}{shortenend=#1,shortenstart=#1}}%
+
+\define at key[UFCB]{glofill}{shorten}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,shorten=#1}}%
+
+\define at key[UFCB]{locfill}{pgfshorten}{% D
+ \board at do@setsinglekeys*[UFCB]{locfill}{pgfshortenend=#1,pgfshortenstart=#1}}%
+
+\define at key[UFCB]{glofill}{pgfshorten}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfshorten=#1}}%
+
+\define at key[UFCB]{locfill}{text}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@curtext{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@curtext{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{text}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,text={#1}}}%
+
+\define at key[UFCB]{locfill}{pgftext}{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{\def\board at pgf@curtext{#1}}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{\def\board at pgf@curtext{#1}}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{pgftext}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgftext={#1}}}%
+
+\define at key[UFCB]{locfill}{addpgf}[\end{pgfscope}\begin{pgfscope}]{% D
+ \ifUFCB at locfill@usemarkpgf
+  \board at pgf@addmarkground{#1}%
+ \fi
+ \ifUFCB at locfill@usebackpgf
+  \board at pgf@addbackground{#1}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{addpgf}[\end{pgfscope}\begin{pgfscope}]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,addpgf={#1}}}%
+
+\define at key[UFCB]{locfill}{markstyle}{% D
+  \board at do@savemarkstyle#1ARGEND}%
+
+\define at key[UFCB]{glofill}{markstyle}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markstyle=#1}}%
+
+\define at key[UFCB]{locfill}{backstyle}{% D
+  \board at do@savebackstyle#1ARGEND}%
+
+\define at key[UFCB]{glofill}{backstyle}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backstyle=#1}}%
+
+\define at key[UFCB]{locfill}{pgfstyle}{% D
+  \expandafter\board at do@savemarkstyle#1ARGEND% change 15.08.2007
+  \expandafter\board at do@savebackstyle#1ARGEND}% changed 15.08.2007
+
+
+
+\define at key[UFCB]{glofill}{pgfstyle}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,pgfstyle=#1}}%
+
+%%% fields marks
+
+\define at key[UFCB]{locfill}{markarea}{% D
+  \edef\board at temp@list{#1}%
+   \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at pgf@add at fieldmarkstyletoarea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{markarea}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markarea=#1}}%
+
+\define at key[UFCB]{locfill}{backarea}{% D
+ \edef\board at temp@list{#1}%
+ \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at pgf@add at fieldbackstyletoarea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{backarea}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,backarea={#1}}}%
+
+\define at key[UFCB]{locfill}{markareas}{% D
+ \edef\board at temp@list{#1}%
+ \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at pgf@add at fieldmarkstyletoarea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{markareas}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markareas={#1}}}%
+
+\define at key[UFCB]{locfill}{backareas}{% D
+ \edef\board at temp@list{#1}%
+ \@for\board at temp@curarea:=\board at temp@list\do
+  {\board at pgf@add at fieldbackstyletoarea{\board at temp@curarea}}}%
+
+\define at key[UFCB]{glofill}{backareas}{%
+  \board at do@l at addto@macro\board at val@savedkeylist{,backareas={#1}}}%
+
+\define at key[UFCB]{locfill}{markfield}{% #1=list of fields D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{markarea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{markfield}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markfield={#1}}}%
+
+\define at key[UFCB]{locfill}{backfield}{% #1=list of fields D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{backarea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{backfield}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backfield={#1}}}%
+
+\define at key[UFCB]{locfill}{markfields}{% #1=list of fields D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{markarea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{markfields}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markfields={#1}}}%
+
+\define at key[UFCB]{locfill}{backfields}{% #1=list of fields D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{backarea=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{backfields}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backfields={#1}}}%
+
+\define at key[UFCB]{locfill}{markboard}[true]{% D
+  \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
+  \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
+  \board at do@setsinglekeys*[UFCB]{locfill}{markarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{markboard}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markboard=#1}}%
+
+\define at key[UFCB]{locfill}{backboard}[true]{% D
+  \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
+  \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
+  \board at do@setsinglekeys*[UFCB]{locfill}{backarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{backboard}[true]{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backboard=#1}}%
+
+\define at key[UFCB]{locfill}{markrank}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{markrank}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markrank={#1}}}%
+
+\define at key[UFCB]{locfill}{backrank}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{backrank}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backrank={#1}}}%
+
+\define at key[UFCB]{locfill}{markranks}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{markranks}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markranks={#1}}}%
+
+\define at key[UFCB]{locfill}{backranks}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{backranks}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backranks={#1}}}%
+
+\define at key[UFCB]{locfill}{markfile}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{markfile}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markfile={#1}}}%
+
+\define at key[UFCB]{locfill}{backfile}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{backfile}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backfile={#1}}}%
+
+\define at key[UFCB]{locfill}{markfiles}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     markarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{markfiles}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,markfiles={#1}}}%
+
+\define at key[UFCB]{locfill}{backfiles}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+     backarea=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{backfiles}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,backfiles={#1}}}%
+
+%%% region marks
+
+\define at key[UFCB]{locfill}{markregion}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at regionmarkstyle\board at temp%{a}{b}%
+     }}%
+
+\define at key[UFCB]{glofill}{markregion}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,markregion={#1}}}%
+
+\define at key[UFCB]{locfill}{backregion}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at regionbackstyle\board at temp%{a}{b}%
+     }}%
+
+\define at key[UFCB]{glofill}{backregion}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,backregion={#1}}}%
+
+\define at key[UFCB]{locfill}{markregions}{% D
+   \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at regionmarkstyle\board at temp%{a}{b}%
+     }}%
+
+\define at key[UFCB]{glofill}{markregions}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,markregions={#1}}}%
+
+\define at key[UFCB]{locfill}{backregions}{% D
+    \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@areasort\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at regionbackstyle\board at temp%{a}{b}%
+     }}%
+
+\define at key[UFCB]{glofill}{backregions}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,backregions={#1}}}%
+
+%%% move marks
+
+\define at key[UFCB]{locfill}{markmove}{% D
+    \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@area\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at movemarkstyle\board at temp}}%
+
+\define at key[UFCB]{glofill}{markmove}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,markmove={#1}}}%
+
+\define at key[UFCB]{locfill}{backmove}{% D
+   \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@area\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at movebackstyle\board at temp}}%
+
+\define at key[UFCB]{glofill}{backmove}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,backmove={#1}}}%
+
+\define at key[UFCB]{locfill}{markmoves}{% D
+    \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@area\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at movemarkstyle\board at temp}}%
+
+\define at key[UFCB]{glofill}{markmoves}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,markmoves={#1}}}%
+
+\define at key[UFCB]{locfill}{backmoves}{% D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curarea:=\board at temp@list\do
+    {\expandafter\board at split@area\board at temp@curarea ARGEND%
+     \edef\board at temp{{\board at temp@curstartfield}{\board at temp@curstopfield}}%
+     \expandafter\board at pgf@add at movebackstyle\board at temp}}%
+
+\define at key[UFCB]{glofill}{backmoves}{% D
+    \board at do@l at addto@macro\board at val@savedkeylist{,backmoves={#1}}}%
+
+%% obsolete keys, shortcuts
+
+%% obsolete key,
+\define at choicekey[UFCB]{locfill}{applycolor}[\@tempval\@tempnr]{all,none,white,black}{% D
+ \ifcase\@tempnr\relax
+  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=false}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{useonwhite=false,useonblack=false}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=white}%
+ \or
+  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=black}%
+ \fi}%
+
+\define at key[UFCB]{glofill}{applycolor}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,applycolor=#1}}%
+
+\define at key[UFCB]{locfill}{colorbackarea}{% D
+  \board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=#1}}%
+
+\define at key[UFCB]{glofill}{colorbackarea}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackarea=#1}}%
+
+\define at key[UFCB]{locfill}{colorbackareas}{% D
+ \let\board at pgf@savebackstyle\board at pgf@curbackstyle
+ \board at do@setsinglekeys*[UFCB]{locfill}{backstyle=color,backareas=#1,backstyle=\board at pgf@savebackstyle}}%
+
+\define at key[UFCB]{glofill}{colorbackareas}{% D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackareas={#1}}}%
+
+\define at key[UFCB]{locfill}{colorbackboard}[true]{%D
+   \edef\board at temp@curstartfield{\board at val@minfilechar\board at val@maxranknum}%
+   \edef\board at temp@curstopfield{\board at val@maxfilechar\board at val@minranknum}%
+   \board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{colorbackboard}[true]{%D
+   \board at do@l at addto@macro\board at val@savedkeylist{,colorbackboard=#1}}%
+
+\define at key[UFCB]{locfill}{colorboard}[true]{%D
+   \edef\board at temp@curstartfield{\board at val@startprintfilechar\board at val@startprintranknum}%
+   \edef\board at temp@curstopfield{\board at val@stopprintfilechar\board at val@stopprintranknum}%
+   \board at do@setsinglekeys*[UFCB]{locfill}{colorbackarea=\board at temp@curstartfield-\board at temp@curstopfield}}%
+
+\define at key[UFCB]{glofill}{colorboard}[true]{%D
+   \board at do@l at addto@macro\board at val@savedkeylist{,colorboard=#1}}%
+
+\define at key[UFCB]{locfill}{colorbackranks}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@currank:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at val@minfilechar\board at temp@currank}%
+    \edef\board at temp@curstopfield{\board at val@maxfilechar\board at temp@currank}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      colorbackareas=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{colorbackranks}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackranks={#1}}}%
+
+\define at key[UFCB]{locfill}{colorbackrank}{% D
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      colorbackranks=#1}}%
+
+\define at key[UFCB]{glofill}{colorbackrank}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackrank={#1}}}%
+
+\define at key[UFCB]{locfill}{colorbackfiles}{%D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfile:=\board at temp@list\do
+   {\edef\board at temp@curstartfield{\board at temp@curfile\board at val@maxranknum}%
+    \edef\board at temp@curstopfield{\board at temp@curfile\board at val@minranknum}%
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      colorbackareas=\board at temp@curstartfield-\board at temp@curstopfield}}}%
+
+\define at key[UFCB]{glofill}{colorbackfiles}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfiles={#1}}}%
+
+\define at key[UFCB]{locfill}{colorbackfile}{% D
+    \board at do@setsinglekeys*[UFCB]{locfill}{%
+      colorbackfiles=#1}}%
+
+\define at key[UFCB]{glofill}{colorbackfile}{%D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfile={#1}}}%
+
+\define at key[UFCB]{locfill}{colorbackfields}{% #1=list of fields %D
+  \edef\board at temp@list{#1}%
+  \@for\board at temp@curfield:=\board at temp@list\do
+    {\board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=\board at temp@curfield-\board at temp@curfield}}}%
+
+\define at key[UFCB]{glofill}{colorbackfields}{% %D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfields={#1}}}%
+
+\define at key[UFCB]{locfill}{colorbackfield}{% %D
+  \board at do@setsinglekeys*[UFCB]{locfill}{colorbackareas=#1-#1}}%
+
+\define at key[UFCB]{glofill}{colorbackfield}{% %D
+  \board at do@l at addto@macro\board at val@savedkeylist{,colorbackfield=#1}}%
+
+\define at key[UFCB]{locfill}{colorwhitebackfields}[true]{%
+ \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
+ \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=white, colorbackboard}%
+ \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
+
+\define at key[UFCB]{glofill}{colorwhitebackfields}[true]{% %D
+    \board at do@l at addto@macro\board at val@savedkeylist{,colorwhitefields=#1}}%
+
+\define at key[UFCB]{locfill}{colorblackbackfields}[true]{%
+  \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
+  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=black, colorbackboard}%
+  \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
+
+\define at key[UFCB]{glofill}{colorblackbackfields}[true]{% %D
+    \board at do@l at addto@macro\board at val@savedkeylist{,colorblackfields=#1}}%
+
+%%obsolete
+\define at key[UFCB]{locfill}{colorblackfields}[true]{%
+  \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
+  \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=black, colorbackboard}%
+  \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
+
+\define at key[UFCB]{glofill}{colorblackfields}[true]{% %D
+    \board at do@l at addto@macro\board at val@savedkeylist{,colorblackfields=#1}}%
+
+%% obsolete
+\define at key[UFCB]{locfill}{colorwhitefields}[true]{%
+ \let\board at pgf@savetrimtocolor\board at pgf@curtrimtocolor%
+ \board at do@setsinglekeys*[UFCB]{locfill}{trimtocolor=white, colorbackboard}%
+ \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savetrimtocolor}{trimtocolor}}%
+
+\define at key[UFCB]{glofill}{colorwhitefields}[true]{% %D
+    \board at do@l at addto@macro\board at val@savedkeylist{,colorwhitefields=#1}}%
+
+%% to add background border
+
+\define at key[UFCB]{locfill}{pgfborder}[\printarea]{%
+ \edef\board at pgf@savebackstyle{\board at pgf@curbackstyle}%
+ \board at do@setsinglekeys*[UFCB]{locfill}{%
+   backstyle=border,backregions=#1}%
+  \expandafter\board at do@setsavedkey\expandafter{\board at pgf@savebackstyle}{backstyle}}%
+
+\define at key[UFCB]{glofill}{pgfborder}[\printarea]{% %D
+    \board at do@l at addto@macro\board at val@savedkeylist{,pgfborder=#1}}%
+
+
+%</chessboard-keys-pgf>


Property changes on: trunk/Master/texmf-dist/source/latex/chessboard/chessboard.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/chessboard/chessboard.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/chessboard/chessboard.ins	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/source/latex/chessboard/chessboard.ins	2019-06-24 21:06:01 UTC (rev 51445)
@@ -9,7 +9,7 @@
 %%  but WITHOUT ANY WARRANTY; without even the implied warranty of
 %%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 %%
-%% Copyright 2006-2014 Ulrike Fischer (chess at nililand.de)
+%% Copyright 2006-2019 Ulrike Fischer (chess at nililand.de)
 %% -------------------------------------------
 %
 %
@@ -49,7 +49,7 @@
 \declarepreamble\UFpreamble
 
 chessboard: a package to print chessboards
-Copyright 2006-2014 Ulrike Fischer (chess at nililand.de)
+Copyright 2006-2019 Ulrike Fischer (chess at nililand.de)
 -------------------------------------------
 
 This file can be redistributed and/or modified under the terms of
@@ -63,11 +63,11 @@
 %% File generation:
 \generate{%
  \usepreamble\UFpreamble
- \file{chessboard.sty}{\from{chessboard-src.dtx}{chessboard}}
- \file{chessboard-pgf.sty}{\from{chessboard-src.dtx}{chessboard-pgf}}
- \file{chessboard-keys-main.sty}{\from{chessboard-src.dtx}{chessboard-keys-main}}
- \file{chessboard-keys-pgf.sty}{\from{chessboard-src.dtx}{chessboard-keys-pgf}}
+ \file{chessboard.sty}{\from{chessboard.dtx}{chessboard}}
+ \file{chessboard-pgf.sty}{\from{chessboard.dtx}{chessboard-pgf}}
+ \file{chessboard-keys-main.sty}{\from{chessboard.dtx}{chessboard-keys-main}}
+ \file{chessboard-keys-pgf.sty}{\from{chessboard.dtx}{chessboard-keys-pgf}}
 }
 \endbatchfile
 %%
-%%end of file chessboard.ins
\ No newline at end of file
+%%end of file chessboard.ins

Added: trunk/Master/texmf-dist/tex/latex/chessboard/UF-chessboard-documentation.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chessboard/UF-chessboard-documentation.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/UF-chessboard-documentation.sty	2019-06-24 21:06:01 UTC (rev 51445)
@@ -0,0 +1,220 @@
+\ProvidesFile{UF-xskak-documentation.sty}[2008/01/09 local style for documentations]
+\DeclareOption{codemargin}{\AtEndOfPackage{%
+    \advance\oddsidemargin by 0.5in\relax
+    \advance\marginparwidth by 1in\relax}}
+\ProcessOptions
+\newcommand\filetype[1]     {\upshape\texttt{#1}} %e.g. \filetype{.pdf}
+\newcommand\programm[1]     {\upshape\textsf{#1}} %e.g. \programm{afm2tfm}
+\newcommand\chessfontname[1]{\upshape\textsf{#1}} %e.g. chessfontname{maya}
+\newcommand\konzept[1]      {\upshape\textsf{#1}} %e.g. \konzept{nfss}
+\newcommand\packagename[1]  {\upshape\textsf{#1}}
+
+\newcommand\skaksty{the  package \packagename{skak}\xspace}
+\newcommand\Skaksty{The  package \packagename{skak}\xspace}
+
+\newcommand\xskak{the  package \packagename{xskak}\xspace}
+\newcommand\Xskak{The  package \packagename{xskak}\xspace}
+
+\newcommand\chessfss{the package \packagename{chessfss}\xspace}
+\newcommand\Chessfss{The package \packagename{chessfss}\xspace}
+
+\newcommand\pchessboard{the package \packagename{chessboard}\xspace}
+\newcommand\Pchessboard{The package \packagename{chessboard}\xspace}
+
+
+\newcommand\mynobreakpar{\par\nobreak\@afterheading}
+\newcommand\key[1]{\texttt{#1}}
+\newcommand\obsoletekey[1]{\key{#1}\index{#1 (obsolete)}}
+\providecommand\gobble[1]{}
+\newcommand\keyoarg{\oarg{key=value list}}
+\newcommand\keymarg{\marg{key=value list}}
+\newcommand\keylist{\textit{key=value list}\xspace}
+\newcommand\keylists{\textit{key=value lists}\xspace}
+\newcommand\keyvalue{\textit{key=value}\xspace}
+
+\AtBeginDocument{%
+  \renewcommand*\lstlistlistingname{Examples}
+  \renewcommand*\lstlistingname{Example}
+}
+
+%
+\setcounter{secnumdepth}{4}
+\renewcommand{\theparagraph}{\alph{paragraph})}
+
+
+%% standard needed packages
+\RequirePackage[english]{babel}
+\RequirePackage{microtype}
+
+\RequirePackage{array}
+\RequirePackage{booktabs}
+\RequirePackage{xspace}
+\RequirePackage{ifluatex}
+
+%% fonts
+\ifluatex
+\else
+\RequirePackage[scaled=0.85]{luximono}
+\RequirePackage{fourier}
+\RequirePackage[scaled=0.86]{helvet}
+\fi
+%\addtokomafont{sectioning}{\rmfamily}
+\renewcommand*\descfont{\rmfamily\bfseries}
+
+%% colors
+\RequirePackage{xcolor}
+\colorlet{hellgelb}{yellow!15}
+
+
+% Quotes
+\RequirePackage[babel]{csquotes}
+\MakeAutoQuote {«}{»}
+
+
+%% index
+\RequirePackage{makeidx}
+\makeindex % number of columns set after doc
+
+\begin{filecontents}{\jobname.mst}
+actual '='
+quote '!'
+level '>'
+preamble
+"\n \\begin{theindex} \n \\makeatletter\\scan at allowedfalse\n"
+postamble
+"\n\n \\end{theindex}\n"
+item_x1   "\\efill \n \\subitem "
+item_x2   "\\efill \n \\subsubitem "
+delim_0   "\\pfill "
+delim_1   "\\pfill "
+delim_2   "\\pfill "
+% The next lines will produce some warnings when
+% running Makeindex as they try to cover two different
+% versions of the program:
+lethead_prefix   "{\\bfseries\\hfil "
+lethead_suffix   "\\hfil}\\nopagebreak\n"
+lethead_flag       1
+heading_prefix   "{\\bfseries\\hfil "
+heading_suffix   "\\hfil}\\nopagebreak\n"
+headings_flag       1
+%%
+%%
+\end{filecontents}
+
+
+%% codes and examples
+\begin{filecontents}{UFlstlocal.cfg}
+\ProvidesFile{UFlstlocal.cfg}[2005/07/01 lokale Listingsdefinitionen (UF)]
+
+\RequirePackage{xcolor}
+
+
+\colorlet{UFkeyscolor}{black}
+\colorlet{UFidentifiercolor}{black}
+\colorlet{UFcommentscolor}{red}
+\colorlet{UFstringcolor}{green!50}
+\colorlet{UFbackgroundcolor}{yellow!10}
+
+\lstdefinestyle{inline}{%
+    basicstyle=\ttfamily,
+    keywordstyle={}}
+
+
+\lstdefinestyle{UFdocu}{% mehr oder weniger kopiert aus showexpl.cfg
+     language=[LaTeX]TeX,%
+     float=hbp,%
+     basicstyle=\ttfamily,%
+     identifierstyle=\color{UFidentifiercolor},%
+     keywordstyle=\color{UFkeyscolor},%
+     stringstyle=\color{UFstringcolor},%
+     commentstyle=\itshape,%
+     columns=flexible,%
+     tabsize=4,%
+     frame=single,%
+     extendedchars=true,%
+     showspaces=false,%
+     showstringspaces=false,%
+     numbers=none,%
+     %numberstyle=\tiny\ttfamily,%
+     breaklines=true,%
+     breakindent=10pt,%
+     backgroundcolor=\color{UFbackgroundcolor},%
+     breakautoindent=true,%
+     captionpos=t,%
+     xleftmargin=1em,%
+     xrightmargin=\fboxsep,%
+     %numbersep=1em,%
+     breakatwhitespace=true,
+     preset=\raggedright\setlength{\parskip}{1ex},%
+     explpreset={numbers=none, basicstyle=\footnotesize\ttfamily},% ueberschreibt default
+     rframe={},% code ist im Rahmen
+     varwidth=true,% Breite des Beispiels
+     pos=o,
+     overhang=4em,%
+     literate={ü}{{\"u}}1{ö}{{\"o}}1{ä}{{\"a}}1
+}
+
+\lstdefinestyle{inline}{%
+    basicstyle=\ttfamily,
+    keywordstyle={}}
+
+\newcommand\mylstinline{\lstinline[style=inline]}
+
+\endinput
+%%
+%% End of file `UFlstlocal.cfg'.
+\end{filecontents}
+
+\RequirePackage[final]{showexpl}
+\input{UFlstlocal.cfg}
+\lstset{style=UFdocu}
+
+\newcommand\UFleftexamples{%
+\let\OriisSX at odd\isSX at odd
+\renewcommand*{\isSX at odd}[2]{##2}}
+
+\UFleftexamples
+
+\RequirePackage{doc}
+\def\meta at font@select{\rmfamily\itshape}
+\c at IndexColumns = 2
+\renewcommand\MacroFont{\scriptsize\ttfamily}
+\renewcommand\encapchar{ -- }
+% from ltxdoc.sty
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+\providecommand\marg[1]{%
+  {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+\providecommand\oarg[1]{%
+  {\ttfamily[}\meta{#1}{\ttfamily]}}
+\providecommand\parg[1]{%
+  {\ttfamily(}\meta{#1}{\ttfamily)}}
+
+
+%% pagestyle and layout
+\providecommand\UFcurrentpackage{unknown}
+\providecommand\UFcurrentversion{version unknown}
+
+\reversemarginpar
+
+\RequirePackage{fancyhdr}
+\pagestyle{fancy}
+
+\renewcommand\headrulewidth{0pt}
+\fancyhf{}
+\cfoot{\thepage}
+\lfoot{\today}
+\rfoot{\packagename{\UFcurrentpackage} \UFcurrentversion}
+
+
+%% captions
+\RequirePackage[tableposition=top]{caption}
+\captionsetup{singlelinecheck=false,format=hang,belowskip=1em}
+
+
+
+%% pdf-goodies:
+\RequirePackage{animate}
+\RequirePackage[colorlinks=true, %options are passed to hyperref
+               linkcolor=black,
+               hyperindex=true% true clashes with doc.sty
+               ]{attachfile}


Property changes on: trunk/Master/texmf-dist/tex/latex/chessboard/UF-chessboard-documentation.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty	2019-06-24 21:06:01 UTC (rev 51445)
@@ -4,10 +4,10 @@
 %%
 %% The original source files were:
 %%
-%% chessboard-src.dtx  (with options: `chessboard-keys-main')
+%% chessboard.dtx  (with options: `chessboard-keys-main')
 %% 
 %% chessboard: a package to print chessboards
-%% Copyright 2006-2014 Ulrike Fischer (chess at nililand.de)
+%% Copyright 2006-2019 Ulrike Fischer (chess at nililand.de)
 %% -------------------------------------------
 %% 
 %% This file can be redistributed and/or modified under the terms of
@@ -16,7 +16,7 @@
 %% License, or (at your option) any later version.
 %% 
 %% For error reports see documentation.
-\ProvidesFile{chessboard-keys-main.sty}[2014/05/01 version v1.7 key definitions for chessboard.sty]
+\ProvidesFile{chessboard-keys-main.sty}[2019/06/23 version v1.8 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	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-keys-pgf.sty	2019-06-24 21:06:01 UTC (rev 51445)
@@ -4,10 +4,10 @@
 %%
 %% The original source files were:
 %%
-%% chessboard-src.dtx  (with options: `chessboard-keys-pgf')
+%% chessboard.dtx  (with options: `chessboard-keys-pgf')
 %% 
 %% chessboard: a package to print chessboards
-%% Copyright 2006-2014 Ulrike Fischer (chess at nililand.de)
+%% Copyright 2006-2019 Ulrike Fischer (chess at nililand.de)
 %% -------------------------------------------
 %% 
 %% This file can be redistributed and/or modified under the terms of
@@ -16,7 +16,7 @@
 %% License, or (at your option) any later version.
 %% 
 %% For error reports see documentation.
-\ProvidesFile{chessboard-keys-pgf.sty}[2014/05/01 version v1.7 key definitions for chessboard.sty]
+\ProvidesFile{chessboard-keys-pgf.sty}[2019/06/23 version v1.8 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	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard-pgf.sty	2019-06-24 21:06:01 UTC (rev 51445)
@@ -4,10 +4,10 @@
 %%
 %% The original source files were:
 %%
-%% chessboard-src.dtx  (with options: `chessboard-pgf')
+%% chessboard.dtx  (with options: `chessboard-pgf')
 %% 
 %% chessboard: a package to print chessboards
-%% Copyright 2006-2014 Ulrike Fischer (chess at nililand.de)
+%% Copyright 2006-2019 Ulrike Fischer (chess at nililand.de)
 %% -------------------------------------------
 %% 
 %% This file can be redistributed and/or modified under the terms of
@@ -16,7 +16,7 @@
 %% License, or (at your option) any later version.
 %% 
 %% For error reports see documentation.
-\ProvidesFile{chessboard-pgf.sty}[2014/05/01 version v1.7 pgf code for chessboard.sty]
+\ProvidesFile{chessboard-pgf.sty}[2019/06/23 version v1.8 pgf code for chessboard.sty]
 %%$Date: 2011/01/11 14:07:20 $$Version: 3d9f59c743f1 $
 
 \newcommand\board at pgf@extrabackground{}%
@@ -90,7 +90,7 @@
   {\setcounter{cnt at board@rank}{0}%
    \whiledo %nodes for on one field for each rank
     {\value{cnt at board@rank}<\numexpr\board at val@maxranknum+1\relax}%
-    {\edef\board at temp{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
+    {\edef\board at temp{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
      \expandafter\board at pgf@addnode\expandafter{\board at temp}{#1}%
      \expandafter\board at do@l at addto@macro\csname board at pgf@#1ground\endcsname{%
        \pgftransformshift{\pgfpointxy{0}{1}}}%
@@ -204,7 +204,7 @@
   {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
    \whiledo
     {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
+    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
      \expandafter\board at pgf@addpgftofield\expandafter{\board at temp@curfield}{mark}%
      \addtocounter{cnt at board@file}{1}}%
    \addtocounter{cnt at board@rank}{-1}}}%
@@ -222,7 +222,7 @@
   {\setcounter{cnt at board@file}{\board at temp@curstartfilenum}%
    \whiledo
     {\value{cnt at board@file}<\numexpr \board at temp@curstopfilenum+1\relax}%
-    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
+    {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
      \expandafter\board at pgf@addpgftofield\expandafter{\board at temp@curfield}{back}%
      \addtocounter{cnt at board@file}{1}}%
    \addtocounter{cnt at board@rank}{-1}}}%

Modified: trunk/Master/texmf-dist/tex/latex/chessboard/chessboard.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chessboard/chessboard.sty	2019-06-24 21:05:25 UTC (rev 51444)
+++ trunk/Master/texmf-dist/tex/latex/chessboard/chessboard.sty	2019-06-24 21:06:01 UTC (rev 51445)
@@ -4,10 +4,10 @@
 %%
 %% The original source files were:
 %%
-%% chessboard-src.dtx  (with options: `chessboard')
+%% chessboard.dtx  (with options: `chessboard')
 %% 
 %% chessboard: a package to print chessboards
-%% Copyright 2006-2014 Ulrike Fischer (chess at nililand.de)
+%% Copyright 2006-2019 Ulrike Fischer (chess at nililand.de)
 %% -------------------------------------------
 %% 
 %% This file can be redistributed and/or modified under the terms of
@@ -17,7 +17,7 @@
 %% 
 %% For error reports see documentation.
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{chessboard}[2014/05/01 version v1.7 print chessboards]
+\ProvidesPackage{chessboard}[2019/06/23 version v1.8 print chessboards]
 %%$Date: 2011/03/23 08:42:57 $$Version: 66142533647c $
 
 \DeclareOption{skaknew}{}%
@@ -46,7 +46,7 @@
 \ifpdf\else
 \RequirePackage{pst-node}%
 \fi
-
+\RequirePackage{etoolbox}
 %%%%%%%
 %% naming conventions
 %%%%%%%
@@ -304,13 +304,13 @@
        {\isodd{\value{cnt at board}}}
        {\ifthenelse%
          {\equal{\board at val@whitefieldlist}{}}%
-         {\edef\board at val@whitefieldlist{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}}%
-         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
+         {\edef\board at val@whitefieldlist{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}}%
+         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
           \expandafter\board at do@l at addto@macro\expandafter\board at val@whitefieldlist\expandafter{\expandafter,\board at temp@curfield}}}%
        {\ifthenelse%
          {\equal{\board at val@blackfieldlist}{}}%
-         {\edef\board at val@blackfieldlist{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}}%
-         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\arabic{cnt at board@rank}}%
+         {\edef\board at val@blackfieldlist{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}}%
+         {\edef\board at temp@curfield{\zeroalph{cnt at board@file}\number\value{cnt at board@rank}}%
           \expandafter\board at do@l at addto@macro\expandafter\board at val@blackfieldlist\expandafter{\expandafter,\board at temp@curfield}}}%
       \addtocounter{cnt at board@rank}{1}}%
     \addtocounter{cnt at board@file}{1}}}%
@@ -695,7 +695,7 @@
        {\value{cnt at board}>0}%
        {\edef\board at temp@currankposition{%
           \board at temp@currankposition
-          \arabic{cnt at board}%
+          \number\value{cnt at board}%
           \csname board at val@f\the\c at cnt@board at file r\the\c at cnt@board at rank @piecechar\endcsname}%
         \setcounter{cnt at board}{0}}%
        {\edef\board at temp@currankposition{%
@@ -706,7 +706,7 @@
    {\value{cnt at board}>0}%
    {\edef\board at temp@currankposition{%
       \board at temp@currankposition
-      \arabic{cnt at board}}}%
+      \number\value{cnt at board}}}%
    {}}%
 
 %% stores the fen in chessgame.<name> (as in skak.sty the \storegame command
@@ -1361,10 +1361,16 @@
 \newcommand\board at skak@piececharlist{K,Q,R,B,N,P,k,q,r,b,n,p}%
 \newcommand\board at skak@whitepiececharlist{K,Q,R,B,N,P}%
 \newcommand\board at skak@blackpiececharlist{k,q,r,b,n,p}%
-
 \AtBeginDocument{%
  \@ifpackageloaded{skak}%
-   {\def\board at skak@do at fencalculate{%
+   {%patch skak, see issue #1
+    \patchcmd\Fen at handleA{\arabic}{\number\value}{}{}%
+    \patchcmd\Fen at handleA{\arabic}{\number\value}{}{}%
+    \patchcmd\Fen at handleA{\thehelpgobble}{\c at helpgobble}{}{}%
+    \patchcmd\Fen at handleA{\thehelpgobble}{\c at helpgobble}{}{}%
+    \patchcmd\Fen at calculate{\arabic}{\number\value}{}{}%
+    \patchcmd\Fen at calculate{\arabic}{\number\value}{}{}%
+    \def\board at skak@do at fencalculate{%
      \Fen at calculate
      \let\board at val@fencalculate\temp at board}%
     \def\board at skak@set at special@psmarkers#1#2{%
@@ -1372,8 +1378,8 @@
      \setcounter{fileFrom}{\value{fileTo}}%
      \setcounter{rankFrom}{\value{rankTo}}%
      \get at translation#2%
-     \rput(BM){\pnode(-\arabic{fileFrom},\arabic{rankFrom}){From}}%
-     \rput(BM){\pnode(-\arabic{fileTo},\arabic{rankTo}){To}}}}%
+     \rput(BM){\pnode(-\number\value{fileFrom},\number\value{rankFrom}){From}}%
+     \rput(BM){\pnode(-\number\value{fileTo},\number\value{rankTo}){To}}}}%
    {\def\board at skak@do at fencalculate{%
      \def\board at val@fencalculate{8/8/8/8/8/8/8/8}}}}%
 



More information about the tex-live-commits mailing list