Purpose of tiny frames with invisible text after section headings

I’ve got an odt file (not written by me) in which there are tiny frames with invisible text after section headings (and also after table and figure titles). When I type Ctrl-A in such a frame (to select all) and copy the text, I get the section number followed by “.0” (e.g. “3.5.2.0”). When I double-click inside the frame, I get a dialog box “Edit Fields” with information like

  • Type: Number range
  • Select: Subclause
  • Format: Arabic (1 2 3)
  • Value: 0

What is the purpose of these frames?

I could not find any information. So I’ve asked both Mistral Le Chat and ChatGPT, which suggest that this is either for cross-referencing anchors or automatic numbering (but could not find any documentation). However, automatic numbering works without such frames, and if I remove such a frame, linking to the corresponding section still works.

The main issue with these frames is that when line numbering is active, I get a “1” on the left of each frame (as frames have their own line numbering), i.e. which appears over the section heading.

Please attach a 1- or 2-page sample of this odt file for analysis. Mention the exact LO version.

The description of the field suggests the presence of a caption created with Insert>Caption, but probably tampered with. The command creates frames, which is not always optimal (but creating captions manually requires advanced skill).

Since frame contents is an “independent” sub-document, line numbering of the contents is also independent from the main flow and starts from 1 for lines inside the frame. Thus the 1 you see is to be expected.

Here’s an excerpt with text replaced, showing a few section headings: test.odt (9,4 Ko)

I’m using LibreOffice 25.8.2.2, but according to my archives, these frames were added in 2006; OpenOffice.org was used at that time. I have a version without these frames and without links to sections and a version with these frames and with links to sections. So this may have been related to linking at that time.

It is possible that Chapter Numbering (now called Heading Numbering) had not been introduced by then so this would have been a workaround to reference clauses by number. If you delete the frames, some of your cross references might not work, see:

You could reference Number instead for each cross reference referring to the number of a referenced numbered paragraph. In the image above, in the Selection pane, instead of referring to 1.1.1.0, click the 1.1.1 Formats and change Refer using: from Referenced text to Number

If you want to update the document, you could update the headings by

  1. Remove the list numbering for headings
  2. Click Tools > Heading Numbering and
    1. Set numbering to 123… for as many levels as needed (click 1-10 to set numbering for all levels)
    2. For each level, set Show sublevels to that level, that is, for level 2 set Show sublevels to 2, for level 3 set Show sublevels to 3, etc.
    3. Enter a full stop in the After field under separator. OK
  3. Click in each heading, identify its heading number, then press Ctrl+0 to convert it to Body Text, then press Ctrl+[heading level] to update it to show Heading Numbering.
  4. Find your cross references and update them to point to Headings
  5. Delete the frames

But it would be quicker to to paste as unformatted text into a new document and update existing default styles and Heading Numbering .

Thanks. But for the document in question, it seems that steps 1-3 are not necessary since headings already have the correct style (Heading 1, Heading 2, Heading 3…) and the settings in Heading Numbering appear to be correct. However, there are blank headings that will need to be removed: for instance, at the end of 4.3.2, there is an empty line with style Heading 3; so, in Insert → Cross-reference for Headings, there is a blank item between 4.3.2 and 4.3.3.

There is a mixture of styling and direct formatting in the sample file. However, I’ll focus only on the frames.

The frames are As character instances. Considering they contain only text (a single line), I don’t see why they were inserted. As such, they don’t make sense.

Texts is styled as follows:

  • paragraph: Spacing, derived from Body
  • character: Hidden
  • list: Table Gap

Spacing has nothing special except a huge list of tab stops, spaced apart 1/4", inherited from Body. They perhaps have a use somewhere else.

Hidden changes font to Arial 6pt bold, sets colour to white (which explains why you see nothing on white background) and squeezes text to 10% (compressing it horizontally). This character style is probably the main source of your problem.

List style TableGap is really a mystery for me. It suppresses any bullet or number and aligns the “list” item at left. Removing this list application would change nothing to the document (and certainly improve its stability and reliability).

Contents of frames is a field referencing Subclause number range. Every occurrence is prefixed by the heading number, but the number range itself has been “locked” to 0 in every use, in fact preventing auto-incrementation.

It looks like Subclause is a poor tentative replacement for direct access to the heading fields. This indirect addressing is really clumsy (did the original author know enough about the various available fields?). In addition no Reference or Bookmark is defined on the field/frame, thus providing absolutely no improvement on standard use of built-in Headings fields.

So, the behaviour you observe is expected in your style environment.

I have no idea. They were inserted by the original author. IMHO, they are absolutely useless and even harmful. I don’t see how they are referenced in this short sample. But are they referenced at all somewhere? You can tell in the full document Navigator by expanding References if it is not grayed out.

PS: I see a Zeichenformat among the character styles. Has the original document ever been in contact with M$ Word?

1 Like

After looking at the document more closely, I could see that frames are actually used for linking, and deleting a frame breaks the associated links. Here’s a new excerpt, still with text replaced: test2.odt (12,1 Ko).
I got confused because some links in the document are plainly wrong. For instance, there is some text giving a reference to a section, but the actual link points to a table in this section (the corresponding frame is after the title of the table); this was hardly noticeable because the number attached to the table is the same as the number attached to the section.
Re the possible contact with M$ Word, I don’t know. It is possible that the original document (from the 1980s) came from that.

Now that I get the full feature, I find your document awfully faulty in its cross-references.

When you insert a reference to a “Subclause”, you use none of its intrinsic properties. I.e. you don’t reference the counter, which is Reference text. Instead you insert Chapter which is managed and set by the Heading n hierarchy attached to outline levels.

Therefore, you retrieve the number attached to the headings, not the number in the “Subclause” sequence. The only property you make profit of is the fact that a single name “Subclause” is given to all occurrences, while a specific designation would have required one name per location.

Your “Subclause” “bookmarks” are in the end a duplication of heading numbering.

Let’s check how your headings are numbered.

You (or the original author) disabled the built-in Tools>Heading Numbering and attached a direct-formatted Format>Bullets & Numbering number to your heading. This is the worst to do if you have also numbered lists in the document. This feature is a very clumsy (and “dangerous”) compatibility feature supposed to facilitate transition from Word where you have no other possibility. The feature is a one-size-fits-all device which does not segregate lists with different meanings (the list of headings is not the same thing as a common numbered list in text). This will cause you trouble when you add numbered lists or another heading.

So remove this user numbering and re-enable Tools>Heading Numbering so that headings and lists don’t interfere with each other.

Once you have done that, you can remove the non-sensical frame and modify your cross-references to point to Headings instead of Subclause.

By eliminating frames, your document will gain robustness and performance.

See what I changed (I left the frames so that you can compare my added reference and heading with yours).
test2-ajl.odt (17.3 KB)

I think it was a necessary workaround. It looks as though Chapter numbering wasn’t introduced until Version 3.0.0 (brought in from GO Office?) in 2008, see OpenOffice.org 3.0 - Release Notes

Of course, now that workaround is causing problems.

Sorry. It is my testcase that is wrong. I’ve made it with copy-paste of a selection to a new document, but the original document had Heading Numbering (contrary to the testcase). Export only certain section says to do drag-and-drop, but I suppose that this is no different from copy-paste. I’m wondering whether this is a bug (there should at least have been a warning). Otherwise, how can one cleanly extract a part of a document?

Note that the linking was introduced in 2006. The meta:generator string is “NeoOffice/2.0_Alpha_4$Unix OpenOffice.org_project/680m5$Build-9011”.

One possibility is open the original document Save As to a new name, and delete everything except what you intend to show. Make sure that there is no Change Tracking active, when you are saving, to avoid exposing the data that you don’t want others to see.

Thanks. I had some issues, including a crash in LibreOffice (but no coredump). I also removed all headers and footers with a macro as text was remaining in styles.xml. Here’s the corrected excerpt: test3.odt (22,7 Ko). Heading numbering is active. However, if I set Number to None for the first 3 levels, nothing changes in the document. This is confusing.

Sometimes real-time updates don’t work. You must Tools>Update Alla to see the changes. And if this fails, style the heading as Body Text or Ctl+0, then back to the original style.


Your test3.odt still has the small frames. You should switch your cross-references to use Headings. Then you can get rid of the frames.

I notice a lot of WW8Num… character styles. This is usually a symptom that the document numbered lists have been manipulated at some stage with M$ Word. Getting rid of the corresponding formatting and its styles is a real nightmare. There may be traces of Word activity in the page styles but I am not sure because the names are not the traditional Converted 9 ones.


I also notice that you organised a hierarchical dependency where Heading 4 is a descendent Heading 3, itself from Heading 2, in turn from Heading 1. In the past I was tempted by such a relationship, assuming it would ease formatting tuning thanks to inheritance. I realised soon it was not. It is better and simpler to make all Heading n depend on Heading. Most attributes are set in Heading and very specific attributes like font size and spacings are set in each Heading n.

You seem to have paralleled this hierarchy with Definition n. But here there is a logical (semantic) fault. Since these are not Headings they should not inherit from the various Heading n. Rather they should lie in their own hierarchy. with a common ancestor to define the “personality” of the set, e.g. font face set to Times New Roman only once in the ancestor style instead of doing it in every Definition n.

Well, first, normally ToolsUpdate All is not necessary for heading numbering. And it has actually no effect, even here.

Here, if I change “1.1.2 Conformance” to Body Text (or Ctrl+0) then back to the original style (Heading 3), then I get “0.0.1 Conformance”, which is wrong!

Is this a bug or just due to the fact that the document is ugly, possibly with incorrect structure?

Note: I get the same behavior with the original document (not just with the test3.odt excerpt).

Yes, the goal of test3.odt was to show you how linking is done in the original document. But the document appears to have issues with headings, as I’ve mentioned above.

I could see that this change was introduced by some author in 2006, at the same time as linking with frames was added. I don’t know the reason. But before this change, one had:

Heading
├─ Appendix
├─ Heading 7
├─ Heading 8
├─ Heading 9
├─ Heading 10
└─ Index Heading
  ├─ Bibliography Heading
  ├─ Contents Heading
  ├─ Figure Index Heading
  ├─ Object Index Heading
  ├─ Table Index Heading
  └─ User Index Heading
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

which did not seem to be correct either.

This was also a change done at the same time as the above ones (headings, linking with frames).

(There are other horrors that will need to be fixed, such as style occasionally changing inside a paragraph without any reason, sometimes even inside a word.)

Then something is definitely wrong with heading numbering. Check if there is a conflict with manually-applied list numbering and the internal protected heading numbering.

I downloaded again test3.odt. Indeed, there is some manual list style applied on your headings. The stance Ctl+0 then Ctl+3 gets rid of the manual list style and reverts to internal heading numbering.

Consequently you must clean all your headings (adapting the level in the second shortcut).

After disabling heading numbering (to ensure that the numbers do not come from heading numbering): If I select the heading and do Clear Direct Formatting (either from the toolbar or from the context menu), the numbers are still there. And if I choose ParagraphParagraph… from the context menu, I cannot see a list style applied.

So, how can I see that there is manual list style applied on the headings?

Clear direct formatting operates only on “typographical” attributes (I cannot find a better word). Other forms of DF cannot be cleared with this command, like page breaks or list style. You must remove them manually.

The stance I described is a trick I found to get rid of DF list numbering without disturbing the rest.

Quite tricky. Activate the Style Inspector in the side pane (the same as for styles). List numbering ia always reported as direct formatting, even when a style is applied. Look at the list ID. Find a heading you know for sure not having a manual list numbering (eventually create a temporary brand new one) and look at the list ID. If they are different, you have DH list numbering.