We will be migrating from Ask to Discourse on the first week of August, read the details here

# Clear direct formatting ignores Character Styles [closed]

If I am using a paragraph style, then I format part of it with a character style to highlight it (same font and font size, but a different color with italics, for example), then I change the paragraph style, the character style portion of the text is unaffected.

Ideally, I think the paragraph attributes should be applied to the character style, when "Clear direct formatting" (Ctrl-M) is invoked. Or, all character formatting could be removed, and the raw paragraph style selected could be used.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2020-10-18 21:07:17.974100

The tool is not "Clear character formatting", but "Clear direct formatting", with "direct" opposed to "formatting with styles". As character styles are styles, the tool's behaviour is consistent.

( 2017-10-24 06:14:11 +0200 )edit

Sort by » oldest newest most voted

You must first understand how styles work.

Three layers are available and the shallower override the deeper.

The lowest level is paragraph style. As the name implies, you act on the layer by giving a style to a whole paragraph. You reset it by giving a "neutral" paragraph style, in principle Default Style, which, because of this usage, should never be modified or actively used in the document (unless you know what you're doing).

The second layer is character style. You act on this layer by giving a style to a selected range of characters. Contrary to more complex DTP programs like Quark XPress®, any character can receive only a single character style, the latest applied overriding the previous one. You reset the style to the paragraph style by applying character style Default Style.

This latter style is not a real style. You can't modify it. Its sole purpose is to remove any character style.

The top layer is direct formatting. You set attributes with the buttons in the toolbar(s) or their shortcut equivalent. They are erased with Format->Clear Direct Formatting or Ctrl+M.

I suspect this third layer was provided to avoid the burden of setting up a consistent set of styles for short one-shot documents and maybe also for "compatibility" (i.e. not upsetting users even if it is "wrong") with other text processors.

Every layer is independent from each other. Resetting one does not reset the others.

1. Select the paragraph content (e.g. quadruple click)
2. Apply character style Default Style

If this answer helped you, please accept it by clicking the check mark ✔ to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

more

Voila! THANK YOU!

( 2017-10-24 09:24:17 +0200 )edit

This is a great explanation of a positively terrible implementation of styles in LibreOffice. LO devs take note: if the paragraph style contains custom font formatting,

• it makes zero sense to force users to find a separate character style setting that isn't linked in the paragraph style dialog, and
• know to switch the character style to a special default paragraph style setting
• particularly when the special setting doesn't even accurately describe what the user is doing if they are working with a custom style (rather than a default one).

This is completely different from the way styles work in Word, and it is a serious barrier to adoption of LO.

( 2019-09-01 18:18:36 +0200 )edit

@doug: I think M$Word implementation is wrong because it lacks the character style layer, forcing user to heavily use direct formatting. Implementation with the styles layers is cleaner and much more maintenance-friendly. IMHO, to get more versatility (and "purity"), the character style layer should not be limited to a single style (but that opens the door to many problems). I don't understand "to find a separate character style setting that isn't linked in the paragraph style dialog*: paragraph and character styles are independent for each other and this is the source of power. Linking character style to para style would defeat the freedom to apply a semantically meaningful style [name] anywhere. Also, working with custom styles is the normal way for an author. Built-in styles are only there to suggest a structure when starting with LO Writer. They are not sacred and can be customised at will ...(more) ( 2019-09-01 18:54:26 +0200 )edit @ajlittoz Yes, I am seeing there are benefits to the LO styles implementation. The confusing thing here is that the character style setting of default paragraph style is not the default setting for character style. This steepens the learning curve, especially for crossover M$ Word users, who then need to come to this website to see what is going on.

I would propose to improve the functionality by eliminating font controls in the paragraph styles dialogs and instead introducing an option to link a paragraph style to a character style. That would would retain all the current functionality but make it more obvious to a non-power user that the real character-level formatting action is in character styles not paragraph styles. That visibility would be in the options for paragraph styles, not a separate and independent set of option dialogs.

( 2019-09-01 22:47:16 +0200 )edit

I see what you mean. I remember when switching to Writer being confused by the duality between paragraph/character styles. But this is the source of power. If your proposal were implemented, you would need to define all attributes in the character style because applying one in the middle of a paragraph would replace the default. Presently, you only set the overriding attributes; the others are in a "transparent" state, taking the default values in the para style. Keeping the current behaviour can be done only by allowing several char styles to be simultaneously active, which is not (yet?) possible and causes many problems.

Note also that para styles are organised in a tree-like structure, allowing to manage easily doc appearance from a handful of "critical" styles. In your proposal, you'd have two hierarchies: one for lay-out (para), one for type (char). I do use the char structuring but ...(more)

( 2019-09-02 10:33:48 +0200 )edit

Also, the Default Style para style is not a real style: you can't change it. It is in fact a substitute for a "Reset" button, erasing all added character style(s). I agree this is confusing to beginners.

What I miss most is a "toggle" state for attributes where this is relevant (e.g. italics for fonts with a single slant angle, or bold when there are only 2 variants). According to ODF standard, char styles can inherit only from other char styles (the tree-structure previously mentioned); however, they are applied against para styles. A toggle attribute is significant only as a dynamic state (thus applied to the current para style). Think of italics in typographical rules: highlighted word is italics in Roman para, Roman in italics para. You can't presently specify this formatting: it must be done manually by selecting an appropriate char style. Change the para ...(more)

( 2019-09-02 10:41:34 +0200 )edit

Also, the Default Style para style

I assume that para was an affix meaning "near", and it was about character style, not a paragraph style (which is a proper style, available for modifications).

Wanted to mention that there are more layers between paragraph style and character style: they are: paragraph-level direct formatting (right above paragraph style); numbering style; numbering direct formatting. The topmost direct formatting is character-related.

( 2019-11-23 10:09:27 +0200 )edit

As Mike Kaganski says, it is intended behavior. If you deem it illogical, feel free to file a bug report/RFE. If you want to remove style-based character formatting, right click → Styles → Default Character.

more

1

Bug reports already have been discussed and closed.
Different would be a report (RFE) for an extra feature/shortcut. (Well, that may exist too)
I've linked Ctrl+Shift+0 to the character style Default to do fast changes.

( 2017-10-24 08:18:10 +0200 )edit