Bug 146201 - Improper formatting of "frac" in Formula object ignores brackets
Summary: Improper formatting of "frac" in Formula object ignores brackets
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.1.8.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-13 05:57 UTC by Jay
Modified: 2023-01-25 20:52 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jay 2021-12-13 05:57:09 UTC
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".
Comment 1 LeroyG 2021-12-16 22:41:57 UTC
"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.
Comment 2 Francisco 2022-01-12 23:32:08 UTC
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
Comment 3 whatthefrac 2023-01-24 21:05:09 UTC
How is this not a valid command if there's a button for it?
Comment 4 nutka 2023-01-25 20:52:18 UTC
LibreOffice 7.2 Math Guide mentions the frac command
in Appendix A on page 58.