[texhax] Table Creation

E. Krishnan ekmath at asianetindia.com
Tue Apr 5 17:43:56 CEST 2005


On Fri, 1 Apr 2005, Kashif Khan wrote:

> Attached document file contains a table, would you please tell me 
> how to create such table in LaTeX?


 \documentclass{article}
 \usepackage{array}
 \usepackage{multirow}

\begin{document}

\begin{center}
  \renewcommand{\arraystretch}{2}
  \addtolength{\tabcolsep}{5pt}
  \renewcommand{\multirowsetup}{\centering}
  \newlength{\colwid}
  \settowidth{\colwid}{XYZ}
  \begin{tabular}{*{4}{|c}|}
    \hline
    \multicolumn{4}{|c|}{ABCD}\\
    \hline
    \multirow{2}{\colwid}{XYZ} & 123 & \multicolumn{2}{c|}{342}\\
    \cline{2-4} 
    & 44 & 33 & 56\\
    \hline
    WVO & 343 & 232 & 454\\
    \hline
  \end{tabular}
\end{center}

\end{document}


-- 
Krishnan



More information about the texhax mailing list