How do you have a page break for each topic?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

How do you have a page break for each topic?

Post by NorthEast »

I'm generating a Word output and I need to have a page break for each new topic.

By default, Flare seems to put in page breaks for h1 headings (using the page-break-before property).

However, the topics in my project don't always start with a h1 heading, some have content placed above the heading.

So, I can't use a page-break with a h1, but I do need to insert a page break for each new topic. I can't see how you do this, any ideas?
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: How do you have a page break for each topic?

Post by KevinDAmery »

You could try making a generic class with the page break before attribute. Then you could just apply that class to the first heading or block in the topic.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
siskamoens
Propeller Head
Posts: 85
Joined: Wed Mar 21, 2007 3:01 am
Location: Belgium
Contact:

Re: How do you have a page break for each topic?

Post by siskamoens »

What you could do is to start a new section on every topic, that would include a section break in Word before each topic. You can do that in the TOC. Make sure you're in grid view, select all topics (ctrl-a will do the trick), press F4 to bring up the properties window, click the Printed Output tab and check "Start a new section".

But it seems a bit odd to start a new page for every topic, regardless if it starts a new chapter or not...wouldn't it be more useful to specify to start a new page on every H1 and H2 for example?
Otherwise you could create a new style that you apply to the first paragraph of every topic and assign the "start a new page" to that particular style. You could even make it a practically invisible style (very small, white, ...) if you don't want to add some additional "header" text at the top of each topic.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How do you have a page break for each topic?

Post by NorthEast »

siskamoens wrote:But it seems a bit odd to start a new page for every topic, regardless if it starts a new chapter or not...wouldn't it be more useful to specify to start a new page on every H1 and H2 for example?
The problem is that my topics don't always start with a h1 heading, some have a div tag above the h1 (that contains navigation links, and is floated right in WebHelp output).

Thanks for the ideas. I know I can add breaks by applying a style to the top/bottom of each topic, but I was hoping to avoid manually inserting the page breaks as I've got 4000+ topics.

I've tried all sorts of things. Annoyingly Flare seems to ignore the page-break-after/before property if it's used anywhere in a master page, so I can't figure out how to add page breaks automatically.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: How do you have a page break for each topic?

Post by KevinDAmery »

Dave Lee wrote:The problem is that my topics don't always start with a h1 heading, some have a div tag above the h1 (that contains navigation links, and is floated right in WebHelp output).
Ok.... can you put that navigation div in a master page? Then you could have a heading at the top of the topic and not run into trouble. If you need some topics to have the nav and some not, you can use more than one master page to get around it.

This wouldn't work if the nav content is different for each topic, but if it's something you can do in a common way then it would probably get you out of the bind.

EDIT: Ok, here's another idea. Presumably the navigation div is only for online output and the page break is only for print. So, apply a screen-only condition to the nav div, and set the media@print of your H1 style to page break before. That way they shouldn't fight with one another.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How do you have a page break for each topic?

Post by NorthEast »

Unfortunately the div block needs to be in the topic (as it contains 'see also' links).
Using a condition tag to exclude it from the Word output would work ok, but then I'd have to apply that to all the 4000+ topics.

I also tried setting the media@print style for the div tag to display:none, but it still gets included in the Word output.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: How do you have a page break for each topic?

Post by KevinDAmery »

Hmmm... is there anything unique about the divs, like a name or class? If there is, you may be able to use find/replace to add the condition=screen only attrib to it. Something like this:

Find:
<div class="NavLinks">

Replace:
<div class="NavLinks" MadCap:conditions="Default.ScreenOnly">

If that's workable, then Flare can go through the 4000 topics for you.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How do you have a page break for each topic?

Post by NorthEast »

Yep, I can do that - I think that's the only way it's going to work.

One other thing, is it normal for the Word output not to include any content that's on the master page (e.g. paragraph text)? It'll include content that's inside a header/footer proxy, but anything else on your master page isn't included. I'm not sure why it behaves differently to help outputs in this respect.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: How do you have a page break for each topic?

Post by KevinDAmery »

Hmmm, I guess it is - I remember trying to put a banner on the first page of sections using master pages and not being able to get it to work either.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: How do you have a page break for each topic?

Post by Richard Ferrell »

If you know that all of your topics are H1 or H2, then in the Print Support in the stylesheet put a page break before, that way each H1 or H2 would start on a new page
Richard Ferrell

Certified Madcap Trainer
Image
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: How do you have a page break for each topic?

Post by LTinker68 »

KevinDAmery wrote:Hmmm, I guess it is - I remember trying to put a banner on the first page of sections using master pages and not being able to get it to work either.
I have a masterpage for the "welcome" topic and a different one for the other topics. I have a copyright notice on the masterpage for the welcome topic and it displays. Make sure it's still inside the <body> tag when you add it. Although, now that I think about it, I have the copyright in a DIV tag so that it would be absolutely positioned at the bottom of the page and I had to manually add the div to the masterpage via the Internal Text Editor. I might have been able to put it in through the GUI. But if putting it in like a regular paragraph doesn't get passed along with the masterpage, then try putting it in a DIV tag.

And now that I think on it some more, I never generated print output for that project. Does content on your masterpages display in online help but not print, or is it not displaying in either type of output?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: How do you have a page break for each topic?

Post by KevinDAmery »

LTinker68 wrote:And now that I think on it some more, I never generated print output for that project. Does content on your masterpages display in online help but not print, or is it not displaying in either type of output?
The problem seems to be print specific. I can use the banners I was talking about easily for online output (I put them in the top of each topic so that customers have an easy visual way to determine which part of our application the topic applies to) but I haven't been able to get them to work in Word output when they're part of the master page.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How do you have a page break for each topic?

Post by NorthEast »

Richard Ferrell wrote:If you know that all of your topics are H1 or H2, then in the Print Support in the stylesheet put a page break before, that way each H1 or H2 would start on a new page
Unfortunately they aren't, about 50% of the topics have some content above the H1 heading, so I can't set a page break before the H1.

What I want to do is to set up the project so that it has a page break for each topic, whatever the content of that topic. I know I can use the page-break-before/after property with a style. However, this only seems to work when that style is used within the topic, and it doesn't work when it's used in a master page.
KevinDAmery wrote:The problem seems to be print specific. I can use the banners I was talking about easily for online output (I put them in the top of each topic so that customers have an easy visual way to determine which part of our application the topic applies to) but I haven't been able to get them to work in Word output when they're part of the master page.
That's what I've found too, any content on the master page just isn't included in the Word output.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: How do you have a page break for each topic?

Post by LTinker68 »

Just out of curiosity, why do you need a page break at the start of each page? Are you trying to generate one print output for use in both the U.S. (ANSI A-sized paper) and Europe (A-sized paper)?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How do you have a page break for each topic?

Post by NorthEast »

LTinker68 wrote:Just out of curiosity, why do you need a page break at the start of each page? Are you trying to generate one print output for use in both the U.S. (ANSI A-sized paper) and Europe (A-sized paper)?
Nope, I simply just want to have each topic on a separate page in the Word output.
Richard Ferrell
Propellus Maximus
Posts: 840
Joined: Mon May 01, 2006 10:11 am
Location: Inside California

Re: How do you have a page break for each topic?

Post by Richard Ferrell »

Are all of your topics Starting on H1 and H2? Do you use the H1 or H2 in a topic and not have it being its own topic?
Richard Ferrell

Certified Madcap Trainer
Image
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: How do you have a page break for each topic?

Post by NorthEast »

Richard Ferrell wrote:Are all of your topics Starting on H1 and H2? Do you use the H1 or H2 in a topic and not have it being its own topic?
No, that's why I'm finding it difficult.
50% of topics start with an H1, the other 50% start with a div block above the H1 (that contains links).

So I can't use a page break on the H1, which is why I'm trying to work out how you'd have a page break for each topic (regardless of what's in the topic).
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: How do you have a page break for each topic?

Post by LTinker68 »

Dave Lee wrote:50% of topics start with an H1, the other 50% start with a div block above the H1 (that contains links).
If you named the DIV block then you should be able to apply a page-break-before to that tag, in addition to the one on the H1 tag. That is, create a custom DIV tag, set it to page-break-before always, then apply the custom class to the DIV blocks in your topics. Then create a complex selector that says that if the custom DIV tag is followed immediately by an H1 tag, then the H1 tag should have page-break-before set to never. See this website for info on the type of complex selector to use --> http://www.w3.org/TR/1999/WD-CSS3-selec ... ombinators
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: How do you have a page break for each topic?

Post by KevinDAmery »

The only problem with that idea is that so far as I've been able to figure out Word (and maybe Frame) don't understand what a Div is and the Div parameters don't get passed along. I tried using a Div as a way to set Tips / Notes / Dire Warnings etc. apart from standard text, and while it worked perfectly in online output the Word output didn't receive the formatting I applied to the Div tag.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: How do you have a page break for each topic?

Post by LTinker68 »

If that's the case, then he should be able to do the same using a table instead of a DIV.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply