0

I'm facing a bit trouble in creating tables in latex using \multirow and \multicolumn keywords.

enter image description here

It would be great if anyone can help me out to create just like above table using latex. Thanks!

2

Some suggestions

  • Use l ("left-aligned") column type for the first column, and c ("centered") for the 7 data columns
  • Use \multicolumn in three separate places
  • No need for \multirow anywhere, AFAICT
  • To give the table an open and inviting look, use no vertical bars, and draw only a few, but well-spaced, horizontal lines. Load the booktabs package for the macros \toprule, \midrule, \cmidrule, and \bottomrule.
  • Load the siunitx package and employ its SI macro to typeset numbers and their associated units.
  • Optional: Load the helvet package to set the default sans-serif font to a Helvetica clone.

enter image description here

\documentclass{article}
\usepackage{booktabs,siunitx}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably
\usepackage{helvet} % use Helvetica clone for sans-serif
\begin{document}

\begin{center}
\sffamily % optional?switch to sans-serif for table
\sisetup{detect-all}
\begin{tabular}{@{} l *{7}{c} @{}}
\toprule
S. no. & \multicolumn{3}{c}{Time Domain}
       & \multicolumn{4}{c@{}}{Frequency Domain} \\
\cmidrule(lr){2-4} \cmidrule(l){5-8}
& Input V1 & Input V2 & Output V0 
& Input V1 & Input V2 & \multicolumn{2}{c@{}}{Output V0} \\
\midrule
1 & \SI{3}{\volt} & \SI{3}{\volt} & \SI{5.79}{\volt}
  & \SI{3}{\volt} & \SI{3}{\volt} & \SI{-400}{\milli\decibel v} 
  & \SI{-400}{\milli\decibel v} \\
2 & \SI{1}{\volt} & \SI{2}{\volt} & \SI{2.89}{\volt}
  & \SI{1}{\volt} & \SI{2}{\volt} & \SI{-3.2}{\decibel v} 
  & \SI{-10.8}{\decibel v} \\
\bottomrule
\end{tabular}
\end{center}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.