7

I'm new to LaTeX, and I'm currently struggling with trying to create a table for a lab report. The table has to look like this:

enter image description here

I have tried looking at the \tabular, \tabulary and \tabularx environments, but I just can't seem to figure out how to set up that first row. Can anyone give me some tips on how I can best set up the right hand side so that it has 2 rows as shown, whilst the left hand side takes up one row that is equal in height?

This is what I've tried, but to no avail:

\begin{tabular}[C]{6}
\hline
\multirow{2}{*}{Configuration} 
\multirow{2}{*}{Flow rate (L/hour)} &
\multicolumn{2}{*}{Water Temperatures (\degree C)} 
\multicolumn{2}{*}{Pipe Surface Temperatures (\degree C)}
\end{tabular}
  • 1
    Welcome to TeX.SE. – Peter Grill Apr 9 '13 at 3:06
  • @JM92 Could you please consider adjusting your question title to make it searchable for posterity? There is some good information here, but it is not well-described under the current title, "Table Configuration". – Jonathan Komar Jun 19 '17 at 8:06
10

Tables are best done with the booktabs package:

enter image description here

Code:

\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}
\begin{tabular}{cccccc}\toprule
Configuration & Flow rate   & \multicolumn{2}{c}{Water Temperatures (\si{\degree}C)} &
\multicolumn{2}{c}{Pipe Surface Temperatures (\si{\degree}C)} \\
              & (L/hour) & Inlet & Outlet & Inlet & Outlet\\
\cmidrule(lr){1-1} \cmidrule(lr){2-2} \cmidrule(lr){3-4} \cmidrule(lr){5-6}

  10\% & 16 & 44.9 & 24.5 & 39.8 & 23.7 \\
  10\% & 16 & 44.9 & 24.5 & 39.8 & 23.7 \\
\bottomrule
\end{tabular}
\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.