10

I'd like to have text that is placed after a figure which occupies a whole page also to be placed after that page in the produces PDF file.

Imagine this (pseudo latex, not necessarily a working example):

\documentclass{scrbook}

\begin{document}
\section{ONE}
lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem 
ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum 
dolor sit amet 

\begin{figure}[!htbp]
  % some figure that takes the whole next page
\end{figure}

\section{TWO}
lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem 
ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum 
dolor sit amet 
\end{document}    

This results in a pdf document which looks kind of like this:

ONE
lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem 
ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum 
dolor sit amet 

TWO
lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem 
ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum 
dolor sit amet 
---- page break ----

[FIGURE]

---- page break ----

So, how do I get the figure to be placed at the end of section{one} and before section{two} where it is supposed to be instead of slipping into section{two}? Even if that means that section{one} only takes a fraction of page. Isn't that what [!htbp] actually is for?

//edit Regarding this text (in German, unfortunately; I hope you'll understand it anyway, in case of necessity, using Google Translator) in some cases it's just not a good idea to use floats. What do you think about it?

2
  • 2
    As Section two should began on a new page insert \clearpage before \section{Section Two}. Macro \clearpage forces that first are all missing images printed, thenn follows Section 2 .
    – Mensch
    Apr 17, 2013 at 12:50
  • I just want to make sure the figure is exactly where I want it to be. For this purpose [H], as mentioned by vonbrand, serves me well. Apr 18, 2013 at 9:31

2 Answers 2

13

Combine the option [p] (page float) with \afterpage:

\documentclass{scrbook}
\usepackage{afterpage}
\usepackage{lipsum} % Just for the example

\begin{document}
\section{ONE}
\lipsum[1]

\afterpage{\clearpage}
\begin{figure}[p] % <--- only p
\centering
\fbox{\rule{0pt}{6cm}\rule{6cm}{0pt}}
\caption{Some figure that takes the whole next page}
\label{nextpage}
\end{figure}

\lipsum[2-20]

\end{document}

The \afterpage{\clearpage} command will issue a \clearpage as soon as the next page is completed and \clearpage flushes the float queue.

2

If you use package float, you have the extra option H, which means "place the float HERE".

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .