2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/TR/xhtml1/strict">
6 <xsl:strip-space elements="doc chapter section"/>
7 <xsl:output method="text" indent="yes" encoding="iso-8859-1"/>
9 <xsl:template match="article">
10 \documentclass[a4paper]{article}
15 <xsl:apply-templates/>
19 <xsl:template match="book">
20 \documentclass[a4paper]{book}
25 <xsl:apply-templates/>
29 <xsl:template match="report">
30 \documentclass[a4paper]{report}
35 <xsl:apply-templates/>
39 <xsl:template match="titlepage">
41 <xsl:apply-templates/>
45 <xsl:template match="title">
47 \sffamily\bfseries\LARGE{<xsl:apply-templates/>}
51 <xsl:template match="subtitle">
53 \sffamily\bfseries\Large{<xsl:apply-templates/>}
57 <xsl:template match="author">
59 \sffamily{<xsl:apply-templates/>}
63 <xsl:template match="date">
65 \sffamily{<xsl:apply-templates/>}
69 <xsl:template match="docinfo">
70 \begin{tabular}{|l|l|}
72 \multicolumn{2}{|c|}{\textbf{Document Information}} \\
74 <xsl:apply-templates/>
78 <xsl:template match="infoitem">
79 <xsl:value-of select="@label"/> &
80 <xsl:apply-templates/> \\
84 <xsl:template match="abstract">
87 \begin{bfseries}Abstract:\end{bfseries}
90 <xsl:apply-templates/>
94 <xsl:template match="toc">
99 <xsl:template match="chapter/heading">
100 \chapter{<xsl:apply-templates/>}
103 <xsl:template match="section/heading">
104 \section{<xsl:apply-templates/>}
107 <xsl:template match="subsection/heading">
108 \subsection{<xsl:apply-templates/>}
111 <xsl:template match="subsubsection/heading">
112 \subsubsection{<xsl:apply-templates/>}
115 <xsl:template match="paragraph/heading">
116 \paragraph{<xsl:apply-templates/>}
119 <xsl:template match="subparagraph/heading">
120 \subparagraph{<xsl:apply-templates/>}
123 <xsl:template match="para">
125 <xsl:apply-templates/>
128 <xsl:template match="quote">
130 <xsl:apply-templates/>
134 <xsl:template match="verbatim">
136 <xsl:apply-templates/>
140 <xsl:template match="itemize">
142 <xsl:apply-templates/>
146 <xsl:template match="enumerate">
148 <xsl:apply-templates/>
152 <xsl:template match="description">
154 <xsl:apply-templates/>
158 <xsl:template match="itemize/item">
159 \item <xsl:apply-templates/>
162 <xsl:template match="enumerate/item">
163 \item <xsl:apply-templates/>
166 <xsl:template match="description/item">
167 \item[<xsl:value-of select='@tag'/>] <xsl:apply-templates/>
170 <xsl:template match="footnote">\footnote{<xsl:apply-templates/>}</xsl:template>
172 <xsl:template match="emph">\begin{itshape}<xsl:apply-templates/>\end{itshape}</xsl:template>
174 <xsl:template match="strong">\begin{bfseries}<xsl:apply-templates/>\end{bfseries}</xsl:template>
176 <xsl:template match="code">\begin{ttfamily}<xsl:apply-templates/>\end{ttfamily}</xsl:template>
178 <xsl:template match="remark">\begin{slshape}<xsl:apply-templates/>\end{slshape}</xsl:template>
180 <xsl:template match="sub">$_{<xsl:apply-templates/>}$</xsl:template>
181 <xsl:template match="sup">$^{<xsl:apply-templates/>}$</xsl:template>
183 <xsl:template match="newline">\\</xsl:template>
184 <xsl:template match="newpage">\newpage</xsl:template>
186 <xsl:template match="table">
187 \begin{tabular}{<xsl:value-of select="@cpos"/>c}
188 <xsl:apply-templates/>
192 <xsl:template match="thead">
193 <xsl:apply-templates/>\\
196 <xsl:template match="thead/col">
197 \begin{bfseries}<xsl:apply-templates/>\end{bfseries}&
200 <xsl:template match="row">
201 <xsl:apply-templates/>\\
204 <xsl:template match="row/col">
205 <xsl:apply-templates/>&
208 <xsl:template match="picture">
209 \scalebox{<xsl:value-of select="@scale"/>}{\includegraphics{<xsl:value-of select="@eps"/>}}
212 <xsl:template match="label">\label{<xsl:value-of select="@name"/>}</xsl:template>
214 <xsl:template match="index"></xsl:template>
215 <xsl:template match="ref"><xsl:apply-templates/>\ref{<xsl:value-of select="@to"/>}</xsl:template>
216 <xsl:template match="page"><xsl:apply-templates/>\pageref{<xsl:value-of select="@to"/>}</xsl:template>
217 <xsl:template match="reference">
218 <xsl:apply-templates/>[<xsl:value-of select="@href"/>]
221 <xsl:template match="include">
222 <xsl:apply-templates select="document(@href)"/>
225 <xsl:template match="LaTeX">
226 <xsl:value-of select="@command"/>