git.iko.soy/typeable/pandoc
on master help sign in
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

commitd411b104389bf4a458ebdd8f23998316b90b0aa3 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSun 2 Dec 2007, 02:50 (19 years ago) parentd1832da
2 files changed+5−2
README+3−1 Text/Pandoc/Writers/HTML.hs+2−1
README+3−1
@@ -862,7 +862,9 @@ In HTML and S5 output, the way math is rendered will depend on the
862862command-line options selected:
863863
8648641. The default is to render TeX math as far as possible using unicode
865− characters, as with RTF and Docbook output.
865+ characters, as with RTF and Docbook output. Formulas are put inside
866+ a `span` with `class="math"`, so that they may be styled differently
867+ from the surrounding text if needed.
866868
8678692. If the `--asciimathml` option is used, TeX math will be displayed
868870 between $ characters, as in LaTeX, and the [ASCIIMathML] script will
Text/Pandoc/Writers/HTML.hs+2−1
@@ -411,7 +411,8 @@ inlineToHtml opts inline =
411411 GladTeX ->
412412 return $ tag "eq" << str
413413 PlainMath ->
414− inlineListToHtml opts (readTeXMath str))
414+ inlineListToHtml opts (readTeXMath str) >>=
415+ return . (thespan ! [theclass "math"]))
415416 (TeX str) -> return noHtml
416417 (HtmlInline str) -> return $ primHtml str
417418 (Link [Code str] (src,tit)) | "mailto:" `isPrefixOf` src ->