1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--####################################################################
| $Id: db2latex-mw-itemizedlist.xsl 125 2004-04-06 19:55:32Z mw $
| $Author: mw $
+ ################################################################# -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
exclude-result-prefixes="doc" version="1.0">
<!-- DOCUMENTATION -->
<doc:reference id="itemizedlists" xmlns="">
<referenceinfo>
<releaseinfo role="meta">
$Id: db2latex-mw-itemizedlist.xsl 125 2004-04-06 19:55:32Z mw $
</releaseinfo>
<authorgroup>
<author><firstname>Michael</firstname> <surname>Wiedmann</surname></author>
</authorgroup>
<copyright>
<year>2004</year>
<holder>Michael Wiedmann</holder>
</copyright>
</referenceinfo>
<title>Lists <filename>db2latex-mw-itemizedlist.xsl</filename></title>
<partintro>
<section>
<title>Introduction</title>
<para>Especially for itemizedlist which contain only short lines
of text LaTeX's default vertical space between items is IMHO
too excessive. <filename>mdwlist.sty</filename> provides
"compacted itemize environments" with less vertical space
between items.
</para>
<para>
If the "spacing" attribute of the "itemizedlist" element
contains "compact" we use these modified itemize
environments instead of the standard LaTeX ones.
</para>
<para>Ensure that "\usepackage{mdwlist}" is output
somewhere in your stylesheets.
</para>
</section>
</partintro>
</doc:reference>
<xsl:output method="text" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="itemizedlist">
<xsl:if test="title"><xsl:apply-templates select="title"/></xsl:if>
<xsl:choose>
<xsl:when test="@spacing='compact'">
<xsl:text> \begin{itemize*}</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> \begin{itemize}</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="listitem"/>
<xsl:choose>
<xsl:when test="@spacing='compact'">
<xsl:text> \end{itemize*}</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> \end{itemize}</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
|