KaTeX parse error: {equation} can be used only in display mode. #3825
Unanswered
mustafasalahuldin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following expression:
\begin{equation} P + \frac{1}{2}\rho v^2 + \rho gh = \text{constant} \end{equation}
when I use aut-render to present it, with following configuration:
renderMathInElement(renderer, {
// customised options
// • auto-render specific keys, e.g.:
delimiters: [
{ left: '$$', right: '$$', display: true },
{ left: '$', right: '$', display: false },
{ left: "\\(", right: "\\)", display: false },
{ left: "\\begin{equation}", right: "\\end{equation}", display: true },
{ left: "\\begin{equation*}", right: "\\end{equation*}", display: true },
{ left: "\\begin{align}", right: "\\end{align}", display: true },
{ left: "\\begin{aligned}", right: "\\end{aligned}", display: true },
{ left: "\\begin{subequations}", right: "\\end{subequations}", display: true },
{ left: "\\begin{align*}", right: "\\end{align*}", display: true },
{ left: "\\begin{alignat}", right: "\\end{alignat}", display: true },
{ left: "\\begin{alignat*}", right: "\\end{alignat*}", display: true },
{ left: "\\begin{gather}", right: "\\end{gather}", display: true },
{ left: "\\begin{gather*}", right: "\\end{gather*}", display: true },
{ left: "\\begin{CD}", right: "\\end{CD}", display: true },
{ left: "\\[", right: "\\]", display: true },
{ left: "\\begin{multline}", right: "\\end{multline}", display: true },
{ left: "\\begin{multline*}", right: "\\end{multline*}", display: true },
{ left: "\\begin{flalign}", right: "\\end{flalign}", display: false },
{ left: "\\begin{flalign*}", right: "\\end{flalign*}", display: false },
{ left: "\\begin{split}", right: "\\end{split}", display: true },
//{ left: "\\ce", right: "", display: true }
],
// • rendering keys, e.g.:
throwOnError: true,
output: 'mathml',
errorCallback: (msg: string, err: Error) => { console.error(err.message); }
});
I receive the following error:
Can someone please advise?
Beta Was this translation helpful? Give feedback.
All reactions