notation(n) MISC. REFERENCE MANUAL PAGES notation(n) NAME

advertisement
notation(n)
MISC. REFERENCE MANUAL PAGES
notation(n)
NAME
notation - transform chess notation
SYNOPSYS
notation [input file] [-o output file] [options...]
DESCRIPTION
This program reads chess games, either full algebraic or
shortened (ie Nf1-g3 or Ng3) and is able to ouptut the board
after any move, in either ascii , postscript, nroff, latex
or xchess save format. This program is also multi-lingual:
it handles english, french, spanish, german, italian and
dutch symbols.
OPTIONS
Command line options:
-a
algebraic move notation output
-s
shortened move notation output
-f <language>
specifies the chess symbol input language. The
language
can be any of french, english, italian,
spanish, german, dutch.
-t <language>
specifies the chess symbol
options as input language.
<inputfile>
specifies the
assumed.
-o <outputfile>
specifies the
assumed.
input
output
file.
output
file.
If
language.
none,
If
keyboard
Same
none,
screen
is
is
-c <number>[,<number]
specifies the number of the moves at which
to
display the board. If none, board is displayed at
end of file. Several numbers may be specified, as a
comma-separated list.
-e <number>
display the board at the move number and then stops
Sun Release 4.0
Last change: 10 December 1990
notation(n)
MISC. REFERENCE MANUAL PAGES
1
notation(n)
-b
display only the board, not the moves
-d <drivername>
specifies the output driver. It can be any of the
following: ascii, postscript, tex, roff, gnu (xchess
save format).
-h
displays help screen
INPUT LANGUAGE
The input language has four types of input: moves,
move numbers, comments and keywords. All these are separated
by blanks, TAB or RC. Commas are not accepted.
move format:
The moves are accepted in algebraic or shortened
algebraic notation. That means that the following
are equivalent and accepted Nf1-g3 N-f1xg3, Nxg3,
Ng3. The ugly english notation P-K4 is not understood, neither by the program nor me.
Nota: provided you remove the three first line,
xchess save format is accepted. Also you can have
trailing comments to move, provided there is no
blanks. So Kg4!!, Ra5++ are correct, but not Kg4 !!,
Ra5 ++ because of the separating blank. A future
version might handle these move comments, as well as
+ ++, mate, white resigns etc... The roque is recognized with the following 0-0 O-O o-o 0-0-0 O-O-O oo-o. En-passant is accepted and promotion is not
recognized.
For example,
shortened.txt
see
the
files
algebraic.txt
and
move numbers:
move numbers are in the form 23. or 36. The full
point is optional. Move numbers are checked against
internal move counter.
comments:
anything else, except keywords, must be enclosed in
brackets or parenthesis [Here Karpov made a very
bright move ...] (this is also a comment). Comments
are skipped out. A future version might incorporte
them in the output.
Sun Release 4.0
Last change: 10 December 1990
notation(n)
MISC. REFERENCE MANUAL PAGES
2
notation(n)
keywords:
you can insert keywords in the input text to precisely define what you want: displaying the board,
configuring it... Keywords are detailled in the next
section.
KEYWORDS
All keywords are prefixed with @
@startplay
begins the play. Obligatory after a @configxxx
word.
key-
@clearboard
clears the board. Used prior to any @configxxx.
@showboard
displays the board. Can be used anywhere
@whitesmove
tells the program that is the white's turn of
Useful after a @configxxx and @startplay
play.
@blacksmove
tells the program that it is black's turn
@configwhite
initializes configuration of white side. Pieces are
then expected, in form of (optional for Pawn) name,
the position. Example @configwhite Ke3 Rg8 e4.
@configblack
initializes configuration of black side. Pieces are
then expected, in form of (optional for Pawn) name,
the position. Example: @configwhite Ke3 Rg8 e4.
Note that black pieces are given in uppercase!
@default
resets the board to the default start configuration.
@null
Null keyword. Does nothing. Used for convenience
programming.
in
See the file keywords.txt for an example of keywords
use.
NATIONAL LANGUAGES
Here are the symbols used in the
differents
Sun Release 4.0
Last change: 10 December 1990
notation(n)
MISC. REFERENCE MANUAL PAGES
languages.
()
3
notation(n)
mean optional in the input.
english-name
english
french
italian
spanish
german
dutch
King
K
R
R
R
K
K
Queen
Q
R
D
T
D
T
D
T
D
T
D
T
Rook
B
F
A
A
L
L
Bishop
N
(P)
C
(P)
C
(P)
C
(P)
S
(B)
P
(Q)
Knight
Pawn
Nota: I used Q for pawn symbol in dutch for I didn't knew it
and P was already used.
DRIVERS
ascii
this is the default
boards.
driver,
it
outputs
move
and
postscript
it generates a file using the font file Cheq
licensed for free by Adobe. It is only able to
display one board per run. Move are not displayed.
tex
this is a latex driver. It uses the metafont font
chesscls, provided in the library. Refer to your
local latex guru to install it.
roff
this is a driver for nroff output. It is crude,
it works. Moves and boards are displayed.
gnu
This driver generates compatible xchess save files,
thus allowing you to replay a game with xchess.
but
EXAMPLES
Try the following commands:
notation algebraic.txt
this will read the Karpov-Kasparov game 13 (Lyon
1990) in algebraic form, display move in algebraic
and display board at end of game.
notation algebraic.txt -a
this will do the same thing, as -a stands for
braic output.
alge-
notation algebraic.txt -s
the game will now be output in shortened algebraic
notation shortened.txt
there is no problem to read shortened algebraic.
Sun Release 4.0
Last change: 10 December 1990
notation(n)
MISC. REFERENCE MANUAL PAGES
4
notation(n)
notation shortened -s -o result
the moves and board will be directed to file result
notation shortened.txt -s -t french
output will use french notation
notation a_dutch_file -f dutch -o spanish
game will be translated form dutch to spanish
notation shortened -c 2
board after move 2 will be
moves and end-of-game board
displayed,
along
with
notation shortened -e 2
board after move 2 will be displayed,
moves. The program will then stops
along
with
notation shortened -c 2,5,20
board after moves 2, 5 and 20 will be
along with moves and end-of-game board
displayed,
notation shortened -c 2,5,20 -b
board after moves 2, 5 and 20 will be
with end-of-game board, but no moves.
displayed,
notation shortened -c 2,5,20 -d tex
the output will be formatted to use with latex.
can directly latex the output file.
notation shortened -c 2,5,20 -d gnu
you can now replay the game
out.gnu.
by
using
xchess
You
-r
notation shortened -e 5 -d postscript
Now issue cat lib/Cheq out.ps | lpr to display on a
Laser Printer the board at move 5. You can also
issue sh print-ps out-ps. The postcript driver does
not support the -c option.
FILES
algebraic.txt shortened.txt keywords.txt
these are examples of input files
./lib/HELPFILE
this is the on-line helpfile
./lib/(Cheq Header.ps Footer.ps)
these files are needed by the postscript driver
Sun Release 4.0
Last change: 10 December 1990
notation(n)
MISC. REFERENCE MANUAL PAGES
5
notation(n)
./lib/Header.tex
these file is needed by the (la)tex driver
./lib/chesscls.mf
this file is used the generate the tex font
SEE ALSO
xchess(1), chess(6), gnuchess(1), latex(1), nroff(1), lpr(1)
DIAGNOSTICS
Errors messages are hoped to be self-explanative.
COMMENTS
The program is huge, due to the large use of tables and
variables to control its features. The advantage is you only
need the modify these tables to customize it: for instance
adding a new language or tuning the output format to your
own needs.
BUGS
Too many.
The postscript driver fails if you try to display the board
two times. Anyway, it is not designed to do this. Use -e
option to specify the move at which you want to display
board.
AUTHOR
Henry
Thomas
IRISA-Rennes,
Henry.Thomas@irisa.fr.
FRANCE.
E-mail
THANKS
Thanks to Jacques Schuurman for the piece description in
Dutch, Dr. Z.
Rubinstein, University of Haifa for the
Metafont files, Philippe Louarn for implementing these mac-
ros and explaining me how to use them, Adobe Systems for the
font Cheq, and Jean-Luc Scharbarg for introducing me in the
world of chess.
Sun Release 4.0
Last change: 10 December 1990
6
Download