Add Math Summation

This commit is contained in:
Dolan
2019-08-20 20:40:40 +01:00
parent a1b9be453b
commit 4f8d435e16
19 changed files with 359 additions and 2 deletions

View File

@ -1,7 +1,7 @@
// Simple example to add text to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Math, MathDenominator, MathFraction, MathNumerator, MathRun, Packer, Paragraph, TextRun } from "../build";
import { Document, Math, MathDenominator, MathFraction, MathNumerator, MathRun, MathSum, Packer, Paragraph, TextRun } from "../build";
const doc = new Document();
@ -25,6 +25,17 @@ doc.addSection({
}),
],
}),
new Paragraph({
children: [
new Math({
children: [
new MathSum({
child: new MathRun("test"),
}),
],
}),
],
}),
],
});