Adjustbox, can I move caption with the content using lap?

Let's say I want to include an oversized margin figure that is allowed to stick into the normal text area using adjustbox, perhaps by something like this:

\documentclass{memoir}
\usepackage{lipsum}

\begin{document}

\begin{marginfigure}
\end{marginfigure}

\lipsum[1-4]

\end{document}


This results in

which is mostly what I want, except for the placement of the caption.

Is it possible to have the caption move along with the actual content of the adjustbox? I'm not concerned with the content overlapping the normal text block (this will be taken care of in another way).

I know there are probably a lot better ways to do what I'm trying to do, but I'm editing a large document and prefer to do something similar to what the original authors have done, keeping their choice of syntax in some user defined macros.

• What does this mean: "Is it possible to have the caption move along with the actual content of the adjustbox? " – Steven B. Segletes Feb 8 '18 at 13:54
• @StevenB.Segletes Adjustbox sets the caption, but it's located in the same place as it would be without the lap=-\marginparwidth. I had expected that the caption would be set inside the same box that is "moved" by the lap option. – mrf Feb 8 '18 at 14:01

When I understand you correctly, then you want the caption centered below the image, right?

You need to first add the caption, then apply lap. This is best done by two nested \adjustbox calls as the (no-)float options are processed always after the normal ones:

\documentclass{memoir}
\usepackage{lipsum}

\begin{document}

\begin{marginfigure}

If you want the caption on the left change center to left and the lap amount to -1.5\marginparwidth.