Bug in STYLES for Writer?

I have several long documents (100-200 pages), type cook book, or recipe book.

For make-up of text I use 4 rather simple styles.

THE PROBLEM
After saving a document, closing Writer and then re-opening the document, the make-up of one of the styles has changed.
In one of the styles a tab or indent is inserted every time.

If desired I can share the document.

Anyone can help??
Thanks in advance.

Hans

OS name, exact LO version, save format

Is there any direct formatting in your document, i.e. any formatting not controlled by styles? Like action on the ruler with the mouse, pressing keyboard shortcuts or toolbar buttons?

Please share a reduced version of your document (5-page max.)

Windows 11
LibreOffice Writer 25.2.4.3
Build 33e196637044ead23f5c3226cde09b47731f7e27

I don’t know hoe to attach a file.
Link to external file on Mediafire
https://www.mediafire.com/file/q17qqtvlmsy5roj/ABC+Soepen+short+version.docx/file
[ABC Soepen short version.docx|attachment

Which style has spurious indent?

Your document is a DOCX one. Consequently it needs conversion on load and again on save. Use of non-native format can’t guarantee formatting stability. Your document is already polluted probably beyond repair (presence of numerous character styles ListLabel 9 and list styles WWNum9.

And you overuse direct formatting (inconsistent empty paragraphs to achieve vertical spacing among others).

Thank you for the fast answer.

I have never used styles like ListLabel0 or WWNum9.
No idea how these can appear in the document.

QUOTE
And you overuse direct formatting (inconsistent empty paragraphs to achieve vertical spacing among others).
ENDQUOTE

I have not the faintest idea what this means…

Let me explain what I have done to try and solve the problem.
I select large parts of the document, then click CLEAR FORMATTING in the style dropdown menu, then re-apply the style I want. Generally that’s INGREDIENTEN, then I apply again one of the HEADING styles for every recipe or section.

Not sure if this helps.

QUESTION
To solve the problem once and for all, would the following be a good idea?

  • start a new document and re-make the styles I use
  • copy the old text and paste it with SHIFT-CTRL-X - and choose UNFORMATTDE TEXT
  • then apply styles again
    (maybe even copying it twice - first to Notepad then to Writer)

??

These come from the conversion to and from DOCX because this format is badly designed (personal opinion) with less theoretical and abstract support in its specification.

The primary flaw is your choice to save .docx. I suppose this is a personal document. Then save it native, i.e. .odt. If you ever need to send it to someone else, M$ Word has claimed for more than a decade that it can read and process ODF files. Eventually, you can convert it to .docx or export to PDF. But, never never never work on .docx. Compatibility is never 100%. Working DOCX with Writer requires expert skills to be able to predict final formatting.

Direct formatting is everything which do not come from style. For instance your bold or colour are done with Ctl+B or toolbar button. Unfortunately, DOCX does not support such formatting with styles.

You vertical-space with empty paragraphs. Empty paragraphs contain no information. Consequently, there should be no such paragraphs in any document. Vertical spacing above and below in a paragraph are intrinsic properties associated with the significance of the paragraph. For example, headings are highlighted from narrative by having additional space above and below. These spacings are configured inside the paragraph style.

This style is not applied in the provided sample. All your ingredient lists are Default Paragraph Style with direct formatting.

By the way, Default Paragraph Style in Writer is the ultimate ancestor of all other paragraph styles. Whatever you configure there is forwarded to all others (until overridden). It is a conveninet style to define your default preferences, but don’t use it for your narrative. The standard Writer style for the discourse is Body Text.

Start with a new ODF blank document (extension .odt) otherwise you’ll still bump into these damned compatibility issues.

Or rather, I hould say, start by reading at least the Writer Guide to get an idea about the difference with Word.

Thanks again.

I’ll make a test doc from/in a new ODT file.
I have at least 6-7 of these recipe books, and I really don’t need the added chore of re-doing the makeup.

Thank you very much for your help!

Hans

Please note, that you still never explained, how one can see the problem: which paragraph changes when you do the steps you outlined, then save and reload.

That may be needed to be able to fix the problem.

I’m getting close…

  • I made a new ODT document
  • I copied the text of a few recipes to Notepad, then to the new file
  • I defined 4 styles from scratch,using the settings from the old document
  • When I save and re-open the document, it now looks the same
    ONE NEW PROBLEM
  • the tabs in the style INGREDIENTEN misbehave
  • they are defined at 2,50 cm, 3,50 and 4,50 cm
    BUT
  • in the document they appear at 2,50 cm, 5,00 cm and 6,00 cm

What am I doing wrong?

Thanks for any help you can give me.

Here’s the link to the new documentt with all 4 styles used.
https://www.mediafire.com/file/k7zsl6m34xdki4w/ABC+template+TEST.odt/file

They appear in fact at 5, 6 and 7cm, i.e. offset by 2.5cm. Looking at the ruler, I see you defined a hanging indent for ingredienten.

People don’t realise that tab distances in the paragraph configuration are relative to the left indent. This left indent is the origin of everything. Choosing such an origin allows to reconfigure the style without the need to change everything so that the layout is preserved.

You decided to indent your paragraph by 2.5cm, which means multi-line text will align on this 2.5 cm indent (aka. paragraph additional “margin”). First line is “negatively” indented to align with the left margin.

Now what are the tabs for? I assume is for quantity, unit and name of stuff.

You want the quantity to start at left indent, i.e. distance 0cm from this left indent, or in other words right on left indent. A 0 cm tab stop does not make sense. No need to set it, the left indent is itself a tab stop (this is largely underestimated).

Your other tab stops are indeed located at 1 cm and 2 cm (from left indent).

But, some of your “units” are “wide” words. So, the second stop should rather be 2.5 cm.

See ABC template TEST.odt (30.0 KB)

And you can even improve the look by defining a first right-aligned tab stop at 0.8 cm so that the quantity is flushed against the unit.

IMHO, I’d separate ingredient list from recipe by have two styles. Thus I could tune separately ingredient from “directives” and probably make it easier with the tabs.

ajlittoz,

Once again thank you very much for your great help.
Your revised template does exactly what I want. I willl guard it carefully, and use it as the base for my new cook books.

I will experiment with the right tab, it’s a good suggestion, Thanks.

There are 9 cook books in all, at least 1.500 pages I have to copy to the new template. Quite a task for someone with as little patience as me.

Have a nice day,

Hans