Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: extend LaTeX character mapping and enhance Unicode processing in OMML
myhloli28bc01980dac
diff --git a/mineru/model/docx/tools/math/latex_dict.py b/mineru/model/docx/tools/math/latex_dict.pyindex 3042f8f5..99f361be 100644--- a/mineru/model/docx/tools/math/latex_dict.py+++ b/mineru/model/docx/tools/math/latex_dict.py@@ -165,6 +165,12 @@ T = {"\u00d7": "\\times ", # MULTIPLICATION SIGN (×)"\u00f7": "\\div ", # DIVISION SIGN (÷)"\u2212": "-", # MINUS SIGN (−)+ "\u2010": "-", # HYPHEN+ "\u2011": "-", # NON-BREAKING HYPHEN+ "\u2012": "-", # FIGURE DASH+ "\u2013": "-", # EN DASH+ "\u2014": "-", # EM DASH+ "\u2015": "-", # HORIZONTAL BAR# Degree / prime — avoid ^{} syntax since escape_latex will mangle bare ^ and braces"\u00b0": "\\circ ", # DEGREE SIGN (°) — caller's context (e.g. 90°) provides the ^"\u2032": "'", # PRIME (′)diff --git a/mineru/model/docx/tools/math/omml.py b/mineru/model/docx/tools/math/omml.pyindex 35646dbd..52c18636 100644--- a/mineru/model/docx/tools/math/omml.py+++ b/mineru/model/docx/tools/math/omml.py@@ -456,6 +456,9 @@ class oMath2Latex(Tag2Method):return bo + BLANK.join(res)def process_unicode(self, s):+ if s in CHARS:+ return BACKSLASH + s+# Check T dictionary first for known math-mode symbols.# The T dictionary holds explicit math-mode LaTeX mappings and takes precedence# over pylatexenc, which uses text-mode mappings by default and therefore produces