The bug can be reproduced by using this code in a formula object of LibreWriter: <code> frac {N} {D} +X </code> The expected behavior can be demonstrated using the over function: <code> {N} over {D} +X </code> Instead, the above bug places the X inside the denominator even though the "+X" is outside of the second set of brackets {}. Use of the function "frac" should have the same behavior as when using the function "over".
"frac" is not documented in Unary/Binary Operators help page (https://help.libreoffice.org/7.2/en-US/text/smath/01/03090100.html) Except with "=", replacing "+" with other operators (-, /, *, times, div, oplus, etc.) gives the same result.
As Leroy explains, the "frac" is not a valid command in LibO Math. If you still preffer TeX syntax, you may try TexMath extension: https://extensions.libreoffice.org/en/extensions/show/texmaths-1
How is this not a valid command if there's a button for it?
LibreOffice 7.2 Math Guide mentions the frac command in Appendix A on page 58.