how to split the table heading in booktabs?

how to split the column headings? How do I get newline after some word? When I put \\, it changes the alignment badly.

This is my code:

\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{patterns}
\usepackage{booktabs,tabularx}

\begin{document}

\begin{table}[t]
%\setlength{\tabcolsep}{6.2 pt}
\caption{Case studies}
\centering
\begin{tabularx}{\textwidth}{p{3cm}ccccc}
\toprule
\centering Nature of unreliability &  Sender SST & Receiver SST & Implementation SST & Retransmission Bound & Decidability\\

\midrule

Noisy (Single fixed error message) & DSST & DSST & DSST & Unbounded & Yes\\
\bottomrule
\end{tabularx}
\label{case-studies}
\end{table}

\end{document}


This what I got:

I just want to split the column title in two rows. How do I do that?

-

You need a column type that allows for wrapping of its contents, like p{<len>}, m{<len>} (from the array package) or X (from tabularx). Regular c-, l- and r-columns do not break their contents naturally. Since you're using tabularx, the following might be what you're after:

\documentclass{article}
\usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{booktabs,tabularx}% http://ctan.org/pkg/{booktabs,tabularx}

\begin{document}

\begin{table}[t]
\centering
\caption{Case studies}\label{case-studies}
\begin{tabularx}{\textwidth}{p{3cm}*{5}{X}}
\toprule
\centering Nature of unreliability &  Sender SST & Receiver SST & Implementation SST & Retransmission Bound & Decidability \\
\midrule
Noisy (Single fixed error message) & DSST & DSST & DSST & Unbounded & Yes \\
\bottomrule
\end{tabularx}
\end{table}

\end{document}


I've used geometry just to set the tabularx in better light; the margin of the default article wasn't wide enough to showcase the typesetting.

-