4

I am trying to make two figures (namely a map and its legend together with a long caption) appear side by side on separate pages.

So far, I have managed to put them on the next two available pages after their position in the code and let the text flow neatly around them:

enter image description here

\documentclass{scrbook}

\usepackage{graphicx,blindtext}

\usepackage[pdfpagelayout=TwoPageRight]{hyperref}

\begin{document}
    \blindtext
    \begin{figure}[!hp]
        \includegraphics[height=\textheight,width=\textwidth]{example-image-a}
    \end{figure}
    \begin{figure}[!hp]
        \includegraphics[height=.5\textheight,width=\textwidth]{example-image-b}
        \begin{minipage}{\textwidth}
            \caption{Caption}
            \blindtext
        \end{minipage}
    \end{figure}
    \blindtext[10]
\end{document}

However, I do not know how to ensure those pages actually appear next to each other, i.e. how to ensure that figure A appears on the first even page following its position in the code.

In other words, how can I avoid results like this (produced with \blindtext[5] in the beginning):

enter image description here

7
  • 2
    Is this a one-off situation in your document, or does it occur several times? Mar 20, 2021 at 10:44
  • Will there be something else on the second page, apart from the smaller image and the lenghty caption? I assume \begin{minipage}{\textwidth} \caption{Caption} \blindtext \end{minipage} in your MWE resembles this long caption. Is that correct?
    – leandriis
    Mar 20, 2021 at 10:54
  • 1
    @IanThompson For my current situation it is only a one-time thing, so I could manually place the figure earlier/later in the document depending on the final length of the chapter, if that's what you are suggesting. But I thought it would be nice to have a hooman stupid but machine smart, so it's ok-solution to this and automate the process.
    – schoekling
    Mar 20, 2021 at 10:58
  • 2
    The following might be useful: How to float until on left (or right) page? and Placing figure on an even/odd page
    – leandriis
    Mar 20, 2021 at 12:42
  • 1
    Yes, with just a one-off occurrence, I would have been lazy and moved the figures manually when everything else was finished. It looks like the solutions suggested by @leandriis are a lot better than that, though. Mar 22, 2021 at 10:22

1 Answer 1

3

Thanks to leandriis I found the solution I was looking for in this answer and even a TeXFAQ page.

For reference, here is the adaptation of my MWE using the dpfloat package and its leftfullpage environment:

\documentclass{scrbook}

\usepackage{graphicx,blindtext}
\usepackage{dpfloat}

\usepackage[pdfpagelayout=TwoPageRight]{hyperref}

\begin{document}
    \blindtext[5]
    \begin{figure}[!hp]
        \begin{leftfullpage}
        \includegraphics[height=\textheight,width=\textwidth]{example-image-a}
        \end{leftfullpage}
    \end{figure}
    \begin{figure}[!hp]
        \includegraphics[height=.5\textheight,width=\textwidth]{example-image-b}
        
        \begin{minipage}{\textwidth}
            \caption{Caption}
            \blindtext
        \end{minipage}
    \end{figure}
    \blindtext[10]
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .