%%
%% This is file `lsbc3enc.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% chessfss-src.dtx  (with options: `lsbc3enc')
%% 
%% chessfss: chess font selection commands
%% Copyright 2005 Ulrike Fischer (skak@nililand.de)
%% -------------------------------------------
%% 
%% This file can be redistributed and/or modified under the terms of
%% the LaTeX Project Public License distributed from CTAN archives in
%% the directory macros/latex/base/lppl.txt; either version 1 of the
%% License, or (at your option) any later version.
%% 
%% For error reports see documentation.
%%
%% LSBC3: An encoding for chessboard chars.
%% that makes it possible to color field and the piece differently.
%% In this encoding the pieces/fields are build with a solid fieldmask,
%% a transparent fieldmask, a piecemask and pieceOnWhite chars.
%% If a color package is loaded, the piecemask will be white.
%% The encoding works with fonts that have solid fieldmasks on position 49-54,
%% transparent fieldmasks on position 149-154, piecemask on T-Y and the pieceOnWhite chars.
%% A possible free font is skaknew. (To my knowledge it is the only one with all chars)

\ProvidesFile{lsbc3enc.def}
 [2006/05/22 v1.0
         Standard LaTeX file]
\DeclareFontEncoding{LSBC3}{}{}
\DeclareFontSubstitution{LSBC3}{skaknew}{m}{n}

\AtBeginDocument{\@ifundefined{color}{%
  \def\color#1{}%
  \PackageWarning{chessfss}
   {You haven't load a color package. I will define the color command to do nothing}{}}{}}

\providecommand\cfss@whitefieldmaskcolor{\color{white}}
\providecommand\cfss@blackfieldmaskcolor{\color{gray}}
\providecommand\cfss@whitefieldcolor{}
\providecommand\cfss@blackfieldcolor{}
\providecommand\cfss@whiteonwhitepiecemaskcolor{\color{white}}
\providecommand\cfss@whiteonblackpiecemaskcolor{\color{white}}
\providecommand\cfss@blackonwhitepiecemaskcolor{\color{white}}
\providecommand\cfss@blackonblackpiecemaskcolor{\color{white}}
\providecommand\cfss@whitepiececolor{}
\providecommand\cfss@blackpiececolor{}

\providecommand\cfss@composefmfpmpcolorchar[8]{%range layer. fm, f, pm, p
  \makebox[0pt][l]{%
    \csname cfss@#1fieldmaskcolor\endcsname#2}%
  \makebox[0pt][l]{%
    \csname cfss@#3fieldcolor\endcsname#4}%
  \makebox[0pt][l]{%
    \csname cfss@#5piecemaskcolor\endcsname#6}%
  {\csname cfss@#7piececolor\endcsname#8}}%

\@namedef{cfss@showboardencodingLSBC3}{%
\begin{tabular}{llllll}
\multicolumn{6}{l}{\bfseries Encoding \ttfamily LSBC3}\\[0.5ex]
 Layer:       & fieldmask
              & field
              & piecemask
              & piece
              & result\\
 WhiteSquare  &\boardfont\cfss@whitefieldmaskcolor z
              &
              &
              &
              &\boardfont\cfss@WhiteEmptySquare\\
 BlackSquare  &\boardfont\cfss@blackfieldmaskcolor z
              &\boardfont\cfss@blackfieldcolor Z
              &
              &
              &\boardfont\cfss@BlackEmptySquare\\
 WhiteOnWhite &\boardfont\cfss@whitefieldmaskcolor 1
              &
              &\boardfont\cfss@whiteonwhitepiecemaskcolor T
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnWhite\\
 WhiteOnBlack &\boardfont\cfss@blackfieldmaskcolor 1
              &\boardfont\cfss@blackfieldcolor\symbol{149}
              &\boardfont\cfss@whiteonblackpiecemaskcolor T
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnBlack\\
 BlackOnWhite &\boardfont\cfss@whitefieldmaskcolor 1
              &
              &\boardfont\cfss@blackonwhitepiecemaskcolor T
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnWhite\\
 BlackOnBlack &\boardfont\cfss@blackfieldmaskcolor 1
              &\boardfont\cfss@blackfieldcolor\symbol{149}
              &\boardfont\cfss@blackonblackpiecemaskcolor T
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnBlack\\
\end{tabular}}

\DeclareTextCommand\cfss@WhiteEmptySquare {LSBC3}{{\cfss@whitefieldmaskcolor z}}
\DeclareTextCommand\cfss@BlackEmptySquare {LSBC3}%
  {{\makebox[0pt][l]{\cfss@blackfieldmaskcolor z}}{\cfss@blackfieldcolor Z}}
\DeclareTextCommand\cfss@WhiteKingOnWhite {LSBC3}%
    {\cfss@composefmfpmpcolorchar
      {white}{1}
      {}{}
      {whiteonwhite}{T}
      {white}{K}}
\DeclareTextCommand\cfss@BlackKingOnWhite {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {white}{1}
      {}{}
      {blackonwhite}{T}
      {black}{k}}
\DeclareTextCommand\cfss@WhiteKingOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{1}
      {black}{\symbol{149}}
      {whiteonblack}{T}
      {white}{K}}
\DeclareTextCommand\cfss@BlackKingOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{1}
      {black}{\symbol{149}}
      {blackonblack}{T}
      {black}{k}}

\DeclareTextCommand\cfss@WhiteQueenOnWhite {LSBC3}%
    {\cfss@composefmfpmpcolorchar
      {white}{5}
      {}{}
      {whiteonwhite}{X}
      {white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnWhite {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {white}{5}
      {}{}
      {blackonwhite}{X}
      {black}{q}}
\DeclareTextCommand\cfss@WhiteQueenOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{5}
      {black}{\symbol{153}}
      {whiteonblack}{X}
      {white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{5}
      {black}{\symbol{153}}
      {blackonblack}{X}
      {black}{q}}

\DeclareTextCommand\cfss@WhiteRookOnWhite {LSBC3}%
    {\cfss@composefmfpmpcolorchar
      {white}{3}
      {}{}
      {whiteonwhite}{V}
      {white}{R}}
\DeclareTextCommand\cfss@BlackRookOnWhite {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {white}{3}
      {}{}
      {blackonwhite}{V}
      {black}{r}}
\DeclareTextCommand\cfss@WhiteRookOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{3}
      {black}{\symbol{151}}
      {whiteonblack}{V}
      {white}{R}}
\DeclareTextCommand\cfss@BlackRookOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{3}
      {black}{\symbol{151}}
      {blackonblack}{V}
      {black}{r}}

\DeclareTextCommand\cfss@WhiteBishopOnWhite {LSBC3}
    {\cfss@composefmfpmpcolorchar
      {white}{4}
      {}{}
      {whiteonwhite}{W}
      {white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnWhite {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {white}{4}
      {}{}
      {blackonwhite}{W}
      {black}{b}}
\DeclareTextCommand\cfss@WhiteBishopOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{4}
      {black}{\symbol{152}}
      {whiteonblack}{W}
      {white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{4}
      {black}{\symbol{152}}
      {blackonblack}{W}
      {black}{b}}

\DeclareTextCommand\cfss@WhiteKnightOnWhite {LSBC3}
    {\cfss@composefmfpmpcolorchar
      {white}{2}
      {}{}
      {whiteonwhite}{U}
      {white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnWhite {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {white}{2}
      {}{}
      {blackonwhite}{U}
      {black}{n}}
\DeclareTextCommand\cfss@WhiteKnightOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{2}
      {black}{\symbol{150}}
      {whiteonblack}{U}
      {white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{2}
      {black}{\symbol{150}}
      {blackonblack}{U}
      {black}{n}}

\DeclareTextCommand\cfss@WhitePawnOnWhite {LSBC3}
    {\cfss@composefmfpmpcolorchar
      {white}{6}
      {}{}
      {whiteonwhite}{Y}
      {white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnWhite {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {white}{6}
      {}{}
      {blackonwhite}{Y}
      {black}{p}}
\DeclareTextCommand\cfss@WhitePawnOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{6}
      {black}{\symbol{154}}
      {whiteonblack}{Y}
      {white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnBlack {LSBC3}
   {\cfss@composefmfpmpcolorchar
      {black}{6}
      {black}{\symbol{154}}
      {blackonblack}{Y}
      {black}{p}}

\endinput
%%
%% End of file `lsbc3enc.def'.
