2

With LibreOffice, I set a cross-reference to "My Word" on some page. On another page, I want to insert a reference to it, but displayed as "my words".

However, whenever I insert this reference, "my words" gets replaced by "My Word". This is the expected behavior since the inserted reference is a field, however I want to use arbitrary text to reference this mark.

I tried setting a second cross-reference on the same word, named "my words", but this name has no meaning in the document (it is only used internally by the field manager) and thus the issue is not solved.

Is there a way to get the desired behavior? Are bookmarks the best option at hand?

2
  • Your question is on topic here but you may get better answers on ask.libreoffice.org (which is not associated with Ask Ubuntu or Stack Exchange). – David Foerster Jan 1 '18 at 21:09
  • @DavidFoerster I will ask there later then, thanks :-) – GnxR Jan 1 '18 at 21:13
0

The proper way is to add a bookmark and then insert a hyperlink to that bookmark.

The point of cross-references is that it updates the text if the source text gets modified. You do not want this to happen, so do not use cross-references. From https://wiki.openoffice.org/wiki/Documentation/OOo3_User_Guides/Writer_Guide/Linking:

The text in a hyperlink does not automatically update if you change the text of the linked item (although you can change it manually), but changed text does automatically update in a cross-reference.

EDIT:

Editing link style is explained at https://help.libreoffice.org/Common/Editing_Hyperlinks#Change_the_attribute_of_all_hyperlinks.

Right-click the "Internet Link" or "Visited Internet Link" character style, and choose Modify.

This works even though, oddly, it still shows "Default Style" when the cursor is on the link.

modified link style

5
  • Thanks. Is there a way to define a style for bookmarks so that they don't look like web links, or do I have to apply a style manually to every one of them after inserting them? – GnxR Jan 2 '18 at 17:48
  • @GnxR: See edited answer. – Jim K Jan 2 '18 at 18:25
  • Sure. I already know how to change the style of all links tho, what I want is to tell LO to use different styles for internet links and for document/bookmark links. So far I'll have to update every bookmark manually, since my document contains both internal (bookmarks) and external (web) links. – GnxR Jan 2 '18 at 19:10
  • There is only one pair of default link styles ("Internet Link" / "Visited Internet Link"), so yes, you will have to update each link that you want to use different styles. If there are a lot of them, you could write a macro to set the styles based on the HyperLinkURL property. – Jim K Jan 2 '18 at 23:34
  • Setting up these styles is not easy. For instructions, please see my answer to your follow-up question at ask.libreoffice.org/en/question/142117/…. – Jim K Jan 3 '18 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.