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
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.