I would like two subfigures to have the same height and fill out the available \textwidth
(with some margin between them).
How can I get the left subfigure to have the height of the right subfigure while preserving aspect ratio? I'd also like to keep the whitespace between the subfigures at something like 5%.
\documentclass{article}
\usepackage{mwe}
\usepackage{subcaption}
\usepackage[export]{adjustbox}
\begin{document}
\blindtext
\begin{figure}
\begin{subfigure}{0.3\textwidth}
\includegraphics[max width=\linewidth]{example-image-9x16}
\end{subfigure}
\hfill
\begin{subfigure}{0.65\textwidth}
\includegraphics[max width=\linewidth]{example-image-16x9}
\end{subfigure}
\caption{Two subfigures of the same height}
\end{figure}
\end{document}
Best Answer
For a manual solution I suggest the following steps:
subfigure
environment for now