# Lyx: How to align graphic with text line?

I try to insert small PNG clips into a line of text. So far, the graphic is aligned with the baseline of the text, but since the PNG needs to be a little larger than the text height for readability, it sticks out at the upper end. Example below:

I'd rather like to have the vertical center of the graphic align with the vertical center of the text but see no way of fine-adjusting the vertical position of it. All that is available in LyX for the vertical position of single words seems to be super- and subscript, but subscripting it moves the graphic too far down.

• Maybe you'll have to delve into the LaTeX code. – Bernard Jul 15 '17 at 20:48
• you can use `\raisebox{-5pt}{\includegraphics{imagename}}` but I have no idea how to do that from lyx. – David Carlisle Jul 15 '17 at 21:26
• @DavidCarlisle: This did the trick, thank you. LyX allows to insert LaTeX code directly (called ERT for evil red text) and that does indeed place the graphic where it belongs. I only added a [height=5mm] to scale the graphic as desired. – Peter Kämpf Jul 15 '17 at 22:55

`````` \raisebox{-5pt}{\includegraphics[height=whatever]{imagename}}