\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{skak}
\begin{document}
\mainline{1.e4}
\showboard
\lastmove{} Is the most common opening move
\mainline{1...e5 2.Nf3 Nc6 3.d4}
\showboard
\mainline{3...e5xd4 4.Bb5 a6 5.O-O}
\showboard
\end{document}
给出错误
“段落在\FenBoard
完成之前结束”
为什么?
答案1
文档中的示例skak
以 开头\newgame
。在第一个之前添加它\mainline
可以修复错误:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{skak}
\begin{document}
\newgame % Added
\mainline{1.e4}
\showboard
\lastmove{} Is the most common opening move
\mainline{1...e5 2.Nf3 Nc6 3.d4}
\showboard
\mainline{3...e5xd4 4.Bb5 a6 5.O-O}
\showboard
\end{document}