I'm writing a report and I want to make sure that each new chapter starts in an odd page. So I wrote the following script which I put before each chapter:
...
%-- to make sure that a new chapter starts on the right side (odd page) %
\ifodd \thepage
{\newpage
\thispagestyle{empty}
\mbox{}
}
\else
{}
\fi
%-----------------------------------------------------------------------%
\chapter{Chap_name}
...
It works as following:
If the page before my new chapter is odd, it means that I have to add a blank page in order to start to start the new chapter in the next odd page number.
It works fine if the previous page is a normal page.
But when I have a figure in the page before it, which was moved to a new page since it did not fit in the page and there is not text in the page alongside with the float, then this script does not work.
The command \thepage returns a wrong page number (apparently it does not increment if the page only contains a float) and so it does not add a blank page in case the last page was indeed odd.
I dont know how to solve this issue. any ideas?
thanks for helping.
\cleardoublepage? – Alex Aug 28 '12 at 08:29