Created attachment 191402 [details] Screenshot of the problem Inserting a math object containing a formula with a vertical bar (absolute value symbol) results in a garbled output. To reproduce: 1. Install LibreOffice Writer on Ubuntu 22.04 using the `ppa:libreoffice/ppa`. 2. Launch the writer. 3. Click on menu Insert->OLE Object->Formula Object... 4. Type the formula containing the `|` character, e.g. `f(x)=|x|`. I am aware that there is an alternate way of laying out formulas using the LibreOffice Math Formula product, which is not affected by this bug. In my case, it is not a viable walk around, because we use LibreOffice format for the automated generation of technical documentation generated in Pandoc. Here is the relevant Pandoc ticket: https://github.com/jgm/pandoc/issues/9235
Correction: The bug affects the Math Formula as well, so I see no viable walk around for Ubuntu 22.04.
This is not a bug. In Math, symbol | is an alternative "boolean or" operator. Therefore, if you need to put this character as a literal, you either need to include it into quotation marks, like f(x)="|"x"|" or use other methods, mentioned in FAQ [1][2]. If you have a different problem of errors when *importing* MathML (which is apparently what your Pandoc issue is about), you should make your issue different, attaching the problematic MathML, and a screenshot of its intended render. [1] https://wiki.documentfoundation.org/Faq/Math/003 [2] https://wiki.documentfoundation.org/Faq/Math/106
Created attachment 191444 [details] The document where MathML does not render properly in the math object
We believe the escaping of the "|" character is not relevant here. Please consider why this valid MathML does not render properly in Writer. ``` <math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mo stretchy="true" form="prefix">|</mo><mi>x</mi><mo stretchy="true" form="postfix">|</mo> </mrow> </math> ``` I have uploaded an example document that demonstrates the issue.
Created attachment 191445 [details] The bug.odt is displayed in MS Word correctly
Created attachment 191497 [details] MathML file showing the problem on import
Opening attachment 191497 [details] in Math reproduces the problem. The ODF file from attachment 191444 [details] is not relevant, because it's the artifact of the incorrect import. But indeed, there is an import problem here.
Note that the MML file may also be viewed in Firefox browser, to check the intended rendering.
Also in Version: 7.1.8.0.0+ (x64) / LibreOffice Community Build ID: a94b58277c7aeaa83ce14347cd0b8f7137969d03 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL fine in Version: 7.0.7.0.0+ (x64) Build ID: 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.1. Adding Cc: to Noel Grandin ; Could you possibly take a look at this one? Thanks ecf776e1a95b73bec9f9380fe87d274c7717dc8b is the first bad commit commit ecf776e1a95b73bec9f9380fe87d274c7717dc8b Author: Jenkins Build User <tdf@pollux.tdf> Date: Tue Sep 22 20:21:44 2020 +0200 source 8c716704df4aaa83fcd198cc8d92cd3e1e542de9 98795: tdf#38885 Remove createTextFromNode | https://gerrit.libreoffice.org/c/core/+/98795