Originally Posted by
asfd Good afternoon everybody,
I am a begineer in Latex and I have some trouble setting column's width in a Latex document. I have double columns under which I would like the columns to be split evenly (50% of the double column each) but I juste don't understant how to get this result. Here is a sample of what I get. (hope my explanation of what I want is clear enough).
Thank you for your help!
The LaTeX tabular environment really isn't very helpful if you want to control widths of columns. The only way I know to get columns of equal width is to replace the "c" declaration in the table specification by something like "p{3em}". That will give a column of the specified width, but it will not be centred. However, you can then centre each individual table entry by padding it with flexible space in the form of an \hfil before and after it.
Code:
\begin{tabular}
{|c|p{3em}|p{3em}|p{3em}|p{3em}|p{3em}|p{3em}|}
\hline
& \multicolumn{2}{c|}{Linear Elements}
& \multicolumn{2}{c|}{Quad Elements}
& \multicolumn{2}{c|}{Cubic Elements} \\
\cline{2-7}
&\hfil $0,\Omega$\hfil &\hfil $1,\Omega$\hfil
&\hfil $0,\Omega$\hfil &\hfil $1,\Omega$\hfil
&\hfil $0,\Omega$\hfil &\hfil $1,\Omega$\hfil \\
\hline
\end{tabular}
That leads to
Laborious and inelegant, but it should give you the desired result.