19

When I paste an image into LibreOffice Writer, it is anchored "To paragraph" by default (as shown in the image right click menu -> Picture... -> Type -> Anchor).

Of course I can change this on a per-image basis, but I almost always want to use "anchor as character" rather than "anchor to paragraph".

Hence, can I change this such that images are pasted anchored "As character" by default? If so, how?

I'm using LibreOffice version 3.5.4.2. I did look through the options dialog but found nothing that seemed relevant.

5 Answers 5

7

The default anchoring option for inserting images can be setted from LibreOffice version 7.1,

Since version 7.1 is not published yet, you can get it from the pre release page: https://www.libreoffice.org/download/pre-releases/

Select Tools > Options > LibreOffice Writer > Formatting Aids > Image > Anchor you can select:

  • To Pragraph,
  • To Character or
  • As Character.

see image attached: Image Anchor Options

3
  • 2
    In 2022, this works perfectly. Previous answers were also correct at their time (in 2013 and 2015), but this should be accepted as the correct answer these days. Thank you!
    – Andrei B
    Jun 5, 2022 at 8:09
  • As of LibreOffice 7.3.4.2 this solution does not work when you paste an image copied from the same document, if the source image is anchored "To character".
    – mmj
    Jul 24, 2022 at 8:53
  • But there is no option to anchor "To page," which, as one working with hundreds of images (mainly temporary shopping) this is the only setting I have found that enables me to move an image anywhere I want in each page, which includes text (though dragging to another page will not work), May 22, 2023 at 13:35
6

According to this bug report you need to edit the file styles.xml, which is accessible if you unzip your document.

A workaround is to anchor one picture as character and create a "new style from selection" after selecting this picture. It is far from ideal, but the only other current option is to hack LibreOffice's files.

When the bug gets fixed, it should be much easier to change the default style.

6

I successfully opened my Text_with_images.odt file with an archive manager (Engrampa or FileRoller) and then edited styles.xml.

I found this:

<style:graphic-properties text:anchor-type="paragraph"

And edited that to this:

<style:graphic-properties text:anchor-type="as-char"

I saved changes in both files (styles.xml and then Text_with_images.odt). Then opened my Text_with_images.odt file in LibreOffice 4.2.8.2, inserted-from-file another image and voila! it was anchored as character (not paragraph).

1
  • This works. However... I was planning to paste a bunch of small images into the document in one batch. But if I try to paste more than one image into the document, it crashes. It does not crash with the default setting. Feb 6, 2023 at 10:18
3

Following the bug report, I modified the custom template I use for most of my documents, and it worked flawlessly. Every document created from that template gets the as-char anchor for graphics. you can probably do it in the default template so it works for every document you create. However, that template will get replaced every time you update LibreOffice.

1
  • For those of us less familiar with LibreOffice, could you post instructions on how to implement your solution?
    – MikeyE
    Sep 17, 2020 at 21:42
0

For me, the best user friednly alternative is the PicTool extension.

You cannot change the default behavior, but you can mass update.

After installing it you will get a new button at the beginning of the toolbar.

With no image selected you can:

  • Click the button
  • Select your anchoring and other preferences
  • Click Apply to update the properties of all the images in the document.

https://extensions.libreoffice.org/en/extensions/show/change-multiple-images-in-writer-pictool

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .