Newline add extra spaces

How to delete extra spaces from newline?

This is heading 1 with new line. I write like this “BAB I(SHIFT+ENTER)PENDAHULUAN”
Heading 1 with new line

But, if I insert to Table of Contents will add extra spaces.
image description

Untitled 1.odt

My OS: Ubuntu 21.10
LO version:
Version: 7.1.3.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: id-ID (en_GB.UTF-8); UI: en-US
Ubuntu package version: 1:7.1.3~rc2-0ubuntu0.20.10.1~lo1
Calc: threaded

No extra space here. Edit your question to mention your OS name and LO version. Also, attach the sample file with the paperclip tool (you can attach only to a question, not to a comment).

Thanks for suggestion. I have been updated my question. You can see on Table of Contents, after “i” before “PENDAHULUAN” is seen there are additional spaces or something like that?.

You made two design mistakes and one short-sighting error.

##Heading n family has been discarded

You duplicated Heading 1-3 only to change font face and size, alignment and line spacing. This is useless. You could have simple customized Heading 1-3 to fit your needs.

Using a different set of styles than Heading n requires the manual assignment of styles to outline levels. You did it but that could have been avoided using Heading n.

You could also have taken benefit of the hierarchical organization of paragraph styles by changing the font face in Heading. This change would have been transferred to all Heading n without the need to fix every Heading n font face individually.

##You assigned Numbering IVX to Heading 1

Though using any list style for chapter numbering in order to get special non-standard numbering is perfectly legitimate, I don’t recommend it for routine “common” numbering (and all the more to newbie users) because this introduces subtle numbering conflicts as it is next to impossible to maintain two numbering sequences in perfect synchronisation. For instance, you could get a sub-chapter numbered 1.5 in chapter 2!

In addition Numbering IVX is not reserved for chapter numbering (though you assigned it to paragraph styles marked for outline) and can still be used for list item numbering, creating distortions in your chapter numbering.

Tools>Chapter Numbering configures chapter numbering for Heading n (by default). In this dialog, you select the kind of numbering for each level. Initially, all levels are unnumbered ([None]) but you can choose I, II, III for level 1 and leave other unnumbered.

"BAB " can be added to Separator Before as you did to Numbering IVX.

##Settings for TOC

When the outline structure is collected for TOC creation, all “non-characters” like line break are converted to spaces. This means you chapter title is " PENDAHULUAN". Note the initial space.

This text, including its initial space a used to generate a TOC entry. This synthesis is driven by the template in Entries tab of Insert>TOC & Index>TOC, Index or Bibliography (equivalently right-click in existing TOC and Edit index).

The Structure & Formatting line is the template. Between each button (E# and E for example), there is a text entry box containing a space by default. E# stands for “entry number”=chapter number and E for “entry text”.

Since your entry text already has an initial space, you can erase the separating space by clicking in this text box, make sure to move at the very end with the cursor keys and press Backspace.

Personally I don’t see any inconvenience at having a double space there to better emphasize the difference between the number and heading. For better separation you could insert a T (tab stop) button between E# and E and set the tab stop to a convenient position or adjust left indent and first line indent in the corresponding Contents n paragraph style.

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 which is reserved for solutions) or comment the relevant answer.