docbook-apps

Expand all | Collapse all

Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output

  • 1.  Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output

    Posted 04-12-2011 15:50
    Hi Dave,
    Now I'm a bit confused. I thought the goal stated in your earlier mail was to eliminate any blank pages for those elements. That's why you were changing 'force' to 'no-force'. Can you clarify the sequence that you would like to see, and what you are actually getting?

    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net


    ----- Original Message -----
    From: redlettucemail
    To: docbook-apps@lists.oasis-open.org
    Sent: Tuesday, April 12, 2011 8:06 AM
    Subject: Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output


    Thanks Bob - the code worked. I still have a problem with needing to end the lot on an even page, and to also get the following preface to end on even.
    Here is the relevant code:

    <xsl:template name="user.pagemasters">

    <fo:simple-page-master master-name="front-cover"
    page-width="{$page.width}"
    page-height="{$page.height}"
    margin-top="-10pt"
    margin-bottom="0pt"
    margin-left="0pt"
    margin-right="0pt">
    <fo:region-body
    margin-top="0pt"
    margin-bottom="0pt"
    margin-left="0pt"
    margin-right="0pt"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="back-cover"
    page-width="{$page.width}"
    page-height="{$page.height}"
    margin-top="0pt"
    margin-bottom="0pt"
    margin-left="0pt"
    margin-right="0pt">
    <fo:region-body
    margin-top="-10pt"
    margin-bottom="0pt"
    margin-left="0pt"
    margin-right="0pt"/>
    </fo:simple-page-master>



    <fo:page-sequence-master master-name="listoftitles">
    <fo:repeatable-page-master-alternatives>
    <fo:conditional-page-master-reference master-reference="blank"
    blank-or-not-blank="blank"/>
    <fo:conditional-page-master-reference master-reference="lot-odd"
    odd-or-even="odd"/>
    <fo:conditional-page-master-reference
    odd-or-even="even">
    <xsl:attribute name="master-reference">
    <xsl:choose>
    <xsl:when test="$double.sided != 0">lot-even</xsl:when>
    <xsl:otherwise>lot-odd</xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </fo:conditional-page-master-reference>
    </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
    </xsl:template>


    <xsl:template name="select.user.pagemaster">
    <xsl:param name="element"/>
    <xsl:param name="pageclass"/>
    <xsl:param name="default-pagemaster"/>

    <xsl:choose>
    <xsl:when test="$default-pagemaster = 'lot'">
    <xsl:value-of select="'listoftitles'" />
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$default-pagemaster"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>

    Can I insert a blank page if the lot finishes on an odd page?


    Thanks again,


    Dave Gardiner




  • 2.  Re: [docbook-apps] Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided output

    Posted 04-13-2011 08:54
      |   view attached
    Bob,


    In one of your
    posts dated Mar 26, 2009 (Re:
    [docbook-apps]howtoomitblankpagesin thefrontmatter?
    [http://markmail.org/message/ow7oo4zz4pneb7bp]) you stated:


    “The preface, toc, and each of the "List Of" are in
    their own page sequence”


    Does that
    mean for the LOTs, the page sequences for the list of figures, list of
    tables
    etc can be handled separately? Looking at my customisedxsl:template
    name="force.page.count", I can only see that the LOT is handled as one
    master-reference:


    <xsl:template name="force.page.count">

    <xsl:param name="element"></xsl:param>
    select="local-name(.)"/>

    <xsl:param></xsl:param>
    name="master-reference"
    select="''"/>



    <xsl:choose>

    <xsl:when></xsl:when>


    test="starts-with($master-reference,'listoftitles')">no-force




    <xsl:when></xsl:when>


    test="starts-with($master-reference,'front')">end-on-even


    <xsl:when></xsl:when>
    test="$element =
    'preface'">end-on-even



    <xsl:when></xsl:when>
    test="$double.sided
    != 0">end-on-even




    <xsl:otherwise>no-force</xsl:otherwise>


    </xsl:choose>

    </xsl:template>





    So, if you
    delete blank pages in the LOTs by using “no-force”,
    does that delete all blank pages from
    each “List of” in the LOTs? And therefore you cannot force the last LOT
    to end on even? (because that’s
    what I need). How can I customise a different force.page.count for the last
    LOT
    to be end-on-even? I’ve attached the output to show that I need the
    Preface to
    start on an odd page.


    Thanks,

    Dave



    Subject: Re: [docbook-apps]
    Incorrect page sequence for TOC/Lot and prefacepages withdouble-sided
    output



    From: "Bob Stayton"
    <bobs@sagehill.net>
    To: "redlettucemail"
    <redlettucemail@mailscan.acenet.net.au>,
    <docbook-apps@lists.oasis-open.org>
    Date: Tue, 12 Apr
    2011 08:50:03 -0700









    Hi Dave,

    Now I'm a bit confused. I thought the
    goal
    stated in your earlier mail was to eliminate any blank pages for those
    elements. That's why you were changing 'force' to 'no-force'.
    Can
    you clarify the sequence that you would like to see, and what you are
    actually
    getting?



    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net [mailto:bobs@sagehill.net]






    ----- Original Message -----

    From:
    redlettucemail [mailto:redlettucemail@mailscan.acenet.net.au]


    To: docbook-apps@lists.oasis-open.org
    [mailto:docbook-apps@lists.oasis-open.org]

    Sent: Tuesday, April 12, 2011 8:06
    AM

    Subject: Re: [docbook-apps]
    Incorrect
    page sequence for TOC/Lot and prefacepages withdouble-sided output


    Thanks
    Bob - the code worked. I still have a
    problem with needing to end the lot on an even page, and to also get the
    following preface to end on even.

    Here is the relevant code:



    <xsl:template name="user.pagemasters">


    <fo:simple-page-master></fo:simple-page-master>
    master-name="front-cover"

    page-width="{$page.width}"

    page-height="{$page.height}"

    margin-top="-10pt"
    margin-bottom="0pt"

    margin-left="0pt"


    margin-right="0pt">

    <fo:region-body></fo:region-body>

    margin-top="0pt"

    margin-bottom="0pt"

    margin-left="0pt"

    margin-right="0pt"/>





    <fo:simple-page-master master-name="back-cover"></fo:simple-page-master>

    page-width="{$page.width}"

    page-height="{$page.height}"

    margin-top="0pt"

    margin-bottom="0pt"

    margin-left="0pt"


    margin-right="0pt">

    <fo:region-body></fo:region-body>

    margin-top="-10pt"

    margin-bottom="0pt"

    margin-left="0pt"

    margin-right="0pt"/>







    <fo:page-sequence-master></fo:page-sequence-master>
    master-name="listoftitles">

    <fo:repeatable-page-master-alternatives>


    <fo:conditional-page-master-reference></fo:conditional-page-master-reference>
    master-reference="blank"


    blank-or-not-blank="blank"/>


    <fo:conditional-page-master-reference></fo:conditional-page-master-reference>
    master-reference="lot-odd"


    odd-or-even="odd"/>

    <fo:conditional-page-master-reference></fo:conditional-page-master-reference>


    odd-or-even="even">


    <xsl:attribute></xsl:attribute>
    name="master-reference">


    <xsl:choose>



    <xsl:when test="$double.sided !=
    0">lot-even</xsl:when>



    <xsl:otherwise>lot-odd</xsl:otherwise>


    </xsl:choose>







    </fo:repeatable-page-master-alternatives>


    </xsl:template>





    <xsl:template name="select.user.pagemaster">

    <xsl:param name="element"></xsl:param>
    <xsl:param></xsl:param>
    name="pageclass"/>
    <xsl:param></xsl:param>
    name="default-pagemaster"/>


    <xsl:choose>
    <xsl:when></xsl:when>
    test="$default-pagemaster =
    'lot'">
    <xsl:value-of></xsl:value-of>
    select="'listoftitles'" />



    <xsl:otherwise>

    <xsl:value-of></xsl:value-of>
    select="$default-pagemaster"/>

    </xsl:otherwise>
    </xsl:choose>


    </xsl:template>

    Can I insert a blank page if the lot finishes on an odd page?



    Thanks again,

    Dave Gardiner



    -----Original Message-----

    From: "Bob Stayton" <bobs@sagehill.net>

    To: "redlettucemail" <redlettucemail@mailscan.acenet.net.au>,
    <docbook-apps@lists.oasis-open.org>

    Date: Tue, 12 Apr 2011 08:50:03 -0700

    Subject: Re: [docbook-apps] Incorrect page sequence for TOC/Lot and
    prefacepages withdouble-sided output





    Hi Dave,

    Now I'm a bit confused. I thought the
    goal
    stated in your earlier mail was to eliminate any blank pages for those
    elements. That's why you were changing 'force' to 'no-force'.
    Can
    you clarify the sequence that you would like to see, and what you are
    actually
    getting?



    Bob Stayton
    Sagehill Enterprises
    bobs@sagehill.net [mailto:bobs@sagehill.net]





    ----- Original Message -----

    From:
    redlettucemail [mailto:redlettucemail@mailscan.acenet.net.au]


    To: docbook-apps@lists.oasis-open.org
    [mailto:docbook-apps@lists.oasis-open.org]

    Sent: Tuesday, April 12, 2011 8:06
    AM

    Subject: Re: [docbook-apps]
    Incorrect
    page sequence for TOC/Lot and prefacepages withdouble-sided output

    Thanks Bob - the code worked. I still have a
    problem with needing to end the lot on an even page, and to also get the
    following preface to end on even.

    Here is the relevant code:



    <xsl:template name="user.pagemasters">


    <fo:simple-page-master></fo:simple-page-master>
    master-name="front-cover"

    page-width="{$page.width}"

    page-height="{$page.height}"

    margin-top="-10pt"
    margin-bottom="0pt"

    margin-left="0pt"


    margin-right="0pt">

    <fo:region-body></fo:region-body>

    margin-top="0pt"

    margin-bottom="0pt"

    margin-left="0pt"

    margin-right="0pt"/>





    <fo:simple-page-master master-name="back-cover"></fo:simple-page-master>

    page-width="{$page.width}"

    page-height="{$page.height}"

    margin-top="0pt"

    margin-bottom="0pt"

    margin-left="0pt"


    margin-right="0pt">

    <fo:region-body></fo:region-body>

    margin-top="-10pt"

    margin-bottom="0pt"

    margin-left="0pt"

    margin-right="0pt"/>







    <fo:page-sequence-master></fo:page-sequence-master>
    master-name="listoftitles">

    <fo:repeatable-page-master-alternatives>


    <fo:conditional-page-master-reference></fo:conditional-page-master-reference>
    master-reference="blank"


    blank-or-not-blank="blank"/>


    <fo:conditional-page-master-reference></fo:conditional-page-master-reference>
    master-reference="lot-odd"


    odd-or-even="odd"/>

    <fo:conditional-page-master-reference></fo:conditional-page-master-reference>


    odd-or-even="even">


    <xsl:attribute></xsl:attribute>
    name="master-reference">


    <xsl:choose>



    <xsl:when test="$double.sided !=
    0">lot-even</xsl:when>



    <xsl:otherwise>lot-odd</xsl:otherwise>


    </xsl:choose>







    </fo:repeatable-page-master-alternatives>


    </xsl:template>





    <xsl:template name="select.user.pagemaster">

    <xsl:param name="element"></xsl:param>
    <xsl:param></xsl:param>
    name="pageclass"/>
    <xsl:param></xsl:param>
    name="default-pagemaster"/>


    <xsl:choose>
    <xsl:when></xsl:when>
    test="$default-pagemaster =
    'lot'">
    <xsl:value-of></xsl:value-of>
    select="'listoftitles'" />



    <xsl:otherwise>

    <xsl:value-of></xsl:value-of>
    select="$default-pagemaster"/>

    </xsl:otherwise>
    </xsl:choose>


    </xsl:template>

    Can I insert a blank page if the lot finishes on an odd page?



    Thanks again,Dave Gardiner

    </docbook-apps@lists.oasis-open.org></redlettucemail@mailscan.acenet.net.au></bobs@sagehill.net></docbook-apps@lists.oasis-open.org></redlettucemail@mailscan.acenet.net.au></bobs@sagehill.net>

    Attachment(s)

    pdf
    LOTblankpages.pdf   75 KB 1 version