Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

fix: 修复pptx普通文本框缺失富文本的问题,xlsx公式锚点问题

Sidney233710bdb3ef90a
diff --git a/demo/pptx/powerpoint_sample.pptx b/demo/pptx/powerpoint_sample.pptx
index da07693a..a18f3ffe 100644
Binary files a/demo/pptx/powerpoint_sample.pptx and b/demo/pptx/powerpoint_sample.pptx differ
diff --git a/mineru/model/pptx/pptx_converter.py b/mineru/model/pptx/pptx_converter.py
index 836ec9a0..ce31b38d 100644
--- a/mineru/model/pptx/pptx_converter.py
+++ b/mineru/model/pptx/pptx_converter.py
@@ -471,7 +471,7 @@ class PptxConverter:
# 段落不是列表项,关闭当前 shape 的列表上下文
self.list_block_stack.clear()
- p_text = self._build_paragraph_plain_text(paragraph)
+ p_text = self._build_paragraph_rich_text(paragraph, shape)
if len(p_text.strip()) == 0:
continue
diff --git a/mineru/model/xlsx/xlsx_converter.py b/mineru/model/xlsx/xlsx_converter.py
index 8fe6726f..be20c7a6 100644
--- a/mineru/model/xlsx/xlsx_converter.py
+++ b/mineru/model/xlsx/xlsx_converter.py
@@ -276,6 +276,7 @@ class XlsxConverter:
"""
# 1. 创建坐标到单元格的映射,方便快速查找
cell_map = {(c.row, c.col): c for c in excel_table.data}
+ table_anchor = excel_table.anchor
# 2. 用于记录已被合并单元格占据的位置,避免重复生成 td
covered_cells = set()
@@ -325,7 +326,7 @@ class XlsxConverter:
else:
text_content = media_content
# 添加公式
- if (r, c) in self.math_map:
+ if (table_anchor[0] + r, table_anchor[1] + c) in self.math_map:
for formula in self.math_map[(r, c)]:
text_content += self.equation_bookends.format(EQ=formula)