I'm trying to get the 'N' in the first column to appear in the middle, not at the top. The code is below:
\documentclass{article}
\usepackage{array}
\usepackage{caption}
\captionsetup{labelformat=empty}
\usepackage[euler]{textgreek}
\usepackage{booktabs,tabularx}
\usepackage[margin=1in]{geometry} % set margins to meet your document's needs
\newcolumntype{Y}{>{\centering\arraybackslash}X}
% use ragged-right, not fully-justified, look in narrow columns
\begin{document}
\begin{table}[t]
\caption{Table 2: Length and distance between ditropic contexts in the reading material (measured in words)}
%\centering % not needed, since table is as wide as text block
\begin{tabularx}{\textwidth}{@{}lYYYYYY@{}}
\toprule
& {\bfseries N}
&\multicolumn{3}{c}{\bfseries Length}
&\multicolumn{2}{c}{\bfseries Distance} \\
\cmidrule(l){3-5} \cmidrule(l){6-7}
&& tokens
& \textmugreek
& \textsigma
& \textmugreek
& \textsigma\\
\midrule
entire text & --- & 1855 & 14.4 & 6.5 & --- & --- \\
all contexts & 17 & 225 & 13.2 & 5.2 & 91.2 & 68.7 \\
idioms & 9 & 33 & 3.7 & 0.8 & --- & ---\\
idiomatic contexts & 8 & 110 & 13.8 & 5.6 & 170.4 & 110\\
literal contexts & 9 & 115 & 12.8 & 4.7 & 194.4 & 173.4 \\
ditropic pairs & 9 & 225 & --- & --- & 882 & 374.6 \\
\bottomrule
\end{tabularx}
\caption{the entire text contained 129 sentences}
\end{table}
\end{document}
Thanks.
Came up with a similar solution in the meantime (thanks a lot for your help, will include the improvements):
\usepackage{multirow}
\begin{tabularx}{\textwidth}{@{}lYYYYYY@{}}
\toprule
&\multirow{2}{*}[-2pt]{\bfseries N}
&\multicolumn{3}{c}{\bfseries Length}
&\multicolumn{2}{c}{\bfseries Distance} \\
\cmidrule(l){3-5} \cmidrule(l){6-7}