質問: I'm trying to draw a checkerboard (chessboard) pattern, but there is a problem. Is it possible to draw it, such that there is no space at all, between rows and columns? Failed attempt one: (rows and columns are spaced) $$ \begin{array}{} \color{black}{\Rule{5mm}{5mm}{0mm}}&\color{magenta}{\Rule{5mm}{5mm}{0mm}}&\color{black}{\Rule{5mm}{5mm}{0mm}}\\ \color{magenta}{\Rule{5mm}{5mm}{0mm}}&\color{black}{\Rule{5mm}{5mm}{0mm}}&\color{magenta}{\Rule{5mm}{5mm}{0mm}}\\ \color{black}{\Rule{5mm}{5mm}{0mm}}&\color{magenta}{\Rule{5mm}{5mm}{0mm}}&\color{black}{\Rule{5mm}{5mm}{0mm}} \end{array} $$ Failed attempt two: (rows are spaced) $$\begin{aligned}{} \color{black}{\Rule{5mm}{5mm}{0mm}}\color{magenta}{\Rule{5mm}{5mm}{0mm}}\color{black}{\Rule{5mm}{5mm}{0mm}}\\[-5mm] \color{magenta}{\Rule{5mm}{5mm}{0mm}}\color{black}{\Rule{5mm}{5mm}{0mm}}\color{magenta}{\Rule{5mm}{5mm}{0mm}}\\[-5mm] \color{black}{\Rule{5mm}{5mm}{0mm}}\color{magenta}{\Rule{5mm}{5mm}{0mm}}\color{black}{\Rule{5mm}{5mm}{0mm}} \end{aligned}$$ > > How to remove space between rows? > > >
回答: Not perfect, but hopefully close to what you want: $$\begin{aligned}{} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{black}{\Rule{10mm}{10mm}{0mm}} \color{magenta}{\Rule{10mm}{10mm}{0mm}} \color{black}{\Rule{10mm}{10mm}{0mm}} \end{aligned} $$ $$\begin{aligned}{} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{magenta}{\Rule{10mm}{10mm}{0mm}} \color{black}{\Rule{10mm}{10mm}{0mm}} \color{magenta}{\Rule{10mm}{10mm}{0mm}} \color{black}{\Rule{10mm}{10mm}{0mm}} \end{aligned} $$ ``` $$\begin{aligned}{} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{black}{\Rule{10mm}{10mm}{0mm}} \color{magenta}{\Rule{10mm}{10mm}{0mm}} \color{black}{\Rule{10mm}{10mm}{0mm}} \end{aligned} $$ $$\begin{aligned}{} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}} \color{black}{\Rule{10mm}{10mm}{1mm}} \color{magenta}{\Rule{10mm}{10mm}{1mm}}\\[-1em] \color{magenta}{\Rule{10mm}{10mm}{0mm}} \color{black}{\Rule{10mm}{10mm}{0mm}} \color{magenta}{\Rule{10mm}{10mm}{0mm}} \color{black}{\Rule{10mm}{10mm}{0mm}} \end{aligned} $$ ```