I am using string diagrams that I draw in Illustrator a lot, and I would like to draw them within a sentence.

When I just put \includegraphics{...} in the text, the image appears but its bottom is aligned with the text. I would like the center of the image aligned with the text, analogous to how in \displaystyle the center of the sum or integral is aligned with the text rather than its bottom.

  • \begin{tabular}{@{}c@{}}\includegraphics{...}\end{tabular}
    – egreg
    Feb 27, 2016 at 18:24
  • 1
    or use adjustbox package which adds keys to \includegraphics for vertical alignement Feb 27, 2016 at 18:31

1 Answer 1


The simplest way is


More complex, but perhaps handier,


and then





Some text \includegraphics[height=3ex]{example-image-1x1} some text


Some text
some text


Some text \includegraphics[height=3ex,valign=M]{example-image-1x1} some text


Some text \includegraphics[height=3ex,valign=m]{example-image-1x1} some text


enter image description here

If you want full control on the amount of raising or lowering, use \raisebox:


Instead of \height or a multiple thereof, you can use an explicit length.

  • Thanks for the answer! Jun 19, 2020 at 14:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .