Ask Your Question
2

How can I make a cross-reference to a text box using the name of the text box? [closed]

asked 2013-02-01 05:11:33 +0200

ROSt52 gravatar image

updated 2015-11-01 19:55:14 +0200

Alex Kemp gravatar image

I am working on an article using Writer.

Text is completed but I want to create a text box (grey background) to give short explanation on a related topic.

I clicked the text box icon image description wrote the text, made back ground grey, and wrap it into my main article text.

I gave the text box a name by right clicking on the selected frame of the text box and selecting "Name". In the navigation window the I see the text box called "IDEF0 text box" as a Draw Object

image description

Now I would like to make a cross reference to this Draw Object but I cannot find the way to do it.

Questions 1: Is is possible to make a cross using the name "IDEF0 text box" as a cross reference? ( I could create cross reference to the page.)

Question 2: How can the name of the text box be displayed in a cross reference

Thanks for hints!

LibO 3.6.4.3 / XP/SP3

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 2015-11-01 19:55:26.740033

2 Answers

Sort by » oldest newest most voted
3

answered 2013-05-21 16:02:37 +0200

oweng gravatar image

updated 2013-05-23 04:21:49 +0200

Currently it is not possible under ODF v1.2. The cross-reference feature makes use of either bookmarks or reference marks as described under §6.2 (anchoring part) and §7.7.5-7.7.6 (citation part). The two methods are similar in that both offer elements for a point anchor (<text:bookmark> or <text:reference-mark>) as well as a pair of elements for a range anchor (<text:bookmark-start> + <text:bookmark-end> or <text:reference-mark-start> + <text:reference-mark-end>). These destinations can then be cross-referenced by a citing element (<text:bookmark-ref> or <text:reference-mark-ref>). The definitions all state that each is usable within the following elements:

<text:a>, <text:h>, <text:meta>, <text:meta-field>, 
<text:p>, <text:ruby-base>, and <text:span>.

In the case of a cross-reference to a heading, for example, a bookmark will be used. On the other hand (because it is not possible to insert an anchoring mark directly into a frame), setting an anchor in the text adjacent to a frame (via Insert > Cross-reference... > Cross-references tab > Set reference and pointing to the named Draw object) results in a reference-mark being used. This is not ideal though and is little different to using any other type of text element (e.g., caption, heading, etc.) as a substitute anchor. In order for a cross-reference to be made to a Draw object (text box) or Text frame, ODF will first have to be extended[1] to allow for the indicated tags to be usable within the <draw:frame> element (which encloses the <draw:text-box> element).

You can drag-n-drop a Draw object entry from the Navigator to the text and create a hyperlink[2] to the object, however this also does not appear to be working (it may be related to fdo#36310 as I indicate in my answer here). A possible partial workaround is to use a Text frame (Insert > Frame...), as that is effectively what a text box is anyway. Text frames inserted via the menu indicated are automatically numbered / named, and while they are a little more cumbersome to use, the drag-n-drop from Navigator does produce a viable hyperlink, but again, are not currently cross-referencable.

[1] Any Extended version of ODF could be altered in the interim to incorporate the required changes, as these versions of the specification are designed to allow for temporary including of additional features.

[2] Hyperlinks make use of the <text:a> element rather than the cross-reference elements indicated.

edit flag offensive delete link more
0

answered 2013-05-22 07:29:26 +0200

ROSt52 gravatar image

@oweng - Thank you very much for your excellent answer. Using insert/frame works fine. I also understand that I don't mix up a text box (T - icon) and a (text) frame. I also can create a hyperlink to the frame using the navigator.

However I could not create

  • a cross reference to the frame using insert / cross reference.
  • drag and drop the frame as a LINK from the navigator window into my text
  • drag and drop the frame as a COPY from the navigator window into my text

Is one more things listed above not possible or did I make something wrong?

Additionally I still struggle to understand the difference between drag&drop a LINK and HYPERLINK.

edit flag offensive delete link more

Comments

I have updated my answer to provide greater clarity. The drag-n-drop Link method creates a Dynamic Data Exchange (DDE) link i.e., an uneditable Section containing the element is inserted. The drag-n-drop Copy method creates an editable Section containing the element. Both work for Text frames, but are not applicable to Draw objects (at least in Writer - in Draw you can use these to greater effect). Same as using Insert > Section... > Section tab > check the Link+DDE options.

oweng gravatar imageoweng ( 2013-05-23 04:42:57 +0200 )edit

@oweng - Thanks for the updated version; I got a better understanding an will see what is the best possibility for my needs. Additionally I hope that the answer you wrote in the question as well as similar answers to other questions find their way into the LibO manuals.

ROSt52 gravatar imageROSt52 ( 2013-05-23 05:40:53 +0200 )edit
1

@oweng - I posted an enhancement request. fdo#64889

ROSt52 gravatar imageROSt52 ( 2013-05-23 05:54:15 +0200 )edit
1

@ROSt52, confirmed and example file added. Thanks.

oweng gravatar imageoweng ( 2013-05-24 08:36:27 +0200 )edit

@oweng - Thanks for the excellent comments and explanations on dev level!

ROSt52 gravatar imageROSt52 ( 2013-05-24 10:40:35 +0200 )edit

Question Tools

Stats

Asked: 2013-02-01 05:11:33 +0200

Seen: 2,235 times

Last updated: May 23 '13