This is a follow-up to Span figure across margin and textbody in twoside: Assigning savebox locally. But all necessary info should be here.
I am trying to make wide images/tables span across margin and text body in a twoside-document. I've got some help, but would like to assign a macro which deals with changing [l],[r] for odd or even pages, so that it fits correctly. Also, for odd pages, it need to add something like the commented line \hspace{-\marginandsep}.
\documentclass[11pt, twoside]{article}
\usepackage{xparse, graphicx, showframe}
\newlength\marginandtext
\newlength\marginandsep
\addtolength{\marginandsep}{\marginparwidth}
\addtolength{\marginandsep}{\marginparsep}
\addtolength{\marginandtext}{\textwidth}
\addtolength{\marginandtext}{\marginandsep}
\NewDocumentCommand{\fullwidth}{smo}{%
\makebox[\textwidth][l]{%
\begin{minipage}{\marginandtext}
%\hspace{-\marginandsep}%
#2%
\end{minipage}}}%
\begin{document}
foo\\
\begin{figure}[b]
\fullwidth{\includegraphics[width=\marginandtext, height=4cm]{example-image-a}}
\end{figure}
\clearpage
baz\\
\begin{figure}[t]
\fullwidth{\includegraphics[width=\marginandtext, height=4cm]{example-image-a}}
\end{figure}
\end{document}


changepagepackage. – Runar Jan 04 '16 at 14:46