Why is there a difference in the output when using \hspace* instead of \hspace despite the fact that the subfigures widths and horizontal spacing add to \textwidth?
\documentclass{article}
\usepackage{subcaption,mwe}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\end{subfigure}%
\hspace{0.05\textwidth}
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}%
\hspace{0.05\textwidth}
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{example-image-c}
\end{subfigure}
\end{figure}
\begin{figure}
\centering
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\end{subfigure}%
\hspace*{0.05\textwidth}
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}%
\hspace*{0.05\textwidth}
\begin{subfigure}[t]{0.3\textwidth}
\includegraphics[width=\linewidth]{example-image-c}
\end{subfigure}
\end{figure}
\end{document}


%following the\hspaceand\hspace*invocations. To see this, employ\usepackage[pass,showframe]{geometry}. Other than that, it is round-off that is getting you. If you add the%I speak of and reduce the\hspaceto0.0499\textwidth, it will fit just fine. – Steven B. Segletes Apr 26 '17 at 18:513 * 0.32\textwidth + 2 * \hspace{0.02\textwidth} = \textwidth, could you explain a bit to me how Latex understands or interprets my input? – Diaa Apr 26 '17 at 22:58A B Cis two word spaces wider thanABCand your line is two word spaces wider than your calculation suggests, for the same reason. (Rounding error means that it is not quite equal in any case but the 4.5pt overshoot is due to the additional space not the rounding error) – David Carlisle Apr 26 '17 at 23:13