# Putting figures+caption in the margin

Is there a "clean" way to make figures and their caption appear in the margin?

I'm using memoir with the companion pagestyle, so the margin is quite assymmetric and I think it might look nice enough to work (I'm not sure though).

The idea I have is to have the figure cover say, half the text (and the text would wrap around nicely), but keep the caption completely in the margin.

Is this possible without gutting LaTeX?

I have tried using \marginpar and \sidepar and didn't get them to work in my document. I also don't think they'll allow me to fully implement my idea.

• I could imagine that it should work for non-floating figures? – user31729 Mar 16 '15 at 16:41
• I think you want to use wrapfig, but I'm not clear exactly what you want. – John Laviolette Mar 16 '15 at 17:08
• First, don't use figure or subfigure. You should be able to use \captionof{figure} from the caption package. – John Kormylo Mar 16 '15 at 23:45

I think you can try something like this:

\begin{wrapfigure}{o}[\dimexpr\marginparwidth+\marginparsep]{marginparwidth}
...........
\end{wrapfigure}


Explanation

• The first parameter says your figure will be in the outer margin (the wider margin – left margin on even pages, right margin on odd pages). Theses lengths can be easily adjusted with the geometry package.
• The second (optional) parameter specifies the indent of the figure into the margin.
• The last parameter specifies the width of the figure.

You can take a look at my answer to this question, in which I used a similar code for a wrapped table.

Note it probably won't work in the neighbourhood of lists environments.

The recent sidenotes package is done for inserting rich text in the margin. It defines \sidenote and \sidecaption commands, and marginfigure and margintable environments. See the package documentation for details.