- Questo topic ha 3 risposte, 2 partecipanti ed è stato aggiornato l'ultima volta 19 anni, 11 mesi fa da .
-
Topic
-
Salve e tutti. Sto imparando ad usare LaTeX, per puro diletto, esercitandomi con la documentazione che devo produrre per lavoro. Ho già fatto qualche ricerca sul sito e non sono riuscito a capire come impostare la centratura nell’ultima colonna della seguente tabella:`
\begin{landscape}
\begin{table}[h]
\begin{tabularx}{\linewidth}{|c|p{3,5cm}|>{\centering}X|>{\centering}X|>{\centering}X|>{\centering}X|X|}
\cline{3-7}%
\multicolumn{2}{c|}{}& Intervento di 1 giorno & Intervento di 2 giorni & Intervento di 3 giorni & Intervento di 4 giorni & Intervento di 5 giorni\\\hline
…
\end{tabularx}
\caption{Costi per intervento Tipo A1.}
\label{tab:tipoa1}
\end{table}
`se utilizzo >{\centering} al pari delle altre colonne, tutta la tabella si scompone con i seguenti messaggi di errore:
`
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}./analisi-costo.tex:304: Extra alignment tab has been changed to \cr.
\endtemplate l.304 \end{tabularx}
./analisi-costo.tex:304: Misplaced \noalign.
\hline ->\noalign
{\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet…
l.304 \end{tabularx}`
la linea 304 corrisponde a \end{tabularx}.
Ho scelto di usare tabularx per avere più righe di testo nelle celle e array per le semplidicazioni nell’applicazione di allineamenti alle colonne.
Ho commesso qualche errore o devo usare qualche altro pacchetto (package) per questa tabella?Grazie in anticipo
- Devi essere connesso per rispondere a questo topic.