summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chessfss/lsbc5enc.def
blob: 90d1729f6476a8fca5a89a2464140f7d241c87db (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
%%
%% 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'.