summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/skak/skakdoc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/skak/skakdoc.tex')
-rw-r--r--Master/texmf-dist/doc/latex/skak/skakdoc.tex753
1 files changed, 488 insertions, 265 deletions
diff --git a/Master/texmf-dist/doc/latex/skak/skakdoc.tex b/Master/texmf-dist/doc/latex/skak/skakdoc.tex
index 69c11c8c29d..5cc5a397929 100644
--- a/Master/texmf-dist/doc/latex/skak/skakdoc.tex
+++ b/Master/texmf-dist/doc/latex/skak/skakdoc.tex
@@ -1,18 +1,90 @@
-\documentclass[11pt,twocolumn]{article}
+\documentclass[10pt]{article}
\usepackage{lambda,ifthen,calc}
\usepackage{tabularx}
-\usepackage[ps,mover]{skak}
+\usepackage[ps,mover,small,skaknew]{skak}
+\usepackage{fancyvrb}
+\usepackage{multicol}
+\usepackage[final]{showexpl}
+
+
+
+\makeatletter
+%% to get showexpl to respekt empty lines
+%% this corrects a bug in showexpl as long
+%% as the new version isn't there
+\renewcommand*\SX@resultInput{%
+ %%\MakePercentComment\catcode`\^^M=10\relax
+ \SX@@preset\SX@preset
+ \if@SX@rangeaccept
+ \let\@tempa=\SX@input% Nur sinnvoll bei \LTXinputExample
+ \else
+ \let\@tempa=\input
+ \fi
+ \@tempa{\SX@codefile}%
+ \MakePercentIgnore}
+\makeatother
+
+
+\lstset{style=latex} %siehe lstlocal.cfg
+\lstset{width=0.5} % wider examples
+\lstset{preset=\raggedright}
+
+\usepackage[inactive]{pst-pdf}
+%\usepackage{pst-pdf}
+
+\makeatletter
+% to be able to redefine showboard, should go in skak.sty
+\def\notationOn{\let\print@board=\show@board@notation%
+ \let\print@inverseboard=\show@board@notation@inverse}
+\def\notationOff{\let\print@board=\show@board%
+ \let\print@inverseboard=\show@board@inverse}
+
+\renewcommand\showboard{\print@board}
+\renewcommand\showinverseboard{\print@inverseboard}
+\makeatother
+
+\notationOn
+
+\let\ORIshowboard\showboard
+\let\ORIshowinverseboard\showinverseboard
+\renewcommand\showboard{%
+ \makebox[8\squarelength]{%
+ \rule{0pt}{9\squarelength}% for better spacing above board
+ \begin{postscript}% siehe pst-pdf.sty
+ [trim = \squarelength{} 0pt \squarelength{} 0pt]
+ \ORIshowboard
+ \end{postscript}}}
+
+\renewcommand\showinverseboard{%
+ \makebox[8\squarelength]{%
+ \rule{0pt}{9\squarelength}% for better spacing above board
+ \begin{postscript}% siehe pst-pdf.sty
+ [trim = \squarelength{} 0pt \squarelength{} 0pt]
+ \ORIshowinverseboard
+ \end{postscript}}}
+
\newcommand{\package}[1]{\textsf{#1}}
+\newcommand{\command}[1]{\textbackslash\texttt{#1}}
\newcommand{\pgn}{PGN\ }
\newcommand{\san}{SAN\ }
\newcommand{\fen}{FEN\ }
\newcommand{\xboard}{xboard}
\newcommand{\metafont}{\textsc{Metafont}\ }
\newcommand{\filename}[1]{\texttt{#1}}
-%\usepackage[a5paper]{anysize}
-%\tracingmacros=1
+%\newenvironment{example}
+% {\VerbatimEnvironment\begin{VerbatimOut}{test.out}}
+% {\end{VerbatimOut}\small\noindent
+%\begin{multicols}{2}
+%\BVerbatimInput{test.out}
+%\columnbreak%
+%
+%\input{test.out}%
+%\end{multicols}
+% \normalsize}
+
+
\newcommand{\Guido}{Guido Governatori\ }
\newcommand{\Harri}{Harri Haanpaa\ }
@@ -20,10 +92,13 @@
\newcommand{\Dirk}{Dirk B\"achle\ }
\newcommand{\Ulrike}{Ulrike Fischer\ }
\newcommand{\Andreas}{Andreas Wilm\ }
-
+
+
+
\title{Typesetting Chess in \LaTeX with the \package{skak} Package\\
-Version 1.3}
+Version 1.4}
\author{Torben Hoffmann\\ e-mail: \texttt{Torben.Hoffmann@motorola.com}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
@@ -38,91 +113,6 @@ Version 1.3}
\tableofcontents
\newpage
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Change History}
-\label{sec:change-history}
-
-
-\subsection*{Version 1.3}
-\label{sec:version-1.3}
-
-\begin{itemize}
-\item \Dirk has reworked the typesetting of chess moves:
- \begin{itemize}
- \item A new capture symbol has been introduced to make the spacing around
- it better.
- \item The figurine symbols have been improved so that the spacing around
- them are more uniform --- it looks really good now, at least to my eyes.
- \item A proposal for what syntax the \package{skak} package should handle in
- the future has been included in the distribution.
- \item The Informator symbols ``novelty'', ``comment'' and ``various'' needed
- another pair of curly braces in order to work right within the
- ``mainline'' and ``variation'' environments.
- \item The check for trailing spaces in the macro ``typeset@cmoves'' had to
- be removed because it led to problems at the end of a ``mainline'' or
- ``variation'' environment when an additional Informator symbol was
- involved.
- \end{itemize}
-\item A reference to the \textsf{pgn2ltx} tool created by \Dirk has been added
- to the document.
-\item A reference to an URL decribing the \pgn standard has been added.
-\end{itemize}
-
-
-\subsection*{Version 1.2}
-\label{sec:version-1.2}
-
-\begin{itemize}
-\item \Dirk has --- once again --- done a great job:
- \begin{itemize}
- \item the informator symbols have been improved and now scale as
- they should (I have in the same go done some \metafont clean-up
- associated with the symbols).
- \item he has also discovered that the selection of other fonts for
- the typesetting of moves can be done by redefining the
- \verb|\skakfamily| command!
- \item added the \verb|\movecomment| for flexible typesetting of
- comments --- see the Reference Manual for details.
- \item The PostScript file are now 10 times smaller (for large files)
- and a comprehensive test of the PostScript ornaments has been
- created.
- \end{itemize}
-\item All dead code has been removed from \texttt{skak.sty}.
-\end{itemize}
-
-
-\subsection*{Version 1.1}
-\label{sec:version-1.1}
-
-\begin{itemize}
-\item \Dirk's enhancements have been incorporated:
- \begin{itemize}
- \item extension of the \verb|\highlight| command; it now accepts X,
- x, O and o as optional arguments and produces a cross and a
- circle on the square, respectively, instead of a frame around the
- square.
- \item unwanted generation of spaces removed.
- \item a set of Informator symbols were added to the fonts and made
- available through commands documented in the
- \texttt{informator.ps} file.
- \end{itemize}
-\item Two fixes by \Ulrike have been incorporated:
- \begin{itemize}
- \item a bug in \verb|\ParseCoordinates|.
- \item a problem in the fonts regarding size.
- \end{itemize}
-\item \Ulrike reported a problem with opening spaces causing the input
- to be ignored --- this has been fixed and \filename{test/test2.tex}
- verifies this.
-\end{itemize}
-
-
-
-\subsection*{Version 1.0}
-\label{sec:version-1.0}
-
-The major novelty in this release is that the documentation has been
-updated and a reference manual has been created.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -130,7 +120,7 @@ updated and a reference manual has been created.
\label{sec:terms-usage}
This package is distributed under the terms described in the Latex
-Project Public Licence, i.e.,
+Project Public Licence, i.e.,
\begin{quote}
This software is copyright but you are granted a license which gives
@@ -157,261 +147,494 @@ A big thank goes to \Dirk for adding the Informator symbols to the
fonts and for removing a couple of nasty bugs as well as improving
some of the commands.
-I thank \Ulrike for spotting as well as fixing a big problem with the
-parsing of moves and for her hints to improving the fonts.
+I thank \Ulrike for the tremendous work she has done with regards to
+improving the way fonts are handled by the skak package, not to
+mention the significant amount of bugs she has found and in many cases
+fixed.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{The Old \package{chess} Package Versus the New \package{skak}
- Package}
-\label{sec:old-vs-new}
+\section{Installing the \package{skak} Package}
+\label{sec:install}
-The main reason for considering an improvement of the \package{chess}
-package that Piet Tutelaers made back in 1991 is the cumbersome user
-interface the package has when one wants to write about a chess game
-and display a diagram every now and then. Typesetting the two opening
-moves where white and black move their kingside knights is done as
-follows in the \package{chess} package:
+I could not get the makefile to do the job, so if someone could help
+me out on this I would be very glad indeed.
-\begin{verbatim}
-\move g1f3 g8f6
-\end{verbatim}
+Basically all you have to do is to follow the guidelines in the
+makefile. First you create all the required directories (stated in the
+\texttt{install} section of the makefile) and then you run the
+\texttt{make install} command. Remember to run \texttt{texhash} after
+you have updated your texmf tree.
-The package then produces a nice typesetting of these moves in figurine
-notation, but it is hard to keep track of what is going on because one usually
-uses the \san (Short Algebraic Notation, employed in the \pgn standard for
-typing the moves --- see \texttt{http://pgn.freeservers.com/standard.txt} for
-details) to write down the moves of a chess game. The \san version of the two
-moves above is: \verb|1. Nf3 Nf6|, which is much clearer to most chess
-players. In the \package{skak} package the author of a chess article is
-allowed to use the \san notation as input to the command that updates the
-chess board. In addition to making it easier for the author to write about
-chess using a familiar notation it also provides an easy way to include moves
-generated by a chess program such as \xboard\ in the document---most other
-chess programs can also output a \pgn version of a chess game and from that
-you can extract the \san recording of the moves.
+Sorry that it is not working $100\%$--- I just do not have the time for
+it right now.
-The \package{skak} package can also input chess board positions given
-in the \fen notation (also used in the \pgn standard), which is also quite
-standard in the domain of chess programs.
+If you cannot get the things working just put the files where \TeX and
+the other tools can find them and you will be just fine.
-Apart from a better user interface the \package{skak} chess font
-contains three small modifications of the font created by Piet
-Tutelaers: the knight now looks a bit more ``youthful'', the contour
-of the queen has been smoothened and all the chess pieces have been
-shrunk such that they do not fill as much of a square as before. I
-find this font nicer to look at, but your milage may vary.
+For Windows user I can recommend the MikTeX installation since it has
+skak as a package and all you have to do is to use the MikTeX
+installation tools and select installation of skak and you're up and
+running.
+Ultimately the skak package should be documented using the \LaTeX
+standard documentation, but that is a major undertaking that will not
+happen right now.
+\subsection{Using the \package{lambda} Package}
+\label{sec:using-lambda}
+The \package{skak} package uses the \package{lambda} package to do
+some of the hard processing necessary to allow the \pgn notation as
+input --- since it is not standard in \LaTeX distributions it is
+included in the distribution of the \package{skak} package.
-\section{How to use the \package{skak} Package}
-\label{sec:how-use-skak-package}
-Writing about a chess game can be done straightforward:
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Basic usage of the \package{skak} package}
+\label{sec:basic-usage}
-\begin{verbatim}
+Once the \package{skak} package has been installed you only need to
+know very few things in order to produce nicely typeset chess games:
+
+\begin{itemize}
+\item write \verb|\usepackage{skak}| in the preamble.
+\item the \command{newgame} command.
+\item the \command{mainline} command.
+\item the \command{variation} command.
+\item the \command{showboard} command.
+\end{itemize}
+
+As an example I will describe some moves from the Ruy Lopez opening
+--- please note that the comments are just idle talk. In the left
+column the input is shown and the corresponding output is shown in the
+right column.
+
+\begin{LTXexample}
\newgame
+\mainline{1.e4 e5 2. Nf3 Nc6 3.Bb5}
-\mainline{1. e4 e5 2. Nf3 Bc5}
-\end{verbatim}
-
+\showboard
+\end{LTXexample}
+
+The \command{newgame} command sets u the internal board or a new
+game. The \command{mainline} command does two things: it typesets the
+moves and updates the board so that \command{showboard} will show the
+current board position.
+
+\begin{LTXexample}
+\mainline{3...a6}
+Rarely used these days,
+\variation{3...Nf6} is more in
+fashion since blah blah...
+\mainline{4.Ba4}
+
+\showboard
+\end{LTXexample}
+
+This example shows that if it is black to move the move number shoud
+be followed by three periods. Furthermore, it also shows that the
+\command{variation} command merely typesets the moves --- it does
+\emph{not} update the board, but apart from that it expects the same
+input as \command{mainline}.
+
+The four commands introduced in this section will enable you to
+comment your games with minimal effort and still get great results ---
+in fact most chess books can be writen using only these commands!
+
+But the \package{skak} package offers a lot more that can make chess
+typesetting easier for your --- these features are the topics of the
+next two sections.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Intermediate Usage of the \package{skak} Package}
+\label{sec:intermediate}
+
+This section describes how to
+\begin{itemize}
+\item do game management,
+\item add ornaments to the board and
+\item controlling some aspects of showing the board.
+\end{itemize}
+
+
+\subsection{Game Management}
+\label{sec:game-management}
+
+Returning to the Ruy Lopez example suppose you want to go into details
+about a number of variations after white's third move, preferably
+showing the board in all the lines you describe.
+
+One way to do this is to use the \command{hidemoves} command like
+this:
+
+\begin{LTXexample}
\newgame
-\noindent
-starts a new game and produces the following in your document:
+\mainline{1.e4 e5 2. Nf3 Nc6 3.Bb5}
-\mainline{1. e4 e5 2. Nf3 Bc5}
+\showboard
+\end{LTXexample}
-So far, so good. If you want to show the current position you just
-type \verb|\[\showboard\]| in your document to get:
+\begin{LTXexample}
+\mainline{3...a6} blah blah
-\[\showboard\]
+\showboard
-\noindent
-(the use of math \verb|\[...\]| is just to make sure the board is centered.)
+\end{LTXexample}
-This is the basic functionality of the \package{skak} package, but it
-offers many different ways in which one can talk about chess
-games. I think that a good way to show how the \package{skak} package
-can be used is to typeset the Fischer--Tal game from the old
-\package{chess} package. The result is in the file named
-\filename{tuggame.ps}.
+\begin{LTXexample}
+\newgame
+\hidemoves{1.e4 e5 2. Nf3 Nc6 3.Bb5}
+\mainline{3...Nge7} blah blah
-Further information about all the bells and whistles the
-\package{skak} package provides can be found in the \emph{Reference
- Manual} where all commands of relevance are described.
+\showboard
+\end{LTXexample}
+This is, admittedly, a labourious way of doing it, but the example
+shows how \command{hidemoves} can fast-forward you to any point in a game.
-\subsection{Handling of Variations}
-\label{sec:handling-variations}
+\package{skak} offers you ways of storing game positions
+\begin{itemize}
+\item in memory or
+\item in a file.
+\end{itemize}
-The \package{skak} package does \emph{not} support
-\pgn variations such as
-\begin{verbatim}
-\mainline{12. Bb4 (12. Ng5 h6) 12... Ra8}
-%gives an error
-\end{verbatim}
+The former is done using the \command{storegame} and
+\command{restoregame} commands like this:
-You have to type this as
-\begin{verbatim}
-\mainline{12. Bb4}
-\variation{12. Ng5 h6}
-\mainline{12...Ra8}
-\end{verbatim}
+\begin{LTXexample}
+\newgame
+\mainline{1.e4 e5 2. Nf3 Nc6 3.Bb5}
+\storegame{game1}
+\mainline{3...a6 4.Ba4 b5}
-I do not have the nerves to update the parsing algorithm to cope with
-this so the best thing to do would be to craft a tool for translating
-\pgn to \TeX (see \ref{sec:transl-pgn-files}).
+\showboard
+\restoregame{game1}
+\mainline{3...Bd7}
+\showboard
+\end{LTXexample}
-\subsection{Changing the Font}
-\label{sec:changing-font}
-(New in Version 1.2)
+Saving and loading to/from a file is the same just with the commands
+\command{savegame} and \command{loadgame}.
-\Dirk has discovred that you can change the font used for typesetting
-of moves if you redefine the \verb|\skakfamily| font.
-I do not --- however --- know how to handle different chess fonts, so
-if someone could work this out I'll include that in a future version.
+\section{Ornaments}
+\label{sec:ornaments}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Installing the \package{skak} Package}
-\label{sec:install}
-I could not get the makefile to do the job, so if someone could help
-me out on this I would be very glad indeed.
+\subsection{Showing the Board}
+\label{sec:showing-board}
-Basically all you have to do is to follow the guidelines in the
-makefile. First you create all the required directories (stated in the
-\texttt{install} section of the makefile) and then you run the
-\texttt{make install} command. Remember to run \texttt{texhash} after
-you have updated your texmf tree.
+We have already seen \command{showboard} in action, but is is possible
+to alter the way the board looks like.
-Sorry that it is not working $100\%$--- I just do not have the time for
-it right now.
+With the \command{mover} command one can request that a little marker
+is shown next to the board indicating who is to move next.
-If you cannot get the things working just put the files where \TeX and
-the other tools can find them and you will be just fine.
+\begin{LTXexample}
+\newgame
+\showboard
-\subsection{Using the \package{lambda} Package}
-\label{sec:using-lambda}
+\end{LTXexample}
-The \package{skak} package uses the \package{lambda} package to do
-some of the hard processing necessary to allow the \pgn notation as
-input --- since it is not standard in \LaTeX distributions it is
-included in the distribution of the \package{skak} package.
+\begin{LTXexample}%9 okay
+\mainline{1.d4}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Future Additions/Wish-list}
-\label{sec:future-additions}
+\showboard
+\end{LTXexample}
+
+This can be turned off with \command{moveroff}. You can also remove
+the notation around the board using \command{notationoff} which gives
+this appearance:
+
+\begin{LTXexample}
+\newgame
+\notationoff
+\showboard
+
+\end{LTXexample}
+
+The notation is added again after one has issued
+\command{notationon}. \notationon
+
+A more elaborate explanation of how the appearance of the notation
+around the board is configured can be found in \cite{chessnfss}.
+Although it is rarely seen is chess books \package{skak} offers
+the possibility of showing the board from black's perspective
+using the
+\command{showinverseboard} command.
-\subsection{Choosing Language for \texttt{mainline}}\label{sec:choos-lang-mainline}
+\begin{LTXexample}
+\newgame
+\showboard
+
+\end{LTXexample}
+
+If you are writing about an opening from black's point of view this
+command/feature could be a welcome refreshment in presentation style.
-(Proposal date: mid 2002.)
-It would be nice if one could choose the language for the
-\verb|mainline|, \verb|variation| and \verb|\hidemoves| for each invocation
-as it allows for easier inclusion of analysis from chess programs when
-using a non-english language.
+\subsection{Handy Commands}
+\label{sec:handycommands}
+By requst of users and own usage a couple of handy commands have been
+added to \package{skak} that you might find useful too.
-\subsection{Algebraic Notation used for Typesetting}
-\label{sec:algebraic-notation-in-typesetting}
+\command{wmove\{\emph{move}\}} typesets a single move, whereas
+\command{bmove\{\emph{move}\}} does the same only with leading
+ellipses (see \ref{sec:advanced-usage}for in-depth explanation). This
+is useful for short remarks like:
-(Proposal date: mid 2001.)
+\begin{LTXexample}
+\bmove{Nd4} would have been better.
+\end{LTXexample}
-\Ingo has suggested that the output of the typesetting should be the
-old algebraic notation where the from and to squares always are
-given. This requires a modification to the game engine: after each
-move has been made you should store the algebraic notation of the move
-since you have the to and from squares calculated at that
-moment. Changing the game engine is a bit hairy --- even for me --- so I'll
-postpone this.
+\command{lastmove} is a shorthand for commenting on the last move made:
+
+\begin{LTXexample}
+\newgame
+\mainline{1.a3}
+
+\lastmove{} is bad.
+\end{LTXexample}
-\subsection{Fonts}
-\label{sec:ps-font}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Advanced Usage}
+\label{sec:advanced-usage}
-(Proposal date: dec-2002.)
+This section will describe some features of the \package{skak} package
+that allows you to control a lot with regards to the typesetting of
+moves as well as how the board is shown.
-\Ulrike has suggested the creation PostScript version of the \metafont
-font.
+Furthermore, we will take a look at how the board is set up in
+arbitrary positions and how the input language can be changed.
-I do not know how to do this, but perhaps someone can help me?
-Furthermore, \Ulrike would like to see a more transparent
-fonthandling, so that it becomes easy to change to another chess-font.
-(Version 1.2 news: see Section~\ref{sec:changing-font}.)
+\subsection{Tailoring of the Board Appearance}
+\label{sec:tail-board-appe}
+
+In additon to the ornaments and showing the board upside down
+described in \ref{sec:intermediate} one can choose to show only a
+subset of the pieces actually on the board.
+
+The simple commands \command{showonlywhite} and \command{showonlyblack} shows
+only one colour on the board:
+
+\begin{LTXexample}
+\newgame
+\mainline{1.e4 e5 2. Nf3 Nc6 3.Bb5}
+
+\showonlywhite
+\showboard
+\end{LTXexample}
-\subsection{Optimisation of the Implementation}
-\label{sec:optim-impl}
+\begin{LTXexample}
+\showonlyblack
+\showboard
+\end{LTXexample}
-(Proposal date: 2-Jan-2003.)
-I would like to improve some areas of the implementation since they
-are unnecessary slow and/or complicated, e.g., \verb|\IsPieceName|
-could easily be implemented as a case statement instead of a list
-look-up. I have a strong feeling that this would be a lot faster than
-the current implementation which has a very functional programming
-flavour --- this was very helpful during the development, but it has a
-tendency to be a bit inefficient.
+This is often used when describing openingswhere one wants to focus on
+the merrits of the piece set-up on one side without considering how
+the other side is positioned.
-Another great improvement would be to let the commands
-\verb|\Mainline| and \verb|\typeset@A| use the same parsing algorithm
---- then one could implement the long algebraic notation as suggested
-by \Ingo by letting the action taken on a move be both updating of the
-board \emph{and} typesetting of the move!
+In addition to the commands for showing only one colour it is also
+possible to show any subset of the pieces on the board using the
+\command{showonly} command that takes a comma sperated list of piece
+names as argument:
-\subsection{Test Suite}
-\label{sec:test-suite}
+\begin{LTXexample}
+The pawn structure is
+now like this:
-(Proposal date: 03-Jan-2003.)
+\showonly{P,p}
+\showboard
+\end{LTXexample}
-It would be a very good idea to create a test suite created using
-normal testing techniques.
-Areas of test should include:
+The piece names are the standard English name with the addition that
+white pieces are denoted by upper case and black's by lowercase. Pawns
+are P and p.
+
+It is also possible to do the opposite of \command{showonly} using
+\command{showallbut}:
+
+\begin{LTXexample}
+\showallbut{P,p}
+\showboard
+\end{LTXexample}
+
+
+\subsection{Setting up the Board}
+\label{sec:setting-up-board}
+
+So far we have only looked how to start a new game, but you can also
+set up the board in \emph{any} position using the command
+\command{fenboard}:
+
+Forsyth-Edwards Notation (FEN) is a standard used to describe chess
+positions. It starts with a description of the contents of the ranks
+on the board. The ranks are separted by a slash starting with the
+eighth row, so if you want to write down the FEN of a
+position you should be seated as white and work your way dow the
+board. The pieces are designated using the stardard English piece
+names.
+
+After the position of the pieces the following information is given
+separated by spaces:
\begin{itemize}
-\item resolving ambiguous moves, i.e., ensuring that moves like
- \wmove{Rad1} moves the right rook.
-\item all legal \san moves are accepted.
+\item who it is to move (w or b).
+\item castling options left for white. - for none, and K and Q for
+ options to castle kingside or queenside for white and k and q for black
+\item en passant square, if applicable otherwise a -.
+\item number of halfmoves since the last capture.
+\item the move number.
\end{itemize}
+\begin{LTXexample}
+\fenboard{r5k1/1b1p1ppp/p7/1p1Q4/
+2p1r3/PP4Pq/BBP2b1P/R4R1K w - - 0 20}
-\subsection{Translating \pgn Files}
-\label{sec:transl-pgn-files}
+\mbox{}
+\bigskip
-(Proposal date: 03-Jan-2003.)
+\showboard
-It would be very nice if one had a command line tool that could
-translate \pgn files to a \TeX file.
-27-Sep-2003: Take a look at \texttt{http://pgn2ltx.sourceforge.net} for a nice
-helper tool.
+\mainline{20.Qxb7 Rae8 21.Qd5}
+\end{LTXexample}
-\subsection{Typesetting \textsl{e.p.} after en passant moves}
-\label{sec:typeset-en-passant}
-\Andreas asked how one should input en passant moves, especially the addition
-of \textsl{e.p.} after the capture.
+\subsection{Typesetting Style}
+\label{sec:typesetting-style}
-This is not part of the \san notation as described in the \pgn standard and it
-requires that the improvement described in Section \ref{sec:optim-impl} is in
-place before it is possible to add the possibility to add the
-\textsl{e.p.}. It has to be this way because I do not want to support more
-than what is described by the \pgn standard.
+There are a couple of ways to configure how the move are typeset as
+described in the following.
-\end{document}
+\subsubsection{\command{styleA}}
+\label{sec:stylea}
+
+The \command{styleA} will switch the typesetting to the way it has
+been the standard in Denmark and --- I believe --- Germany.
+
+\begin{LTXexample}
+\newgame
+\styleA
+
+\mainline{1.e4 c5 2.Nf3 Nc6}
+\end{LTXexample}
+
+
+\subsubsection{\command{styleB}}
+\label{sec:styleb}
+
+The style selected by \command{styleB} is the default one.
+
+\begin{LTXexample}
+\newgame
+\styleB
+
+\mainline{1.e4 c5 2.Nf3 Nc6}
+\end{LTXexample}
+
+
+\subsubsection{\command{styleC}}
+\label{sec:styleb}
+
+The style selected by \command{styleC} is an elaboration on
+\command{styleB}: it typesets the moves line by line for each move for
+the mainline but on the same line for variations --- this style is
+used in many books these days, but look the best in a two-column
+setting where the linewidth is small.
+
+\begin{LTXexample}
+\newgame
+\styleC
+
+\mainline{1.e4 c5 2.Nf3 Nc6}
+
+Interesting how \variation{2...d6} is blah blah.
+\end{LTXexample}
+
+\styleB
+
+
+\subsubsection{\command{variationstyle} and \command{mainlinestyle}}
+\label{sec:variationstyle}
+
+Configuration of these commands allows for total control of the
+typesetting of the mainline and variations, they default to:
+
+\begin{verbatim}
+\def\mainlinestyle{\bfseries}% could also contain
+ % definitions of the
+ % various style options
+\def\variationstyle{}% as with mainlinestyle
+\end{verbatim}
+
+They are used by \command{styleC} to control the switching back and
+forth between a tabbed environment and normal typesetting:
+
+\begin{verbatim}
+\def\mainlinestyle{\styleC\bfseries}
+\def\variationstyle{\styleB}
+\end{verbatim}
+
+
+
+\subsubsection{\command{longmoves} and \command{sanmoves}}
+\label{sec:commandlongmove}
+
+The \command{longmoves} command will ensure that the full move, i.e., including the from
+square is typeset. This is also know as \emph{algebraic} notation ---
+can be quite handy when writing about chess for children or other
+newcommers to chess notation.
+
+\begin{LTXexample}
+\newgame
+\longmoves
+\mainline{1.e4 c5 2.Nf3 Nc6}
+\end{LTXexample}
+\shortmoves
+The \command{shortmoves} command returns things to normal.
+\subsection{Input Language}
+\label{sec:input-language}
+
+The \package{skak} package by default uses the English letters for the
+pieces, i.e., K for King, Q for Queen, R for Rook, B for Bishop, N for
+Knight and P for Pawn.
+
+The \command{newskaklanguage} command makes it possible to define
+other languages than English, e.g., suppose I want to use the Danish
+piece letters:
+
+\begin{LTXexample}
+\newskaklanguage{danish}{KDTLSB}
+
+\skaklanguage[danish]
+
+\newgame
+\mainline{1.e4 c5 2.Sf3 Sc6}
+\end{LTXexample}
+
+
+
+\end{document}