0

Right now I'm using the following at the top of my document:

\begin{flushright}
\textbf{\large My name}
\vspace{3pt}
\hrule
\vspace{3pt}
Street 1a\\
Postal code + city\\
Phone number\\
[email protected]
\end{flushright}
\begin{figure}[ht!]
\includegraphics{picture.jpg}
\end{figure}

This displays the jpg left aligned but below the line containing my email address. Is there a way to move the picture "up" so that its top is below the \hrule, exactly as the line containing the street?

1 Answer 1

2
\documentclass{scrreprt}
\usepackage{graphicx}
\begin{document}
\begin{flushright}
\textbf{\large My name}
\vspace{3pt}
\hrule
\vspace{3pt}
\raisebox{\dimexpr-\height+\ht\strutbox}%adjust as needed
   [0pt][0pt]{\includegraphics[width=2cm]{tiger}}
\hfill Street 1a\\    Postal code + city\\    Phone number\\    [email protected]
\end{flushright}
\end{document}
3
  • Hmmm, the environment flushright (and also flushleft) is a list environment who has only one item, which means it will add extra vertical space at the top and bottom of the environment, and may cause some other problems. Maybe we should always use \raggedleft rather than the environment flushright?
    – Ch'en Meng
    Oct 23, 2013 at 14:36
  • @Ch'enMeng It very depends on what is the OP exactly after. Without a MWE, it's hard to say. But clearly he uses this environment himself.
    – yo'
    Oct 23, 2013 at 14:38
  • @tohecz: OK, I got that.
    – Ch'en Meng
    Oct 23, 2013 at 14:43

You must log in to answer this question.

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