This report was made with LibreOffice Writer Version: 22.214.171.124, Build ID: 65905a128db06ba48db947242809d14d3f9a93fe, CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; Locale: de-DE (de_DE.UTF-8); Calc: group threaded run on Xubuntu 16.04.3 LTS with current kernel 4.4.0-116-generic x86_64.
Probably it is present in all other versions of LO too.
If I add a caption to an image, the width of the caption is taken automatically as the width of the image. That’s quite unpractical for narrow images because the caption spans several lines and becomes unreadable. If one enlarges the width of the frame (e.g. to 100% width of the paragraph), the size of the image is also blown up to frame size of the frame introduced by the function Insert>Caption. One has to click outside the frame and its contained image, then on the image itself and reset to the original size or to the size which the image was given before. That’ very clumsy.
After the frame size has been widened, the size of the image is also blown up.
After the picture has been resized to its original size still the frame size is bigger than necessary. Although the position is set to “Below” a forced linefeed before the term is missing.
By manually resizing the frame height I finally get the size I actually wanted.
I could place a paragraph mark before Figure but no manual line break! So I also have to modify the Spacing below for the style “Figure“ to prevent a too much space below the picture.
I tried to modify the default alignment for “frame” in order to let the caption be placed in a frame
100% of the current paragraph width,
alt least 4 mm height but it shall extend automatically if the content needs more space,
but the caption and the image shall be centered with respect to the frame (which can be achieved by changing the default setting for the paragraph styles for Caption and Figure). Unfortunately the horizontal placement and the anchoring options are inaccessible in the dialog to modify my document’s stylesheet. They only become accessible for an existing frame anchored to a paragraph. But even then the frame is offset to the right by 2 mm (try it out: this is probably a real bug). Unfortunately I could not update the style for a frame to become the default style for any new frame. I did not find a workaround to streamline at least the placement of the caption-frame.
I propose to provide a standard frame for image captions and one for table captions which will be automatically taken for all new frames produced by the function Insert Caption.
Further observation: No footnote can be attached to a caption because subdialog items of Insert Footnote and Endnote are greyed out if the cursor is on a caption. Fortunately I can edit a caption. But it should be possible to attach a footnote to it (like image taken from …).
Steps to Reproduce:
1. Paste a narrow picture to a LO Writer document
2. Make a caption for it
3. widen the width of the caption's frame
In step 2 the width of the caption is taken from the width of the image
In step 3 the size of the picture changes. There also should be a forced linefeed after it.
Size of the image does not change when the frame for the caption is resized.
It should be possible to define properties for a default frame for a caption: in the most general case one for all tables, one for all images.
One should be able to define horizontal alignment for these prototypes in the <F11> Mange Styles dialog.
User Profile Reset: Yes
OpenGL enabled: Yes
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2;
Locale: de-DE (de_DE.UTF-8); Calc: group threaded
Created attachment 146575 [details]
Bug report with some screenshots
I used LibreOffice Version: 126.96.36.199 (x64)
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 8; OS: Windows 6.3; UI render: default;
Locale: en-US (en_US); Calc: group threaded
1. Created a new Writer file
2. Insert a new Picture: Isert menu-?Image-> select image from my computer
3. Insert a Caption: Insert Menu-> Caption
4. Fill the Caption text in Dialog wizard
5. Clock Ok.
The result is the same as you reported. The caption is taken by the size of the inserted picture.
Created attachment 146578 [details]
The dialog for Caption settings looks like this
Created attachment 146579 [details]
After inserting Caption, the cation is taken by the size of the image
For me, this is an expected behavior. I want that the frame and the picture have the same dimensions and that the picture is 'linked' to the frame so that the picture also changes when the size of the frame changes.
Many users don't know the difference between frame and picture. With the current behavior its easier for them to work with pictures that include captures.
That a caption's width is limited to the picture is a side effect of this behavior but every change would create many new bug reports.
For every frame style problem, please create a new bug. Keep it short and present reproducible steps or use cases. One bug for one issue.
I would like this to be as requested. But that would require a change in image and frame logic.
The caption requires a frame so the request is to have the initial frame width like the page width (and not scale the image). I would expect "relative size" and 100% does the trick but doesn't. Regina, any idea?
Second part is about the paragraph style "Figure" that is applied to above the image and not the caption text. Reason here is that the figure that has no break nor is anchored as character. I don't see a solution.
Here is what I do (LO 188.8.131.52).
- Paste a small picture
- add a long caption by right click -> Insert Caption
- click away to remove the focus from the frame
- right click on the image, Properties -> Type tab -> turn OFF the "Relative to" checkboxes
- click on the frame
- make it wider so that the caption fits into one line
- make it lower so that there is no big gap within the frame, under the caption.
This is quite cumbersome.
The really annoying thing is that the frame keeps its height and leaves a large gap under the caption. I understand that when [X] Autosize is turned on, the "Height" label is changed to "Height (at least)" but it shouldn't. Autosize should simply mean it decreases the height as much as it can.
If Autosize would allow the height to shrink then the process would be one step simpler.
The absolutely convenient solution would be if I could define a style
- for newly inserted images: I could set the Width to Autosize, rather than "Relative to the paragraph with: 100%"
- for frames for the images: I would set its Width to Autosize.
The Autosize width ad height for the Image is the original size of the image as long as it fits between the margin, otherwise the distance of the horizontal/vertical margins.
The Autosize width for the Frame would mean maximum(wImage, wCaption) where
- wImage is the width of the image and
- wCaption is the width of the caption when it is broken into as few lines as possible while the lines still fit between the margins.
behavior as old as Metusalem
(In reply to csongor from comment #9)
> The absolutely convenient solution would be if I could define a style
> - for newly inserted images: I could set the Width to Autosize, rather than
> "Relative to the paragraph with: 100%"
> - for frames for the images: I would set its Width to Autosize.
Agree. Let's make sure the "Graphic" frame style by default used for images is applied to images (it is highlighted but not effective, meaning the properties are different). This disabled the "Relative to" option and users can resize the surrounding frame. In addition, we have to insert a paragraph break after the image, and update the "Figure" paragraph style that is used for the caption so it has no unreasonable spacing to the graphic.
needsDevAdvice for missing technical considerations and perhaps code pointers.