# Wide figures to spill out into the outer, not inner, margin in double-sided documents

I'm writing a text where I have some figures that need to be wider than the text width, and I want then to spill out into the outer (in my text, rather wide) margin. I have tried a solution which I found in a previous question here, but I can't make it work.

I copied the code in Place figures side by side, spill into outer margin

and modified it to:

\usepackage{ifoddpage}

\begin{figure}
\checkoddpage
\edef\side{\ifoddpage l\else r\fi}%
\makebox[\textwidth][\side]{\includegraphics[width=1.4\textwidth]{wide_image}}
\caption{xxx}
\label{fig:1}
\end{figure}


This makes figures behave the correct way on odd pages (they are left-aligned with text), but not on even pages (where they are still left-aligned with the text, making them spill into the inner margin instead)?

I'm using the "report" class.

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Benedikt Bauer Jan 7 at 8:24
Ok, it is not so minimal, unfortunately, and now playing around I noticed that the error may appear on odd or even pages... – carina Jan 7 at 8:57
@carina Well, the problem is that your code is not a full document, so we cannot copy it into our TeX editors and compile it. If you need some "dummy text", you can use the package \usepackage{lipsum} and the command \lipsum[1-5]. If you change [1-5] to something else (up to 40), you get a text of different length. This would allow you to move the figures on odd or even page as needed. – tohecz Jan 7 at 9:04
yes, I see that, I'll try to make an example which shows the error. In short documents it seems to work for me, I notice now, but I'll see if I can reproduce it. – carina Jan 7 at 9:09
As well, you have to run it twice! to get the correct result. – tohecz Jan 7 at 9:14
show 1 more comment

(Too long for a comment.)

Place figures side by side, spill into outer margin

Small precaution for other users of this solution: sometimes it won’t work. To fix this, pass the option strict to the package or put \strictpagecheck before the \checkoddpage.

Maybe this is the reason why it doesn't work for you?

-

I cannot see any problem here:

\documentclass[twoside]{report}
\usepackage{geometry,caption}
\geometry{showframe=true,includemp,marginparwidth=5cm,marginparsep=1em}
\captionsetup{singlelinecheck=false,width=\textwidth}
\usepackage{ifoddpage}
\begin{document}

\begin{figure}
\checkoddpage
\makebox[\textwidth][\ifoddpage l\else r\fi]{\rule{1.4\textwidth}{3cm}}
\caption{xxx} \label{fig:1}
\end{figure}
\clearpage%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{figure}
\checkoddpage
\makebox[\textwidth][\ifoddpage l\else r\fi]{\rule{1.4\textwidth}{3cm}}
\caption{xxx}\label{fig:2}
\end{figure}
\end{document}


-