Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Put two images with different height aligned to the top of the page LaTeX

I would like to create landscape document with two-column pages.
On the left side of each page is located a bigger image (covering more less the left part of page and aligned to the top of the page), on the right side is located smaller image covering about 1/3 on the right side of the page, aligned to the top and with some description below

\documentclass{book}

\usepackage[landscape]{geometry}

\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}

\noindent
\begin{minipage}{0.49\linewidth}
    \centering
    \includegraphics[width=\linewidth]{image-3x4}
    \captionof{figure}{Example picture proportion 3:4}
\end{minipage}
\hspace{0.01\textwidth}
\begin{minipage}{0.49\linewidth}
    \centering
    \includegraphics[width=\linewidth]{image-3x1}
    \captionof{figure}{Example picture proportion 3:1}

    Some extra description on the right side
\end{minipage}

\end{document}

Actual output:
enter image description here

Desired output:
enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

How to create two images side-by-side aligned to the top of the page as desired?

>Solution :

You can use the valign key (needs the adjutsbox package):

\documentclass{book}

\usepackage[landscape]{geometry}

\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[export]{adjustbox}

\begin{document}

\noindent
\begin{minipage}[t]{0.49\linewidth}
    \centering
    \includegraphics[width=\linewidth,valign=t]{example-image-duck}
    \captionof{figure}{Example picture proportion 3:4}
\end{minipage}
\hspace{0.01\textwidth}
\begin{minipage}[t]{0.49\linewidth}
    \centering
    \includegraphics[width=\linewidth,height=1cm,valign=t]{example-image-duck}
    \captionof{figure}{Example picture proportion 3:1}

    Some extra description on the right side
\end{minipage}

\end{document}

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading