Feature request: color
corcoted opened this issue · 3 comments
corcoted commented
It would be nice to be able to convert color attributes.
For example, from MathML
<math>
<mi style="color: blue">m</mi>
<mi>x</mi>
<mo>+</mo>
<mi style="color: red">c</mi>
</math>
to/from LaTeX (assuming the color or xcolor package is loaded...)
$$ {\color{blue}m}x+{\color{red}c} $$
which renders as
Alternatively, (although MathJAX doesn't support this)
$$ \textcolor{blue}{m}x+\textcolor{red}{c} $$
d-morrison commented
+1; c.f. jgm/pandoc#10222
jgm commented
Looks like in OMML color is added this way:
<m:r><w:rPr><w:color w:val="FF0000" w:themeColor="accent4"/></w:rPr><m:t>y</m:t></m:r>
(for red)
jgm commented
I added a branch color
with a bit of work towards this.
One issue is how to store the colors. If we use strings, we'll need to convert them to RGB values for some formats. If we use RGB values, we'll need strings for some formats.