Graphics, Figures & Tables\multicolumn and \multirow

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
james1986
Posts: 3
Joined: Tue Sep 10, 2013 12:46 pm

\multicolumn and \multirow

Post by james1986 »

Hi,

I have a table and I wish to use a \multirow in a \multicolumn but I can't seem to get it to work. In the example below I wish the property cell to span the first two rows. Can anyone help?

Code: Select all

\documentclass[11pt]{article}
\title{\textbf{Example Table}}
\author{james1986}
\date{}
\begin{document}
\section{Before you start}

\begin{tabular}{|l|c|c|}
\hline
Property & \multicolumn{2}{|c|}{Temperature} \\
  \hline
&Room Temperature & 1200C\\
\hline
\multicolumn{3}{|l|}{CVI SiC/Si-B-C}\\
\hline
Fibre Type & Hi-Nicalon fibres & Hi-Nicalon fibres\\
Reinforcement & Plain Weave & Plain Weave\\
Density & 2.3 & \\
Porosity & 13 & \\
Tensile Strength & 315 &\\
Strain to failure (\%) &0.5&\\
Youngs Modulus (GPa) & 220 &\\
\hline
\multicolumn{3}{|l|}{Interlaminar Shear} \\
\hline
Strength (MPa) & 31 & 23\\
Flextural Strength (MPa) & 699 & 620\\
\hline
\multicolumn{3}{|l|}{2D CVI-enhanced SiC/SiC Composite}\\
\hline
Fibre type & Hi Nicalon & Hi Nicalon\\
Fibre Content (\%) & 35 & 35\\
Reinforcement & 0/90 five harness satin &0/90 five harness satin\\
Density & 2.2 & 2.2\\
Porosity (\%) & 10 & 10\\
Tensile Strength (MPa) & 324 & 259\\
Strain to Failure (\%) & 0.74 & 0.50\\
Youngs Modulus (GPa) & 207 & 212\\
\hline 
\end{tabular}
\end{document}
James

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

\multicolumn and \multirow

Post by Stefan Kottwitz »

Hi James,

load the multirow package

Code: Select all

\usepackage{multirow}\usepackage{multirow}
and use the \multirow command. Furthermore, use \cline instead of \hline, to not cross the larger cell:

Code: Select all

...
\multirow{2}{*}{Property} & \multicolumn{2}{|c|}{Temperature} \\
  \cline{2-3}
...
multirow.png
multirow.png (7 KiB) Viewed 24357 times
Stefan
LaTeX.org admin
james1986
Posts: 3
Joined: Tue Sep 10, 2013 12:46 pm

Re: \multicolumn and \multirow

Post by james1986 »

Thanks for your help,

Regards

James
Post Reply