Ask Your Question
1

Clear direct formatting ignores Character Styles

asked 2017-10-24 00:55:35 +0200

LunixTheFirst gravatar image

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 flag offensive close merge delete

Comments

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.

Mike Kaganski gravatar imageMike Kaganski ( 2017-10-24 06:14:11 +0200 )edit

2 Answers

Sort by » oldest newest most voted
4

answered 2017-10-24 08:18:34 +0200

ajlittoz gravatar image

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.

To answer your question about resetting character style:

  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.

edit flag offensive delete link more

Comments

Voila! THANK YOU!

LunixTheFirst gravatar imageLunixTheFirst ( 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.

doug gravatar imagedoug ( 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)

ajlittoz gravatar imageajlittoz ( 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.

doug gravatar imagedoug ( 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)

ajlittoz gravatar imageajlittoz ( 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)

ajlittoz gravatar imageajlittoz ( 2019-09-02 10:41:34 +0200 )edit
0

answered 2017-10-24 08:04:00 +0200

gabix gravatar image

updated 2017-10-24 08:04:57 +0200

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.

edit flag offensive delete link more

Comments

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.

cornouws gravatar imagecornouws ( 2017-10-24 08:18:10 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-10-24 00:55:35 +0200

Seen: 2,328 times

Last updated: Oct 24 '17