Caption above object group

In my document, I have an object group and I need to add a caption above. I know how to add captions and the selection for displaying it above or below the contents but it does not work. Regardless the choice, the caption will be put below the object group.

LibreOffce Writer 7.3.7.2 on Linux Mint 21

I assume that your “object group” is some sort of graphical object you added with the drawing tools or a group you designed in Draw. This kind of object is called a drawing object and does not interact well with text. They are more or less “external” to your text. Consequently, the notion of “above” or “below” does not make sense because the caption and the object live in independent spaces.

What you need is to move the object into text realm. Also take note that using Insert>Caption creates frames. You can get positive indication of these by enabling View>Text Boundaries. Enable also View>Formatting Marks which will help you to see exactly what is in your document.

Fixing an existing caption

This recipe is valid for `Insert`>`Caption` captions.
  1. right-click on your object and Anchor>As character
    Your object is now a "character " at beginning of the caption.
  2. put the cursor at end of the caption and press Enter
    You created an empty paragraph below the caption.
  3. select the object, Ctrl+X to cut the object
  4. put the cursor into the empty paragraph, Ctrl+C

You may need to adjust the size of the frame containing the caption and the object. Prefer to use styles over direct formatting, both for frame and paragraph.

Adding a caption manually

Menu command `Insert`>`Caption` launches macros which systematically add frames to your document while this is not always necessary. You do the same job manually and optimise for your case.
  1. start by typing your caption
  2. for ease of tuning, apply built-in style Drawing, Figure, Illustration*, Table or Text according to the kind of caption. If you don’t want to “specialise” your captions per category, use generic Caption paragraph style.
  3. Auto-numbering is done with an auto-incremented counter available through Insert>Field>More Fields, Variables tab. The counter are in Number range Type. There is one per category: Drawing, Figure, Illustration, Table, Text. You can also add new ones.
  4. at end of caption, you have two possibilities:
    1. press Enter to create a new paragraph where you’ll paste your object (and anchor it as character). Create a specific paragraph style for the object
    2. press Shift+Enter to extend the caption paragraph on next line where you’ll paste your object (and anchor it as character)

In case 4.1, modify the caption paragraph style to tick Keep with next paragraph in Text Flow tab so that the caption is never separated from the object paragraph by a page break. Don’t use the same paragraph style for the caption and the object because you would also group the caption+object with the next text paragraph.

In case 4.2, modify the caption paragraph style to tick Do not split paragraph in Text Flow tab for the same reason. There is nothing else to do because the object is contained in the caption paragraph (only one paragraph instead of two).

Appearance of caption + object is adjusted through paragraph style only because there is no frame here.