- Made more consistent use of xsl:text.
1 parent 366756f commit 1772fd759e7f9664b955cd2f5d34bf2316e48748
nstanger authored on 23 Feb 2012
Showing 1 changed file
View
50
modules/miscellaneous-symbols.xml
 
<!-- Sharp/number symbol (#). -->
<template name="sharp-sign" match="sharp|hash|number-sign">
<common formats="/latex/xelatex/">{\#}</common>
<common formats="/latex/xelatex/"><xsl:text>{\#}</xsl:text></common>
<!-- U+0023 NUMBER SIGN -->
<common formats="/html/xhtml/"><xsl:text>#</xsl:text></common>
</template>
 
<!-- Dollar sign ($). -->
<template name="dollar" match="dollar|dollar-sign">
<common formats="/latex/xelatex/">{\$}</common>
<common formats="/latex/xelatex/"><xsl:text>{\$}</xsl:text></common>
<!-- U+0024 DOLLAR SIGN -->
<common formats="/html/xhtml/">$</common>
<common formats="/html/xhtml/"><xsl:text>$</xsl:text></common>
</template>
 
<template name="dollar-strip" match="dollar|dollar-sign" mode="strip">
<common formats="/html/xhtml/">
<!-- Percent sign (%). -->
<template name="percent-sign" match="percent-sign|percentage-sign|percent">
<common formats="/latex/xelatex/">{\%}</common>
<common formats="/latex/xelatex/"><xsl:text>{\%}</xsl:text></common>
<!-- U+0025 PERCENT SIGN -->
<common formats="/html/xhtml/">%</common>
<common formats="/html/xhtml/"><xsl:text>%</xsl:text></common>
</template>
 
<template name="percent-sign-strip" match="percent-sign|percentage-sign|percent" mode="strip">
<common formats="/html/xhtml/">
<!-- Ampersand (&). -->
<template name="ampersand" match="ampersand">
<common formats="/latex/xelatex/">{\&amp;}</common>
<common formats="/latex/xelatex/"><xsl:text>{\&amp;}</xsl:text></common>
<!-- Would be U+0026 AMPERSAND, except it has special meaning in XML. -->
<common formats="/html/xhtml/"><xsl:text disable-output-escaping="yes">&amp;amp;</xsl:text></common>
</template>
 
<!-- Backslash (\). -->
<template name="backslash" match="backslash">
<common formats="/latex/xelatex/">\(\backslash\)</common>
<common formats="/latex/xelatex/"><xsl:text>\(\backslash\)</xsl:text></common>
<!-- U+005C REVERSE SOLIDUS -->
<common formats="/html/xhtml/">\</common>
<common formats="/html/xhtml/"><xsl:text>\</xsl:text></common>
</template>
 
<template name="backslash-strip" match="backslash" mode="strip">
<common formats="/html/xhtml/">
<!-- Underscore (_). Use this for literal underscores that appear outside code blocks. Such things cause LaTeX to wig out. -->
<template name="underscore" match="underscore|low-line">
<common formats="/latex/xelatex/">\_</common>
<common formats="/latex/xelatex/"><xsl:text>\_</xsl:text></common>
<!-- U+005F LOW LINE -->
<common formats="/html/xhtml/">_</common>
<common formats="/html/xhtml/"><xsl:text>_</xsl:text></common>
</template>
 
<template name="underscore-strip" match="underscore|low-line" mode="strip">
<common formats="/html/xhtml/">
<!-- Left brace ({). -->
<template name="left-curly-bracket" match="left-curly-bracket|left-curly-brace|left-brace">
<common formats="/latex/xelatex/">\ensuremath{\{}</common>
<common formats="/latex/xelatex/"><xsl:text>\ensuremath{\{}</xsl:text></common>
<!-- U+007B LEFT CURLY BRACKET -->
<common formats="/html/xhtml/"><xsl:text>{</xsl:text></common>
</template>
 
<!-- Right brace (}). -->
<template name="right-curly-bracket" match="right-curly-bracket|right-curly-brace|right-brace">
<common formats="/latex/xelatex/">\ensuremath{\}}</common>
<common formats="/latex/xelatex/"><xsl:text>\ensuremath{\}}</xsl:text></common>
<!-- U+007D LEFT CURLY BRACKET -->
<common formats="/html/xhtml/"><xsl:text>}</xsl:text></common>
</template>
 
<!-- Degree symbol (°). -->
<template name="degree-sign" match="degree-sign|degrees">
<common formats="/latex/xelatex/">\ensuremath{^{\circ}}</common>
<common formats="/latex/xelatex/"><xsl:text>\ensuremath{^{\circ}}</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;deg;</xsl:text></html>
<!-- U+0080 DEGREE SIGN -->
<xhtml><xsl:text>°</xsl:text></xhtml>
</template>
<!-- Section symbol (§). -->
<template name="section-sign" match="section-sign">
<common formats="/latex/xelatex/">{\S}</common>
<common formats="/latex/xelatex/"><xsl:text>{\S}</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;sect;</xsl:text></html>
<!-- U+00A7 SECTION SIGN -->
<xhtml><xsl:text>§</xsl:text></xhtml>
</template>
<!-- Copyright symbol (©). -->
<template name="copyright-sign" match="copyright-sign">
<common formats="/latex/xelatex/">{\copyright}</common>
<common formats="/latex/xelatex/"><xsl:text>{\copyright}</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;copy;</xsl:text></html>
<!-- U+00A9 COPYRIGHT SIGN -->
<xhtml><xsl:text>©</xsl:text></xhtml>
</template>
<!-- Paragraph/pilcrow symbol (¶). -->
<template name="paragraph-sign" match="paragraph-sign|pilcrow|pilcrow-sign">
<common formats="/latex/xelatex/">{\P}</common>
<common formats="/latex/xelatex/"><xsl:text>{\P}</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;para;</xsl:text></html>
<!-- U+00B6 PILCROW SIGN -->
<xhtml><xsl:text></xsl:text></xhtml>
</template>
<!-- Figure/number dash (‒). -->
<template name="figure-dash" match="figure-dash|number-dash">
<common formats="/latex/xelatex/">--</common>
<common formats="/latex/xelatex/"><xsl:text>--</xsl:text></common>
<!-- &ndash; is close enough. -->
<html><xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text></html>
<!-- U+2012 FIGURE DASH -->
<xhtml><xsl:text></xsl:text></xhtml>
<!-- En dash (–). -->
<template name="endash" match="endash|en-dash|ndash|n-dash">
<common formats="/latex/xelatex/">--</common>
<common formats="/latex/xelatex/"><xsl:text>--</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;ndash;</xsl:text></html>
<!-- U+2013 EN DASH -->
<xhtml><xsl:text></xsl:text></xhtml>
</template>
<!-- Em dash (—). -->
<template name="emdash" match="emdash|em-dash|mdash|m-dash">
<common formats="/latex/xelatex/">---</common>
<common formats="/latex/xelatex/"><xsl:text>---</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;mdash;</xsl:text></html>
<xhtml><xsl:text></xsl:text></xhtml>
<!-- U+2014 EM DASH -->
</template>
<!-- Apostrophe (’). -->
<template name="apostrophe" match="apostrophe|right-single-quotation-mark">
<common formats="/latex/xelatex/">'</common>
<common formats="/latex/xelatex/"><xsl:text>'</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;rsquo;</xsl:text></html>
<!-- U+2019 RIGHT SINGLE QUOTATION MARK -->
<xhtml><xsl:text></xsl:text></xhtml>
</template>
<!-- Ellipsis (…). -->
<template name="ellipsis-sign" match="ellipsis-sign|etc|ellipsis|dots|horizontal-ellipsis">
<common formats="/latex/xelatex/">{\ldots}</common>
<common formats="/latex/xelatex/"><xsl:text>{\ldots}</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;hellip;</xsl:text></html>
<!-- U+2026 HORIZONTAL ELLIPSIS -->
<xhtml><xsl:text></xsl:text></xhtml>
</template>
<!-- Trademark symbol (™). -->
<template name="trademark-sign" match="trademark-sign|trademark|tm|trade-mark-sign">
<common formats="/latex/xelatex/">{\texttrademark}</common>
<common formats="/latex/xelatex/"><xsl:text>{\texttrademark}</xsl:text></common>
<html><xsl:text disable-output-escaping="yes">&amp;trade;</xsl:text></html>
<!-- U+2122 TRADE MARK SIGN -->
<xhtml><xsl:text></xsl:text></xhtml>
</template>
<!-- The LaTeX logo. Technically this isn't a "symbol", but this is the most logical place to put it. -->
<template name="LaTeX" match="LaTeX|latex">
<common formats="/latex/xelatex/">{\LaTeX}</common>
<common formats="/latex/xelatex/"><xsl:text>{\LaTeX}</xsl:text></common>
<common formats="/html/xhtml/">L<sup>A</sup>T<sub>E</sub>X</common>
</template>
 
<template name="LaTeX-strip" match="LaTeX|latex" mode="strip">
<common formats="/html/xhtml/">LaTeX</common>
</template>
<common formats="/html/xhtml/"><xsl:text>LaTeX</xsl:text></common>
</template>
</stylesheet>