Placing a figure inside a multirow table cell
A workaround I've just seen possible, without modifying the graphics, is this:
- Include package
bigstrut
- Use the other parameters of
multirow
:- bigstruts: value 2.
- fixup: value 2mm
- Add a call of
\bigstrut
for each row being spanned. - Increasing
\arraystretch
to 3.
The code for the main tex
file is this:
\documentclass[]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{multirow,bigstrut}
\usepackage{tabu}
\begin{document}
\begin{table}
\centering
\renewcommand{\arraystretch}{3}
\begin{tabu}{ccc}
\toprule
Sections & Axis & Imperfections\\
\midrule
\multirow{2}[2]{*}[2mm]{\includegraphics[width=3cm]{circular_hollow.pdf}} & $y-y$ & $\dfrac{L}{200}$ \bigstrut \\
& $z-z$ & $\dfrac{L}{150}$ \bigstrut \\
\bottomrule
\end{tabu}
\end{table}
\end{document}
For those wondering how to put images in tables in general, the salient point is the bracketed fixup after the {*}
in \multirow
:
\multirow{2}{*}[fixup]{\includegraphics[width=2in]{...}}
For example:
\multirow{2}{*}[0.5in]{\includegraphics[width=2in]{...}}
By adjusting the fixup you can avoid Latex's default behavior of putting the image way too low in the table.