AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML Technics

Float

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  I want to interspace between the body text and the text in the float area. How can I do this? [No.2002101803]
A. 

Comparing these examples below. When writing FO as follows, the body text and the text in the float area are placed side by side closely.

<fo:float float="start">
  <fo:block-container>
    <fo:block border-style="solid" border-color="black" border-width="1pt">
      <fo:block  start-indent="1em" text-align="justify">
        Float example No.1 Float example No.1 Float example No.1
      </fo:block>
    </fo:block>
  </fo:block-container>
</fo:float>

Then consider the following example to interspace between the body text and the text in the float area by specifying indent to the block as the child element of float.

As [fo:float float="start"] is specified in the following example, end-indent is specified to the block-container as a child element.

<fo:float float="start">
  <fo:block-container end-indent="1em">
    <fo:block border-style="solid" border-color="black" border-width="1pt">
      <fo:block  start-indent="1em" text-align="justify">
        Float example No.1 Float example No.1 Float example No.1
      </fo:block>
    </fo:block>
  </fo:block-container>
</fo:float>

In the following example, start-indent is specified to [fo:float float="end"].

Note: In this case start-indent is specified to the block-container, and again it is specified to the block as a child element of the block-container. In this case, the inheritance of start-indent specified to the block-container is re-set by the start-indent specified to the block. Then the indent value specified to the block-container is added to the indent value specified to the block by using 'inherit'.

<fo:float float="end">
  <fo:block-container start-indent="1em">
    <fo:block border-style="solid" border-color="black" border-width="1pt">
      <fo:block start-indent="1em+inherit" text-align="justify">
        Float example No.2 Float example No.2 Float example No.2
      </fo:block>
    </fo:block>
  </fo:block-container>
</fo:float>

Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.