| |
---|
| | <common formats="/latex/xelatex/">\-</common> |
---|
| | <!-- Could use U+00AD SOFT HYPHEN for XHTML? --> |
---|
| | </template> |
---|
| | |
---|
| | <!-- |
---|
| | Technically we don't need to disable output escaping for all of |
---|
| | these, but it's probably better to code them all consistently, |
---|
| | rather than trying to figure out which ones do need it (e.g., |
---|
| |   for a non-breaking space) and which ones don't (e.g., |
---|
| | &). |
---|
| | --> |
---|
| | <template name="ellipsis-sign" match="ellipsis-sign|etc|ellipsis|dots|horizontal-ellipsis"> |
---|
| | <common formats="/latex/xelatex/">{\ldots}</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&hellip;</xsl:text></html> |
---|
| | <!-- U+2026 HORIZONTAL ELLIPSIS --> |
---|
| | <xhtml><xsl:text>…</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="ellipsis-sign-strip" match="ellipsis-sign|etc|ellipsis|dots|horizontal-ellipsis" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="ellipsis-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <!-- Misc typographic symbols --> |
---|
| | <template name="endash" match="endash|en-dash|ndash|n-dash"> |
---|
| | <common formats="/latex/xelatex/">--</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&ndash;</xsl:text></html> |
---|
| | <!-- U+2013 EN DASH --> |
---|
| | <xhtml><xsl:text>–</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="endash-strip" match="endash|en-dash|ndash|n-dash" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="endash" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="emdash" match="emdash|em-dash|mdash|m-dash"> |
---|
| | <common formats="/latex/xelatex/">---</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&mdash;</xsl:text></html> |
---|
| | <xhtml><xsl:text>—</xsl:text></xhtml> |
---|
| | <!-- U+2014 EM DASH --> |
---|
| | </template> |
---|
| | |
---|
| | <template name="emdash-strip" match="emdash|em-dash|mdash|m-dash" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="emdash" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <!-- 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> |
---|
| | <!-- U+005F LOW LINE --> |
---|
| | <common formats="/html/xhtml/">_</common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="underscore-strip" match="underscore|low-line" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="underscore" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="backslash" match="backslash"> |
---|
| | <common formats="/latex/xelatex/">\(\backslash\)</common> |
---|
| | <!-- U+005C REVERSE SOLIDUS --> |
---|
| | <common formats="/html/xhtml/">\</common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="backslash-strip" match="backslash" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="backslash" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="apostrophe" match="apostrophe|right-single-quotation-mark"> |
---|
| | <common formats="/latex/xelatex/">'</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&rsquo;</xsl:text></html> |
---|
| | <!-- U+2019 RIGHT SINGLE QUOTATION MARK --> |
---|
| | <xhtml><xsl:text>’</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="apostrophe-strip" match="apostrophe|right-single-quotation-mark" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="apostrophe" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="dollar" match="dollar|dollar-sign"> |
---|
| | <common formats="/latex/xelatex/">{\$}</common> |
---|
| | <!-- U+0024 DOLLAR SIGN --> |
---|
| | <common formats="/html/xhtml/">$</common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="space-dollar" match="dollar|dollar-sign" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="dollar" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="percent-sign" match="percent-sign|percentage-sign|percent"> |
---|
| | <common formats="/latex/xelatex/">{\%}</common> |
---|
| | <!-- U+0025 PERCENT SIGN --> |
---|
| | <common formats="/html/xhtml/">%</common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="percent-sign-strip" match="percent-sign|percentage-sign|percent" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="percent-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="ampersand" match="ampersand"> |
---|
| | <common formats="/latex/xelatex/">{\&}</common> |
---|
| | <common formats="/html/xhtml/"><xsl:text disable-output-escaping="yes">&amp;</xsl:text></common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="ampersand-strip" match="ampersand" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="ampersand" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="trademark-sign" match="trademark-sign|trademark|tm|trade-mark-sign"> |
---|
| | <common formats="/latex/xelatex/">{\texttrademark}</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&trade;</xsl:text></html> |
---|
| | <!-- U+2122 TRADE MARK SIGN --> |
---|
| | <xhtml><xsl:text>™</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="trademark-sign-strip" match="trademark-sign|trademark|tm|trade-mark-sign" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="trademark-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="copyright-sign" match="copyright-sign"> |
---|
| | <common formats="/latex/xelatex/">{\copyright}</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&copy;</xsl:text></html> |
---|
| | <!-- U+00A9 COPYRIGHT SIGN --> |
---|
| | <xhtml><xsl:text>©</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="copyright-sign-strip" match="copyright-sign" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="copyright-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="degree-sign" match="degree-sign|degrees"> |
---|
| | <common formats="/latex/xelatex/">\ensuremath{^{\circ}}</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&deg;</xsl:text></html> |
---|
| | <!-- U+0080 DEGREE SIGN --> |
---|
| | <xhtml><xsl:text>°</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="degree-sign-strip" match="degree-sign|degrees" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="degree-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="section-sign" match="section-sign"> |
---|
| | <common formats="/latex/xelatex/">{\S}</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&sect;</xsl:text></html> |
---|
| | <!-- U+00A7 SECTION SIGN --> |
---|
| | <xhtml><xsl:text>§</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="section-sign-strip" match="section-sign" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="section-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="sharp-sign" match="sharp|hash|number-sign"> |
---|
| | <common formats="/latex/xelatex/">{\#}</common> |
---|
| | <!-- U+0023 NUMBER SIGN --> |
---|
| | <common formats="/html/xhtml/"><xsl:text>#</xsl:text></common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="sharp-sign-strip" match="sharp|hash|number-sign" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="sharp-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="paragraph-sign" match="paragraph-sign|pilcrow|pilcrow-sign"> |
---|
| | <common formats="/latex/xelatex/">{\P}</common> |
---|
| | <html><xsl:text disable-output-escaping="yes">&para;</xsl:text></html> |
---|
| | <!-- U+00B6 PILCROW SIGN --> |
---|
| | <xhtml><xsl:text>¶</xsl:text></xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="paragraph-sign-strip" match="paragraph-sign|pilcrow|pilcrow-sign" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="paragraph-sign" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="left-curly-bracket" match="left-curly-bracket|left-curly-brace|left-brace"> |
---|
| | <common formats="/latex/xelatex/">\ensuremath{\{}</common> |
---|
| | <!-- U+007B LEFT CURLY BRACKET --> |
---|
| | <common formats="/html/xhtml/"><xsl:text>{</xsl:text></common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="left-curly-bracket-strip" match="left-curly-bracket|left-curly-brace|left-brace" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="left-curly-bracket" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="right-curly-bracket" match="right-curly-bracket|right-curly-brace|right-brace"> |
---|
| | <common formats="/latex/xelatex/">\ensuremath{\}}</common> |
---|
| | <!-- U+007D LEFT CURLY BRACKET --> |
---|
| | <common formats="/html/xhtml/"><xsl:text>}</xsl:text></common> |
---|
| | </template> |
---|
| | |
---|
| | <template name="right-curly-bracket-strip" match="right-curly-bracket|right-curly-brace|right-brace" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="right-curly-bracket" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <!-- Greek characters. --> |
---|
| | <include href="modules/greek-characters.xml" /> |
---|
| | |
---|
| | <!-- Miscellaneous symbols. --> |
---|
| | <include href="modules/miscellaneous-symbols.xml" /> |
---|
| | |
---|
| | <!-- Emoticons. --> |
---|
| | <include href="modules/emoticons.xml" /> |
---|
| | |
---|
| | <!-- Mathematical operators and symbols. --> |
---|
| | <include href="modules/mathematical-symbols.xml" /> |
---|
| | |
---|
| |
---|
| | <common formats="/latex/xelatex/">\textbf{<xsl:apply-templates />}</common> |
---|
| | <common formats="/html/xhtml/"><b><xsl:apply-templates /></b></common> |
---|
| | </template> |
---|
| | |
---|
| | <!-- |
---|
| | Emoticons, specifically :), :| and :(. We may be able to do more |
---|
| | with the HTML version if we switch to Unicode? |
---|
| | |
---|
| | The LaTeX version requires the pifont package, which has been added |
---|
| | to the list of standard packages in xml2xslt.xsl. It also requires |
---|
| | Microsoft's Wingdings font (jwi) to be available. |
---|
| | |
---|
| | @type: the type of emoticon [optional] |
---|
| | 'sad' |
---|
| | 'neutral' or 'meh' :) |
---|
| | 'happy' [default] |
---|
| | --> |
---|
| | <template name="emoticon" match="emoticon|smiley"> |
---|
| | <common formats="/latex/xelatex/"> |
---|
| | <xsl:choose> |
---|
| | <xsl:when test="@type = 'sad'"> |
---|
| | <xsl:text>\Pisymbol{jwi}{"4C}</xsl:text> |
---|
| | </xsl:when> |
---|
| | <xsl:when test="@type = 'neutral' or @type = 'meh'"> |
---|
| | <xsl:text>\Pisymbol{jwi}{"4B}</xsl:text> |
---|
| | </xsl:when> |
---|
| | <xsl:otherwise> |
---|
| | <xsl:text>\Pisymbol{jwi}{"4A}</xsl:text> |
---|
| | </xsl:otherwise> |
---|
| | </xsl:choose> |
---|
| | </common> |
---|
| | <html> |
---|
| | <xsl:choose> |
---|
| | <xsl:when test="@type = 'sad'"> |
---|
| | <xsl:text>:(</xsl:text> |
---|
| | </xsl:when> |
---|
| | <xsl:when test="@type = 'neutral' or @type = 'meh'"> |
---|
| | <xsl:text>:|</xsl:text> |
---|
| | </xsl:when> |
---|
| | <xsl:otherwise> |
---|
| | <xsl:text>:)</xsl:text> |
---|
| | </xsl:otherwise> |
---|
| | </xsl:choose> |
---|
| | </html> |
---|
| | <xhtml> |
---|
| | <xsl:choose> |
---|
| | <xsl:when test="@type = 'sad'"> |
---|
| | <!-- U+2639 WHITE FROWNING FACE --> |
---|
| | <span class="unicode"><xsl:text>☹</xsl:text></span> |
---|
| | </xsl:when> |
---|
| | <!-- There doesn't appear to be a Unicode character for this one. :( --> |
---|
| | <xsl:when test="@type = 'neutral' or @type = 'meh'"> |
---|
| | <xsl:text>:|</xsl:text> |
---|
| | </xsl:when> |
---|
| | <xsl:otherwise> |
---|
| | <!-- U+263A WHITE SMILING FACE --> |
---|
| | <span class="unicode"><xsl:text>☺</xsl:text></span> |
---|
| | </xsl:otherwise> |
---|
| | </xsl:choose> |
---|
| | </xhtml> |
---|
| | </template> |
---|
| | |
---|
| | <template name="emoticon-strip" match="emoticon|smiley" mode="strip"> |
---|
| | <common formats="/html/xhtml/"> |
---|
| | <xsl:call-template name="emoticon" /> |
---|
| | </common> |
---|
| | </template> |
---|
| | |
---|
| | <!-- Special styles --> |
---|
| | <template name="emph" match="emph|em"> |
---|
| | <common formats="/latex/xelatex/">\emph{<xsl:apply-templates />}</common> |
---|
| | <common formats="/html/xhtml/"><em><xsl:apply-templates /></em></common> |
---|
| |
---|
|