This is the image of table.
Can anyone help me create a multi column header ?
[Tex/LaTex] create a merged multi column header
graphicstables
Related Solutions
\documentclass{article}
\usepackage{tabularx,multirow,array}
\usepackage[margin=1in]{geometry}
\begin{document}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\renewcommand{\arraystretch}{1.3}
\begin{table}[htbp]
\caption{Criteria used for selecting the time delay}
\label{MyTable}
\begin{tabularx}{\linewidth}{|X|L{7cm}|L{5cm}|C{2cm}|} \hline
\multirow{3}{*}{Zone 1} & \multicolumn{3}{L{14cm}|}{This zone operates without ...} \\ \cline{2-4}
& \multicolumn{2}{L{12cm}|}{Medium Votage (MV) and High Voltage (HV)} & 20-30 ms \\ \cline{2-4}
& \multicolumn{2}{L{12cm}|}{Extra-High Voltage (EHV)} & 15-25 ms \\ \hline
\multirow{2}{*}{Zone 2} & \multicolumn{3}{L{14cm}|}{Must allow zone 1 of neighboring ... Must allow zone 1 of neighboring ... Must allow zone 1 of neighboring ...} \\ \cline{2-4}
& {Zone 1 operating time of protected line ... Zone 1 operating time of protected line ...} & \multicolumn{2}{L{7cm}|}{(Referred above) from 2 cycles ... (Referred above) from 2 cycles ...} \\ \hline
Zone 3 & \multicolumn{3}{L{14cm}|}{Same procedure as for Zone 2, wherein the operating time of Zone 1 of the protected line is replaced by ...} \\ \hline
\end{tabularx}
\end{table}
\end{document}
tabularx
comes in handy for such big tables since it enables the table to occupy the total \linewidth
. You will need the multirow
package for these multi-line cells and the array
package for defining new column types (C
and L
). The last three columns should be defined by specified width columns C
or L
because they interfere with each other. At least one column should be specified X
to fill the remaining horizontal space.
\renewcommand{\arraystretch}{1.3}
is used to give the table some vertical extension for readability. Finally, you may consider using booktabs
for more beauty.
\documentclass{book}
\usepackage{booktabs}
\usepackage{multirow}
\begin{document}
\begin{tabular}{lrrrrrrrr}
\toprule
First Column & \multicolumn{4}{c}{Second Column}& \multicolumn{4}{c}{Third Column}\\
\midrule
\multirow{4}{*}{Particulars} &2&3&4&5&6&7&8&9\\
&10&11&12&13&14&15&16&17\\
&18&19&20&21&22&23&24&25\\
&26&27&28&29&30&31&32&33\\
\bottomrule
\end{tabular}
\end{document}
Best Answer
something like this: