Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

\clearpage without starting new page

4,018 views
Skip to first unread message

p8mode

unread,
Jan 3, 2006, 5:41:31 AM1/3/06
to

Is there no way to get latex to output all figures without starting a
new page? If I call "\clearpage" it flushes all pending the figures
ok, but starts a new page then. Is there any cmmand with which I can
achive the former without the latter?

P.S.
And in fact is there no way to tell Latex to output a figure here
no matter what? Even if I call

\begin{figure}[!h]

Latex still seems to put it somewhere else sometimes

Robin Fairbairns

unread,
Jan 3, 2006, 8:58:14 AM1/3/06
to
"p8mode" <p8m...@gmx.net> writes:
>Is there no way to get latex to output all figures without starting a
>new page? If I call "\clearpage" it flushes all pending the figures
>ok, but starts a new page then. Is there any cmmand with which I can
>achive the former without the latter?

\usepackage{afterpage}
...
\afterpage{\clearpage}

will usually do the trick (deposit the figures after current page).

>P.S.
>And in fact is there no way to tell Latex to output a figure here
>no matter what? Even if I call
>
> \begin{figure}[!h]
>
>Latex still seems to put it somewhere else sometimes

! has limited capacity for suppressing parameter checking. among
other things, it won't allow a "h" float that would run over the end
of the current page.

if you want to do that, use the float package, and its H float
placement parameter.

see

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats
--
Robin Fairbairns, Cambridge

Will Robertson

unread,
Jan 4, 2006, 2:49:13 AM1/4/06
to
Robin Fairbairns wrote:
> "p8mode" <p8m...@gmx.net> writes:
> >Is there no way to get latex to output all figures without starting a
> >new page? If I call "\clearpage" it flushes all pending the figures
> >ok, but starts a new page then. Is there any cmmand with which I can
> >achive the former without the latter?
>
> \usepackage{afterpage}
> ...
> \afterpage{\clearpage}
>
> will usually do the trick (deposit the figures after current page).
[...]
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats

>From Robin's link above is a solution more directly applicable to the
original poster's question: "Try the placeins package: it defines a
\FloatBarrier command beyond which floats may not pass."

Will

Robin Fairbairns

unread,
Jan 4, 2006, 10:26:48 AM1/4/06
to

i thought about that, and decided the op probably meant what i
suggested, rather than what he actually wrote.

i could well have been over-interpreting here: it's not unheard-of
that i should do such a thing.

however ... on the whole, i think people avoid the faq because it
offers options, and often doesn't just *tell* them what to do. i'm
trying to put that right (by giving people enough information to make
their own decisions) but i think it's quite important to make a
positive recommendation here, asap. there's plenty of misinformation
on c.t.t (though not as much as on some groups) and a clear statement
can sometimes distract people from misinformation.
--
Robin Fairbairns, Cambridge

Scott Pakin

unread,
Jan 4, 2006, 6:04:54 PM1/4/06
to
Robin Fairbairns wrote:
> however ... on the whole, i think people avoid the faq because it
> offers options, and often doesn't just *tell* them what to do. i'm
> trying to put that right (by giving people enough information to make
> their own decisions)

Interesting hypothesis. If true, then maybe the right way to give people
enough information to make their own decision is to provide terse (as in
a few words) "pro" and "con" summaries after the introductory prose:

* Put the following commands in your document's preamble:

\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}

- Pro: Usually solves the real problem, which is that LaTeX's
defaults are rather conservative about fitting floats on pages).
- Cons: Does not _force_ floats to flush.

* Use the float package's [H] placement option to force floats to
go "here".
- Pro: Prevents float buildup.
- Con: Generally poor typographic style; may leave ugly gaps in
the text.

* Insert \clearpage commands.
- Pro: Forces floats to flush immediately.
- Con: May leave ugly gaps in the text.

* Use the afterpage package to put \clearpage after the current page.
- Pro: Clears the float backlog without ugly gaps in the text.
- Con: Somewhat fragile

etc.

-- Scott

Robin Fairbairns

unread,
Jan 5, 2006, 4:25:09 AM1/5/06
to
Scott Pakin <scot...@pakin.org> writes:
>Robin Fairbairns wrote:
>> however ... on the whole, i think people avoid the faq because it
>> offers options, and often doesn't just *tell* them what to do. i'm
>> trying to put that right (by giving people enough information to make
>> their own decisions)
>
>Interesting hypothesis. If true, then maybe the right way to give people
>enough information to make their own decision is to provide terse (as in
>a few words) "pro" and "con" summaries after the introductory prose:
>
> [example omitted]

i'll bear this in mind -- will probably try it out on label=floats, as
an experiment (given i already have most of the text...) -- thanks.
--
Robin Fairbairns, Cambridge

p8mode

unread,
Jan 5, 2006, 2:34:28 PM1/5/06
to
Thanks very much for the helpful information

0 new messages