Ask Your Question
1

Cross-references between sub-documents [closed]

asked 2013-07-14 18:58:56 +0200

implicit_knowledge gravatar image

updated 2014-02-09 12:27:48 +0200

oweng gravatar image

So I'm working with a master document and several sub documents. Now I'd like to link to references from a sub document to another sub document.

I can choose to select the path of the sub document, then the reference is valid only in the sub document.

If I specify a local reference (omitting the path, hence it acts as a local reference for that sub document), then the reference will be valid only in the master document. Not in the sub document, because there is no such reference.

a) Is there a workaround for this, so that references are valid in both sub documents and master documents? Or is there a macro I could use to pre-process all the links in a sub document before using it in the master document, that creates local references?

b) Is it possible to hide the error message that a reference is not valid in a sub document?

Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-19 09:43:59.532355

1 Answer

Sort by » oldest newest most voted
2

answered 2013-07-15 02:34:38 +0200

oweng gravatar image

updated 2014-02-09 13:02:10 +0200

There is a section in the Writer Guide v4.0 dedicated to explain how to do this (refer Ch. 13, pp. 377-380). Are you using a bookmark or a set reference to mark the destination?

UPDATE: It is possible to work around the cross-reference limitation between sub-documents but it is inelegant. These are the methods indicated in the Writer Guide.

If the requirement is to cite a sub-document from within the master document:

  1. In the sub-document, at the required location (or highlighting the required range), Insert > Cross-reference... > Cross-references tab > Type of "Set reference" / "Bookmarks" > enter a meaningful Name > click Insert. Refer my answer here for further detail on these marks.
  2. In the master document, Insert > Cross-reference... > Cross-references tab > Type of "Insert reference" / "Bookmarks" > select the required mark > click Insert. This is a workaround for bug fdo#44931.

If the requirement is to cite a sub-document from within another sub-document:

  1. In the anchoring sub-document, at the required location (or highlighting the required range), Insert > Cross-reference... > Cross-references tab > Type of "Set reference" (a bookmark will not work) > enter a meaningful Name > click Insert.
  2. In the citing sub-document, Insert > Cross-reference... > Cross-references tab > Type of "Insert reference" > enter the previously created Name (ignore the Selection) > click Insert. In the sub-document this cross-reference will not display correctly (as it has no contextual understanding of the destination) but it will display as expected in master view.

I am still trying to determine if this cross-reference issue (between sub-documents) is an ODF limitation or an implementational one.

edit flag offensive delete link more

Comments

Thank you for your answer, but that's exactly the way I do it. The problem is that the links are hidden only in editor mode (when writing), not when printing or generating a PDF file. Hence I cannot use the sub documents as an independent entity. I use both. The benefit of bookmarks and hyperlinks is that they simply won't work (in opposite to show an error message) in the sub document, but will work in the master document.

implicit_knowledge gravatar imageimplicit_knowledge ( 2013-07-15 23:35:32 +0200 )edit

Thanks for clarifying. You may need to attach an example to your question for others to look at. If it is reproducible then we may need to raise a bug. Bug fdo#44931 is possibly related to the issue you are experiencing, but not quite the same as it deals with ToC entries (linking from master > sub-document).

oweng gravatar imageoweng ( 2013-07-16 02:32:01 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2013-07-14 18:58:56 +0200

Seen: 1,419 times

Last updated: Feb 09 '14