When I put X
in column specifier, how can I define column formatting? How can I get center alignment? Currently I am putting \centering
, but that is not a proper solution.
This is my code:
\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{patterns}
\usepackage{booktabs,tabularx}
\usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry
\begin{document}
\begin{table}[t]
\caption{Case studies}
\centering
\begin{tabularx}{\textwidth}{p{4cm}*{5}{X}}
\toprule
\centering Nature of unreliability & \centering Sender SST & \centering Receiver SST & \centering Implementation SST & Retransmission Bound \\
\midrule
Noisy (Single fixed error message) & DSST & DSST & DSST & Unbounded \\
\bottomrule
\end{tabularx}
\label{case-studies}
\end{table}
\end{document}
\centering
is the proper solution. But if you use it in the last column you should use\tabularnewline
to end the row of the tabular.>{\centering \arraybackslash}X
as it suggests in the tabularx manual.>{\centering \arraybackslash}X
does not suffice.