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.
commit310697ce7eb369b31d76f47fc3001003f00c2baa
authorJohn MacFarlane <jgm@berkeley.edu>
dateSat 23 Jul 2011, 13:30 (15 years ago)
parent81c403d
README+3−1
@@ -238,9 +238,11 @@ Options
238238 no link to the jsMath load script will be inserted; it is then
239239 up to the author to provide such a link in the HTML template.
240240
241−`--mathjax=`*URL*
241+`--mathjax`[=*URL*]
242242: Use [MathJax] to display embedded TeX math in HTML output.
243243 The *URL* should point to the `MathJax.js` load script.
244+ If a *URL* is not provided, a link to the MathJax CDN will
245+ be inserted.
244246
245247`--gladtex`
246248: Enclose TeX math in `<eq>` tags in HTML output. These can then
src/pandoc.hs+6−2
@@ -288,8 +288,12 @@ options =
288288 "" -- "Use jsMath for HTML math"
289289
290290 , Option "" ["mathjax"]
291− (ReqArg
292− (\arg opt -> return opt { optHTMLMathMethod = MathJax arg})
291+ (OptArg
292+ (\arg opt -> do
293+ let url' = case arg of
294+ Just u -> u
295+ Nothing -> "https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
296+ return opt { optHTMLMathMethod = MathJax url'})
293297 "URL")
294298 "" -- "Use MathJax for HTML math"
295299