![如何更改 xskak 循环注释中某些文本的颜色和属性](https://linux22.com/image/359799/%E5%A6%82%E4%BD%95%E6%9B%B4%E6%94%B9%20xskak%20%E5%BE%AA%E7%8E%AF%E6%B3%A8%E9%87%8A%E4%B8%AD%E6%9F%90%E4%BA%9B%E6%96%87%E6%9C%AC%E7%9A%84%E9%A2%9C%E8%89%B2%E5%92%8C%E5%B1%9E%E6%80%A7.png)
如何更改注释内部分文本的颜色和字体大小;使用以下代码。
\documentclass{beamer}
\usepackage{xskak, chessboard}
\usepackage{verbatim}
\setbeamertemplate{navigation symbols}{}
\makeatletter
\providecommand\xskak@beforecomment{}
\makeatother
\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{document}
\begin{center}
\newchessgame
\hidemoves{
1. d4 e6 2. e4 d5 3. Nc3 c5 \xskakcomment{the next move determines the progress of the game}
}
\xskakloop{%
\getmovestyle{\xskakget{piecechar}}
\chessboard[normalboard,
pgfstyle=\mymovestyle, color=blue!50,
markmoves=\xskakget{move}, pgfshortenend=0.3em, arrow=to, markstyle=\dots\, markfield=\xskakget{movefrom},
emphfields=\xskakget{moveto}, setfen=\xskakget{nextfen}]\\
\xskakget{opennr}
\xskakget{lan}
\xskakget{nag}
\par
}
\end{center}
\end{document}
答案1
尝试这个
\xskakcomment{the \textcolor{red}{next} {\Huge move} determines the progress of the game}