This is my first post here :)
I am starting with LaTeX, and I am trying now to apply it annotate some chess positions.
My problem is the use of the chess mode (|...chess moves to show figurines...|) when using the texmate package. I don't want to be strict when editing the chess moves in LaTeX, so I use \SkakOff to avoid texmate/skak to check every move sequence entered.
I am planning to use only \fenboard{...} or \position{...} and then the chess mode to insert the moves. Every board is a new position in a different game, so that's why I don't need (nor want) skak to check every chess move(s). I have read Typesetting nested chess variations in Skak but I wanted to avoid the use of \mainline, \variation, etc.
The problem appears when in the last "variation" (in fact I am not using \mainline, \variation, etc., as commented above) the last side who made the move is white, then, in the next sequence, LaTeX starts as if it was black to move.
Here there is the example 10.1.15 from The LaTeX Graphics Companion (page 680), modified to ilustrate the problem:
\documentclass[10pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{texmate} \SkakOff
\begin{document}
%Original code
Input as |e4 c5 Nf3 d6 d4 cxd4|
or as |1 e4 c5 2 Nf3 d6 3 d4 cxd4|
or as |1. e4 c5 ; 2. Nf3 d6 ; 3. d4 cxd4|
%Modified (buggy) code
But if |1 e4 c5 2 Nf3 d6 3 d4 cxd4 4 Na3| (the last move is played by white)
then |1 e4 c5 2 Nf3 d6 3 d4 cxd4 4 Na3| (the next time, skak starts
the chess mode as moving black first, not white)
\end{document}
How can I force to start again the chess move with white to move if the last move in the main variation was made by white? Or the opposite, force start again with black to move, if it was black who made the last move.
Thanks,
P.S. I am using texmate because I use the \makegametitle command.
Addendum:
My question is related to the translation form HTML to LaTeX of an old document I have been working and using for long. Now, I want to print it, but the HTML printout looks poor, so I thought about translating it to LaTeX.
That document is quite well debugged in chess terms, so I do not need the help of skak/texmate to check the positions and move sequences, as every position is in HTML format and I have created an small script to translate them to FEN and I already have the consequent \fenboard{} blocks. But when I substituted the HTML format of the moves to the LaTeX chess mode |...| I found the (unexpected for me) behavoir explained above. Thanks to DJP for explaining me that behavoir.
I do not want to go through the hundred of positions I already have, checking and rewriting every mainline/variation and including the corresponding LaTeX command. I expected to use the chess mode to just highlight (\textbf) the chess moves and change from the spanish algebraic notation to the figurine notation.
Now, to avoid all the hard work of revising everything, I would like to know if there was any way to easily mark a sequence of moves (which already have their correct move number) as show them as in the LaTeX chess mode. Some sort of reseting the chess mode, like the \newgame trick suggested by DJP, but being able to set also the side to move.
If it is not possible, then I will have to make another script to detect all the chess move sequences and replace Ka1 for \king{}a1, e3 for \pawn{}e3, and so on (with the problem of showing black pieces). That is possible, and easy, but would make the final tex file source very obfuscated compared with the simple chess mode notation. It is not at all easy to automate the substitution using \mainline, \variation, etc.
Sorry for my bad explanation, but I am not english speaker, and it is hard for me to explain my problem better. I understand that this problem is quite specific, and that it is not the LaTeX philosophy way of work.
