Bug 74693 - Footnotes text appearing above footnote separator line after repagination
Summary: Footnotes text appearing above footnote separator line after repagination
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: Footnote-Endnote Repagination
  Show dependency treegraph
 
Reported: 2014-02-07 20:08 UTC by Rodrigo Nuno Bragança da Cunha
Modified: 2023-04-24 03:24 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
page 39 footnotes (260.45 KB, image/png)
2014-02-10 23:09 UTC, Jacques Guilleron
Details
Example created with 5.0.5.2 on Windows 10 (92.04 KB, application/pdf)
2016-04-16 14:38 UTC, publik
Details
Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.odt (303.94 KB, application/vnd.oasis.opendocument.text)
2017-11-03 09:15 UTC, Yousuf Philips (jay) (retired)
Details
Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.pdf (1.46 MB, application/pdf)
2017-11-03 09:15 UTC, Yousuf Philips (jay) (retired)
Details
Bug in footnotes, pages 46 and 47 (1.42 MB, application/pdf)
2017-11-05 03:21 UTC, Rodrigo Nuno Bragança da Cunha
Details
Bug in footnotes, pages 46 and 47 (304.41 KB, application/vnd.oasis.opendocument.text)
2017-11-05 03:22 UTC, Rodrigo Nuno Bragança da Cunha
Details
pdf with a bug on page 89 (92) (1.42 MB, application/pdf)
2019-05-28 20:59 UTC, Georgy Litvinov
Details
odt (source of pdf with a bug on page 92) (1.11 MB, application/vnd.oasis.opendocument.text)
2019-05-28 21:00 UTC, Georgy Litvinov
Details
New file to reproduce the bug (3.02 MB, application/vnd.oasis.opendocument.text)
2021-01-07 16:07 UTC, Georgy Litvinov
Details
PDF with bug visible on 89 page (1.67 MB, application/pdf)
2021-01-07 16:09 UTC, Georgy Litvinov
Details
file for debugging (1.16 MB, application/vnd.oasis.opendocument.text)
2021-04-22 17:04 UTC, Georgy Litvinov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Nuno Bragança da Cunha 2014-02-07 20:08:20 UTC
In some pages some footnotes get skipped when printing, including PDF exporting.

For example, in the following document at page 39 and 40 footnote 104 gets discarded and footnote 105 gets the separator over it.

You can get the PDF here:

http://rnbc.dyndns.org/pub/Negociantes,_Mercadores_e_Traficantes_-_160x230v2.pdf

I can send the ODF by email if needed.

If I change widow/orphan control in footnotes, or any other style that changes pagination the problem gets sorted out in some pages, but appears in others (more or less randomly).

This occurs both in Linux and Windows with the latest version of LibreOffice (4.2, but also 4.1 and 4.0), albeit not in the same pages, because the pagination is slightly different between those 2 OSes.
Comment 1 Rodrigo Nuno Bragança da Cunha 2014-02-07 20:36:01 UTC
I used these fonts:

http://numbertext.org/linux/

The ODT file is online at the same address.
Comment 2 Rodrigo Nuno Bragança da Cunha 2014-02-08 00:01:48 UTC
I mean the ODT is at the same address as the PDF...
Comment 3 Jacques Guilleron 2014-02-10 23:09:36 UTC
Created attachment 93812 [details]
page 39 footnotes
Comment 4 Jacques Guilleron 2014-02-10 23:11:33 UTC
Hello Rodrigo Nuno Bragança da Cunha,

At this step, there's another way, perhaps, than using widow and orphan to get the correct behavior. This is to slightly reduce the space between caracters, as I show it for page 39 in attachment:
To see where to win some space, left align the paragraph.
Select "agora da Casa de Negocio desta Cidade, que existia debaixo da firma de Trumpy e Companhia, ", including coma and space behind Companhia,
right click and in context menu select Character, next > Position tab > Spacing > Choose Condensed and 0.2 pt.
Justify again your paragraph.
Footnote 102 is reduced the same way. 

Pagination is kept and this can save a big amount of work.
Does this help?

Kind regards,

Jacques
Comment 5 Rodrigo Nuno Bragança da Cunha 2014-02-11 00:43:33 UTC
Yes, thanks!

Actually I had already solved the issue by playing a bit with margins, footnote separator, widow/orphan... Pagination changes a bit, et voilà! Problem goes away... sometimes, for some combinations! Change them a bit and it reappears, in another page, sometimes in 2 or 3 pages.

Worst: if the problem is solved in Windows, for example, and I open the document in Linux, a new tweaking is needed because the pages change a bit (the font rendering changes a bit).

I understood this happened in difficult situations, when the footnotes and the text clash with each other at the end of pages. In normal documents it's probably never an issue. But this one has many footnotes, and the page size is relatively small. It's difficult to format correctly, I know.

But isn't this a bug? I mean: the document is correctly formatted on screen, so the algorithms are already there, operating well. Perhaps it's a good test case for improving LibreOffice :)

PS: Disabling widow and orphan control alone in footnotes doesn't solve the issue.
Comment 6 Rodrigo Nuno Bragança da Cunha 2014-02-11 01:17:05 UTC
Please check...

http://rnbc.dyndns.org/pub/Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.pdf

...where the problem is apparent at page 39 and 40.

I just changed the footnote separator margin a bit (0.05cm below and 0.10cm above).

As usual the ODT is at the same place.
Comment 7 Rodrigo Nuno Bragança da Cunha 2014-02-11 01:56:07 UTC
PS: Sorry, in my first example the problem was invisible by my mistake. Now in this latest example it's clearly visible.

By formatting the document in slightly different ways I've seen problems in pages 40, 47, 75, 82. It depends on luck...
Comment 8 Rodrigo Nuno Bragança da Cunha 2014-04-07 18:47:05 UTC
Just to change the file URL, which is now:

http://rnbc.dynip.sapo.pt/pub/Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.pdf
Comment 9 Yousuf Philips (jay) (retired) 2014-07-10 02:37:47 UTC
Dear Rodrigo,

Can you please upload the original odt file as i'm unable to access it.
Comment 10 Jacques Guilleron 2014-07-10 10:45:21 UTC
Hi Jay,

Just change pdf estension by odt. This is enough I think.

Kind regards,

Jacques
Comment 11 Yousuf Philips (jay) (retired) 2014-07-10 16:50:42 UTC
Hello Rodrigo,

I can confirm its there on Linux Mint with 3.3.0, 3.6.7, 4.2.5 and master. It seems as if the repagination isnt doing a complete job, as when you go into print preview mode it repaginates all the pages, but still after going to a page that has the problem, it shows the error and then corrects its self a few seconds later.
Comment 12 Rodrigo Nuno Bragança da Cunha 2014-07-10 17:59:06 UTC
Jay Philips, I agree with your assessment. That's what I thought too... and that's what I saw.

There seems to be a two-pass algorithm doing the pagination job in preview mode and in print mode only the first pass runs, leaving footnotes badly formated, lost, etc...

PS: I have no knowledge of the internals of LibreOffice, so my opinion has little weight.
Comment 13 publik 2015-03-02 20:55:43 UTC
I agree that this is an error and hope that it will be fixed some time. It cost me quite a lot of time and nerves to get a 450 pages document with around 2400 footnotes into a correct PDF. 

The problem seems to be related to Postscript output - it appears in exported PDFs as well as in Postscript files generated via "print to file".

The workaround using letter spacing worked in some cases, but also often produced ugly text. My preferred workaroung was to add empty lines where LO added empty space between text and footnote separator line. This seems to give LO less freedom to shift footnotes around and thus avoids the "jumping" separator line.

Actually, I have seen to different forms of what seems to be the same problem:
a) footnote separator line remains where it should be, but the page below this line is empty
b) footnote separator line "jumps" down a bit (or footnotes jump up?) so that the line runs through the footnote
Comment 14 publik 2015-03-03 07:58:10 UTC
I forgot to mention that I tested this yesterday and observed the same behaviour in 3.5.2 and 4.4.1.2.
Comment 15 tommy27 2016-04-16 07:23:19 UTC Comment hidden (obsolete)
Comment 16 publik 2016-04-16 14:38:38 UTC
Created attachment 124402 [details]
Example created with 5.0.5.2 on Windows 10
Comment 17 publik 2016-04-16 14:39:43 UTC
The bug is still present in 5.0.5.2 on Windows 10. I _think_ the behaviour is identical to what I saw in March 2015. An example is attached: Footnote 285 is incomplete and 286-290 are not shown at all.
Comment 18 Rodrigo Nuno Bragança da Cunha 2016-04-16 18:22:37 UTC
I confirm this bug is present in the latest incarnation of LibreOffice. Just tested 5.1.2.2 and still have missing and badly formatted footnotes, as before.
Comment 19 viric 2017-06-16 18:12:48 UTC
I can reproduce the render of separator over the footnotes text in libreoffice 5.2.5.1, exporting to PDF.

In my case I think it is bound to the widow and orphan lines (I set it to 3 each) and mix of paragraph styles in every page; in a 200 page document with footnotes in each page, maybe 5% of the pages have the separator painted over the text.
Comment 20 Justin L 2017-11-02 12:02:05 UTC
Cannot download the test documents anymore. Please attach.
Comment 21 publik 2017-11-02 13:36:32 UTC
Above comment appears to apply to Rodrigos documents. Mine is already attached.
Comment 22 Rodrigo Nuno Bragança da Cunha 2017-11-02 15:54:45 UTC
The URL is no longer rnbc.dyndns.org, as you can see in the following comments.

Anyway, here goes again:

http://rnbc.dynip.sapo.pt/pub/Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.pdf
http://rnbc.dynip.sapo.pt/pub/Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.odt

Eventually, in a few years, I'll have to change it again. Hopefully the bug will be solved by then :)
Comment 23 Yousuf Philips (jay) (retired) 2017-11-03 09:15:30 UTC
Created attachment 137495 [details]
Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.odt
Comment 24 Yousuf Philips (jay) (retired) 2017-11-03 09:15:52 UTC
Created attachment 137496 [details]
Negociantes,_Mercadores_e_Traficantes_-_160x230v2problem_in_footnotes.pdf
Comment 25 Yousuf Philips (jay) (retired) 2017-11-03 09:21:33 UTC
(In reply to Justin L from comment #20)
> Cannot download the test documents anymore. Please attach.

Attached the files to bugzilla. Note: this is an ODT issue and not a DOCX.
Comment 26 viric 2017-11-04 21:52:28 UTC
I said in June that I could reproduce the issue with 5.2.5.1.

Today I tried with 5.3.1.2 and I cannot reproduce it anymore. Neither with my document or the attachment 137495 [details].
Comment 27 Rodrigo Nuno Bragança da Cunha 2017-11-05 03:21:26 UTC
Created attachment 137530 [details]
Bug in footnotes, pages 46 and 47

This exemplifies the bug in pages 46 and 47.
Comment 28 Rodrigo Nuno Bragança da Cunha 2017-11-05 03:22:26 UTC
Created attachment 137531 [details]
Bug in footnotes, pages 46 and 47

This exemplifies the bug in pages 46 and 47.
Comment 29 Rodrigo Nuno Bragança da Cunha 2017-11-05 03:24:37 UTC
The bug still occurs.

Version: 5.3.7.2 (x64)
Build ID: 6b8ed514a9f8b44d37a1b96673cbbdd077e24059
CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: pt-PT (pt_PT); Calc: group

Check the documents I just attached, pages 46-47:

"Negociantes, Mercadores e Traficantes - 160x230v5-1.odt"
"Negociantes, Mercadores e Traficantes - 160x230v5-1.pdf"
Comment 30 viric 2017-11-27 21:11:44 UTC
Right, I confirm that the bug still occurs in the 5.3.1.2 I have at hand.

To add some information, in my document of ~200 pages (private document), it happens twice. In one case, one footnote is missing (footnote number 62), and the separator is over the footnote 63. In another case, only the separator is moved over the footnote text (over footnote 202).

If I generate a PDF of only the page of footnote 62, both the separator and the footnote appear correctly. They appear broken generating the full document PDF.

I have a libreoffice built in debug to evalute it and I'm capable of C++; if anyone has some clue of where to look, where to breakpoint and watch, let me know.

In the past I saw this happen with Type 1 fonts, but this happens to me with OTF fonts now as well.
Comment 31 Commit Notification 2017-12-03 23:42:47 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a172f854b6e1d61bf0fe0fe4efc3058bb7a760bf

tdf#74693: Footnotes text appearing above footnote separator line

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Tamás Zolnai 2017-12-04 11:41:11 UTC
My commit fixes the issue in the document attached here:
https://bugs.documentfoundation.org/show_bug.cgi?id=74693#c28
but I still see the issue in the other version of the document:
https://bugs.documentfoundation.org/show_bug.cgi?id=74693#c22
Comment 33 vgoebbel 2018-05-18 13:24:52 UTC
I'd just like to add that this problem still persists in the most recent daily I checked on OS X. I am on the verge of publishing a 390-page dissertation and now this has started to happen since I applied the final formatting guidelines that I need to follow…

If that helps: I think the problem is the positioning of the footnote text. It gets positioned too high, therefore footnotes are cut off and footnote text appears in front of/above the separator line.
Comment 34 QA Administrators 2019-05-19 02:50:50 UTC Comment hidden (obsolete)
Comment 35 Rodrigo Nuno Bragança da Cunha 2019-05-19 17:00:51 UTC
I have tested with:

Version: 6.1.5.2 (x64)
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: pt-PT (pt_PT); Calc: group threaded

Seems to work fine now. I have tested with a few documents that previously had problems.

Thanks!
Comment 36 Georgy Litvinov 2019-05-28 20:59:00 UTC
Created attachment 151747 [details]
pdf with a bug on page 89 (92)
Comment 37 Georgy Litvinov 2019-05-28 21:00:34 UTC
Created attachment 151748 [details]
odt (source of pdf with a bug on page 92)
Comment 38 Georgy Litvinov 2019-05-28 21:02:06 UTC
Still appears on 
Version: 6.1.6.3
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 8; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: ru-RU (en_GB.utf8); Calc: group threaded
Attachments:
pdf with a bug on page 89 (92)
odt (source of pdf with a bug on page 92)
Comment 39 Xisco Faulí 2019-05-30 11:05:00 UTC
(In reply to Georgy from comment #38)
> Still appears on 
> Version: 6.1.6.3
> Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
> CPU threads: 8; OS: Linux 4.4; UI render: default; VCL: gtk2; 
> Locale: ru-RU (en_GB.utf8); Calc: group threaded
> Attachments:
> pdf with a bug on page 89 (92)
> odt (source of pdf with a bug on page 92)

I can't reproduce it in

Version: 6.3.0.0.alpha1+
Build ID: aa687b22991e6c674b1d8653d52fbe9a50080174
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

is it only exporting to PDF or also displayed it ?
Comment 40 Georgy Litvinov 2019-07-15 13:31:21 UTC
(In reply to Xisco Faulí from comment #39)
> (In reply to Georgy from comment #38)
> > Still appears on 
> > Version: 6.1.6.3
> > Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
> > CPU threads: 8; OS: Linux 4.4; UI render: default; VCL: gtk2; 
> > Locale: ru-RU (en_GB.utf8); Calc: group threaded
> > Attachments:
> > pdf with a bug on page 89 (92)
> > odt (source of pdf with a bug on page 92)
> 
> I can't reproduce it in
It's not repoducing in 6.3.0 for me too.
> 
> Version: 6.3.0.0.alpha1+
> Build ID: aa687b22991e6c674b1d8653d52fbe9a50080174
> CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
> Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
> Calc: threaded
> 
> is it only exporting to PDF or also displayed it ?
That one was only visible in PDF.
I had another example that was reproducible in 6.3.0 and visible in Writer too. I fixed it by turning on automatic hyphenation in default paragraph style. I will try to find it and attach here.
Comment 41 Georgy Litvinov 2021-01-07 16:07:11 UTC
Created attachment 168752 [details]
New file to reproduce the bug

Bug appears on page 89. Footnote line strikethrough footnote 28 after export to PDF.
Comment 42 Georgy Litvinov 2021-01-07 16:09:56 UTC
Created attachment 168753 [details]
PDF with bug visible on 89 page
Comment 43 Georgy Litvinov 2021-04-22 17:04:26 UTC
Created attachment 171359 [details]
file for debugging

This file has lorem ipsum text (88 pages) and 2 last pages represent the bug.
It was made from previous attachment.
Bug only reproduce if before 2 pages with bug there is a lot of text, does not matter what text it is.
Comment 44 QA Administrators 2023-04-23 03:26:15 UTC Comment hidden (obsolete)
Comment 45 Rodrigo Nuno Bragança da Cunha 2023-04-24 03:24:15 UTC
As I has said previously on 2019-05-19 17:00:51 UTC this problem no longer affects me. Seems to be solved, as far as I'm concerned.