Featured Book

LaTeX Beginners Guide

Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 12 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Better looking Table Topic is solved

alignmentmultirowrowstablesAdd tags Information and discussion about graphics, figures & tables in LaTeX documents.

Better looking Table

Postby NELLLY on Tue Apr 23rd, 2013

Hi,

I want to get the table more pretty. For example I want that the "Namecol" becomes aligned with the \cmidrule.
Code: Select all  •  Open in writeLaTeX
\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.
NELLLY
 
Posts: 96
Joined: Thu Nov 26th, 2009

Re: Better looking Table  Topic is solved

Postby mas on Tue Apr 23rd, 2013

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.
Code: Select all  •  Open in writeLaTeX
\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 2013; Editor : Vim
mas
 
Posts: 156
Joined: Thu Dec 4th, 2008

Re: Better looking Table

Postby NELLLY on Sat Apr 27th, 2013

Many thanks. This works perfectly.
NELLLY
 
Posts: 96
Joined: Thu Nov 26th, 2009


Topic Tags

alignmentmultirowrowstables

Return to Graphics, Figures & Tables

Who is online

Users browsing this forum: No registered users and 12 guests