I'm trying to have a special page style (no headers) whenever some elements appear, (<h1>, for instance), but whatever I try has either no effect or creates a pagebreak after the element. The "workaround" of enclosing everything (until the next <h1>) in <div> does not appeal to me. I expected this should just work:
but it creates the undesired pagebreak after the <h1>. Now that I see it, I'd also expect it not to create a pagebreak before the <h1>. To be clearer, in my particular case, the <h1> would occur only after a pagebreak, so I don't really mind if a pagebreak is forced before it when setting a named page, but I think it would be desirable to avoid this for other cases.
I notice this has already been asked before (http://www.princexml.com/bb/viewtopic.php?t=652), but the proposed solution does not work with prince 7.0b1.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
@page { size: 9cm 12cm; }
@page red { background-color: red; }
h1 { page: red; }
</style>
</head>
<body>
<h1>Test</h1>
<p>Testing</p>
<h1>Test</h1>
<p>Testing</p>
<h1>Test</h1>
<p>Testing</p>
</body>
</html>
but it creates the undesired pagebreak after the <h1>. Now that I see it, I'd also expect it not to create a pagebreak before the <h1>. To be clearer, in my particular case, the <h1> would occur only after a pagebreak, so I don't really mind if a pagebreak is forced before it when setting a named page, but I think it would be desirable to avoid this for other cases.
I notice this has already been asked before (http://www.princexml.com/bb/viewtopic.php?t=652), but the proposed solution does not work with prince 7.0b1.