Is there something wrong with the Master Document Implementation?

An opinion: A large document, or a technical document that receives a lot of minor changes, is best organized as a multi-file Master Document. Take as given that I want chunks of my document in separate (.odt) files.

I also want to be able to do the following, which seems to me at least, to be basic things that a lot of people creating technical documents will want to do:

  • Number headings and subheadings with prefixes that look like: 1, 1.1, 1.1.1 and when an .odt file is included in a master document, have that numbering re-calculated.
  • Have the text (preferably without the number) of level-1 headings appear in the headers of it's pages (having level-1 headings start on a new page can be handled automatically or manually, it's no big deal)
  • Have the number of the level-1 headings appear as a prefix to the page number in the page footers (so page 4 in section 7 appears as 7-4).
  • Have a modification date appear in the footer of pages that have been modified. In my case the sections are relatively short and I have no issue with the modification date applying to all pages in the modified section.

I have created such a document, but there are all sorts of problems.

  • When opening the Master Document, it asks about updating links. Clearly one wants any changes that have been made to included files to be picked up — that is the whole purpose of using a Master Document. However, the result appears to muck up the document — the section/chapter titles in the page headers and the section number prefixes in the footers show up, essentially, as broken references and the text in the footer that represents the modification is munged in the "first" page of each section.
  • When making changes to styles (using the template), they have to be applied to the individual files (if one wants to be able to work with those separately from Master Document and not have funny things happen), but that causes the same unwanted modifications and errors to appear in the individual .odt files.

Is the Master Document implementation just immature (i.e. recent functionality)? Has it always been buggy? Does anyone use it on a day-to-day basis?

I don’t mind jumping through hoops once to set up a document; I do not want to have to do that every time I want to make minor changes to a document — either the text or styles (including page styles).

I would have to agree with @mariosv - read through ch13 of the Writer Guide. I would only ever use a Master/Sub-document arrangement for one of the situations listed under “Why use a master document?”. You are going to need plenty of page and header/footer styles. Perhaps have a look at the source documents for the Getting Started v3.3 guide.

I read the documentation — I’m a retired computer professional and strongly believe that anyone who posts to forums like these should always have read the documentation.

To answer the first question: Yes I have read the documentation. I did that before embarking on creating my Master Document setup. I happen to be comfortable with multi-file document organization and have used them with other “word-processor” applications. They have lots of advantages, some of which are mentioned in the referenced documentation. I have, by the way, posted some bug reports with more details. I was hoping some people could share successful experiences with Master Documents.

Fair enough. I have not had any problem using the Master/Sub arrangement, but then again I have not demanded as much from it as you. They are an order of magnitude more complex IMO, but if you are comfortable with that then you should be fine. It may simply be a workflow matter. I will have a go this weekend at drafting an example that I can post back here for your review.

Well, I had a tinker with the master document facility, partly out of curiosity and partly because I have not used it in the v4.x series yet. There are a couple of pitfalls to be wary of and it is not the easiest to use facility, however I believe I have achieved a result that is close to what you are after. I have used a file / style structure as follows:

  • Title and forepaper pages in the master document (master.odm). Created from the chapter template.
  • Part division pages (ptNN.odt based on part.ott) used to group chapters. Solitary page / paragraph style based on the chapter template. I prefer the term “part” to “section” for reasons of historical precedent, thus I consider a section a sub-division of a chapter.
  • Chapter N (chNN.odtbased on chapter.ott) that contains the paragraph styles. These can be copied as necessary to create and insert new chapters. I have tried this (ch04) and it appears to work fine.

The entire document as shown in the accompanying PDFs has two parts, each with two chapters. The header / footer in the forepapers is styles on the chapter details with the exception that there is no chapter information and the page numbers are in lower case Roman numerals. The Each chapter has:

  • Header containing a cross-reference to the chapter name (left) and document info file name (right).
  • Footer containing a document information modified date and time (left) and chapter number (right) with page number (right) in hyphenated form. The page number field renumbers per chapter as required.
  • Headings using outline numbering style.
  • Text body style.
  • Basic unordered list style.

As mentioned, I can copy one of the existing chapters (e.g., ch03.odt), rename it (e.g., ch04.odt), and insert it into the master document as expected. The ToC also updates as expected. I have not tested insertion into a point in the middle of the document. I will leave this for others to test and report back as I don’t have time right now. Updates to templates also appear to be reflected in documents based on the associated template (as one would expect). Things to be aware of:

  • Fields pulled from document info (e.g., file name, modified date / time) will naturally reflect the document currently being edited i.e., details for the master document when editing the master and details for the chapter when editing a chapter.
  • Outline numbering is still a work-in-progress in LO. The combination of styled-based numbering (Outline & Numbering tab) and pure outline numbering (Format > Bullets & Numbering…) remains inelegant. Both options must be set when using a master/sub-document arrangement as otherwise the outline numbering will not be pulled into the master document. That is my experience anyway. Other are free to test further and report back.

The resultant files (ODM, OTTs, ODTs, and PDFs) are here. Rename from JPG extension to ZIP. It is probably not exactly what you require, but hopefully it will get you started. Please let us know how you get on.

Thank you Owen for investing that much effort into helping me. I had already collapsed the document I was working with into a single .odt which I got to work as desired. When constructing my original, I worked pretty much as you did (copying then changing a basic chapter to to get a starting point for the next). One thing I totally missed was that “sub-documents” supply their own doc-info for the part they constitute (I had thought there would be a single doc-info, the master document).

@oweng - Ditto what JRG said: this investment your time is a real benefit not only to OP, but also (of course) to less adept users like me, and many others I’m sure. Thank you!

Hi JRG,
have you read the documentation to know better how to use master documents?
http://www.libreoffice.org/get-help/documentation/
Select Writer Guide 3.6 (word processor), chapter 13. https://wiki.documentfoundation.org/images/a/aa/WG3600-WriterGuideLO.pdf

I hope you can get help there to solve your issues.

See my reply to the very first response. (The answer is YES, I had read the documentation — more than once).

WARNING: This is not an answer, just further commentary.


I thought I had missed something from one of the comments, but no. The LibreOffice Writer’s Guide is available for download as a .odt file, but the .odm file is not. I assume the individual chapter .odt files are the actual ones used in the .odm file, but cannot be sure of that. So I’m not sure what to use as a real working example.

I had been looking for the LibreOffice4 Writer’s Guide and see that some chapters have been posted (I have downloaded them). Unfortunately the chapters on “Working with Master Documents” and “Working with Fields” are not yet available. I was rather hoping to see some improvements in the implementation with the 4.0 release (which I why I’m being an early adopter).

I will experiment with approaches other than using a Master Document, but they will be workarounds, not solutions.

If you click on the word “source” in my first comment above you will find it is a link to the ODM. The word “documents” in the same comment is a link to the related ODTs. This is for the Getting Started Guide v3.3. I tried to edit my comment to put a space between the two links, but it won’t let me (edit).

Thank you. I am grateful for your help. I have downloaded the ODM file and will download the others — and start seeing how they work. While grateful, I don’t want you spending your time creating examples just for me. I am sure there are other users who could benefit from basic advice. I’ll post a comment about what I discover (especially if it solves my problems!).

There are significant differences in how the Getting Started Guide is structured. I wonder if some of these are to workaround “issues”?

What has been done in that document is to use the docinformation (title) as the name of the chapter in footers. That means that while what shows looks like it is related to a “heading”, in fact it is not.

Also, page numbering does not get reset anywhere. The page numbers are an uninterrupted sequence right from the beginning of the document. The front matter page numbers are not even displayed as Roman numerals.

I’ve run into other problems with fixed text in footers being over-ridden and not being able to find where Writer is even picking up the replacement text from. These are “modification dates”. The text that is over-riding is not in a previous footer (so not being “carried forward”), is not in a “Field”, is not in the document information (“properties”).

I’m about to give up on the whole Master Document concept in LibreOffice. I find that both frustrating and a little sad.

Oh, and I think there are some issues with templates as well :frowning:

The best solution, it appears to me, is to purchase a copy of InDesign and forget about using Master Documents, whether in WORD or LO.

The image “http://ask.libreoffice.org/upfiles/13665223857489223.jpg” cannot be displayed because it contains errors.

The image “http://ask.libreoffice.org/upfiles/13665223857489223.jpg” cannot be displayed because it contains errors.

You need to download the file, rename it from JPG to ZIP extension (it is a ZIP but the site restricts uploading to certain file types), and then extract the contents.