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
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
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.