Ask Your Question
0

caption without frame [closed]

asked 2013-09-02 05:42:19 +0200

Flavelle Ballem gravatar image

updated 2013-09-02 06:59:15 +0200

oweng gravatar image

In LibreOffice, when I add a Caption, a frame is automatically inserted.

What I would like to do is to add a Caption, either above or below a picture, without having a frame. Is there anyway to do this?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-11-07 11:26:58.768357

1 Answer

Sort by » oldest newest most voted
0

answered 2013-09-02 06:58:35 +0200

oweng gravatar image

It appears the ODF v1.2 specification does not appear to proscribe the manner in which captions are encoded. There is a <draw:caption> element although this does not appear to be used when inserting captions against a table or figure in Writer. A caption seems to be encoded as plain text with a field set within an enclosing frame. A captioned image (illustration in this case) will have a (simplified) form of XML like:

<draw:frame draw:style-name="fr1" draw:name="Frame1">
    <draw:text-box>
        <text:p text:style-name="Illustration">
            <draw:frame draw:style-name="fr2" draw:name="graphics1">
                <draw:image xlink:href="Pictures/10000000000002680000033579D2BB49.jpg"/>
            </draw:frame>
            Illustration <text:sequence>1</text:sequence> : Here is the caption text.
        </text:p>
    </draw:text-box>
</draw:frame>

I know of no way to prevent this arrangement other than by manual intervention i.e.,

  1. Inserting a caption for an object (table / image).
  2. De-selecting the outer frame.
  3. Clicking the caption area.
  4. Highlighting and copying the caption text.
  5. Using the undo (CTRL+Z) function to remove the inserted frame and caption.
  6. Placing the cursor either above (table) or below (figure) the object to be captioned.
  7. Paste the caption text.
  8. Ensure it uses an appropriate paragraph style (Caption, Illustration, etc.)
  9. Copy this paragraph (caption) for future captions and amend content as required.

This results in much cleaner XML like:

<text:p text:style-name="P1">
    <draw:frame draw:style-name="fr1" draw:name="graphics1">
        <draw:image xlink:href="Pictures/10000000000002680000033579D2BB49.jpg"/>
    </draw:frame>
    Illustration <text:sequence>1</text:sequence> : Here is the caption text.
</text:p>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-09-02 05:42:19 +0200

Seen: 1,646 times

Last updated: Sep 02 '13