Formatting Issues In Linked Document

Hello LibreOffice - I am hoping you can help me out with this pesky situation I am facing. I have tried to solve it myself, but no luck yet.

Now that it has been going on for about 1.5 years I thought I should ask you - should have asked earlier, but I have sporadic documents I need to submit, so been managing. I would really like to try and solve it if possible.

I am using LO 6.3.5.2 on Ubuntu 19.10, and this issue has been going on since about LO 5.5 or such, came up about a year and half ago. I am software eng., and I have a feeling these may be bugs that need to be addressed at an engineering level.

As I am noting again – I have been using this setup described below for about 5 years now, and the issues noted showed up about 1. years ago. Thank you for your patience in going through this.

Here goes:


ISSUE: 1
I am having a formatting issue that I had not had before. I have been using LO for a while now in the following setup:
I have a main/ parent document (its own style template), and I have content in sections. The child documents (their own templates) link various sections from the parent document.

In the parent document the Default Style, incorporated in the Text Body style are set at Time New Roman (TNR)/ 10 pt./ Single Space (SS). In the Child docs these styles are TNR/ 12 or 14 pt/ double- spaced (DS).

I do this to save space in the main doc I am working in, better screen utilization, and the formatting works out great from the child documents, which I print/ PDF. The sections are locked in child doc.

This had been working well for me until about a year and half ago, not sure which version of LO the issues started with.

Now, when I edit the parent document, set at TNR 10 SS, – in the child doc., certain edits show up at TNR 10 pt/ SS, while other sections are properly formatted at the child documents style at TNR 12/ DS, or such.

I cannot figure out why it happens. It can happen for a word or a line I was editing, and many times it shows up fine.

The only option is to select the words/ para and select Clear Formatting in the parent doc. Then it shows up fine in the child doc in the style set from template.

I have tried to figure out when it happens - perhaps when I select a word and start typing over it, as that seemed to be a pattern, but it does not always happen in this way. It is pretty random.

And very annoying because if in a para, if it is several words, I have to format the whole para and reapply bold/ italics and such.

If you are able to please help figure this out - I would much appreciate. As you may note I consider myself an advanced user of LO managing templates and such/ parent-child docs with their own templates, and I have been strict about always managing the document styles from the respective template.


ISSUE 2:
Sorry for the length already but this issue is related as it started about the same time – and is a bigger issue actually.

I have calc spreadsheets that I also link into the parent doc sections. They are then displayed in the child doc when it opens up. All formatting works as intended. Thus, fonts work and if in the parent doc I have certain borders/ cells bolded, they all show up fine in child doc.

However, when I make a PDF of the child doc, or print it, all the data from the linked spreadsheet in the linked section disappears. Only empty columns show up in the PDF.

I close the child doc. And reopen it – all spreadsheet content looks ok. I try to print it directly w/o making a PDF and the same thing happens. The child document prints with no data in the spreadsheet.


If you could please suggest how I could possibly fix these issues it will be much appreciated. I am not sure if these are bugs. If you need me to reach anyone directly to discuss them, I would be happy to run them through the scenarios.

Thank you for your patience and help!

Mono

Answer for issue # 1

When using master/slave documents, Writer is very picky with style usage. If you want to get the expected result, I’d recommend to use exclusively styles. With the plural form of “styles”, I mean not only paragraph styles but also character styles.

From your description, you needed to Format>Clear Direct Formatting which a clear indication intra-paragraph formatting was made with direct formatting. Direct formatting overrides all other style categories and is very “sticky”. Worse, there is no visual feedback in the UI to tell you direct formatting is active over other eventual styles.

When “assembling” a document under master/slave mode, the basic principle is same name styles in the master take precedence over those in the slaves. This is valid both for paragraph and character styles. If you have direct formatting in the way, result is unpredictable (or rather direct formatting will take precedence but you don’t know the exact extent of direct formatting).

You also say

I have to format the whole para and reapply bold/ italics and such

I bet your bold/italics are applied wit Ctrl+B or I instead of a character style like Emphasis or Strong Emphasis. Use these styles. They are not affeccted by paragraph styles or direct formatting because they live in a different layer and survive changes in the other layers. But remember direct formatting overrides them all.

I notice you mention Default Style and Text Body. They have not the same purpose. The sole role of Default Style is to set defaults which propagate to all other styles. It should never be used to format paragraphs. Text Body is the “standard” style for text without specific property, i.e. it is not a heading, a note, a list, … If you come from the Word world, this is different (there Default Style is the “standard” style for text).

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) or comment the relevant answer.

Hi Ajlittoz - I answered above. Please let me know when you get a chance. Thank you.

set this in the Template of Master and Slave

I’m afraid you use the word template with its common-sense meaning and not within its restricted LO concept. A Writer template is a file with .ott extension. It contains styles (primary goal) and initial contants. When opened, it immediately transforms into an Untitled x.odt document so that a save operation does not overwrite the template.

When a document is correctly templated, any update in the template styles is automatically forwarded next time the document is opened. This is a very nice feature, provided, once again, no direct formatting masks the style formatting. This one of the numerous reasons why you should avoid as much as possible direct formatting.

What makes me dubious about your use of LO templates is master document cannot be based on a LO template unless you force it with extension DocumentTemplateChanger.

Use of character styles instead of direct formatting

Removing direct formatting to replace it with character styles must be done everywhere you used direct formatting. This is a manual process which unfortunately cannot be assisted because Edit>Find & Replace cannot handle character styles.

Consequently restyling must be done in all files; master and slave documents. Consider styling as a semantic markup: the exact appearance does not matter. The appearance can be set afterwards through style tuning. The whole document layout can be dramatically changed only playing with styles without touching the text in any way if your markup is smart enough and exhaustive.

As an example, don’t think of italics as a slanted writing. Think of “technical words”, “foreign words”, “quotations”, … Define a style for each case. Then decide which will get italics or colour or … You may have different styles having the same look though semantics are different.

Direct formatting

How do you know and where do I check for this please

Unfortunately, there is no visual feedback for the use of direct formatting. The only trick I use is to select a part of the text (triple-click for a sentence, quadruple-click for a paragraph) and Ctrl+M or Format>Clear Direct Formatting to see if something changes.

Can I set up Emphasis or Strong Emphasis from the Character Panel?

I assume This is the usual side pane with 5 vertical icons and the top one is active. Click on the third icon (tooltip says Styles). This will give you a view on the styles. The top toolbar has 6 icons at left, respectively: paragraph (initially active), character, frame, page, list and table (the last one does not qualify as standard styles for me).

The bottom menu allows you do organise the display. I suggest All Styles until you are familiar enough with the inheritance feature between styles. I personally prefer Hierarchical because I give a tree-like structure to my style and this view allows a denser list.

To access the character styles, click on the second icon from left. In my default theme, it looks like an A but this varies with OS, desktop and theme.

A character style is applied to a selection with a double click on its name. It is customised with a right-click and Modify.

My template (in each Master/ Slave Templates) for Text Body just inherits from Default Style and does not modify it. […] So this is where I set up TNR 10 or TNR 10 and just inherit into text Body in each template.

I am not sure to understand your wording. If Default Style is untouched, fine. Text Body is customised, fine, that the way to do it. Text Body is the ancestor of many styles used to write the discourse or argumentation of your document. Therefore, its customisation will be inherited by its descendants (see the style list in Hierarchical view to see which styles inherit from it).

Documentation

Unless you have done it already, download the Writer Guide.

A more elaborate reference (to be read after the introductory Writer Guide) is Bruce Byfield’s Designing with LibreOffice.

Hi Ajlittoz -

You mention:

When using master/slave documents, Writer is very picky with style usage. If you want to get the expected result, I’d recommend to use exclusively styles. With the plural form of “styles”, I mean not only paragraph styles but also character styles.

Do I need to set this in the Template of Master and Slave or in each New slave document I create from a template?
How do I do this please?

And you say:
clear indication intra-paragraph formatting was made with direct formatting.

How do you know and where do I check for this please? That I did intra-para with Direct Formatting? I was just editing the document and even after I do a Clear Formatting, after I start editing random words in slave appear with Master’s style.

Finally you say:
I bet your bold/italics are applied wit Ctrl+B or I instead of a character style like Emphasis or Strong Emphasis. Use these styles. They are not affected by paragraph styles or direct formatting because they live in a different layer and survive changes in the other layers. But remember direct formatting overrides them all.

Yes they are. Can I set up Emphasis or Strong Emphasis from the Character Panel? Usually I do Ctrl+B or Ctrl+I. I did not even know there was an Emphasis or Strong Emphasis.

Lastly you say:

I notice you mention Default Style and Text Body. They have not the same purpose. The sole role of Default Style is to set defaults which propagate to all other styles. It should never be used to format paragraphs. Text Body is the “standard” style for text without specific property, i.e. it is not a heading, a note, a list, … If you come from the Word world, this is different (there Default Style is the “standard” style for text).

My template (in each Master/ Slave Templates) for Text Body just inherits from Default Style and does not modify it. That is the way it is set up in LO anyway. So this is where I set up TNR 10 or TNR 10 and just inherit into text Body in each template.

I thought I knew LO well, but after this note from you seems like I have to review some concepts.

I will look up the topics and see how i can apply them to my documents, but if you could please send me some links to review, given what you know already about my dilemma I would much appreciate.

Thank you for your help with my questions.

Monosij

This should have been a set of comments (I know there is a limit on the size of comments) as it is not a solution to the problem. Have you noticed that it appears before my answer because it is more recent than mine and AskLO relevancy calculation cause it to be considered a “better” solution?

I’ll comment under my answer.