[Tex/LaTex] Vertical spacing in tabular environment

tablesvertical alignment

https://en.wikibooks.org/wiki/LaTeX/Tables#Text_wrapping_in_tables

In the link above, they give a description of a tabular environment and I need to have something similar. However, I would like the first and second column to be vertically centered. I've tried the array package and using m{...} but this doesn't seem to work. Can anyone help me with this? Thanks!

For example, this

\documentclass{article}

\usepackage[english]{babel}
\usepackage{array}

\begin{document}

\begin{center}
    \begin{tabular}{ | m{2cm} | l | l | p{5cm} |}
    \hline
    Day & Min Temp & Max Temp & Summary \\ \hline
    Monday & 11C & 22C & A clear day with lots of sunshine.  
    However, the strong breeze will bring down the temperatures. \\ \hline
    Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells 
    across most of Scotland and Northern Ireland, 
    but rain reaching the far northwest. \\ \hline
    Wednesday & 10C & 21C & Rain will still linger for the morning. 
    Conditions will improve by early afternoon and continue 
    throughout the evening. \\
    \hline
    \end{tabular}
\end{center}

\end{document}

The result, is almost the same as the image on wikibooks, there is no vertical centering whatsoever.

Best Answer

I've tried the array package and using m{...} but this doesn't seem to work.

Changing p{5cm} to m{5cm}, i.e., changing

\begin{tabular}{ | l | l | l | p{5cm} |}

to

\begin{tabular}{ | l | l | l | m{5cm} |}

should achieve what you're looking for.

enter image description here

\documentclass{article} 
\usepackage{array} % for 'm' column type
\begin{document}
With width specified:
\begin{center}
    \begin{tabular}{ | l | l | l | m{5cm} |}
    \hline
    Day & Min Temp & Max Temp & Summary \\ \hline
    Monday & 11C & 22C & A clear day with lots of sunshine.  
    However, the strong breeze will bring down the temperatures. \\ \hline
    Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells 
    across most of Scotland and Northern Ireland, 
    but rain reaching the far northwest. \\ \hline
    Wednesday & 10C & 21C & Rain will still linger for the morning. 
    Conditions will improve by early afternoon and continue 
    throughout the evening. \\
    \hline
    \end{tabular}
\end{center}
\end{document}
Related Question