This is typically done by using the unbreakable option on the block. However, the open block does not support this option. If it did, you could use:
== second header [options=unbreakable] -- second chapter text some more second chapter text -- If a section has no content on the current page, the section title will follow the content to the next page. However, as I said, this is not implemented for open blocks. It does not appear that the a2x configuration supports the <?dbfo keep-together="always"?> for sections. The raw material is there, but your exact use case is not yet covered by the toolchain. -Dan On Wed, Aug 17, 2016 at 9:00 AM, Kukulkan <[email protected]> wrote: > Hi, > > I'm a complete newbie to automatic docs and AsciiDoc in general. Only some > experience with DocBook and Apache FOP. I like to create PDF manual for a > product but I'm not happy with the page breaks. > > I do not like to do manual page breaks as it is not correct after changing > previous chapters. So I need some more intelligent page breaks during > rendering. > > For example, if I have this: > > == first header > some text > > some more text > > some image > > some more text > > some image > > == second header > second chapter text > > some more second chapter text > > > It should move the second header to the next page if the second chapter > text does not fit to the current page. But what I see is the second header > and one or two lines on the first page and the rest follows on page 2. What > do I need to do to tell asciidoc-pdf to jump to the next page in this case? > > In DocBook I would use this attribute for the header definition: > > *<xsl:attribute name="keep-together.within-page">always</xsl:attribute>* > > Is there something equivalent for AsciiDoc? Or how is such problem solved > here? > > BTW, the same with image and paragraph. I like to move a block of an image > and the next paragraph to the next page if it does not fit to the current > page. Is there a way to define such a "wrapping" block? > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/asciidoc. > For more options, visit https://groups.google.com/d/optout. > -- Dan Allen | @mojavelinux | https://twitter.com/mojavelinux -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/asciidoc. For more options, visit https://groups.google.com/d/optout.
