Writer: status of breaks viz. direct formatting?

Are page- and column-breaks considered members of direct formatting?

Here is a problem which cannot be solved exclusively with styles:

A book is made of a master document and (really) many subdocuments. The master contains the cover, various legalese, TOC and a preface. The subdocuments contain material which can be considered conceptually as chapters. All files are based on the same template, implying that all styles are shared.

The subdocuments are rather short. Globally they are a kind of library from which books with different content are made, some subdocuments are common to several books, albeit not always in the same position.

Per specification, subdocuments are required to start a new page. This is done by including a page break in the Heading 1 style. There is always an initial Heading 1 in subdocuments.

The formatting specification further requires that book pages are mirrored with page number at the outer margin. It is easy to use Right Page and Left Page page styles with footers respectively styled Right Footer and Left Footer. The “natural” alternation of the page styles does the job.

The first sub-document must start on a right page, which is traditionally done by configuring the Heading 1 page break to force Right Page page style. But since the sub-documents are rather short, frequently 3 or 4 pages long, there is a 50% probability that the page number parity will cause a blank page to be inserted. Considering the volume of the document, this leads to too many blank pages and to an unaccepted increased in the book thickness.

The solution is to specify a bare page break in Heading 1 so that there is no longer any parity issue. However, subdocuments will be formatted with the page style active before them. In this case the Preface page style which is different from the required Right Page and Left Page.

This is fixed by a direct formatting on the first paragraph of the first sub-document, adding a forced page style Right Page (with page number restart at 1). Then the alternation between Right Page and Left Page does the rest.

The question is:

I first always advocate against direct formatting because of the maintenance issue.

I would like to know if the manual page breaks are considered by Writer as Direct formatting or not.

It seems that Format>Clear direct formatting does not remove the manual break. But this manual break takes precedence over the one defined in the paragraph style (thus behaving like direct formatting).

Is this use legitimate is style-oriented formatted document?

Note that, in principle, there is only one such manual addition in the master, leaving the rest to styles.

It is direct formatting. However, I wouldn’t worry about it. You have full power of styles in your hands for automatizing your work, and manual formatting for cases which can’t be made automatic. The problem is not using manual formatting per se, the problem is using it where styles fit better.

Page breaks are a property of paragraphs, so manual page breaks are treated by Writer as manual formatting. The (annoying) fact that “clear direct formatting” do not clear them put manual page breaks in a selected group (yes, I’m being ironic here :wink: ) together with manually applied language settings or manually applied numbered lists: all of them are direct formatting, none of them are cleared by Ctrl M.

Writer is not perfect, it requires workarounds for several things and there are others things that cannot be done at all and require different software solutions such as LaTeX. And that’s fine. The “always use styles” mantra works well most of the time, but on those (not so) rare occasions where it doesn’t (restarting page numbering, formatting Math objects or tables, restarting footnote/endnote numbering on a level 2 heading…), you need to get creative and do some manual work as you did in your example. And again, that’s fine: Writer is so powerful that it can even provide solutions for many of its own limitations. Manual solutions, but solutions after all.

IMO, the answer to the question “is sparse use of direct formatting legitimate in a style-oriented document processor” is clear: “if there is no other choice, of course it is.”


BTW, why did you use two page styles for left and right pages? You can get mirrored pages with just one page style by unchecking the “use same content” on headers and footers and select mirrored margins. Usually, I set only two page styles for the body of a document, one for the first page of each chapter (bigger top margin, sometimes with a footer and centered page number) and the other for the rest of the content (no footer, but header, different content for left and right pages, mirrored margins).

@RGB-es, answer to BTW question: unless I’m wrong, a single page style with unchecked Same content on left and right pages does not solve the situation where some chapters (here the first one, the others are parity-insensitive) are assigned a right page. This can only be done when a page style is restricted to be Right page only. And this restriction forces the use of a Next style configuration to ensure the next page is a left one. Otherwise you get a blank page every other page.

@ajlittoz, yes, that’s why I use a “first page” page style that’s only right and then a “body” page style that can be left and right.

@RGB-es: in my case unchecking Same content on first page wouldn’t work either for the same reason: a page style has only one value for the attribute Left and right/Right only. Some “chapters”, presently only the first one but potentially several others, start on a right page; all others immediately after the last page of the preceding “chapter”.

@ajlittoz I’m not unchecking “same content on first page” but I’m using a different page style for the first page of each chapter. I have a first page style that we can call “ChapterBegins” and a second one that can be called “ChapterContent.” ChapterBegins is only right (and have larger top margin) and it’s followed by ChapterContent. ChapterContent is followed by itself, have mirrored margins and different content in its left and right headers.

@RGB-es: understood. Your case is the traditional one with chapter always beginning on a right page. Mine is different: a “chapter” (or rather a set of clauses) may arbitrarily begin on a left or right page. Some (kind of “super chapters” or beginning of another category of clauses) should start on a right page.

That was quite tricky to fix, with the added difficulty that the header in the master had to be automated from what it was supposed to be in the subdocument (this page attribute don’t transfer to the master because the master page style has precedence).