I'm trying to align and image and some lines of text (not a paragraph) to resemble this. enter image description here

this is my code:


\definecolor{blu1000}{RGB}{15, 57, 101}

\null\hfill {\color{marrone1000} \tiny Certificato d'iscrizione} \\ [\baselineskip]

\includegraphics[height=2.5cm]{img-1} \\ [\baselineskip]
    \noindent\framebox[3cm][c]{\color{blu1000}\textbf{N. 1001-P}}
    \noindent\framebox[3cm][c]{\color{blu1000}\textbf{1001-P-YY-YY}} \\ [.15\baselineskip]
\raggedright \hspace{2.5em}\tiny \color{marrone1000}  Identification Number \hspace{5.7em}\tiny Certificate Number \\ [\baselineskip]
    \noindent\framebox[6cm][c]{\normalsize\color{blu1000}\textbf{Class Winner}} \\ [.15\baselineskip]
    \raggedright \hspace{5em}\tiny Category \\ [3\baselineskip]


    % \vspace{-20pt}

\textcolor{blu1000}{CERTIFICATE} \\ [2\baselineskip]
    \noindent \rule{3cm}{0.4pt} \\ [0.15\baselineskip] \hspace{-6em}{Date of Issue \\ [2\baselineskip]}
    \noindent \rule{3cm}{0.4pt} \\ [0.15\baselineskip] \hspace{-6em}{Expiry Date\\ [2\baselineskip]}

Resulting enter image description here

I'm using XeLatex and I'd like to left align the text as in 1

  • welcome to tex.se! please extend your code snippet to complete small document which we can test as it is. why do you use wrapfigure?
    – Zarko
    Commented Nov 12, 2018 at 23:47
  • Hello, thanks @Zarko for the welcome. I've added the code of the page where it should be. I'm using wrapfigure because I wanted to align the image and text and after googling a lot, I was told that this was the correct way, but as you can see had to fix some spacing... would gladly remove that if I could do it better... Thanks Commented Nov 13, 2018 at 0:00

1 Answer 1


see if the following solution is acceptable to you:

\usepackage[showframe,          % <--- in real document delete option "showframe"


\usepackage[demo,               % <--- in real document delete option "demo"
            export]{adjustbox}  % <--- it load the graphicx package

    \includegraphics[height=2.5cm, width=\linewidth,valign=t]{img-1}
            CERTIFICATE         \\[1.5\baselineskip]
            Date of issue:     \\[1.5\baselineskip]
            Expire date

as you can see, i reduce your document example to mwe (minimal working example), which produce result similar to the first image in your question.

edit: for aligning of image in the first minipage it is necessary to move its baseline from its middle to the top. this is done by use of the adjustbox with option export. This package also load the graphicx package.

enter image description here

(lines around image and text shows page layout)

  • Awesome! thanks a lot, that's it. Most of the code you saw was because I just came into XeTeX from pure LaTex but I'm liking this more. Thanks again. Commented Nov 13, 2018 at 0:50

You must log in to answer this question.

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