From 7fe6778d2d9b7b5a61fa45cf404b2a8dd36be3ac Mon Sep 17 00:00:00 2001 From: Ron Kok Date: Mon, 28 Dec 2020 19:56:59 -0800 Subject: [PATCH] feat: Add {CD} to auto-render. (#2710) * Add {CD} to auto-render. * Semantic PR Co-authored-by: Kevin Barabash --- contrib/auto-render/auto-render.js | 1 + docs/autorender.md | 1 + docs/supported.md | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/auto-render/auto-render.js b/contrib/auto-render/auto-render.js index cf816755..1b8d291d 100644 --- a/contrib/auto-render/auto-render.js +++ b/contrib/auto-render/auto-render.js @@ -103,6 +103,7 @@ const renderMathInElement = function(elem, options) { {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: "\\begin{CD}", right: "\\end{CD}", display: true}, {left: "\\[", right: "\\]", display: true}, ]; diff --git a/docs/autorender.md b/docs/autorender.md index 4df60b89..a755710f 100644 --- a/docs/autorender.md +++ b/docs/autorender.md @@ -88,6 +88,7 @@ in addition to two auto-render-specific keys: {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: "\\begin{CD}", right: "\\end{CD}", display: true}, {left: "\\[", right: "\\]", display: true} ] ``` diff --git a/docs/supported.md b/docs/supported.md index 991a6002..50d86ac5 100644 --- a/docs/supported.md +++ b/docs/supported.md @@ -98,7 +98,7 @@ The auto-render extension will render the following environments even if they ar |:---------------------|:---------------------|:---------------------|:-------- |$$\begin{equation}\begin{split}a &=b+c\\&=e+f\end{split}\end{equation}$$ |`\begin{equation}`
`\begin{split}`   `a &=b+c\\`
      `&=e+f`
`\end{split}`
`\end{equation}` |$$\begin{align} a&=b+c \\ d+e&=f \end{align}$$ |`\begin{align}`
   `a&=b+c \\`
   `d+e&=f`
`\end{align}` | |$$\begin{gather} a=b \\ e=b+c \end{gather}$$ |`\begin{gather}`
   `a=b \\ `
   `e=b+c`
`\end{gather}`|$$\begin{alignat}{2}10&x+&3&y=2\\3&x+&13&y=4\end{alignat}$$ | `\begin{alignat}{2}`
   `10&x+&3&y=2\\`
   `3&x+&13&y=4`
`\end{alignat}` -|$$\begin{CD}A @>a>> B \\@VbVV @AAcA\\C @= D\end{CD}$$ |`\begin{CD}`
   `A @>a>> B \\`
`@VbVV @AAcA \\`
   `C @= D`
`\\end{CD}` +|$$\begin{CD}A @>a>> B \\@VbVV @AAcA\\C @= D\end{CD}$$ | `\begin{CD}`
   `A @>a>> B \\`
`@VbVV @AAcA \\`
   `C @= D`
`\\end{CD}` #### Other KaTeX Environments