我理解包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
不同的看法。使用更改级别,还尝试使用两个命令播放(即更新内部板)。使用仅播放,而仅打印,并且级别更改是通过和完成的。\mainline
variation
skak
skak
\variation
skak
xskak
\mainline
\variation
invar
outvar
这种差异意味着实际上不需要特殊的\continuevariation
,只需将其映射到 即可\variation
。这将避免错误,但您不会获得与 相同的输出:除非您添加和(最后一个仍然粗体变体显示了这一点),skak
否则这两个命令都将使用主粗体样式。invar
outvar
\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}