notation
Section: Misc. Reference Manual Pages (n)
Updated: 10 December 1990
Index
Return to Main Contents
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:
-
-
algebraic move notation output
-
-
shortened move notation output
- -f <language>
-
specifies the chess symbol input language. The language can be any of
french, english, italian, spanish,
german, dutch.
-
-
specifies the chess symbol output language. Same options as input language.
- <inputfile>
-
specifies the input file. If none, keyboard is assumed.
-
-
specifies the output file. If none, screen is assumed.
- -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
-
-
display only the board, not the moves
-
-
specifies the output driver. It can be any of the following:
ascii, postscript, tex, roff, xchess
(xchess or xboard save format), gnu (gnuan input format).
-
-
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... Castling is recognized with the following 0-0
O-O o-o 0-0-0 O-O-O o-o-o. "En passant" and promotion are now
correctly handled. For "en passant", you just indicate them move and
it is correctly parsed ex: "d5-d7 e5xd6". Promotion is indicated with
the "=" sign followed by the new piece name. So you just write
"a7-a8=Q" or "d8=K".
For example, see the files algebraic.txt and
shortened.txt
- 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.
- 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 keyword.
- @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 play. Useful after a
@configxxx and @startplay
- @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:
@configblack Ka8 Nf6 e6.
Note that black pieces are given in uppercase!
- @default
-
resets the board to the default start configuration.
- @special
-
all following text up to the next cariage return is not processed, but
instead directly print. This allows to insert comments in ascii files,
or tex commands when tex output is selected.
- @null
-
Null keyword. Does nothing. Used for convenience in programming.
See the file keywords.txt for an example of keywords use.
NATIONAL LANGUAGES
Here are the symbols used in the differents languages. () mean
optional in the input.
english-name King Queen Rook Bishop Knight Pawn
english K Q R B N (P)
french R D T F C (P)
italian R D T A C (P)
spanish R D T A C (P)
german K D T L S (B)
dutch K D T L P (O)
DRIVERS
- ascii
-
this is the default driver, it outputs move and boards.
- 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. You need the font "Cheq", freely distributed by Adobe.
Send a mail to "ps-file-server@adobe.com" with the body "send Programs
chessfont.ps". For use with "notation", rename the file "Cheq".
- tex
-
this is a latex driver. It uses the TeX/LaTeX chess macros
designed by Piet Tutalaers "rcpt@urc.tue.nl". The complete
distribution is available on sol.cs.ruu.nl (131.211.80.5) with path
TEX/chess.tar.Z 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, but it works. Moves and
boards are displayed.
- xchess
-
This driver generates compatible xchess/xboard save files, thus allowing you
to replay a game with xchess.
- gnu
-
This driver completely "bare" file, with only the algebraic move. It
is suitable for any low-level analyser, such as gnuan.
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 algebraic
output.
- notation algebraic.txt -s
-
the game will now be output in shortened algebraic
- notation shortened.txt
-
there is no problem to read shortened algebraic.
- 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 -t spanish
-
game will be translated form dutch to spanish
- notation shortened -c 2
-
board after move 2 will be displayed, along with moves and end-of-game
board
- notation shortened -e 2
-
board after move 2 will be displayed, along with moves. The program
will then stops
- notation shortened -c 2,5,20
-
board after moves 2, 5 and 20 will be displayed, along with moves and
end-of-game board
- notation shortened -c 2,5,20 -b
-
board after moves 2, 5 and 20 will be displayed, with end-of-game
board, but no moves.
- notation shortened -c 2,5,20 -d tex -o out.tex
-
the output will be formatted to use with latex. You can directly latex
the output file.
- notation shortened -c 2,5,20 -d gnu -o out.gnu
-
you can now replay the game by using xchess -r out.gnu.
- notation shortened -e 5 -d postscript -o out.ps
-
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
- ./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 quite large, 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. Report them to Henry.Thomas@irisa.fr.
The postscript driver *might* fais 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, FRANCE. E-mail to
Henry.Thomas@irisa.fr or hthomas@irisa.fr.
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 macros 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.
Index
- NAME
-
- SYNOPSYS
-
- DESCRIPTION
-
- OPTIONS
-
- INPUT LANGUAGE
-
- KEYWORDS
-
- NATIONAL LANGUAGES
-
- DRIVERS
-
- EXAMPLES
-
- FILES
-
- SEE ALSO
-
- DIAGNOSTICS
-
- COMMENTS
-
- BUGS
-
- AUTHOR
-
- THANKS
-
This document was created by
man2html,
using the manual pages.
Time: 10:12:39 GMT, December 12, 2024