summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chessfss/lsb1enc.def
blob: 17f345cd4cd25f48cae1308df82d01dc4f08bda4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
%%
%% This is file `lsb1enc.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% chessfss-src.dtx  (with options: `lsb1enc')
%% 
%% 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.
%%
%% LSB1: 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 two characters:
%% as field-Layer: pieceOnBlack and as piece-layer: pieceOnWhite.
%% The solid fieldmask layer and the piecemask layer are not used.
%% The encoding (only) works with fonts that can also be encoded as LSB.
%% It will not give a professional looking result!
%% It will not work well if the pieceOnWhite don't cover the pieceOnBlack exactly.

\ProvidesFile{lsb1enc.def}
 [2006/06/09 v1.1
         Standard LaTeX file]

\DeclareFontEncoding{LSB1}{}{}
\DeclareFontSubstitution{LSB1}{skaknew}{m}{n}

\providecommand\cfss@whitefieldcolor{}
\providecommand\cfss@blackfieldcolor{}
\providecommand\cfss@whitepiececolor{}
\providecommand\cfss@blackpiececolor{}

\providecommand\cfss@composefpcolorchar[4]{%range layer: f, p
  \makebox[0pt][l]{%
    \csname cfss@#1fieldcolor\endcsname#2}%
  {\csname cfss@#3piececolor\endcsname#4}}%

\@namedef{cfss@showboardencodingLSB1}{%
\begin{tabular}{llllll}
\multicolumn{6}{l}{\bfseries Encoding \ttfamily LSB1}\\[0.5ex]
 Layer:       & fieldmask
              & field
              & piecemask
              & piece
              & result\\
 WhiteSquare  &
              &\boardfont\cfss@whitefieldcolor 0
              &
              &
              &\boardfont\cfss@WhiteEmptySquare\\
 BlackSquare  &
              &\boardfont\cfss@blackfieldcolor Z
              &
              &
              &\boardfont\cfss@BlackEmptySquare\\
 WhiteOnWhite &
              &
              &
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnWhite\\
 WhiteOnBlack &
              &\boardfont\cfss@blackfieldcolor J
              &
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnBlack\\
 BlackOnWhite &
              &
              &
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnWhite\\
 BlackOnBlack &
              &\boardfont\cfss@blackfieldcolor j
              &
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnBlack\\
\end{tabular}}

\DeclareTextCommand\cfss@WhiteEmptySquare  {LSB1}{{\cfss@whitefieldcolor 0}}
\DeclareTextCommand\cfss@BlackEmptySquare  {LSB1}{{\cfss@blackfieldcolor Z}}
\DeclareTextCommand\cfss@WhiteKingOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{white}{K}}
\DeclareTextCommand\cfss@BlackKingOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{black}{k}}
\DeclareTextCommand\cfss@WhiteKingOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{J}{white}{K}}
\DeclareTextCommand\cfss@BlackKingOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{j}{black}{k}}
\DeclareTextCommand\cfss@WhiteQueenOnWhite {LSB1}{\cfss@composefpcolorchar{white}{}{white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnWhite {LSB1}{\cfss@composefpcolorchar{white}{}{black}{q}}
\DeclareTextCommand\cfss@WhiteQueenOnBlack {LSB1}{\cfss@composefpcolorchar{black}{L}{white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnBlack {LSB1}{\cfss@composefpcolorchar{black}{l}{black}{q}}
\DeclareTextCommand\cfss@WhiteRookOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{white}{R}}
\DeclareTextCommand\cfss@BlackRookOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{black}{r}}
\DeclareTextCommand\cfss@WhiteRookOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{S}{white}{R}}
\DeclareTextCommand\cfss@BlackRookOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{s}{black}{r}}
\DeclareTextCommand\cfss@WhiteBishopOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{black}{b}}
\DeclareTextCommand\cfss@WhiteBishopOnBlack{LSB1}{\cfss@composefpcolorchar{black}{A}{white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnBlack{LSB1}{\cfss@composefpcolorchar{black}{a}{black}{b}}
\DeclareTextCommand\cfss@WhiteKnightOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{black}{n}}
\DeclareTextCommand\cfss@WhiteKnightOnBlack{LSB1}{\cfss@composefpcolorchar{black}{M}{white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnBlack{LSB1}{\cfss@composefpcolorchar{black}{m}{black}{n}}
\DeclareTextCommand\cfss@WhitePawnOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{black}{p}}
\DeclareTextCommand\cfss@WhitePawnOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{O}{white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{o}{black}{p}}

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