docbook-apps

  • 1.  Selective pagebreaks

    Posted 07-23-2007 18:58
    All,
    I have a situation where I place the (as per
    Stayton's book) at the end of selected sections so that the next section
    can start on a clean page. Yes, this is a severe hack that I am now
    paying for ;-)

    However, this leaves an undesirable artifact - an extra page that is not
    labeled "Blank Page" like other blank pages would be in normal
    processing.

    I could modify the
    template to end the page, but then ALL of
    the sections would have that. Plus, some of my sections are at different
    levels.

    Ideally I would like to make a PI that I can use on selected sections
    that intelligently says "start a new page now". Any ideas?

    Dean Nelson
    Sr. Software Engineer
    Enterprise Electronics Corp
    http://www.EECradar.com <http://www.eecradar.com/>

    "Too much of the world is run on the theory that you don't need road
    manners if you drive a five-ton truck" - Cleon Lyles


    This e-mail, including attachments, may include confidential and/or
    proprietary information, and may be used only by the person or entity to
    which it is addressed. If the reader of this e-mail is not the intended
    recipient or his or her authorized agent, the reader is hereby notified
    that any dissemination, distribution or copying of this e-mail is
    prohibited. If you have received this e-mail in error, please notify
    the sender by replying to this message and delete this e-mail
    immediately.






  • 2.  Re: [docbook-apps] Selective pagebreaks

    Posted 07-23-2007 19:13
    El Lunes, 23 de Julio de 2007 20:58, Nelson, Dean escribió:

    >
    > Ideally I would like to make a PI that I can use on selected sections
    > that intelligently says "start a new page now". Any ideas?

    If you meant "start a new page on this section but not in this other", in LFS
    we have a customization that creates conditional new pages for sect1 based on
    if a descendant sect2 contains role="package" or not:



    <xsl:attribute-set name="section.level1.properties">
    <xsl:attribute name="break-before">
    <xsl:choose>
    <xsl:when
    test="preceding-sibling::sect1[position()=1]/sect2/@role='package'
    or self::sect1/sect2/@role='package'">page</xsl:when>
    <xsl:otherwise>
    <xsl:text>auto</xsl:text>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </xsl:attribute-set>

    Note: This make use of @break-before just to avoid such extra blank pages.


    --
    Manuel Canales Esparcia
    Usuario de LFS nº2886: http://www.linuxfromscratch.org
    LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.info
    TLDP-ES: http://es.tldp.org