[texhax] Caption to figure in margin -- gives "LaTeX Error: Not in outer par mode"

William Adams will.adams at frycomm.com
Wed Nov 22 16:06:40 CET 2006


On Nov 22, 2006, at 6:08 AM, Niall Mansfield wrote:

> I want to put the caption to a figure in the margin (to save space,
> as vertical space is limited for reasons we don't have to go into).
>
> I have tried:
>
> \begin{figure}
> 	\centerline{\includegraphics{dummy.eps}}
> 	\marginpar{This is a dummy picture}
> 	\end{figure}
>
> but that gives the error:
> 	LaTeX Error: Not in outer par mode
>
> Is there a way round this?
> (Figure numbering, tables of figures, etc. are not important,
> so the solution doesn't have to be 100% "clean".)

Try this instead:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
This is a test.

\marginpar{
            \includegraphics{dummy.pdf}
            This is a dummy picture
	}

More of a test.

\end{document}

You can't use the figure environment or centering in a marginpar.

William


-- 
William Adams
senior graphic designer
Fry Communications



This email message and any files transmitted with it contain information
which is confidential and intended only for the addressee(s). If you are
not the intended recipient(s), any usage,  dissemination, disclosure, or
action taken in  reliance on it is prohibited.  The reliability of  this
method of communication cannot be guaranteed.  Email can be intercepted,
corrupted, delayed, incompletely transmitted, virus-laden,  or otherwise
affected during transmission. Reasonable steps have been taken to reduce
the risk of viruses, but we cannot accept liability for damage sustained
as a result of this message. If you have received this message in error,
please immediately delete it and all copies of it and notify the sender.


More information about the texhax mailing list