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, xboard or gnuan save
format. This program is also multi-lingual: it handles english,
french, spanish, german, italian, dutch, romanian etc... symbols. So
nearly all europeans languages are understood (except greek and
russian, but I can't handle greek or cyrillic on ascii computers, eh).
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, czech, hungarian, polish,
romanian, FIDE.
- -t <language>
-
specifies the chess symbol output language. Same options as input language.
- <inputfile>
-
specifies the input file. If none, keyboard is assumed.
- -o <outputfile>
-
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
- -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, xchess
(xchess or xboard save format), gnu (gnuan input format).
- -i
-
suppress headers/footers printing. This is useful with tex or ps
drivers, if you want to include the output in a larger file.
- -v
-
displays version number and exits
- -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, CR,
commas and semi-columns.
- 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, Nfg3. The ugly english notation P-K4 is
not understood, neither by the program nor me. The program allows and
parse variations.
Nota: provided you remove the three first line, xchess save format is
accepted.
Also you can have move comments. So Kg4!!, Ra5++ are correct,
as Kg4 !!, Ra5 ++. 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,
shortened.txt and boudy.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:
-
chess codified comments can be put in the input. There are two ways
or doing so. The first one is to use the usual chess notation !?,
!, ,+, ++, #, ep, etc ... However, international magazine use other
no-ascii symbols : triangles, squares, infinity and so on. You can
have these symbols on LaTeX output. This is the second way. I
defined three letters abbreviations for such symbols (look at the file
chesssymb.txt for an extensive description). These abbreviations
are following a $ sign. For instance $wsb means "white
slightly better". This is, IMHO, a very interesting feature of the
program.
- text:
-
plain text, such as explanations etc... must be enclosed in brackets
or parenthesis [Here Karpov made a very bright move ...]
(this is also a comment). Comments are not parsed, but directly
inserted in the output, for the ascii ,nroff and
latex drivers. The closing characters (ie "]" or ")" depending
of the opening characters may be placed in the text, provided it is
escaped by a "\" ( so you input "\]" or "\)" ).
- variations:
-
You can have variations in the source. Variation are in enclosing
{ } . You can have up to three level of variation. It would be
enough for human players. A variation always follows the move. Here is
an exemple of variation : 25. Rb2 { Ce4 de4 26 Fc3 Fa3! 27. Ff6 Tb3
} Fa3!
- 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.
-
- @title{ <title>}
-
this keyword accept one argument enclosed in {}. Example:
@title{Karpov-Kasporov}. Note that you can put } in the
text itself, if it is escaped (\}).
- @subtitle{ <subtitle>}
-
prints a subtitle
- @score{ <text> }
-
prints the score.
- @language{french|english|...|FIDE}
-
this keyword specifies in which language the pieces names are
expressed. This option overides command-line option.
@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)
czech K D V S J (P)
hungarian K V B F H (G)
polish K H W G S (P)
romanian R D T N C (P)
FIDE K D T S N (P)
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".
- 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. 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 generates "bare" output, 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 shortened algebraic and display board at end of game.
- notation algebraic.txt -s
-
this will do the same thing, as -a stands for algebraic
output.
- notation algebraic.txt -a
-
the game will now be output in full-length 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.txt -e 2
-
board after move 2 will be displayed, along with moves. The program
will then stops
- notation shortened.txt -c 2,5,20
-
board after moves 2, 5 and 20 will be displayed, along with moves and
end-of-game board
- notation shortened.txt -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.txt -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.txt -c 2,5,20 -d gnu -o out.gnu
-
you can now replay the game by using xchess -r out.gnu.
- notation shortened.txt -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.
- notation boudy.txt -d tex -o boudy.tex
-
This is the all-star, all-singing demonstration of the notation
program. Runs latex on boudy.tex and print result.
FILES
- algebraic.txt shortened.txt keywords.txt boudy.txt
-
these are examples of input files
- chesssymb.tex
-
this is the LaTeX file containing the definitions of the codified
comment. You can include it in your own LaTeX files: you will be able
to use the chess comments. The file is stand-alone. To iclude
comment in LaTeX, just type \COM<three letter name>. For
instance \COMwsb inserts the symbol for "whites stands lightly
better".
- chesssymb.txt
-
explanation of codified comments
- convsymb.txt
-
used to prduce chesssymb.txt
- ($LIBDIR/)HELPFILE
-
this is the on-line helpfile
- ($LIBDIR/) Cheq Header.ps Footer.ps
-
these files are needed by the postscript driver
- ($LIBDIR/)Header.tex
-
these file is needed by the (la)tex driver
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 extensive 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* fail 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.
Do not enter two levels of variation without any move between them. It
will cause the crash of the program. For instance, { { is wrong,
but { Qd1 { is correct.
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 names in Dutch, Philippe
Louarn for explaining me some TeX tricks, Lael for czech, hungarian,
polish, romanian and FIDE piece names, to Steven Young. Most of all,
thank to Jean-Luc Scharbarg for introducing me to 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: 06:48:11 GMT, December 12, 2024