Put math in HTML inside <span class="math">.

This way it can be distinguished from the surrounding text, e.g. put
in a different font.  Updated README accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1130 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-12-02 02:50:41 +00:00
parent d1832da9e1
commit d411b10438
2 changed files with 5 additions and 2 deletions

4
README
View file

@ -862,7 +862,9 @@ In HTML and S5 output, the way math is rendered will depend on the
command-line options selected:
1. The default is to render TeX math as far as possible using unicode
characters, as with RTF and Docbook output.
characters, as with RTF and Docbook output. Formulas are put inside
a `span` with `class="math"`, so that they may be styled differently
from the surrounding text if needed.
2. If the `--asciimathml` option is used, TeX math will be displayed
between $ characters, as in LaTeX, and the [ASCIIMathML] script will

View file

@ -411,7 +411,8 @@ inlineToHtml opts inline =
GladTeX ->
return $ tag "eq" << str
PlainMath ->
inlineListToHtml opts (readTeXMath str))
inlineListToHtml opts (readTeXMath str) >>=
return . (thespan ! [theclass "math"]))
(TeX str) -> return noHtml
(HtmlInline str) -> return $ primHtml str
(Link [Code str] (src,tit)) | "mailto:" `isPrefixOf` src ->