tags:

views:

29

answers:

2

Ok, I am beat. I tried a few things but I am unable to make this happen. I need some help now. I want to be able to have some text and picture side by side (only one line, thus no need for wrapping or other fun. The picture is small enough to fit in a text line):

This is a text <temp.jpg placed center to the textline>

Problem is, when I use

This is a text \includegraphics{temp.jpg} 

the pictures baseline is alligned with the text baseline. I want the picture (vertical) center to be aligned with the text baseline. How can I make this possible?

+1  A: 

It sounds like you want \raisebox (see the LaTeX advanced topics section), with a negative argument. Use dimensions ex (the notional height of an 'x' in the current font) or \baselineskip (the size between text baselines) as your units.

If you want to do more complicated things, such as move the graphics box down by half its height, you can, but it gets fiddly. If the graphic size isn't unpredictable, you're probably better off tuning this by hand anyway.

Norman Gray
Yes I was thinking of that. This might work, but Alexey's short solution is compact and less complicated.
+1  A: 
This is a text $\vcenter{\hbox{\includegraphics{temp.jpg}}}$
Alexey Malistov
Thanks that worked :)