Bug 140729

Summary: Cannot use digits in variable names
Product: LibreOffice Reporter: Kjell Edvard Medhaug <kjell>
Component: Formula EditorAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, dante19031999, fred.wang, joeldowdy12, khaled, raal, rajasekaran86, samsonov.box, xiscofauli
Priority: medium Keywords: bibisected, bisected, regression
Version: 4.2.0.4 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=55853
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 39750    
Attachments: LibreOffice rendering of sample input
Apache OpenOffice Math rendering of sample input

Description Kjell Edvard Medhaug 2021-03-01 09:06:23 UTC
Created attachment 170142 [details]
LibreOffice rendering of sample input

In Math, digits in variable names seem to have leading and trailing "implied separators". E.g. a variable named "r2d2" becomes "r 2 d 2" with italic letters and plain (no character emphasis/embellishment) digits.

This may be seen as a useability improvement in many cases. To me this "second guessing the users intent" is a regression, and typical of the reasons why I still prefer Apache OpenOffice in many cases. 

Sample input

c3po > r2d2 
newline
7of9 neq Agent355

Attached PDFs showing how sample input is rendered in LO and OO.
Comment 1 Kjell Edvard Medhaug 2021-03-01 09:07:46 UTC
Created attachment 170143 [details]
Apache OpenOffice Math rendering of sample input
Comment 2 Mike Kaganski 2021-03-01 09:31:42 UTC
Worked as expected in Version: 4.1.0.4
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

Problem reproducible in Version: 4.2.0.4
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

Although it could had been an intentional change, it is backward-incompatible and breaking existing data, so (tentatively) marking regression.
Comment 3 raal 2021-10-02 16:23:32 UTC
This seems to have begun at the below commit.
Adding Cc: to Frédéric Wang; Could you possibly take a look at this one?
Thanks
 352223248b6d0c3198e3bd741e7a47b27e395aa4 is the first bad commit
commit 352223248b6d0c3198e3bd741e7a47b27e395aa4
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Sep 5 18:36:17 2015 +0800

    source-hash-16a0d06f900027401716ddaba25e5c8998562b2d
    
    commit 16a0d06f900027401716ddaba25e5c8998562b2d
    Author:     Frédéric Wang <fred.wang@free.fr>
    AuthorDate: Mon Jun 24 23:14:42 2013 +0200
    Commit:     Fridrich Strba <fridrich@documentfoundation.org>
    CommitDate: Fri Jun 28 09:52:08 2013 +0000
    
        fdo#55853 - improve parsing of concatenated numbers and identifiers.
Comment 4 Xisco Faulí 2022-05-03 12:11:03 UTC Comment hidden (obsolete)
Comment 5 Rajasekaran Karunanithi 2023-02-26 21:19:39 UTC Comment hidden (obsolete)
Comment 6 ⁨خالد حسني⁩ 2023-09-07 21:49:11 UTC
This is indirect conflict with bug 55853, so to fix this we would need to revert the fix for bug 55853.

I’m inclined to do the revert, since I think the fix for bug 55853 was misguided and changes the StarMath syntax considerably. If people want “3x” to look like “3 x” they should use the later.