mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-11 22:28:31 +00:00
fix(docx): parse integrals as n-ary objects without chr element (#2712)
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
This commit is contained in:
committed by
GitHub
parent
f80c903c24
commit
c97715f5fd
@@ -65,6 +65,11 @@ CHR_BO = {
|
||||
"\u2210": "\\coprod",
|
||||
"\u2211": "\\sum",
|
||||
"\u222b": "\\int",
|
||||
"\u222c": "\\iint",
|
||||
"\u222d": "\\iiint",
|
||||
"\u222e": "\\oint",
|
||||
"\u222f": "\\oiint",
|
||||
"\u2230": "\\oiiint",
|
||||
"\u22c0": "\\bigwedge",
|
||||
"\u22c1": "\\bigvee",
|
||||
"\u22c2": "\\bigcap",
|
||||
|
||||
@@ -381,7 +381,8 @@ class oMath2Latex(Tag2Method):
|
||||
bo = ""
|
||||
for stag, t, e in self.process_children_list(elm):
|
||||
if stag == "naryPr":
|
||||
bo = get_val(t.chr, store=CHR_BO)
|
||||
# if <m:naryPr> contains no <m:chr>, the n-ary represents an integral
|
||||
bo = get_val(t.chr, default="\\int", store=CHR_BO)
|
||||
else:
|
||||
res.append(t)
|
||||
return bo + BLANK.join(res)
|
||||
|
||||
Reference in New Issue
Block a user