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}

MWE

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?



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}

enter image description here

caverac
caverac
January 16, 2018 14:48 PM

Related Questions


Same spacing around "\middle|" as around "\mid"

Updated May 16, 2018 02:23 AM



Braces/parentheses don't display as expected

Updated November 13, 2017 03:23 AM

Which way of using parentheses looks better?

Updated May 14, 2018 15:23 PM