Writer: how to get target numbering style?

LibreOffice writer: I’m editing .docx document, which have chapters numbering style, like this:

Document has paragraphs already numbered, default paragraphs style.
I want get chapters numbering formatted like this:

1. Text text

1.1. text text text text 
text text text text text text text
text text text text text
1.2. text text text text text text
1.2.1. text text text text;
1.2.2. text text text text
1.2.3. text text text text
text text text text
1.3. text text text text
text text text text

How to get this?

LibreOffice uses a workaround to get inline headings so best not use Heading Numbering, especially as your text looks the same style throughout.

Use a paragraph style with a defined List style.
In the sample below, I have set the text to paragraph style List 1.

  • In Outline & List
    • I applied list style Numbering 123
    • I set the indent to 0
  • In Numbering 123 in the Customise tab I set it to show appropriate sub levels
    ListStyleSubLevels

NumberingStyle121082.odt (29.8 KB)

Use Tab or Shift+Tab to change levels

Your request is not very clear. What you show is the usual chapter numbering. @EarnestAl hints at inline headings but your sample does not suggests such a layout. So, please provide more details.

More over, you’re editing a DOCX document. List and chapter numbering is an area where Word and Writer differ much. Be prepared then for discrepancies and instability.

After rereading the thread, I should mention that LibreOffice 25.2 adds support for inline headings in docx, see tdf#131728 for the full details. It is a workaround but should work for round trip.

OK. Also, about applying the headings for different chapters of a document: the original .docx document already has section headings. Now, to format the document according to my needs, first I remove all formatting Ctrl + A, Format > Clear Direct Formatting, then I apply “Default Paragraph Style” to the whole doc. Now I need apply style for chapters headings. How to apply formatting to paragraphs and chapters headings in one go?

If you already have paragraph styles in place from Word then can you alter the existing styles to suit? Otherwise, you might be better advised to copy everything as unformatted text to a new document and start afresh without any Word corruption in the document.

Sections in Writer are different to sections in Word so I am not sure what you mean.

Why do you want to remove the existing styles?

Not Default Paragraph Style, that is there to make global changes, not to be in a document. The expected paragraph style for the body of a document is Body Text, If you add a heading then the next paragraph will be Body Text. For a list, it would be a List paragraph style that is linked to a list style.

We don’t know what layout or styles you have in the document so you cannot get a targeted answer. Being a Word document, I suppose you have the default paragraph style of Normal and the headings as numbered headings so they will already have styles applied, won’t they?

Of course if you have removed them then you have to apply styles manually in which case start a new document and paste only as unformatted text.

The original document is from scanning and OCR paper doc, so it has some artefacts and roughness. I agree, the best is to remove all the original formatting and start anew - that’s what I do. By “sections” I meant document chapters. So first I need to apply a required font style for Body Text, then set a Default Paragraph Style, then format headings, correct?

Every paragraph style inherits something from Default Paragraph Style. Set your font face and size in Default Paragraph Style, that way Body Text, Caption, List, etc. will all be set to the same. Just don’t use Default Paragraph Style in the document.

When I OCR text, to avoid contamination of styles, I paste into a new document as unformatted text.

I then apply Body Text to the entire document. Using the original document as a guide, I go through and add headings, lists, etc.

If you want to use inline headings, it can be done when applying headings but it is slower than applying normal headings.

Well, I set my font face and size in Default Paragraph Style: it’s not clear what you mean by not to use a Default Paragraph Style in the document?

Default Paragraph Style is there to set global changes, not for use in documents.

Every heading style has Body Text as the next paragraph style. If you use default Paragraph Style you will be fighting against LibreOffice instead of using its abilities. You can do it but it will cause you to be unhappy at some stage

So you apply Body Text to the entire document text and then manually format the headings.

Yes, first step is to apply Body Text to entire document, unless it is all a list.

I am still not sure how you are doing your numbering, whether it is a list style or Heading Numbering. Here is an example of list and Inline Heading.
InlineHeadingsWithNumbering.odt (41.1 KB)

No, I am talking about regular Chapter headings, not Inline Headings.

That is straightforward, practice with a new document first.

  1. Open a new blank document. Type dt and press F3 to add some Dummy Text. Press Ctrl+0 to apply Body Text paragraph style
  2. At the beginning of the text, press Enter to create a new paragraph. In it enter some text for a heading, press Ctrl+1 to apply Heading paragraph style.
    1. Break up the main body into other paragraph and add some text as heading. Click in one and press Ctrl+2 to apply Heading 2
    2. Repeat for a Heading 3
  3. Click Tools > Heading Numbering to open the dialogue
    1. Under Level select 1-10
    2. In the Number field select 1, 2, 3, …
    3. OK
      HeadingNumberingWithSubLevels

Before apply Heading paragraph style, should the text for a heading have extra spacing between paragraph or just be on a separate line? (default paragraph style)

The spacing above and below a heading is defined in the heading style. Don’t leave blank paragraphs.

You can define the spacing above and below any paragraph style. You can also define line spacing