2

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: Sample image

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.

3
  • Maybe you'll have to delve into the LaTeX code.
    – Bernard
    Jul 15, 2017 at 20:48
  • you can use \raisebox{-5pt}{\includegraphics{imagename}} but I have no idea how to do that from lyx. Jul 15, 2017 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. Jul 15, 2017 at 22:55

1 Answer 1

3

You can use

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

apparently as a lyx ERT to allow direct insert of TeX markup.

You must log in to answer this question.

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