# Image in math mode causes too-large parentheses

by usul   Last Updated January 16, 2018 15:23 PM

My image is correctly cropped, but when I place it between left( and right), LaTeX seems to create a space twice as high as needed and place the image in the upper half. Example (I'm using beamer but this happens in article too with package graphicx):

\documentclass{beamer}
\begin{document}
\begin{frame}{Hi}{}
$\left( \includegraphics[height=8em]{latex-project-logo} \right)$
\end{frame}
\end{document}


It does not seem to matter what the image dimensions are (e.g. skinny or wide) or what height I request (e.g. 8em or 12pt). Why is this happening, and how can I get the height of the parentheses to match the image?

Tags :

#### Answers 1

You could use pmatrix

 \documentclass{beamer}
\begin{document}
\begin{frame}{Hi}{}
$\begin{pmatrix} \includegraphics[height=8em]{latex-project-logo} \end{pmatrix}$
\end{frame}
\end{document}


caverac
January 16, 2018 14:48 PM