I am writing a double-page layout document with many graphics, figures and graphs. I do not think latex is putting these in their correct spot, and want to make a special page layout: Have all the text on the odd pages and all the illustration on the even pages. If there is no illustrations, the even pages should be left blank (except headers and footers).
I guess it's possible to do in some way or another, the question is how to do it?
Page Layout ⇒ Double page: Figures on even pages, text on odd pages
NEW: TikZ book now 40% off at Amazon.com for a short time.

Double page: Figures on even pages, text on odd pages
I have an answer; I hope it is not too late and it fits your needs and those of others around.
It is tailored to work with a book class with the oneside option activated.
First thing first, insert a blank page between every text page automatically (or a picture if a picture is defined beforehand). Write in the preamble:
And after the \begin{document}
Then, in the text anywhere in the page preceding the one we want to insert the picture on, if you want to insert a picture or a table (if you put nothing, a blank page will appear):
You can note that I did not use a figure environment in order to put the figure in the middle of the blank page more easily.
You have to redefine \caption in order for it to work outside a float.
Very classic with that in the preamble:
It does not work as well with tables AND figures (then you have to create other kinds of caption commands - doable of course, in order not to mix them).
You will have:
- Text only on right side pages
- Images only on left side pages
- Correct list of figures (and tables as well if you tweak it a bit)
- The correct numeration of your pages if you manage the pagestyle and stepcounter correctly.
I found the most important part of the process (the blankpage macro) thanks to Danie Els on an other forum.
It is tailored to work with a book class with the oneside option activated.
First thing first, insert a blank page between every text page automatically (or a picture if a picture is defined beforehand). Write in the preamble:
Code: Select all
\usepackage{afterpage}
\makeatletter
\newcommand\@addfig{\relax}
\newcommand\addfig[1]{\global\long\def\@addfig{#1}}
\newcommand\@putfig{\@addfig\addfig{\relax}}
\newcommand\blankpage{%
\null
\vfill
\@putfig%
\vfill
\thispagestyle{empty}% BEWARE, if you want the header and footer, you should put the correct style here
\clearpage%
\addtocounter{page}{-1}% BEWARE, if you want the left pages to be numbered, don't put this line, this is intended to have picture page with the same number as the facing text page
\afterpage{\blankpage}}
\makeatother
Code: Select all
\afterpage{\blankpage}
Code: Select all
\addfig{%
\centering
\includegraphics[scale=1]{Image1}
\caption{Test}
\label{Ima1}
}
You have to redefine \caption in order for it to work outside a float.
Very classic with that in the preamble:
Code: Select all
\makeatletter
\def\@captype{figure}
\makeatother
You will have:
- Text only on right side pages
- Images only on left side pages
- Correct list of figures (and tables as well if you tweak it a bit)
- The correct numeration of your pages if you manage the pagestyle and stepcounter correctly.
I found the most important part of the process (the blankpage macro) thanks to Danie Els on an other forum.
Double page: Figures on even pages, text on odd pages
Thank you for this very useful information I was exactly looking for!
To go further with the discussion, I would like to handle 2 additional features:
For the second, I defined a new command \switchcaption as follows which I call before and after a table respectively with "table" and "figure" as argument.
By the way, I would be very interested in better understanding
PS: the answer by Danie Els is avaiable at http://tex.stackexchange.com/questions/ ... nly-on-rig
To go further with the discussion, I would like to handle 2 additional features:
- the suppression of blank pages automaticly inserted by book,
- the possibility to switch between figure and table captions.
Code: Select all
\renewcommand\chapter{
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
Code: Select all
\newcommand\switchcaption[1]{\def\@captype{#1}}
- when it is useful to use directly \def instead of \(re)newcommand (\newcommand\@captype{figure} seems to work just as well as \def\@captype{figure}),
- when it is needed to work within \makeatletter \makeatother (apparently \newcommand works differently in both cases: it "reads" the new command name with subsequent braces outside \makeatletter \makeatother and without braces otherwise),
- why \addfig definition needs to statements (one for \@addfig and another apparently for its argument).
PS: the answer by Danie Els is avaiable at http://tex.stackexchange.com/questions/ ... nly-on-rig
Double page: Figures on even pages, text on odd pages
I finally worked out more elegant (and suitable) solutions to the above-mentionned issues.
- The blank pages were actually linked to the page break inserted by `\include` (I am writing a thesis...). Using `\input` instead solves the problem (without redefining `\chapter`). In addition, I managed to avoid blank pages at the end of the document redefining `\blankpage` to stop recursion (`\renewcommand{\blankpage}{}`).
- To define table captions (which are much less numerous than figure ones), I realised that I could use the command `\captionof` provided by the caption package I am using anyway.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Double page: Figures on even pages, text on odd pages
It would be very kind if you mention when doing a crossposting [1]*. This is only fair because it prevents others from double efforts and waste of time.Ben wrote:I finally worked out more elegant (and suitable) solutions to the above-mentionned issues.
- The blank pages were actually linked to the page break inserted by `\include` (I am writing a thesis...). Using `\input` instead solves the problem (without redefining `\chapter`). In addition, I managed to avoid blank pages at the end of the document redefining `\blankpage` to stop recursion (`\renewcommand{\blankpage}{}`).
- To define table captions (which are much less numerous than figure ones), I realised that I could use the command `\captionof` provided by the caption package I am using anyway.
The same applies to this [2]. Such behaviour is contra-productive.Martigan wrote:I found the most important part of the process (the blankpage macro) thanks to Danie Els on an other forum.
* According to the rules you are obliged to do so.
[1] {TeX} SX – Figures on left pages, text on right ones with class book (cont.)
[2] {TeX} SX – Figures on left pages, text on right ones with class book, numbering only on right pages
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10