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.
@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
(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/
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?
(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.
Created attachment 147879 [details] clip of operators entered in Formula editor--showing Liberation Serif and OpenSymbol default fonts and spacings
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?
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.
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?
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.
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?
Created attachment 147890 [details] comparison of 3 options for fonts
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 !!!
Ok, I choose Liberation Serif, where letters are italic and + - are normal and I will start from beginning.
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.
Created attachment 147923 [details] proposed Attributes SVGs version 1 Complete proposed Attributes SVGs version 1 Complete using Leberation Seif and 2 px spacing.
Created attachment 147924 [details] proposed Brackets SVGs version 1 Complete proposed Brackets SVGs version 1 Complete using Leberation Seif and 2 px spacing.
@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.
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 ⊕ 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?
(In reply to Mark from comment #18) > circled plus ⊕ > 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
Created attachment 147929 [details] proposed Format SVGs version 1 Complete proposed Format SVGs version 1 Complete using Leberation Seif.
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
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.
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.
Created attachment 147951 [details] ceiling floor examples needed in SVG
Created attachment 147952 [details] ceiling floor examples needed in SVG clip changed to show the correct Elements panel - Brackets
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'?
(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]
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
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
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
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
Good progress... Other pages to work 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
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
after many commits and amends got all smath icons changed to SVGs.
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
Verified. Fixed.