[Tex/LaTex] Chess Notation with skak: How to highlight squares

chesshighlightingskak

i'm using the skak-package for some chess notation in a presentation. My only issue: How can i highlight various squares on the chessboard? Basic:

\documentclass[12pt]{beamer}
\usepackage{skak}

\begin{document}
\begin{frame}
\newgame
\fenboard{8/8/8/3Q4/8/8/8/8 w - - 0 0} % FEN-notation, only one Queen
\showboard
\end{frame}
\end{document}

For example, i want to show the possible movements for a Queen on the board. I've tried the \highlight{} command (see below), but it throws errors.

\documentclass[12pt]{beamer}
\usepackage{skak}

\begin{document}
\begin{frame}
\newgame
\fenboard{8/8/8/3Q4/8/8/8/8 w - - 0 0} % FEN-notation, only one Queen
\showboard
\highlight{d4,d6}
\end{frame}
\end{document}

Shown Error: !Undefined control sequence. <recently read> \c@lor@to@ps l.49 \end{frame}.
I use Texmaker with PdfLatex.

So, whats wrong?

Best Answer

For the highlighting skak uses pstricks and you must load skak with the ps-Option:

 \usepackage[ps]{skak}

But I would suggest to use chessboard instead which will work with pdflatex:

\documentclass[12pt]{beamer}
\usepackage{skak} %or xskak
\usepackage{chessboard}
\begin{document}
\begin{frame}
\newgame
\chessboard[setfen=8/8/8/3Q4/8/8/8/8 w - - 0 0,
            pgfstyle=border,markfields={d4,d6},
            color=blue!50,
            colorbackfield=c5,
            pgfstyle=color,
            opacity=0.5,
            color=red,
            markfield={d5}] 
\end{frame}
\end{document}

enter image description here