docbook-apps

  • 1.  RE: [docbook-apps] Selective pagebreaks

    Posted 07-23-2007 22:03


    El Lunes, 23 de Julio de 2007 22:40, Nelson, Dean escribió:
    > What I have is a series of TESTS. Each test is a section. At the end of
    > each TEST I have a "hard-pagebreak" which usually just forces the next
    > section to start on a new page.

    Then, what you want is that all TEST must start on a new page, right?

    ---- Yes

    Do you have sections others than TEST that must not start on their own new
    page?

    ---- Yes - this is why I chose the PI method

    > However, if the section is "near" to the
    > end of the pasge already, then it inserts another page.
    >
    > The PI that I use is the one from the book.
    >
    > <xsl:template match="processing-instruction('hard-pagebreak')">
    > <fo:block break-before='page'/>
    > </xsl:template>
    >
    > I wonder, could I use "break-after='page'" instead of before?

    Yes, it works also and might solve the blank pages issue, if you want continue
    using the PI.

    ----- Do I need to place this PI before the
    or inside it?

    --
    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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org





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

    Posted 07-23-2007 22:21
    El Martes, 24 de Julio de 2007 00:03, Nelson, Dean escribió:

    > Then, what you want is that all TEST must start on a new page, right?
    >
    > ---- Yes
    >
    > Do you have sections others than TEST that must not start on their own new
    > page?
    >
    > ---- Yes - this is why I chose the PI method

    Then, in the TEST sections you could place



    or any other @attribute="value" pair, remove the PIs, and use a variation of
    the previouly send template.

    > ----- Do I need to place this PI before the
    or inside it?

    I tested it before the section, i.e.:









    --
    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



  • 3.  RE: [docbook-apps] Selective pagebreaks

    Posted 07-23-2007 22:42


    El Martes, 24 de Julio de 2007 00:03, Nelson, Dean escribió:

    > Then, what you want is that all TEST must start on a new page, right?
    >
    > ---- Yes
    >
    > Do you have sections others than TEST that must not start on their own
    > new page?
    >
    > ---- Yes - this is why I chose the PI method

    Then, in the TEST sections you could place



    or any other @attribute="value" pair, remove the PIs, and use a variation of
    the previouly send template.

    +++++++ It appears that this is the only way to go. The PI will create its own empty block, which is the contributor to the extra page. Since I don't use XSL every day, how would I add the "break-after='page'" to the templates so that this FO attribute gets included in the block containing the section?




    > ----- Do I need to place this PI before the
    or inside it?

    I tested it before the section, i.e.:









    --
    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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org




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

    Posted 07-24-2007 18:40
    El Martes, 24 de Julio de 2007 00:41, Nelson, Dean escribió:

    > +++++++ It appears that this is the only way to go. The PI will create its
    > own empty block, which is the contributor to the extra page. Since I don't
    > use XSL every day, how would I add the "break-after='page'" to the
    > templates so that this FO attribute gets included in the block containing
    > the section?

    On each section you want be placed on a new page, use



    Then, to your customization layout add:

    <xsl:attribute-set name="section.properties">
    <xsl:attribute name="break-before">
    <xsl:choose>
    <xsl:when
    test="preceding-sibling::section[position()=1]/@condition='newpage'
    or preceding-sibling::section[position()=1]/*/@condition='newpage'
    or self::section/@condition='newpage'">page</xsl:when>
    <xsl:otherwise>auto</xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </xsl:attribute-set>

    I have not tested it, but theoreticaly it should work.


    --
    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



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

    Posted 07-24-2007 18:47
    El Martes, 24 de Julio de 2007 20:39, M.Canales.es escribió:

    I'm not very sure about the second test. Maybe this one could be better:

    <xsl:attribute-set name="section.properties">
    <xsl:attribute name="break-before">
    <xsl:choose>
    <xsl:when
    test="preceding-sibling::section[position()=1]/@condition='newpage'
    or
    preceding-sibling::section[position()=1]/*/section[position()=last()]/@condition='newpage'
    or self::section/@condition='newpage'">page</xsl:when>
    <xsl:otherwise>auto</xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </xsl:attribute-set>

    --
    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



  • 6.  RE: [docbook-apps] Selective pagebreaks

    Posted 07-24-2007 19:37
    Hmmm, maybe there still is an issue here. I've tried your section template and it seems to do what it is told to do. However, the next page is blank and it is not marked as a blank page as others usually are. This is also at an end of a chapter, so the added page is the filler to make the next chapter start on an odd page.

    I wonder if this is a two fold issue.

    Regards,

    Dean Nelson
    Enterprise Electronics Corp







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

    Posted 07-24-2007 20:39
    El Martes, 24 de Julio de 2007 21:36, Nelson, Dean escribió:
    > Hmmm, maybe there still is an issue here. I've tried your section template
    > and it seems to do what it is told to do. However, the next page is blank
    > and it is not marked as a blank page as others usually are. This is also at
    > an end of a chapter, so the added page is the filler to make the next
    > chapter start on an odd page.

    Actually, the issue is that you said that not all TEST sections are at the
    same level, and I don't know if some of them could be nested, thus creating
    the proper tests for your case is hard.

    To start a TEST section on a new page only

    "self::section/@condition='newpage'"

    is required (well, a plain @condition='newpage' can be enought).

    The other tests are intended to try to output the first non-TEST section that
    start after a TEST section also into a new page, and that it what is failing
    and hard to debug without having the book sources to can test it.

    --
    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



  • 8.  RE: [docbook-apps] Selective pagebreaks

    Posted 07-24-2007 22:00
    I have changed all of my sections to add the 'newpage' attribute and everything works as advertised.

    Thanks!

    Dean Nelson
    Enterprise Electronics Corp







  • 9.  Indent between List Label and List

    Posted 07-25-2007 15:01
    Hi All,

    I am requesting some assistance on this matter again.

    My itemised list that appears within Sections looks ugly. There is not much indent between the list label and the list. For example:

    1.This is an example.
    10.This looks really bad.
    11.And this too.

    I want to specify an indent in my customization layer. Can anyone please direct me? Bob gives this example for HTML. I need it for XSL:


    div.itemizedlist li {
    padding-left: 1em;

    }

    Thanking you,
    Dishaa


    Dishaa Ganapathy
    Princeton, NJ
    Tel: 678-925-2072|Email: dishaag@yahoo.com
    "The real voyage of discovery consists not in seeking new landscapes, but in having new eyes." - Marcel Proust


    ---------------------------------
    Got a little couch potato?
    Check out fun summer activities for kids.