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