Ask Your Question
0

Why doesn't applying a style apply all aspects of it?

asked 2021-03-01 20:33:24 +0200

MisterVargas gravatar image

updated 2021-03-01 20:33:39 +0200

Hi all.

I pasted some text into a Writer document and applied the default "Title" style to it with the drop-down list in the toolbar. But several characteristics of that style weren't applied, notably font size.

I assume this is because the text was styled in the source I copied it from, but styles are supposed to be a quick way to apply a complete set of desired traits. I can't find any preference for enforcing this behavior.

What gives?

Thanks!

edit retag flag offensive close merge delete

Comments

It could be because your text or heading contains direct formatting.

Select the text and press Ctrl+M.


Another possibility is that the text contains character formatting.

Select the text and double-click on the Default character style.


I pasted some text into a Writer document...

Don't use text that is preformatted.

ebot gravatar imageebot ( 2021-03-01 20:48:38 +0200 )edit

Is the source from which you copied the text also Write?

Astur gravatar imageAstur ( 2021-03-01 20:57:40 +0200 )edit

Thanks for the replies. The source was not Write; it was probably a Web page.

"Don't use text that is preformatted."

You're kidding, right? What's your suggested workflow, then?

  1. Copy text
  2. Launch some other application that only handles unformatted text
  3. Paste text into that app
  4. Select all the text and copy it
  5. Paste into Writer

Or something else?

MisterVargas gravatar imageMisterVargas ( 2021-03-17 05:59:34 +0200 )edit
ebot gravatar imageebot ( 2021-03-17 06:52:04 +0200 )edit

Maybe, thanks! I hope that offers "Match destination formatting" or some such thing. I don't think I like the inability of a style to override "direct formatting." That undermines the use of styles and encourages ad-hoc formatting. What compounds this issue is that "Clear direct formatting" is always enabled. Once you clear it, it should be disabled so you know that there's none in effect.

MisterVargas gravatar imageMisterVargas ( 2021-03-17 10:37:22 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2021-03-01 20:54:48 +0200

ajlittoz gravatar image

You didn't describe the source of the pasted block. I'll assume it comes from another Writer document.

When you copy a block in Writer, everything is transfered to the clipboard: text and metadata associated with it, i.e. styles and other formatting.

Everything again is pasted by default (unless you Edit>Paste Special to choose which data will be pasted). This means you also paste the metadata.

When you select a paragraph style from the toolbar menu, you effectively assign this style to the paragraph or selected block. But you must be aware that this changes only the paragraph layer. Styles in Writer are organised in layers:

  • paragraph style
  • character style
  • direct formatting

Set (or "forced") character style attributes override the corresponding ones in paragraph style. Direct formatting attributes override both those in character and paragraph layers.

If the copied source block has direct formatting in it (e.g. you used Ctrl+B to embolden some characters or the toolbar menu to change font size), this direct formatting is kept in its overriding layer, preventing the paragraph style attributes to surface.

You can tell this is what happened by selecting the pasted block and Ctrl+M or Format>Clear Direct Formatting to erase the DF layer.

If you want to try a "professional" approach to document formatting, never direct format. Use styles instead. You can do much better and more versatile with them than direct formatting. Read the Writer Guide for an introduction to styling.

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.

edit flag offensive delete link more

Comments

In addition to @ajlittoz:


Professional work in Writer


@ajlittoz:

I took the liberty of using some parts of your answer in the description on the TDF Wiki. There, at the bottom of the source reference, this question is linked here.

ebot gravatar imageebot ( 2021-03-04 14:38:07 +0200 )edit

@ebot: please do, everything on this site is public (CC-BY-SA) [and my ego is proud to be quoted]

My only disagreement with the Wiki article is about "Do not change any of the existing default styles". Built-in styles have usually a good "high level" name indicating the intended purpose of the style. Too often, users name their styles like "double-space indented bold" which is bad. A better name would be "important remark". That is, a style name should insist on the semantic value of the paragraph, character sequence, page, frame, list. Since built-in names are quite good, I customise Text Body or Heading n and I keep in line with Writer philosophy. Of course, if I need a variant, in the same document, I would derive a custom style from the built-in.

I would have put apart table "styles" because they aren't styles like the others: there is no ...(more)

ajlittoz gravatar imageajlittoz ( 2021-03-04 16:19:23 +0200 )edit

@ajlittoz:

please do, everything on this site is public (CC-BY-SA)

Yes, I am aware of that. It should not stop you from informing the author, if possible.


My only disagreement with the Wiki article is about "Do not change any of the existing default styles".

I hope it is a misunderstanding.

I am referring to the styles that have the name "Standard". Not e.g. text body.

I'll have another look at it on the wiki.


I would have put apart table "styles" because they aren't styles like the others...

Yes, actually I know that the table styles are only a view of the auto-format templates.

See: https://wiki.documentfoundation.org/V...

I will remove it from the wiki. Thank you very much.

ebot gravatar imageebot ( 2021-03-04 16:42:22 +0200 )edit

@ebot: it was a misunderstanding. But you should state this with emphasis, telling that Default Paragraph Style has special purpose as common ancestor to all other styles (though I don't hesitate to customise it but I know and expect the consequences). Default Character Style is a "fake" style: you can't change it in any way. It simply removes any other applied character style. Default Page Style has nothing special because page styles can't be organised hierarchically and this is a real shortcoming. Frames and lists have no default.

ajlittoz gravatar imageajlittoz ( 2021-03-04 17:10:52 +0200 )edit

But you should state this with emphasis, telling that Default Paragraph Style has special purpose as common ancestor to all other styles...

Thank you @ajlittoz for your commitment.


You are of course right in what you say. I will adapt the text in the wiki and probably refer more to the paragraph template.

ebot gravatar imageebot ( 2021-03-04 17:45:59 +0200 )edit
ebot gravatar imageebot ( 2021-03-05 09:05:39 +0200 )edit

Thanks for that thorough reply. It was not from Writer. It was probably from a Web site.

And I almost never use "direct formatting." I'm a huge adherent to styles, since Word for Windows 1.1.

MisterVargas gravatar imageMisterVargas ( 2021-03-17 06:00:30 +0200 )edit

Beware that Word knows only of paragraph styles which leads to neglect other styles categories and use direct formatting instead for them.

ajlittoz gravatar imageajlittoz ( 2021-03-17 07:50:34 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-03-01 20:33:24 +0200

Seen: 39 times

Last updated: Mar 01