[Tex/LaTex] Table Cell Alignment – Last Column ‘Misbehaving’ – Simultaneous Vertical and Horizontal Alignment Problems

columnshorizontal alignmenttablesvertical alignment

I am going a little crazy with alignment in the tabular environment.

In the following code I would like both the top-left cell 'Green Die', and the last cell in the 2nd row '6' to be aligned vertically.

I know the alignment issues with the cell '6' have to do with it being the last column, because if I make it the second to last column it is aligned in the middle.

Thanks in advance for any and all help!

\documentclass[11pt]{article}   
\usepackage{array, multirow}
\begin{document}

\newcolumntype{S}{>{\centering\arraybackslash} m{1.2cm} }
\begin{tabular}{|S|S|S|S|S|S|S|}
\hline

\multirow{2}{1.2cm} {\centering Green Die}&\multicolumn{6}{|c|} {Red Die} \\ \cline{2-7}

&1&2&3&4&5& 6\\ [4pt] \hline
1& 1+1=2&&&&&\\ [4pt]\hline
2&&&&&&\\[4pt] \hline
3&&&&&&\\[4pt] \hline
4&&&&&&\\ [4pt]\hline
5&&&&&&\\[4pt] \hline
6&&&&&&\\ [4pt]\hline
\end{tabular}

\end{document}

Best Answer

\documentclass[11pt]{article}    
\usepackage{array,ragged2e}
\newcolumntype{S}[1]{>{\Centering}m{#1}}

\begin{document}

\def\arraystretch{1.5}
\begin{tabular}{|*{7}{S{1.2cm}|}}\hline
\makebox(0,-10){\parbox{1.2cm}{\centering Green Die}} 
     & \multicolumn{6}{c|} {Red Die} \\\cline{2-7}
 & 1 & 2 & 3 & 4 & 5 & 6\\ \hline
1& 1+1=2&&&&&\\\hline
2&&&&&&\\\hline
3&&&&&&\\\hline
4&&&&&&\\\hline
5&&&&&&\\\hline
6&&&&&&\\\hline
\end{tabular}

\end{document}

enter image description here