{"record":{"id":"3a0a075ff6cf034c","repo":"microsoft/markitdown","slug":"not-support-lim-s","errorCode":null,"errorMessage":"Not support lim %s","messagePattern":"Not support lim (.+?)","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"packages/markitdown/src/markitdown/converter_utils/docx/math/omml.py","lineNumber":324,"sourceCode":"\n    def do_eqarr(self, elm):\n        \"\"\"\n        the Array object\n        \"\"\"\n        return ARR.format(\n            text=BRK.join(\n                [t for stag, t, e in self.process_children_list(elm, include=(\"e\",))]\n            )\n        )\n\n    def do_limlow(self, elm):\n        \"\"\"\n        the Lower-Limit object\n        \"\"\"\n        t_dict = self.process_children_dict(elm, include=(\"e\", \"lim\"))\n        latex_s = LIM_FUNC.get(t_dict[\"e\"])\n        if not latex_s:\n            raise NotImplementedError(\"Not support lim %s\" % t_dict[\"e\"])\n        else:\n            return latex_s.format(lim=t_dict.get(\"lim\"))\n\n    def do_limupp(self, elm):\n        \"\"\"\n        the Upper-Limit object\n        \"\"\"\n        t_dict = self.process_children_dict(elm, include=(\"e\", \"lim\"))\n        return LIM_UPP.format(lim=t_dict.get(\"lim\"), text=t_dict.get(\"e\"))\n\n    def do_lim(self, elm):\n        \"\"\"\n        the lower limit of the limLow object and the upper limit of the limUpp function\n        \"\"\"\n        return self.process_children(elm).replace(LIM_TO[0], LIM_TO[1])\n\n    def do_m(self, elm):\n        \"\"\"","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/microsoft/markitdown/blob/fd239d5d2be43d9b68329730206b9312c7d5a388/packages/markitdown/src/markitdown/converter_utils/docx/math/omml.py#L306-L342","documentation":"For OMML Lower-Limit objects (m:limLow), do_limlow() looks up the base expression's text in LIM_FUNC (known constructs like lim/min/max) and formats a \\lim-style LaTeX template. If the base text has no template, NotImplementedError is raised naming the unknown base. It reflects an unmapped lower-limit construct in the DOCX math converter.","triggerScenarios":"Converting a .docx whose equations use a lower-limit structure whose base element is an unusual expression (custom operator under/over scripts) instead of the recognized lim/min/max tokens.","commonSituations":"Documents built with advanced equation editors or exported from LaTeX->Word tools that emit non-standard m:limLow bases.","solutions":["Upgrade markitdown to pick up any newly added LIM_FUNC entries","Edit the source document: convert that equation to an image or plain text","Extend the mapping before conversion: add your token to converter_utils.docx.math.omml.LIM_FUNC","Report the equation upstream so coverage improves"],"exampleFix":"# before\nmd.convert(\"paper.docx\")  # NotImplementedError: Not support lim <base>\n\n# after\nfrom markitdown.converter_utils.docx.math import omml\nomml.LIM_FUNC[\"<base>\"] = r\"\\\\underset{\\\\lim_{{lim}}}{\\\\text{<base>}}\"\nmd.convert(\"paper.docx\")","handlingStrategy":"fallback","validationCode":"from markitdown.converter_utils.docx.math import omml\n\ndef limlow_bases_supported(path) -> bool:\n    import zipfile, re\n    xml = zipfile.ZipFile(path).read(\"word/document.xml\").decode(\"utf-8\", \"ignore\")\n    for base in re.findall(r\"<m:limLow>.*?<m:e><m:r><m:t>([^<]+)</m:t>\", xml, re.S):\n        if base not in omml.LIM_FUNC:\n            return False\n    return True","typeGuard":null,"tryCatchPattern":"try:\n    result = md.convert(docx_path)\nexcept NotImplementedError as e:\n    if \"Not support lim\" in str(e):\n        log.warning(\"unsupported lower-limit construct %s; converting without math\", e)\n        raise","preventionTips":["Provide a degraded-text fallback pipeline for documents with advanced equations","Pre-check equation constructs in CI fixtures so new document types fail loudly there, not in prod"],"tags":["omml","latex","docx","not-implemented"],"backgroundTag":null,"analyzedSha":"fd239d5d2be43d9b68329730206b9312c7d5a388","analyzedAt":"2026-08-14T15:47:51.745Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}