[Tex/LaTex] Formatting raggedright in booktabs. Why am I getting a \noalign error

booktabserrorstables

I have a \sidewaystable that is also a \threeparttable. I'm trying to produce it using booktabs. In the shape columns there are words with more than 8 letters that TeX keeps hyphenating. The column widths have been set to their current values to ensure that the entire table fits on an A4 page.

Whether or not I include the \noalign{smallskip} after the \toprule and \midrule I get the error:

! Misplaced \cr.
\reserved@c ->\ifnum 0=`{}\fi \cr 

l.34 \toprule
             \noalign{smallskip}
? 

Here is an example

\documentclass[12pt,a4paper,openleft,draft]{report}
\usepackage[lmargin=4.0cm, rmargin=2.5cm,tmargin=3cm,bmargin=2.5cm]{geometry}
\usepackage{natbib}
\usepackage{mathpazo}    
\usepackage{overpic}
\usepackage[margin=10pt,font=small,labelfont=bf,labelsep=period,singlelinecheck=false]{caption}
\usepackage{threeparttable}
\usepackage{rotating}
\usepackage{units}
\usepackage{sectsty}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{setspace}
\usepackage{url}
\usepackage[english]{babel}
\usepackage{booktabs}
\usepackage{slantsc}
\usepackage{amsmath}
\usepackage{MnSymbol}
\usepackage{array}


\begin{document}

\begin{sidewaystable}[htp]
\begin{scriptsize}
\begin{center}
\caption{Key morphological characteristics}
\label{tab:cycadnmorph}
\begin{threeparttable}
\begin{tabular}
{>{\raggedright}p{3.05cm}>{\raggedright}p{0.6cm}>{\raggedright}p{1.5cm}>{\raggedright}p{2cm}>{\raggedright}p{1.75cm}>{\raggedright}p{1.75cm}>{\raggedright}p{0.25cm}>{\raggedright}p{2cm}>{\raggedright}p{1.5cm}>{\raggedright}p{1.75cm}>{\raggedright}p{1.75cm}}}
\tabularnewline
\toprule\noalign{smallskip}
&&C&&&&&H&&&\tabularnewline
\cmidrule{3-6}
\cmidrule{8-11}
Species&OTU\tnote{a}&Cells\tnote{b}&Shape&Length\tnote{c}&Width\tnote{c}&&Shape&(\%)\tnote{d}&Length\tnote{c}&Width\tnote{c}\tabularnewline
\midrule\noalign{smallskip}
\emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline
\emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline
\emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline
\emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline
\bottomrule
\end{tabular}
\begin{tablenotes}
\item [a] Data adapted.
\item [b] ND, no data.
\item [c] Accession numbers
\item[d] D
\end{tablenotes}
\end{threeparttable}
\end{center}
\end{scriptsize}
\end{sidewaystable}



\end{document} 

Best Answer

The command to use is \addlinespace; you have also a wrong }:

\begin{threeparttable}
\begin{tabular}{
  >{\raggedright}p{3.05cm}
  >{\raggedright}p{0.6cm}
  >{\raggedright}p{1.5cm}
  >{\raggedright}p{2cm}
  >{\raggedright}p{1.75cm}
  >{\raggedright}p{1.75cm}
  >{\raggedright}p{0.25cm}
  >{\raggedright}p{2cm}
  >{\raggedright}p{1.5cm}
  >{\raggedright}p{1.75cm}
  >{\raggedright}p{1.75cm}
}
\toprule\addlinespace[\smallskipamount]

However, I don't think that adding such a space is needed.

There are other points where your code can be improved. For example, defining

\newcolumntype{P}[1]{>{\raggedright}p{#1}}

in the preamble, your tabular preamble can be reduced to

\begin{tabular}{
  P{3.05cm}
  P{0.6cm}
  P{1.5cm}
  P{2cm}
  P{1.75cm}
  P{1.75cm}
  P{0.25cm}
  P{2cm}
  P{1.5cm}
  P{1.75cm}
  >{\arraybackslash}P{1.75cm}
}

so that you're not required to use \tabularnewline for ending table rows.

The table enclosure can be more simply

\begin{sidewaystable}[htp]
\caption{Key morphological characteristics}
\label{tab:cycadnmorph}
\centering\scriptsize
\begin{threeparttable}
...<the tabular>...
\begin{tablenotes}
\item [a] Data adapted.
\item [b] ND, no data.
\item [c] Accession numbers
\item[d] D
\end{tablenotes}
\end{threeparttable}
\end{sidewaysttable}
Related Question