21

I have two sideways tables that I want on two facing pages so the reader can turn the entire book and read them both in one turn. For the moment I keep moving them around to keep them on facing pages. Is there a way I can make the first one float until it's on a left page and then place the other one right after? Or perhaps some similar way to automatically get them on the same spread?

  • For reference: There's a TeX FAQ dedicated to this. – krlmlr Mar 7 '16 at 17:05
18

Use package dpfloat (double page float)

\documentclass[twoside]{article}
\usepackage{dpfloat}
\usepackage{lipsum}

\begin{document}
\lipsum[2]

\begin{figure}[p]% will be the left-side figure
\begin{leftfullpage}
This is the left side figure
\caption{And this is the caption of the left side figure}
\end{leftfullpage}
\end{figure}
\begin{figure}[p]% will be the right-side figure
\caption{And this is the caption of the right side figure}
\begin{fullpage}
This is the right side figure
\end{fullpage}
\end{figure}

\lipsum
\end{document}
  • 3
    FloatBarrier has no effect on these floats. – Nicholas Hamilton May 12 '13 at 21:05
  • ?? Where did I wrote something about FloatBarrier?? – user2478 May 12 '13 at 21:07
  • You didn't I am just saying that if you want to use FloatBarrier to force all of the floats to be written prior to the start of the next section for example, it doesn't work if the floats are within the leftfullpage or fullpage environments. They run into the next section. – Nicholas Hamilton May 12 '13 at 21:10
  • sure, what else do you expect when the floats are on a full page?? – user2478 May 12 '13 at 21:12
  • To fill blank counter-pages, or, write the 'leftfullpages' as 'fullpages' until all of the floats are written up until where the FloatBarrier is instructed. – Nicholas Hamilton May 12 '13 at 21:14
6

You may use package afterpage to put something at the next page. Using this, you may define a new command, to put something onto the next even page:

\newcommand\atevenpage[1]{%
  \afterpage{\clearpage% be sure, that there are no pending floats
    \ifodd\value{page}% still a odd page
      \atevenpage{#1}%
    \else
      #1%
    \fi
  }%
}

Caveat: Sometimes \afterpage uses not exactly the next page but a later one. Because of this, I've not used \afterpage to delay output at odd pages, but one more \atevenpage. This may delay material a lot. And note, that you should not use \afterpage near to a longtable.

  • The memoir class and the nextpage package both have a \cleartoevenpage that can be used here. – Karl Ove Hufthammer Nov 23 '11 at 10:19
  • @Karl: That's something completely different. \cleartoevenpage will set empty pages until next even page. \atevenpage will float the argument until next even page without adding empty pages into the document. – Schweinebacke Nov 23 '11 at 10:24
  • Yes, you’re right. I just noticed the (sometimes) double use of \clearpage, and thought you could use \cleartoevenpage instead, but of course you use a double \afterpage too, which makes all the difference. – Karl Ove Hufthammer Nov 23 '11 at 10:41
  • Could this approach change the order of the floats? – krlmlr Mar 7 '16 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.