# How can I get skak to highlight squares

I'm completely new to TeX/LaTeX so I could be missing something easy. I'm trying to create a simple chess board diagram with highlighted squares via the "skak" package. Here is a test case:

\documentclass{article}
\usepackage[ps]{skak}
\begin{document}
\newgame
\showmoverOn
\notationOff
\showboard
\highlight{a1,a3}
\highlight[x]{c1,c3}
\highlight[X]{c4}
\highlight[o]{d6}
\highlight[O]{c6}
\printarrow{e2}{e4}
\printknightmove{g8}{f6}
\end{document}

Based on the reading I've done, this should result in several highlighted/marked squares - however it does not. It compiles fine and results in a board with all the pieces, but no markings at all.

I'm compiling it with the latex command on Ubuntu Lucid if that's relevant. Skak is version 1.5 (the latest).

Any thoughts?

-

Apparently it depends on how you compile to produce your document and, because of the ps option, you have to go the long route

> latex board.tex
> dvips board.dvi
> ps2pdf board.ps

Doing this I was able to obtain the markings on the board as you expected.

-
Ok, that's really strange. The marking don't show up in the .dvi file - but they do in the .ps and .pdf files? I thought all the processing was complete when the .dvi file was produced. Is the dvips command adding these marking in somehow or perhaps the dvi viewer I'm using doesn't render the dvi file properly? – MPT Nov 11 '10 at 22:31
Usually the .dvi is just a “preview” of the final document and some effects, specially postscript effects, sometimes do not show in the .dvi. The best thing would be to find a chess package that can produce pdf directly (using pdflatex), but I have no idea about that. – Juan A. Navarro Nov 11 '10 at 22:35
Excellent, thank you. My first day with LaTeX and I've learned some valuable lessons. To the best of my knowledge skak is the best available package for this. I have no problem running the three step process. – MPT Nov 11 '10 at 22:56
@MPT: by the way, there is a simpdftex command in TeX Live that does the three steps automatically, just do simpdftex latex file.tex. A more advanced option is latexmk -pdfps file.tex which automatically takes care of running latex as many times as needed to get cross-references right, and more... – mpg Nov 12 '10 at 2:08
@Ulrike, I think these are very good suggestions, and it would be extremely useful if you can post a simple example using either of those with pdflatex. – Juan A. Navarro Nov 12 '10 at 10:38