# wrapping up cell contents

My friends, in the following table, in the first row specifying the column names, I would like to move the "Nominal" and "Wholesale" to the next line (but of course in the same cell).

I would also like to center the contents of those two columns. Please suggest

\documentclass{article}
%\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{calc}
\begin{document}

% Table generated by Excel2LaTeX from sheet 'Sheet2'
\begin{table}[htbp]
\noindent\hspace*{-1cm}\begin{tabularx}{\textwidth+2cm}{
>{\raggedright\arraybackslash}X
}

\toprule
\multicolumn{1}{c}{Country} & Price series selected & Retail/Wholesale & Real/Nominal &     Location \\
\midrule
Afghanistan & Bread & R     & R     & Kabul \\
\bottomrule
\end{tabularx}\hspace*{-1cm}%
\label{Selected food price series}%
\end{table}%
\end{document}

-

\multicolumn{1}{c}{Country} & Price series selected &
\centering Retail/\\Wholesale &
\centering Real/\\Nominal &     Location \\


or in full:

\documentclass{article}
%\usepackage{showframe}% http://ctan.org/pkg/showframe
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{array}% http://ctan.org/pkg/array
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{calc}
\begin{document}

% Table generated by Excel2LaTeX from sheet 'Sheet2'
\begin{table}[htbp]
\noindent\hspace*{-1cm}\begin{tabularx}{\textwidth+2cm}{
>{\centering}X
}

\toprule
\centering Country & Price series selected & Retail/\\Wholesale &  Real/\\Nominal &     Location \\
\midrule
Afghanistan & Bread & R     & R     & Kabul \\
\bottomrule
\end{tabularx}\hspace*{-1cm}%
\label{Selected food price series}%
\end{table}%
\end{document}

-
Carisle: Thanks. I would also like to center align the contents of columns 3 and 4 as well. The problem I face is that once I substitute center for the corresponding raggedright, the column contents (of columns 3 and 4) including the top row, slide downwards relative to others. Any idea why? –  Abhimanyu Arora May 20 '12 at 13:03
I suspect you used \center (the internal part of begin{center} rather than \centering the center environment adds vertical space, I'll add a doc to my answer –  David Carlisle May 20 '12 at 13:53