Faq/Writer/AnchoringAndPositioning/en

How can I anchor and position graphic elements (images, objects)?
When working with the inserted objects and their positions in Writer, one should first try to understand two important concepts:
 * what anchoring the object means and
 * what positioning the object means.



Anchoring is what is there in the document content, to which this object is linked (some fundamental entity, such as a paragraph, or a character, or a frame): it means that when that entity moves in the document, the anchored objects may move with that entity. Anchoring creates semantical link between the text content and the inserted objects: the link means something like "this object helps to understand, or decorates, or otherwise relates to this part of document"; and naturally, when e.g. the paragraph goes a couple pages forth, it doesn't make sense that a picture that illustrates something in that paragraph would stay where it were, two pages behind.

There are five possible anchoring modes: To Paragraph; To Character; As Character; To Frame; and To Page. The latter one is very special. While the first four mean that an object is linked to some real fundamental document elements - paragraphs, characters, or frames, that actually constitute the document, - the To Page anchoring links objects with something ephemeral, dynamic in the world of text processing software, to something created and destroyed on demand: to a page number. Any given page is only existing there because there's some text that needs to be placed on a page. As soon as the text gets modified/reformatted, it might take less paper space than before, and any given page may become unnecessary. Or the text may grow, edits may insert content before any given text, and so any paragraph may move to following pages. But objects linked to "page number" would stay where they were, would not move anywhere; would cause blank pages to be kept - just to let the linked object stay there. There's nothing in the document that would let these objects move forward or backward - if you insert more pages "before" such objects, the objects would "jump" to "previous" pages, actually keeping anchored to the same "page number 3 in the document, no matter what".

In essence, all types of anchoring allow to define unambiguously on which page a given anchored object will be placed: for To Paragraph, To Character, As Character, To Frame, this is the page where the linked entity is placed; for To Page, it's a fixed page (as discussed).

But anchoring, while giving us the page on which the object is placed, doesn't yet describe the image position on the page (with the exception of As Character anchoring). In case of the four "floating" anchoring modes (To Paragraph; To Character; To Frame; and To Page), positioning plays role in placement on page (and even for As Character, it has some significance).

So, positioning is the way to tell where the object will be placed on the page; and that may be something "near the linked object" (meaning that the position on the same page may change when anchor moves two lines forward); or it may be "fixed to some place on page" (meaning that the object will be, say, in the top right corner of the page on which its anchor is, no matter where exactly the anchor is on the page: the anchor could be in the top left part of the page, or on the bottom right, but the image would not move, until the anchor moves to a different page, when the linked object would follow there, but again would stick to top right corner).

Positioning is always "relative" to something: current page (possibly one of its borders, or its text area, excluding margins); paragraph (allowing you to link the object to its left/right/top/bottom/center); character; or frame. The set of possible relational positioning options naturally vary with chosen anchoring, because e.g. only if you choose To Character anchoring, there's a meaningful "relative to character" positioning: otherwise, how would Writer know to which character you plan to align your image to?

Several floating objects anchored to different parts of text or to some pages may create problems with proper document layout, if their anchoring and positioning isn't carefully planned. If you invest into some experimentation with the concepts, learning the effects you get with different combinations of those, you will have no problems; but without that understanding, trying to use "intuitive" tools like dragging things around pages (and in the process, allowing Writer to guess for you the anchoring points and positioning settings), you will likely end up with very fragile layout, where adding a single character somewhere in the middle of document could ruin your efforts, and make a good amount of mess.

In the end of this too long text, I want to discuss one very useful, and often overlooked anchoring: As Character. It makes the inserted object just another - possibly very big - character; and as such, it will be positioned very firmly with the flow of the text, without any strange effects. One can make paragraphs consisting of a single image anchored As Character, and make following paragraphs its descriptions; one can use proper paragraph styles to make it look very neat and consistent; one will never get strange results when different As Character-anchored images overlap or behave otherwise unexpectedly. For this anchor type, only Vertical positioning is meaningful (allowing you to define how the inserted object will be placed relative to other parts of the string).