Graphics, Figures & TablesVertically align Picture in a multi-rowed Table Cell

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mike-klemin
Posts: 8
Joined: Fri Feb 18, 2011 9:50 pm

Vertically align Picture in a multi-rowed Table Cell

Post by mike-klemin »

Hello,
I have searched through all the forum, I have found almost like my cases, but nothing worked. There is some rowspans, but my quesiton is how do I vertically align the image in the middle of the rowspanned cell... I Just can't figure it...

Code: Select all

\begin{tabular}
	{
		|>{\centering}m{2.5cm}
		|>{\centering}m{2cm}
		|>{\centering}m{4cm}|
	}
	\hline
		\multirow{2}{*}{
					\includegraphics[width=2.5cm]{links/high_voltage_icon}
			} & 
			
		\multicolumn{1}{l|}{
			xxxx			
			} & 
		\multirow{2}{*}{xxxxxxx}
	\tabularnewline
		&
		xxx xxx xxxx xxx xxx xxx xxxxxxx 
		xxxxxxxx xxxxxxxx xxxxxxxxx 
		lorem ipsum lalala	 	
	 	&
		
	\tabularnewline
	\hline
	
\end{tabular}

Recommended reading 2024:

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

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

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

Vertically align Picture in a multi-rowed Table Cell

Post by Stefan Kottwitz »

Hi,

multirow is difficult when automatic adjustments like vertical centering is needed. However, it provides an optional argument for additional vertical adjustment. Try:

Code: Select all

\multirow{2}{*}[-1cm]{%
  \includegraphics[width=2.5cm]{links/high_voltage_icon}
}
Stefan
LaTeX.org admin
mike-klemin
Posts: 8
Joined: Fri Feb 18, 2011 9:50 pm

Re: Vertically align Picture in a multi-rowed Table Cell

Post by mike-klemin »

Thanks a lot. Doesn't makes big difference, but now I feel better when aligning things by \vspaces in table cells :)
Post Reply