git.iko.soy/typeable/pandoc
on master help sign in
Changed `--mathjax` to link to mathjax CDN by default.
310697cJohn MacFarlane
README+3−1
@@ -238,9 +238,11 @@ Options
238 no link to the jsMath load script will be inserted; it is then
238 no link to the jsMath load script will be inserted; it is then
239 up to the author to provide such a link in the HTML template.
239 up to the author to provide such a link in the HTML template.
240
240
241−`--mathjax=`*URL*
241+`--mathjax`[=*URL*]
242: Use [MathJax] to display embedded TeX math in HTML output.
242: Use [MathJax] to display embedded TeX math in HTML output.
243 The *URL* should point to the `MathJax.js` load script.
243 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.
244
246
245`--gladtex`
247`--gladtex`
246: Enclose TeX math in `<eq>` tags in HTML output. These can then
248: Enclose TeX math in `<eq>` tags in HTML output. These can then
src/pandoc.hs+6−2
@@ -288,8 +288,12 @@ options =
288 "" -- "Use jsMath for HTML math"
288 "" -- "Use jsMath for HTML math"
289
289
290 , Option "" ["mathjax"]
290 , Option "" ["mathjax"]
291− (ReqArg
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"
292− (\arg opt -> return opt { optHTMLMathMethod = MathJax arg})
296+ return opt { optHTMLMathMethod = MathJax url'})
293 "URL")
297 "URL")
294 "" -- "Use MathJax for HTML math"
298 "" -- "Use MathJax for HTML math"
295
299