Page 1 of 1

[Solved] How combine/group a table and an image

Posted: Sat Aug 03, 2019 9:51 pm
by catbill
I want to combine a table and an image and then create a caption using LibreOffice Writer. I am not finding documentation about how to combine or group them. What is the best way to do it?

I know how to make the caption and do not need help with that.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 12:17 am
by RusselB
Create the table, then use Insert -> image, then right click on the image and select Anchor -> As character
That, in my quick check made the image the first character in the table... or at least that's how it looked to my eyes.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 5:54 am
by catbill
Thank you. A few questions: Are you suggesting that I insert the image in a cell in the table? Why do you suggest anchoring as character? I still want to insert a caption. Doesn't it need to be some sort of graphic object to do that?

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 10:35 am
by RusselB
I described the exact sequence I used to get, imo, what you seem to be looking for.
Please give it a try and if it doesn't work how you expect/want, upload a sample document and describe, to the best of your ability, what is wrong.
The character anchoring was the one I found that put the image into the table, rather than above it.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 10:48 am
by keme
You can also insert a frame, put your table and image in the frame and add a caption to the frame. Better flexibility, but not as easy to work with as RusselB's suggestion.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 3:58 pm
by catbill
I need to explain more clearly.
I can insert the large image in the top row of the table (by first merging cells). However, I don't see how to insert a caption for the table as a whole. When I right-click on the table, there is no option to do that. I can insert a caption for the image but I want the image at the top. The caption for the image would appear below the image, not below the table where I want it.
When I enclose the table with the image in a frame, I can make a caption. However, it is saved as Text1 and I need it to be saved as a figure. How do I do that?
Thank you both for bearing with me.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 4:19 pm
by RusselB
What settings are you using for making the table?
Since a table consists of multiple lines, what about adding an extra line to your table, then putting your caption on that last line?
I've never used frames, so I have no idea if keme's suggestion might be better at this point.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 4:39 pm
by catbill
I didn't specify any particular settings for the table. Are there specific settings you are thinking of?
I need to use the automatically generated caption, so cannot manually insert it.
I could upload the file but don't see an option for doing that.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 5:31 pm
by RusselB

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 7:46 pm
by catbill
Thank you. My screen is formatted to be white on black and the tab for "Upload attachment" is barely legible. That is why I didn't see it.
Anyway, here is a file.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 10:13 pm
by RusselB
Take a look at this and let me know if it works for you or not
If it doesn't, please try to clarify how it's different from what you are wanting.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 10:20 pm
by RusselB
Doing a bit more experimentation, since my post, it appears that a Caption, as entered using Insert -> Caption (not available through right click menu) knows what you are putting the caption to, and places the caption under the item.
I can see no way of moving a caption made for the image so that it shows under the table.

Re: how combine/group a table and an image

Posted: Sun Aug 04, 2019 11:56 pm
by catbill
Yes, you understand what I am trying to do. I will keep on trying to figure this out and post here (if I remember) when I get an answer.

Re: how combine/group a table and an image

Posted: Mon Aug 05, 2019 12:41 am
by John_Ha
Try brute force and ignorance :super:

Use Insert > Frame ..., to add a frame. Put the caption text in the frame. The frame can be located anywhere you want.

Re: how combine/group a table and an image

Posted: Mon Aug 05, 2019 12:51 am
by keme
Right click in the table but not on the image, and the Caption menu item will make one for the table. If you use a frame, you can handle object+caption as one entity. With just the table, it seems that you need to be more careful about keeping the caption connected. I haven't used captions in Writer myself, so I'm not sure which is most practical.

When editing the caption, you can select which category you want it to be in. Category dropdown (list) field.

Re: how combine/group a table and an image

Posted: Mon Aug 05, 2019 1:10 am
by robleyd
Question now also posted on AskLibreOffice

Re: how combine/group a table and an image

Posted: Mon Aug 05, 2019 2:09 am
by catbill
John_Ha wrote:Try brute force and ignorance :super:

Use Insert > Frame ..., to add a frame. Put the caption text in the frame. The frame can be located anywhere you want.
Thank you.

Re: how combine/group a table and an image

Posted: Mon Aug 05, 2019 2:50 am
by catbill
keme wrote:Right click in the table but not on the image, and the Caption menu item will make one for the table. If you use a frame, you can handle object+caption as one entity. With just the table, it seems that you need to be more careful about keeping the caption connected. I haven't used captions in Writer myself, so I'm not sure which is most practical.

When editing the caption, you can select which category you want it to be in. Category dropdown (list) field.
Thank you. A problem is that there is no option to create a caption after right-clicking on the table.
To help others trying to do this, here is what I did:
1. Insert the image in the top row of the table (use merge cells)
2. Select the table, then go to Insert > Frame
3. Right-click and select Insert Caption
4. Choose Figure for the category (this may not be necessary for other people but I need all of the graphics to be figures)

Re: how combine/group a table and an image

Posted: Mon Aug 05, 2019 3:04 am
by catbill
Thanks to keme, John_Ha, robleyd, and RusselB.

Re: how combine/group a table and an image

Posted: Mon Aug 05, 2019 3:11 am
by robleyd
If your problem has been solved, please Tag your thread when it has been [Solved]