Writer 7.1 style management

LO Writer I use to write a book with many chapters. I would like to use only a single style, for all chapters, using a master document. I use LO version 7.1.7.2 on Ubuntu 20.04
After a lot of writing, and changing the styles, my styles are not as robust structured anymore as I desired. When, in a chapter, the style is not correct, I change the style for that chapter, until it is correct. After that I remove the style form the chapter, and manually add this into the template. So everything should work perfect. If I would be perfect. But of course, as a human, I make mistakes. In the text it is easy to see a mistakke, sorry mistake, and to correct the error. But in the style it is not.

Something different. In LO Calc I can make complex calculations. But sometimes the calculation is wrong, I know it is wrong, but not where I made a mistake. I can see many numbers, but some numbers are not correct. To check every formula on a complex Calc sheet, is undo-able. But luckily in Calc I can view formula’s. To see which number is generated by which formula. And so it is easy to find which formula is wrong. If found, the correction will be easy. Finding the error is the most complex, and time consuming, task.

Back to LO Writer. I would like something like Calc, to see in my Writer document, what causes a specific style. Is is hard-code, so without a style. Is it styled, within the current chapter, which should not be the case. Or is is styled according the template, which is the structure I want. And if so, by which style, f.e. “Text Body”. Something like “:mychapterdocument:Text Body” if in chapter. Or, as I desire :MyTemplate:Text Body"

The idea of ajlittoz using meta data, and make it visible with a specific style, does appeal to me. And I do agree, all thought it is hard to implement that for me, on this moment.

Using the Style Inspector gives me very much information. But not sufficient. I select all text and open the Style Inspector. I see, I use by mistake once “Character Direct Formatting”. That should be replaced by a style. How can I find the position in the text where this is used?

If such a function would exist, it would be very easy to find styling error’s in a long document.

Is er such a function in LO Writer? Or is there an alternative for easily check, what is the cause of a specific style?

How to apply styling:

Professional text composition with Writer

Boundary conditions for a Master document:

Master documents in Writer

@Hrbrgr This is a link to general styling. Not a specific answer to my question.

Yes, that’s why I wrote a comment and not an answer. The link will take you to basic rules.

If this is too much information for you at once, I can delete my comment again, no problem.

IMHO, style usage is not well described in LO documentation, notably for Writer. Styles end up in visual appearance for the document, but this is not the primary purpose.

Styles confer meta-information to your text. You, as an author, make explicit the significance of what you write. Styles are THE means to declare what a paragraph, a word, an object is in the semantics of the document.

For paragraph, you tell this is title, heading, note, comment, quotation, list item or just your discourse. You add a difference over words in paragraphs with a character style like emphasis, irony, slang, foreign word, trade mark, computer jargon, … Similarly, pages can be classified as cover, legalese, chapter first and running pages, separator, … The same can be done for frames: image, formula, margin note, …

Only tables can’t be so tagged today (so-called “table styles” are not styles in traditional Writer way but set of macros taking over all your formatting).

Please note that in my description I didn’t use words like font face, size, colour, margins, indents, spacing, … My Styling point of view is totally independent from the appearance. You create styles as required by the semantic nuances you want to be translated into your work. As a consequence, this forbids direct formatting, i.e. “hard-coding” formatting your text because this is done outside styling.

Why is this kind styling so important? It completely separates contents from appearance. When your document is semantically styled, you can change its appearance reliably and predictably by tuning the styles and only the styles without the need to hunt for the formatting inside the text. Everything is under control. You can even design two different formatting aspects (say for paper edition and e-book release) by simply substituting templates containing different definitions of the style.

So when you’re in the writing phase, don’t care for the visual aspect (just have style state so that writing is nice and comfortable) but define the correct (for your purpose) set of styles you need, not too scarce, not too numerous.

Tune your styles in an optimising phase. But beware!

From your question, you seem to store your styles in a template file. This is the good track to follow to guarantee all your files will share the same look’n’feel. There are however a few pitfalls.

  • the link to formatting is made through the style name
    Pay special attention to typing errors when you override styles otherwise you create new styles
  • you can override styles
    In a document, when you modify a style, this modified definition will take precedence over the template definition. If you’re not aware you made a modification, you won’t understand why the look of a paragraph (or other object) is different from what is specified in the template
  • specific issues with master and subdocuments
    Here, you play with 3 files: template, master and subdocument. I assume you are careful enough to base the master and subdoc on the same template otherwise the case becomes unmanageable.
    The final document will be produced from template+master. The previous remark about overriding is still valid, caution then to avoid unexpected situation.
    Text from the subdoc is “imported” into the master but the styles of the master are used, not those from the subdoc. So if you modifed them in the subdoc, the changes are not forwarded to the master. Don’t be surprised, this is a general rule.

Last, you ask about a way to have a feedback on your style.

As a first approach to see what’s going on, enable View>Formatting Marks and other visual clues. This will give you a quick glance on your real document content, notably empty paragraph which should not exist in fully styled documents (vertical spacing is part of a paragraph definition).

Always have the style side pane visible (F11 or Stymes>Manage Styles). The style in effect at the position of the cursor is highlighted. Click on the toolbar icon to see the paragraph, character, frame, page or list style in its turn.

There is also now a style inspector activated by the bottommost icon in the right column of the style pane (same icon as for selecting styles with a magnifying glass). What is your concern is given by Paragraph/Character Direct Formatting.

2 Likes

You suggestions are valuable, and the Style Inspector is valuable. I change my question with your info. I want to work as you describe with your last point. I would like to find, Direct Formatting, and replace that with a style. This issue finding where direct formatting occur in my text.
Manual a selected each paragraph, and checked the result in the Style Inspector. Some paragraph has as “Character Direct Formatting” List Id with as value the word “list” and a large number. I can not remove this direct formatting with “Ctrl + m” It seems to be assigned to “Heading 4”. If I change style “Heading 4” to “Text Body” it disappears. This is the case for any heading. I thought direct formatting was not assigned to a style.

The style inspector is still imperfect. It is unable to see that a list style has been attached to a paragraph and reports it as direct formatting. In the case of numbered paragraphs (either list or chapter numbering), don’t trust this part of the style inspector.

The style inspector will tell you if paragraph and character direct formatting have bee applied to the current selection. Unfortunately I know of no trick to navigate from direct formatting to direct formatting.

I suggest you work paragraph per paragraph. This will be long in a long document but anyway you must proofread it carefully, so you can work both aspects. Select the whole paragraph and Ctrl+M. If something changes, then you have direct formatting. Apply the desired paragraph style for global attributes and character styles on offending words.

For bullet or numbered lists, there are two philosophies:

  • apply bullet or number with a toolbar button on the paragraph with is otherwise styled with one of your paragraph styles
  • create a dedicated paragraph style associated with a list style for the list items

I personally prefer the second one because the first one is akin to direct formatting and prevents you from centralised tuning of your lists. In addition a paragraph style is then used in two contexts: standard usage and list usage, which contradicts the “purity” of semantic marking. With the second approach, you can make a difference between various lists (lists can be dedicated to describe steps in a procedure, enumeration of ingredients in a recipe, legal numbering, …). Then you can tune the list appearance separately for each category and your changes will apply globally, which you can’t with the first approach.

@ajlittoz all thought not the solution I hoped for, it is the best I can get on the moment. And what is very valuable to me, I do not need to search any further. Working paragraph by paragraph is time consuming, but I feel it is required. When doing so I follow your suggestion with a more semantic approach. So thanks ajlittoz