I want the code to give me a table with a fixed width, horizontally centered in the column. I've used >{\centering}
to do this in the tabular definition, but adding this to the last column changes the table completely and throws up a bunch of errors (including the \hline being at the wrong position). What am I doing wrong/ better ways to do this?
\documentclass{article}
\usepackage{array,booktabs}% http://ctan.org/pkg/{array,booktabs}
\begin{document}
\begin{table}[htbp]
\center
\caption{a table}
\centering
%\hskip-2cm \begin{tabular}{p{0.9cm}| cccccc}
\begin{center}
\small
\begin{tabular}
{>{\centering}m{1.3cm}| >{\centering}p{2.14cm}>{\centering}p{2.14cm}>{\centering}p{2.13cm}>{\centering}p{2.13cm}p{2.13cm}}
Angle ($ ^{\circ}$) \newline $\dot{m}$ (g/m/s) & 0 & 15 & 30 & 45 & 60 \\
\hline
\\
70
& 1
& 1
& 1
& 1
& 1 \\
70
& 1
& 1
& 1
& 1
& 1 \\
70
& 1
& 1
& 1
& 1
& 1 \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}
>{\centering\arraybackslash}
, not just>{\centering}
.\tabularnewline
instead of\\
to finish the row.>{\centering\arraybackslash}
fixes it!