Wednesday, August 8, 2012

Latex: Multirow Example


Recently, I found it difficult to create a table with multi-row and multi-column combination. Here is an simple example.

The latex code to create above table.

\begin{tabular}
{|c|c|c|c|}
\hline
\multirow{1}{*}{{1}} & \multirow{2}{*}{{2}} & \multirow{3}{*}{{3}} & \multirow{6}{*}{{6}} \\
\cline{1-1} \multirow{1}{*}{{1}} & & & \\
\cline{1-2} \multirow{1}{*}{{1}} & \multirow{2}{*}{{2}} & & \\
\cline{1-1} \cline{3-3} \multirow{1}{*}{{1}} & & \multirow{3}{*}{{3}}& \\
\cline{1-2} \multirow{1}{*}{{1}} & \multirow{2}{*}{{2}} & & \\
\cline{1-1} \multirow{1}{*}{{1}} & & & \\
\hline
\end{tabular}

0 comments:

Post a Comment