How can I set default anchoring for an image?

For my purposes (and I suspect nearly everyone else who uses Libreoffice) the only kind of anchoring that makes any sense is “Anchor as Character”.

It takes a lot of clicking to get each and every new image to line up the same way – is there a way to just make this happen in a setting?

“For my purposes (and I suspect nearly everyone else who uses Libreoffice) the only kind of anchoring that makes any sense is “Anchor as Character”.”

Absolutelly not. I am using the “to page” and “to paragraph” options mostly. I am using the he “to character” option for the very small (letter like) images only.

@Zizi64: as you’re now a “regular”, I assume you’re aware of the counter-intuitive properties of To page anchoring. Because of these, this mode is strongly discouraged for newbies. It anchors the frame to an absolute page and the frame will no longer follow text flow, resulting sometimes in undeletable blank pages between the last paragraph of the document and the frame/image.

To page should be reserved to desktop publishing-like work.

That said, my favorite anchor mode is also To paragraph.

@ajlittoz: “To page should be reserved to desktop publishing-like work.”

Yes it is true. My order is: I am using most frequently the “To paragraph” option, the second is the “To page”, and the less frequently used is the “To character” one.

@Zizi64: I use To character very rarely because it is rather difficult to anchor to a precisely designated character and it very easily reverts to To paragraph when editing. My second anchoring mode is As character.

When I insert a picture into Writer, the frame style “Picture” is applied to it. I can change the anchoring of that frame style and all new pictures will follow.

I have pasted multitudes of images (as from shopping sites) and it seems that “To character” usually works to place images wherever I want, and enables dragging images from one page to another in a odt document.

Yet sometimes To page is the anchoring that enables me to move one any where I want them within a page I pasted them, but does not allow dragging the image to another page. However, the To page option is missing under Tools ▸ Options ▸ LibreOffice Writer ▸ Formatting Aids.

AVOID AS MUCH AS YOU CAN To page!

This mode is not related to frame position within the page (which is achieved by the position parameters of the frame properties for any anchor mode except As character). To page will lock your frame to a physical page, whatever happens to your document when you edit it. Suppose you have anchored a frame to page 100 and subsequently truncate your document to 10 pages. You end up with 10 text pages, 89 blank undeletable pages and one page with the frame (p. 100).

To page is a DTP-like feature. Use it only when you are perfectly aware of the consequences and accept them.

While pasting an image as To page will prevent me from dragging it to another page (requiring cut and paste to do so) and may even initially paste someplace else, yet it is the only way I find that I can move an image wherever I want within text or sometimes along side other images.

Whereas in this context, the next best alternative, To Character, often results in the image being stuck someplace I do not want it to be, and resists being moved, if even possible.

Here is a link to an is a example of me trying to drag a image anchored as To Character but it will not move to be all within the page, whereas as To Page it will.

I do not like to waste space, and am often pasting images and or text together.

I thank God for those who provide LO just the same.

A screenshot is simply useless to diagnose problems, all the most when frames are concerned.

Using To page is a flaw in 90% of cases.

When dealing with frames, you need to consider not only the default anchor mode but also the area inside which frame position is constrained. Dragging a frame is limited to this area.

The only way to have full control is to set explicitly the constraints in the Type tab of the frame style. Even if you don’t use voluntarily these styles, Writer always selects one and what you change with mouse actions is turned into direct formatting over the style. To access this tab, either modify the frame style (if you style your frames without direct formatting) or right-click on the frame and Properties. The section Position defines the page sub-area into which the frame is jailed:

  • Paragraph text area: rectangle containing paragraph text
  • Entire paragraph area: previous area extended with indents and spacing
  • Left/Right of paragraph text area: indents
  • Page text area: the “active” area of the page (excludes margins)
  • Entire page: the full sheet from edge to edge
  • Left/Right of page text area: page margins

From left/From top allow you to ignore the constraints as they only create a reference point without enforcing “jailing”. Just give a negative position or one exceeding the dimension of the box.

You must understand that anchoring and positioning are two independent properties. Don’t confuse one for the other.

To character is rather hard to use adequately. It makes a difference with To paragraph only when the paragraph straddles a page break. Depending on the character anchor, the frame may be set in the page preceding the page break or the next page. Its usage is very tricky but allows to avoid leaving a huge blank space at bottom of page. However, as I said, it is very subtle to set it right.

1 Like

In addition:

General information on anchoring and positioning

I see there are many variables, and I just want to be able to quickly paste and drag an image wherever I want.

In the screen shot, both images were as To Character, with Horizontal Position being to Paragraph area and Vertical to Margin, but with the lower image being partly outside the document border. I have tried changing Horizontal Position of the lower image to another option, some of which moves it, but I still cannot move the image to where I want it.

Changing Horizontal Position to Character will move it to be within text, yet if I drag the image to where I actually want it, then it reverts to Paragraph area and thus extending beyond the border, as in the image. Though sometimes I can carefully get one to stay all within the borders, in the midst of text.

However, if i remove the top image then I can drag the second image where I want, in the midst of text, no matter what the Horizontal Position is.

Right now I am page 166 of a document full if images, mostly to help my Latino neighbors in shopping for needs, and save money, thank God. Thus images and text being together helps and saved paper.

The only reliable way to position images is to use frame styles or at least check Properties to add direct formatting. Dragging an image with the mouse result in many things happening under the scene. Since code is in control, you inevitably end up with the kind of problems you mention.

Regarding interaction of images, look at the Wrap tab and eventually tick Allow overlap. Your screenshot without any visual clues offered by View menu does not allow to evaluate the exact image extent (intrinsic size + optional spacing) and other properties.

Fixing tdf#90933, tdf#141161 and tdf#141162 is required to avoid the problems discussed here. Moving objects using mouse is quite normal, and insisting on using dialogs for such kinds of stuff is not OK: the layout of elements on page is some kind of art, which may need rounds of trials. The app should avoid combining several unrelated things together during mouse interactions, creating such problems; or at least, provide means to avoid these. The fine tuning and styling is very nice and important, but the current situation creates almost impenetrable gap, when people can’t use the app on very basic level, to be able to master more complex skills on their own pace.

2 Likes

@PeaceByJesus ,
According to the description on the requirements of easy insertion and moving of images, free positioning of text to the images, you should perhaps work with the presentation program Impress instead of Writer.
There you can select via the menu Insert > Media > Photo album whether you want to insert 1, 2 or 4 pictures on a page. You make the caption via the menu Insert > Text Box.

57386 HB How can I set default anchoring for an image.odp (30,6 KB)

@mikekaganski: I’m probably too demanding. My goal with “smart” frame styles is to get a predictable automatic positioning of frames both against the anchor paragraph and other frames. What I want is assign a style to a frame once inserted and see it jump to my expected position without the need for manual tuning except in very specific situations.
I admit it is very very tricky to get it right.
And there is still room for improvement, notably in anchor mode. Presently, anchor and frame must reside on the same page, sometimes leaving a huge blank space since there is not enough room for the frame and paragraph simultaneously. Some kind of “detaching” a frame from the text flow is desirable for advanced users so that the paragraph and frame are no longer an “atomic” block but the frame is put in some kind of pending state such that text flow is done as if the frame was not there and the frame is inserted as soon as it is possible. Paragraphs after the anchor are laid out in the blank space and the frame appears at top of next page.

Thanks. Never tried Impress, so i guess it is time to try.

Thanks for the articulate description.

From left/From top under To Character sometimes results in success, but usually nor, and is still unpredictable under the described scenario, but To Paragraph seems to be working. Thanks!

Well said. Thanks