Add math limit component (#2510)

This commit is contained in:
yaokailun
2024-01-03 08:13:13 +08:00
committed by GitHub
parent 13cf3eee5a
commit c4ed19e589
9 changed files with 210 additions and 0 deletions

View File

@ -21,6 +21,8 @@ import {
Packer,
Paragraph,
TextRun,
MathLimitLower,
MathLimitUpper,
} from "docx";
const doc = new Document({
@ -316,6 +318,23 @@ const doc = new Document({
}),
],
}),
new Paragraph({
children: [
new Math({
children: [
new MathLimitUpper({
children: [new MathRun("x")],
limit: [new MathRun("-")],
}),
new MathRun("="),
new MathLimitLower({
children: [new MathRun("lim")],
limit: [new MathRun("x→0")],
}),
],
}),
],
}),
],
},
],