4

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?

1 Answer 1

5

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.

8
  • 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
    Commented Nov 11, 2010 at 22:31
  • 3
    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. Commented Nov 11, 2010 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
    Commented Nov 11, 2010 at 22:56
  • 1
    \begin{advertising} I would suggest a look at the packages xskak and chessboard \end{advertising} Commented Nov 12, 2010 at 10:07
  • 1
    @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. Commented Nov 12, 2010 at 10:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .