--mathjax: Use mathjax with raw latex rather than mathml.
It seems to work better, and the default config can be used.
This commit is contained in:
parent
9cf27c92c1
commit
bd24e83c81
2 changed files with 4 additions and 17 deletions
5
README
5
README
|
@ -347,11 +347,6 @@ For further documentation, see the `pandoc(1)` man page.
|
|||
\--mathjax=*URL*
|
||||
: causes `pandoc` to use [MathJax] to display embedded TeX math in HTML
|
||||
output. The *URL* should point to the `MathJax.js` load script.
|
||||
Pandoc will use MathML with MathJax, so your `config/MathJax.js`
|
||||
file should contain the following settings:
|
||||
|
||||
extensions: ["mml2jax.js"],
|
||||
jax: ["input/MathML", "output/HTML-CSS"],
|
||||
|
||||
`--gladtex`*[=url]*
|
||||
: causes TeX formulas to be enclosed in `<eq>` tags in HTML, Slidy, or
|
||||
|
|
|
@ -503,18 +503,10 @@ inlineToHtml opts inline =
|
|||
Left _ -> inlineListToHtml opts
|
||||
(readTeXMath str) >>= return .
|
||||
(thespan ! [theclass "math"])
|
||||
MathJax _ -> do
|
||||
let dt = if t == InlineMath
|
||||
then DisplayInline
|
||||
else DisplayBlock
|
||||
let conf = useShortEmptyTags (const False)
|
||||
defaultConfigPP
|
||||
case texMathToMathML dt str of
|
||||
Right r -> return $ primHtml $
|
||||
ppcElement conf r
|
||||
Left _ -> inlineListToHtml opts
|
||||
(readTeXMath str) >>= return .
|
||||
(thespan ! [theclass "math"])
|
||||
MathJax _ -> return $ primHtml $
|
||||
case t of
|
||||
InlineMath -> "\\(" ++ str ++ "\\)"
|
||||
DisplayMath -> "\\[" ++ str ++ "\\]"
|
||||
PlainMath -> do
|
||||
x <- inlineListToHtml opts (readTeXMath str)
|
||||
let m = thespan ! [theclass "math"] $ x
|
||||
|
|
Loading…
Reference in a new issue