
答案1
除非你使用特定於國際象棋的東西,否則我會使用蒂克茲而不是斯卡克。基本思想蒂克茲是使用\draw
帶有 xy 座標的指令。以下是產生陰影 2x2 正方形的一種方法:
\documentclass{article}
\usepackage{tikz}
% \BackSquares{ list of south west coordinates of squares to fill }
\newcommand\BlackSquares[1]{
\begin{tikzpicture}
\draw[ultra thick](0,0) rectangle (2,2);
\draw[ultra thick](0,1)--(2,1);
\draw[ultra thick](1,0)--(1,2);
\foreach \sq in {#1} {\draw[fill=black]\sq rectangle ++(1,1);}
\end{tikzpicture}
}
\begin{document}
\BlackSquares{{(0,0)},{(1,0)}}
\BlackSquares{{(0,0)},{(0,1)}}
\BlackSquares{{(0,0)},{(1,1)}}
\BlackSquares{{(1,0)},{(0,1)}}
\end{document}