2009-10-07 07:08:13 -04:00
|
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://xsltsl.org/string">
|
|
|
|
<!--
|
2017-01-11 10:46:01 -05:00
|
|
|
* Copyright (c) 2008 - 2017 Tobias Markmann
|
2009-10-07 07:08:13 -04:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
* * Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* * Neither the name of the <organization> nor the
|
|
|
|
* names of its contributors may be used to endorse or promote products
|
|
|
|
* derived from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY TOBIAS MARKMANN ''AS IS'' AND ANY
|
|
|
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL TOBIAS MARKMANN BE LIABLE FOR ANY
|
|
|
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
Thanks to the XSLT Standard Library http://xsltsl.sourceforge.net/.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--<xsl:include href="xsltsl/string.xsl"/>-->
|
2017-09-28 13:51:07 -04:00
|
|
|
<xsl:import href="texml-xsl/stdlib.xsl"/>
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
<!-- Create a variable named $maxXEPVersiom containing the MAX version -->
|
|
|
|
<xsl:variable name="maxXEPVersion">
|
2009-12-15 18:06:05 -05:00
|
|
|
<xsl:value-of select='/xep/header/revision[position()=1]/version'/>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:variable>
|
|
|
|
|
|
|
|
<!-- Create a variable named $maxXEPDate containing the MAX date -->
|
|
|
|
<xsl:variable name="maxXEPDate">
|
|
|
|
<xsl:for-each select="/xep/header/revision">
|
|
|
|
<xsl:sort select="date" data-type="text" order="descending" />
|
|
|
|
<xsl:if test="position() = 1">
|
|
|
|
<xsl:value-of select="date" />
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
</xsl:variable>
|
|
|
|
|
2011-10-22 06:19:58 -04:00
|
|
|
<!-- Format URLs for the front page. Putting too long URLs in the footnotes. -->
|
|
|
|
<xsl:template name="formatURL">
|
|
|
|
<xsl:param name="url"/>
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="string-length($url) > 80">
|
|
|
|
<cmd name="thanks"><parm><cmd name="url"><parm><xsl:value-of select="$url"/></parm></cmd></parm></cmd> \hspace{0.5 cm}
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<cmd name="url"><parm><xsl:value-of select="$url"/></parm></cmd> \\
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</xsl:template>
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
<!-- convert "document": create header and continue -->
|
|
|
|
<xsl:template match="xep">
|
|
|
|
<TeXML>
|
|
|
|
<!-- create header -->
|
|
|
|
<TeXML escape="0">
|
|
|
|
%!TEX TS-program = xelatex
|
|
|
|
%!TEX encoding = UTF-8 Unicode
|
2010-03-18 13:12:52 -04:00
|
|
|
\documentclass[DIV=10]{scrartcl}
|
2009-10-07 13:43:49 -04:00
|
|
|
\KOMAoptions{paper=a4}
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
\usepackage[
|
2009-10-07 13:43:49 -04:00
|
|
|
pdftitle={XEP-<xsl:value-of select="/xep/header/number"/>: <xsl:value-of select="/xep/header/title"/>},
|
|
|
|
pdfauthor={XMPP Standards Foundation},
|
2009-10-10 11:48:19 -04:00
|
|
|
pdfcreator={XEP2PDF},
|
|
|
|
pdfproducer={XEP2PDF},
|
2017-01-09 10:59:23 -05:00
|
|
|
breaklinks = true,
|
|
|
|
unicode,
|
|
|
|
pagebackref,
|
2009-10-07 13:43:49 -04:00
|
|
|
xetex]{hyperref}
|
2011-10-22 06:19:58 -04:00
|
|
|
|
|
|
|
% break URLs at more places
|
|
|
|
\renewcommand{\UrlBreaks}{\do\/\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z\do\0\do\1}
|
|
|
|
|
2009-10-21 07:39:44 -04:00
|
|
|
\usepackage{xcolor}
|
2009-10-07 07:08:13 -04:00
|
|
|
\usepackage{graphicx}
|
|
|
|
\usepackage{fancyhdr}
|
2012-05-31 03:28:48 -04:00
|
|
|
\usepackage{tabu}
|
|
|
|
\usepackage{longtable}
|
2009-10-07 07:08:13 -04:00
|
|
|
\usepackage{listings}
|
|
|
|
\usepackage{varwidth}
|
|
|
|
\usepackage{titling}
|
|
|
|
\usepackage{titletoc}
|
2014-03-13 12:20:07 -04:00
|
|
|
\usepackage{float}
|
|
|
|
\usepackage{adjustbox}
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
\usepackage{hyphenat}
|
|
|
|
|
|
|
|
\hypersetup{colorlinks, linkcolor=blue, anchorcolor=blue, urlcolor=blue}
|
|
|
|
|
|
|
|
|
|
|
|
\usepackage{fontspec,xltxtra,xunicode}
|
2009-10-10 11:07:57 -04:00
|
|
|
\defaultfontfeatures{Mapping=tex-text}
|
2013-12-01 09:16:29 -05:00
|
|
|
\setromanfont[Ligatures={Common}]{Gentium Basic}
|
|
|
|
\setsansfont[Scale=MatchLowercase]{Gentium Basic}
|
2009-10-10 11:07:57 -04:00
|
|
|
\setmonofont[Scale=MatchLowercase]{Inconsolata}
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
\setkomafont{descriptionlabel}{\normalfont\bfseries}
|
|
|
|
|
|
|
|
\usepackage[english]{babel}
|
|
|
|
|
|
|
|
\pagestyle{fancy}
|
|
|
|
\fancyfoot{}
|
|
|
|
\fancyhead{}
|
|
|
|
%% page numbering
|
|
|
|
|
|
|
|
\newcommand{\XEPNumber}[0]{<xsl:value-of select="/xep/header/number"/>}
|
|
|
|
\newcommand{\XEPVersion}[0]{<xsl:value-of select="$maxXEPVersion"/>}
|
|
|
|
|
2010-10-05 18:21:08 -04:00
|
|
|
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
|
|
|
|
|
2009-10-08 11:31:34 -04:00
|
|
|
\fancyhead[L,L]{\includegraphics[totalheight=10pt]{xmpp.pdf} \slshape \leftmark}
|
2009-10-08 11:27:04 -04:00
|
|
|
\fancyfoot[C,C]{\thepage}
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
\pretitle{
|
|
|
|
\begin{figure*}[h]
|
|
|
|
\begin{center}
|
2009-10-07 13:48:05 -04:00
|
|
|
\includegraphics[totalheight=7.5cm]{xmpp-text.pdf}
|
2009-10-07 07:08:13 -04:00
|
|
|
\end{center}
|
|
|
|
\end{figure*}
|
|
|
|
\begin{center}\LARGE
|
|
|
|
}
|
|
|
|
|
|
|
|
\sloppy
|
|
|
|
</TeXML>
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
<cmd name="title" nl2="1">
|
|
|
|
<parm>XEP-<cmd name="XEPNumber" />: <xsl:value-of select="/xep/header/title"/></parm>
|
|
|
|
</cmd>
|
|
|
|
<cmd name="author">
|
|
|
|
<parm><TeXML escape="0">
|
|
|
|
<xsl:for-each select='/xep/header/author'><xsl:value-of select="firstname"/><xsl:text> </xsl:text><xsl:value-of select="surname"/> \\
|
2011-10-22 06:19:58 -04:00
|
|
|
<xsl:if test="email"><xsl:call-template name="formatURL"><xsl:with-param name="url">mailto:<xsl:value-of select="email"/></xsl:with-param></xsl:call-template></xsl:if>
|
|
|
|
<xsl:if test="jid"><xsl:call-template name="formatURL"><xsl:with-param name="url">xmpp:<xsl:value-of select="jid"/></xsl:with-param></xsl:call-template></xsl:if>
|
|
|
|
<xsl:if test="uri"><xsl:call-template name="formatURL"><xsl:with-param name="url"><xsl:value-of select="uri"/></xsl:with-param></xsl:call-template></xsl:if> <xsl:if test='position() != last()'> \and </xsl:if>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:for-each>
|
|
|
|
</TeXML></parm>
|
|
|
|
</cmd>
|
|
|
|
<cmd name="date">
|
|
|
|
<parm><TeXML escape="0"><xsl:value-of select="$maxXEPDate"/>\\ Version <xsl:value-of select="$maxXEPVersion"/></TeXML></parm>
|
|
|
|
</cmd>
|
|
|
|
<!-- process content -->
|
|
|
|
<env name="document">
|
|
|
|
<TeXML escape="0">
|
|
|
|
<cmd name="lstset">
|
2009-10-21 07:39:44 -04:00
|
|
|
<parm>language=XML,
|
|
|
|
breaklines=true,
|
|
|
|
emptylines=5,
|
|
|
|
frame=single,
|
|
|
|
rulecolor=\color{black},
|
2009-11-02 16:41:05 -05:00
|
|
|
basicstyle=\ttfamily\small\color{darkgray},
|
2009-10-21 07:39:44 -04:00
|
|
|
keywordstyle=\color{cyan},
|
|
|
|
stringstyle=\color{blue},
|
|
|
|
tagstyle=\color{purple},
|
|
|
|
markfirstintag=true
|
|
|
|
</parm>
|
2009-10-07 07:08:13 -04:00
|
|
|
</cmd>
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
</TeXML>
|
2010-03-18 12:59:39 -04:00
|
|
|
<cmd name="KOMAoptions"><parm>DIV=24</parm></cmd>
|
2009-10-07 07:08:13 -04:00
|
|
|
<cmd name="pagestyle"><parm>empty</parm></cmd>
|
|
|
|
<cmd name="maketitle" />
|
|
|
|
<cmd name="thispagestyle"><parm>empty</parm></cmd>
|
|
|
|
<env name="center">
|
|
|
|
<env name="tabular"><parm>ccc</parm>
|
|
|
|
<TeXML escape="0">
|
|
|
|
<cmd name="textbf"><parm>Status</parm></cmd> & <cmd name="textbf"><parm>Type</parm></cmd> & <cmd name="textbf"><parm>Short Name</parm></cmd> \\
|
|
|
|
<xsl:value-of select="/xep/header/status"/> & <xsl:value-of select="/xep/header/type"/> & <TeXML escape="1"><xsl:value-of select="/xep/header/shortname"/></TeXML>
|
|
|
|
</TeXML>
|
2017-01-09 10:59:23 -05:00
|
|
|
</env>
|
2009-10-07 07:08:13 -04:00
|
|
|
</env>
|
|
|
|
<env name="abstract">
|
|
|
|
<xsl:value-of select="/xep/header/abstract"/>
|
|
|
|
</env>
|
|
|
|
<cmd name="newpage" nl2="1"/>
|
2010-03-18 12:59:39 -04:00
|
|
|
<TeXML escape="0">
|
|
|
|
\fancyhead[L,L]{\includegraphics[totalheight=10pt]{xmpp.pdf} \slshape \leftmark}
|
|
|
|
\fancyfoot[C,C]{\thepage}
|
|
|
|
</TeXML>
|
2010-03-18 13:12:52 -04:00
|
|
|
<cmd name="KOMAoptions"><parm>DIV=10</parm></cmd>
|
2009-10-07 07:08:13 -04:00
|
|
|
<cmd name="section*" nl2="1"><parm>Legal</parm></cmd>
|
2009-10-10 10:36:24 -04:00
|
|
|
<xsl:apply-templates select="/xep/header/legal" />
|
2009-10-07 07:08:13 -04:00
|
|
|
<cmd name="newpage" nl2="1"/>
|
|
|
|
<cmd name="tableofcontents" nl2="1"/>
|
|
|
|
<cmd name="newpage" nl2="1"/>
|
|
|
|
<cmd name="pagestyle" nl2="1"><parm>fancy</parm></cmd>
|
|
|
|
<cmd name="setcounter" nl2="1"><parm>page</parm><parm>1</parm></cmd>
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</env>
|
|
|
|
</TeXML>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- for legal crap -->
|
|
|
|
<xsl:template match="copyright">
|
|
|
|
<cmd name="subsection*" nl2="1"><parm>Copyright</parm></cmd>
|
2009-10-10 10:36:24 -04:00
|
|
|
<group><cmd name="small" />
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:apply-templates/>
|
2009-10-10 10:36:24 -04:00
|
|
|
</group>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="permissions">
|
|
|
|
<cmd name="subsection*" nl2="1"><parm>Permissions</parm></cmd>
|
2009-10-10 10:36:24 -04:00
|
|
|
<group><cmd name="small" />
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:apply-templates/>
|
2009-10-10 10:36:24 -04:00
|
|
|
</group>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="warranty">
|
|
|
|
<cmd name="subsection*" nl2="1"><parm>Warranty</parm></cmd>
|
2009-10-10 10:36:24 -04:00
|
|
|
<group><cmd name="small" />
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:apply-templates/>
|
2009-10-10 10:36:24 -04:00
|
|
|
</group>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="liability">
|
|
|
|
<cmd name="subsection*"><parm>Liability</parm></cmd>
|
2009-10-10 10:36:24 -04:00
|
|
|
<group><cmd name="small" />
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:apply-templates/>
|
2009-10-10 10:36:24 -04:00
|
|
|
</group>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="conformance">
|
|
|
|
<cmd name="subsection*"><parm>Conformance</parm></cmd>
|
2009-10-10 10:36:24 -04:00
|
|
|
<group><cmd name="small" />
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:apply-templates/>
|
2009-10-10 10:36:24 -04:00
|
|
|
</group>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:template match="header">
|
|
|
|
</xsl:template>
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
<!-- table -->
|
|
|
|
<xsl:template match='table'>
|
|
|
|
<TeXML escape="0">
|
|
|
|
<env name="center">
|
2012-05-31 03:28:48 -04:00
|
|
|
<env name='longtabu'>
|
2009-10-07 07:08:13 -04:00
|
|
|
<parm><xsl:for-each select='tr[1]/th | tr[1]/td'><xsl:if test="position() = 1">l</xsl:if><xsl:if test='position() != last() and position() > 1'>X</xsl:if><xsl:if test='position() = last()'>X</xsl:if></xsl:for-each></parm>
|
|
|
|
<xsl:for-each select='tr'>
|
|
|
|
<xsl:for-each select='td | th'><xsl:if test='position() > 1'> & </xsl:if><TeXML escape="1"><xsl:value-of select='.'/></TeXML><xsl:if test='position() = last()'> \\</xsl:if></xsl:for-each>
|
|
|
|
<xsl:if test="position() = 1">
|
|
|
|
\hline
|
|
|
|
\hline
|
2012-05-31 03:28:48 -04:00
|
|
|
\endhead
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
</env>
|
|
|
|
</env>
|
|
|
|
</TeXML>
|
|
|
|
</xsl:template>
|
|
|
|
|
2017-01-09 10:59:23 -05:00
|
|
|
|
|
|
|
<!-- link -->
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:template match="span">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template match="link">
|
|
|
|
<xsl:variable name="isHTTP">
|
|
|
|
<xsl:call-template name="str:string-match">
|
|
|
|
<xsl:with-param name="text"><xsl:value-of select="text()"/></xsl:with-param>
|
|
|
|
<xsl:with-param name="pattern">*http*</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:variable name="isInternal">
|
|
|
|
<xsl:call-template name="str:string-match">
|
|
|
|
<xsl:with-param name="text"><xsl:value-of select="@url"/></xsl:with-param>
|
|
|
|
<xsl:with-param name="pattern">#*</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</xsl:variable>
|
|
|
|
<xsl:if test="$isInternal = 0">
|
|
|
|
<cmd name="href">
|
|
|
|
<parm>
|
|
|
|
<TeXML escape="0"><xsl:value-of select='@url'/></TeXML>
|
|
|
|
</parm>
|
|
|
|
<parm>
|
|
|
|
<xsl:if test="$isHTTP = 1">
|
|
|
|
<cmd name="url"><parm><xsl:apply-templates/></parm></cmd>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="$isHTTP = 0">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</xsl:if>
|
|
|
|
</parm>
|
|
|
|
</cmd>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="$isInternal = 1">
|
|
|
|
<cmd name="hyperref">
|
|
|
|
<opt><TeXML escape="0"><xsl:value-of select='@url'/></TeXML></opt>
|
|
|
|
<parm><xsl:apply-templates/></parm>
|
|
|
|
</cmd>
|
|
|
|
<!--<TeXML escape="0"> { </TeXML><cmd name="footnotesize" /><cmd name="pageref"><parm><TeXML escape="0"><xsl:value-of select='@url'/></TeXML></parm></cmd><TeXML escape="0"> } </TeXML>-->
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
<!-- note -->
|
|
|
|
<xsl:template match="note">
|
|
|
|
<cmd name="footnote"><parm><xsl:apply-templates/></parm></cmd>
|
2013-12-01 08:40:36 -05:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- em -->
|
|
|
|
<xsl:template match="em">
|
|
|
|
<cmd name="emph"><parm><xsl:apply-templates/></parm></cmd>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- strong -->
|
|
|
|
<xsl:template match="strong">
|
|
|
|
<cmd name="textbf"><parm><xsl:apply-templates/></parm></cmd>
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:template>
|
2010-09-20 14:04:59 -04:00
|
|
|
|
2013-12-01 16:45:09 -05:00
|
|
|
<!-- sub -->
|
|
|
|
<xsl:template match="sub">
|
|
|
|
<math><cmd name="textsuperscript"><parm><xsl:apply-templates/></parm></cmd></math>
|
|
|
|
</xsl:template>
|
|
|
|
|
2010-09-20 16:46:48 -04:00
|
|
|
<!-- span[@class='super'] -->
|
2010-09-20 16:39:06 -04:00
|
|
|
<xsl:template match="span[@class='super']">
|
2010-09-20 16:46:48 -04:00
|
|
|
<math><spec cat="sup"/><spec cat="bg"/><xsl:apply-templates/><spec cat="eg"/></math>
|
2010-09-20 14:04:59 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
<!-- p -->
|
2017-01-09 10:59:23 -05:00
|
|
|
<xsl:template match="p">
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:apply-templates/><TeXML escape="0" emptylines="1"><xsl:text>\\
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:text></TeXML>
|
2017-01-09 10:59:23 -05:00
|
|
|
</xsl:template>
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
<!-- li -->
|
|
|
|
<xsl:template match="li">
|
|
|
|
<TeXML escape="1" emptylines="1">
|
|
|
|
<cmd name="item" /> <xsl:apply-templates/><xsl:text>
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:text>
|
|
|
|
</TeXML>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- ul -->
|
2017-01-09 10:59:23 -05:00
|
|
|
<xsl:template match="ul">
|
2009-10-07 07:08:13 -04:00
|
|
|
<env name="itemize">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</env>
|
2017-01-09 10:59:23 -05:00
|
|
|
</xsl:template>
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
<!-- ol -->
|
2017-01-09 10:59:23 -05:00
|
|
|
<xsl:template match="ol">
|
2009-10-07 07:08:13 -04:00
|
|
|
<env name="enumerate">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</env>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- dl -->
|
2017-01-09 10:59:23 -05:00
|
|
|
<xsl:template match="dl">
|
2009-10-07 07:08:13 -04:00
|
|
|
<env name="description">
|
|
|
|
<xsl:apply-templates/>
|
|
|
|
</env>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- di -->
|
|
|
|
<xsl:template match="di">
|
|
|
|
<TeXML escape="1" emptylines="1">
|
|
|
|
<cmd name="item"><opt><xsl:value-of select="./dt" /></opt></cmd>
|
|
|
|
<xsl:text>
|
|
|
|
</xsl:text>
|
2017-01-09 10:59:23 -05:00
|
|
|
<xsl:value-of select="./dd" />
|
2009-10-07 07:08:13 -04:00
|
|
|
</TeXML>
|
|
|
|
</xsl:template>
|
2017-01-09 10:59:23 -05:00
|
|
|
|
|
|
|
<!-- example -->
|
|
|
|
<xsl:template match="example">
|
|
|
|
<env name="lstlisting">
|
2009-10-07 07:08:13 -04:00
|
|
|
<opt>caption=<group><TeXML escape="1"><xsl:value-of select="@caption"/></TeXML></group></opt>
|
|
|
|
<TeXML escape="0" emptylines="1">
|
2017-01-09 10:59:23 -05:00
|
|
|
<xsl:apply-templates />
|
2009-10-07 07:08:13 -04:00
|
|
|
</TeXML>
|
2017-01-09 10:59:23 -05:00
|
|
|
</env>
|
|
|
|
</xsl:template>
|
2009-10-07 07:08:13 -04:00
|
|
|
|
|
|
|
<xsl:template match="br">
|
|
|
|
<!--<cmd name="newline" gr="0"/>-->
|
2017-01-09 10:59:23 -05:00
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
</xsl:template>
|
|
|
|
|
2017-01-09 10:59:23 -05:00
|
|
|
<!-- code -->
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:template match="code">
|
|
|
|
<xsl:if test='@class = "inline"'>
|
|
|
|
<cmd name='path'><parm><TeXML escape="0"><xsl:value-of select="."/></TeXML></parm></cmd>
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test='not(@class)'>
|
2017-01-09 10:59:23 -05:00
|
|
|
<env name="lstlisting">
|
2009-11-04 05:56:45 -05:00
|
|
|
<TeXML escape="0" emptylines="1" ligatures="1">
|
2009-10-07 07:08:13 -04:00
|
|
|
<xsl:value-of select="."/>
|
|
|
|
</TeXML>
|
2017-01-09 10:59:23 -05:00
|
|
|
</env>
|
2009-11-04 05:56:45 -05:00
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
2009-10-07 07:08:13 -04:00
|
|
|
|
2014-03-13 12:20:07 -04:00
|
|
|
<!-- img -->
|
|
|
|
<xsl:template match="img">
|
|
|
|
<env name="figure"><opt>H</opt>
|
|
|
|
<cmd name="centering" />
|
2014-03-13 13:34:14 -04:00
|
|
|
<cmd name="adjustimage"><parm><TeXML escape="0">max size={.9\textwidth}{.9\textheight}</TeXML></parm><parm>inlineimage-<xsl:value-of select="/xep/header/number" />-<xsl:value-of select="count(preceding::img)" /></parm></cmd>
|
2014-03-13 12:20:07 -04:00
|
|
|
</env>
|
|
|
|
</xsl:template>
|
|
|
|
|
2009-10-07 07:08:13 -04:00
|
|
|
<!-- section3 -->
|
|
|
|
<xsl:template match="section3">
|
|
|
|
<cmd name="subsubsection" nl2="1">
|
|
|
|
<parm><xsl:text></xsl:text><xsl:value-of select="@topic"/></parm>
|
|
|
|
</cmd>
|
|
|
|
<cmd name="label">
|
|
|
|
<parm><TeXML escape="0"><xsl:value-of select="@anchor" /></TeXML></parm>
|
|
|
|
</cmd>
|
|
|
|
<xsl:apply-templates />
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- section2 -->
|
|
|
|
<xsl:template match="section2">
|
|
|
|
<cmd name="subsection" nl2="1">
|
|
|
|
<parm><xsl:text></xsl:text><xsl:value-of select="@topic"/></parm>
|
|
|
|
</cmd>
|
|
|
|
<cmd name="label">
|
|
|
|
<parm><TeXML escape="0"><xsl:value-of select="@anchor" /></TeXML></parm>
|
|
|
|
</cmd>
|
|
|
|
<xsl:apply-templates />
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<!-- section1 -->
|
|
|
|
<xsl:template match="section1">
|
|
|
|
<cmd name="section" nl2="1">
|
|
|
|
<parm><xsl:text></xsl:text><xsl:value-of select="@topic"/></parm>
|
|
|
|
</cmd>
|
|
|
|
<cmd name="label" nl2="1">
|
|
|
|
<parm><TeXML escape="0"><xsl:value-of select="@anchor" /></TeXML></parm>
|
|
|
|
</cmd>
|
|
|
|
<xsl:apply-templates />
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-11 15:23:59 -05:00
|
|
|
</xsl:stylesheet>
|