在 xskak 循环中添加注释和从-到箭头

在 xskak 循环中添加注释和从-到箭头

我想在 skak 循环中添加带有从-到箭头的注释。在下面的代码中,只显示箭头,而不显示注释

\documentclass{beamer}
\usepackage{xskak, chessboard}
\setbeamertemplate{navigation symbols}{}

\makeatletter
\providecommand\xskak@beforecomment{} %ups a bug, definition is missing
\makeatother

\begin{document}
\newcommand\getmovestyle[1]{%
\ifthenelse
  {\equal{#1}{N}}%knight move
  {\def\mymovestyle{[clockwise=false,style=knight]curvemove}}%
  {\ifthenelse
    {\equal{#1}{}}% castling
    {\def\mymovestyle{curvemove}}%
    {\def\mymovestyle{straightmove}}}}%

\begin{center}
\[\newchessgame\]
\hidemoves{1.d4 \xskakcomment{ That's a good move! } 
 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.Nge2 O-O 6.Ng3 c6 7.Be2 a6 8.a4 a5 9.h4 h5 10.Be3 Na6 11.f3 e5 12.d5 Nd7 13.Nf1 Ndc5 14.Nd2 Qb6 15.Qb1 Nb4 16.Nb3 Ncd3+ 17.Kd2 Qxe3+}
\xskakloop{%
\getmovestyle{\xskakget{piecechar}}%
\chessboard[normalboard,%largeboard,
 pgfstyle=\mymovestyle, color=blue,
  markmoves=\xskakget{move}, pgfshortenend=0.3em, arrow=to, coloremph, color=red, markstyle=circle, markfield=\xskakget{movefrom},
  emphfields=\xskakget{moveto}, setfen=\xskakget{nextfen}]
  }% End of \xskakloop...
\end{center}
\end{document}

相关内容