]> granicus.if.org Git - docbook-dsssl/commitdiff
Superscript and subscript now use vertical-align instead of
authorBob Stayton <bobs@sagehill.net>
Wed, 9 Jul 2003 22:18:56 +0000 (22:18 +0000)
committerBob Stayton <bobs@sagehill.net>
Wed, 9 Jul 2003 22:18:56 +0000 (22:18 +0000)
baseline-shift when fop.extensions is set.

xsl/fo/inline.xsl

index e234b99871d8cb0b742599e66564fff3a1819b03..a63c3d6f992e82374bbdafe36664dd72b074377a 100644 (file)
   <xsl:param name="content">
     <xsl:apply-templates/>
   </xsl:param>
-  <fo:inline baseline-shift="super">
+  <fo:inline>
+    <xsl:choose>
+      <xsl:when test="$fop.extensions != 0">
+        <xsl:attribute name="vertical-align">super</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="baseline-shift">super</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
     <xsl:copy-of select="$content"/>
   </fo:inline>
 </xsl:template>
   <xsl:param name="content">
     <xsl:apply-templates/>
   </xsl:param>
-  <fo:inline baseline-shift="sub">
+  <fo:inline>
+    <xsl:choose>
+      <xsl:when test="$fop.extensions != 0">
+        <xsl:attribute name="vertical-align">sub</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute name="baseline-shift">sub</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
     <xsl:copy-of select="$content"/>
   </fo:inline>
 </xsl:template>