EDIT: I ended up using the method outlined here and was able to resolve the problem. Big thanks to the answerer of that question!
I am using LyX, and am trying to center two images next to each other. They are both positioned in a float right now, each in their own box minipage. I have used the paragraph settings to center the float, the images inside, as well as the boxes, but for some reason their position is still shifted to the right (see screenshot). Any idea how to fix this?
This is what I see in the code prevew pane:
\begin{center}
\begin{figure}[H]
\centering{}%
\begin{minipage}[t]{0.45\linewidth}%
\begin{center}
\includegraphics[width=0.42\paperwidth,height=0.45\textheight,keepaspectratio]{../Figures/Consumption}
\par\end{center}
\caption{Consumption}
%
\end{minipage}\hspace*{0.05\paperwidth}%
\begin{minipage}[t]{0.45\linewidth}%
\begin{center}
\includegraphics[width=0.42\paperwidth,height=0.45\textheight,keepaspectratio]{\string"../Figures/Agg Capital\string".jpg}
\par\end{center}
\caption{Aggregate Capital}
%
\end{minipage}
\end{figure}
\par\end{center}

\linewidth(the 100% of the 45% of the minipage), not relative to\paperwidth, and moreover, without fix height (and therefore, withoutkeepaspectratio) . – Fran Mar 15 '21 at 03:13