MWE:
\documentclass{scrbook}
\usepackage[showframe]{geometry}
\usepackage[draft]{graphicx}
\usepackage{blindtext}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=175px, width=200px]{dummy.png}
\caption{left}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=175px, width=150px]{dummy.png}
\caption{right}
\end{subfigure}
\caption{\blindtext}
\end{figure}
\end{document}
and a picture:
How can I arrange the subfigures so that the space between the right fig and the right border equals the space between the left fig and the left border? I marked the space with red lines.
Any help is appreciated.
Best Answer
Use
\subcaptionbox
, so you don't have to guess.In the example I added the width, but probably your code will just set the height. Don't use
px
units, because the size of 1px is not predetermined.Instead of
\hfil
between the images you can use\hspace{<length>}
(don't forget a%
if it comes last in a line).