I have two images that I want to show side by side, horizontally centered. I would like to distribute the remaining horizontal space evenly in three parts: To the left of the first image, between the images, and after the second image. So I tried this:
\documentclass{article}
\usepackage{graphicx}
\usepackage{blindtext}
\usepackage{float}
\usepackage{mwe}
\begin{document}
\blindtext
\begin{figure}[H]
\centering
\hfill
\includegraphics[width=4cm]{example-image-a}
\hfill
\includegraphics[width=4cm]{example-image-a}
\hfill
\end{figure}
\blindtext
\end{document}
However the last \hfill is ignored:
Why is this happening? How can I achieve the desired result ?




\centeringor thefigureenvironment):\noindent\null\hfill\includegraphics[width=4cm]{example-image-a}\hfill\includegraphics[width=4cm]{example-image-a}\hfill\null. You can play around with removing various parts of it and see what happens. – ShreevatsaR Jan 18 '17 at 19:06