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

Bad footnote placing in LaTeX

137 views
Skip to first unread message

RockMover

unread,
Sep 27, 2001, 1:38:32 PM9/27/01
to
Hello, All!

A LaTeX user found the strange and unwanted behaviour of
splitted footnote when interfered with a float. Namely,
a footnote started at the page 1 continues not ot the page 2
but on the page 3, while there is enough room for it on the page 2.

The reason seems to be the float on the page 3, which are read
by TeX in advance when it seeks for a break of the page 2. The float
then still goes to the page 3, but it seems that LaTeX forgets to
put the rest of footnote on the page 2, so it migrates to the page 3.

If user placed the float one paragraph below, all is OK (but
it's just naturally to put \begin{figure} where you refer to it
in your text).

As I know little about how the LaTeX treats floats in its
output routine, and I cannot say whether the user should consider
it a bug in LaTeX, nor I know a remedy.

This is the example file:

\documentclass{article}

% Several defs just to get four pages of dummy bla-bla text.
\def\bla{bla } \def\Bla{Bla }
\def\blax{\bla \bla \bla \bla \bla \bla \bla \bla \bla \bla }
\def\blac{\blax\blax\blax\blax\blax\blax\blax\blax\blax\blax}
\def\Blapar{\Bla\blac\unskip.\par}

\def\ftn{\footnote{\Bla\blac\blax\blax\blax\blax\blax\unskip.}}

\begin{document}
\tracingpages=2
\Blapar\Blapar\Blapar\Blapar\Blapar\Blapar\Blapar
\Bla\blac\unskip\ftn.\par
\Blapar\Blapar\Blapar
% make the page stretchable/shrinkable
\vspace{5pt plus 150pt minus 10pt}
\Blapar\Blapar\Blapar\Blapar\Blapar\Blapar

\begin{figure}
\unitlength=1mm\begin{picture}(40,45)\end{picture}
\caption{Fake picture}
\end{figure}

Figure here.\par
\Blapar\Blapar\Blapar\Blapar\Blapar
\Blapar\Blapar\Blapar\Blapar\Blapar\Blapar\Blapar
\end{document}


And this is parts of the log of tracingpages:

On the page 1:

%% goal height=550.0, max depth=5.0
% t=0.0 g=550.0 b=10000 p=0 c=100000#
[...]
% t=466.0 plus 7.0 g=550.0 b=10000 p=150 c=100000#
% split253 to 63.0,54.18999 p=250
% t=478.0 plus 11.0 minus 2.0 g=486.81001 b=51 p=0 c=301#
% t=490.0 plus 12.0 minus 2.0 g=486.81001 b=* p=150 c=*
[1

]

Start of the footnote placed. Then, on the page 2:

%% goal height=550.0, max depth=5.0

Goal g=531.49998, I think because of splitted part of footnote

% t=0.0 plus 4.0 minus 2.0 g=531.49998 b=10000 p=0 c=100000#
[...]
% t=507.0 plus 162.0 minus 12.0 g=531.49998 b=0 p=0 c=0#
% t=519.0 plus 162.0 minus 12.0 g=531.49998 b=0 p=0 c=0#

Starting reading extra stuff, which really goes to the next page

% t=531.0 plus 162.0 minus 12.0 g=531.49998 b=0 p=150 c=150
% t=543.0 plus 162.0 minus 12.0 g=531.49998 b=87 p=-10004 c=-10004#

Float encountered, so -10004 signalling came into scene, and
specialoutput run.

%% goal height=16383.99998, max depth=5.0
% t=10.0 g=16383.99998 b=10000 p=-10003 c=-10003#

Now the same page again, but seems that LaTeX completely forgot
about the rest of our footnote, g=550.0

%% goal height=550.0, max depth=5.0
% t=10.0 g=550.0 b=10000 p=150 c=100000#
[...]
% t=519.0 plus 158.0 minus 10.0 g=550.0 b=1 p=0 c=1#
% t=531.0 plus 158.0 minus 10.0 g=550.0 b=0 p=150 c=150
% t=543.0 plus 162.0 minus 12.0 g=531.49998 b=87 p=0 c=87
% t=555.0 plus 163.0 minus 12.0 g=531.49998 b=* p=0 c=*
[2]

And this run is successful, so footnote to place on the next page:

%% goal height=378.01883, max depth=5.0
% t=10.0 g=378.01883 b=10000 p=150 c=100000#
[...]
% t=358.0 plus 11.0 minus 2.0 g=359.51881 b=0 p=0 c=0#
% t=370.0 plus 11.0 minus 2.0 g=359.51881 b=* p=0 c=*
[3]


WBR, RockMover
I am The Master of Flame...

RockMover

unread,
Sep 27, 2001, 5:00:06 PM9/27/01
to
Hello!

Stefan Ulrich wrote:

> RockMover <rmo...@aport.ru> writes:
>
> > As I know little about how the LaTeX treats floats in its
> > output routine, and I cannot say whether the user should consider
> > it a bug in LaTeX, nor I know a remedy.
>

> Sounds indeed like the infamous footnote bug; compare e.g.
>
> http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/2032

Thank you, I'm sure this is realy this old bug :-(and maybe there is no
way to fix it?).

One more thing, can you tell me how one can use LaTeX bugs database?
Before posting my original message I tried to search it for keywords
"footnote" and "float", but found nothing, got "No matches!".

> http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=latex/3208
>
> --
> Stefan Ulrich

Donald Arseneau

unread,
Sep 27, 2001, 10:17:29 PM9/27/01
to
RockMover <rmo...@aport.ru> writes:

> A LaTeX user found the strange and unwanted behaviour of
> splitted footnote when interfered with a float. Namely,
> a footnote started at the page 1 continues not ot the page 2
> but on the page 3, while there is enough room for it on the page 2.

LaTeX only puts footnotes (or parts thereof) on text pages,
not on float pages. This is the intended behavior, not the
bug mentioned by another poster.

You will probably be happier by declaring

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

And/Or giving the float on page 3 a "[!t]" placement option.

Donald Arseneau as...@triumf.ca

Donald Arseneau

unread,
Sep 27, 2001, 10:20:22 PM9/27/01
to
"RockMover" <rmo...@aport.ru> writes:

> One more thing, can you tell me how one can use LaTeX bugs database?

Something is wrong with it now.

Donald Arseneau as...@triumf.ca

RockMover

unread,
Sep 28, 2001, 4:36:14 AM9/28/01
to
Hello!

Donald Arseneau wrote:
> > A LaTeX user found the strange and unwanted behaviour of
> > splitted footnote when interfered with a float. Namely,
> > a footnote started at the page 1 continues not ot the page 2
> > but on the page 3, while there is enough room for it on the page 2.
>
> LaTeX only puts footnotes (or parts thereof) on text pages,
> not on float pages. This is the intended behavior, not the
> bug mentioned by another poster.

Maybe someone misunderstood something.
1. LaTeX does put footnotes on pages with floats and text (at least for me
:-).
2. As should be clear from my original post (if you can stand my english),
in my case page 2 gets neither float nor footnote, while page 3 gets both
the float (OK) and the end of footnote (which undoubtedly should go to the
page 2).
So symptomes resemble those mentioned on latex/2032 bugreport.

> You will probably be happier by declaring
>
> \renewcommand{\topfraction}{.85}

[...]

This did not make me a bit happier. I.e. it did not help with footnote,
but I was very glad to read from you :-).

> Donald Arseneau as...@triumf.ca

Robin Fairbairns

unread,
Sep 28, 2001, 6:17:48 AM9/28/01
to
RockMover <rmo...@aport.ru> wrote:
>Donald Arseneau wrote:
>> > A LaTeX user found the strange and unwanted behaviour of
>> > splitted footnote when interfered with a float. Namely,
>> > a footnote started at the page 1 continues not ot the page 2
>> > but on the page 3, while there is enough room for it on the page 2.
>>
>> LaTeX only puts footnotes (or parts thereof) on text pages,
>> not on float pages. This is the intended behavior, not the
>> bug mentioned by another poster.
>
> Maybe someone misunderstood something.
> 1. LaTeX does put footnotes on pages with floats and text (at least for me
>:-).

that's not what donald said: there are two sorts of pages -- text
pages and float pages. float pages have nothing but floats on them.
text pages have text and may also have floats on them (those with one
of [htb] placement).

> 2. As should be clear from my original post (if you can stand my english),
>in my case page 2 gets neither float nor footnote, while page 3 gets both
>the float (OK) and the end of footnote (which undoubtedly should go to the
>page 2).

ah. i had definitely come to the same conclusion as donald. it's
probably because i'm a bit deaf ;-)

>So symptomes resemble those mentioned on latex/2032 bugreport.

but i suspect they're slightly different. i think the issue could do
with revisiting: i'll suggest it be reviewed.
--
Robin Fairbairns, Cambridge -- rf10 at cam dot ac dot uk

RockMover

unread,
Sep 28, 2001, 11:08:49 AM9/28/01
to
Hello!

Robin Fairbairns wrote:

[...]

> >> LaTeX only puts footnotes (or parts thereof) on text pages,
> >> not on float pages. This is the intended behavior, not the
> >> bug mentioned by another poster.
> >
> > Maybe someone misunderstood something.
> > 1. LaTeX does put footnotes on pages with floats and text (at least for me
> >:-).
>
> that's not what donald said: there are two sorts of pages -- text
> pages and float pages. float pages have nothing but floats on them.
> text pages have text and may also have floats on them (those with one
> of [htb] placement).

I see. However, this is definitely not my case, as I have no float pages,
so I can not see how does Donald's remark relate to my example, probably
because I am a bit dumb :-)

> > 2. As should be clear from my original post (if you can stand my english),
> >in my case page 2 gets neither float nor footnote, while page 3 gets both
> >the float (OK) and the end of footnote (which undoubtedly should go to the
> >page 2).
>
> ah. i had definitely come to the same conclusion as donald. it's
> probably because i'm a bit deaf ;-)

Or because it was me who sleeped too much at my English lessons.



> >So symptomes resemble those mentioned on latex/2032 bugreport.
>
> but i suspect they're slightly different. i think the issue could do

Maybe you are right; it was just Occam razor that make me think there is
one bug in the output routine, not two.

> with revisiting: i'll suggest it be reviewed.
> --
> Robin Fairbairns, Cambridge -- rf10 at cam dot ac dot uk

WBR, RockMover

Donald Arseneau

unread,
Sep 28, 2001, 7:18:59 PM9/28/01
to
"RockMover" <rmo...@aport.ru> writes:

> Maybe someone misunderstood something.
> 1. LaTeX does put footnotes on pages with floats and text (at least for me

As Robin pointed out, you did misunderstand my answer re "float pages".

> 2. As should be clear from my original post (if you can stand my english),
> in my case page 2 gets neither float nor footnote,

And I misunderstood the question I jumped to the conclusion that
page 2 was a float page (only floats).

The problem is an old one that has never been fixed in LaTeX,
despite complaints over the years. Maybe it is held up by the
promised super-duper page layout output routine.

Anyway, you can probably search google:groups for the answer,
which is to just move the figure declaration a bit, probably
a bit later.

(For the record, the problem is \@reinserts, and is documented
in ltfloat.dtx, including the possibility of a footnote losing
track of where it belongs.)


while page 3 gets both
> the float (OK) and the end of footnote (which undoubtedly should go to the
> page 2).
> So symptomes resemble those mentioned on latex/2032 bugreport.
>
> > You will probably be happier by declaring
> >
> > \renewcommand{\topfraction}{.85}
>
> [...]
>
> This did not make me a bit happier. I.e. it did not help with footnote,
> but I was very glad to read from you :-).
>
> > Donald Arseneau as...@triumf.ca
>
>
> WBR, RockMover
> I am The Master of Flame...
>

--
Donald Arseneau as...@triumf.ca

0 new messages