Support \oiint and \oiiint (#1430)

* Support \oiint and \oiiint

* Fix sub. Add tests

* Add phony screenshots

* Add real screenshots
This commit is contained in:
Ron Kok
2018-06-19 06:41:00 -07:00
committed by Erik Demaine
parent 3f1b13e352
commit 3e932b1ecb
9 changed files with 104 additions and 12 deletions

View File

@@ -1350,6 +1350,23 @@ describe("A TeX-compliant parser", function() {
});
});
describe("An op symbol builder", function() {
it("should not fail", function() {
expect("\\int_i^n").toBuild();
expect("\\iint_i^n").toBuild();
expect("\\iiint_i^n").toBuild();
expect("\\int\nolimits_i^n").toBuild();
expect("\\iint\nolimits_i^n").toBuild();
expect("\\iiint\nolimits_i^n").toBuild();
expect("\\oint_i^n").toBuild();
expect("\\oiint_i^n").toBuild();
expect("\\oiiint_i^n").toBuild();
expect("\\oint\nolimits_i^n").toBuild();
expect("\\oiint\nolimits_i^n").toBuild();
expect("\\oiiint\nolimits_i^n").toBuild();
});
});
describe("A style change parser", function() {
it("should not fail", function() {
expect("\\displaystyle x").toParse();

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -132,6 +132,12 @@ GroupMacros:
\endExp: \egroup
tex: \startExp a+b\endExp
HorizontalBraces: \overbrace{\displaystyle{\oint_S{\vec E\cdot\hat n\,\mathrm d a}}}^\text{emf} = \underbrace{\frac{q_{\text{enc}}}{\varepsilon_0}}_{\text{charge}}
Integrands: |
\begin{array}{l}
\displaystyle \int + \oint + \iint + \oiint_i^n \\[0.6em]
\displaystyle \iiint + \oiiint + \textstyle \int + \oint_i^n \\[0.6em]
\iint + \oiint + \iiint + \oiiint
\end{array}
KaTeX:
tex: \KaTeX
nolatex: \KaTeX not supported by LaTeX