Widow Orphan controls to keep with header?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
kelly_hochanadel
Propeller Head
Posts: 43
Joined: Mon Sep 23, 2013 3:36 pm

Widow Orphan controls to keep with header?

Post by kelly_hochanadel »

The documentation explaining the way the widow and orphan controls work is useless to me. What I'm trying to figure out is how I can prevent a situation where I have a heading with little or no content after it at the bottom of a page; however, it appears I can only set this at the style level and the style applies only to the heading or the paragraph, not both.

I suppose another option would be to set page-break-before on all the heading levels, but this would give me way too many pages potentially.

If only everyone would use the web like they're supposed to!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Widow Orphan controls to keep with header?

Post by ChoccieMuffin »

I have a generic "PageBreakBefore" style that I use to adjust headings where that happens. Most of the time the settings I have applied to p and H work ok, but sometimes it needs a little help.

Also have .KeepTogether, .KeepWithNext, .KeepWithPrevious, for the same reason.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Lydia
Sr. Propeller Head
Posts: 373
Joined: Tue Apr 23, 2013 3:19 am
Location: The Netherlands, Amsterdam Area

Re: Widow Orphan controls to keep with header?

Post by Lydia »

Widow/orphan control is used to keep things together within a paragraph, for example within a <p> tag. This would not work across paragraphs, so for an <h2> and some <p>'s, like you seem to look at.
For the situation where the heading should not appear alone at the bottom of the page, you can set the page-break-after to ávoid for that style.
I have no idea how to automatically control how many paragraphs have to follow a heading.
Using Flare 10.2 and Flare 11 on Win 7
andy_smith
Propeller Head
Posts: 24
Joined: Wed Jun 16, 2021 5:41 am

Re: Widow Orphan controls to keep with header?

Post by andy_smith »

Hi ChoccieMuffin. I'm coming to this problem a few years after this was raised having just started with Flare. You said you have a generic page break before style and a keep with next/previous/together style. I have found an example of page break before in some of the legacy documents I'm working on but I can't find any examples of keep with next/before, etc. Could you paste me a bit of code that shows how this works?

I've found the Orphan/Widow control option on the Show tags dropdown but having Orphan/Widow control switched on doesn't seem to prevent even fractions of single lines after an automated page break. Is there a hidden setting I need to configure?

I'm working in PDF output if that gives a bit of context.
I'm on UK time (UTC+0). I work Tuesday, Wednesday and Thursday so I may not see replies outside of those days.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Widow Orphan controls to keep with header?

Post by ChoccieMuffin »

andy_smith wrote:Hi ChoccieMuffin. I'm coming to this problem a few years after this was raised having just started with Flare. You said you have a generic page break before style and a keep with next/previous/together style. I have found an example of page break before in some of the legacy documents I'm working on but I can't find any examples of keep with next/before, etc. Could you paste me a bit of code that shows how this works?

I've found the Orphan/Widow control option on the Show tags dropdown but having Orphan/Widow control switched on doesn't seem to prevent even fractions of single lines after an automated page break. Is there a hidden setting I need to configure?

I'm working in PDF output if that gives a bit of context.
Hi. This is an extract from my stylesheet, with several of my generic styles that deal with spacing. These are only needed for my Print output:

Code: Select all

	.KeepWithNext
	{
		page-break-after: avoid;
		page-break-before: auto;
		page-break-inside: auto;
		column-break-after: auto;
	}

	.KeepWithPrevious
	{
		page-break-inside: auto;
		column-break-after: auto;
		page-break-after: auto;
		page-break-before: avoid;
	}

	.KeepTogether
	{
		page-break-inside: avoid;
		page-break-before: auto;
		page-break-after: auto;
		column-break-after: avoid;
	}

	.PageBreakBefore
	{
		page-break-before: always;
		column-break-after: auto;
		page-break-after: auto;
		page-break-inside: auto;
	}

	.AllowBreakInside
	{
		page-break-inside: auto;
		page-break-before: auto;
		page-break-after: auto;
		column-break-after: auto;
	}
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply