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

schoekling
  • 3,142
  • 2
    Is this a one-off situation in your document, or does it occur several times? – Ian Thompson Mar 20 '21 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 '21 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 '21 at 10:58
  • @leandriis The idea of using the minipage was to allow for the lower half of the second page to be 'designed' like normal text, e.g. for the insertion of references etc. But yes in this MWE it's only for that lengthy caption. – schoekling Mar 20 '21 at 11:01
  • 2
  • See also https://tex.stackexchange.com/questions/280998/figure-on-an-even-page-and-caption-on-the-following-page/281075?r=SearchResults&s=3|30.1801#281075 – John Kormylo Mar 20 '21 at 15:05
  • 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. – Ian Thompson Mar 22 '21 at 10:22

1 Answers1

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

schoekling
  • 3,142