%%
%% This is file `lsbc5enc.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% chessfss-src.dtx  (with options: `lsbc5enc')
%% 
%% 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.
%% LSBC5: 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
%% the piecemask and the pieceOnWhite. The fields must get color through
%% the background.
%% If a color package is loaded, the piecemask will be white.
%% The solid fieldmask and the field layers are not used.
%% The encoding works with fonts that have
%% piecemask (on position T-Y) and the pieceOnWhite chars.
%% A possible free font is skaknew.
%% DiaTTFri.ttf (from fritz) also has the necessary characters but must be converted
%% and reencoded first.

\ProvidesFile{lsbc5enc.def}
 [2006/05/22 v1.0
         Standard LaTeX file]
\DeclareFontEncoding{LSBC5}{}{}
\DeclareFontSubstitution{LSBC5}{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@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@composepmpcolorchar[4]{%range layer.  pm, p
  \makebox[0pt][l]{% piecemasklayer
    \csname cfss@#1piecemaskcolor\endcsname#2}%
  {\csname cfss@#3piececolor\endcsname#4}}% piecelayer

\@namedef{cfss@showboardencodingLSBC5}{%
\begin{tabular}{llllll}
\multicolumn{6}{l}{\bfseries Encoding \ttfamily LSBC5}\\[0.5ex]
 Layer:       &fieldmask
              &field
              &piecemask
              &piece
              &result\\
 WhiteSquare  &
              &
              &
              &
              &\\
 BlackSquare  &
              &
              &
              &
              &\\
 WhiteOnWhite &
              &
              &\boardfont\cfss@whiteonwhitepiecemaskcolor T
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnWhite\\
 WhiteOnBlack &
              &
              &\boardfont\cfss@whiteonblackpiecemaskcolor T
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnBlack\\
 BlackOnWhite &
              &
              &\boardfont\cfss@blackonwhitepiecemaskcolor T
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnWhite\\
 BlackOnBlack &
              &
              &\boardfont\cfss@blackonblackpiecemaskcolor T
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnBlack\\
\end{tabular}}

\DeclareTextCommand\cfss@WhiteEmptySquare {LSBC5}{\phantom{Z}}
\DeclareTextCommand\cfss@BlackEmptySquare {LSBC5}{\phantom{Z}}
\DeclareTextCommand\cfss@WhiteKingOnWhite {LSBC5}
    {\cfss@composepmpcolorchar
      {whiteonwhite}{T}
      {white}{K}}
\DeclareTextCommand\cfss@BlackKingOnWhite  {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonwhite}{T}
      {black}{k}}
\DeclareTextCommand\cfss@WhiteKingOnBlack  {LSBC5}
   {\cfss@composepmpcolorchar
      {whiteonblack}{T}
      {white}{K}}
\DeclareTextCommand\cfss@BlackKingOnBlack  {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonblack}{T}
      {black}{k}}

\DeclareTextCommand\cfss@WhiteQueenOnWhite {LSBC5}
    {\cfss@composepmpcolorchar
      {whiteonwhite}{X}
      {white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnWhite {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonwhite}{X}
      {black}{q}}
\DeclareTextCommand\cfss@WhiteQueenOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {whiteonblack}{X}
      {white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonblack}{X}
      {black}{q}}

\DeclareTextCommand\cfss@WhiteRookOnWhite {LSBC5}
    {\cfss@composepmpcolorchar
      {whiteonwhite}{V}
      {white}{R}}
\DeclareTextCommand\cfss@BlackRookOnWhite {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonwhite}{V}
      {black}{r}}
\DeclareTextCommand\cfss@WhiteRookOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {whiteonblack}{V}
      {white}{R}}
\DeclareTextCommand\cfss@BlackRookOnBlack  {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonblack}{V}
      {black}{r}}

\DeclareTextCommand\cfss@WhiteBishopOnWhite {LSBC5}
    {\cfss@composepmpcolorchar
      {whiteonwhite}{W}
      {white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnWhite {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonwhite}{W}
      {black}{b}}
\DeclareTextCommand\cfss@WhiteBishopOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {whiteonblack}{W}
      {white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonblack}{W}
      {black}{b}}

\DeclareTextCommand\cfss@WhiteKnightOnWhite {LSBC5}
    {\cfss@composepmpcolorchar
      {whiteonwhite}{U}
      {white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnWhite {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonwhite}{U}
      {black}{n}}
\DeclareTextCommand\cfss@WhiteKnightOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {whiteonblack}{U}
      {white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonblack}{U}
      {black}{n}}

\DeclareTextCommand\cfss@WhitePawnOnWhite {LSBC5}
    {\cfss@composepmpcolorchar
      {whiteonwhite}{Y}
      {white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnWhite {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonwhite}{Y}
      {black}{p}}
\DeclareTextCommand\cfss@WhitePawnOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {whiteonblack}{Y}
      {white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnBlack {LSBC5}
   {\cfss@composepmpcolorchar
      {blackonblack}{Y}
      {black}{p}}

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