The resolution of this problem appears at the end of this post. First here is the puzzling symptom.
I am using the LaTeX book class on a long complex 400pp document.
Some floats generated with the LaTeX \begin{figure} environment (no optional arguments) decide to float many pages beyond the point where they were invoked (other floats in between the bad ones appear OK). Figures can float past a \cleardoublepage, past a \part{}, past a \chapter{}. Some appear on the second page of the following chapter! In between, there are pages containing no floats, where the figure could plausibly have been placed. There are no warnings in the .log file, neither on the page where the figure environment was invoked, nor on the page where the float actually appears.
Resolution: My book also contains many \marginpar's. The problem was that in just one place I had accidentally embedded a \marginpar inside a \footnote. I knew this was not allowed, but I did not realize that it would break something inside LaTeX and, for hundreds of following pages, mess up placement of figure floats. Fixing this one line fixed everything.
example-imagefromgraphicxpackage with\includegraphics[width=0.5\hsize]{example-image}). And addto float options [htbp]. And see you log file, there probably is some warning ... – Zarko Oct 19 '15 at 16:50.logregarding the float placement? Without any concrete content to play with, I think this comment thread is going to grow long before the question is closed... – Werner Oct 19 '15 at 16:59\FloatBarriercommand, beyond which floats may not pass; useful, for example, to ensure all floats for a section appear before the next\sectioncommand." – Stephen Oct 19 '15 at 18:29\FloatBarrieruses\clearpageso if the OP has disabled\clearpagethen probably this will not work either, – David Carlisle Oct 19 '15 at 18:40\meaning\clearpageprint in your document? – David Carlisle Oct 19 '15 at 18:40\cleardoublepagedid not help, maybe\clearpage(or\FloatBarrierincluding\clearpage) are unchanged and work. Thus your question for\meaning\clearpage(and\meaning\cleardoublepage) is indeed the next step to find out what is going on. – Stephen Oct 19 '15 at 18:46->\clearpage \thispagestyle {empty}\strut \vfill \eject . And \show\clearpage inserts the following into the log file:
->\vfill \eject \relax .
– Phil Nelson Oct 19 '15 at 19:21