Coloring is a standart part of AsciiMath - http://asciimath.org/ see table Accents

0 votes
asked May 30, 2018 in Wanted features by nAlAz117 (240 points)

So we can use on http://asciimath.org a following text

color(red)(f(t))=color(blue)((a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L))

to render a colored Image. Try it.

Is it realised in plantuml.jar? If yes, then option color can be ommited!

Thank you for your Support!

1 Answer

0 votes
answered May 30, 2018 by plantuml (295,000 points)

Ok, thanks for the tip.

Strangely AsciiMath generates some LaTeX code with \color macro but JLaTeXMath expects \textcolor macro.

Fortunately, we've implemented a tiny patch to change \color to \textcolor so with last beta http://beta.plantuml.net/plantuml.jar your following example is now working:

@startmath
color(red)(f(t))=color(blue)((a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L))
@endmath

Thanks again for the tip!

commented May 31, 2018 by nAlAz117 (240 points)
Very nice! It is also possible to use the RGB hex value instead of color name. See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
For example
color(#008b8b)(f(t))=…
Thank you again
...