Add chapter numbering into a template

This works also after erasing your manual page break. However, Writer gets a bit confused about the cumulative direct formatting (e.g. erasing the page break is taken as an imperative DF which overrides the page break in the style).

To revert to “normal” behaviour, do Ctrl+M in your level-2 heading after removing the page break. You’ll see the break become effective.

Once again, I can’t enough warn against direct formatting. Using (exceptionally) direct formatting in a styled document requires a very detailed knowledge of the overriding mechanism. So, until you become an expert in Writer, constrain yourself to consistently and exclusively use styles. DF always plays tricks on your back (and even on experts’ back like myself).

@ajlittoz Your are right, this solves the problem. I totally agree, reduce DF to the minimum, or avoid it at all. But I am a human, and I can make a mistake. Or, like with Heading 2, I get so confused, I do not have an other solution than DF with the page break.
The power of a word-processor, compared to a classic mechanical typewriter, is that on a classical typewriter you are not allowed to makke make a mistake. On paper, you can see the mistake, but you are not able to correct it. You have to type the whole page again, for just one wrong typed letter. With every word-processor, type mistakes, of the wrong letter on the wrong place, can, as on paper, very easily seen. And, that is the great power of word-processors, correct the wrong typed letter, or word, or even sentence easily.

I would like this ease to see the mistake, and the ease to correct the mistake on styling would getting more close to the ease to see and correct a wrong letter. And it begins, according to me, to visual and easily see, the mistake. Both of us want to prevent DF. You as an expert could see this DF, I, as a beginner with styling, could not.

@Bernard12 It is very difficult to see some subtle DF variants such as the one I mentioned (erasing a manual page break while the style contains a page break). Add to that the Style Inspector is still experimental and has shortcomings (like reporting numbering as DF when enabled by a list style – and chapter numbering is indeed an internal reserved list style). And also Ctrl+M is ineffective against some other DF variants!

I agree with you with the “comfort” offered by the ability to easily correct mistakes in a user-friendly manner.

The ultimate philosophy with Writer is to completely separate contents and appearance. This is possible through what I call “semantic styling”. Styles (any category even page or frame styles) are used to meta-tag text about author’s importance and significance. When you write, think only of the significance of your text and annotate with “hints”. In Writer, the “hints” take the form of style. When you do that and consider the appearance of styles as a means to make visible the differences of meaning, you can tune or dramatically change your layout without having ever to review your text contents.

I have done this several times and it is surprising how a 15 min job can succeed on a hundreds pages document without glitches.

I can only suppose that you already had some direct formatting in that paragraph. You then removed that, but I found that Ctrl+M doesn’t remove the page break + page style change, I had to remove that by hand, then use Ctrl+M to remove the remaining diret formatting - don’t forget that when you remove some direct formatting in Format - Paragraph, you are still applying direct formatting.

@anon87010807

don’t forget that when you remove some direct formatting in Format - Paragraph, you are still applying direct formatting.

This makes it hardly impossible to work properly with templates. Something is wrong in a room, but I am not able to put on the light, to see where is something wrong. Only after I see what is wrong, in detail, I am able to solve it. Not earlier. Otherwise it is not impossible to solve a problem in a dark room, but it is highly ineffective. This behavior reduces the power of templates .

But it explains a lot.