@@ -1075,53 +1075,37 @@ Citation rendering
10751075Math rendering in HTML
10761076----------------------
10771077
1078−`-m` [*URL*], `--latexmathml`[`=`*URL*]
1079−
1080−: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
1081− To insert a link to a local copy of the `LaTeXMathML.js` script,
1082− provide a *URL*. If no *URL* is provided, the contents of the
1083− script will be inserted directly into the HTML header, preserving
1084− portability at the price of efficiency. If you plan to use math on
1085− several pages, it is much better to link to a copy of the script,
1086− so it can be cached.
1087−
1088−`--mathml`
1089−
1090−: Convert TeX math to [MathML] (in `docbook4`, `docbook5`, `jats`,
1091− `html4` and `html5`). This is the default in `odt` output.
1092−
1093−`--jsmath`[`=`*URL*]
1094−
1095−: Use [jsMath] to display embedded TeX math in HTML output.
1096− The *URL* should point to the jsMath load script (e.g.
1097− `jsMath/easy/load.js`); if provided, it will be linked to in
1098− the header of standalone HTML documents. If a *URL* is not provided,
1099− no link to the jsMath load script will be inserted; it is then
1100− up to the author to provide such a link in the HTML template.
1078+The default is to render TeX math as far as possible using Unicode characters.
1079+Formulas are put inside a `span` with `class="math"`, so that they may be styled
1080+differently from the surrounding text if needed. However, this gives acceptable
1081+results only for basic math, usually you will want to use `--mathjax` or another
1082+of the following options.
11011083
11021084`--mathjax`[`=`*URL*]
11031085
11041086: Use [MathJax] to display embedded TeX math in HTML output.
1087+ TeX math will be put between `\(...\)` (for inline math)
1088+ or `\[...\]` (for display math) and wrapped in `<span>` tags
1089+ with class `math`. Then the MathJax JavaScript will render it.
11051090 The *URL* should point to the `MathJax.js` load script.
1106− If a *URL* is not provided, a link to the MathJax CDN will
1091+ If a *URL* is not provided, a link to the Cloudflare CDN will
11071092 be inserted.
1093+
1094+`--mathml`
11081095
1109−`--gladtex`
1110−
1111−: Enclose TeX math in `<eq>` tags in HTML output. These can then
1112− be processed by [gladTeX] to produce links to images of the typeset
1113− formulas.
1114−
1115−`--mimetex`[`=`*URL*]
1116−
1117−: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
1118− specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
1096+: Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`,
1097+ `html4` and `html5`). This is the default in `odt` output. Note that
1098+ currently only Firefox and Safari (and select e-book readers) natively
1099+ support MathML.
11191100
11201101`--webtex`[`=`*URL*]
11211102
1122−: Render TeX formulas using an external script that converts TeX
1123− formulas to images. The formula will be concatenated with the URL
1124− provided. If *URL* is not specified, the CodeCogs will be used.
1103+: Convert TeX formulas to `<img>` tags that link to an external script
1104+ that converts formulas to images. The formula will be URL-encoded
1105+ and concatenated with the URL provided. For SVG images you can for
1106+ example use `--webtex https://latex.codecogs.com/svg.latex?`.
1107+ If no URL is specified, the CodeCogs URL generating PNGs
1108+ will be used (`https://latex.codecogs.com/png.latex?`).
11251109 Note: the `--webtex` option will affect Markdown output
11261110 as well as HTML, which is useful if you're targeting a
11271111 version of Markdown without native math support.
@@ -1131,7 +1115,6 @@ Math rendering in HTML
11311115: Use [KaTeX] to display embedded TeX math in HTML output.
11321116 The *URL* is the base URL for the KaTeX library. If a *URL* is
11331117 not provided, a link to the KaTeX CDN will be inserted.
1134− Note: [KaTeX] seems to work best with `html5` output.
11351118
11361119`--katex-stylesheet=`*URL*
11371120
@@ -1139,6 +1122,49 @@ Math rendering in HTML
11391122 not specified, a link to the KaTeX CDN will be inserted. Note that this
11401123 option does not imply `--katex`.
11411124
1125+`-m` [*URL*], `--latexmathml`[`=`*URL*]
1126+
1127+: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
1128+ TeX math will be displayed between `$` or `$$` characters and put in
1129+ `<span>` tags with class `LaTeX`. The LaTeXMathML JavaScript will then
1130+ change it to MathML. Note that currently only Firefox and Safari
1131+ (and select e-book readers) natively support MathML.
1132+ To insert a link to a local copy of the `LaTeXMathML.js` script,
1133+ provide a *URL*. If no *URL* is provided, the contents of the
1134+ script will be inserted directly into the HTML header, preserving
1135+ portability at the price of efficiency. If you plan to use math on
1136+ several pages, it is much better to link to a copy of the script,
1137+ so it can be cached.
1138+
1139+`--jsmath`[`=`*URL*]
1140+
1141+: Use [jsMath] (the predecessor of MathJax) to display embedded TeX
1142+ math in HTML output. TeX math will be put inside `<span>` tags
1143+ (for inline math) or `<div>` tags (for display math) with class
1144+ `math` and rendered by the jsMath script. The *URL* should point to
1145+ the script (e.g. `jsMath/easy/load.js`); if provided, it will be linked
1146+ to in the header of standalone HTML documents. If a *URL* is not provided,
1147+ no link to the jsMath load script will be inserted; it is then
1148+ up to the author to provide such a link in the HTML template.
1149+
1150+`--gladtex`
1151+
1152+: Enclose TeX math in `<eq>` tags in HTML output. The resulting HTML
1153+ can then be processed by [gladTeX] to produce images of the typeset
1154+ formulas and an HTML file with links to these images.
1155+ So, the procedure is:
1156+
1157+ pandoc -s --gladtex input.md -o myfile.htex
1158+ gladtex -d myfile-images myfile.htex
1159+ # produces myfile.html and images in myfile-images
1160+
1161+`--mimetex`[`=`*URL*]
1162+
1163+: Render TeX math using the [mimeTeX] CGI script, which generates an
1164+ image for each TeX formula. This should work in all browsers. If
1165+ *URL* is not specified, it is assumed that the script is at
1166+ `/cgi-bin/mimetex.cgi`.
1167+
11421168[MathML]: http://www.w3.org/Math/
11431169[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
11441170[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
@@ -2970,53 +2996,8 @@ FictionBook2
29702996
29712997HTML, Slidy, DZSlides, S5, EPUB
29722998 ~ The way math is rendered in HTML will depend on the
2973− command-line options selected:
2974−
2975− 1. The default is to render TeX math as far as possible using Unicode
2976− characters, as with RTF, DocBook, and OpenDocument output. Formulas
2977− are put inside a `span` with `class="math"`, so that they may be
2978− styled differently from the surrounding text if needed.
2979−
2980− 2. If the `--latexmathml` option is used, TeX math will be displayed
2981− between `$` or `$$` characters and put in `<span>` tags with class `LaTeX`.
2982− The [LaTeXMathML] script will be used to render it as formulas.
2983− (This trick does not work in all browsers, but it works in Firefox.
2984− In browsers that do not support LaTeXMathML, TeX math will appear
2985− verbatim between `$` characters.)
2986−
2987− 3. If the `--jsmath` option is used, TeX math will be put inside
2988− `<span>` tags (for inline math) or `<div>` tags (for display math)
2989− with class `math`. The [jsMath] script will be used to render
2990− it.
2991−
2992− 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
2993− be called to generate images for each TeX formula. This should
2994− work in all browsers. The `--mimetex` option takes an optional URL
2995− as argument. If no URL is specified, it will be assumed that the
2996− mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
2997−
2998− 5. If the `--gladtex` option is used, TeX formulas will be enclosed
2999− in `<eq>` tags in the HTML output. The resulting `htex` file may then
3000− be processed by [gladTeX], which will produce image files for each
3001− formula and an HTML file with links to these images. So, the
3002− procedure is:
3003−
3004− pandoc -s --gladtex myfile.txt -o myfile.htex
3005− gladtex -d myfile-images myfile.htex
3006− # produces myfile.html and images in myfile-images
3007−
3008− 6. If the `--webtex` option is used, TeX formulas will be converted
3009− to `<img>` tags that link to an external script that converts
3010− formulas to images. The formula will be URL-encoded and concatenated
3011− with the URL provided. For SVG images you can for example use
3012− `--webtex https://latex.codecogs.com/svg.latex?`.
3013− If no URL is specified, the CodeCogs URL generating PNGs
3014− will be used (`https://latex.codecogs.com/png.latex?`).
3015−
3016− 7. If the `--mathjax` option is used, TeX math will be displayed
3017− between `\(...\)` (for inline math) or `\[...\]` (for display
3018− math) and put in `<span>` tags with class `math`.
3019− The [MathJax] script will be used to render it as formulas.
2999+ command-line options selected. Therefore see [Math rendering in HTML]
3000+ above.
30203001
30213002[interpreted text role `:math:`]: http://docutils.sourceforge.net/docs/ref/rst/roles.html#math
30223003