LO Write numbered list with leading 0?

How can I format a numbered list with 2 or 3 digits? I’ll try to explain with example so it might be easier to understand. I have a 3 level numbered list:

  1. level 1

    1.1 level 2

    1.1.1 level 3

    .

    .

    10 level 10

    10.1 level 2

    10.1.1 level 3

    as one can see, when the level’s digit increases, the shifting to the right also increases, so if I try to align for 1 digit level 1, when I get to 2 digits (from 10 to 99), the line with numbered list will be all shifted to the right, and the next line will become misaligned and so on. This seems to me a pretty common problem, so I would guess there should be a way to solve it, but I can’t see anywhere in the numbered list style that you can configure it, what’s the trick?image description

There are two different answers to your question. Leading zeros (padded numbering) in lists are implemented in the upcoming version 7.0. But you can simply align the list numbering to the right: check this article for more information.

This solved my questions in parts, I still can’t align my list when the number increase/decrease a digit.

This is a recurring question on this site. You can’t presently have leading zeroes in list or chapter numbers.

But your case is different. You are not requesting explicitly to add zeroes (like in legal document or some patent applications), you want to align the text of the item.

I assume you build your numbered lists with the toolbar button. The method is similar for custom list or chapter numbering but the settings are located elsewhere.

Format>Bullets & Numbering to display the configuration dialogue. Go to Position tab.

The setting can be customised per level or globally if you select 1-10 in Level. This tab allows you to position the numbering and align it left or right (so that the numbers extends to the left when you go from 1 to 2 digits or 2 to 3).

The important factor is Indent at which overrides the left ident of the paragraph. Set it sufficiently far away sot that

  • if Number alignment is Left, Aligned at + width_of_number is always less than Indent at
  • if Number alignment is Right, Aligned at must be greater than width_of_number otherwise part of the number will be laid out in the margin
  • if Number alignment is Centered (seldom seen because it looks weird, but who knows?), the case is intermediate between the two preceding ones and you must play both on Aligned at and Indent at

Note that playing with Indent at is nearly mandatory when your list items extend on more than one line if you want the second and seq lines to be nicely aligned at left with the first word on the first line.

Many effects can be achieved, experiment.

For headings, apply the same tuning on Tools>Chapter Numbering.

The same mishap can be seen in TOC. Fixing it is a bit more complicated. You can do it when creating the TOC or later with a right-click in it and Edit Index. When you create the TOC with Insert>TOC & Index>TOC, Index, Biliography, go to the Entries tab.

By default, the Structure line shows … E# E …, i.e. the chapter number is followed by a space and the chapter title. To account for chapter number variable length, you must add a tab stop between these items.

  • put the cursor in the small text box between E# and E
  • press the Tab stop button to get … E# T E
  • click on the T to select it; you can now define its position in Tab stop position; keep Tab position relative to paragraph style indent so that you can change the indent in the paragraph style without messing your carefully computed distance

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

Thanks so much for your reply, it’s still not clear for me the difference between level 1, 2, … 10 and 1-10. based on your comment and my experiments, when I changed my numbered list from 1 to 2 digits, the extra digit won’t be aligned with the previous list, right?

With level 1-10, the settings are applied simultaneously to all levels; thus there is no formatting difference between them. To differentiate, you must select a specific level.

the extra digit won’t be aligned with the previous list

Could you make it clearer? You change from 1 to 2 digits. Where do you want the numbers aligned? On the left (first digit) or on the right (last digit)?

the extra digit won’t be aligned with the previous list => this is what I’m looking for, but based on what I’ve seen, I won’t be able to do it (when I set the position for 1 digit, and it passed to 2 digits, I’ll loose the alignment again, I think this problem will be solved in ver 7, as stated by RGB-es, but this solution is much better than what I had before, thanks so much for your help.

There are two alignments to consider: the number and the text. To be able to tune these two separately, make sure the number is followed by a tab and not by a space. Then text is aligned on Indent at provided you set this distance wide enough to cope with your longest number.

The number is another story. You have 1 or 2 digits. Consequently you can justify it on both sides. Even if you format numbers with leading zero (in the next release), you can’t make sure the numbers will align on both sides because digits may not have the same width, depending on font. Then, you must choose between left or right alignment. I’d advise for right alignment which is nicer.

OK, great, I’ll give it a try. Thanks