Writer and cross references to numbered lists: how can I remove the full stop?

When you set out a numbered list, it is fashionable to put a full stop after the number. For example:

  1. Some text.
  2. Some more text.
  3. Yet more text.

In Writer, you can put a full stop after the number using the ListStyle: Numbering dialogue. On the Customise tab, in the Separator area, you type a full stop in After.

Currently, there is a problem with inserting a cross reference to a line number of this type: Writer includes the full stop with the number. For example, suppose I wanted to write a sentence including a cross reference to the second line of the preceding list. I could say: “Repeat Step 2, as needed.” However if I used a cross reference to insert that 2, Writer shows: “Repeat Step 2., as needed.”

Writer didn’t always do that. I can’t determine the version of LibreOffice where this behaviour changed but if I go back to PDFs of documents I wrote, the change occurred between 5 April 2021 and 24 February 2022.

I currently see the problem with LibreOffice version 7.3.2.2 either under Debian with Gnome or Windows 11.

Does anyone know of a workaround to get rid of the full stop in the cross reference?

@Hrbrgr
Thank you for showing an interest. I apologise for the confusion.
The cross reference I refer to is Number not Referenced text.
When I insert the cross reference number in my paragraph, I use the following Fields dialogue:
exampleCrossReferenceSelector_496x421

After I click Insert, Writer shows the following:
exampleText

@floris_v
You confirm that a full stop (U+002E) is still added after the number in LibreOffice Version 7.2.5.2 but not in 7.3.4.2.

@ajlittoz
You say that in Version 7.3.4.2, the full stop is not appended to the cross reference number. That confirms floris_v’s observation.

It looks as though there is a bug in LibreOffice before Version 7.3.4.2. Thank you all for identifying the problem. I will try Version 7.3.4.

I don’t experience the problem with a dot separator U+002EFULL STOP. The final dot is removed from the cross-reference Refer using: Number (any variant) – see @Hrbrgr’s screenshot for field parameters selection.

However if I change the final After separator for anything else than U+002E, this separator is not removed. This may be an improvement to suggest.

My LO is 7.3.4.2 under Fedora 36.

EDIT
From experiment, Writer removes a single dot from the After separator. I’d prefer it removes the separator as declared in the list style for this level (here “list style” includes the direct formatting Format>Bullets & Numbering).

Feature request is at tdf#149635.

1 Like

U+0023 inserts a # for me. The code for the full stop is U+002E. But in version 7.2.5.2 / LibreOffice Community Build ID: 499f9727c189e6ef3471021d6132d4c694f357e5 etc, that still adds the full stop in the cross-reference. It works correctly in Version: 7.3.4.2 / LibreOffice Community Build ID: 8cb1c265a8f71ce63e37a2ff337b4f2ebc525cbc.

Oops! Dank U @floris_v. I made a typo between the time I looked for the code for a full stop and the time I wrote it. Old age and immediate memory! I corrected my post.

Maybe already done, tdf#146851

Not exactly. As I point out in my feature request, the After separator is suppressed only if it is a full stop. More exactly, when the cross reference is inserted, a full-stop in last position of the string representing the number is removed. If you configure any other After separator, you won’t get separator suppression, only a full stop if it ever appears in last position.

IMHO, from author’s point view, it is better (?) to eliminate the whole separator after querying the list style configuration.


@rochfort
tdf#146851 tells that the dot After separator suppression is fixed in LO 7.3.3. You should then consider to upgrade.

You are right. I was testing against Word 2010 which suppresses only the full stop, then I think I confused myself by not pressing F9.

For example, suppose I wanted to write a sentence including a cross reference to the second line of the preceding list. I could say: “Repeat Step 2, as needed.” However if I used a cross reference to insert that 2, Writer shows: “Repeat Step 2., as needed.”

Please describe this process in more detail, please step by step. For me it is not understandable what exactly you do. Thank you.


Assigning a cross-reference works for me without any problems.