# Strange behavior in tabular environment [duplicate]

Can someone explain why "B1" cell is not vertically centered and how to figure this out ?

\documentclass{article}

\usepackage{array}
\usepackage{amsmath}

\begin{document}

\newcolumntype{A}{>{\centering\arraybackslash}m{.2\textwidth}}
\newcolumntype{B}{>{\centering\arraybackslash}m{.3\textwidth}}
\newcolumntype{C}{>{\centering\arraybackslash}m{.2\textwidth}}
\newcolumntype{D}{>{\centering\arraybackslash}m{.15\textwidth}}

\begin{tabular}{|A|B|C|D|}
\hline C1 & C2 & C3 & C4 \\
\hline Type 1 &

$\begin{matrix} eq_1 \\ eq_2 \end{matrix}$

& A1  & B1 \\[3cm]
\hline
\end{tabular}

\end{document}


Thanks.

• Why are you asking for m columns? – egreg Nov 21 '15 at 10:51
• @egreg : Because m is suppose to do the job (vertical-alignment) and it doesn't ! – rhum187 Nov 21 '15 at 10:55
• It is a known problem: the vertical space is added to the last column. Add a row, instead: &&&\\[3cm] – egreg Nov 21 '15 at 11:01
• Ok, problem solved ! "It is a known problem" Well, not for me apparently ! The trick is to add a hidden column with @{}m{0pt}@{} Thanks egreg ! – rhum187 Nov 21 '15 at 11:08
• Don't worry: it's not easy to search the site, but the experienced users are here just for helping out. – egreg Nov 21 '15 at 11:09