summaryrefslogtreecommitdiff
path: root/modules/helptools/schema/extendedStyle.xsl
blob: a544af48d248ed01d99cfdef061cc0fe2fac4871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                xmlns:latex="http://forge.scilab.org/p/jlatexmath"
                version='1.0'>

<xsl:include href="STYLE_DOC"/>

<xsl:template match="latex:*">
  <xsl:choose>
    <xsl:when test="@align != ''">
      <fo:block>
	<xsl:attribute name="text-align">
	  <xsl:value-of select="@align"/>
	</xsl:attribute>
	<fo:instream-foreign-object>
	  <xsl:copy>
	    <xsl:copy-of select="@*"/>
	    <xsl:if test="@align = 'center'">
	      <xsl:attribute name="fwidth">
		<xsl:value-of select="concat($page.width,',-',$body.start.indent,',-',$page.margin.inner,',-',$page.margin.outer)"/>
	      </xsl:attribute>
	    </xsl:if>
	    <xsl:apply-templates/>
	  </xsl:copy>
	</fo:instream-foreign-object>
      </fo:block>
    </xsl:when>
    <xsl:otherwise>
      <fo:instream-foreign-object>
	<xsl:copy>
	  <xsl:copy-of select="@*"/>
	  <xsl:apply-templates/>
	</xsl:copy>
      </fo:instream-foreign-object>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

</xsl:stylesheet>