# Wrap text using m{…cm} and array package does not work

I am trying to wrap the text using the command m{2.7cm} with array package in this table, but this does not work together. If I use p{2.7cm} without array package it works, but the text is not centralized inside the cell. Please, somebody can help me?

\begin{table}[h!]
\begin{center}

\caption{Reported trends regarding the temperature cycle.}
\label{Trends_temp_cycle} \smallskip \smallskip

\begin{tabular}{|c||*{3}{m{2.7cm}|}}\hline

\backslashbox{\vspace{1mm}Modified\\ variable}{\\\vspace{1mm}Affected\\ variable}
&\makebox[3em]{$T_{c}$}&\makebox[3em]{$T_{d}$}&\makebox[3em]{$\eta_{h0}$}\\\hline\hline
$\uparrow$$\dot\gamma_{h} & \approx constant \cite[]{webber-99} & -- & --\\\hline \uparrow$$\dot T_{h}$ & $\downarrow$\cite[]{webber-99} & $\approx$ constant \cite[]{webber-99} & $\uparrow$\cite[]{webber-99}\\\hline

\end{tabular}

\end{center}
\end{table}

-

## 1 Answer

The m type does not center its contents horizontally, but rather vertically. All you need is to say

\begin{tabular}{|c||*{3}{>{\centering\arraybackslash}p{2.7cm}|}}


still loading the array package.

Dont use [h!] as the only argument, as it can cause this and all the subsequent tables to go at the end of the chapter, in case the present table doesn't fit.

Don't use the center environment, but the simple declaration \centering inside the table environment.

-
I removed both the \begin{center} and \end{center} and instead of *{3}{m{2.7cm} I used *{3}{>{\centering\arraybackslash}p{2.7cm}} but the following error ocurred: –  Flávio Marchesini Jun 23 '11 at 18:09
Runaway argument? {|c||*{3}{\centering p{2.7cm}|} \hline \backslashbox {\vspace {1mm}Mo\ETC. ! Paragraph ended before \@@array was complete. –  Flávio Marchesini Jun 23 '11 at 18:09
Thank you for the advices... You are right about the argument [h!], the center environment and the m type. Unfortunately, the suggestion \begin{tabular}{|c||*{3}{>{\centering\arraybackslash}p{2.7cm}|}} –  Flávio Marchesini Jun 26 '11 at 16:45
did not work in my document, I do not know the reason. By the way, I used the p{2.7cm} argument, removed the array package and used \makebox[2.7cm]{....} inside each cell. The document is running now and the text is centralized inside each cell. –  Flávio Marchesini Jun 26 '11 at 16:52