diff --git a/contrib/auto-render/auto-render.js b/contrib/auto-render/auto-render.js index d1c830d1..cf816755 100644 --- a/contrib/auto-render/auto-render.js +++ b/contrib/auto-render/auto-render.js @@ -96,7 +96,14 @@ const renderMathInElement = function(elem, options) { {left: "\\(", right: "\\)", display: false}, // LaTeX uses $…$, but it ruins the display of normal `$` in text: // {left: "$", right: "$", display: false}, - // $ must come after $$ + // $ must come after $$ + + // Render AMS environments even if outside $$…$$ delimiters. + {left: "\\begin{equation}", right: "\\end{equation}", display: true}, + {left: "\\begin{align}", right: "\\end{align}", display: true}, + {left: "\\begin{alignat}", right: "\\end{alignat}", display: true}, + {left: "\\begin{gather}", right: "\\end{gather}", display: true}, + {left: "\\[", right: "\\]", display: true}, ]; optionsCopy.ignoredTags = optionsCopy.ignoredTags || [ diff --git a/contrib/auto-render/index.html b/contrib/auto-render/index.html index 71b49613..d0849b5c 100644 --- a/contrib/auto-render/index.html +++ b/contrib/auto-render/index.html @@ -25,13 +25,15 @@
Stuff in a $pre tag$+
An AMS environment without $$…$$
delimiters.
\begin{equation} \begin{split} a &=b+c\\ &=e+f \end{split} \end{equation}