1

I used \parbox to auto-wrap the text, but it should be centered. How can I do?

enter image description here

\begin{table}[H]
    \centering
        \begin{tabular}{cW{5}W{5}}
        \toprule
        & {\bf Cost} & {\bf Benefit}\\
        \midrule
        \multirow{3}{*}{\bf Social} & Possible land competition & Less air pollution \\
                                & \multirow{2}{*}{\parbox{5cm}{Possible increase of extraction of wood from forest}} & Less medical expenses \\
                                & & More labour available \\
            \bottomrule
        \end{tabular}
\end {table}
  • try \parbox{5cm}{\centering Possible increase of extraction of wood from forest} – touhami Oct 20 '15 at 12:54
  • Where is the W column type defined? – Bernard Oct 20 '15 at 12:56
  • There is no need to use parbox here you can simply specify a width instead of * to multirow and it will use a p column. You shouldn't be using \bf in latex (it is not defined by default) – David Carlisle Oct 20 '15 at 13:22
2

I think you are making the markup far more complicated than needed (and please always make your examples complete so people can run them) Something like:

enter image description here

\documentclass{article}
\usepackage{array,booktabs}
\begin{document}

\noindent X \dotfill X

\begin{table}
\centering
\begin{tabular}{c*{2}{>{\centering\arraybackslash}m{4.9cm}}}
\toprule
& \bfseries Cost & \bfseries Benefit\\
\midrule
\bfseries Social
& 
Possible land competition 

Possible increase of extraction of wood from forest
& 
Less air pollution 

Less medical expenses

More labour available \\
\bottomrule
\end{tabular}
\end {table}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.