
답변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}