Sunday, 19 May 2013

Ensure float appears directly after `\afterpage` and `landscape`

Ensure float appears directly after `\afterpage` and `landscape`

I have a large (full page) landscape figure that I would like to appear on the page opposite to a large (full page) portrait figure. The landscape figure is generated like so:
\afterpage{
    \begin{landscape}
        \begin{figure}
            \centering
            \includegraphics[scale=1]{path/to/the/file.pdf}
            \caption{The Caption}
        \end{figure}
    \end{landscape}
}
The afterpage allows the landscape page to float around. I would now like to add a figure that is on the opposite page; I have done so currently by adding it into the landscape and rotating it:
\afterpage{
    \begin{landscape}
        \begin{figure}
            \centering
            \includegraphics[scale=1]{path/to/the/file.pdf}
            \caption{The Caption}
        \end{figure}

        \begin{figure}
            \centering
            \includegraphics[scale=1,angle=-90]{path/to/another/file.pdf}
            \caption{The Other Caption}
        \end{figure}
    \end{landscape}
}
This has a couple of problems with it, though - firstly, it doesn't ensure that they're on facing pages (only that they're on consecutive pages), and secondly it results in a rotated caption for the second figure, which is not ideal because it's really a portrait figure.
I have looked for a solution to this problem, but can't seem to find it. Can anyone suggest one, or point me in the right direction?

No comments:

Post a Comment