A question about direct versus indirect formatting

Please can someone explain to me why, when using LO we should use indirect formatting and what the effect is on a published document if you do not. (Any document.) Is this just a thing for LO or is it true in any Word Processor and exactly what is and what is not?

For example, does ctrl H1 result in direct or indirect formatting? (I know not to use the toolbar.)

Is using a toolbar that says it is a formatting toolbar direct or indirect formatting?

I understand it is better to use styles, paragraph and character formatting but have never seen the why of it and would like to know. Just knowing it is better is not enough. I want to know why.

What I guess I want is a kind of list of this is and this is not OK and this is why it is not Ok (Which I hope means this is one question and not a series of them.)

I know others would answer better and more completely; I only want to emphasize one conceptual thing here.

When you use direct formatting, you make “this part of text have font size X, font weight Y, indent from left Z, font name foo, spacing from top K, …”. When you use styles, instead of the above, you tell “this is Heading 1”.

So what is the difference here? Isn’t the latter just a packed former, a shortcut to applying all the formatting? One might see no difference: applying Heading 1, the part of text actually gets font size X, font weight Y, … and all the other stuff. Right? Yes, but there’s one little thing the part of test also gets, which doesn’t happen in the direct formatting case: it gets the assigned style name.

What does that mean for user? It makes a paradigm shift. To use styles, user needs to stop thinking in terms of formatting artifacts (weight, size, indent, etc.), but in terms of document structure: “heading”, “citation”, “emphasis”, … - the higher-level concepts which actually form the document. But why is that better?

Let’s say you have prepared a document using direct formatting (i.e., you didn’t use styles, but always applied char properties and paragraph properties ad-hoc). Now you decide that what heading looks like in your document should change: let’s just increase paragraph indentation. How to proceed?

You may start looking through your document looking for the parts looking like your “headings”, and applying new formatting one-by-one. That is what most users in fact do. Is that an effective way of doing things?

Or you may try using Find&Replace tool - looking for the attributes you know your “headings” use, making changes automated way. It’s great, isn’t it? But are you certain that no part of the document but headings has that formatting? and are you certain that all “headings” actually have that formatting, and you didn’t make a mistake? In fact, many users drag indent handles on ruler to adjust paragraph indentation - or even use tabs or spaces for that task; they add empty paragraphs to control spacing before and after; they set font size to values they “remember”… and it’s common to see that different headings of the same level throughout a document in fact are slightly different. Or one could incidentally use the same formatting for “citation” as for “emphasis” - and now decide to make them look different, and needs to tell one kind from the other…

Assigning styles adds high-level concepts to text parts as “tags” (style names), allowing one to use any concepts one feels comfortable with - or allowing to use a pre-defined set of styles, still working on a much, much more high level than those direct formatting things that users initially think would be easier to use. In any document longer than half-page, thinking in terms of document structure pays off, allowing one to create better-looking, manageable documents in shorter time. And it allows to start thinking about document creation in higher-level terms, changing thought process in more natural, human fashion. And editing of document formatting then changes from “read through the document, manually finding something and applying something else” into much more natural “Let’s make citations look this way” (here one simply opens the style in style manager, changes its properties, and - voila - everything in the document looks as intended).

But if one uses direct formatting in addition to styles, that still may create problems. Direct formatting has higher priority; so if a part of text has “citation” style applied, and then “bold” direct formatting, then any modifications to “citation” style’s font weight would not be reflected in that specific part of text.

There are more considerations here: achieving consistency across multiple documents one creates, or different users (e.g. in an organization) create (using styled templates); managing complex documents (using master documents); merging of data taken from different documents copying into main document; … and in every case, consistent use of styles allows to create more robust, more predictable, and more effective workflow.

By the way, I suppose that by “ctrl H1”, you meant the Ctrl+1 shortcut applying Heading 1, which isn’t direct formatting, but great example of proper style application (in case, of course, if one applies that to actually mark heading of level one, not just to “format” a paragraph visually to what one thinks looks OK-ish, but not actually heading).

Thank you so much for this. I trawled the Internet for an explanation and got nowhere. You should make this some kind of sticky. I am sure a lot of people would find it useful. I found it very helpful and it answers what i wanted to know.

The LibreOffice documentation provides a wealth of information. I would recommend that if you are interested in using Writer you should download a copy of the Writer Guide. Chapters 4 (Formatting Text) and Chapter 5 (Formatting Pages:Basics) are a good introduction to Styles and may answer a number of questions you have not asked. Writer Guides | LibreOffice Documentation - Your documentation for LibreOffice

I once, a very long time ago heard one of the original designers of the Markup Language give a simple example. “Direct Formatting is what the typist types, Markup (Styles) is what the author dictates to the secretary, it separates the content from the formatting logic”.