W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2008

Re: fo:float @float and @clear value odd/even dependant

From: Tony Graham <Tony.Graham@MenteithConsulting.com>
Date: Thu, 10 Apr 2008 17:58:54 +0100
To: www-xsl-fo@w3.org
Message-ID: <87od8hhcj5.fsf@zako.menteithconsulting.com>

On Thu, Apr 10 2008 16:57:24 +0100, kolaci@cncz.cz wrote:
>  Is it possible to achieve somehow, that fo:float is rendered to the
>  left on the odd pages and to the right on the even pages?

Here's what I've been using in tutorial handouts [1], although it still
needs a bit of work:

  <xsl:template match="head">
    <fo:block-container
      start-indent="-6pt"
      end-indent="-42pt"
      space-before="12pt">
      <fo:block intrusion-displace="block"
        start-indent="6pt"
        end-indent="42pt"
        margin="2pt"
        font-size="150%"
        font-weight="bold"
        keep-with-next="2"
        background-color="{$menteith-grey}">
        <fo:float float="outside">
          <fo:block-container
            display-align="before"
            intrusion-displace="block"
            start-indent="-36pt"
            end-indent="-48pt"
            max-width="36pt"
            border-left="3pt white solid"
            border-right="3pt white solid">
            <fo:block
              display-align="before"
              margin="2pt"
              font-weight="normal"
              font-size="12pt"
              line-height="inherit"
              start-indent="2pt"
              end-indent="2pt"
              text-align="center"
              background-color="{$menteith-grey}">
              <xsl:number level="any"
                count="slide|headslide"/>
            </fo:block>
          </fo:block-container>
        </fo:float>
        <xsl:apply-templates/>
      </fo:block>
    </fo:block-container>
  </xsl:template>

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
"Testing XSLT" tutorial, XTech 2008, 6 May 2008, Dublin, Ireland


[1] https://www.menteithconsulting.com/attachment/wiki/XML2007/TestingXSLT/testing-xslt.pdf
Received on Thursday, 10 April 2008 17:00:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 10 April 2008 17:00:05 GMT