I have a required for two stylesheets which are similar:
* The default one is for book-length printed works, with page breaks before chapters (h1s)
* The second is identical except that there are no page breaks before chapters
The simple fix initially was simply to page-break-before: avoid; to the h1 style. It works fine except there's no page break before the first chapter so it means the table of contents and first chapter run into each other.
Is there a CSS way to specify a page break _after_ the TOC? Not the TOC heading, the entire TOC?
Thanks
Paul
Page break after TOC?
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Page break after TOC?
A clumsy way could be to create a special H1 class, say H1_First_Chapter, and add page-break-before: always; to your stylesheet for that class, then apply it only to the first H1 after your TOC. Would that work for you? Others might come up with a more flexible way, so don't take this as the only solution.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Re: Page break after TOC?
Ah I can't do that as in this case I'm using Flare files autoimported from Markdown. So a H1 is always a H1 (that's why I can't simply apply a class to the heading for example.ChoccieMuffin wrote:A clumsy way could be to create a special H1 class, say H1_First_Chapter, and add page-break-before: always; to your stylesheet for that class, then apply it only to the first H1 after your TOC. Would that work for you? Others might come up with a more flexible way, so don't take this as the only solution.
-
doloremipsum
- Sr. Propeller Head
- Posts: 290
- Joined: Mon Aug 26, 2019 2:11 pm
Re: Page break after TOC?
I think you should be able to apply a page break to the TOC proxy itself. Try this in your stylesheet:
Alternatively, in the TOC you might be able to apply a page layout break to the first topic, which would force it to start on a new page. However, this might run into the same issue as ChoccieMuffin's suggestion.
Code: Select all
MadCap|tocProxy
{
page-break-after: always;
}
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
Re: Page break after TOC?
Thanks, that's perfect!doloremipsum wrote:I think you should be able to apply a page break to the TOC proxy itself. Try this in your stylesheet:Code: Select all
MadCap|tocProxy { page-break-after: always; }
P.