Skip to content

Python tool for converting files and office documents to Markdown.

Fix invalid LaTeX macros for mu, nu, tau, and down-arrow in equation conversion (#2228)

KRISHNAdb144c44298c
diff --git a/packages/markitdown/src/markitdown/converter_utils/docx/math/latex_dict.py b/packages/markitdown/src/markitdown/converter_utils/docx/math/latex_dict.py
index 9b473824..5a98221e 100644
--- a/packages/markitdown/src/markitdown/converter_utils/docx/math/latex_dict.py
+++ b/packages/markitdown/src/markitdown/converter_utils/docx/math/latex_dict.py
@@ -79,12 +79,11 @@ CHR_BO = {
}
T = {
- "\u2192": "\\rightarrow ",
# Greek letters
"\U0001d6fc": "\\alpha ",
"\U0001d6fd": "\\beta ",
"\U0001d6fe": "\\gamma ",
- "\U0001d6ff": "\\theta ",
+ "\U0001d6ff": "\\delta ",
"\U0001d700": "\\epsilon ",
"\U0001d701": "\\zeta ",
"\U0001d702": "\\eta ",
@@ -92,15 +91,15 @@ T = {
"\U0001d704": "\\iota ",
"\U0001d705": "\\kappa ",
"\U0001d706": "\\lambda ",
- "\U0001d707": "\\m ",
- "\U0001d708": "\\n ",
+ "\U0001d707": "\\mu ",
+ "\U0001d708": "\\nu ",
"\U0001d709": "\\xi ",
"\U0001d70a": "\\omicron ",
"\U0001d70b": "\\pi ",
"\U0001d70c": "\\rho ",
"\U0001d70d": "\\varsigma ",
"\U0001d70e": "\\sigma ",
- "\U0001d70f": "\\ta ",
+ "\U0001d70f": "\\tau ",
"\U0001d710": "\\upsilon ",
"\U0001d711": "\\phi ",
"\U0001d712": "\\chi ",
@@ -117,7 +116,7 @@ T = {
"\u2190": "\\leftarrow ",
"\u2191": "\\uparrow ",
"\u2192": "\\rightarrow ",
- "\u2193": "\\downright ",
+ "\u2193": "\\downarrow ",
"\u2194": "\\leftrightarrow ",
"\u2195": "\\updownarrow ",
"\u2196": "\\nwarrow ",