Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This is a followup to the question: How to ensure that 2 couples of figures are on 2 facing pages?.

The answer there was to use dpfloat. However, dpfloat assumes that even pages are on the left. In my case odd pages will be on the left when the printing is done. Can I get dpfloat type behaviour, with odd pages on the left?

share|improve this question
    
I actually just did that! But it would be nice if there was a better answer... –  Caleb Apr 18 '13 at 22:04
    
To explain the context of this problem. I am writing a thesis. I need to submit the PDF using an official tool to the university for approval. Once approved, it can be printed. The printer adds a new page to the pdf, after the title page, with publisher information. This shifts all of the pages by one. Due to the automated nature of this process, I have little control over it. –  Caleb Apr 18 '13 at 22:05
    
That's normal but it's no reason to break with centuries of tradition and print pages with the wrong parity. It's also the reason why traditionally books used romannumerals at the front so pages could be added without messing up the real page 1. In the part that you do have control over just force the page number 1 (or 3 or some other suitable number) so that the parity is right after the insert. –  David Carlisle Apr 18 '13 at 22:23
    
re-do first comment as I garbled it but am out of time to edit it: you could take a copy and change \ifodd\count0\global\@fpmin\maxdimen to \ifodd\count0 \else\global\@fpmin\maxdimen But odd pages on the left is very strange if you are writing in an LTR language. –  David Carlisle Apr 18 '13 at 22:44
    
@DavidCarlisle I don't think the university will like a page number skip for the official electronic document, which is really what matters. In fact, they insist that page number 1 is the title page (they also insist on other things that make printing look bad, like page numbers always in the upper right corner). The printed book is more for personal reasons. –  Caleb Apr 19 '13 at 16:02
add comment

2 Answers

dpfloat uses an \ifodd test to test the parity of the page and you just need to invert the parity so in the preamble after \usepackage{dpfloat} just add

\makeatletter
 \def\@xtryfc #1{%
   \expandafter\if\csname LP:\string#1\endcsname L%
      \ifodd\else\count0\global\@fpmin\maxdimen
             %%%%
          \typeout{dpfloat moved a leftpage float from page \the\count0.}%
      \fi\fi
    \old@xtryfc #1}
\makeatother

However it would be much better not to do this at all and just add two rather than one page into the front matter so that the parity of the pages is preserved. Essentially no printed material in a left to right language has odd pages on the left.

share|improve this answer
add comment
up vote 1 down vote accepted

Not an ideal solution, but you can actually edit a copy of the dpfloat package.

If you don't want to edit the official package in your distribution, you can get a copy of the dpfloat.sty package from its CTAN page. Put a copy of the dpfloat.sty in your working directory alongside your main latex file, say mydpfloat.sty.

Open mydpfloat.sty, and look for the lines:

\ifodd\count0\global\@fpmin\maxdimen
     \typeout{dpfloat moved a leftpage float from page \the\count0.}%
\fi\fi

We just need to add an \else to this. The lines become:

 \ifodd\count0
 \else\global\@fpmin\maxdimen
     \typeout{dpfloat moved a leftpage float from page \the\count0.}%
 \fi\fi

This will change the dpfloat package to consider odd pages to be on the left.

You will also need to change

\ProvidesPackage{dpfloat}[2006/10/05]

to

\ProvidesPackage{mydpfloat}[2013/04/19]
share|improve this answer
    
No please don't edit the file with the same name, it will get copied and cause confusion, please call the edited copy altdpfloat.sty (or anything) and use \usepackage{altdpfloat} there really is no need to use the same package name. (of course you don't need to edit the file at all you could load the original package and then just change that one macro in your preamble. –  David Carlisle Apr 19 '13 at 16:09
    
Yeah, I was trying to keep this answer minimalistic. I'm admittedly not a LaTeX expert. If I get the chance to test your method, I'll update my answer to utilize it. I'm quite busy right now though so it might take me a few days to get to it. Otherwise, feel free to edit it yourself, or make your own answer. You seem to be more knowledgeable on LaTeX, and I defer to your superior experience :-). –  Caleb Apr 19 '13 at 20:00
    
Thank you for editing it. –  Caleb Apr 19 '13 at 23:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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