Adpated from chessboard manual (and edited per comments below):
\documentclass{article}
\usepackage{chessboard}
\storechessboardstyle{4x4}{maxfield=d4}
\begin{document}
\chessboard[style=4x4,setwhite={Qa1,Qd2},showmover=false]
\end{document}
Without foreach but with grids. Drawing the interrupted chess board is as simple as saying
\draw[step=5mm,line cap=rect] (0,0) grid (3.6,-3.6) (4.4,0) grid (5,-3.6)
(0,-5) grid (3.6,-4.4) (5,-5) grid (4.4,-4.4);
This exploits that the grid lines are "on grid". The dotted lines/ellipses are as simple as
\draw[Dotted,thick,step=1.5cm] (3.75,-3.75) -- (4.25,-4.25)
[yshift=-2.5mm] (3.75,0) grid[xstep=0] (4.25,-4.75)
[yshift=2.5mm,xshift=2.5mm] (0,-3.75) grid[ystep=0] (4.75,-4.25);
A big chunk of the following code is the definition of a fully customizable round dotted line style and acknowledging its source.
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[Dotted/.style={% https://tex.stackexchange.com/a/52856/194703
dash pattern=on 0.1pt off 2mm,line cap=round,line width = 2pt,
shorten <=2.5mm,shorten >=2.5mm}]
\draw[step=5mm,line cap=rect] (0,0) grid (3.6,-3.6) (4.4,0) grid (5,-3.6)
(0,-5) grid (3.6,-4.4) (5,-5) grid (4.4,-4.4);
\draw[Dotted,thick,step=1.5cm] (3.75,-3.75) -- (4.25,-4.25)
[yshift=-2.5mm] (3.75,0) grid[xstep=0] (4.25,-4.75)
[yshift=2.5mm,xshift=2.5mm] (0,-3.75) grid[ystep=0] (4.75,-4.25);
\end{tikzpicture}
\end{document}
Best Answer
Using
chessboard
, you can setboardfontsize
;labelfontsize
will allow changes to the font size for the labels: