Understanding styles for writer 7.0

I have read 21975/modifying-paragraph-style-doesnt-change-paragraph-appearance and 24265/i-dont-understand-how-formatting-works but I am still confused.

As far as I understand now, and please correct me if I am wrong, is a style part of a document. Two different documents can have the same style name, but behave different.

A style can be set with F11 and modified. New items will follow that style, existing not. Which is very confusing and not desired. Local modification are on top of the style, which is logical. And this can be removed with Menu → Format -Clear Direct Formatting or Ctrl-m

So there is a hierarchy in styles. My question are:

  • Is my understanding of style correct?
  • Can this hierarchy be shown in the document so undesired styling can be found and solved?
  • If in a large document I want to change a style, is there a way to enforce this on text existing same style? If so how?

If the last option is not possible, than what is the value of styles anyway.

(links formatted by ajlittoz to make them clearer)

REQUEST: when you edit a question, make explicit what you change. I assume here you only added the links, but I may be wrong because they are at top of question.

That is a huge question, I suggest you read Designing with LibreOffice which covers styles in great detail as well as explaining why they are essential for easy work flow.

The styles belong to the document, not to some amorphous normal template. Probably best not think Writer is the same as Word, it isn’t. If you modify an existing paragraph style and some text does not change, then there could be a character style taking precedence, or direct formatting which takes precedence over even character formatting but in reality just creates a random mess.

A style inspector is in LibreOffice 7.1 but I would wait until it becomes the Still Branch before using it for proper work. In the meantime you can filter in the sidepane to show just the styles in the current document.

As for your last question, changing a style is a matter of a few seconds to change every instance in a large document. It is rather the point of styles.

@EarnestAl You refer to a huge book, almost 500 pages, which is a lot of reading but might be useful. About my last question I do agree that is the way it should work. But not for me. I change the style but in the document there is no change.
I used the page Footer right (and left). First I cleared all possible local formatting with selecting the page number and press Ctrl-m. Then I change the Right Footer style from alignment right to alignment center. The change is accepted but then the document footer the page number is still on the right.

… Then I change the Right Footer style from alignment right to alignment center. The change is accepted but then the document footer the page number is still on the right.

I guess that the original page number positioning may have been done by way of tab stops. In header and footer, there are commonly two predefined tab stops, one centered in the middle and one right aligned on the right margin. Just move the cursor to the left of the page number field and press backspace to remove one tab skip. This should put the page number centered on the middle tab stop.

… and enable formatting marks to see if that was indeed tab stops inserted. IMO, if that is the case, you should not change style alignment, but instead need to use the pre-defined useful tab stops wisely.

I used toggle Marks and indeed I could see the tab-stops. I could manually remove them and now they are indeed in the middle. Thanks.
This works for a few pages. Than I use a page break, and the next page does not have a footer content. It has a “First page Footer” although it is not the first page. And I can not find a style named “First Page Footer” I could add a new footer but I want the same footer for the whole document.

… a huge book, almost 500 pages, which is a lot of reading …

@ajlittoz’ answer serves to give you an outline of the styles system. The book is a rather comprehensive textbook, with a nice ToC (unusual ToC design, but oh, well … tastes differ…).

Based on (and hopefully motivated by) that answer, you may find your own way “learning by doing”, experimenting with styles and use the book as a reference when needed, or just ask here.

Thanks for your long explanation. And i am starting reading the long but good manual to styles. I know the importance of style and the risk of direct formatting. But I am just a human. I do make mistakes. So a part of the text does not look to what I expected. You showed the hierarchy, which is important. It could be I think I only have the style paragraph, but still there is direct formatting on top. So a change in the paragraph will have no effect. That is logical but very confusing. I think the style inspector in version 7.1 might help. Than you can see immediately why the expected change does not occur, and solve it. The tri-state you mentioned is also logical but then a checkbox is not anymore. A checkbox does only have two states. How can I set a checkbox back to transparent, to non-set?

The tri-state you mentioned is also logical but then a checkbox is not anymore. A checkbox does only have two states.

Direct formatting is intentionally designed simple. It is not intended for advanced use, but for users who do not care about hierarchies et all. The idea is: on that level, user only uses tools to create some visual effects. That user might of course use advanced tools like styles, but doing that, they only use its visual effect. Or users might get the advanced formatting from a third party. So for those simple use case, when the user might be confused by all those complexity and seeming inconsistency of advanced tools, there is a set of simple tools, each of those working like a “paint” that just masks everything beneath it, without any mercy, so user can use those paints, hide whatever was there, and start atop. No tri-states, no complexity. If you care about those things, Ctrl+M is your friend :slight_smile:

Ctrl+ M is valuable indeed. For me there is no discussion if stylesheets are a good concept. They are. Especially for consistency in large and complex documents. Now I am reading the manual of Bruce Byfield which is good. Unfortunately it is 4 years old so it differ a bit from version 7.0

The links reference two different aspects (if the links were really the modifications in the question).

Question 21975 illustrate the mask effect of direct formatting over styles. Whenever you use the toolbar buttons, menu commands or their keyboard shortcuts, you “obliterate” the corresponding attributes in the styles. Changing these in the styles will have no effect until direct formatting is cleared.

Question 24265 is about TOC formatting. A TOC is a piece of data generated by Writer based on document outline. Styles are automatically assigned during the process. To change the appearance of the TOC, you don’t apply new styles to the entries, you customise the dedicated styles, i.e. the Contents n family by default where the “n” corresponds to Heading n for the headings.

To make it short, I will address only a few points. As you can guess, style “philosophy” is the corner-stone of Writer. Styles are ubiquitous, contrary to M$ Word which knows only of paragraph styles. Styles are sorted first by category: paragraph, character, frame, page and list (very badly named because they don’t define lists but the a sequence counter which can be associated to lists but also to other objects). I rule out what is presented as “table style” because they are presently not “regular” styles but a collection of macros.

IMHO, other categories could be added, at least for sections and a good design for tables.

For ordinary text formatting, you play with paragraph, character and direct-formatting. Frame and page styles define general geometric aspects of the document. As already mentioned “list” styles are additional attributes which can modify paragraph styles and confer them special properties/behaviour.

Direct formatting is what former Word users like to call “intuitive formatting” because there are buttons and keyboard shortcuts for bold, italics, underline, alignment, font size increase/decrease, … A synonym could be manual formatting. CAUTION! direct formatting is the root of all evil and should be avoided as much as possible. It will always play nasty tricks on your back when you try to polish your document layout.

##Styles hierarchy

When it comes to text formatting, your tools are paragraph and character styles plus direct formatting. This how they interact. Consider formatting is a collection of layers above your text to set typographical and geometric attributes.

###Category precedence

  1. the deepest layer is paragraph style
  2. above it, the character style layer
  3. atop of both, the direct formatting layer
  4. exceptionally, an internally-generated layer controlled by specialised character styles (you can ignore this layer in the majority of cases)

When the same attribute is defined in several layers, what you see is the application of the value in the highest level. A non-set attribute is “transparent”. A set attribute hides the same in deeper layers.

WARNING! A “non-set” attribute is not the same as forcing it to unset state. This means that attributes defined by a checkbox are in fact tri-state: non-set, i.e. transparent, enabled and disabled. This distinction is very important when you play smart tricks with the hierarchies.

###Dependency within category

To facilitate managing a collection of styles for sophisticated documents, paragraph and character styles can be structured in a tree-like organisation. This is particular useful when sets of styles are specifically targeted towards specific usages. For example, the Heading n family is intended for chapter headings and Text Body and acquaintances for the main discourse. The styles are then associated with an ancestor and will inherit initially all their attributes from the ancestor (e.g. the font face for this subset). The styles need then override only divergent attributes so that a change in the ancestor also propagate to non-overridden attributes.

##Workflow

Writer is style-driven so that you separate content from appearance. To succeed you must stop of thinking of your text in terms of typographical attributes. Because these attributes are rather limited in numbers, italics may mean different things: it could be an emphasis about a point in your discourse (understatement, irony, relevance, …) or the application of a conventional rule (foreign words are frequently rendered italics).

To give you maximum versatility and liberty in formatting, you should use styles to mark the significance of your text instead of its shape. Since you can create as many styles as you need, you can convey all the semantic nuances in the markup.

Note as an example that you have no “bold” or “italics” built-in character styles. Instead, you find Emphasis and Strong Emphasis and you are free to make them look anyway you like (e.g. blue and red instead of traditional italic and bold).

Avoid direct-formatting because it is not attached to any named style (whether paragraph or character).

##Formatting step

Your whole document can be typed without caring for its final aspect as long as you style it adequately.

When you arrive at the proof-reading and formatting tuning, you only adjust the styles.

If there is no direct formatting, any changed is immediately reflected in the document. Contrary to what you state, a change in style applies to any occurrence of text, past and future. But, once again, providing you didn’t use direct-formatting. I know it is tempting to use it because you immediately see the result but you penalise yourself by cutting out the style powerful versatility.

##Templates

It takes many trials and errors before you achieve a satisfactory collection of styles. Usually you have a preferred look and feel for your documents and you will repeatedly format them the same. Then you can save all your custom-tuned styles in a document called a template. Save it so and next File>New>Templates to choose the template for a new document.

If you have a single template, configure it the default template to make your life easier.

CAUTION! If you are under Window$, never create a new Writer document from the file explorer. Windows wants to outsmart LO and the new document will never reference your template. Always open Writer first to create a new templated document.

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 which is reserved for solutions) or comment the relevant answer.