How do you apply 2 different page styles to subdocuments (sections) in you master document?

hi,

I see several answers, solutions here at ask.libreoffice,
moreover, I’ve been explained to several times how “this chapter thing” is supposed to be done… still, when I got to it, I was dumbfounded, like, I had learned nothing at all :slight_smile:

My problems:
I wanted to add different PAGE styles to the first page, and a different one to the first chapter coming after it…

… but here is what I did:

  1. Created a NEW master document
  2. applied a set of styles to it by importing a template, overwriting every possible thing (all checkboxes checked)
  3. imported two documents, the chapter title page and the chapter
  4. I applied a style to chapter title page (ch-t-p)
    this style was set to “right page only” ← this was a mistake (EDITED later)

EDIT #2 (22. July) Wanderer’s note makes it clear that the method I had decided to stick with is irrational, cause as he said, in many scenarios several master documents may exist…
therefore I redraw the “solution” checkmark…
and keep experimenting…
going back to Mike’s suggestion at the very beginning…
This thing is really complex. Now I don’t even like the OP question.


My problems:
Problem #1
I don’t even know hot to apply a page style to a page :slight_smile:
I kept clicking… on the page style name in the sidebar styles list…
sometimes it worked, sometimes id didn’t
sometimes I placed the cursor in the heading or the footer field …
ETC :slight_smile:

Problem #2:
I wanted to add a page brake…
insert, breaks, more breaks…
also defined the next page style…

BUT: a page was inserted (as it seems logical)
but I didn’t want that page…
Yes, I wanted to add this break in the subdocument, not the master document…
Cause in the master document I found no way to add a page break…
I would have had to have a “text” section in between, I suppose…

So my question is, how do I apply two (or more) different PAGE styles, one for each imported (embedded) document?

thank you in advance,

Peter

Well, well, well … Let’s try first to clarify wording.

template: is it an .ott document? Such a document is specially handled by Writer. You open it; it creates an “untitled” document so that you don’t inadvertently erase your template. So, is it a Writer-template or an ordinary document you consider a model for others?

Importing a template: if you have a real template, creating your document from the template is enough for all styles to be there. So, I guess you selected Load Styles from Template (was more properly names Load Styles from Document in older releases) in the style side-pane to copy styles from an ordinary document.

With Insert>Text from File or from the Navigator after selected default Text and pressing the file icon then File? I assume the latter.

Where? In the master document?

Remember that by default linked files in a master are read-only. If you click on the first page (coming from a sub-documents), any action has no effect. You’re notified if you try to type something but style applications are ignored silently. Your sub-documents must be “correctly” (= according to your taste) styled as the master keeps the styling.

You can only edit what is part of the master proper, i.e. the sections corresponding to Text in the Navigator.


So, it all boils down to: are your subdocuments ready for final release? Have they all their page breaks? Have they been fully edited and reviewed? If you answer no, re-open the subs to modify them. The change will immediately appear in the master (eventually Tools>Update>Update All to make sure).

1 Like

hi, there!!

You know, as many times you have explained this, even to my questions, I should have no questions anymore :slight_smile:
BUT the devil is in the details…

Like “what is a template”?
happily, I know it is an .ott file …
but I wouldn’t be sincere if I said that it hasn’t made me scratch my head even just lately :slight_smile:

So, it is a good thing to check out the items on the check list…

"imported a template"
Yes, I’ve imported the template, or to be precise: “loaded it”

Imported 2 documents… the icon in master view in navigator is what I trust :slight_smile:
or Insert / Section … etc…
“Insert text from file” can mean so many things :slight_smile: It is especially ambiguous because we want the section (the subdocument) to have a live link to the masted document…

So, I used the icon :slight_smile:

"read only"
well, yes… I know…
still, in a master document, I’d have assumed that you can throw styles over the pages…
and as a matter of fact, I managed to achieve this, several times…
hence the question…

But the page style, thrown over any part of the master document’s document flow would effect all of it…

There are two important points related to master+subs.

  • A master document behaves as a standard document for text it owns, i.e. text corresponding to Text sections in the Navigator.
    You can then style and format these portions as you like.
  • Styling is a companion meta-mark up for the text.
    What is linked to in the master is raw text + style markup + direct formatting. The styles applied are those defined and configured in the master. This allows for advanced effects but don’t venture in them if you haven’t yet fully tamed the master+subs engine. When a style does not exist in the master, the definition is copied from its occurrence in the first sub-doc using it (once again allows for funny effects, but don’t dare if you don’t understand the consequences).
    Considering these rules which may upset users, base your master and subs on the same template so that you have no conflict or inconsistency in your style definitions.

This is clear…
However, I wouldn’t call styles – assigning styles to elements in the document “markup”…

“Markup” sounds kinda HTML4-ish, so to speak…
“Styling” also sounds (to my ears) a little like that, too.
Applying styles is the thing that we’re looking at…
Defining, applying, managing… organizing…
They are so wonderful! They have brought clean structures to the WEB…
and now thy do that to our books and other texts…
No surprise that we love them :slight_smile:

The other thing that sounds a little offbeat to me is direct formatting in the Master Document. Or anywhere, of course :slight_smile:
Seriously… As long as Writer doesn’t display style names instead of “Dejavu Sans 10.5pt”, we should never use direct formatting… cause we can’t tell what it is that we actually see :slight_smile:

Your note, however, makes things clear…
Cause One is inclined to forget about the fact that there is the “local” text in the Master Document… and many such “sections” (spaces between sections) can be inserted…

Local text = text on the Master “level”… to which subdocuments are being called in…
It is good that this type of text exists… as a possibility… but a good Master Document will have zero instance of this. D you agree?

Use styles exactly as you would in HTML. A proper use of styles allows to decouple (unlink) the significance (which must be suggested by style name) and appearance (which is implemented by style configuration).

I am presently working on a book which has been strictly semantic-styled. The job is to tune style definition to achieve nice-looking book. No change in text, only in style configuration.

Golden rule!

More exactly, we must never apply typography-oriented direct formatting because there are paragraph and character styles for this.

However, when text flow is concerned, going for exclusive styling leads to excessive style multiplication. If you need a single “accidental” page break somewhere, it is “better” to apply the standard paragraph style and add the page break as direct formatting (DF). There are other forms of direct formatting that can’t be done with styles, such as list numbering restart.

As you see, pure DF-less documents are impossible to create. But avoid any form of DF which can be applied through styles.

I mentioned DF as it is too often considered the “intuitive” way of doing things and I don’t know your styling skills.

No, on the contrary. Once again, don’t multiply uselessly subdocuments.

“Ideally”, sub-docs are files which are shared by several masters. As an example, think of contract clause variants: you can have a library of company-approved clauses and you create a customer-specific contract by linking to various clauses.

What is unique to the final merged documents should go as own text in the master, e.g. cover page, TOC, index, unique paragraphs, … I mention here TOC because a TOC can’t be correctly generated in sub-doc (it will only collect sub-doc headings).

Master+subs is also used when the final book is so huge that Writer meets performance issues when dealing with the whole. With present computers this does not happen before 800-1000 pages depending on the number of images or tables.

Hm, depends on what you’re writing…
I believe in H1, H2, H3 and body-text – and block quote :slight_smile:
seriously, once you format something…
you can expect that you’ll have another entity in your text some other time later on…
so you’d better create a style for it…
ans from this point direct formatting is left behind…

I have mentioned HTML5 a couple of times…
okay, my style handling knowledge is advanced :slight_smile:

What do you mean?

THis is only one way of viewing it…
The other way: sub-docs are text units… could be worked on by different authors…
But could be, like, chapters, units that you create and handle as one thing… one unit…

a Book or a Magazine is never being written directly, as we all know…
there was a Quark Express, now There is some Adobe thing, and Scribus…
Writer’s Master Document represent this editing stage…
Texts are ready, typography and laying out is what’s happening at this stage…
No typing :slight_smile: Editing only…

It feels like talking at a garden party :slight_smile:
I love Writer SO MUCH!!! :slight_smile:

I also appreciate your work, helping people getting into it!!! GREAT mission!!!

I gotto go now, but thanks for your time and words!
:slight_smile:

Well, Libreoffice Writer surprises me all the time :slight_smile:

It seems to work without my doing anything :slight_smile: BUT it needs testing / and / or confirmation…

Now, I assigned page styles to the documents before importing / embedding them in the master document…

chapter title
chapter 1

After I import them, they still have these page styles…

What I would have expected:
when importing a document as a subdocument (a section),
it would have the default page style assigned to it…
BUT no! :grinning:

AMAZING!!!

I doesn’t make sense to me yet, but I’m getting to like the taste of it!!!

I have read that it had to be done like this, but turned out to be a bad idea altogether.
I caused problems with LEFT & RIGHT headers and footers, including page numbers…
IN SHORT: if you want to have different header and footer on the first page and the LEFT and RIGHT pages, you should no way set the chapter title page style “right page only” :slight_smile:

What helped me was this:
"I guess you set Chapter Title Page page style to be a right page only."
here: by EarnestAI in another thread:

The solution, in short:

Forget what you’re told. Don’t let your Master Document be controlled by templates. It should be on top, hence its name “MASTER” :slight_smile:

Create it the proper way, File / New / Master Document, and it will not be based on ANY “template” whatsoever. Therefore, no change made to any template will affect your Master Document.

If you want to make any change to the appearance of your Master Document, do it by modifying its own style definitions. That’s it.

If anybody finds anything wrong about this advice, please let me know, I’ll gladly replace it with a better solution. This is however an actual solution, I experimented with Libreoffice Writer, cause I’m working on something, and I wanted to solve this problem, and this is how I did it.
This is not theory, not an abstract suggestion, like, you should… blah-blah… this is based on my real life experience, that is: this is how I do it (from now on).

There is nothing wrong basing a master on the same template as your subs. If template styles give you unexpected results, then you didn’t think deep enough on all their usage contexts.

Using the same template on the master is a guarantee of formatting consistency.

You can also base your master on a different template, or as you suggest on no
template at all. This is handy. to achieve a totally different look and layout than in your subs. As an example, read In book publishing, how best to change the page size for a new edition? - #5 by ajlittoz

1 Like

Think of typical corporate documents or even manuals for LibreOffice. If all documents need a new font /page-size or whatever important change is bought/invented for advertising a fresh look, you don’t wish to do all Master-documents manually, while smaller files are updated directly.
.
Even masters have sometimes a protocoll to follow…

1 Like

I didn’t think of the existence of multiple master documents…
You’re right


I’m still experimenting with it…
too bad I only accidentally have time, and my experiments are not systematic enough…
now I don’t even like the OP question :frowning:

exactly… :frowning:
(I thought I already knew how to use it and I started to put together a long document with 8 chapters, several pages each, and at any modification to the template, the page-numbering went off …
So, my trust in Writer (relying on its suggested methods) broke, again…
But like so many times before, I’m getting it back…
With a different project I have just experienced that no style update “erases” the page numbering…
I’ll have to experiment systematically :slight_smile:
Also,I plan to reread what Mike wrote at the very beginning…

thanks, again! :slight_smile: