It is not clear in your sample file how you “reference” the image from text because you removed too much meaning from the document.
Present Writer does not offer a “deferred” positioning mode when there is not enough room remaining in the page for both the anchor and the image (frame). By “deferred” I mean Writer notices there is a problem and defers inserting the frame until it has the opportunity to do so. The current implementation treats the anchor point (and therefore the anchoring line) and frame as an atomic block. Depending on paragraph properties and frame position settings, this atomicity may extend to the whole paragraph.
The size of the image (frame) is liable to contribute to more frequent waste space.
If your image can be made “independent” from the text, i.e. its position doesn’t really matter for the reader, the case can be fixed by modifying the logic of the document. The point here is to detach the frame from the sequential flow of the document (where the waste space situation arises because of the constraint on same page location of anchor and frame). You must change the document in such a way that your images are “side-accessories” to the discourse, not part of its argumentation sequence.
Then, you can use DTP techniques.
My suggestion is caption your images and reference them in text through their captions. Something like “As is shown in figure 314, highlight colour emphasises the transition between two domains”. Figure 314 is inserted independently from the text and you handle manually repositioning of the figures, should your edits separate too much the figure from its reference.
The suggested approach is:
- insert a frame for the caption, anchored To page
- I recommend Wrap Off mode for a reason developed below
- type your caption, using a number range for consistent numbering across the document (allowing automatic renumbering when you move the frame)
- insert your image in the caption, anchored To paragraph
You have two frames linked to each other. This is where things may go awry. I remind you that frames are a way to escape from the limits set by margins or other containers. You have no way to constraint automatically a frame inside any other. So, to avoid strange formatting, I recommend Wrap Off.
However, in the case of “small” images, you want text flow on one or both sides of the image, then insert it As character in its own paragraph above or below the caption inside the frame. Then the image is jailed in the frame and you may feel more comfortable with it.
When you completely segregate your images from the text, this is one of the rare cases where To page anchor mode is legitimate. However you must be aware that you may need to manually shift your images after edits to eliminate undeletable pages when you reduce the number of pages in your document. To page anchor is VERY SPECIAL and you must understand all the consequences.
Also, it is preferable to work with styles, here frame styles which are quite awkward and difficult to tame.
Here is your sample file reworked with the two possibilities:
Test_Image_Placement-ajl.odt (340.2 KB)