cross reference within a masterdocument

Today I created a master document with several odt files, and I tried to set and insert a cross-reference. I followed what explained here and here but the result was not what I expected.
As a matter of fact I got

  • in the subdocument an error message (what seems normal) and
  • in the master document just a link to the reference set, not the content of the reference. Unlike what happens with cross-references within the same document. So it is senseless a cross reference: rather better a hyperlink. But maybe it happened because when I set the reference today I wasn’t able to set more than a (single) row: I don’t understand why…

It seems, in Google search, that help for this problem is very aged (2011 or so), not updated: nobody uses this technique?
BTW: LO in my opinion, should allow to delete references.

Thank you

I think that so far there is no solution, because the problem is that LibreWriter doesn’t allow to set as reference more than one paragraph.
And that, in my opinion, narrows very much the possible uses in a intellectual activity. Indeed I would have to share between different document more information than a single paragraph.
An enhancement in this direction would be blessed.

I have posted this my new question here.

Cross-document references are tricky and every word in the built-in help is important. I make this remark because while doing a test (since i am personally interested in this topic), I fell in a pitfall for disregarding an essential word.

First step is in the preparation of the to-be-referenced locations. You don’t use bookmarks as you would do for intra-document cross-references.

  • Instead, you Insert>Cross-reference after selecting the word(s) or location.

  • Type is Set Reference

  • Give a relevant Name

  • Close

The important step is chosing Set Reference instead of creating an ordinary boolmark.

Then when Insert>Cross-reference to create the reference, steps are similar: you choose Type Insert reference and manually type the Name (since it is not known in the document unless already used). You select whatever information you need for this reference (page, chapter or content).

It then works like a charm.

Of course, if you display a sub-document individually, the reference will not be found, but the view of the master document will show correct substitution in the part made of the sub-document.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.

Thank you: I know already all what you say. Unfortunately, as I’ve already said, this not works for me. Maybe because this time I am not able to set as reference more than a row, unlike other times.

What do you mean “more than a row”? Are you trying to set a reference onto a table? If you are not in a common case (reference pointing to a word), please describe your intent (trying to get a whole table row in the reference?).

So far I have used cross-reference (in the same odt) for a single paragraph. I notice now that this is not a choice, but the only possibility: it’s not possible to set a reference for several paragraph, is it? If it’s so, in my case cross reference between my different document would be useless. Better a dde link. Thank you.

When following your explanations, the resulting pdf file says:
jump to Error: Reference source not found
It does not work like a charm :frowning:

Everything works fine, thank you for this explanation!

I got one remaining problem:
When I use this type of cross-reference I like to refer to the page number where the cross-reference is posted. However, within the master document it refers to the page number within the sub-document. I would like to refer to the page number within the Master Document in order to have working cross-references in the final book.

Any help appreciated!


@MaxKiel: explain what you do. Here, cross-refs show the master page number when displaying the master document. If you’re looking only to a sub-document, page number will be sub-doc relative because the sub-doc is not aware of the master.

I had the master document open and it was still referring to the Sub-Document page number. However, now it works (cant tell you why, sorry).

But I do have another problem:

  • Within the master Document, I inserted a field inside the footer in order to do a page count. Offset set to “-2” in order to exclude the first two pages (which have different page styles as recommended in other posts).
  • The Cross-References still use the total Page Count of the whole document, so they are always two pages ‘too far’ into the document.

Is there any way to fix this?

Thanks a lot! I hope this was clear enough.

I think this another question. So it is better to ask it independently instead of reviving this old post.
Using Offset to modify page number is always an error as Offset does not change the page number by itself but references another page to get its page number (resulting in “void” number if page doesn’t exist).
Ask your own question so that it can receive an adequate answer.

Thank you, I did that here.

The solution given by ajlittoz is correct, but he omitted an important aspect: both the set reference and insert reference need to be done by opening the respective documents, not from within the master doc. Then, and only then, it works.

I also used a lot the solution of creating an xRef and then recalling it in the other document (which I found by myself just reasoning :–), but if what you need to recall is already an heading, I just realized that an xRef already exists and is senseless to overlap a new one on the same paragraph.
So what I suggest is even easier:

  1. Insert the ref. recall you need in the very same document;
  2. Select it / them and cut (CTRL+X);
  3. Paste it / them in the other file.

What you’ll see is again an error, but it works like expected in the ODM master document :wink:

Could you elaborate a bit more with a example use case? As it is, I don’t see what is at stake. You cut, which means you removed the reference (?) to paste it somewhere else. Is your goal to move a reference from one document to another?

This issue apparently also occurs in LO version 7.6. The solution posted for the prep is correct if you Insert the change prior to closing. You still have to go to the receiving document and insert the reference per the current manual (link below). I tried inserting as referenced text and as Chapter, but neither worked for me.

LO 7.6 Writer Manual: