Created
July 9, 2010 22:00
-
-
Save urschrei/470130 to your computer and use it in GitHub Desktop.
\glossaries modifications for memoir.xslt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:template match="html:li" mode="glossary"> | |
<xsl:param name="footnoteId"/> | |
<xsl:if test="parent::html:ol/parent::html:div/@class = 'footnotes'"> | |
<xsl:if test="concat('#',@id) = $footnoteId"> | |
<xsl:apply-templates select="html:span[@class='glossary sort']" mode="glossary"/> | |
<xsl:apply-templates select="html:span[@class='glossary name']" mode="glossary"/> | |
<xsl:variable name="glsname"> | |
<xsl:apply-templates select="html:span[@class='glossary name']" mode="glossary"/> | |
</xsl:variable> | |
<xsl:text>,</xsl:text> | |
<xsl:text>description={</xsl:text> | |
<xsl:apply-templates select="html:p" mode="glossary"/> | |
<xsl:text>}} </xsl:text> | |
<xsl:variable name="glsbf"> | |
<xsl:value-of select="substring-after($glsname,'{')"/> | |
</xsl:variable> | |
<xsl:variable name="glsclean"> | |
<xsl:value-of select="substring-before($glsbf,'}')"/> | |
</xsl:variable> | |
<xsl:text>\glsadd{</xsl:text> | |
<xsl:value-of select="$glsclean"/> | |
<xsl:text>}</xsl:text> | |
</xsl:if> | |
</xsl:if> | |
</xsl:template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
l. 1 above refers to ~ l. 413 in the original