2

Hey awesome community!

I have this problem working with LaTeX. I got three pictures and want to align all of them at the upper egde of them, but none of the examples and answers I found could help me out.

Here is my code:

\documentclass[a4paper,12pt,notitlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage[export]{adjustbox}

\begin{document}
\begin{adjustbox}{minipage=[b][6cm][t]{5cm}}{%
\includegraphics[width=2cm,valign=t,angle=90]{a}
\hfill
\includegraphics[width=2.5cm,valign=t,angle=90]{b}
\hfill
\includegraphics[width=2cm,valign=b]{c}
}
\end{adjustbox}
\end{document}

With this, they're all next to eachother, but aligned at their bottom. I'm sure you know where the big, stupid mistake is. Thanks a lot!

1 Answer 1

2

Order matters here. Remove the adjustbox environment, and use valign=t for all three. But move the angle to before the valign.

enter image description here

\documentclass[a4paper,12pt,notitlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage[export]{adjustbox}

\begin{document}
\includegraphics[width=2cm,angle=90,valign=t]{example-image-a}
\hfill
\includegraphics[width=2.5cm,angle=90,valign=t]{example-image-b}
\hfill
\includegraphics[width=2cm,valign=t]{example-image-10x16}
\end{document}

You must log in to answer this question.

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