Help needed with page breaks

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Help needed with page breaks

Post by DahcNosserb »

Over the past day, I've been attempting to create a new topic, with a list using headers to style the list items. Every new header style (h1 to h2 for example) creates a page break! I've tried every conceivable combination using page-break avoid, column-break avoid, etc. etc. Even the text coding doesn't indicate what the problem is. I know I'm missing something, but finding the info on how to work page breaks has not been satisfactory. So... what am I missing? :-)
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Help needed with page breaks

Post by devans »

Sounds like you are doing the right things. I can only suggest that you check you are changing the style in the correct medium, i.e. either the Print or Non Print medium.
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Thanks for the response. I will continue to tinker with the page break combos.

Layout is "print". Medium is "print".
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Still adding a page break when I format a <p> to an <h3>. I've tried setting the "avoids" at the body level and/or the paragraph level and still getting unwanted page breaks.

It'd be great if there were a magic button in Flare: no pages breaks between headers in this print output ever. :-)
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Here is a screen shot of my settings (for <p>).
You do not have the required permissions to view the files attached to this post.
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Help needed with page breaks

Post by devans »

I'm still using Flare v11 but here's what my settings look like for a heading level - under the Print Support setting.
You do not have the required permissions to view the files attached to this post.
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Just happened to think... could it be orphan control, instead of page break? My orphans are set to 2. Would that override the page break settings?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Help needed with page breaks

Post by ChoccieMuffin »

A suggestion for you. Add a generic class, call it .NoPageBreak or similar, and in the stylesheet it should look something like this:

Code: Select all

.NoPageBreak
{
page-break-before: avoid;
}
Go ahead and make all your assorted heading levels, then apply the .NoPageBreak class to the headings that are misbehaving.

Should do the trick.
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
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Thanks for all the help so far. I added the .NoPageBreak as a generic class to the stylesheet. Not exactly sure how to apply it to a specific heading in that stylesheet.

Some of the minor quirks have been resolved, but the main one has not. One the first page, all of the headers are applied and they respond nicely in a list kind of fashion as they have been styled. Until I get to the bottom of the page. The first 3 <h5> apply nicely, then the last one at the bottom of the page... when I apply <h5> to the last item (from <p>), the page breaks between the <h1.PageTitle> and <h1>, pulling everything from the very first <h1> (below) the <h1.PageTitle> down onto the second page, leaving the <h1.PageTitle> alone on the first page. And I think I've tried a bzillion combinations (even after adding .NoPageBreak) on the page-break settings, but I still get a break between <h1.PageTitle> and <h1> when I apply the last one at the bottom of the page.

I'm missing something. The issue would seem to be either with <h5> or <h1.PageTitle> or <h1>, but all of the settings look the same. And <h1.PageTitle> is based on <h1> (parent/child) so not sure why .NoPageBreak would work for one and not the other.

One other thing, though. This occurs every time there's a new page involved. So... in the last instance, I decided to leave the page break be and begin putting headers on the items on page two. Once again, got to the bottom of the page. This time everything worked like a charm until I got to the last item on the page. The first four <h4> headers worked... the last <h4> applied, boom, another unwanted page break, this time leaving a <h5> item alone at the top of page two.

And further help would be appreciated.
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Help needed with page breaks

Post by devans »

Could it be a Keep With Next setting? Word has it; I'm not certain about Flare.

Actually, I've just looked in these forums and there's a topic that might be relevant (if you haven't seen it already): viewtopic.php?f=10&t=28325

Dora
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

One more quick question.. do I make the page break changes in the Medium (default) or Medium (print)? I have been making all of my changes in "Medium print" since I will not be using "pages" in my HTML5 output.
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Help needed with page breaks

Post by devans »

For some reason, I thought you were producing PDF output? In which case, you should definitely make the changes in the Print medium.
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Sorry for the confusion. Yes... I am producing a .pdf output, hence all the questions.

However, this is Single Source. :-) So... there will be an HTML5 output as well. Being new to Flare, it has been a source of constant confusion... opening StyleSheets and Topics and bouncing around them making changes on all sorts of things, only to realize when I opened them in the editor, it defaulted to Medium: default instead of Medium: print. That's happened a couple of times now. One of these days, I'll get used to riding the new bike. :-)
devans
Sr. Propeller Head
Posts: 108
Joined: Thu Sep 09, 2010 9:56 pm
Location: Sydney Australia

Re: Help needed with page breaks

Post by devans »

I think it's caught everyone out at some stage or another. :D
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

It's still not working. I'd like to try the example given in the "Keep with Next" page you provided the link for, but I've tried to start over and zero out all of the page break settings and just can't. Some of these page breaks are being controlled (inherited) somewhere up the chain and I've tried to trace it and still can't find it. Almost like MadCap hard-wired some of the settings in. Don't know. I still have the page break issue. Right now.. all of my headers (<h1> - <h6>) have all 3 page-break settings to avoid... page-break-after: avoid, page-break-before: avoid, and page-break-inside: avoid. Still getting the unwanted page break for the first item on a page when and heading is applied to the last item on a page.

Attached is the screenshot of my h1 settings.
You do not have the required permissions to view the files attached to this post.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Help needed with page breaks

Post by ChoccieMuffin »

I think someone has identified the problem, which I reckon is to do with some or all heading styles including "page-break-after: avoid" (the equivalent of KeepWithNext) so can you do something for us so we can see what you're working with?

Open your stylesheet in a text editor and show us what the styles are for your headings. That will help us to spot the problem.

As for how to apply a generic style, depending on what medium you used to create your generic style, the generic style should be visible at the top of your Styles window. To apply it to, say, a h3, click in the h3 and then click the ".NoPageBreak" style. At the top of your Styles window you'll now see the style shown as "h3.NoPageBreak", and if you look in the text editor it will show "<h3 class="NoPageBreak">".

(By the way, if you already have a class applied to a heading you can't just add this class using the Styles window, you have to add it in the Text Editor, so you'd be changing "<h3 class="MyClass">" to "<h3 class="My Style NoPageBreak">".)

Nearly there!
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
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Here's the screen capture of the css in text editor.
You do not have the required permissions to view the files attached to this post.
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

More brainstorming here... given I've monkeyed with the text editor and the page-break settings and still haven't been able to make this work.

Would it be best for me to load a different template and start over? At the start of this project, I picked one of the pre-existing MadCap templates for the project (Tri-Pane and Advanced PDF) rather than the plain one (Empty). Which makes me wonder if I am attempting to format the Table of Contents on the pre-formatted cover page, rather than a blank page? I should see that in the text editor, no?

One other data point: this topic was created using TopicForTOC.htm rather than NewTopic.htm. Does that come with pre-formatting that might be an issue?

The last item on the page continues creating a page break between the list of items and the top header item.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Help needed with page breaks

Post by ChoccieMuffin »

I'm assuming you want to do this so you can add the content after each heading - is that correct? If so, you can solve the problem really simply by just adding a <p> (of whatever class you're going to use for your body text) after each heading. Would that work for you?

Alternatively, remove all the "page-break-before" lines after h3, h4, h5 and h6 - I can't believe you'd need to have a page break before anything other than your main heading, and perhaps your second-level heading. That should hopefully solve your problem.

And I meant to mention how to add the generic class. At the very beginning of the medium, add the following:

Code: Select all

.NoPageBreak
   {
   Page-break-before: auto;
   }
(I'm sure there's a way to add a generic class using the Flare interface but I never use it so can't give instructions for that.)
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
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

I'm using the headers to format the Table of Contacts that will be used for both an HTML5 output and a print project. The headers will help navigate in the HTML5 project. But I should be able to use them to simply format the Table of Contents for print, much like I already use the headers to do the same thing in Word. The problem with adding a <p>, as I see it, is that it creates an unwanted space between Table of Content items. Or is there a way to do that without affecting the "look" of the page?
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

Here is what it looks like with the MadCap interface...
You do not have the required permissions to view the files attached to this post.
DahcNosserb
Propeller Head
Posts: 16
Joined: Thu Sep 07, 2017 10:46 am

Re: Help needed with page breaks

Post by DahcNosserb »

When you say "at the beginning of medium", you mean like this:
You do not have the required permissions to view the files attached to this post.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Help needed with page breaks

Post by ChoccieMuffin »

DahcNosserb wrote:When you say "at the beginning of medium", you mean like this:
Exactly.

Why are you trying to create a manual table of contents? Flare generates one for you, based on the headings and structure in your Flare TOC.

I don't have a link to hand but I suggest you take another look at the Getting Started bits in Help, as I think you're doing something you really don't need to do.
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
SusanL
Propeller Head
Posts: 77
Joined: Thu Nov 13, 2008 6:50 am
Location: Atlanta metro

Re: Help needed with page breaks

Post by SusanL »

Have you checked to see how your page layout is set for the TOC headers? Open the TOC editor and right-click the topic and select properties:
chapterbreak.png
The Break Type should be set to None if you don't want a page break.
You do not have the required permissions to view the files attached to this post.
Post Reply