Graphics, Figures & Tablestabularx and multicolumn

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
fbarzi
Posts: 1
Joined: Tue Jan 06, 2009 12:54 pm

tabularx and multicolumn

Post by fbarzi »

Could somebody help me in figure out what is not working in this code?
Does multicolumn works in tabularx context?
the output should be as the attached file

Code: Select all

\documentclass{amsart}
\usepackage{tabularx}
..
\begin{table}[ht]
\begin{center}
\begin{tabularx}{\textwidth}{cXcX} 
\toprule
 \multicolumn{2}{c}{Scelta A1: Mercato del Lavoro}
 &\multicolumn{2}{c}{Scelta B1: Studio a tempo pieno con Borsa di Studio}
 \\ \hline
\Box1 & 100 Euro &\Box2 & 300 Euro \\
\Box1 & 100 Euro &\Box2 & 600 Euro \\ 
\Box1 & 100 Euro &\Box2 & 1.000 Euro \\ 
\bottomrule
\end{tabularx}
\end{center}
\end{table}
..
\end{document}
Attachments
tabularx.pdf
(32.33 KiB) Downloaded 883 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

tabularx and multicolumn

Post by Stefan Kottwitz »

Hi,

multicolumn works for me with tabularx, also with code like that posted by you. Perhaps provide a complete minimal working example, the code above is not testable.
Btw. I wouldn't use \begin{center} ... \end{center} inside a table or figure environment, I would prefer \centering, see center vs. \centering.

Stefan
LaTeX.org admin
Post Reply