[Tugindia] merging of columns
S. venkataraman
svenkat at ignou.ac.in
Thu Jun 30 07:15:46 CEST 2011
On Thu, Jun 30, 2011 at 1:50 AM, jaspreet kaur <jaspritsarao at gmail.com>wrote:
> >
>
> > Sorry, unable to understand
> I want to make a table having 4 columns and 6 rows
> in the last row i want to merge 2 and 1/2 columns and remaining is one and
> half
> i used the code:
> \multicolumn{3}{text} & {text}
> it
> merges three column
> please help me
> _______________________________________________
> Home: http://www.tug.org.in/
> TeX FAQ: http://www.tex.ac.uk/faq
> unsubscribe: http://tug.org/mailman/listinfo/tugindia
>
Sorry, I misunderstood what you want.
What you want can be done, but it is a bit laborious.
You have to do the following:
1. Declare 5 columns.
2. In the first 5 rows, merge columns 3 and 4 with
rows of the form
column1 text&column2 text &\multicolumn{2}{column 4 text}&
column 5 text
3. In the last column use
\multicolumn{3}{2 and a half columns text}&\multicolumn{2}{1 and a half
columns text.}
Here is a self contained snippet. The length of the
columns may need some fine tuning, depending on the
text.
\documentclass{article}
\begin{document}
\begin{tabular}{|*5{c|}}
1&2&\multicolumn{2}{c}{3}&4\\
1&2&\multicolumn{2}{c}{3}&4\\
1&2&\multicolumn{2}{c}{3}&4\\
1&2&\multicolumn{2}{c}{3}&4\\
1&2&\multicolumn{2}{c}{3}&4\\
\multicolumn{3}{c|}{123}&\multicolumn{2}{c}{12}
\end{tabular}
\end{document}
best,
S. Venkataraman
More information about the tugindia
mailing list