summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chessfss/lsb2enc.def
blob: e15a72e1438fb86f507174fdb0f30a3cf5f7eec9 (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
%%
%% This is file `lsb2enc.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% chessfss-src.dtx  (with options: `lsb2enc')
%% 
%% 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.
%%
%% LSB2: An encoding for chessboard chars
%% that makes it possible to color field and the piece differently.
%% In this encoding the pieces/fields are build only with the pieceOnWhite characters.
%% Black fields must get their color through commands like \colorbox.
%% The color of the background will shine through the inner of the pieces
%% The solid fieldmask layer, the field layer and the piecemask layer are not used.
%% The encoding works with fonts that have the pieceOnWhite chars. (This should be all fonts)
%% It will not give a professional looking result because of the colored inside of the chars!

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

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

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

\providecommand\cfss@composepcolorchar[2]{%range layer: p
  {\csname cfss@#1piececolor\endcsname#2}}%

\@namedef{cfss@showboardencodingLSB2}{%
\begin{tabular}{llllll}
\multicolumn{6}{l}{\bfseries Encoding \ttfamily LSB2}\\
\multicolumn{6}{l}{fields have no color!}\\[0.5ex]
 Layer:       & fieldmask
              & field
              & piecemask
              & piece
              & result\\
 WhiteSquare  &
              &
              &
              &
              &\boardfont\cfss@WhiteEmptySquare\\
 BlackSquare  &
              &
              &
              &
              &\boardfont\cfss@BlackEmptySquare\\
 WhiteOnWhite &
              &
              &
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnWhite\\
 WhiteOnBlack &
              &
              &
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnBlack\\
 BlackOnWhite &
              &
              &
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnWhite\\
 BlackOnBlack &
              &
              &
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnBlack\\
\end{tabular}}

\DeclareTextCommand\cfss@WhiteEmptySquare  {LSB2}{\phantom{Z}}
\DeclareTextCommand\cfss@BlackEmptySquare  {LSB2}{\phantom{Z}}
\DeclareTextCommand\cfss@WhiteKingOnWhite  {LSB2}{\cfss@composepcolorchar{white}{K}}
\DeclareTextCommand\cfss@BlackKingOnWhite  {LSB2}{\cfss@composepcolorchar{black}{k}}
\DeclareTextCommand\cfss@WhiteKingOnBlack  {LSB2}{\cfss@composepcolorchar{white}{K}}
\DeclareTextCommand\cfss@BlackKingOnBlack  {LSB2}{\cfss@composepcolorchar{black}{k}}
\DeclareTextCommand\cfss@WhiteQueenOnWhite {LSB2}{\cfss@composepcolorchar{white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnWhite {LSB2}{\cfss@composepcolorchar{black}{q}}
\DeclareTextCommand\cfss@WhiteQueenOnBlack {LSB2}{\cfss@composepcolorchar{white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnBlack {LSB2}{\cfss@composepcolorchar{black}{q}}
\DeclareTextCommand\cfss@WhiteRookOnWhite  {LSB2}{\cfss@composepcolorchar{white}{R}}
\DeclareTextCommand\cfss@BlackRookOnWhite  {LSB2}{\cfss@composepcolorchar{black}{r}}
\DeclareTextCommand\cfss@WhiteRookOnBlack  {LSB2}{\cfss@composepcolorchar{white}{R}}
\DeclareTextCommand\cfss@BlackRookOnBlack  {LSB2}{\cfss@composepcolorchar{black}{r}}
\DeclareTextCommand\cfss@WhiteBishopOnWhite{LSB2}{\cfss@composepcolorchar{white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnWhite{LSB2}{\cfss@composepcolorchar{black}{b}}
\DeclareTextCommand\cfss@WhiteBishopOnBlack{LSB2}{\cfss@composepcolorchar{white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnBlack{LSB2}{\cfss@composepcolorchar{black}{b}}
\DeclareTextCommand\cfss@WhiteKnightOnWhite{LSB2}{\cfss@composepcolorchar{white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnWhite{LSB2}{\cfss@composepcolorchar{black}{n}}
\DeclareTextCommand\cfss@WhiteKnightOnBlack{LSB2}{\cfss@composepcolorchar{white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnBlack{LSB2}{\cfss@composepcolorchar{black}{n}}
\DeclareTextCommand\cfss@WhitePawnOnWhite  {LSB2}{\cfss@composepcolorchar{white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnWhite  {LSB2}{\cfss@composepcolorchar{black}{p}}
\DeclareTextCommand\cfss@WhitePawnOnBlack  {LSB2}{\cfss@composepcolorchar{white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnBlack  {LSB2}{\cfss@composepcolorchar{black}{p}}

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