Hello,

You can use the following attributes to format as sup and sub respectively.

   <!--SUP-->
    <xsl:attribute-set name="sup">
        <xsl:attribute name="font-size">smaller</xsl:attribute>
        <xsl:attribute name="baseline-shift">super</xsl:attribute>
        <xsl:attribute name="vertical-align">super</xsl:attribute>
        <xsl:attribute name="dominant-baseline">hanging</xsl:attribute>
        <xsl:attribute name="keep-together">always</xsl:attribute>
    </xsl:attribute-set>
    <!--END SUP-->

     <!--SUB-->
    <xsl:attribute-set name="sub">
    <xsl:attribute name="font-size">smaller</xsl:attribute>
        <xsl:attribute name="baseline-shift">sub</xsl:attribute>
        <xsl:attribute name="dominant-baseline">hanging</xsl:attribute>
        <xsl:attribute name="keep-together">always</xsl:attribute>
    </xsl:attribute-set>
    <!--END SUP-->


    <fo:inline xsl:use-attribute-sets="sup">
    <xsl:apply-templates/>
    </fo:inline>

Instead of attributes you can also use them direclty inside inline element.

On Fri, Dec 18, 2009 at 1:11 PM, Peter Hopfgartner <
peter.hopfgart...@r3-gis.com> wrote:

> Hello,
>
> we would like to format chemical formulas with FOP. The formulas come from
> the XML file.
> We tried to include the FO instructions in the XML file, like in the
> following
>
> H<fo:inline vertical-align="sub" font-size="7pt">2</fo:inline>O
>
> Anyway, the formatting does not survive the XSL processing. Checking with
> -foout, the relevant fragment becomes "H2O".
>
> Does anybody have any hint how to pass the formatting instructions to the
> final FO file?
>
> Regards,
>
> Peter
>
> --
>
> Dott. Peter Hopfgartner
>
> R3 GIS Srl - GmbH
> Via Johann Kravogl-Str. 2
> I-39012 Meran/Merano (BZ)
> Email: peter.hopfgart...@r3-gis.com
> Tel. : +39 0473 494949
> Fax  : +39 0473 069902
> www  : http://www.r3-gis.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


-- 
Nedim Buke

Reply via email to