0

I understand package xskak to be an extension of skak, but that there are some incompatibilities due to overlaps in funcionality. I would like to work with xskak in the long term, but hoped to be able to include pure skak code while getting there. Compiling skak code under xskak seemed to go well until I came across Torben Hoffmann's Example of the LaTeX-input and output of an annotated chess game using skak.sty dated January 8, 2018. The command \continuevariationcurrent causes a ! Paragraph ended before \FenBoard was complete error.

\documentclass{article}
%=======================
%\usepackage{skak}
\usepackage{xskak}
%=======================
\begin{document}
\fenboard{1q3kr1/3rb2p/p3Q3/8/1p6/8/PPP3PP/4R2K w - - 0 26}
\showboard

Fischer - Tal after \movecomment{25... Kf8!}

\mainline{26. Qxd7}

Not \variation{26. Rf1+ Kg7 27. Rf7+ Kh8} and if 
%\continuevariationcurrent{28. Qxd7 Rd8 29. Qg4 Qe5} wins.

\mainline{26...Qd6 27. Qb7 Rg6} 

Within a handful of moves the game has changed its complexion.
Now it is White who must fight for a draw!

\mainline{28. c3} 
Black's extra piece means less with each pawn that's exchanged.

\mainline{28...a5} 

On \variation{28...bxc3 29. Qc8+ Bd8 30. Qxc3}=.

\end{document}
1

You can't use "pure skak" with xskak. xskak has a different view about \mainline and variation then skak. With skak \variation changes the level, also skak tries to play (that means to update the internal board) with both commands. With xskak only \mainline plays, while \variation only prints, and change of levels are done with invar and outvar.

This difference means that there is actually no need for a special \continuevariation, it can simply be mapped to \variation. This will avoid the error, but you won't get the same output as with skak: both commands will use the main bold style unless you add invar and outvar (the last still bold variation shows this).

\documentclass{article}
%=======================
\usepackage{xskak}
\let\continuevariation\variation %if wanted ...

%=======================
\begin{document}
\fenboard{1q3kr1/3rb2p/p3Q3/8/1p6/8/PPP3PP/4R2K w - - 0 26}
\showboard

Fischer - Tal after \movecomment{25... Kf8!}

\mainline{26. Qxd7}

Not \variation[invar]{26. Rf1+ Kg7 27. Rf7+ Kh8} and if
\continuevariation{28. Qxd7 Rd8 29. Qg4 Qe5} wins.

\mainline[outvar]{26...Qd6 27. Qb7 Rg6}

Within a handful of moves the game has changed its complexion.
Now it is White who must fight for a draw!

\mainline{28. c3}
Black's extra piece means less with each pawn that's exchanged.

\mainline{28...a5}

On \variation{28...bxc3 29. Qc8+ Bd8 30. Qxc3}=.

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.