I'm trying to draw a tabular with all square cell.
This is my code:
\documentclass[a4paper,11pt,titlepage,oneside]{book}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[table]{xcolor}
\usepackage{caption}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{| >{\centering\arraybackslash}m{1cm} | >{\centering\arraybackslash}m{1cm} | >{\centering\arraybackslash}m{1cm} |}
\hline
\rule[1cm]{0pt}{0ex}A & B & C \\
\hline
\rule[1cm]{0pt}{0ex}D & \cellcolor[HTML]{333333} & \cellcolor[HTML]{333333}{\color[HTML]{333333} } \\
\hline
\rule[1cm]{0pt}{0ex}E & F & G \\
\hline
\end{tabular}
\captionsetup{justification=centering,margin=1cm}
\caption[Squares}
\label{Squares}
\end{figure}
\end{document}
But the content is not centered inside the cell anymore.
Best Answer