`skak` 和 `xskak`。命令 `\continuevariationcurrent` 在 `xskak` 下会导致编译错误

`skak` 和 `xskak`。命令 `\continuevariationcurrent` 在 `xskak` 下会导致编译错误

我理解包xskak是的扩展skak,但由于功能重叠,存在一些不兼容性。我希望xskak长期使用,但希望能够skak在实现目标的同时包含纯代码。skak在下编译代码xskak似乎进展顺利,直到我偶然发现了 Torben HoffmannExample of the LaTeX-input and output of an annotated chess game using skak.sty于 2018 年 1 月 8 日发布的命令。该命令\continuevariationcurrent导致! Paragraph ended before \FenBoard was complete错误。

\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

您不能将“纯 skak”与 一起使用xskak。对和有xskak不同的看法。使用更改级别,还尝试使用两个命令播放(即更新内部板)。使用仅播放,而仅打印,并且级别更改是通过和完成的。\mainlinevariationskakskak \variationskakxskak\mainline\variationinvaroutvar

这种差异意味着实际上不需要特殊的\continuevariation,只需将其映射到 即可\variation。这将避免错误,但您不会获得与 相同的输出:除非您添加和(最后一个仍然粗体变体显示了这一点),skak否则这两个命令都将使用主粗体样式。invaroutvar

\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}

在此处输入图片描述

相关内容