mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-12 06:28:40 +00:00
fix: Support MathML \oiint and \oiiint (#2461)
* fix: Support MathML \oiint and \oiiint * Update direct input section of docs
This commit is contained in:
@@ -339,7 +339,7 @@ Available functions include:
|
|||||||
| $\iiint$ `\iiint`| $\smallint$ `\smallint` | $\biguplus$ `\biguplus` | $\bigcup$ `\bigcup`
|
| $\iiint$ `\iiint`| $\smallint$ `\smallint` | $\biguplus$ `\biguplus` | $\bigcup$ `\bigcup`
|
||||||
| $\oint$ `\oint` | $\oiint$ `\oiint` | $\oiiint$ `\oiiint` | $\bigsqcup$ `\bigsqcup`
|
| $\oint$ `\oint` | $\oiint$ `\oiint` | $\oiiint$ `\oiiint` | $\bigsqcup$ `\bigsqcup`
|
||||||
|
|
||||||
Direct Input: $∫ ∬ ∭ ∮ ∏ ∐ ∑ ⋀ ⋁ ⋂ ⋃ ⨀ ⨁ ⨂ ⨄ ⨆$
|
Direct Input: $∫ ∬ ∭ ∮ ∏ ∐ ∑ ⋀ ⋁ ⋂ ⋃ ⨀ ⨁ ⨂ ⨄ ⨆$ ∯ ∰
|
||||||
|
|
||||||
### Binary Operators
|
### Binary Operators
|
||||||
|
|
||||||
|
@@ -663,6 +663,8 @@ defineSymbol(math, main, op, "\u2a02", "\\bigotimes");
|
|||||||
defineSymbol(math, main, op, "\u2a01", "\\bigoplus");
|
defineSymbol(math, main, op, "\u2a01", "\\bigoplus");
|
||||||
defineSymbol(math, main, op, "\u2a00", "\\bigodot");
|
defineSymbol(math, main, op, "\u2a00", "\\bigodot");
|
||||||
defineSymbol(math, main, op, "\u222e", "\\oint");
|
defineSymbol(math, main, op, "\u222e", "\\oint");
|
||||||
|
defineSymbol(math, main, op, "\u222f", "\\oiint");
|
||||||
|
defineSymbol(math, main, op, "\u2230", "\\oiiint");
|
||||||
defineSymbol(math, main, op, "\u2a06", "\\bigsqcup");
|
defineSymbol(math, main, op, "\u2a06", "\\bigsqcup");
|
||||||
defineSymbol(math, main, op, "\u222b", "\\smallint");
|
defineSymbol(math, main, op, "\u222b", "\\smallint");
|
||||||
defineSymbol(text, main, inner, "\u2026", "\\textellipsis");
|
defineSymbol(text, main, inner, "\u2026", "\\textellipsis");
|
||||||
|
@@ -688,6 +688,61 @@ exports[`A MathML builder should use <mpadded> for raisebox 1`] = `
|
|||||||
</math>
|
</math>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`A MathML builder should use <msupsub> for integrals 1`] = `
|
||||||
|
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||||
|
<semantics>
|
||||||
|
<mrow>
|
||||||
|
<mstyle scriptlevel="0"
|
||||||
|
displaystyle="true"
|
||||||
|
>
|
||||||
|
<msubsup>
|
||||||
|
<mo>
|
||||||
|
∫
|
||||||
|
</mo>
|
||||||
|
<mi>
|
||||||
|
a
|
||||||
|
</mi>
|
||||||
|
<mi>
|
||||||
|
b
|
||||||
|
</mi>
|
||||||
|
</msubsup>
|
||||||
|
<mo>
|
||||||
|
+
|
||||||
|
</mo>
|
||||||
|
<msubsup>
|
||||||
|
<mo>
|
||||||
|
∯
|
||||||
|
</mo>
|
||||||
|
<mi>
|
||||||
|
a
|
||||||
|
</mi>
|
||||||
|
<mi>
|
||||||
|
b
|
||||||
|
</mi>
|
||||||
|
</msubsup>
|
||||||
|
<mo>
|
||||||
|
+
|
||||||
|
</mo>
|
||||||
|
<msubsup>
|
||||||
|
<mo>
|
||||||
|
∰
|
||||||
|
</mo>
|
||||||
|
<mi>
|
||||||
|
a
|
||||||
|
</mi>
|
||||||
|
<mi>
|
||||||
|
b
|
||||||
|
</mi>
|
||||||
|
</msubsup>
|
||||||
|
</mstyle>
|
||||||
|
</mrow>
|
||||||
|
<annotation encoding="application/x-tex">
|
||||||
|
\\displaystyle\\int_a^b + \\oiint_a^b + \\oiiint_a^b
|
||||||
|
</annotation>
|
||||||
|
</semantics>
|
||||||
|
</math>
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`A MathML builder should use <msupsub> for regular operators 1`] = `
|
exports[`A MathML builder should use <msupsub> for regular operators 1`] = `
|
||||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||||
<semantics>
|
<semantics>
|
||||||
|
@@ -44,6 +44,11 @@ describe("A MathML builder", function() {
|
|||||||
expect(getMathML("\\displaystyle\\sum_a^b")).toMatchSnapshot();
|
expect(getMathML("\\displaystyle\\sum_a^b")).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should use <msupsub> for integrals', () => {
|
||||||
|
expect(getMathML("\\displaystyle\\int_a^b + " +
|
||||||
|
"\\oiint_a^b + \\oiiint_a^b")).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
|
||||||
it('should use <msupsub> for regular operators', () => {
|
it('should use <msupsub> for regular operators', () => {
|
||||||
expect(getMathML("\\textstyle\\sum_a^b")).toMatchSnapshot();
|
expect(getMathML("\\textstyle\\sum_a^b")).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user