SL-FO Line and Inline areas

Text inside the Block area is defined with Line area. Line areas are generated by the same formatting object that generate their parent. Line areas don't have borders and padding. These areas contain XSL-FO Inline areas.

Inline areas specify attributes for pieces of Lines. inline content is defined via <fo:inline> element. To generate an inline reference area use <fo:inline-content> element.

The following attribute may be used with <fo:inline>:

  • border, padding, margin and background properties
  • baseline-shift
  • alignment-adjust
  • alignment-baseline
  • color
  • line-height
  • text-decoration
  • id, etc.

Here is a simple example:

  <fo:block>
     Do a sum: 5 
     <fo:inline baseline-shift="super"> 2 </fo:inline>
     + 4
     <fo:inline baseline-shift="super"> 2 </fo:inline>
     =?
  </fo:block>
  <fo:block>
     Solve the system of equations:
  </fo:block>
  <fo:block>
     x
	 <fo:inline baseline-shift="sub"> 1 </fo:inline>
     + x
     <fo:inline baseline-shift="sub"> 2 </fo:inline>
     = 12
  </fo:block>
  <fo:block>
     x
	 <fo:inline baseline-shift="sub"> 1 </fo:inline>
     * x
     <fo:inline baseline-shift="sub"> 2 </fo:inline>
     = 35
  </fo:block>
	

The paper result of this example will be equicalent to the following:

Do a sum: 52 + 42 = ?

Solve the system of equations:

x1 + x2 = 12

x1 * x2 = 35