]> granicus.if.org Git - docbook-dsssl/commitdiff
Added @align value to fo:block containing mediaobject in equation.
authorBob Stayton <bobs@sagehill.net>
Mon, 13 Jan 2003 19:35:28 +0000 (19:35 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 13 Jan 2003 19:35:28 +0000 (19:35 +0000)
xsl/fo/math.xsl

index 8f2afaf1c88f4b725b3a4edd81e3854fecfb3e48..f71c979fd44c010622a585c24714d20870af4a03 100644 (file)
 
 <xsl:template match="equation/mediaobject | informalequation/mediaobject">
   <xsl:if test="$passivetex.extensions = 0 or $tex.math.in.alt = ''">
+    <xsl:variable name="olist" select="imageobject|imageobjectco
+                       |videoobject|audioobject
+                    |textobject"/>
+  
+    <xsl:variable name="object.index">
+      <xsl:call-template name="select.mediaobject.index">
+        <xsl:with-param name="olist" select="$olist"/>
+        <xsl:with-param name="count" select="1"/>
+      </xsl:call-template>
+    </xsl:variable>
+  
+    <xsl:variable name="object" select="$olist[position() = $object.index]"/>
+  
+    <xsl:variable name="align">
+      <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+    </xsl:variable>
+  
     <fo:block>
-      <xsl:call-template name="select.mediaobject"/>
+      <xsl:if test="$align != '' ">
+        <xsl:attribute name="text-align">
+          <xsl:value-of select="$align"/>
+        </xsl:attribute>
+      </xsl:if>
+  
+      <xsl:apply-templates select="$object"/>
       <xsl:apply-templates select="caption"/>
     </fo:block>
   </xsl:if>