Bug 143996 - In LO Writer the “Check true minus sign” function does NOT seem to work.
Summary: In LO Writer the “Check true minus sign” function does NOT seem to work.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.2 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Options-Dialog-Language
  Show dependency treegraph
 
Reported: 2021-08-21 22:01 UTC by Eek! A Bug. Kill it!
Modified: 2023-04-13 22:45 UTC (History)
7 users (show)

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 Eek! A Bug. Kill it! 2021-08-21 22:01:50 UTC
Description:
In LO Writer the “Check true multiplication sign” function does NOT seem to work, as selected in:

Tools > Options… > Language Settings > English Sentence Checking > Punctuation.

The only way I have found to get a true minus sign to appear in LO Writer is to manually go to: 

Insert > Insert Special Character… (or use the icon in the Standard Tool Bar).

I have tested this with my two most-used fonts: Cambria Math and Arial. A true minus sign from the Insert Special Characters menu (located in Mathematical Operators > Hex: U+ 2212 for the Cambria Math font) is the same size but longer than a hyphen and is elevated somewhat from it to distinguish it from the en dash. 

It does not seem to matter if you use spaces before and/or after the typed hyphen or enclose the negative number within a pair of parentheses as is frequently done in hand written formulas. 

I had examples included in this description, but in whatever font this is, the difference between a hyphen, en dash, and a true minus sign were indistinguishable from one another, so I deleted the examples. Note: I have both Force en dash and Forced em dash deselected in the Punctuation section, although checking them or unchecking them seems to make no difference.

Steps to Reproduce:
Try typing a minus sign using the hyphen key (with or without leading and/or trailing spaces) with the Multiplication checkbox checked in the following location:

Tools > Options… > Language Settings > English Sentence Checking > Punctuation


Actual Results:
No squiggly blue line appears under the hyphen to prompt you if you want to force a minus sign or ignore the grammar checker.

Expected Results:
A prompt to transform the hyphen to a true minus sign if so desired.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.2.0.2 (x64) / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Dieter 2021-09-05 07:02:33 UTC
Thank you for reporting the bug.I assume, we are talking about "Minus Sign" option in the dialog and not multiplication sign, correct.

I confirm your description, but I'm not sure about the expected behaviour. I would expect, that there is a keyboard combination with a true minus symbol as result, but I won't expect that whenever I type the hyphen key, I get a minus symbol - because perhaps I still want to use hyphens in a document.
Comment 2 Eek! A Bug. Kill it! 2021-09-05 20:58:48 UTC
(In reply to Dieter from comment #1)
> Thank you for reporting the bug.I assume, we are talking about "Minus Sign"
> option in the dialog and not multiplication sign, correct.
> 
> I confirm your description, but I'm not sure about the expected behaviour. I
> would expect, that there is a keyboard combination with a true minus symbol
> as result, but I won't expect that whenever I type the hyphen key, I get a
> minus symbol - because perhaps I still want to use hyphens in a document.


Oops! Originally, I thought there was an issue with both the multiplication and minus sign functions, so I wrote up a bug report combining both into one report. I then discovered that there was no problem with the multiplication function after all, as it was simply that I had not Toggle Automatic Spell Checking to on. So, I did a quick, albeit flawed, edit before filing the report. Unfortunately, during all this, there was someone in the library who suffered a seizure and the library was swarming with the Emergency Medical Team, Firefighters, and Police just a few meters away from me trying to save this man's life. Not an excuse; but a reason (lack of concentration) for the bad edit.

There does not seem to be a way to go back and edit the description of the bug report title, or delete the report entirely and resubmit it, so I guess it will unfortunately have to stay the way it is--but, you are correct. The issue is with the minus sign function.
Comment 3 Dieter 2021-09-19 06:00:55 UTC
Tested again and it works, if minus sign is part of a mathematical equation. Tested with "5 - 3" in Arial, Calibri an Cambria Math.

Does this solve your problem? If it doesn't work for you, please retest in SafeMode (Help => Restart in SafeMode)
=> NEEDINFO
Comment 4 V Stuart Foote 2021-09-19 12:30:27 UTC
Can not confirm.

There are two features colliding. The AutoCorrect option 'Replace dashes' checkbox will replace the U+002D HYPHEN-MINUS with a U+2013 EN DASH before the 'English sentence checking' 'Minus sign' has parsed the run for the pattern match.

Disable the autocorrect 'Replace dashes' and the blue squiggle of the sentence checking will appear.

Function is a bit sloppy--the match pattern differs between the 'Multiplication sign' and the 'Minus sign', e.g.  "5x3" will match "5-3" will not, the minus sign check requires "5 - 3" to match.

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4cd3ce9848aa039b8d443a1257d1298231680b01
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 5 Eek! A Bug. Kill it! 2021-09-26 02:01:47 UTC
(In reply to Dieter from comment #3)
> Tested again and it works, if minus sign is part of a mathematical equation.
> Tested with "5 - 3" in Arial, Calibri an Cambria Math.
> 
> Does this solve your problem? If it doesn't work for you, please retest in
> SafeMode (Help => Restart in SafeMode)
> => NEEDINFO



No, this does not solve the problem. I tried that before I wrote the bug report, both with pure mathematical numbers and algebraic letters...as well as with and without spaces surrounding the minus operator).
Comment 6 Eek! A Bug. Kill it! 2021-09-26 02:06:09 UTC
(In reply to V Stuart Foote from comment #4)
> Can not confirm.
> 
> There are two features colliding. The AutoCorrect option 'Replace dashes'
> checkbox will replace the U+002D HYPHEN-MINUS with a U+2013 EN DASH before
> the 'English sentence checking' 'Minus sign' has parsed the run for the
> pattern match.
> 
> Disable the autocorrect 'Replace dashes' and the blue squiggle of the
> sentence checking will appear.
> 
> Function is a bit sloppy--the match pattern differs between the
> 'Multiplication sign' and the 'Minus sign', e.g.  "5x3" will match "5-3"
> will not, the minus sign check requires "5 - 3" to match.
> 
> Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
> Build ID: 4cd3ce9848aa039b8d443a1257d1298231680b01
> CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL:
> win
> Locale: en-US (en_US); UI: en-US
> Calc: threaded



I do not understand you writing that you “can not confirm” the bug, but then proceed to explain how there are two features colliding causing the bug. You say that the minus sign check requires “5 – 3” to match, but that does not work on my machine as I get the option to select between an en dash and an em dash, but NOT a true minus sign option. The em dash and true minus sign are very close, but NOT the same (the true minus sign looks to be the same length but has a little more spacing before and after the minus sign and appears to be slightly higher from the baseline than the em dash, which can be seen by dramatically increasing the font size and adding the vertical bars on both sides making it an absolute value).
Comment 7 QA Administrators 2021-09-26 03:58:50 UTC Comment hidden (obsolete)
Comment 8 V Stuart Foote 2021-09-26 13:44:00 UTC
Can not confirm because there is no auto-replacement for either the multiplication sign nor the minus sign provided by Language Settings -> English Sentence Checking.

Those are pattern matched syntax *checks* receiving only the blue squiggles of "grammar-check", no auto-replacement is applied by the feature.

The minus sign "check" will only occur if the AutoCorrect Options -> Options panel 'Replace dashes' is unchecked. Likewise the 'Ellipsis' "check" will only occur if the Autocorrect Option -> Replace table entry '.*...' is deleted.

By design the AutoCorrect actions take priority over the grammar checks.

You can add your preferred AutoCorrect actions, or manually enter your preferred glyph with the Special Character dialog.

But still some potential to improve the match syntax around dash/minus and x/multiplication sign use.

@László, any comment? Should the "Change" strings in the tooltips [1] be adjusted to read "Checks for" to avoid confussion?

Otherwise would resolve =>NAB

=-ref-=
[1] https://opengrok.libreoffice.org/xref/dictionaries/en/dialog/en_en_US.properties
Comment 9 QA Administrators 2021-09-27 03:25:35 UTC Comment hidden (obsolete)
Comment 10 Stéphane Guillou (stragu) 2023-04-13 22:45:30 UTC
I agree with OP, this setting does not work properly.

I tested with:

Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

With steps:
1. Deactivate autocorrect entirely (so it doesn't automatically replaces characters)
2. Turn the "minus sign" English Sentence Checking setting on
3. Write strings like "5 - 2" and "5-2", using the default hyphen

Result: no blue squiggle under "5-2", blue squiggle under "5 - 2" but right-clicking on it reveals it's not about minus signs, it's about replacing it by en-dash or em-dash.

Dieter and Stuart, wasn't what you were seeing that second part? (I'm not sure how to selectively turn that dash check off to check that it is "hiding" the minus check.)

I see no evidence of the minus sign check working. It should at least work for unspaced maths expressions, like for the multiplication sign.