The environment defined by tufte-handout
for inserting figures and other floats in the margin should be fixed by adding a
\ignorespaces
after \noindent
.
See
https://tex.stackexchange.com/a/102026/161015
It's a primitive feature of TeX's line breaking algorithm that glue
(including glue from white space) is discarded at the beginning of the
line. But \noindent
starts the paragraph already so the following
space token produces glue that is not discarded,(as it doesn't follow a linebreak).
And https://tex.stackexchange.com/a/102025/161015
Whenever you use \noindent
(or \indent
) at the end of a macro with
arguments, it's good rule to add \ignorespaces

\documentclass{tufte-handout}
\usepackage{graphicx}
\geometry{showframe}
\makeatletter
\renewenvironment{@tufte@margin@float}[2][1.2ex]%
{\FloatBarrier% process all floats before this point so the figure/table numbers stay in order.
\begin{lrbox}{\@tufte@margin@floatbox}%
\begin{minipage}{\marginparwidth}%
\@tufte@caption@font%
\def\@captype{#2}%
\hbox{}\vspace*{#1}%
\@tufte@caption@justification%
\@tufte@margin@par%
\setlength{\parindent}{0.0pc}%
\noindent%
\ignorespaces% added <<<<<<<<<<<<<<<<<<<
}
{%
\end{minipage}%
\end{lrbox}%
\marginpar{\usebox{\@tufte@margin@floatbox}}%
}
\makeatother
\begin{document}
\begin{marginfigure}[-0.5in]
\includegraphics[width=\linewidth]{example-image-a}
\end{marginfigure}
\begin{marginfigure}% [-0.5in]
\includegraphics[width=\linewidth]{example-image-c}
\end{marginfigure}
\end{document