Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] Visible chapter index on the side of a book

Expand Messages
  • W. Eliot Kimber
    ... Here s a solution I came up with: The page master:
    Message 1 of 17 , Nov 3, 2002
    • 0 Attachment
      W. Eliot Kimber wrote:

      > I think you want retrieve-boundary="page-sequence", but I'm not sure
      > without testing your example, which I'll do when I get a chance.

      Here's a solution I came up with:

      The page master:

      <fo:simple-page-master master-name="body-page"
      margin-top="0.5in"
      margin-left="0.5in"
      margin-right="0.0in"
      margin-bottom="0.5in"
      page-height="11in"
      page-width="8.5in">
      <fo:region-before
      extent="1in"/>
      <fo:region-after
      extent="1in"/>
      <fo:region-end
      reference-orientation="-90"
      extent="1in"/>
      <fo:region-body
      margin-top="1.5in"
      margin-bottom="1.5in"
      margin-right="1.0in"/>
      </fo:simple-page-master>

      Notice that I'm setting the reference orientation on the region
      itself--I forgot before that you can do this. Also, the right page
      margin is "0" so that the end region will align with the page edge. The
      body region has to account for the lack of left page margin by
      specifying its own margin.

      In the page sequence:

      <fo:static-content flow-name="xsl-region-end">
      <fo:retrieve-marker
      retrieve-boundary="page"
      retrieve-class-name="thumb-tab"
      retrieve-position="first-within-page"/>
      </fo:static-content>

      Using retrieve-boundary="page" does limit the tab to just the page on
      which the marker appears, which is the desired affect in this case (if
      you used page-sequence, the tab would occur on every page).

      In my first-level section template. This results in a 1/2-inch square
      tab right up to the page edge, with the text rotated 90 degrees
      clockwise, white text on a black background:

      <xsl:template match="body/section/title">
      <fo:block
      break-before="page"
      ><fo:marker marker-class-name="section-2-title"/>
      <fo:marker marker-class-name="thumb-tab">
      <fo:block-container
      inline-progression-dimension="0.5in"
      block-progression-dimension="0.5in"
      background-color="black"
      color="white"
      font-weight="bold"
      display-align="center"
      text-align="center">
      <fo:block
      font-family="sans-serif"
      font-size="10pt"
      line-height="110%">
      <fo:inline>
      <xsl:choose>
      <xsl:when test="@tab-text">
      <xsl:value-of select="@tab-text"/>
      </xsl:when>
      <xsl:otherwise>
      <xsl:text>Sect. </xsl:text
      ><xsl:number
      count="section"
      level="multiple"
      from="body"
      format="1."
      />
      </xsl:otherwise>
      </xsl:choose>
      </fo:inline>
      </fo:block>
      </fo:block-container>
      </fo:marker>
      ...
      </xsl:template>

      Cheers,

      Eliot
      --
      W. Eliot Kimber, eliot@...
      Consultant, ISOGEN International

      1016 La Posada Dr., Suite 240
      Austin, TX 78752 Phone: 512.656.4139
    • W. Eliot Kimber
      ... Forgot to validate with XEP before I posted: c/first-within-page/first-starting-within-page This example gives identical results with XEP and XSL
      Message 2 of 17 , Nov 3, 2002
      • 0 Attachment
        W. Eliot Kimber wrote:
        > W. Eliot Kimber wrote:

        > <fo:static-content flow-name="xsl-region-end">
        > <fo:retrieve-marker
        > retrieve-boundary="page"
        > retrieve-class-name="thumb-tab"
        > retrieve-position="first-within-page"/>
        > </fo:static-content>

        Forgot to validate with XEP before I posted:
        c/first-within-page/first-starting-within-page"

        This example gives identical results with XEP and XSL Formatter.

        Cheers,

        E.
        --
        W. Eliot Kimber, eliot@...
        Consultant, ISOGEN International

        1016 La Posada Dr., Suite 240
        Austin, TX 78752 Phone: 512.656.4139
      • W. Eliot Kimber
        ... Actually, not *quite* identical. There is an acknowledged bug in XEP 3.03 that causes it to not extend the start and end regions to the before and after
        Message 3 of 17 , Nov 3, 2002
        • 0 Attachment
          W. Eliot Kimber wrote:
          > W. Eliot Kimber wrote:
          > This example gives identical results with XEP and XSL Formatter.

          Actually, not *quite* identical. There is an acknowledged bug in XEP
          3.03 that causes it to not extend the start and end regions to the
          before and after edges of the page when precedence on region-before or
          after is "false" (the default), so XEP renders the tab a bit farther
          after-wards on the page than XSL Formatter does. But that's a very minor
          difference and something should be fixed in the next update of XEP.

          Cheers,

          Eliot
          --
          W. Eliot Kimber, eliot@...
          Consultant, ISOGEN International

          1016 La Posada Dr., Suite 240
          Austin, TX 78752 Phone: 512.656.4139
        • Rolf Hustad
          ... Thank you Eliot for your help so far, it will take me some time to check it all out, I`ll get back to you as soon as I`m done. Have a great day! Rolf.
          Message 4 of 17 , Nov 3, 2002
          • 0 Attachment
            At 07:42 03.11.02 -0600, you wrote:
            >W. Eliot Kimber wrote:
            > > W. Eliot Kimber wrote:
            > > This example gives identical results with XEP and XSL Formatter.
            >
            >Actually, not *quite* identical. There is an acknowledged bug in XEP
            >3.03 that causes it to not extend the start and end regions to the
            >before and after edges of the page when precedence on region-before or
            >after is "false" (the default), so XEP renders the tab a bit farther
            >after-wards on the page than XSL Formatter does. But that's a very minor
            >difference and something should be fixed in the next update of XEP.
            >
            >Cheers,
            >
            >Eliot

            Thank you Eliot for your help so far, it will take me some time to check it
            all out, I`ll get back to you as soon as I`m done.
            Have a great day!

            Rolf.
          Your message has been successfully submitted and would be delivered to recipients shortly.