Bug 52153 - EDITING: [Feature request] Add new anchor options for graphics -> anchor to multiple paragraphs
Summary: EDITING: [Feature request] Add new anchor options for graphics -> anchor to m...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-16 14:29 UTC by S K
Modified: 2014-10-05 18:03 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
file used in the picture (17.68 KB, application/vnd.oasis.opendocument.text)
2012-07-16 14:29 UTC, S K
Details
document before inserting new lines (55.82 KB, image/png)
2012-07-16 14:30 UTC, S K
Details
document after inserting new lines (66.29 KB, image/png)
2012-07-16 14:31 UTC, S K
Details

Description S K 2012-07-16 14:29:18 UTC
Created attachment 64276 [details]
file used in the picture

Problem description: 

Currently LibreOffice allows anchoring graphics to paragraph. This is useful when graphics is about to jump to the next page. On previous page a lot of empty space can stay. In this case the paragraph jumps before the graphics and fills "some" of empty space. But there are cases when there is place for more paragraphs.

See the first picture (paragraphBEFORE.png). When we  (at the beginning of the document) add some text (new lines) we get the second picture (paragraphAFTER.png). On first page bellow there is still a lot of free place. Is it possible to adjust that other paragraphs jump to this free place?


This is a must to have feature for technical documents. 

Similar problem is seen there: http://listarchives.libreoffice.org/global/users/msg16753.html



Platform (if different from the browser): 
Browser: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1
Comment 1 S K 2012-07-16 14:30:16 UTC
Created attachment 64277 [details]
document before inserting new lines
Comment 2 S K 2012-07-16 14:31:26 UTC
Created attachment 64278 [details]
document after inserting new lines
Comment 3 S K 2012-07-16 15:38:11 UTC
This is 8 years old issue.

https://issues.apache.org/ooo/show_bug.cgi?id=35545

Cited main idea from ticket:
"If the anchor point for the graphic is less than 25% into the page, insert the
graphic in place; otherwise, move the graphic to the next page AND BRING THE
TEXT THAT FOLLOWS THE GRAPHIC FORWARD, SO THAT THERE IS NO BIG GAP OF VERTICAL
WHITE SPACE ON THE CURRENT PAGE".
Comment 4 S K 2012-07-19 16:43:59 UTC
Additional notice. 

Current problem can be partially solved with SHIFT+ENTER (creating new lines without creating new paragraphs). So we have then one big paragraph.

But the problem is that in this case it's not possible to make the paragraphs not to split.

Because of that we would need "anchor to multiple paragraphs". See Bug 52274 for wish that pictures don't split paragraphs too.
Comment 5 Joel Madero 2014-07-20 18:42:57 UTC
So just to clarify what is being requested is that you could select many paragraphs and attach an image to all of them and then the system would make some kind of calculation to guess at where you want the image to be?  Honestly this does not sound feasible at all. If you attach the image to let's say paragraph 2 and paragraph 3 in your image, then the image just "jumps" around depending on how many spaces there are. It seems like the better solution is just for the user to attach the image to the right paragraph - in this case, it would be paragraph 4 so that the other paragraphs jumps to page 1.

I am marking this as NEEDINFO - please give us a bit more insight of what you are looking for. If it's as I described above, this seems to me to be very difficult and not horribly efficient (because the image would jump around without user moving it depending on . . . well I'm not exactly sure to be honest. I think it's not safe to have a computer guess at what paragraph is most efficient for an image to be attached to. 

Workaround - User attaches the image to the page until writing is done, then attach to relevant paragraph once no more writing is needed. This way location of image is preserved and the computer isn't moving the image around between paragraphs.

Once you provide more please set to UNCONFIRMED. Apologies for the long delay
Comment 6 S K 2014-07-20 19:09:22 UTC
(In reply to comment #5)
> So just to clarify what is being requested is that you could select many
> paragraphs and attach an image to all of them and then the system would make
> some kind of calculation to guess at where you want the image to be? 
> Honestly this does not sound feasible at all. If you attach the image to
> let's say paragraph 2 and paragraph 3 in your image, then the image just
> "jumps" around depending on how many spaces there are. It seems like the
> better solution is just for the user to attach the image to the right
> paragraph - in this case, it would be paragraph 4 so that the other
> paragraphs jumps to page 1.
> 
> I am marking this as NEEDINFO - please give us a bit more insight of what
> you are looking for. If it's as I described above, this seems to me to be
> very difficult and not horribly efficient (because the image would jump
> around without user moving it depending on . . . well I'm not exactly sure
> to be honest. I think it's not safe to have a computer guess at what
> paragraph is most efficient for an image to be attached to. 
> 
> Workaround - User attaches the image to the page until writing is done, then
> attach to relevant paragraph once no more writing is needed. This way
> location of image is preserved and the computer isn't moving the image
> around between paragraphs.
> 
> Once you provide more please set to UNCONFIRMED. Apologies for the long delay

The first idea was as described by you in the first point. Nevertheless, I agree with you that this workflow is not suitable for WYSIWYG. Figures should not jump around in "undefined" manner when user types.

The main idea was to optimize figure placement (see Latex) but it is hard to achieve it interactively. 

Maybe better approach would be to implement a new command (plugin): "Optimize figures placements", which optimizes figures placements in relation to some parameters (e.g. allowed positions of figures). What do you think?
Comment 7 Jean-Baptiste Faure 2014-10-05 18:03:04 UTC
I am non very confident with automatic placement of figures. Indeed when you anchor a figure to a paragraph, it is not only because there is room to place it. It is for good understanding of the text too. For example I prefer to have the figure I refer in a paragraph to on the same page. If needed, I prefer to move the paragraph and the figure instead of anchoring the figure to another paragraph.

Best regards. JBF


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.