|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
XSLT Stylesheet DocBook -> LaTeX
|
|
Packit Service |
76cb02 |
############################################################################ -->
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:param name="doc.lot.show">figure,table</xsl:param>
|
|
Packit Service |
76cb02 |
<xsl:param name="doc.toc.show">1</xsl:param>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="toc"/>
|
|
Packit Service |
76cb02 |
<xsl:template match="lot"/>
|
|
Packit Service |
76cb02 |
<xsl:template match="lotentry"/>
|
|
Packit Service |
76cb02 |
<xsl:template match="tocpart|tocchap|tocfront|tocback|tocentry"/>
|
|
Packit Service |
76cb02 |
<xsl:template match="toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="book|article" mode="lot">
|
|
Packit Service |
76cb02 |
<xsl:param name="lot"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="$lot='figure' and .//figure">
|
|
Packit Service |
76cb02 |
<xsl:text>\listoffigures
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$lot='table' and .//table">
|
|
Packit Service |
76cb02 |
<xsl:text>\listoftables
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$lot='example' and .//example">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\listof{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$lot"/>
|
|
Packit Service |
76cb02 |
<xsl:text>}{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="gentext">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="key" select="'ListofExamples'"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
<xsl:text>}
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:when test="$lot='equation' and .//equation">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\listof{dbequation}</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:text>{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:call-template name="gentext">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="key" select="'ListofEquations'"/>
|
|
Packit Service |
76cb02 |
</xsl:call-template>
|
|
Packit Service |
76cb02 |
<xsl:text>}
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="book|article" mode="toc_lots">
|
|
Packit Service |
76cb02 |
<xsl:if test="$doc.toc.show != '0'">
|
|
Packit Service |
76cb02 |
<xsl:text>\tableofcontents
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:if>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="lots"/>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template match="book|article" mode="lots">
|
|
Packit Service |
76cb02 |
<xsl:param name="lots" select="$doc.lot.show"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:choose>
|
|
Packit Service |
76cb02 |
<xsl:when test="contains($lots, ',')">
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="lot">
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
select="normalize-space(substring-before($lots, ','))"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="lots">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="lots" select="substring-after($lots, ',')"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:when>
|
|
Packit Service |
76cb02 |
<xsl:otherwise>
|
|
Packit Service |
76cb02 |
<xsl:apply-templates select="." mode="lot">
|
|
Packit Service |
76cb02 |
<xsl:with-param name="lot" select="normalize-space($lots)"/>
|
|
Packit Service |
76cb02 |
</xsl:apply-templates>
|
|
Packit Service |
76cb02 |
</xsl:otherwise>
|
|
Packit Service |
76cb02 |
</xsl:choose>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:template name="set-tocdepth">
|
|
Packit Service |
76cb02 |
<xsl:param name="depth"/>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\addtocontents{toc}{\protect\setcounter{tocdepth}{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$depth"/>
|
|
Packit Service |
76cb02 |
<xsl:text>}\ignorespaces}
</xsl:text>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
<xsl:text>\setcounter{tocdepth}{</xsl:text>
|
|
Packit Service |
76cb02 |
<xsl:value-of select="$depth"/>
|
|
Packit Service |
76cb02 |
<xsl:text>}
</xsl:text>
|
|
Packit Service |
76cb02 |
</xsl:template>
|
|
Packit Service |
76cb02 |
|
|
Packit Service |
76cb02 |
</xsl:stylesheet>
|