troubles with \toprule and \midrule in siunitx table [closed]
Asked Answered
G

1

7

Having the following siunitx table code in LyX, for each occurrence of \toprule and \midrule I obtain an error message:

The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.

I correctly imported siunitx in the preamble. TexLive version: 2012.10.20121205_r28449.fc18

LaTeX code:

\centering
\sisetup{output-decimal-marker={,}}

\begin{tabular}{ccS}
\toprule
{Dimensione finestra} & {Perdita} & {Tempo}\\
{} & {} & {(secondi)}\\
\midrule
10                & 0$\%$       & 121\\
\midrule
10                & 10$\%$       & 127\\
\midrule
10                & 20$\%$       & 176\\
\midrule
10                & 30$\%$       & 257\\
\midrule
10                & 40$\%$       & 442\\
\midrule
10                & 50$\%$       & 780\\
\midrule
10                & 60$\%$       & 1226\\
\midrule
10                & 70$\%$       & 1469\\
\midrule
10                & 80$\%$       & 1904 \\
\midrule
10                & 90$\%$       & 3234 \\
\midrule
50                & 0$\%$        & 46 \\
\midrule
50                & 10$\%$       &109 \\
\midrule
50                & 20$\%$       &146 \\
\midrule
50                & 30$\%$       &202 \\
\midrule
50                & 40$\%$       &257 \\
\midrule
50                & 50$\%$       &373 \\
\midrule
50                & 60$\%$       &544 \\
\midrule
50                & 70$\%$       &760 \\
\midrule
50                & 80$\%$       &1356 \\
\midrule
50                & 90$\%$       &6588 \\
\midrule
100                & 0$\%$       &76 \\
\midrule
100                & 10$\%$       &91 \\
\midrule
100                & 20$\%$       &109 \\
\midrule
100                & 30$\%$       &146 \\
\midrule
100                & 40$\%$       &180 \\
\midrule
100                & 50$\%$       &297 \\
\midrule
100                & 60$\%$       &414 \\
\midrule
100                & 70$\%$       &585 \\
\midrule
100                & 80$\%$       &1355 \\
\midrule
100                & 90$\%$       &4326 \\

\bottomrule
\end{tabular}
Glovsky answered 22/1, 2013 at 9:29 Comment(0)
G
21

Adding

\usepackage{booktabs}

solved the problem :O

Glovsky answered 22/1, 2013 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.