git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'master' into citeproc
commit83e6c01e4d393f642231ed76e7a44804ec781f66 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 9 Nov 2010, 22:52 (16 years ago) parent07775b521556e3
4 files changed+7−20
README−5 src/Text/Pandoc/Readers/Markdown.hs+1−1 src/Text/Pandoc/Writers/HTML.hs+4−12 tests/markdown-reader-more.native+2−2
README−5
@@ -347,11 +347,6 @@ For further documentation, see the `pandoc(1)` man page.
347347\--mathjax=*URL*
348348: causes `pandoc` to use [MathJax] to display embedded TeX math in HTML
349349 output. The *URL* should point to the `MathJax.js` load script.
350− Pandoc will use MathML with MathJax, so your `config/MathJax.js`
351− file should contain the following settings:
352−
353− extensions: ["mml2jax.js"],
354− jax: ["input/MathML", "output/HTML-CSS"],
355350
356351`--gladtex`*[=url]*
357352: causes TeX formulas to be enclosed in `<eq>` tags in HTML, Slidy, or
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -1300,7 +1300,7 @@ rawHtmlInline' = do
13001300 st <- getState
13011301 result <- if stateStrict st
13021302 then choice [htmlBlockElement, anyHtmlTag, anyHtmlEndTag]
1303− else anyHtmlInlineTag
1303+ else choice [htmlComment, anyHtmlInlineTag]
13041304 return $ HtmlInline result
13051305
13061306inlineCitation :: GenParser Char ParserState Inline
src/Text/Pandoc/Writers/HTML.hs+4−12
@@ -503,18 +503,10 @@ inlineToHtml opts inline =
503503 Left _ -> inlineListToHtml opts
504504 (readTeXMath str) >>= return .
505505 (thespan ! [theclass "math"])
506− MathJax _ -> do
507− let dt = if t == InlineMath
508− then DisplayInline
509− else DisplayBlock
510− let conf = useShortEmptyTags (const False)
511− defaultConfigPP
512− case texMathToMathML dt str of
513− Right r -> return $ primHtml $
514− ppcElement conf r
515− Left _ -> inlineListToHtml opts
516− (readTeXMath str) >>= return .
517− (thespan ! [theclass "math"])
506+ MathJax _ -> return $ primHtml $
507+ case t of
508+ InlineMath -> "\\(" ++ str ++ "\\)"
509+ DisplayMath -> "\\[" ++ str ++ "\\]"
518510 PlainMath -> do
519511 x <- inlineListToHtml opts (readTeXMath str)
520512 let m = thespan ! [theclass "math"] $ x
tests/markdown-reader-more.native+2−2
@@ -18,8 +18,8 @@ Pandoc (Meta {docTitle = [Str "Title",Space,Str "spanning",Space,Str "multiple",
1818, Para [Math InlineMath "\\$2 + \\$3"]
1919, Header 2 [Str "Commented",Str "-",Str "out",Space,Str "list",Space,Str "item"]
2020, BulletList
21− [ [ Plain [Str "one"]
22− , RawHtml "<!--\n- two\n-->" ], [ Plain [Str "three"] ] ]
21+ [ [ Plain [Str "one",Space,HtmlInline "<!--\n- two\n-->"] ]
22+ , [ Plain [Str "three"] ] ]
2323, Header 2 [Str "Backslash",Space,Str "newline"]
2424, Para [Str "hi",LineBreak,Str "there"]
2525, Header 2 [Str "Code",Space,Str "spans"]