[Tex/LaTex] Figures in odd pages, text in even pages; if no figures, then odd=even pages (i.e., no blank pages w/ numbering and headers…)

double-sidedfloatspositioning

I'm writing my thesis using \documentclass{book}. I have plenty of figures and I want them to appear always on the right hand of my manuscript (since this is the "attraction" page when reading, and figures in my field are much more important).

Figures on left pages, text on right ones with class book, numbering only on right pages

Figures on left pages, text on right ones with class book (cont.)

do not cover this issue quite in the same way, and I didn't manage to improve that into something useful to me…

In this case, the odd pages should have normal headings (differently defined for odd and even pages with \usepackage{fancyhdr}), normal numbering and no blank pages should appear unless defined. Figures should try to appear always in the odd pages, BUT if there is more figure pages than text pages, figures should be located in the even pages as normal (see Example 1), and if there is more text pages than figure pages, text should be placed in odd pages as normal (see Example 2). No figures from Chapter 1 should appear in Chapter 2, for obvious reasons.

Example 1

Output:
Text pages: 20
Figure pages: 23
Three extra odd pages with figures would have appeared and three even pages would be blank.

Instead one should be able to locate some of those figures within the text in the even pages, as normal.

Example 2

Output:
Text pages: 23
Figure pages: 20
Three extra even pages with text would have appeared and three odd pages would be blank.

Instead one should be able to locate part of text in odd pages, as normal.

I am a newbie, so my apologies if this is posted somewhere and I couldn't find it, or if this problem has an easy solution that I could have solved myself. Now that I've explained in detail, I have the feeling that has no easy solution, though!

I hope you guys can help me!

Best Answer

I think it's enough to define

\makeatletter

\def\@floatplacement{\global\@topnum\c@topnumber
   \global\@toproom \topfraction\@colht
   \global\@botnum  \c@bottomnumber
   \global\@botroom \bottomfraction\@colht
   \global\@colnum  \ifodd\c@page\c@totalnumber\else\z@\fi%<<<<<<<
   \@fpmin   \floatpagefraction\@colht}

\makeatother

In which the marked line has been changed to set the number of allowed floats to zero (\z@) on even pages and the value of the LaTeX counter totalnumber (\c@totalnumber) on even pages.

In the original definition in LaTeX this line is

\global\@colnum\c@totalnumber

and the totalnumber counter applies to all non-float pages. See Frank's full description of the float parameters here How to influence the position of float environments like figure and table in LaTeX?

Related Question