Where I did wrong?
\begin{table}
\begin{center}
\begin{tabularx}{\textwidth}{YYYYYYY}
\toprule
\textbf{Style} & \multicolumn{2}{c}{\textbf{Yarn}} & & \multicolumn{2}{c}{\textbf{Count}} & \textbf{Weight} & \textbf{Thickness} \\
\cmidrule{2-3} \cmidrule{4-5}
& Warp & Fill & Ends & Picks & $[g/m^2]$ & $[mm]$\\
\midrule
Plain & TR 30S 3L & TR 30S 3L & $4.87$ & $4.87$ & 200 & $0.23$ \\
\bottomrule
\end{tabularx}
\caption{Caption}
\end{center}
\end{table}
thanks for help!
Best Answer
Here are some suggestions on how you may want to streamline your code:
Use left- and right-clipping of the
\cmidrule
lines to better;there's no need to use a
center
environment because the width of thetabularx
environment is set to\textwidth
;don't typeset units of measurement in math italics -- consider using the
\si
macro of thesiunitx
package instead;when using a smaller-than-normal font size for a table, do also consider reducing the amount of intercolumn whitespace: for the table at hand, a combination of
\small
(instead of\footnotesize
) and setting\tabcolsep
(the parameter that governs the amount of intercolumn whitespace) to4pt
(default:6pt
) would seem to yield a more-readable table.The first column may look better if you use
l
instead ofY
as the column type.Just for comparison, here's the look of the table that's produced by the code you presented in your answer: