Cross-reference updates and formatting

Do you want to: Report a bug
OS version: Win 10 Pro 22H2
App version: 7.4.0.163 (x64 exe)
Downloaded from: ONLYOFFICE website

Hi Team,
I have noticed an issue with cross-reference formatting

If I change the text of a heading, and then update the Table of Contents, the text change to the heading will be reflected in the Contents. As expected.

However, if I use the context menu item “Update field” on a heading cross reference, the update to the heading text is not applied. Also, text formatting, the example below, colour, is lost.

format

In this example, for testing purposes, I changed the heading to “Manage Products”. There is no “s”, and the colour changed from “red” to “automatic”

… interestingly, “Update field” applied to page number references do not change the colour.

Hi @DavidRGreen

Unfortunately, I didn’t quite understand the presented scenario. Could you please provide us with details of desired scenario or video?
If possible, attach the document.

Oops, I’d thought I’d made myself clear.
Okay, I’ll try again.

In a document, we have a section of heading and copy.

headv1

Later in the document, we have a cross-reference to that heading.

crossv1

Now, there are two issues at play here.
One is the handling of the cross-reference copy,
The other is the formatting of the cross-reference copy.

If I add some additional copy the the heading;

headv2

The no cross-reference will update until instructed to, so I apply “Update field”.

crossv2

The two issues are now evident;
The heading copy does not reflect the updated heading, and formatting of the field has changed from bold in colour red, to standard weight in colour Automatic. But the page number retained all the formatting, unlike the heading copy.

The ToC has picked up the update to the heading.

tocv1

What I have also noticed is that if the change to the heading copy within or at the beginning, then the cross-reference reflects the actual value, within the scope of the original value.

headv3

becomes, in the cross-reference;

crossv3

as you can see, the trailing copy of “of importance” is still being ignored in the cross-reference, but not in the ToC.
If I delete the cross-reference, and insert it again, then the cross-reference copy reflects the heading copy it refers too.
This is evident as the cross-reference dialogue appears to be always up to date.

I hope that this makes the issues a little more clearer.

@DavidRGreen
Please accept my apologies for the delay in responses.

We are working on it already
I’ve added your request to mentioned suggestion.

Currently, as a workaround try to use:

  • ctrl +A
  • f9

ctrl + A - Select all text
f9 - updating links

We are checking the situation.
I will let you know when I get something.

Hi @Nikolas

I gave the Ctrl-A / F9 a go.
It does not seem to work any better than the context menu item “Update field”.

To help make the issue more clear, this diagram may help
CR_Issue

  • Any change to the area labelled “Changes” in the heading will be reflected in the inner-body cross-reference.
  • Any change to area labelled “No Change” in the heading will not be reflected in the inner-body cross-reference.

The Table of Contents always shows changes to the heading text.

The test document, Cross-Reference issue.docx, has been left in
https://drive.google.com/drive/folders/1OXIAIxEgUtr_6Hoyyi8_LqJemxV7m2DL?usp=drive_link
along with other documents relating to another ticket.

While typing this up, I did something else which throws up an unexpected result.

  • I typed “test” in front of “headline”, and then used Shift-End to select the rest of the heading, backing up one character to avoid selecting the CR at the end of the line and pressed “Del”.
    When updating the cross-reference, it came up with the “bookmark not found” error.
  • When I selected “headline” (only) and over-typed “test”, the cross-reference updated as expected.

… interesting result.

Hey @DavidRGreen
Thank you for the detailed information. :+1: :+1:

We are already considering the problem!
Thank you, I took note. I’ll add this to the description.

1 Like

Hey @DavidRGreen

  1. The inserted cross-reference does not reflect the updated heading.

We are already working on it. → Implement updating all cross-references in the document with a single button.
I have added your request to the mentioned suggestion. :ok_hand:

  1. The formatting of the inserted cross-reference changes when it is updated.

We have reproduced the described issue and added the suggestion to our internal tracking system. :+1:

  1. When adding text at the beginning or end of a heading, the cross-reference does not recognize it.

The behavior of the editor is not a bug.
It depends on how the text is inserted, either inside or outside the bookmark.
If you initially place the cursor inside the heading text and navigate to the beginning or end using the keyboard, the entered text will be correctly added when the cross-reference is updated.
After deleting the first cursor, it may have ended up beyond the invisible start of the bookmark.

Feel free to comment it if you got further questions!

Okay, Thanks for the update @Nikolas

Obviously editor “behaviours” can be worked around, now that I am aware of it. It just looked like a bug as, since the ToC processing recognised the changes, I expected to Cross-reference processing to be similarly gifted.

But, as it has been logged as a suggested enhancement, one can hope that it gets addressed one day, I think that the all the cross-reference processes should behave similarly.

1 Like

Hello, @DavidRGreen
In version 8.0, we have fixed the issue you reported.

  • ONLYOFFICE Docs is already available at the following link

  • ONLYOFFICE Desktop will be released within the week. [1-6 feb]

1 Like

That sounds good!

1 Like