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

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

Better looking Table

Postby NELLLY » Tue Apr 23, 2013 2:32 am

Hi,

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

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

Thanks.

Link:
BBcode:
HTML:
Hide post links
Show post links

mas
Posts: 188
Joined: Thu Dec 04, 2008 4:39 am

Postby mas » Tue Apr 23, 2013 3:17 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.
  1. \documentclass{article}
  2. \usepackage{booktabs,multirow}
  3.  
  4. \begin{document}
  5. \begin{table}[bth]
  6. \caption{Level planning of the input parameters}
  7. \centering
  8. \begin{tabular}{ccc}\toprule[1.2pt]
  9. \multirow{2}{*}{Namecol} &
  10. \multicolumn{2}{c}{Level}\\\cmidrule{2-3}
  11. &aa&bb\\\midrule
  12. ...&...&... \\\bottomrule[1.2pt]
  13. \end{tabular}
  14. \end{table}
  15. \end{document}

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

Link:
BBcode: Topic is solved[/url]" title="Click to select post's link in BBcode format" onclick="this.focus();this.select();" />
HTML: Topic is solved</a>" title="Click to select post's link in HTML format" onclick="this.focus();this.select();" />
Hide post links
Show post links

NELLLY
Posts: 111
Joined: Thu Nov 26, 2009 2:21 am

Postby NELLLY » Sat Apr 27, 2013 10:34 pm

Many thanks. This works perfectly.

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 7 guests