Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xsl:fo different colors/fonts in one block

Tags:

xsl-fo

Suppose I have an xsl:fo block:

<fo:block>one two three</fo:block>

Can I make "three" a different color than "one" and "two"? Note: I'd rather NOT use a table for this.

like image 260
Ya. Avatar asked Jan 24 '13 00:01

Ya.


1 Answers

You can us an <fo:inline> element.

The fo:inline formatting object is commonly used for formatting a portion of text with a background or enclosing it in a border.

For example, in order to make the word "three" red:

<fo:block>one two <fo:inline color="#FF0000">three</fo:inline></fo:block>
like image 159
Mads Hansen Avatar answered Nov 17 '22 20:11

Mads Hansen