XANDREA88X” post=83052Salve a tutti! sto cercando di creare una tabella che abbia quattro colonne principali in modo che ognuna di esse abbia tre sottocolonne. Il codice che ho provato è il seguente, ma il compilatore dà errore:
`
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
\multicolumn{3}{c}{\textbf{Spencer}} & \multicolumn{3}{c}{\textbf{SMA}} & \multicolumn{3}{c}{\textbf{Fit polinomiale}} & \multicolumn{3}{c}{\textbf{Wavelets}}\\
\hline
\multicolumn{1}{c}{\textbf{RR}} & \textbf{RT} & \textbf{QRS} & \textbf{RR} & \textbf{RT} & \textbf{QRS} & \textbf{RR} & \textbf{RT} & \textbf{QRS} & \textbf{RR}} & \textbf{RT} &
\multicolumn{1}{c}{\textbf{QRS}}\\
\hline
815 & 728 & 816 & 736 & 815 & 728 & 816 & 736 & 728 & 816 & 736 & 736 \\
815 & 728 & 816 & 736 & 815 & 728 & 816 & 736 & 728 & 816 & 736 & 736\\
815 & 728 & 816 & 736 & 815 & 728 & 816 & 736 & 728 & 816 & 736 & 736\\
\hline
\end{tabular}
\end{center}
`Sapreste aiutarmi? Grazie!
Devi dire che ci sono dodici colonne:
`\begin{tabular}{|*{12}{c|}`
Se però ti leggi la documentazione di booktabs scopri sicuramente unmodo migliore di scrivere la tua tabella; da’ [tt]\usepackage{booktabs}[/tt] e poi
`
\begin{tabular}{*{12}{c}}
\toprule
\multicolumn{3}{c}{\textbf{Spencer}} & \multicolumn{3}{c}{\textbf{SMA}} &
\multicolumn{3}{c}{\textbf{Fit polinomiale}} & \multicolumn{3}{c}{\textbf{Wavelets}}\\
\cmidrule(lr){1-3}\cmidrule(lr){4-6}\cmidrule(lr){7-9}\cmidrule(lr){10-12}
\textbf{RR} & \textbf{RT} & \textbf{QRS} & \textbf{RR} & \textbf{RT} & \textbf{QRS} &
\textbf{RR} & \textbf{RT} & \textbf{QRS} & \textbf{RR} & \textbf{RT} & \textbf{QRS}\\
\midrule
815 & 728 & 816 & 736 & 815 & 728 & 816 & 736 & 728 & 816 & 736 & 736 \\
815 & 728 & 816 & 736 & 815 & 728 & 816 & 736 & 728 & 816 & 736 & 736\\
815 & 728 & 816 & 736 & 815 & 728 & 816 & 736 & 728 & 816 & 736 & 736\\
\bottomrule
\end{tabular}
`
Ciao
Enrico