Strange behavior by (not-)breaking footnotes

I’m a new user on this site, so please forgive me for any mistakes.

I’m formatting a text in LibreOffice Writer and have a problem with footnotes breaking. I’m using LibreOffice 7.5.3.2 on Mac OS 10.15.7, with Italian language interface.

The text is an Italian translation of an English work, with parallel original text. The translation is heavily annotated, with many footnotes; many footnotes are lengthy.

When lengthy notes occur, I’d just want them to break where needed and move the remaining part to the next page(s). Sometimes they do, they break normally and work as I expect and wish; other times they don’t, they behave strangely, and I don’t understand why.

Let us consider the first instance of the problem, that occurs with the second footnote, which I’ve colored in red for clarity. Here you see two pages together, left and right. For some reason this note does not break (I want it to break) and moves as a whole piece to the next page, dragging its anchor with it:

Now look at what happens if I break the paragraph just before the anchor:

The note breaks. As it should… but why is it not breaking otherwise?

The note breaks if I break the paragraph in any place before this note, even if I break it before the first note:

I don’t understand why.

I have already disabled the check for “orphan” or “widow” lines and the “don’t break” option in the footnotes style, so it seems the problem lies elsewhere.

I just started formatting only a small fraction of the text, but strange behaviors like this are already happening several times. I cannot adjust it manually in some just “apparent” way—it will turn into an impossible nightmare when any small addition or change to the text is needed.

Why does this happen and how can I solve it properly? Maybe it’s something easy (I hope!) but I don’t know where to look.

I’m posting a small section of the file so you can see this first problematic note (pages 4–5):

For LibreOffice problematic footnotes.odt (20.6 KB)

Thank a lot to anybody who will help me :pray:

Your problem may be caused by an incorrect use of Writer. You seem to be stuck to mechanical typewriter era where any formatting is done by hand. This is shown by the fact all your text is Default Paragraph Style with manually-applied variations. Vertical spacing is done with empty paragraphs. Text in table is also styled by default (Table Contents) with direct formatting. The same goes for footnotes. Your headers don’t even use the facilities in factory configuration of Header and xyz Header (xyz = Left or Right). You overloaded them.

In addition your document has a bad structure. You want parallel text with annotations. You entered English text in left column of a table and Italian translation in right column. Due to different intrinsic redundancy in both languages, text has not the same character count. This is aggravated by the fact you chose a smaller font size for English (which is the shorter of both text). You absolutely need to “synchronise” the versions so that your readers can compare original text and translation. This is usually done on a paragraph per paragraph basis because a paragraph introduces a “natural” break.

Your table has a single row. In other words, Complete English text is contained in a monster-sized left cell and Italian translation in a monster-sized right cell. Writer table cells are like sub-documents. This full sub-document is needed before text flow and formatting is handled. By having full text in a single cell, you put considerable stress on Writer which must load a row in its entirety in memory (this is perceptible by the degradation of performance in scrolling).

Once text is available, page breaks are computed but they must be “compatible” in both columns because you created a dependency with the table (the row must be split at the same “geometric” location in both columns). Also, your notes are large. This complicates page management when you have to deal simultaneously with a table (row" quantisation") and free-flowing text (notes) allocated from bottom-up (until it conflicts with the table). Ordinarily, a note is kept in the same page as its anchor in text. This criterion may cause flushing the anchor to next page if other minimal constraints can’t be met with the note, such as widow/orphan settings.

In For LibreOffice problematic footnotes-ajl.odt (20.0 KB), I tried to split your parallel texts in multiple rows. It partially solves the scrolling lag, but not the note issue.

Considering the size of your notes (annotating text seems to be your primary purpose), I modified the note area allocation in the Prefazione page style Footnotes tab from automatic (Not larger than page area which has sometimes rather faulty behaviour, just like in your case) to Maximum footnote height of 10cm. This improves the situation.

However, the document is still bad responsive.

You should study its structure to find the best way to translate your purpose.

A lot can be done by using styles instead of direct formatting (DF). That such a short document has such a low responsiveness is a clear indication of bad DF impact. Paragraph styles confer “personality” to your paragraphs and character styles should be used for variations inside paragraph (e.g. Emphasis instead of italic, and Strong Emphasis instead of bold.

Regarding layout, I suggest you leave more spacing between main text and notes. I don’t think an horizontal separator is good because of your 2-column main text. Or else, width of the separator either must match the width of the first column or extend from margin to margin.

When using “semantic styling” (where style name describes the significance of paragraph, word, …), you don’t need to care for layout while typing. Formatting tuning can be done later where you play with style parameters without ever modifying your text because “semantic styling” promotes separation of contents from look. Avoid DF. Though most people consider (erroneously) DF as “intuitive”, this is not the case and DF is a speedway to formatting hell.

Your problem may be caused by an incorrect use of Writer. You seem to be stuck to mechanical typewriter era where any formatting is done by hand. […] You overloaded them.

In addition your document has a bad structure. You want parallel text with annotations. […] This is usually done on a paragraph per paragraph basis because a paragraph introduces a “natural” break.

Well, this is just the “prefactory note”, a short introduction in prose, and I just started the formatting, but the problem with the footnotes seemed more urgent than anything, making it seem pointless to me to work on other details if I can’t have the notes working even for such a short fraction of the text.

The rest of the text, which I began formatting before opening this thread, is poetry (the text is a long epic) and I formatted it as you say, in single rows for every stanza (which are usually 4–6 lines, so not particularly long), but, as you say, the problem occurs just the same. This is why I didn’t think it was related to cell length and didn’t mention it.

Your table has a single row. In other words, Complete English text is contained in a monster-sized left cell and Italian translation in a monster-sized right cell. […] By having full text in a single cell, you put considerable stress on Writer which must load a row in its entirety in memory (this is perceptible by the degradation of performance in scrolling).

Is it really so…? I am perplexed, because it does not seem overloaded to me. It’s a table with two cells (not a “monster” one in my eyes, it’s 3 and a half A5 pages long, if you remove the notes, not 300 and not even 30 pages…) with a header and 13 footnotes, and some italic and bold text, in a modern typesetting program in a modern computer. It seems strange to me that the program is overloaded.

I started formatting this text in LibreOffice but had it for a long time in Microsoft Word (16.66.1), formatted in an analogous way, and all notes there break normally where they are expected to (with no interventions needed on settings or anything). This even if the Word document contains the complete text I’m working on, and is therefore a lot longer: 122 A4 pages, with many sections, many headers, many such tables, hundreds and hundreds of rows and hundreds and hundreds of long footnotes. A slight lagging in scrolling there on my computer is noticeable only if I scroll very very fast, which is almost never needed.

Once text is available, page breaks are computed but they must be “compatible” […] This criterion may cause flushing the anchor to next page if other minimal constraints can’t be met with the note, such as widow/orphan settings.

As far as I can see (which is not much, admittedly), I’ve removed all widow/orphan settings, but the problem occurs anyway, so the cause of the problem is not that.

A lot can be done by using styles instead of direct formatting (DF). That such a short document has such a low responsiveness is a clear indication of bad DF impact. Paragraph styles confer “personality” to your paragraphs and character styles should be used for variations inside paragraph (e.g. Emphasis instead of italic, and Strong Emphasis instead of bold. […]

When using “semantic styling” (where style name describes the significance of paragraph, word, …), you don’t need to care for layout while typing. Formatting tuning can be done later where you play with style parameters without ever modifying your text because “semantic styling” promotes separation of contents from look. Avoid DF. Though most people consider (erroneously) DF as “intuitive”, this is not the case and DF is a speedway to formatting hell.

I know styles and use them a lot for texts like glossaries/dictionaries, where they are very useful, as you say. As I sometimes have problems with them, I tend not to use them where I can more easily (and more fast) just define the properties of the text visually with keyboard shortcuts: it seems overcomplicated to use style just for every simple bold and simple italic instance… Is it really possible that just using some directly-formatted bold and italic creates such a problem in a file in LibreOffice? This surprises me, I’ve never had any noticeable problems in LibreOffice with bold and italic. I’m not a professional user, so sorry if this question sounds stupid.

Considering the size of your notes (annotating text seems to be your primary purpose), I modified the note area allocation in the Prefazione page style Footnotes tab from automatic (Not larger than page area which has sometimes rather faulty behaviour, just like in your case) to Maximum footnote height of 10cm. This improves the situation. However, the document is still bad responsive.

Thank you, I hadn’t tried that, and it may help us understand where the problem lies. I see that the note breaks if I set the Maximum footnote height to 9,5 cm or less: it stops breaking at 10 cm or more, so when the maximum height makes the note “touch” the anchor. This is some more information… but, again, why does this happen (and how can it be solved)?

Regarding layout, I suggest you leave more spacing between main text and notes. I don’t think an horizontal separator is good because of your 2-column main text. Or else, width of the separator either must match the width of the first column or extend from margin to margin.

OK. How do I remove that? I had set the style of the separator to “None” (in the “Footones” tab in page style) and thought that meant it “disappeared”. While, if I get what you are saying, that just made it invisible. How can I remove it properly?

Does it mean you created one table per poem, which each stanza in its own cell (row)? Beware, Writer is intended to manage efficiently a text flow. Tables and images are “accidents” which take possession of some space for their own use, removing it from what is available for the text flow (and thus requiring elaborate wrap-around algorithms to resolve text/table conflict).

If there is no mandatory need, avoid tables. Apart from parallel columns, you have all the needed settings in paragraph styles.

In my mind, your cells are “monsters” because their contents spans several pages. This happens in both columns simultaneously. In addition, notes are laid out in the text flow area, while the versions are inside the table. You solicit two “realms”. Since your table cell spans several pages, Writer has a hard work to find where to split cell to account for footnote. You have two columns, each with different requests for splitting. I suppose that the process is iterative to try to accommodate both columns (one split decision has an impact on the other column which needs to be reflown, implying new adjustments on the first one). At some step, Writer stops the iteration to avoid an infinite loop. This may be the cause of suboptimal decisions.

This is the first time I meet a document with large footnotes anchored in a multi-page cell. I have documents with complex layout, many tables and illustrations, but my notes never originate from tables (or rather exceptionally; anyway my notes are very short). My guess is bad behaviour results from a number of facors, among which I rank high multi-page table cells, long notes coming from tables competing with table for their estate and , last but not least, direct formatting.

Which kind of problems? Designing a good minimal set of styles requires quite a lot of foresight. But once you’ve crafted them, you can reuse them across your documents.

It is a common erroneous belief to think that direct formatting (DF) is more “intuitive” than styles. In addition, DF makes you consider your text for its visual appearance instead of its significance. Typographical attributes are rather limited. E.g. italics can be used for diametrically opposite meaning such as emphasis or indication of foreign words. What happens when you want to changed emphasis from italics to red? You can search for italics but you can’t replace all of them with red because you also hits foreign words. By using different styles such as Emphasis and Foreign, you only need to modify one style and all occurrences are simultaneously modified without scanning your text.

Using styles can be as fast as traditional keyboard shortcuts: with Tools>Customize, you can assign your styles to preferred keys or even replace factory shortcuts (e.g. I replaced Ctrl+I to cause *Emphasis application; since style application is not toggling, I created Alt+0 (zero) to revert to no character style – parallele to Ctrl+0 to revert to Body Text).

Yes. Each DF is independent from any other. Consequently Writer will record the exact formatting every time, inflating the document. With styles, you have only a single definition and a very short annotation at every usage. This common factors the style and allows to precompute and cache the effects.

This is not noticeable on short documents but begins to slow down Writer at 100-150 pages threshold.

Yes. None separator style removes it. But the other distance parameters remain active (spacing to text and to note).

Just to experiment, I removed the table and used two styles for the English and Italian versions. I am not at the same computer as this morning. My desktop is more powerful. Consequently, I can’t tell avoiding the table has solved the latency issue. It did solve the note location problem.

I also experimented with a full width separator and more spacing between notes. Now when a note continues on next page, you can clearly make the distinction between text and note.

However, I am not satisfied with the layout between English and Italian. I’ll let you find something satisfactory.

*While removing the table, I discovered you mixed things in the table. By default, tables have a o.1 cm padding between cell limits and text. This is set in the Borders tab of table properties. You compensated this padding by configuring your paragraph(s) left indent to -0.1 cm. This is apparently OK in table (I write “apparently” because it is a “logical” flaw). It became visible when the paragraph ended up in the main text flow where they bled inside the margin. Except for very special effect, an indent should never be negative.

Here is the experimental document
For LibreOffice problematic footnotes-NoTbl.odt (19.7 KB)

Yes, exactly. See for example the first (WIP) page of the poetic text, without and with table borders for clarity:

Is it not the same thing you suggested me to do in your first comment? Here:

————

I had no idea tables in LibreOffice where in some way “dangerous” and should be avoided, but then maybe it’s my “normie” upbringing in Microsoft Word that creates expectations that can’t be met with other programs.

Sorry, I don’t understand exactly what you mean here. Do you mean I can have parallel text somehow without using a table? I will gladly use any other solution, as long as I can get the desired effect.

I would prefer to solve this in LibreOffice: evidently going back to Word would solve this problem of the notes, but Word does not let me use the typographical refinements I switched to LibreOffice for, and which I really desire to use… :slightly_frowning_face:

How would you typeset a parallel text with footnotes then? (I want just this in the end; again, it does not seem complicated to me… have you ever seen a polyglot bible? :sweat_smile:) I don’t have much experience and work in a “straightforward” fashion, so a table seemed the “obvious and effective” solution to me.

OK, so I did the experiment and in the test file removed all the direct formatting I could find: in the main body, table, notes, header, footer. Note 2 now breaks fine… but now it’s note 4 that does not break. :melting_face:

I attach the file with no direct formatting:

Problematic footnotes - no direct formatting.odt (18.0 KB)

So, while direct formatting “may have bad effects”, and from now on I’ll try to use it as little as possible, I think we can exclude it from the main culprits for notes not breaking.

Without going into detail, because it’s other topics not related to this, those problems are probably only due to my ineptness: styles inadvertently overextending beyond where I want them to be confined and showing only when I update them, forcing me to long manual corrections; styles overlapping with direct formatting with chaotic consequences when I update; styles not updating in every occurrence; etc. etc. In short, while styles are useful and I use them, in practice I still have to check them tightly and often intervene manually. (But I’m not saying they’re faulty in their design: it’s my fault most probably).

In a logical-theoretical sense, you’re obviously right, I agree and get your point 100%. But in practice, for example to mark foreign words, in 99% of cases I have always used simple italic and never had any need or desire to change that, so before now I had never even though about using a dedicated style: as I’ve never thought about, say, using a dedicated style for capital letters at the beginning of sentences, instead of just typing the capital letter directly from the keyboard. The same for emphasis, etc.

Yes, as you say, unfortunately that looks nothing like what I’m trying to achieve…

Thank you, I will do as you say for the next table. :slightly_smiling_face:

So, it seems we still have no idea why this originates exactly and how to solve it—we can only say the reason it’s not (only) direct formatting.

Unfortunately, no. Parallel text is one of the mandatory uses of table.

However, you can mitigate the stress by limiting the amount of text in rows: don’t put more than a paragraph worth of data in a cell.

Your original document is a bit pathological because some paragraphs span 3 pages. I think this is the problem though it should not. I kind of remember having helped a user on parallel text spanning page boundary without probleem.

I’d handle it with a table. In the case of Bible, I’d limit cells to verse level at first attempt so that rows are small. If this looks too weird (because verse numbers do not mark sentence boundary), I’d then try for some alternate approach relative to cell extent.

I modified Default Page Style Footnote properties to change Footnote Area from auto to manual. Even entering “silly” values like 20cm (which will be truncated to a reasonable height compatible with sheet format) does the trick. Such large values are similar to “auto” but seem to work better. When I have time I’ll file a bug report.

Don’t over-react on my statement. A key to success with Writer is not to be dogmatic. DF must be avoided as much as possible but DF is perfectly legitimate for “formatting accidents”, i.e. something occurring only once (or a few times) in a document. Having single-shot styles results in style multiplication and your style collection becomes unmanageable. Capitalising the first letter in a sentence is such second-nature that it is more reliable to type it than applying a style. Styling would be “toxic” here. How many times do you permute initial word with another one? Isn’t the capital letter a grammar rule? It is not liable to vary within a document. If you want to automate it (in case you don’t uppercase it manually), you have an AutoCorrect options to do it: it changes saved text to force the initial.

Regarding styles, my rule of thumb is ~20 paragraph styles (you already have 10 Heading n; the others are Body Text and specialised children, Header/Footer, Footnote, Title and a few others), ~15 character styles (including built-in Emphasis and Strong Emphasis, Footnote Anchor and Footnote Characters), 3-4 page styles (for cover, TOC, …) and at most 3 per chapter (in best cases you use the same 3 or 1 for all chapters thanks to fields in header and footer), 1 or 2 list styles. Frame styles are more difficult: you have to thoroughly abstract the properties of your images to imagine a common style. Moreover, frame styles are extremely difficult to master when it comes to automatic positioning and they are very very sensitive to DF which will ruin everything in a manner more detrimental than with other style categories.

OK. But for stanzas I am forced to do that, as each line is itself a “paragraph”. Or can I have different lines in the same paragraph?

Sorry, I’m a bit slow: by “does the trick” do you mean you solved the issue, the notes break fine? I tried doing the same (I guess by “Footnote Are” you mean the maximum note height) but nothing seems to change on my side. Can you attach here the test document and/or a screenshot?

Thanks a lot! I hope it helps.

I may have been not very clear with my expression; I did not want to say styles are unreasonable (they definitely aren’t!), I just wanted to give an example of why usage of styles for things you never thought you should change (as capital letters, or, for me, italic for foreign words) is not intuitive in the sense that it’s not something you spontaneously think of and do—but that does not mean we can’t learn. “Intuitive” does not necessarily mean “best”. :slightly_smiling_face:

Sorry, I forgot to attach the modified file. This is it: Problematic footnotes - no direct formatting.odt (22.6 KB)
But now, we no longer have parallel text. Perhaps because the “last paragraph” is too long and column width too different. It looks like the English version has not the same paragraph breaks as the Italian one.

EDIT
No, same breaks are present. However this illustrates the necessity to split text in paragraphs contained in rows (one row = one English paragraph and the Corresponding Italian one). This spreads white space all over the document but you keep languages in sync.

EDIT 2:
I went back to my slower computer and split text into several rows. I manually adjusted footnote configuration in the page style. Now, your document without DF, multi-row table is responsive, even though some cells are split at page boundary (but cell contents is relatively “modest” thus avoiding stress on Writer).

To balance parallel text, I changed column widths. This is only a proof of concept. You can improve by applying different paragraph styles on English and Italian versions as you did in the initial document (by do it with a paragraph style, not DF; you’ll gain versatility). If font sizes are different, change column width to balance text extent on both sides. I also changed dissymmetrically padding distance to borders to better use sheet space.

For fun, I reconfigured Footnote style for hanging indent to visually better separate notes. I didn’t remove the tab you entered between note number and annotation. In hanging indent context, Writer implicitly adds a tab to align on left indent. Therefore in my new version of the document, you have double tabs causing misalignment.

If you have multiple paragraphs in long notes, explicitly press Tab at start of note to skip the “numbering zone”. Note that using several paragraph improves readability of long notes.

ParallelText.odt (22.2 KB)

OK, so what’s happening now on my side is a new strangeness…

When I open that file, now none of the notes are breaking:

But then if I change the view mode to fullscreen (as I did to capture a screenshot), this magically makes notes to break! (Notice that it didn’t before: all the pics I posted in my other replies and in the opening post, with notes not breaking, were screenshots from fullscreen view).

What’s this new sorcery?..

Unfortunately if I close the document and reopen it, again it’s not working, no notes are breaking (and it re-works and they break if I switch to fullscreen again). :man_facepalming:

Does it happen with the"multi-row table" document I just sent? I think there is something buggy in note management when they originate from a table. The full row contents, not taking into account page breaks in cells, must be loaded in memory. I fear developers never anticipated this (pathological?) case. It is likely that the algorithm gives up after a few iterations to avoid infinite loop. Since processing stops a bit randomly, expect glitches like this one.

Your document is becoming really interesting to explore Writer behaviour.

Almost, not exactly the same same thing. In this last one, some notes break, but still the spacing is all wrong:

But again everything goes magically to place if I switch to fullscreen:

If I close and reopen the file, the bad spacing is there again.

Well, I can’t see it as pathological, if as you said there is no other way to have parallel text and footnotes together; and parallel text for translations and footnotes are both normal “harmless” things in my eyes…

I don’t know if I’m really happy to be such a pioneer. :sweat_smile: