LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Better looking Table Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Better looking Table

Hi,

I want to get the table more pretty. For example I want that the "Namecol" becomes aligned with the \cmidrule.
\documentclass{article} \begin{document}   \begin{table}[bth]     \caption{Level planning of the input parameters}     \begin{tabular}{ccc}\toprule[1.2pt]       &\multicolumn{2}{c}{Level}\\\cmidrule{2-3}       Namecol&aa&bb\\\midrule       \$...&...&... \\\bottomrule[1.2pt]     \end{tabular}   \end{table}\end{document}

Is there alternatives to do so and other way to get the table looks more pretty?

Thanks.

Tags:

mas
Posts: 219
Joined: Thu Dec 04, 2008 4:39 am
You should post a compilable example. You have forgotten to include booktabs package which makes the code uncompilable.

Here is my attempt at what you might need. Take a look at multirow for entries spanning multiple rows.
\documentclass{article}\usepackage{booktabs,multirow} \begin{document}   \begin{table}[bth]     \caption{Level planning of the input parameters}     \centering     \begin{tabular}{ccc}\toprule[1.2pt]       \multirow{2}{*}{Namecol} &       \multicolumn{2}{c}{Level}\\\cmidrule{2-3}       &aa&bb\\\midrule      ...&...&... \\\bottomrule[1.2pt]     \end{tabular}   \end{table}\end{document}

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim

NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am
Many thanks. This works perfectly.