0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 <xsl:stylesheet version="1.0"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 <xsl:output omit-xml-declaration="yes" />
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 <xsl:template match="mfile">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 \documentclass[a4paper,10pt]{article}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 \usepackage{alltt}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 \usepackage{color}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 \usepackage{fullpage}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 \definecolor{string}{rgb}{0.7,0.0,0.0}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 \definecolor{comment}{rgb}{0.13,0.54,0.13}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 \definecolor{keyword}{rgb}{0.0,0.0,1.0}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 \title{<xsl:value-of select="@name"/>}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 \author{\textsc{Matlab}, The Mathworks, Inc.}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 \begin{document}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 \maketitle
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 \begin{alltt}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 <xsl:apply-templates/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 \end{alltt}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 \end{document}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 </xsl:template>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 <xsl:template match="line">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 <xsl:value-of select="@nb"/><xsl:apply-templates/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 </xsl:template>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 <xsl:template match="keyword">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 \textcolor{keyword}{<xsl:apply-templates/>}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 </xsl:template>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 <xsl:template match="comment">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 \textcolor{comment}{<xsl:apply-templates/>}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 </xsl:template>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 <xsl:template match="string">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 \textcolor{string}{<xsl:apply-templates/>}
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 </xsl:template>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 </xsl:stylesheet>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 <!--
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 There's missing a recursive function that generates LaTeX special characters.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 It may be useful to glance at:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 http://opera.inrialpes.fr/people/Tayeb.Lemlouma/MULTIMEDIA/XSLT/XML2LaTeX.xsl
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 -->
|