The mysteries of positioning pictures in LibreOffice & OpenOffice
Off the Beat: Bruce Byfield's Blog
Positioning picture has been a problem ever since LibreOffice and OpenOffice were OpenOffice.org -- and possibly before. Inserting graphics is no problem, but try to anchor, align, or indent, and the picture changes position, sometimes by a matter of centimeters, but just as often jumping to a different place entirely on the page, leaving users frustrated and uncertain about the solution.
Over the years, some palliatives have been discovered. Power Users know that things are more likely to go wrong with the default anchor, To paragraph, and will replace it with As character instead. Often, too, users are unaware that adding a caption throws a frame around a graphic, and choose one when they need to control the other. At other times, paragraph settings interfere with the picture settings. In a recent post to the Apache OpenOffice user's list, Regina Henschel also suggested that two pictures should not be attached to one paragraph, and that the Follow text flow option on a picture (or frame's) Type tab should not be unchecked (which it is in the latest LibreOffice version).
I also suspect -- but have not yet confirmed -- that the general memory options play a role. In both LibreOffice and OpenOffice, the handling of pictures seems to improve when the graphics cache is set to the maximum of 256 megabytes, the memory per object to 10 megabytes, and the number of objects to 40.
If documents use few graphics, and formatting is kept simple, some users may have no trouble with pictures whatsoever. In fact, one use claims to have had no troubles in ten years.
However, for those with more demanding requirements, the best solution was posted by Solveig Haugland, one of the first writers about OpenOffice.org, in 2009. Her solution was seconded by Jean Hollis Weber, another early writer about the application and currently the documentation lead for LibreOffice and ODF Authors.
If manipulating pictures is important to you, you should read Haugland's instructions in full. However, her basic instructions are:
1. Insert a picture on a blank line.
2. Anchor the picture as character.
3. Place the cursor in the empty line next to the picture, and select the Alignment.
The instructions go on to explain how to align vertically, add a caption, and correct common problems.
These instructions are useful, but even Haugland claims only that that they make pictures "reasonably manageable."Clearly, graphics in OpenOffice and LibreOffice are a wicked problem -- that is, one that has multiple causes, and can only be solved by workarounds and careful avoidance of settings that make what should be a simple act unacceptably complex.
The table workaround
Is there a way to keep pictures where you put them? Remembering problems I have had in the past with tab stops, I believe there is: by substituting tables for frames. The workaround has its own limitations, but so far they are fewer than any alternative I have encountered so far.
Here are the steps:
1. Make sure that Auto-Captions are turned off for tables in the options for Writer.
2. Create a table with 1 column and 2 rows (1 rowithout a caption). Turn off the settings to split across page or column, keep with next paragraph, and create heading row.
3. Set the space above and below table.
4. Place the picture in the first row of the table. Position it horizontally by adjusting its alignment or, if you want an indentation from the left, by subtracting space from the total width of the table.
5. Add the caption in the second row and format it.
6. Remove borders from the table. In LibreOffice, they will still be visible on the page, even in Print Preview.
Like using tables to layout HTML pages, this workaround is not elegant. Nor is it completely ideal. It has no text wrap, and, unlike with Auto Caption, captions are not listed as sources for cross-references automatically. However, you can compensate for the text wrap by using a table with 2 columns and a single row, placing the caption to the left or right of the graphic, and manually select the caption if you need it. So far, the greatest disadvantage I have discovered is that if you resize the picture within the table, adjust the table cells can be difficult.
However, using a table to position pictures has the advantage that it keeps pictures where you place them, and most features that determine position can be edited with the precision instead of avoided altogether. Until someone discovers a better workaround or positioning pictures becomes less of a problem, I offer it as the most practical of the mediocre alternatives available.
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.