# [Tex/LaTex] Drawing an empty chess board with good portability

pdftex

I would like to make chess board, which will be empty.
I would like that it can be compiled using PDFLATEX on most tex/texlive/…
I would like that the lines for black squares are sort of lines (diagonal), as in the example.

The usual starting code is this one:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[x=1cm]
\foreach \x in {0,...,7} \foreach \y in {0,...,7}
{
\pgfmathparse{mod(\x+\y,2) ? "black" : "white"}
\edef\colour{\pgfmathresult}
\path[fill=\colour] (\x,\y) rectangle ++ (1,1);
}
\draw (0,0)--(0,8)--(8,8)--(8,0)--cycle;
\end{tikzpicture}
\end{document}


Best regards

Just in case you need uppercase labels, here is the PSTricks solution.

\documentclass[pstricks,border=5mm]{standalone}
\begin{document}
\begin{pspicture}(-.5,-.5)(8,8)
\multips(0,0)(2,0){4}{
\multips(0,0)(0,2){4}{
\psset{fillstyle=vlines,linestyle=none,hatchangle=-45,hatchsep=1pt}
\psframe(1,1)
\psframe(1,1)(2,2)
}
}
\psframe(8,8)
\foreach \i in {0,1,...,7}{