[Solved] Background for Heading

Discuss the word processor
Post Reply
Jan van Leyden
Posts: 5
Joined: Fri May 11, 2018 12:13 pm

[Solved] Background for Heading

Post by Jan van Leyden »

I have set my text in two columns and introduced section breaks to have the Heading1 style run over both columns. Now I want to use a decorative background graphic surrounding the Heading1.

When defining it using the Heading1 paragraph style, I encounter two problems:
  • The vertical dimension of the section containing the heading doesn't adapt to the size of the graphic
  • I cannot manipulate the position of the graphic relative to the heading text
I could generate separate graphics including the heading text for each chapter, but I do hope there's a more elegant way...
Attachments
DLC1-3-LayoutProblem.odt
Demo file for demonstration
(45.68 KiB) Downloaded 90 times
Last edited by Hagar Delest on Wed Jun 06, 2018 9:59 pm, edited 2 times in total.
Reason: tagged [Solved].
OpenOffice 4.1.2 on Windows 7 SP1
User avatar
Zizi64
Volunteer
Posts: 11352
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Background for Heading

Post by Zizi64 »

I have set my text in two columns and introduced section breaks to have the Heading1 style run over both columns. Now I want to use a decorative background graphic surrounding the Heading1.

When defining it using the Heading1 paragraph style, I encounter two problems:

The vertical dimension of the section containing the heading doesn't adapt to the size of the graphic
I cannot manipulate the position of the graphic relative to the heading text

I could generate separate graphics including the heading text for each chapter, but I do hope there's a more elegant way...
Please upload your ODF type sample file here.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Jan van Leyden
Posts: 5
Joined: Fri May 11, 2018 12:13 pm

Re: Background for Heading

Post by Jan van Leyden »

I've added the demo file illustrating the problem.

---Jan van Leyden
OpenOffice 4.1.2 on Windows 7 SP1
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Background for Heading

Post by keme »

Format - Background - Type: Area
I don't have the English version installed, so not sure about the "Area" option. It may be called something else. It's the second of 3 options.

Not much space around the text with this approach. The image only fills the line height used by actual text, not the paragraph spacing. You can increase it by inserting linefeeds (empty lines), but that may mess up ToC entries.

Workaround:
If you add a border line to the paragraph, you can add text-to-border spacing. In this case, the image area will stretch to fit the full area within the box. Note that the border will cover part of the background image, but if you use a thin line in paper color (white) it may go unnoticed. In the attachment I used a black border.
Attachments
Framed.odt
(42.76 KiB) Downloaded 87 times
Jan van Leyden
Posts: 5
Joined: Fri May 11, 2018 12:13 pm

[Solved] Re: Background for Heading

Post by Jan van Leyden »

Hi Keme,thanks for your hint! It worls! But apparantly only on a single instance, of the heading, not on the Heading style?

OK, scratch that. Me too dumb to select Graphic instead of Color. :crazy:
OpenOffice 4.1.2 on Windows 7 SP1
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: [Solved] Re: Background for Heading

Post by keme »

Jan van Leyden wrote:Hi Keme,thanks for your hint! It worls! But apparantly only on a single instance, of the heading, not on the Heading style?

OK, scratch that. Me too dumb to select Graphic instead of Color. :crazy:
Yes. While I worked on your sample file I noticed that the background was set explicitly on the first heading, not on the "Heading 1" style. Thought I'd mention it, but then I forgot. :oops:
You figured it out by yourself. Good job!
Post Reply