Ask Your Question
0

LO Write numbered list with leading 0?

asked 2020-05-10 15:36:24 +0200

michaelbr gravatar image

updated 2020-05-10 15:39:21 +0200

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

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2020-05-10 15:59:23 +0200

RGB-es gravatar image

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.

edit flag offensive delete link more

Comments

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

michaelbr gravatar imagemichaelbr ( 2020-05-10 20:33:28 +0200 )edit
2

answered 2020-05-10 16:10:43 +0200

ajlittoz gravatar image

updated 2020-05-11 07:49:02 +0200

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 ... (more)

edit flag offensive delete link more

Comments

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?

michaelbr gravatar imagemichaelbr ( 2020-05-10 20:32:12 +0200 )edit

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)?

ajlittoz gravatar imageajlittoz ( 2020-05-11 07:52:45 +0200 )edit

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.

michaelbr gravatar imagemichaelbr ( 2020-05-11 15:03:50 +0200 )edit

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.

ajlittoz gravatar imageajlittoz ( 2020-05-11 15:45:30 +0200 )edit

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

michaelbr gravatar imagemichaelbr ( 2020-05-12 15:44:00 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-10 15:36:24 +0200

Seen: 63 times

Last updated: May 11
https://ask.libreoffice.org/en/question/243528/lo-write-numbered-list-with-leading-0/?answer=243531
ask.libreoffice.org
crawl=CC-MAIN-2020-29
77212
application/http; msgtype=response
sha1:ESS5DDCCXEUQPMSWRS7OL2KC5VCMTW65
<urn:uuid:5967ac9a-c99a-442f-8659-faf32d4a14ab>
2020-07-09T19:07:25Z
89.238.68.146
application/xhtml+xml
sha1:S4HSE4FRWOUNTJZPWBACSYXXFHDCXUYX
<urn:uuid:61172122-1185-41d6-bab8-642491dd4e6f>
https://ask.libreoffice.org/en/question/243528/lo-write-numbered-list-with-leading-0/?answer=243531
response
<urn:uuid:06019c78-5a5d-418a-aef0-d18c53c5c634>
isPartOf: CC-MAIN-2020-29
publisher: Common Crawl
description: Wide crawl of the web for July 2020
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-205.ec2.internal
software: Apache Nutch 1.17 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/