Alignment of numbered paragraphs in tables is buggy?

Isn’t this buggy behaviour? It is certainly ugly and undesired. In narrow cells paragraph numbering can become mangled. The problem only happens when the numbering alignment is set to “right” or “center”. If it is left-aligned then it stays in place and only wraps when the line is actually too short to display the number and punctuation. When it is right- or center-aligned then the numbering begins to shift rightward the narrower the table cell is. It shifts more and more with narrower space until it starts wrapping prematurely. I have tried to demonstrate all this in the attached file.

How can I have right-aligned numbering that acts properly when there is enough space for it to fit on one line?


numbering alignment problem.odt (17.7 KB)

From experimentation, your problem comes from interference between space needed for the number and width of the column. When I reduce number font size, the problem disappears (the font size decrease needed depends on the width of the column).

As I understand the issue, in a “plain” paragraph, the number can spill over in the margin (if alignment requires so). Paragraph indent is not an absolute stop barrier.

In a table, layout begins the same as in plain text but cell boundary is then taken into account. If number overflows to the left of the left indent (which is set by Indent at setting), text (or paragraph?) is shifted to the right though it seems it is not always the case. Sometimes, the number behaves like the “plain” case and is clipped if it overflows the cell.

This is probably a bug. Report it at https://bugs.documentfoundation.org/.

You should be aware that a list style, be it Format>Bullets & Numbering takes over indent settings and does nasty things to the paragraph style. I think that the combined reduced width of the paragraph in a cell and the requested Right alignment don’t cooperate smoothly.

I could suggest a workaround if you describe your intent. I feel that you are using list numbering for two slightly incompatible purposes. You have standard numbered items made of a number affixed to text. You also have something resembling dead numbering of table rows, which is not a standard list item because there is no text (the associated text is a plain unrelated – Writer-wise – paragraph in another cell. If this numbering is not part of the list (and it should not because it does not seem to be a continuation of the preceding list), there are other features for that in Writer.

Thanks. Too bad if it is a bug. For now I guess I can live with left-aligned numbers.

I am actually trying to overcome the limitation of LibreOffice where it is not able to have a numbered list with a nested list on the same line, like so:

  1. a. Example One
    b. Example Two

I have tried just doing it with fake numbering for the sub-list. But I actually want real numbering so that cross-references work properly. Also, I want to export my documents to HTML using the Writer2XHTML extension. If I don’t encapsulate the sub-list in a table or something then it appears flat alongside the main list and there is no way to distinguish the sub-list from the main list for styling and numbering purposes via CSS. I have also been trying to use a frame, instead of a table, which would not have the same problem I am describing here, but it is causing other problems at the moment…

And what if you number:

 1.a. Example one
 1.b. Example two ?

Writer is pretty good with multi-level lists. No need to hide behind a table for this.

I don’t understand your comment. I don’t want 1.a., 1.b, etc. Writer is not able to naturally do what I want, with just numbered lists as far as I know.

It was a proposed workaround. I understand that “b. Example two” is an implicit continuation of “1.a Example one”. So, my suggestion is to make the implicit number explicit. You define level-1 of your list to be numeric and level-2 to be alphabetic. Then Writer handles numbering by himself, without any tricks or tweaks.

Who ever makes lists like that with the number repeated explicitly? Anyway the style guide for my organization demands that I do it the way I have shown.

Who ever makes lists like that with the number repeated explicitly?

Many people, not to say the majority

the style guide for my organization demands…

That’s a choice. It can be done, but not through the standard list mechanism. It depends on your Writer skill. The basic idea is to simulate yourself what the list engine does.

You define two number ranges: one for level 1, one for level 2. Where you want a “list item” (which is now a common paragraph but you better give a specific style), you Insert>Field>More Fields, Variables tab the number range variable.

You have to insert yourself the separator dot and to reset the level-2 counter when you change level 1.