Right margin not being respected with right tab stop after addition of certain text

I am working with Libreoffice 24.8.2.1 on a Windows 11 machine.

I have a style (called key style) which has one right tab stop at 6.93" with … as fill. All works as appropriate. I am using the zotero plugin and when I add an intext citation which contain certain characters, the right tab stop appears to change and the right margin is not respected. If I undo, the text that I added goes away but the right tab stop does not go back to the way it was. In the past I was having a similar problem when I simply added certain characters but I can’t reproduce that problem. I know this is confusing to understand, but please ask questions. I am trying to explain the situation as best I can.

I am attaching the document (untitled 6) here showing what it looks like when things are acting correctly.
Untitled 6.odt (11.2 KB)

And the document (untitled 6 problem) after I had inserted the intext citation via the zotero plugin. This shows how things get messed up.
Untitled 6 problem.odt (12.7 KB)

There is a second tab just before the space of apple. So, in the problem file, this new tab don’t jump to the new line.
imagen
I activated to view the formatting marks, and changed the page style to horizontal, so the next default tab stop (near 193 mm) is visible.

In the Inspector I see one difference.
imagen
In the problem file, the value is 0, but I don’t know the meaning of Writing Mode here. And the paragraph text direction is set to Left-to-right (LTR).

I added that second tab for a couple of reasons. One is to show the dramatic difference between the two files. Note that even “banana” moves further right in the problem file. The other reason I added the second tab is that sometimes I use two tabs to force the end of the line to move to next line.

I will also add that if on the problem file I select all > copy > open a new blank file > paste into that document the new document looks like it had originally with the addition of the inline text that had been added. See attached. That is the only way I have been able to find to get back to a file without this issue.
Untitled 6 problem fixed.odt (11.8 KB)

I don’t understand how you get your “good” and bad result.

There is a flaw in the “good” document: there are two Tabs between “fruit red” and “apple”. Your tab stop (key style) is beyond the printable area, in the right margin. Consequently, the cursor goes as far as it can and stops at right margin. Then the second tab is handled, causing a line break (because no text can go inside the margin with the indents configuration in the style) and “apple” is then flushed as far as it can.

The double tab is faulty.

But then, layout is different in the “bad” document: since the addition is in the last paragraph, there should not be any retroaction in the first one. Here, the first tab pushes to in-margin stop and the second tab pushes text to the next “implicit” evenly spaced stop (every 1/2" apart). This tab is left-aligned.

The paragraph with “banana” is also weird because the off-margin tab is also honoured.

From .fodt analysis, Zotero added direct formatting on the citation paragraph modifying a parameter style:text-position="0% 100%" which is translated as Char Escapement and Char Escapement Height in the Style Inspector.

Thanks ajlittoz.
I hope I am not making my example more complicated by adding that extra tab. The extra tab in the good document before the word apple is intentional and does what I want. It provides for the apple to wrap to the next line and the “…” shows on the first and second line.

But even ignoring that extra tab there is still a problem in that after I added the inline citation from the zotero connector, the word “banana” shifts further right.

Why in the “bad” document is the additional tab now in the last paragraph?

I agree there is something going on regarding direct formatting coming into play. But even if in the “problem” document I select all and then clear direct formatting nothing changes.

Presently, defining a tab stop outside the area defined by paragraph indents is nonsense. If it is located at left of left indent, it can never be reached. When it is located at right of right indent, it can’t be reached either because text wrap occurs at right indent. I can’t explain the behaviour in the “problem” document. The fact that copy-pasting in a blank document fixes (part of) the behaviour shows that something is wrong in the document. What? I have no idea.

What do you mean by paragraph indents? I have just one tab stop this defined at 6.93", which should be right at the end of the paragraph.

Page styles define margins which describe the rectangular area inside which everything is laid out (main text, header, footer). Except under very specific circumstances, margins are no-print area (contrary to Word).

Paragraph styles can define additional “white” space at left and right which add up to margins, thus reducing locally the width of the print area. But indent space is not a no-print area, which allows for hanging alinea for example.

In your case, your document is Letter with 2cm margins, leaving 17.59 cm print width. Your tab stop is effectively defined at 17.6 cm (which is the same as the print width), but you probably moved the stop in the ruler with the mouse. The stop is now at 18.11 cm, which is inside the right margin.

Beware of direct formatting! It looks innocent but always plays nasty tricks on your back when you expect the least.

I didn’t move the stop with in the ruler with the mouse. At least I didn’t mean to if I did. It seems that in my situation for some reason the text is going beyond the page styles margins.

There still seems to be a bug but I think I am starting to see some of what is going on.

I had the tab stop within the style set to the far right end of the margin or even beyond the right margin on purpose. Because, what would happen is that the text that came after the tab would not get pushed further to the right then the right margin and would become right justified right at the right margin. See how this happens to the text apple and banana in the good document. This is what I was looking to make happen.

But something happens when I add certain inline citations from the Zotero connector. And then text starts extending to the right of the right margin. And even an undo doesn’t fix the situation. This used to not happen. It started happening a few months ago with a new release of Libreoffice.

Is there some other way I can accomplish what I want (i.e. have the text be both left justified at the beginning of the paragraph and right justified at the end, with “…” between the two? It gets even trickier for my larger document which has numerous other styles that are indented from the left.

See attached for what I am trying to do. And as I mentioned it all works perfectly until I add something that makes it do weird things.
Untitled 11.odt (13.5 KB)

OK. Thanks ajlittoz! Your tips helped me figure this out. As I keep mentioning there is a bug but I can deal with the situation without invoking the bug.

So the trick was to make sure my tab stops were within the print area and to use right tab stops. The tab stops don’t take into account if there is a left indentation built into a style so I needed to minus from the tab stop the amount of the left indentation. It would be nice if there could be an option to have the tab numbers be in relationship to the left edge of the print area. This would have helped me since I have numerous styles each one a little further indented from the next. Therefore, I can’t have these styles fully inherit the tab stop of the prior one due to differing left indentation. Confusing to try to explain verbally.

Writer uses a box model for its “objects”. Paragraphs are made of a “text rectangle” inside which text is composed (except for the first line which can be indented inside or hanging outside the rectangle). This text rectangle is surrounded by padding space. Then you have a border. Finally outside all this, there are indents (horizontal) and spacing (vertical) space (two words for the same concept).

Tab stops are related exclusively with text alignment. Consequently, they are defined for usage inside the innermost rectangle and their origin is the left (for LTR languages) edge of this rectangle. This also allows to “move” the rectangle by playing with its indents without having to modify tabs and keep the layout unchanged (within some limits because available width is not the same).

IMHO, we are too much prisoners of the typewriter model with its strict left-to-right mechanical motion. I’d like to be able to also define my tab stops relative to right edge or in percentage of the available width of the text rectangle. This would increase the generality of paragraph styles, notably when you want a tab stop at right side, no matter the current “geometry” of the paragraph or page.

1 Like

I agree. That would have been helpful in my situation. Thanks too for all these details they help me understand the situation.

Still, like I mentioned there is a bug that seems to have gotten introduced in the last year that puts texts outside of the print space when certain characters or formatting is used in combination with tab stops being placed outside of the print area. And it is impossible to undo this once it happens. I am not sure how to report that bug as it is hard to explain and show.

2 Likes

Wow! mikekaganski. Thanks for showing these two options that would have corrected things right from the start. “set tabstops relative to indent of paragraph” and “allow tabs to extend beyond the right margin”.

What appears to happen is that the “allow tabs to extend beyond the right margin” some how gets checked to active when I add certain characters or formatting. If you check my “untitled 6” and “untitled 6 problem” you will see this. So now that I known this I can simply uncheck this box if it happens again. And I guess this is the bug. I wish I could reproduce it without having to use certain characters in an inline citation I add via the Zotero connector. Also I just tried and what is even odder is that once I uncheck that box, things go back to how I want them, and if I add the same citation that triggered the box to be checked the first time, it doesn’t get checked the second time. Odd bug.

What we be really great (is it possible?) is to be able to allow the tabs to extend beyond the right margin only up to a certain amount. This would allow me to stick the end of some lines beyond the right “print area” but only a small amount. Is this possible? Although maybe if that was the case any text after the tab stop would get wrapped. But do you see what I am getting at. One option too would be to have a style that allowed the last line to stick out to the right beyond the rest of the text. Is this possible?

Finally, the check box “set tabstops relative to indent of paragraph” is really cool too. I changed things and now I am able to have my tabstops of my different styles simply be inherited. This is really helpful as I have about 20 of these styles and it allows me to set just the one with a tab stop number and have all the others inherit that number. And the number places the tab stop in the same place for all these styles even though each one a different left indent. Then if need be I can change the one style and have all my other styles reflect that change.

Note hat these compatibility settings are different for Word files - so saving as DOCX, or using DOCX as your starting point, would give you the changed values there (and that’s not a bug).

This is happening in ODT files.