TOC breaks after title

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

TOC breaks after title

Post by grendel »

Using Flare 10.2
Checked all breaks, orphans, widows, styles, etc., and compared to same file another project; all settings are identical
Checked the TOCproxy; looks as it should
Checked page layouts and print mediums; looks as it should.
Using styles.css style sheet

Why are the table of contents entries breaking from the Table of Contents title? It's just p style that's centered and boldface type. If I change the target to use the Default css, it no longer breaks, but there is a line between the title and list of contents. I really do not want this line there. Plus, the default css does not use the styles that I want. Furthermore, how the heck can I access the default style sheet?

Thanks in advance!
Lisa
Last edited by grendel on Tue Sep 30, 2014 11:30 am, edited 2 times in total.
writeeditconsultingllc.com
WE make writing right.
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

Re: TOC breaks after title

Post by grendel »

Go away Yahoo [bot]; I see you browsing the forum.
writeeditconsultingllc.com
WE make writing right.
techwriter31
Propellus Maximus
Posts: 551
Joined: Wed Mar 05, 2008 10:50 am

Re: TOC breaks after title

Post by techwriter31 »

Random guess - in your stylesheet, does the div style have "page-break-inside: avoid;" applied to it?

*Edit*: The above guess assumes that the generated TOC exceeds one page in the output. :)
Kellie
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

Re: TOC breaks after title

Post by grendel »

Yes, the TOC is more than 1 page in length in the output. No, it's not in the Div style. :( I even looked at the Generic Pseudo Classes before, after, and inside. Changed the Avoid to Auto. The content still breaks after the toc title. The frustrating thing is that I told the CSS exactly how to behave and not to behave; yet, something is overriding it. I feel that it's either the default template or default CSS. When I apply the default CSS, the TOC break problem is fixed, but the default CSS overrides my customized CSS for the topics. The Target is set correctly to use the correct CSS. The project is set to use things correctly. I've not had this much trouble trying to get software to behave in my entire 13+year career.

I removed the Table of Contents wording to see what would happen. A blank page is inserted. I've seen posts about that, and I've had it happen to me before. I just don't recall how I fixed it, but I do know that there are posts about it in these forums.

Thanks for the help.
Lisa
Last edited by grendel on Fri Oct 03, 2014 7:36 am, edited 1 time in total.
writeeditconsultingllc.com
WE make writing right.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: TOC breaks after title

Post by Nita Beck »

I suspect it's the code for the TOCproxy, rather than for the table of contents title or for the individual TOC items. Is there a page break before being set there? Is there some funky top padding or top margin being set on the TOCproxy that's pushing the contents to start on the next page? Maybe post the code for the TOCproxy so we can see what's what.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

Re: TOC breaks after title

Post by grendel »

The tocproxy was the very first place I looked. I checked and rechecked the settings there. I even looked at the code. I couldn't see anything out of the ordinary. However, here's the code. Maybe there is something there that you can see.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<html MadCap:lastBlockDepth="2" MadCap:lastHeight="42" MadCap:lastWidth="624" MadCap:searchable="False" MadCap:conditions="Default.PrintOnly" xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
    <head>
        <link href="../../Resources/Stylesheets/Styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <MadCap:tocProxy class="" />
    </body>
</html>
The odd thing is that this file is used in other projects, and it works just fine. It may be that it's adding an extra page. I'd added some content to my previous post about that, and I do know it's been talked about on these forums.
Last edited by grendel on Fri Oct 03, 2014 7:43 am, edited 1 time in total.
writeeditconsultingllc.com
WE make writing right.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: TOC breaks after title

Post by Nita Beck »

Thanks, but I mean the code for the TOCproxy in your stylesheet. Sorry I wasn't clear.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

Re: TOC breaks after title

Post by grendel »

Nita Beck wrote:Thanks, but I mean the code for the TOCproxy in your stylesheet. Sorry I wasn't clear.
Forgive me, but I don't know how to get that code for you from the stylesheet.
writeeditconsultingllc.com
WE make writing right.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: TOC breaks after title

Post by Nita Beck »

In the Content Explorer, right-click on your stylesheet and select Open With > Internal Text Editor.

(I'm going into a meeting in a few minutes so won't be back to this thread for a few hours...)
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

Re: TOC breaks after title

Post by grendel »

Okay, I thought you'd meant something different than opening the file with Notepad++. I've played with several settings the past few days.

Code: Select all

/*<meta />*/

body
{
	font-family: Arial;
}

h1
{
	font-weight: bold;
	font-size: 14pt;
	font-family: Verdana;
}

h2
{
	font-size: 12pt;
	font-family: Verdana;
	font-variant: small-caps;
	font-weight: bold;
}

h3
{
	font-weight: bold;
	font-size: 14.0pt;
}

h4
{
	font-weight: bold;
	font-size: 12.0pt;
}

h5
{
	font-weight: bold;
	font-size: 10.0pt;
}

h6
{
	font-weight: bold;
	font-size: 8.0pt;
}

p
{
	font-size: 9pt;
	font-family: Verdana;
	margin-bottom: 1.12em;
	margin-top: 1.12em;
	orphans: 2;
	widows: 2;
}

ol,
ul
{
	margin-top: 0px;
	margin-bottom: 0px;
}

img
{
	border: none;
}

a.Popup
{
	
}

MadCap|expandingHead
{
	font-style: italic;
	font-weight: normal;
	cursor: hand;
	text-decoration: none;
	color: #006600;
}

MadCap|expandingBody
{
	color: #777777;
	font-style: italic;
}

MadCap|dropDownHotspot
{
	cursor: hand;
	font-style: italic;
	text-decoration: none;
	color: #006600;
}

p.Note
{
	border-bottom: solid 2px #6495ed;
	border-top: solid 1px #6495ed;
	mc-auto-number-position: outside-head;
	text-align: left;
	margin-bottom: 17pt;
	margin-left: 1.00in;
	margin-right: 1.00in;
	margin-top: 17pt;
	mc-auto-number-class: Note;
	mc-auto-number-offset: 48px;
	font-weight: normal;
	frame-break-inside: avoid;
	column-break-inside: avoid;
	page-break-inside: avoid;
	padding-top: 3pt;
	padding-bottom: 3pt;
	padding-left: 0pt;
	mc-auto-number-format: '{color blue}{size 10 pt} NOTE {/size}{/color}    ';
	line-height: 10.5px;
}

code
{
	font-family: monospace;
	font-size: 10.5pt;
}

blockquote
{
	border: solid 1pt;
	margin-left: 0in;
	margin-right: 0in;
}

li
{
	font-family: Verdana;
	font-size: 9pt;
	margin-bottom: 0.56em;
	margin-top: 0.56em;
}

p.Caution
{
	mc-auto-number-position: outside-head;
	mc-auto-number-class: Caution;
	border-bottom: solid 1px #ff8c00;
	border-top: solid 2px #ff8c00;
	mc-auto-number-format: '{color black}{size 10 pt} CAUTION {/size}{/color}    ';
	margin-left: 1.00in;
	margin-right: 1.00in;
	margin-top: 17em;
	margin-bottom: 17pt;
	padding-bottom: 3pt;
	padding-top: 3pt;
	text-align: left;
	mc-auto-number-offset: 87px;
}

p.Warning
{
	font-weight: normal;
	text-align: left;
	border-bottom: solid 2px;
	border-bottom-color: #ff0000;
	border-top: solid 1px;
	border-top-color: #ff0000;
	margin-bottom: 17pt;
	margin-left: 1.00in;
	margin-right: 1.00in;
	margin-top: 17pt;
	padding-bottom: 3pt;
	padding-top: 3pt;
	column-break-inside: avoid;
	frame-break-inside: avoid;
	page-break-inside: avoid;
	mc-auto-number-class: Warning;
	mc-auto-number-format: '{color red}{size 10 pt} WARNING {/size}{/color}  ';
	mc-auto-number-position: outside-head;
	mc-auto-number-offset: 87px;
}

@media print
{
	h1
	{
		page-break-after: auto;
		page-break-before: auto;
		page-break-inside: auto;
		column-break-after: auto;
	}

	h2
	{
		font-size: 14pt;
		page-break-after: auto;
		column-break-after: auto;
	}

	div
	{
		page-break-inside: avoid;
	}

	p.Note
	{
		line-height: 0px;
	}

	MadCap|tocProxy
	{
		border-top-style: none;
		border-top-width: 0px;
		border-top-color: #ffffff;
		mc-auto-number-position: none;
		margin-top: 10px;
	}

	p
	{
		font-size: 10pt;
	}

	h3
	{
		font-weight: bold;
		font-variant: normal;
		font-family: Verdana;
		font-size: 11pt;
	}

	li
	{
		font-size: 10pt;
	}

	h4
	{
		font-family: Verdana;
		font-size: 10pt;
		font-variant: normal;
		font-weight: bold;
		page-break-after: auto;
		column-break-after: auto;
	}

	p.TOC2
	{
		orphans: 0;
		widows: 0;
		font-style: normal;
		font-variant: small-caps;
	}

	p.TOC1
	{
		orphans: 0;
		widows: 0;
	}

	p.TOC3
	{
		orphans: 0;
		widows: 0;
	}

	p.TOC4
	{
		orphans: 0;
		widows: 0;
	}

	p.MiniTOC1
	{
		orphans: 0;
		widows: 0;
	}

	p.MiniTOC2
	{
		orphans: 0;
		widows: 0;
		font-variant: inherit;
	}

	p.MiniTOC3
	{
		orphans: 0;
		widows: 0;
	}

	p.MiniTOC4
	{
		orphans: 0;
		widows: 0;
	}

	MadCap|miniTocProxy
	{
		border-top-color: #ffffff;
		border-top-style: none;
		border-top-width: 0px;
	}

	div.GlossaryPageDefinition
	{
		column-break-before: auto;
		page-break-before: auto;
		page-break-inside: auto;
	}

	div.GlossaryPageHeading
	{
		page-break-after: auto;
		page-break-inside: auto;
	}

	div.GlossaryPageTerm
	{
		column-break-after: auto;
		page-break-after: auto;
		page-break-inside: auto;
	}

	div.GlossaryPageEntry
	{
		page-break-inside: auto;
	}

	p.ListOf
	{
		orphans: 0;
		widows: 0;
	}

	ul
	{
		page-break-before: auto;
	}

	:after
	{
		page-break-inside: auto;
	}

	:before
	{
		page-break-inside: auto;
	}
}
The Div says to break, and I told it not to. What's the point of having the style editor when it won't pick up in the code. I know I changed that.
writeeditconsultingllc.com
WE make writing right.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: TOC breaks after title

Post by ChoccieMuffin »

The bit Nita's interested in is this:

MadCap|tocProxy
{
border-top-style: none;
border-top-width: 0px;
border-top-color: #ffffff;
mc-auto-number-position: none;
margin-top: 10px;
}

You don't seem to have anything set in there that might make it misbehave...

Can you compare that with the same bit in the stylesheet that DOES work and see what the difference is?
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
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

Re: TOC breaks after title

Post by grendel »

In the code, I set the Div from inside to auto, and that seemed to fix it. When I looked at the Div in the Style Editor, it said Auto. Swear it. :)
writeeditconsultingllc.com
WE make writing right.
grendel
Propeller Head
Posts: 82
Joined: Fri Mar 15, 2013 2:00 pm
Location: Oklahoma
Contact:

Re: TOC breaks after title

Post by grendel »

Yes, I figured that's what she's wanting, but it's not in this css. :)
ChoccieMuffin wrote:The bit Nita's interested in is this:

MadCap|tocProxy
{
border-top-style: none;
border-top-width: 0px;
border-top-color: #ffffff;
mc-auto-number-position: none;
margin-top: 10px;
}

You don't seem to have anything set in there that might make it misbehave...

Can you compare that with the same bit in the stylesheet that DOES work and see what the difference is?
writeeditconsultingllc.com
WE make writing right.
Nita Beck
Senior Propellus Maximus
Posts: 3669
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: TOC breaks after title

Post by Nita Beck »

I'm back...

Actually, I suspect the issue is how the base "div" class is set, and I suspect that, under the hood (where we cannot get to it), Flare's PDF generator puts the generated table of contents (the stuff that replaces the TOCproxy) in a div. So if the base "div" class is set to avoid a page break inside, Flare's gonna try its best not to break inside the table of contents and so breaks a page before it.

Warning, though: If you change how the base "div" is set, will that have unintended consequences elsewhere in the generated PDF?

The CSS for the TOCproxy itself doesn't raise any concern for me.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
techwriter31
Propellus Maximus
Posts: 551
Joined: Wed Mar 05, 2008 10:50 am

Re: TOC breaks after title

Post by techwriter31 »

grendel wrote:The Div says to break, and I told it not to. What's the point of having the style editor when it won't pick up in the code. I know I changed that.
I've noticed that happen for me in the past too when using the GUI to edit the .css. I tend to use a text editor for the most part.

Yeah, I recently ran into this div problem again when trying to clean up our stylesheet. We use divs for notes, warnings, etc., and I had previously specified the "page-break-before: avoid" for each individual div style. To be more efficient, I figured I'd apply this to the top-level div style once, rather than repeating in all classes. But when I did, the TOC proxy started pushing to the next page. It took a minute to realize what was causing this issue (it had been 3 years since drastically modifying the .css). Now I include comments for the div style to prevent someone from accidentally specifying this in the future. :)

I also noticed similar things in the past when attempting to apply top and bottom borders to the div style - suddenly the TOC proxy also had a border applied!
Kellie
BaritoneJP
Propeller Head
Posts: 49
Joined: Mon Jun 02, 2008 9:12 am
Contact:

Re: TOC breaks after title

Post by BaritoneJP »

Resurrecting an old thread, but has there been a solution to this issue?
Thank you for your comments and help with my quandary ...
Jamey
FpgaEd
Jr. Propeller Head
Posts: 3
Joined: Tue May 26, 2020 11:27 am

Re: TOC breaks after title

Post by FpgaEd »

Hopefully providing closure to this OLD issue as I ran into it and had to run it to the ground.

Long story short:

When including tocProxy in pdf output:

You WANT this in the css:
MadCap|tocProxy
{
page-break-before: avoid;
}
}

You DO NOT Want "page-break-inside" or "page-break-after" in the css.

To avoid breaking a page after each <h1> you want this:

h1
{
page-break-before: avoid;
}
An use the TOC to control page breaks in between chapters.
Post Reply