5

I have a 12 by 12 chessboard which I have created using the following code with the chessboard package:

\documentclass{article}
\usepackage{chessboard}

\begin{document}
\setchessboard{
    showmover = false,
    maxfield = l12,
    boardfontsize=30pt,
    boardfontfamily=skaknew,
}
\chessboard
\end{document}

The result is a checkered chessboard. However, I am trying to make a Chad chessboard, so I would like to be able to get rid of the checkered board and leave it as a grid, like the chessboard on the Wikipedia article.

How do I do this?

3 Answers 3

3

Here is a solution with pieces, background color and walls, like in the Wikipedia article. Compile with pdflatex or lualatex.

Output of example code

\documentclass{article}
\usepackage[LSBC3,T1]{fontenc}
\usepackage{chessboard}
\begin{document}
\definecolor{mybgcolor}{RGB}{255,206,158}
\definecolor{mygridcolor}{RGB}{0,0,0}
\definecolor{myhighlightcolor}{RGB}{209,139,71}
\setchessboard{boardfontencoding=LSBC3,
    showmover = false,
    maxfield = l12,
    boardfontsize=30pt,
    boardfontfamily=skaknew,
    pgfstyle=border,
    color=mygridcolor,
    linewidth=0.5pt,
    markboard,
    pgfstyle=color,
    color=mybgcolor,
    backboard,
    color=myhighlightcolor,
    backregions={b3-b5,f3-f5,c6-e6,c2-e2,g8-g10,k8-k10,h11-j11,h7-j7},
    setwhite={rc5,rd5,re5,rc4,kd4,re4,rc3,rd3,re3},
    addblack={rh10,ri10,rj10,rh9,ki9,rj9,rh8,ri8,rj8},
}
\makeatletter
\let\color@endgroupORI\color@endgroup
\def\color@endgroup{\color@endgroupORI\pgfsetfillopacity{1}}
\def\cfss@whitefieldmaskcolor{\pgfsetfillopacity{0}\color{white}}
\def\cfss@blackfieldmaskcolor{\pgfsetfillopacity{0}\color{black}}
\def\cfss@whitefieldcolor{\pgfsetfillopacity{0}\color{white}}
\def\cfss@blackfieldcolor{\pgfsetfillopacity{0}\color{black}}
\makeatother
\chessboard
\end{document}
1
  • ​​​​​​​​​​​​​​​This is brilliant. Thank you so much.
    – absinthe
    Commented Sep 9, 2014 at 11:26
4

Add the following lines to the end of your \setchessboard options:

blackfieldcolor=white,
setfontcolors,
pgfstyle=border,linewidth=0.5pt,
markboard,

Here's what you get.

Result

2

Just for fun with PSTricks.

\documentclass[pstricks,border=10mm,12pt]{standalone}
\begin{document}
\begin{pspicture}(8,8)
    \psgrid[subgriddiv=1,gridlabels=0](8,8)
    \foreach \i in {1,...,8}
    {
        \uput[-90](!\i\space .5 sub -.1){\strut\char\numexpr\i+96}
        \uput[180](!-.1 \i\space .5 sub){\i}
    }
\end{pspicture}
\end{document}

enter image description here

You must log in to answer this question.

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