[Libreoffice-bugs] [Bug 138129] Add color picker to starmath

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Nov 18 18:43:17 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=138129

--- Comment #4 from dante19031999 at gmail.com ---
(In reply to V Stuart Foote from comment #3)
> @Dante, *
> 
> Sorry, but issue is that using "named colors" for StarMath/MathML formula
> parsing is only *valid* for a limited set of colors [1].  Loading a bunch of
> non-normative named colors disrupts interoperability and makes it harder to
> integrate SM OLE with other LibreOffice modules.
> 
> And in general having a lot of named colors preloaded is poor UX as they are
> not exposed via GUI--the core of this issue.
> 
> I'd suggest instead that using our SVX color picker with our supported color
> theme(s), as found in core/extras/source/palettes, to apply #RGB or #RRGGBB
> colors to the formula bar seems preferable.
> 
> Otherwise for filter import of MathML we should not be expanding named
> colors beyond the MathML norms.  Just the set of HTML4 colors, #RGB/#RRGGBB
> with color fallback for any unrecognized named colors arriving from
> ill-formed MathML.
> 
> 
> =-ref-=
> [1] This is the W3C spec for MathML, para 2.1.5.3 color, listing only the
> HTML4 colors ("aqua", "black", "blue", "fuchsia", "gray", "green", "lime",
> "maroon", "navy", "olive", "purple", "red", "silver", "teal", "white", and
> "yellow") as valid for use in MathML:
> https://www.w3.org/TR/MathML/chapter2.html#type.html-color
> 
> These were the commits changing color handling in the sm module.
> 
> https://gerrit.libreoffice.org/c/core/+/105526
> 
> https://gerrit.libreoffice.org/c/core/+/105892

Here I have to apologize. I used the MDN documentation for this and added the
HTML full set because it said "The text color. You can use #rgb, #rrggbb and
HTML color names.". Should have looked for better. That also means I have
introduced a bug in the mathml export / import system, handling all HTML 5. For
some reason firefox does seem to support all html colors, so as you say, will
have to deal with ill formated colors. However the export needs correction. I
guess only people who knows CSS and latex would be able to exploit this new
function.

Actual starmath can load from mathml #RRGGBB, but not #RGB. It suports on
parser color rgb r g b , color hex num16 and ~ color #RRGGBB ( it is
interpreted as an exadecimal number even if missing left zeros, but most
compact form, color#RRGGBB would be understood, looking like a single keyword).
Dvipsnames are been implemented as a future compatibility layer for importing /
exporting latex. 

TODO:
 - Remove from mathml export Css2 and later colors.
 - Add support for #RGB colors.
 - Add a dvipsnames palettes.
I'll do it this weekend (excepting third point which requires more time).

Are those the changes I think you want to do?
Is it actually possible to implement the color picker?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201118/47cee584/attachment.htm>


More information about the Libreoffice-bugs mailing list