I have a 500 pages book with some figure and tables. Sometimes a figure needs to fill an entire page. The legend for this large figure is going to the previous or the next page. I wonder whether this could be automated in tex: When the figure is on an odd page, put the legend on the previous, even page; when the figure is going to an even page, put the legend on the next, odd page. So far I did this by changing the legend.
\documentclass[two-sided]{book}
\usepackage{lipsum,graphicx}
\begin{document}
\lipsum[1-11]
\begin{figure}[p]
\includegraphics[width=\textwidth,height=.999\textheight]{example-image}% La
\end{figure}
\begin{figure}[b]
\caption[Some rather long caption]{\lipsum*[2]}
\end{figure}
\lipsum[12-20]
\end{document}
The MWE is from David Carlisle from this question full page figure with preciding caption and I had to change the position of the caption that caption and figure face each other.