I am using Latex and doing my thesis in memoir class.
I have been able to use the \twopagepicture to span a process map over tow opposite pages in my chapter. However, my figure is reproduced at the end of the chapter not under its relative section.
In my chapter here is the code
Code: Select all
\chapter{Cas Pilote:}
\label{chap:Pilote}
\minitoc
\section
text text text
\twopagepicture{b}{p}{Chapitre8/processmap.jpg}{processus}\label{fig:ATMprocess}
\section
text text text
\end
Code: Select all
\usepackage{amsmath,amssymb} % AMS Math %Format& definition of styles Myriam
\usepackage[french]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{multirow}
\usepackage{supertabular}
\usepackage{rotating}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{afterpage}
\usepackage{placeins}
\usepackage{xcolor}
\usepackage{diagbox}
\usepackage{slashbox}
% For the `memoir` class remove the following two packages.
% This class already provide the functionality of both
\usepackage{caption}
\usepackage[strict]{changepage}
%%%
\setcounter{totalnumber}{1}
\setcounter{topnumber}{1}
\setcounter{bottomnumber}{1}
\renewcommand{\topfraction}{.99}
\renewcommand{\bottomfraction}{.99}
\renewcommand{\textfraction}{.01}
\makeatletter
\newcommand*{\twopagepicture}[4]{%
\checkoddpage
\ifoddpage
\expandafter\@firstofone
\else
\expandafter\afterpage
\fi
{\afterpage{%
\if #1t%
\if #2p%
\thispagestyle{empty}%
\afterpage{\thispagestyle{empty}}%
\fi
\fi
\begin{figure}[#1]
\if #2p%
\if #1t%
\vspace*{-\dimexpr1in+\voffset+\topmargin+\headheight+\headsep\relax}%
\fi
\fi
\if #1b%
\caption{#4}%
\fi
\makebox[\textwidth][l]{%
\if #2p\relax
\let\mywidth\paperwidth
\hskip-\dimexpr1in+\hoffset+\evensidemargin\relax
\else
\let\mywidth\linewidth
\fi
\adjustbox{trim=0 0 {.5\width} 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%
\if #1b\else
\caption{#4}%
\fi
\if #2p%
\if #1b%
\vspace*{-\dimexpr\paperheight-\textheight-1in-\voffset-\topmargin-\headheight-\headsep\relax}%
\fi
\fi
\end{figure}%
\begin{figure}[#1]
\if #2p%
\if #1t%
\vspace*{-\dimexpr1in+\voffset+\topmargin+\headheight+\headsep\relax}%
\fi
\fi
\makebox[\textwidth][l]{%
\if #2p%
\let\mywidth\paperwidth
\hskip-\dimexpr1in+\hoffset+\oddsidemargin\relax
\else
\let\mywidth\linewidth
\fi
\adjustbox{trim={.5\width} 0 0 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%
\if #2p%
\if #1b%
\vspace*{-\dimexpr\paperheight-\textheight-1in-\voffset-\topmargin-\headheight-\headsep\relax}%
\fi
\fi
\end{figure}%
}}%
}
\makeatother
\usepackage{natbib}
\usepackage{array}
\usepackage{booktabs,tabularx}
\usepackage{longtable}
\usepackage{ltxtable}
\usepackage{xcolor}\usepackage{multicol}
\usepackage{verbatim}
\usepackage[normalem]{ulem}
\usepackage{color}
\definecolor{forestgreen}{rgb}{0.13,0.54,0.13}
\usepackage[left=1.5in,right=1.3in,top=1.1in,bottom=1.1in,includefoot,includehead,headheight=13.6pt]{geometry}
\renewcommand{\baselinestretch}{1.05}
Notice that I have used \clearpage and \cleardoublepage but both have absolutely no effect on the positioning of the figure.
Thanks