Created attachment 194786 [details] DOCX file with equations In Math, some combinations of letters are being recognized as reserved words and are not being imported/rendered correctly. For instance, open the attached DOCX document and scroll down to find some equations with "?" errors. These equations open fine in MS Word and OnlyOffice, but they fail in LibreOffice. After a lot of thinking, I noticed that all errors occur when "it" is used as subscript... all other subscripts work fine. This should not happen... and I'm pretty sure that way back in 6.4 it worked fine. System info Version: 24.2.3.2 (X86_64) / LibreOffice Community Build ID: 420(Build:2) CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Ubuntu package version: 4:24.2.3-0ubuntu0.24.04.2 Calc: threaded
Code pointer: Commenting out the following line in /core/starmath/source/parse5.cxx fixes the issue. { u"it"_ustr, TIT, '\0', TG::Product, 0 }, However... commenting out this line is not a proper fix for the issue. This line has a purpose (I don't know which or why it was added, but it certainly was added for a reason), but the underlying problem is how DOCX files are imported... somehow some or all of these strings should be imported as pure text, and not as reserved words.
Started with Dante's 7e2c35324c54646f53f0fa14b7bce07e1da73c0b for bug 109338 (line was added to starmath/source/parse.cxx, but most of its contents were moved to parse5.cxx later on). That's build [8df71520b47158dcd10006208ddcc92ed7949501] in linux-64-7.1 bibisect repo.