# Left-side wrapfigures and marginnotes

A wrapfigure on the left side of the page interferes with the mechanism that marginnote uses to determine horizontal position, pushing it to the right by the width of the wrapfigure.

The marginnote package has the macros \marginnoteleftadjust and \marginnoterightadjust for custom horizontal adjustment, but I haven't had any luck getting these to move the notes at all.

\documentclass{article}

\usepackage{wrapfig}
\usepackage{marginnote}
\usepackage{lipsum}
\usepackage{graphicx}

\begin{document}

\begin{wrapfigure}[8]{L}{3cm}
\includegraphics[width=3cm]{example-grid-100x100pt}
\end{wrapfigure}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum
\marginnote{This margin note is too far right}
\lipsum[1-2]
\marginnote{This one is not too far right}
\lipsum[3]
\end{document}


The problem is that the outer \parshape is used inside the marginnote too and so the first line of the margin note are indented like the lines of your paragraph. marginnote imho should better use \parbox instead of the primitive \vbox then the code from wrapfig which tries to avoid this side effects would have a chance. You can try this patch:

\documentclass{article}

\usepackage{wrapfig}
\usepackage{marginnote}
\usepackage{lipsum}
\usepackage{graphicx,tikz}
\usepackage{xpatch}

\makeatletter %two replacements!
\patchcmd\@mn@@@marginnote{\hsize\marginparwidth}{\@parboxrestore\hsize=\marginparwidth}{}{\fail}
\patchcmd\@mn@@@marginnote{\hsize\marginparwidth}{\@parboxrestore\hsize=\marginparwidth}{}{\fail}
\makeatother

\begin{document}

\begin{wrapfigure}[8]{L}{3cm}
\includegraphics[width=3cm]{example-grid-100x100pt}
\end{wrapfigure}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum\marginnote{This margin note is too far right}

\lipsum[1-2]
\marginnote{This one is not too far right}
\lipsum[3]
\end{document}