Download it now!
Bug 121065 - [NEWHELP] Update icons/images of Math Help page on Unary/Binary operators
Summary: [NEWHELP] Update icons/images of Math Help page on Unary/Binary operators
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks: HelpGaps-NewFeatures New-Help
  Show dependency treegraph
 
Reported: 2018-10-30 18:20 UTC by Olivier Hallot
Modified: 2019-03-01 18:05 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
first 12 SVGs for Unary/Binary operators help.libreoffice.org/6.2/en-US/text/smath/01/03090100.html (7.30 KB, application/x-zip-compressed)
2018-12-28 17:25 UTC, Mark
Details
clip of operators entered in Formula editor--showing Liberation Serif and OpenSymbol default fonts and spacings (9.74 KB, image/png)
2018-12-28 18:18 UTC, V Stuart Foote
Details
proposed Unary Binary operators SVGs version 2 (7.48 KB, application/x-zip-compressed)
2018-12-29 01:25 UTC, Mark
Details
Screen Shot a + b (203.87 KB, image/png)
2018-12-29 20:48 UTC, Mark
Details
comparison of 3 options for fonts (226.33 KB, image/png)
2018-12-29 21:42 UTC, Olivier Hallot
Details
proposed Unary Binary operators SVGs version 3 Complete (9.84 KB, application/x-zip-compressed)
2019-01-01 18:40 UTC, Mark
Details
proposed Attributes SVGs version 1 Complete (11.55 KB, application/x-zip-compressed)
2019-01-01 18:42 UTC, Mark
Details
proposed Brackets SVGs version 1 Complete (12.73 KB, application/x-zip-compressed)
2019-01-01 18:43 UTC, Mark
Details
proposed Format SVGs version 1 Complete (8.62 KB, application/x-zip-compressed)
2019-01-02 03:31 UTC, Mark
Details
proposed Circled operators SVGs version 1 for Unary Binary (7.51 KB, application/x-zip-compressed)
2019-01-02 16:02 UTC, Mark
Details
floor and ceiling brackets 'Brackets' (1.07 KB, application/x-zip-compressed)
2019-01-02 16:56 UTC, Mark
Details
circle operators, wide slashes, sub and sup examples needed in SVG (37.06 KB, image/png)
2019-01-02 17:21 UTC, V Stuart Foote
Details
ceiling floor examples needed in SVG (28.92 KB, image/png)
2019-01-02 17:22 UTC, V Stuart Foote
Details
ceiling floor examples needed in SVG (30.07 KB, image/png)
2019-01-02 17:27 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2018-10-30 18:20:05 UTC
The Help page https://help.libreoffice.org/6.2/en-US/text/smath/01/03090100.html has an icon issue: Icons are not shown because they are originally in PNG and we want them now in SVG. Besides, they are outdated and need rework.

a) Icons are visible on previous Help as shown in https://help.libreoffice.org/6.1/en-US/text/smath/01/03090100.html .

b) the Help page is helpcontent2/source/text/smath/01/03090100.xhp

c) PNG images are located in helpcontent2/source/media/helpimg/starmath/ 

d) The icons representing the Unary/Binary operators are outdated. The icon should be a an SVG representation of the icons in the Elements pane of the LibreOffice Math UI.

e) The SVG created should not rely on the character font. When converting a character to SVG, transform it in curves. Test the resulting SVG in a browser for sanity check.

f) add the SVG icon to the source/media/starmath/ folder and add it to git

g) Fix the <image> href in the 03090100.xhp file, make icon size 1cm x 1cm

h) Update the <alt> tag replacing "Icon" by "[icon description] icon" 

i) (optional) locate in all starmath help pages any reference to the icon and change it to the SVG replacement you just did. Test for sanity check.

repeat for all icons n the Help page.
Comment 1 V Stuart Foote 2018-10-31 03:49:42 UTC
@Olivier, in UI we draw these from OpenSymbol. So should the font source before conversion to SVG curves also be OpenSymbol to match?

And it is more than just the Unary/Binary operators, looks like there are 184 PNG [1] that would need to be rendered as SVG for each of the smath NewHelp articles [2].

=-ref-=
[1] PNG needing SVG icon https://opengrok.libreoffice.org/search?project=help&q=&defs=&refs=&path=helpimg%2Fstarmath&hist=&type=&n=200

[2] The Formula Editor NewHelp articles for all of the Elements panel: 

https://help.libreoffice.org/6.2/en-US/text/smath/01/03090100.html -- Unary/Binary Operators
https://help.libreoffice.org/6.2/en-US/text/smath/01/03090200.html -- Relations
https://help.libreoffice.org/6.2/en-US/text/smath/01/03090800.html -- Set Operations
https://help.libreoffice.org/6.2/en-US/text/smath/01/03090400.html -- Functions
https://help.libreoffice.org/6.2/en-US/text/smath/01/03090300.html -- Operators
https://help.libreoffice.org/6.2/en-US/text/smath/01/03090600.html -- Attributes
https://help.libreoffice.org/6.2/en-US/text/smath/01/03090500.html -- Brackets
https://help.libreoffice.org/6.2/en-US/text/smath/01/03090700.html -- Format
https://help.libreoffice.org/6.2/en-US/text/smath/01/03091600.html -- Other Symbols
Comment 2 Olivier Hallot 2018-10-31 11:43:30 UTC
(In reply to V Stuart Foote from comment #1)
> @Olivier, in UI we draw these from OpenSymbol. So should the font source
> before conversion to SVG curves also be OpenSymbol to match?

Not necessarily and is a good start. It seems that Liberation and STIX [3] font families have all the math symbols as well.

The Elements pane is richer that the old Elements window, so the task deserve an evaluation on what is the right SVG representation of the element and adjust the Help text accordingly. For example, the Integral function has 4 representations in the Elements pane...

> 
> And it is more than just the Unary/Binary operators, looks like there are
> 184 PNG [1] that would need to be rendered as SVG for each of the smath
> NewHelp articles [2].

Yes. Actually the same applies to other math symbols category as you pointed in [2], we can open bugs with same task for the remaining categories.

[3] https://stixfonts.org/
Comment 3 Mark 2018-12-28 17:25:54 UTC
Created attachment 147877 [details]
first 12 SVGs for Unary/Binary operators help.libreoffice.org/6.2/en-US/text/smath/01/03090100.html

Hi, I created the first 12 SVGs for the icons in the help.libreoffice.org/6.2/en-US/text/smath/01/03090100.html file.

Can you look at them and let me know if I am doing good?
Comment 4 V Stuart Foote 2018-12-28 18:17:03 UTC
(In reply to Mark from comment #3)
> Created attachment 147877 [details]
> first 12 SVGs for Unary/Binary operators
> help.libreoffice.org/6.2/en-US/text/smath/01/03090100.html
> 
> Hi, I created the first 12 SVGs for the icons in the
> help.libreoffice.org/6.2/en-US/text/smath/01/03090100.html file.
> 
> Can you look at them and let me know if I am doing good?

Great start and the glyph conversion to needed paths in SVG looks correct.

Unfortunately, the source font used for paths really should pick up the Liberation Serif and OpenSymbol we use by default in the Formula editor. Also the spacing between source glyphs should be opened up--it is too compressed.

Open this StarMath 5.0 snippet in the Formula editor to see actual rendering with default fonts and spacing...
<clip>
+a ```` -a ```` +-a ```` -+a newline
a + b ```` a cdot b ```` a times b ````  a * b newline 
a - b ```` {a} over {b} ```` a div b ```` a / b ```  newline
</clip>

Something matching that more closely seems appropriate.
Comment 5 V Stuart Foote 2018-12-28 18:18:34 UTC
Created attachment 147879 [details]
clip of operators entered in Formula editor--showing Liberation Serif and OpenSymbol default fonts and spacings
Comment 6 Olivier Hallot 2018-12-28 19:38:17 UTC
Yes it is a good start. Well crafted SVG and works perfectly in help page (tested firefox)

discussion: does it worth to also add a representation of the placeholders as shown in the right panel? e.g.
+ a 
+ <?>

or 

a + b
<?> + <?>

comments?
Comment 7 Mark 2018-12-29 01:25:09 UTC
Created attachment 147881 [details]
proposed Unary Binary operators SVGs version 2

proposed Unary Binary operators SVGs version 2 using Leberation Seif and 2 px spacing.
Comment 8 Olivier Hallot 2018-12-29 11:21:33 UTC
To be honest, if you enlarge the expression "a+b" you'll see a slant effect as if the letters are not aligned to the base line.  Also, the thickness of the minus sign (-) is different from the plus sign (+). Look not good to me.

I think the font Liberation serif does not render well. OpenSymbol looks better for + and - but it does not have serif.

Any other suggestions?
Comment 9 V Stuart Foote 2018-12-29 14:45:44 UTC
Actually the weights are correct (as drawn from OpenSymbol). It is just that the font needs some attention (bug 103740) and til then its behavior when generating nodes in sm is a bit odd.

Could either use the glyph weight(s) as now or adjust them to be consistent.

But if keeping fidelity of defaults in Formula editor (which I think is appropriate); more of a challenge is alignment of elements of the the "nodes" and the fact that when using variables (Liberation Serif) in a node it will be italicized while numbers are not italicized.
Comment 10 Mark 2018-12-29 20:48:44 UTC
Created attachment 147888 [details]
Screen Shot a + b

I do not see the 'slant effect as if the letters are not aligned to the base line'. see attached image.
But the big question is do I continue or fix something?
Comment 11 Olivier Hallot 2018-12-29 21:42:46 UTC
Created attachment 147890 [details]
comparison of 3 options for fonts
Comment 12 Olivier Hallot 2018-12-29 21:43:28 UTC
Hi Mark

Yes please lets settle that. The slant effect can be from individual bias.

Attached is a sample with 3 lines

Font in Line 1 is Liberation Serif, where letters are italic and + - are normal

Font in Line 2 is Stix, letters are STIX Two Text and +- are in STIX Two Math

Font in Line 3 is OpenSymbol, and there is no italic variant in this font.

Pick your choice !!!
Comment 13 Mark 2018-12-29 23:37:58 UTC
Ok, I choose Liberation Serif, where letters are italic and + - are normal and I will start from beginning.
Comment 14 Mark 2019-01-01 18:40:40 UTC
Created attachment 147922 [details]
proposed Unary Binary operators SVGs version 3 Complete

proposed Unary Binary operators SVGs version 3 Complete using Leberation Seif and 2 px spacing.
Comment 15 Mark 2019-01-01 18:42:24 UTC
Created attachment 147923 [details]
proposed Attributes SVGs version 1 Complete

proposed Attributes SVGs version 1 Complete using Leberation Seif and 2 px spacing.
Comment 16 Mark 2019-01-01 18:43:22 UTC
Created attachment 147924 [details]
proposed Brackets SVGs version 1 Complete

proposed Brackets SVGs version 1 Complete using Leberation Seif and 2 px spacing.
Comment 17 V Stuart Foote 2019-01-01 19:55:06 UTC
@Mark, those are looking great! 

But, in addition to the current PNG icons needing SVG replacement, there are some newer functions that never got PNGs created that should be added in the help pages.

For example the circled operators for the Urnary/Binary article, and the ceiling and floor brackets for the Brackets article.

Probably better to create them now now while you're set up for it.
Comment 18 Mark 2019-01-01 22:15:25 UTC
Ok. I admit I am a novice at math symbols so had to google it and found
circled operators for the Urnary/Binary article,
circled plus &#x2295;
Circled Times U+2A0
Circled Ring U+229A 
'CIRCLED MINUS' (U+2296)
'CIRCLED DIVISION SIGN' (U+2A38)
Circled Asterisk U+229B
dot in a circle

and the ceiling and floor brackets for the Brackets article.
'RIGHT FLOOR' (U+230B)
'LEFT FLOOR' (U+230A)
'RIGHT CEILING' (U+2309)
'LEFT CEILING' (U+2308)

Look complete?
Comment 19 V Stuart Foote 2019-01-02 00:59:02 UTC
(In reply to Mark from comment #18)

> circled plus &#x2295;
> Circled Times U+2A0
> Circled Ring U+229A 
> 'CIRCLED MINUS' (U+2296)
> 'CIRCLED DIVISION SIGN' (U+2A38)
> Circled Asterisk U+229B
> dot in a circle
> 

The UNICODE glyphs we'd need for these as drawn from OpenSymbol are

CIRCLED PLUS -- U+2295  // ⊕
CIRCLED MINUS -- U+2296 // ⊖
CIRCLED TIMES -- U+2297 // ⊗
CIRCLED DIVISION SLASH -- U+2298 // ⊘
CIRCLED DOT OPERATOR -- U+2299 // ⊙


> and the ceiling and floor brackets for the Brackets article.
> 'RIGHT FLOOR' (U+230B)
> 'LEFT FLOOR' (U+230A)
> 'RIGHT CEILING' (U+2309)
> 'LEFT CEILING' (U+2308)
> 
> Look complete?

Those are fine...

But suggest you should compare each of the Elements panels from a Math Formula editor session to the current "new" Help articles from comment 1 for the glyphs you'll need (looking at both the PNG images, or when just entered as starmath). 

Then look for the glyph in OpenSymbol, using the LibreOffice Special Characters dialog, or another chart based font utility (I prefer BableMap [1] on Windows).

That would allow you to identify most things needing an SVG for the new Help, but suspect there will be a few that can't be done with just the font glyphs and line work.

=-ref-=
[1] http://www.babelstone.co.uk/Software/BabelMap.html
Comment 20 Mark 2019-01-02 03:31:12 UTC
Created attachment 147929 [details]
proposed Format SVGs version 1 Complete

proposed Format SVGs version 1 Complete using Leberation Seif.
Comment 21 Mark 2019-01-02 16:02:07 UTC
Created attachment 147945 [details]
proposed Circled operators SVGs version 1 for Unary Binary

proposed Circled operators SVGs version 1 for Unary Binary using Leberation Seif
Comment 22 Mark 2019-01-02 16:56:00 UTC
Created attachment 147949 [details]
floor and ceiling brackets 'Brackets'

V Stuart Foote also wanted floor and ceiling brackets in the Brackets '03090500.html' page.
Here they are.
Comment 23 V Stuart Foote 2019-01-02 17:21:46 UTC
Created attachment 147950 [details]
circle operators, wide slashes, sub and sup examples needed in SVG

@Mark,

Yes those are all the correct glyphs (look to be from OpenSymbol) so the conversion to path in SVG looks good. But for the newHelp they'd need to be worked into examples like the other SVGs you've prepared.

We need an example to use for these entries in the Unary/Binary Operators page:

1) By typing <?>oplus<?> in the Commands window, you insert a circled plus operator in your document.

2) Type <?>ominus<?> in the Commands window to insert a circled minus operator.

3) Type <?>odot<?> in the Commands window to insert a circled dot operator in the formula.

4) Type <?>odivide<?> in the Commands window to insert a circled division operator in the formula.

5) Type a wideslash b in the Commands window to produce two characters with a slash (from lower left to upper right) between them. The characters are set such that everything to the left of the slash is up, and everything to the right is down. This command is also available in the context menu of the Commands window.

6) Type a widebslash b in the Commands window to produce two characters with a slash (from upper left to lower right) between them. The characters are set such that everything to the left of the slash is down, and everything to the right is up. This command is also available in the context menu of the Commands window.

7) Type sub or sup in the Commands window to add indexes and powers to the characters in your formula; for example, a sub 2.


And we need an example to use for each of these entries in Brackets page:

1) To insert floor brackets, type lfloor<?>rfloor directly in the Commands window.

2) To insert ceiling brackets, type lceil<?>rceil directly in the Commands window.

3) To insert scalable floor brackets, type left lfloor<?>right rfloor directly in the Commands window.

4) To insert scalable ceiling brackets, type left lceil<?>right rceil directly in the Commands window.
Comment 24 V Stuart Foote 2019-01-02 17:22:29 UTC
Created attachment 147951 [details]
ceiling floor examples needed in SVG
Comment 25 V Stuart Foote 2019-01-02 17:27:02 UTC
Created attachment 147952 [details]
ceiling floor examples needed in SVG

clip changed to show the correct Elements panel - Brackets
Comment 26 Mark 2019-01-02 18:26:00 UTC
V Stuart Foote, in  Comment 23, step 6 you have wideslash b for a slash (from lower left to upper right). Is it just 'wideslash'?
Comment 27 V Stuart Foote 2019-01-02 19:02:31 UTC
(In reply to Mark from comment #26)
> V Stuart Foote, in  Comment 23, step 6 you have wideslash b for a slash
> (from lower left to upper right). Is it just 'wideslash'?

No, there actually are two commands 'wideslash' and 'widebslash' -- a wide forward slash and wide backward (leaning) slash.

Example as in attachment 147950 [details]
Comment 28 Commit Notification 2019-01-03 10:44:58 UTC
Mark Robbinson committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/+/4764c4c068f4823b0d235ebfe6b969dcdce386b7%5E%21

tdf#121065 Replace Math PNG images with SVG
Comment 29 Commit Notification 2019-01-11 20:23:37 UTC
Mark-R committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/+/30dbe5a040d7e2f057bd98827150fc60e440be65%5E%21

tdf#121065 Replace Math -- Functions PNG images with SVG Change 5
Comment 30 Commit Notification 2019-01-19 10:35:39 UTC
Mark-R committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/+/497a5081e0ca80d9c29dfd94acd2ebb367676353%5E%21

tdf#121065 Replace Other Symbols PNG images with SVG
Comment 31 Commit Notification 2019-01-20 20:32:45 UTC
Mark-R committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/+/d0d53d52d21110c32813500dc1c87942883bc72a%5E%21

tdf#121065 Replace SetOperations, Relations Symbols with SVGs
Comment 33 Commit Notification 2019-01-21 18:14:04 UTC
Mark-R committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/+/97643084f932f8e6c9a3f13d4961b00b333a8573%5E%21

tdf#121065 Replace Attributes, Brackets and Format Icons with SVGs
Comment 34 Mark 2019-01-21 18:25:42 UTC
after many commits and amends got all smath icons changed to SVGs.
Comment 35 Commit Notification 2019-01-25 10:02:40 UTC
Mark-R committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/+/50773c1dda4deee45812f67b2cca97626b0562f0%5E%21

tdf#121065 rebuild help
Comment 36 BogdanB 2019-01-26 13:40:51 UTC
Verified. Fixed.