making graphics stay where you put them

If you've done much work positioning graphics in text, then you know how
difficult it can be to make sure that the graphics stay in place. In the past,
many experts have come up with recommendations about the best settings to use,
but these suggestions either don't work if you try to export to another format
or else have been made obsolete by changes to the program over the year.

In preparation for my upcoming book on OpenOffice/LibreOffice, I'm hoping to solve
this problem once and for all. Could anyone who is interested reproduce the
two methods below, then try to break them by copying and pasting, adding text
around the graphics, and anything else you can think of? I would be very
interested in hearing results, especially on platforms other than Linux.

Method #1: Right-click on a graphic, and select Picture -> Options -> Protect
_> Position and Size.

Method #2:

1. Turn off auto-caption in Tools > Options

2. Create table with 1 column, 2 rows. Set space above and below. Do not allow
to splilt across page or column, or keep with next paragraph, do not create
heading row.

3. Set space above and below table (multiple of line height)

4. Place picture in 1st row. If you have trouble placing it in a cell, space
down in the cell a few times before inserting the picture.

5. Position picture: either move using alignment or, if you want an
indentation from the left, adjust from right, subtracting space from the total
width of the table.

6. Add caption in second row. If graphic is indented, you will need to create
a caption paragraph style with an indent.

7. In table context menu, unselect Table Boundaries. For convenience, you may
want to unselect only before you print.

Thanks to anyone whose curiosity or need encourages them to join the
experiment.

Bruce,

Your post is very timely. I've been wrestling with a document containing 15 photographs with captions. I wanted to insert them into the text with text wrapping around the pictures. I made numerous attempts and often found myself trying to move or resize a picture just a little bit. When I tried, the picture suddenly changed to a different page (with either paragraph or character anchoring). At one point, I had a "sproingg!!" moment and found 6 pictures had jumped to one location and were piled on top of each other. I had placed these six images on 3 or 4 different pages.

I finally gave up and reverted to my reliable Atlantis and created a separate Appendix document consisting of a single picture on each page. I'm sure I could have done this with LO Writer, but Atlantis made the whole process so easy that I just used it to get the job done.

When I have a few more minutes, I'll try to recreate both of your methods to see how they work. I'll let you know how it works.

Virgil

Hi, Tom:

Mainly in relation to the wording around them.

Okay, Bruce, I just tried method 1 using LO 4.1.5.3 on Windows 7. I inserted about 11 pictures. I then resized them using a Frame Style I had previously set up. I then moved them into position where I wanted them and, once in place, I protected both their positions and size using your first method.

On a couple occasions, LO stopped responding for a few seconds, but it recovered. It was generally going well until I got to the 10th picture. After setting its size with my Frame Style, I just couldn't move it to my desired location. I kept trying when, "Sproing!!" The 10th picture got stuck in a footer and the 9th picture (on which I had already protected both size and position) suddenly resized itself, stretching from the top margin to the bottom margin. It had originally only covered about half the page from top to bottom. So, obviously the protect size and position didn't work.

Dang! I thought I had it.

Virgil

In the past, when I've had such problems, people have suggested using a desktop publisher, like Scribus. I probably should, but that's just another learning curve.

For my current project, I tried it on LO Writer, LyX, ReText (markdown), and Atlantis. Of the four, LO worked the worst.

Sorry, TDF, just calling it like it is (at least the way I perceive it). I'll assume it's user error, but with Bruce's question, it seems I'm not alone.

Virgil

Hi :slight_smile:
Do you mean position of the images in relation to the wording around them
or static on specific pages regardless of the text (or lack of) on that
page?
Regards from
Tom :slight_smile:

Virgil:

I didn't think it could be so easy.

I suspect that the second method may be more reliable. Frames seem to be wonky
in the latest releases, but tables seem to have fewer problems.

I think you've hit the nail on the head in terms of identifying the challenge for the LO developers. When positioning pictures, you want them both in a certain place on a page *and* you want certain text around them -- hence the anchoring option. Getting both is a real challenge. I think with Bruce's first method, the program (tries to) preserve the size and position of picture at a given point on the page. As I added and removed text around the pictures after preserving size and position, the pictures didn't move. That was what I wanted and, like I said, it worked well until I got too many pictures (10). Then the spring sprung.

Virgil

I wonder:

1. Is the number of pictures the problem? Or was there some way in which the
program was trying to do the impossible -- for instance, keeping a picture in
a position that was too small for it?

2. Could the anchor position have an effect?

3. What if the picture was placed inside a frame, and the frame size and
position protected?

I'm going to see what results I get in answering these questions. I'll post my
results, probably by tomorrow evening.

I don't have problems with placing graphics where I want them, but then again, I do not wrap any text around them. Perhaps this is the problem?
      I have a file created by LibreOffice 4.1.6 and 4.2.4 that has 73 graphics and 4 images. I have no problem keeping them where I put them. The name of the file is BG4204Forms20140501.odt. It is available for download athttps://wiki.documentfoundation.org/Documentation. You will need to scroll down to the Base Guide section of this web page.
      Another thought that may or may not have anything to do with the problem. These are the settings that I use in Tools > Options > Memory:
Undo steps: 20, Graphics cache Use for LibreOffice 252MB, Memory per object 2.0MB, Remove from memory after 1:00 (h:m), number of objects 252.
      When inserting a graphic, the following steps are used:
1. Create a paragraph style for the frames with the alignment centered and any other style properties needed.
2 Create an empty paragraph.
3. Create a frame anchored to this paragraph
4. Anchor the frame as a character
5. Insert the caption in the bottom of the frame.
6. Insert the graphic in the frame
7. Anchor the graphic as a character).

      Over the past 10 years or more I have been doing this without any problems in any of the chapters I have written for the ODFAuthors group.
      There is one more thing that I do that automates several of these steps: I use AutoText. It creates the frame with steps 1, 3, 4, and 5. This just leaves me to create an empty paragraph, insert the graphic, and anchor it as a character. In addition, I also resize the frame if I think it needs it.

--Dan

Thanks for your input. What operating system are you using?

I've tried the technique you mention, but for me (and many others), it doesn't
seem to work. I don't think that wrapping the text has anything to do with the
problem, because, if anything, graphics that don't have any wrap tend to stray
more often than those that do.

However, the memory settings may have an effect, so I'm going to do some
experiments. Perhaps the failure arises because not enough memory is allocated
for large graphics?

Hi :slight_smile:
Those are specialist tools each for a single purpose. They are mostly part
of the same eco-system as LibreOffice. LibreOffice is the only one that
does so many different things and is the only office suite. For example
Lyx is not a better spreadsheet program. So you are not being disloyal or
anything like that. Even if any of the other 3 were direct competitors it
would probably be better for us to know so that we could figure out how to
compete fairly.

Errr, it was Scribus that i meant earlier, not inkscape!
Regards from
Tom :slight_smile:

Hi :slight_smile:
I've had trouble with text not flowing into obvious white-spaces between
fairly large images. I've got a feeling that Draw might be better for my
newsletter but i've never had time to set-up the text-boxes and really give
it a fair go. Other people have been urging me to try inkscape for it but
i've always stuck to writer and just had fun with it.
Regards from
Tom :slight_smile:

Bruce, Virgil,

> If you've done much work positioning graphics in text, then you

know how

> difficult it can be to make sure that the graphics stay in place.

In the

> past, many experts have come up with recommendations about the best
> settings to use, but these suggestions either don't work if you try

to

> export to another format or else have been made obsolete by changes

to

> the program over the year.
>
> In preparation for my upcoming book on OpenOffice/LibreOffice, I'm

hoping

> to solve this problem once and for all. Could anyone who is

interested

> reproduce the two methods below, then try to break them by copying

and

> pasting, adding text around the graphics, and anything else you can

think

> of? I would be very interested in hearing results, especially on
> platforms other than Linux.
>
> Method #1: Right-click on a graphic, and select Picture -> Options

->

> Protect _> Position and Size.
>
> Method #2:
>
> 1. Turn off auto-caption in Tools > Options
>
> 2. Create table with 1 column, 2 rows. Set space above and below.

Do not

> allow to splilt across page or column, or keep with next paragraph,

do

> not create heading row.
>
> 3. Set space above and below table (multiple of line height)
>
> 4. Place picture in 1st row. If you have trouble placing it in a

cell,

> space down in the cell a few times before inserting the picture.
>
> 5. Position picture: either move using alignment or, if you want an
> indentation from the left, adjust from right, subtracting space

from the

> total width of the table.
>
> 6. Add caption in second row. If graphic is indented, you will need

to

> create a caption paragraph style with an indent.
>
> 7. In table context menu, unselect Table Boundaries. For

convenience, you

> may want to unselect only before you print.
>
> Thanks to anyone whose curiosity or need encourages them to join

the

> experiment.

      I don't have problems with placing graphics where I want them,

but

then again, I do not wrap any text around them. Perhaps this is the

problem?

I have a file created by LibreOffice 4.1.6 and 4.2.4 that has 73

graphics

and 4 images. I have no problem keeping them where I put them. The

name of

the file is BG4204Forms20140501.odt. It is available for download
athttps://wiki.documentfoundation.org/Documentation. You will need to
scroll down to the Base Guide section of this web page.
      Another thought that may or may not have anything to do with

the

problem. These are the settings that I use in Tools > Options >

Memory:

Undo steps: 20, Graphics cache Use for LibreOffice 252MB, Memory per
object 2.0MB, Remove from memory after 1:00 (h:m), number of objects

252.

      When inserting a graphic, the following steps are used:
1. Create a paragraph style for the frames with the alignment

centered

and any other style properties needed.
2 Create an empty paragraph.
3. Create a frame anchored to this paragraph
4. Anchor the frame as a character
5. Insert the caption in the bottom of the frame.
6. Insert the graphic in the frame
7. Anchor the graphic as a character).

      Over the past 10 years or more I have been doing this without

any

problems in any of the chapters I have written for the ODFAuthors

group.

      There is one more thing that I do that automates several of

these

steps: I use AutoText. It creates the frame with steps 1, 3, 4, and

5.

This just leaves me to create an empty paragraph, insert the graphic,
and anchor it as a character. In addition, I also resize the frame if

I

think it needs it.

Thanks for your input. What operating system are you using?

I've tried the technique you mention, but for me (and many others), it
doesn't
seem to work. I don't think that wrapping the text has anything to do
with the
problem, because, if anything, graphics that don't have any wrap tend
to stray
more often than those that do.

However, the memory settings may have an effect, so I'm going to do
some
experiments. Perhaps the failure arises because not enough memory is
allocated
for large graphics?

While other tools may be used for this it should be quite possible to achieve the same result with LibreOffice writer. Which suggests that a bug report is in order. Mind filing one?

Thanks,

Charles.

All:Forget about text. Just try pasting/importing graphics into a
        Calc cell. Anchor goes anywhere, strange things happen when you
        copy and paste cell, or resize column or row intersecting with
        cell. Graphics handling is so crap I can't believe these bugs
        are still in the latest release.Regards,Hedley

I wonder:

1. Is the number of pictures the problem? Or was there some way in which the
program was trying to do the impossible -- for instance, keeping a picture in
a position that was too small for it?

I know the picture would fit in the space I wanted it. However, my page position may have clashed with the anchor position (I was anchoring to a paragraph). But, when I wanted to move it to another page (by mouse dragging), it just wouldn't go. It kept bouncing back to the original position. And, if I dragged it across a footer, it suddenly got stuck there creating all kinds of problems.

I don't think it was about the number of pictures.

2. Could the anchor position have an effect?

I think, conceptually, that is a problem. You can anchor to page, paragraph, character, and "as character," whatever that means. Then, if your anchor is too close to the top or bottom of the page, then the graphic doesn't know where to go. The mere act of inserting the graphic *will* cause the anchoring site to move. And, if you preserve the position, it seems to preserve the position on the *page* without regard to where the anchor is. I had some pictures where the anchor was on the previous page as the picture. Then I found I could use the mouse to move *either* the graphics frame *or* the anchor site. I'm thinking there are just too many variables, at least for my limited brain.

3. What if the picture was placed inside a frame, and the frame size and
position protected?

Actually, that's what I was doing, albeit in a roundabout way. I have my pictures set to "Auto Caption." I've discovered that, when that happens, the picture frame is placed inside a separate frame that is slightly larger than the picture itself. Then the caption is placed in this larger frame. So, a captioned picture consists of *two* frames, one on top of the other. In fact, when I was preserving size and position, I had to do it to *both* the picture frame *and* the caption frame.

I'm going to see what results I get in answering these questions. I'll post my
results, probably by tomorrow evening.

I thought I would reload the document and try again. When I loaded the document, *all* of my pictures were out of position and distorted from top to bottom. When I tried to scroll the document, it crashed. It's now toast.

One other thought I had. I was using Linux Libertine G as my font. It has so many advanced typographic features that, in the past, I've had some stability issues with it, even in text files without graphics. But, those were addressed many versions ago, so I don't think it's the problem, but I just throw it out there as a possible contributing factor.

Good luck on sorting this out. Based on my experience, next time I need to insert graphics, I'll just use another program from the get-go and save myself hours of headaches. For me at least, it just ain't working with LO. Again, I won't discount the possibility of user error, but if that's the case, then I would suggest that perhaps this part of the program is so complex that user error is much too easy to achieve.

Virgil

w

If you've done much work positioning graphics in text, then you know how
difficult it can be to make sure that the graphics stay in place. In the
past, many experts have come up with recommendations about the best
settings to use, but these suggestions either don't work if you try to
export to another format or else have been made obsolete by changes to
the program over the year.

In preparation for my upcoming book on OpenOffice/LibreOffice, I'm hoping
to solve this problem once and for all. Could anyone who is interested
reproduce the two methods below, then try to break them by copying and
pasting, adding text around the graphics, and anything else you can think
of? I would be very interested in hearing results, especially on
platforms other than Linux.

Method #1: Right-click on a graphic, and select Picture -> Options ->
Protect _> Position and Size.

Method #2:

1. Turn off auto-caption in Tools > Options

2. Create table with 1 column, 2 rows. Set space above and below. Do not
allow to splilt across page or column, or keep with next paragraph, do
not create heading row.

3. Set space above and below table (multiple of line height)

4. Place picture in 1st row. If you have trouble placing it in a cell,
space down in the cell a few times before inserting the picture.

5. Position picture: either move using alignment or, if you want an
indentation from the left, adjust from right, subtracting space from the
total width of the table.

6. Add caption in second row. If graphic is indented, you will need to
create a caption paragraph style with an indent.

7. In table context menu, unselect Table Boundaries. For convenience, you
may want to unselect only before you print.

Thanks to anyone whose curiosity or need encourages them to join the
experiment.

       I don't have problems with placing graphics where I want them, but
then again, I do not wrap any text around them. Perhaps this is the problem?
I have a file created by LibreOffice 4.1.6 and 4.2.4 that has 73 graphics
and 4 images. I have no problem keeping them where I put them. The name of
the file is BG4204Forms20140501.odt. It is available for download
athttps://wiki.documentfoundation.org/Documentation. You will need to
scroll down to the Base Guide section of this web page.
       Another thought that may or may not have anything to do with the
problem. These are the settings that I use in Tools > Options > Memory:
Undo steps: 20, Graphics cache Use for LibreOffice 252MB, Memory per
object 2.0MB, Remove from memory after 1:00 (h:m), number of objects 252.
       When inserting a graphic, the following steps are used:
1. Create a paragraph style for the frames with the alignment centered
and any other style properties needed.
2 Create an empty paragraph.
3. Create a frame anchored to this paragraph
4. Anchor the frame as a character
5. Insert the caption in the bottom of the frame.
6. Insert the graphic in the frame
7. Anchor the graphic as a character).

       Over the past 10 years or more I have been doing this without any
problems in any of the chapters I have written for the ODFAuthors group.
       There is one more thing that I do that automates several of these
steps: I use AutoText. It creates the frame with steps 1, 3, 4, and 5.
This just leaves me to create an empty paragraph, insert the graphic,
and anchor it as a character. In addition, I also resize the frame if I
think it needs it.

Thanks for your input. What operating system are you using?

      I began using Mandrake (which became Mandriva) and then went to Ubuntu sometime before 2008. Sometime in this year, I got a MacBook using OS X 10.4 (Intel). (I have never updated the Apple OS. Instead, I have installed Ubuntu on it updating the version every year or two. But remember that there were members of the ODFAuthors group that used a Windows OS. They were producing chapters of the user guides with many pictures without the problems you describe.
      The individual chapters were combined using a master document, and then the latter was saved as an ODT file. This means the final ODT file had more than 100 graphics for each user guide in ODT format.

I've tried the technique you mention, but for me (and many others), it doesn't
seem to work. I don't think that wrapping the text has anything to do with the
problem, because, if anything, graphics that don't have any wrap tend to stray
more often than those that do.

However, the memory settings may have an effect, so I'm going to do some
experiments. Perhaps the failure arises because not enough memory is allocated
for large graphics?

      I would like to get an ODT file that has these problems with graphics that move around. Somewhere in the zipped ODT file might be a clue as to what is happening. Also, I might be able to spot something different in the styles being used. These are two possibilities that I can think of right now.

--Dan

I hate to say it, but in the realm of individual components, these programs *are* direct competitors.

Think about it. The database folks keep talking about other programs being better than Base. You have often written about Gnumeric being more useful than Calc. My Atlantis, while not nearly as full featured as Writer, is much easier to use (precisely because of its feature limitations), as well as fast and rock solid. Oh, and btw, while Atlantis is written only for Windows, it behaves very well in Ubuntu with Wine.

Yes, LO is an office suite, but how often do people actually use the integrated features of the suite? Once a year, I take an address list created in Calc and run it through Base, so I can print out labels in Writer for Christmas cards. Several years ago I did the same thing with Microsoft Works and it was *much* easier (and I am no fan of M$). Aside from that, I never import data from one component to the next. I use each component as a standalone program. The fact that a program is an integrated office suite means little if, for any one of its given components, there is a smaller, quicker, easier or more stable alternative.

So, I ask myself, instead of constantly wrestling with the depth of a complex office suite, would I be better off using standalone programs like Gnumeric and Atlantis?

Virgil

Aren't steps 3 and 4 inconsistent? How can a frame be anchored both to the paragraph and as a character?

Virgil

Hi :slight_smile:
Yes, but the 1 program/suite approach is convenient when you have to do
something only once a year or even less often and are able to do so with
fairly familiar tools, or at least with familiar support (such as this
mailing list)

Writer is not a truly amazing DeskTop Publishing program but it is pretty
good at all that and for me it beats Publisher and definitely beats Word in
producing good quality documents. When you don't need DTP and just want to
write a quick letter it's more obvious how to do things and easier to hunt
around the menus then the ribbon so it's easier to find new tricks.

I keep saying that Gnumeric is 'better than' Calc AND Excel but only in
cases where the person clearly needs a specialist program, or just to try
it out for a bit.

The database people talk about keeping the data separate and using Base to
manipulate the data and then passing the result seemlessly along to
familiar tools. This makes a lot more sense and keeps the whole thing much
more scalable. You can change the type of back-end to suit different needs
without having to redesign all the front-end stuff nor the
data-manipulation stuff.

Office Suites fill a very big niche and LibreOffice is the best fit for
that niche (ime), if only more people outside of these mailing lists would
realise it.
Regards from
Tom :slight_smile: