diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-07-23 13:30:59 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-07-23 13:30:59 -0700 |
commit | 310697ce7eb369b31d76f47fc3001003f00c2baa (patch) | |
tree | a057a7231dcd806d5d125b1740a16629e1bc9d36 /src/pandoc.hs | |
parent | 81c403d2d151eb6e5fdeaa840cf376860d151c9f (diff) |
Changed `--mathjax` to link to mathjax CDN by default.
`--mathjax` now takes an optional URL argument. If it is not provided,
pandoc links directly to the (secure) mathjax CDN.
This is what they now recommend. Thanks to dsanson.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index 22afd77ea..a2e22065d 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -288,8 +288,12 @@ options = "" -- "Use jsMath for HTML math" , Option "" ["mathjax"] - (ReqArg - (\arg opt -> return opt { optHTMLMathMethod = MathJax arg}) + (OptArg + (\arg opt -> do + let url' = case arg of + Just u -> u + Nothing -> "https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" + return opt { optHTMLMathMethod = MathJax url'}) "URL") "" -- "Use MathJax for HTML math" |