Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to insert a little figure(logo) to a document without changing the vertical spacing.

I have two lines of text and I want to insert the figure in the align with the second line. I can do that simply with the code snippet:

{\bf The First Line }\\{\bf The Second Line} \hfill\includegraphics[height=24pt]{google}

After that, spacing between text changes according to the vertical size of the figure. I wish to have the same spacing after including the figure too.

How can I do that?

share|improve this question

2 Answers 2

up vote 9 down vote accepted

Note \bf is a deprecated command not defined at all in the core LaTeX format (but added for compatibility reasons by some classes). \textbf{The First Line} would be better markup.

If you want the line never to be opened up even if the figure would overprint the line above then \smash{\includegraphics[height=24pt]{google}} The \smash command hides the height of its argument.

share|improve this answer

You may want to use a bottom aligned tabular:

\noindent{\bfseries
\begin{tabular}[b]{@{}l@{}}
  First line\\
  Second line
\end{tabular}\hfill
\includegraphics[height=24pt]{google}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.