Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tolatex.xslt « doc « Mono.C5 « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e929b9079b88c5dad212a53769590d9987d71be (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
41
42
43
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output encoding = "ISO-8859-1" omit-xml-declaration="yes" indent="no"/>
    <xsl:strip-space elements="*"/>
    <xsl:template match="table">
        <xsl:text>\begin{tabular}{lc|*{15}{c}}\hline\hline&#10;</xsl:text>
        <xsl:apply-templates></xsl:apply-templates>
        <xsl:text>\hline\hline&#10;\end{tabular}&#10;</xsl:text>
    </xsl:template>
    <xsl:template match="tr">
        <xsl:choose>
            <xsl:when test="td/i">
                <xsl:text>\hline&#10;%</xsl:text><xsl:value-of select="td/i/font"/><xsl:text>&#10;</xsl:text>
            </xsl:when>
            <xsl:otherwise>
                <xsl:for-each select="th">
                    <xsl:if test="position()!=1">\turned{</xsl:if>
                    <xsl:apply-templates/>
                    <xsl:if test="position()!=1">}</xsl:if>
                    <xsl:if test="position()!=last()"><xsl:text disable-output-escaping="yes" >&#10;&amp;&#32;</xsl:text></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="td">
                    <xsl:if test="position()=1">\texttt{</xsl:if>
                    <xsl:if test="position()!=1">$</xsl:if>
                    <xsl:apply-templates/>
                    <xsl:if test="position()=1">}</xsl:if>
                    <xsl:if test="position()!=1">$</xsl:if>
                    <xsl:if test="position()!=last()"><xsl:text disable-output-escaping="yes" >&#32;&amp;&#32;</xsl:text></xsl:if>
                </xsl:for-each>
                <!---->\\&#10;<!---->
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template match ="th">
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match ="td">
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="font">
        <xsl:apply-templates/>
    </xsl:template>
</xsl:stylesheet>