Style applies only to alternating paragraphs, what's going on?

Using LibreOffice 6.4.4.2 on Ubuntu 20.04LTS (Lubuntu, actually) and have a strange thing happening. I have set my "Default Style" to 9pt font size and thought that this would -- throughout the book (I'm formatting a book) -- switch things out to 9pt. (It was 11pt.)

Instead, some places are showing up as 9pt, others the previous default of 11pt.

Weirder, when I highlight a section that I want to be Default Style and click "Apply" it only changes alternating paragraphs...not the whole section that's highlighted.

To explain further as some people think I'm just mixing up direct and style formattings:

No, to my knowledge, I am NOT using direct formatting.

I have a number of styles set up that initially were for a book that was 6x9". Things like "Chapter Title" and "Default Style" and "Letter script" and "Copyright page" and so on.

The entire document was then swiped and formatted according to those various styles. Some were page styles, for instance, I don't want a page number to show on certain pages, but DO want it on others. Others were Paragraph styles.

The only direct formatting done was here and there to adjust kerning and scoot a word up to the previous line or extend it further, eliminating widows and orphans and such. But that was not adjusting of the style, and it wasn't every other paragraph.

Then, to do the version of the book that's 5.25x8" I was leaving the text as is, and just adjusting the fonts and such to fit a smaller page. Obviously, a title that looks great at 24pts for 6x9" looks too big for a 5.25x8" book.

When I got to the main text body, I noticed this weird thing happening with some paragraphs still retaining the old font-size. If I go to a page I can click into the paragraph and by double clicking, apply to ONLY SOME of the paragraphs, the Default Style. But only some. The ones that are frozen stay at 11pt until I either "Clear Direct Formatting" or manually switch it to 9pt.

I suspect, from looking at it, that somehow, buried in there, is a option that I perhaps used accidentally to (if this exists!!) switch automatically from one style to another at the end of a paragraph. I could see this being very useful if I were writing a screenplay, where I could start with the Character Name style, hit enter, and automatically shift to a "Action" style, then "Action" shifts automatically to "Dialog," each with different margin settings and so on. If so, if this option even exists, then perhaps that's what's happening -- there's some code there (that I can't see) that's saying "Switch to the old Default Style" and keeping the changes from happening.

Either that, or perhaps this is some weird artifact from it being saved in .doc form, as it was, at one point, in ...

edit retag close merge delete

Contrary to what you say, your sample file is plagued with direct formatting. Your only hope to restore some order in your document is to select the "odd" paragraphs and Ctrl+M them. After that, concentrate on their paragraph styles. Don't Format>Paragraph because this creates direct formatting. Right-click on style name in the side stylepane (F11) and Modify.

Your case is aggravated by conversion from .doc which created zillions of character and page styles. You'll have a hard time to adapt to your new page dimensions.

Also, drop the typewriter-era habit of double space after full-stop. I know this is taught and recommended in North America, but it disturbs the justify algorithm without really following the traditional typographic rule.

Incorporate vertical spacing into your paragraph style, such as ChapterTitle, instead of using empty paragraphs.

( 2020-08-04 08:07:49 +0200 )edit

@ajlittoz, thank you for the reply, and yes, I agree -- obviously the document is not what it should be. I'm just surprised/confused/wondering how all this direct formatting got in there when (really, I promise!) I did not introduce it manually by myself. I was, however, originally saving the manuscript in .doc format, so perhaps that's where the problem began.

In regards to your note about "Don't Format>Paragraph" how does one best adjust kerning and line-spacing on an individual page-by-page level? For example, to pull the orphan word "xyz" up one line so it's not by itself, I might need to adjust the char spacing -0.01, or -0.02, or even -0.04, to get it to shift up. To do that correctly, I would apply a different style (char style?) even for those sections? It would not apply to the whole paragraph, but ...(plus)

( 2020-08-04 15:45:19 +0200 )edit

If you're tinkering page-by-page, you're not on a document processing job but on a desktop publishing (DTP) one and Writer is not the adequate tool. However, you're writing a novel, i.e. you have a continuous data flow from start of chapter to end of chapter. Let Writer take care of this data flow and its page breaks by giving clear instructions.

First, use Text Body for your chapter content, otherwise adjustments you make on Default Style will have very adverse effects on the rest of the book.

In a book it is very important to have a consistent formatting: don't try to outwit Writer by tuning manually line spacing or global kerning. Even a distraught eye will see it.

Orphan & widow: modify the Text Flow tab of the style (Text Body recommended once again). Enable Orphan control and set how many lines you tolerate ...(more)

( 2020-08-04 15:59:24 +0200 )edit

Enable Widow control and set the minimum number of lines at top of next page. This may not do what you expect (i.e. shrink the spaces to stuff the extra word on the last line) because it will move the position of the page break earlier.

Rather than playing on line spacing (which affects readability and aesthetics), add some vertical spacing in Indents & Spacing. This will bring some "light" in your text. Don't use empty paragraphs for that. Playing with the setting, you can evaluate immediately the effect as it applies instantly to all so styled paragraphs.

Direct formatting is acceptable for "exceptional" events, e.g. an improvement in kerning for a letter pair in a title when the font does not render well. Don't do it systematically, otherwise you'll again bump into formatting hell.

( 2020-08-04 16:09:04 +0200 )edit

Greatly appreciate the continued workflow suggestions, @ajlittoz, and thank you for taking the time. I am not sure I would agree that Writer isn't sufficient for (some) desktop publishing -- I've used it successfully for personal projects and projects for others with a finished product that looks great. And the hardcover version of this current title is fine and was relatively painless to go from manuscript to formatted, publish-ready document.

It was only when I tried to then go from the existing hardcover to the paperback that problems showed up. Probably the best solution at this point is to just set up the templates for a paperback and remove all formatting from the hardcover and do it over. Not a huge issue, my reason for posting is mainly to understand what I've done wrong. I suspect the .doc format introduced hard-coded direct formatting that I never knew was there.

( 2020-08-04 16:23:17 +0200 )edit

Sort by » oldest newest most voted

Reading beyond the lines, I understand you're working in direct formatting mode instead of using consistently styles.

Writer formatting is built on a 3-layer model:

• paragraph style, to define "geometric" paragraph dimensions and paragraph-global typographic attributes
• character style, to "highlight" part of a paragraph
• direct formatting, to manually override

The attributes are set in this order. When you "apply", you act in the layer of what you apply without changing anything in the other layers.

Therefore, if you apply a paragraph style, it will be effective only on the areas not overridden par character styles or direct formatting. For character style, only where no direct formatting is in effect.

Modifying a paragraph style is the same as applying it: it works where it is not "hidden" by another layer.

The fact that your modification change only part of the selection is a clear indication that some sort of direct formatting (= manual formatting) is in effect.

Also Default Style paragraph style is very special: it is the common ancestor to all styles, which means any change will affect all other styles unless the changed attribute has been specifically overridden. Default Style sole purpose is to set defaults for the other styles. Consequently, contrary to M\$ Word, Default Style is not the standard style for typing. In LO Writer, the standard document style is Text Body, which you can freely modify to fit your taste and needs. If you do that on Default Style, you'll face unexpected results in your titles, headings, …

Clearing direct formatting to "unhide" the other layers is done with Ctrl+M or Format>Clear direct formatting on a selected range. Restoring paragraph style definition, i.e. clearing the manual override you introduced is more complicated.

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.

more

Thank you, it's tricky to navigate the various formatting/syntax needs of various forums. I deleted the "Answer" as you suggested.

I will clarify my original answer above as you suggest.

( 2020-08-03 21:07:43 +0200 )edit

What would be the proper way to adjust a word widow (lone word by itself at the end of a paragraph) using Styles? Is this going to be an adjustment done by direct formatting or would I create some kind of Style and apply it?

( 2020-08-05 03:43:14 +0200 )edit

If the single-word widow are quite numerous, try to "condense" by a moderate amount (~0.1pt) the paragraph style of the text (Position tab) taking care of not creating more problems than you solve. Alternatively, expanding by ~0.1pt could also provide a solution.

It the widows are rather rare, use Widow Control in the Text Flow tab. The single-word will remain alone on its line but the page break will be anticipated so that lines will be moved to next page next to the widow.

( 2020-08-05 08:09:56 +0200 )edit

The general procedures for formatting with styles must be followed.

Never use styles and direct formatting in a document.

You can read how styles are applied here:

https://wiki.documentfoundation.org/S...

And the corresponding video:

And the general documentation of LibreOffice:

https://documentation.libreoffice.org...

Then tell us, what's going on?

Alternatively, you can also post/upload your document here, so that someone can view it.

more

Thank you, @ebot, for the note, but I've been (correctly, I think!) using and applying styles for years. I certainly wasn't applying a direct format to every single alternating paragraph. Who has the time?

So something else is going on rather than simple user error. It may indeed BE user error (probably is!) but no, I've been doing the standard application of styles and been just fine for years.

The biggest surprise is that I haven't been able to just edit a style (already applied style) and click "Apply" and "OK" and be done. The whole point is to NOT have to edit the actual document directly...instead, you apply a Style and then make adjustments in the Style, with every spot in the document adjusting to match.

( 2020-08-03 21:01:32 +0200 )edit

(correctly, I think!)

@thesun, i don't think so.

( 2020-08-03 21:09:03 +0200 )edit

You are probably right! :-)

( 2020-08-03 21:34:54 +0200 )edit

And just to be clear, @ebot, yes, in one way you're right: I CAN highlight all, choose "Clear Direct Formatting" and all is good with the world. I do know how to do that. But that then requires me to redo the entire document, and my hope was to just edit the styles. (Since that's the whole point of Styles! They're wonderful! Just like CSS in a web page!)

So perhaps my question really is how did these direct formattings get introduced, so that in the future, I don't make a similar goof again. I know I did NOT highlight and direct format these sections one by one. Something else must have caused or created this. Like I said, it could certainly be user error, but it wasn't me actively changing these.

( 2020-08-03 21:43:44 +0200 )edit

Maybe it wasn't you.

As is so often the case, the problem arises at the source. And this is the blank document you use when you start writing.

You might want to create a separate or better several templates for writing books, which you need in your document. Don't use "standard", but derive new templates from it. (see also answer from @ajlittoz, he knows the topic very well and can describe it very well). When you have created all templates, you should save the still empty document as a document template.

They will not be spared to "clean" their document.

( 2020-08-04 10:17:18 +0200 )edit