Can anyone tell me how to center the last column of the table, in which the last column is defined with the format "p{width}".
I tried using \centering before that column, which produces error saying "Misplaced \noalign"
Herewith i am enclosing the MWE,
Code: Select all
\documentclass[b5paper,11pt]{book}
\usepackage{fancybox,array,amsmath,ulem,amssymb}
\usepackage[centering,
headheight=14pt,
headsep=10pt,
includehead,
papersize={18cm,24cm},
text={15.25cm,19.2cm},
dvips=false,
pdftex=false,
vtex=false
]{geometry}
\usepackage[cam,a4,center,dvips]{crop}
\usepackage{graphicx,colortbl}
\usepackage{fancyhdr,setspace,rotate}
\usepackage{threeparttable,booktabs,multirow,lscape}
\begin{document}
\begin{table}[!ht]
\centering
\small
\begin{tabular}{p{0.7in}p{0.7in}p{1.3in}cc>{\centering}p{1in}}
\toprule
\textbf{A} & \textbf{P} & \textbf{T} & \textbf{C} & \textbf{TC} & \textbf{S}\\ \midrule
- & 24 & 3900 & $24\times 375=9000$ & 12900 & -\\ \bottomrule
\end{tabular}
\end{table}
\end{document}
Expecting your suggestions.
Thanks and regards,
Muthu.