Invisible formatting messes up third party apps

In short, LO adds weird, invisible formatting to the text when I edit it. I don’t copy paste anything, only edit the text as one does, fixing typos, changing words, adding new text etc.

If only using LO this doesn’t seem to be a problem because the formatting is invisible, but as soon as you use some other software to access ODT files, things get very interesting.

What I know:

LO style inspector says nothing at all.

This is somehow an issue with direct formatting, even though no direct formatting has been used at any point. Still, clearing all direct formatting makes the issue go away. But this is just a workaround, not a solution.

I managed to tease out a visual representation of this with OmegaT, hope the screenshot helps make more sense to this.

There’s a tooltip visible in the OmegaT screenshot, it appears when hovering over f0. It’s similar for all instances, except in some cases it’s T3 or T4. It doesn’t seem to follow any logic, f0, f1 and f4 for example are all T2.

This does not seem to be an OmegaT issue, because it also happens when using Python odf-library. When reading an ODT file with odfpy for example, the words and letters, which OmegaT shows between tags, disappear completely.

OS: Win 11
LO: 7.6.7.2 & 24.8.3

omegat

Not a workaround, the intended way to use Writer. Direct formatting is provided as 1) a device for quick experimenting, 2) a tool to ease transition from Word workflow where you can’t do differently.
Direct formatting always results in formatting problems at later stages in document tuning.

That said, what are supposed to be your <fx> </fx>? Are they hints about formatting reported by OmegaT?

The <text:span text:style-name="T2"> is the XML markup for character formatting. “Tx” is the internal name of the corresponding character style. In the case of an explicit character style, the “Tx” record points to the definition of the style in the style dictionary (where you find its user-known name). In the case of direct formatting (DF), there is no pointer. Every occurrence of creates an anonymous “Tx” style, used once only, even if you have the exact same DF a few characters later. DF is very very inefficient and leads to document size inflation.

Another factor may cause independent “Tx” to be created: track changes and compare feature. They add “hints” about what has been edited, even if you don’t track anything (the information is nevertheless created in case you activate it later).

  • Track changes can be completely disabled by unticking Edit>Track Changes>Show
  • Comparison data is eliminated by unticking check boxes in Tools>Options, LibreOffice Writer>Comparison in section Random number to improve accuracy of document comparison.

Explain what you want to do on the ODF stream. ODF is complex. There is also what applications implement out of ODF (and voluntarily leave aside or inadvertently omit). Check which ODF level your third party apps follow. See how your document is encoded (Tools>Options, Load/Save>General Default File Format and ODF Settings section).

The culprit here indeed seems to be the change tracking somehow being active even when it’s not being used. This is some really bad design tbh. Especially since LO pretty actively discourages users from using DF, it’s really weird that it then effectively adds its own secret DF tags to every single edit without informing the user in any way.

1 Like